X-Git-Url: https://www.fi.muni.cz/~kas/git//home/kas/public_html/git/?a=blobdiff_plain;ds=inline;f=shell%2Fev-window.c;h=d3787180f9bc97e37053a16d11de230e94cc059e;hb=4f6105d3df2cbf07bccd7de156693aab7e71bc31;hp=233067b398dfd5214bf591e835374d003bb67646;hpb=85fa11d86616d3a9c5a5cfeba78dd7aa72e7997a;p=evince.git diff --git a/shell/ev-window.c b/shell/ev-window.c index 233067b3..d3787180 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); @@ -1506,6 +1506,8 @@ file_open_dialog_response_cb (GtkWidget *chooser, gint response_id, EvWindow *ev_window) { + gchar *uri; + if (response_id == GTK_RESPONSE_OK) { GSList *uris; @@ -1518,8 +1520,10 @@ file_open_dialog_response_cb (GtkWidget *chooser, g_slist_foreach (uris, (GFunc)g_free, NULL); g_slist_free (uris); } - ev_application_set_chooser_uri (EV_APP, - gtk_file_chooser_get_uri (GTK_FILE_CHOOSER (chooser))); + + uri = gtk_file_chooser_get_uri (GTK_FILE_CHOOSER (chooser)); + ev_application_set_chooser_uri (EV_APP, uri); + g_free (uri); gtk_widget_destroy (chooser); } @@ -2902,9 +2906,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)); } @@ -3799,9 +3810,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));