+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):
* 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;
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: