]> www.fi.muni.cz Git - evince.git/commitdiff
Do not use display before initializing it. Remove compile warnings.
authorCarlos Garcia Campos <carlosgc@gnome.org>
Fri, 27 Jul 2007 09:09:09 +0000 (09:09 +0000)
committerCarlos Garcia Campos <carlosgc@src.gnome.org>
Fri, 27 Jul 2007 09:09:09 +0000 (09:09 +0000)
2007-07-27  Carlos Garcia Campos  <carlosgc@gnome.org>
* shell/ev-utils.c: (get_num_monitors):
* shell/ev-window.c: (ev_window_sizing_mode_changed_cb):
Do not use display before initializing it. Remove compile
warnings.

svn path=/trunk/; revision=2584

ChangeLog
shell/ev-utils.c
shell/ev-window.c

index 80b3494b5b9499ef28f06e0098f25a402b37b357..5723fd305ac0e6ab9b2f3245f09118b20da8c309 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2007-07-27  Carlos Garcia Campos  <carlosgc@gnome.org>
+
+       * shell/ev-utils.c: (get_num_monitors):
+       * shell/ev-window.c: (ev_window_sizing_mode_changed_cb):
+
+       Do not use display before initializing it. Remove compile
+       warnings.
+       
 2007-07-27  Cosimo Cecchi   <anarki@lilik.it>
 
        * shell/ev-view.c: (ev_view_class_init):
index fabdeaa16801e4ce203be4e5a1b4d971fb6b6992..3e5c203f5d89758b41063baafd296b66fdb8180a 100644 (file)
@@ -376,27 +376,28 @@ ev_gui_menu_position_tree_selection (GtkMenu   *menu,
  * Returns: Number of monitors, -1 if uncertain situation (like multiple screens)
  */
 gint 
-get_num_monitors (GtkWindow * window)
+get_num_monitors (GtkWindow *window)
 {
-       GdkDisplay * display; 
-       GdkScreen * screen;
-       gint num_screen = gdk_display_get_n_screens(display);
+       GdkDisplay *display; 
+       GdkScreen *screen;
+       gint num_screen;
        
-       display = gdk_display_get_default();
+       display = gdk_display_get_default ();
+       num_screen = gdk_display_get_n_screens (display);
        
        if (num_screen != 1)
                return -1;
        
        if (window)
-               screen = gtk_window_get_screen(window);
+               screen = gtk_window_get_screen (window);
        else
-               screen = gdk_display_get_screen(display, 0);
+               screen = gdk_display_get_screen (display, 0);
 
-       return gdk_screen_get_n_monitors(screen);
+       return gdk_screen_get_n_monitors (screen);
 }
 
 gdouble
-get_screen_dpi (GtkWindow * window)
+get_screen_dpi (GtkWindow *window)
 {
        GdkScreen *screen;
        gdouble    xdpi, ydpi;
index 7e686c35d82f4ad59a8d3bb4ecee9c2f66745e49..d9fc479cfb8619306349615f46c60ef6407c28d8 100644 (file)
@@ -3519,7 +3519,8 @@ ev_window_sizing_mode_changed_cb (EvView *view, GParamSpec *pspec,
        g_signal_handlers_disconnect_by_func (ev_window->priv->view, ev_view_update_view_size, scrolled_window);
 
        if (sizing_mode != EV_SIZING_FREE)
-               ev_view_update_view_size (ev_window->priv->view, GTK_SCROLLED_WINDOW (scrolled_window));
+               ev_view_update_view_size (EV_VIEW (ev_window->priv->view),
+                                         GTK_SCROLLED_WINDOW (scrolled_window));
 
        switch (sizing_mode) {
                case EV_SIZING_BEST_FIT: