X-Git-Url: https://www.fi.muni.cz/~kas/git//home/kas/public_html/git/?a=blobdiff_plain;f=shell%2Fev-window.c;h=99758209c77fa3c3007bcb80a40267777711b111;hb=6eb03f602ee62c901002c973b2b42b2fb208076b;hp=f5a7bf4eed95c0549794a8824eb5de2d8d3f7287;hpb=d36ca9a2c19bb21b243024e325336d9d876497e2;p=evince.git diff --git a/shell/ev-window.c b/shell/ev-window.c index f5a7bf4e..99758209 100644 --- a/shell/ev-window.c +++ b/shell/ev-window.c @@ -211,7 +211,7 @@ struct _EvWindowPrivate { #define GCONF_LOCKDOWN_SAVE "/desktop/gnome/lockdown/disable_save_to_disk" #define GCONF_LOCKDOWN_PRINT "/desktop/gnome/lockdown/disable_printing" -#define PRESENTATION_TIMEOUT 5 * 1000 +#define PRESENTATION_TIMEOUT 5 #define SIDEBAR_DEFAULT_SIZE 132 #define LINKS_SIDEBAR_ID "links" @@ -506,7 +506,7 @@ update_chrome_visibility (EvWindow *window) fullscreen_toolbar = ((priv->chrome & EV_CHROME_FULLSCREEN_TOOLBAR) != 0 || (priv->chrome & EV_CHROME_RAISE_TOOLBAR) != 0) && fullscreen; findbar = (priv->chrome & EV_CHROME_FINDBAR) != 0; - sidebar = (priv->chrome & EV_CHROME_SIDEBAR) != 0 && !fullscreen_mode; + sidebar = (priv->chrome & EV_CHROME_SIDEBAR) != 0 && !presentation; preview_toolbar = (priv->chrome& EV_CHROME_PREVIEW_TOOLBAR); set_widget_visibility (priv->menubar, menubar); @@ -2220,6 +2220,8 @@ ev_window_print_send (EvWindow *window, gtk_print_settings_set_collate (settings, FALSE); if (capabilities & EV_FILE_EXPORTER_CAN_REVERSE) gtk_print_settings_set_reverse (settings, FALSE); + if (capabilities & EV_FILE_EXPORTER_CAN_NUMBER_UP) + gtk_print_settings_set_number_up (settings, 1); if (window->priv->print_preview) { gchar *uri; @@ -2294,6 +2296,7 @@ ev_window_print_dialog_response_cb (GtkDialog *dialog, EvPrintPageSet page_set; gint n_ranges = 0; gint copies; + gint pages_per_sheet; gboolean collate; gboolean reverse; gdouble scale; @@ -2385,6 +2388,8 @@ ev_window_print_dialog_response_cb (GtkDialog *dialog, height *= scale; } + pages_per_sheet = gtk_print_settings_get_number_up (window->priv->print_settings); + copies = gtk_print_settings_get_n_copies (window->priv->print_settings); collate = gtk_print_settings_get_collate (window->priv->print_settings); reverse = gtk_print_settings_get_reverse (window->priv->print_settings); @@ -2394,6 +2399,7 @@ ev_window_print_dialog_response_cb (GtkDialog *dialog, width, height, ranges, n_ranges, page_set, + pages_per_sheet, copies, collate, reverse); @@ -2896,9 +2902,16 @@ presentation_set_timeout (EvWindow *window) if (window->priv->presentation_timeout_id > 0) { g_source_remove (window->priv->presentation_timeout_id); } - + +#if GLIB_CHECK_VERSION (2, 13, 0) + window->priv->presentation_timeout_id = + g_timeout_add_seconds (PRESENTATION_TIMEOUT, + (GSourceFunc)presentation_timeout_cb, window); +#else window->priv->presentation_timeout_id = - g_timeout_add (PRESENTATION_TIMEOUT, (GSourceFunc)presentation_timeout_cb, window); + g_timeout_add (PRESENTATION_TIMEOUT * 1000, + (GSourceFunc)presentation_timeout_cb, window); +#endif ev_view_show_cursor (EV_VIEW (window->priv->view)); } @@ -3793,9 +3806,7 @@ ev_window_sidebar_visibility_changed_cb (EvSidebar *ev_sidebar, action = gtk_action_group_get_action (ev_window->priv->action_group, "ViewSidebar"); - if (!ev_view_get_presentation (view) && - !ev_view_get_fullscreen (view)) { - + if (!ev_view_get_presentation (view)) { gtk_toggle_action_set_active (GTK_TOGGLE_ACTION (action), GTK_WIDGET_VISIBLE (ev_sidebar)); @@ -5163,12 +5174,12 @@ ev_window_init (EvWindow *ev_window) } #ifdef HAVE_GTK_RECENT -#if GTK_CHECK_VERSION (2, 11, 4) +#if GTK_CHECK_VERSION(2,11,4) ev_window->priv->recent_manager = gtk_recent_manager_get_default (); #else /* It's fine to just use the one of the default screen here */ ev_window->priv->recent_manager = gtk_recent_manager_get_for_screen ( - gtk_screen_get_default ()); + gdk_screen_get_default ()); #endif ev_window->priv->recent_action_group = NULL; ev_window->priv->recent_ui_id = 0;