#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"
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);
gint response_id,
EvWindow *ev_window)
{
+ gchar *uri;
+
if (response_id == GTK_RESPONSE_OK) {
GSList *uris;
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);
}
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));
}
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));