]> git.eshelyaron.com Git - emacs.git/commitdiff
* gtkutil.c: Omit integer casts.
authorPaul Eggert <eggert@cs.ucla.edu>
Wed, 13 Jul 2011 15:42:12 +0000 (08:42 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Wed, 13 Jul 2011 15:42:12 +0000 (08:42 -0700)
(xg_get_pixbuf_from_pixmap): Remove unnecessary cast.
(xg_set_toolkit_scroll_bar_thumb): Rewrite to avoid need for cast.

src/ChangeLog
src/gtkutil.c

index fd1644c9b9867309b552a3662981421ad52c9d9e..c986030fcf83dac6f2ec1ea3c3a540bc3acdb670 100644 (file)
@@ -1,5 +1,9 @@
 2011-07-13  Paul Eggert  <eggert@cs.ucla.edu>
 
+       * gtkutil.c: Omit integer casts.
+       (xg_get_pixbuf_from_pixmap): Remove unnecessary cast.
+       (xg_set_toolkit_scroll_bar_thumb): Rewrite to avoid need for cast.
+
        * image.c (png_load): Don't assume height * row_bytes fits in 'int'.
 
        * bidi.c (bidi_dump_cached_states): Use pD to print ptrdiff_t.
index 35b366222dead2de7e7938bb1054e6f5802bf3aa..8826b08851a6ea80260b8875e8fe0d562e607b8c 100644 (file)
@@ -269,8 +269,8 @@ xg_get_pixbuf_from_pixmap (FRAME_PTR f, Pixmap pix)
                                       GDK_COLORSPACE_RGB,
                                       FALSE,
                                       xim->bitmap_unit,
-                                      (int) width,
-                                      (int) height,
+                                      width,
+                                      height,
                                       xim->bytes_per_line,
                                       NULL,
                                       NULL);
@@ -3646,7 +3646,7 @@ xg_set_toolkit_scroll_bar_thumb (struct scroll_bar *bar,
              gtk_adjustment_set_page_size (adj, size);
              gtk_adjustment_set_step_increment (adj, new_step);
              /* Assume a page increment is about 95% of the page size  */
-             gtk_adjustment_set_page_increment (adj,(int) (0.95*size));
+             gtk_adjustment_set_page_increment (adj, size - size / 20);
              changed = 1;
            }
        }