new_page = CLAMP (g_value_get_int (&page), 0, ev_page_cache_get_n_pages (window->priv->page_cache) - 1);
ev_page_cache_set_current_page (window->priv->page_cache,
new_page);
+ g_value_unset (&page);
}
}
if (ev_metadata_manager_get (NULL, "show_toolbar", &show_toolbar, FALSE)) {
if (!g_value_get_boolean (&show_toolbar))
chrome &= ~EV_CHROME_TOOLBAR;
+ g_value_unset (&show_toolbar);
}
window->priv->chrome = chrome;
}
if (ev_metadata_manager_get (uri, "sidebar_size", &sidebar_size, FALSE)) {
gtk_paned_set_position (GTK_PANED (window->priv->hpaned),
g_value_get_int (&sidebar_size));
+ g_value_unset(&sidebar_size);
}
if (document && ev_metadata_manager_get (uri, "sidebar_page", &sidebar_page, FALSE)) {
const char *page_id = g_value_get_string (&sidebar_page);
-
+
if (strcmp (page_id, LINKS_SIDEBAR_ID) == 0 && ev_sidebar_page_support_document (EV_SIDEBAR_PAGE (links), document)) {
ev_sidebar_set_page (EV_SIDEBAR (sidebar), links);
} else if (strcmp (page_id, THUMBNAILS_SIDEBAR_ID) && ev_sidebar_page_support_document (EV_SIDEBAR_PAGE (thumbs), document)) {
} else if (strcmp (page_id, ATTACHMENTS_SIDEBAR_ID) && ev_sidebar_page_support_document (EV_SIDEBAR_PAGE (attachments), document)) {
ev_sidebar_set_page (EV_SIDEBAR (sidebar), thumbs);
}
+ g_value_unset (&sidebar_page);
} else if (document && ev_sidebar_page_support_document (EV_SIDEBAR_PAGE (links), document)) {
ev_sidebar_set_page (EV_SIDEBAR (sidebar), links);
}
if (ev_metadata_manager_get (uri, "sidebar_visibility", &sidebar_visibility, FALSE)) {
update_chrome_flag (window, EV_CHROME_SIDEBAR, g_value_get_boolean (&sidebar_visibility));
+ g_value_unset (&sidebar_visibility);
}
}
} else {
gtk_window_unmaximize (GTK_WINDOW (window));
}
+ g_value_unset (&maximized);
}
if (restore_size &&
gtk_window_resize (GTK_WINDOW (window),
g_value_get_int (&width),
g_value_get_int (&height));
+ g_value_unset (&width);
+ g_value_unset (&height);
}
if (restore_size &&
ev_metadata_manager_get (uri, "window_x", &x, TRUE) &&
ev_metadata_manager_get (uri, "window_y", &y, TRUE)) {
gtk_window_move (GTK_WINDOW (window), g_value_get_int (&x),
g_value_get_int (&y));
+ g_value_unset (&x);
+ g_value_unset (&y);
}
/* Sizing mode */
if (ev_metadata_manager_get (uri, "zoom", &zoom, FALSE) &&
ev_view_get_sizing_mode (view) == EV_SIZING_FREE) {
ev_view_set_zoom (view, g_value_get_double (&zoom), FALSE);
+ g_value_unset (&zoom);
}
/* Continuous */
if (ev_metadata_manager_get (uri, "continuous", &continuous, FALSE)) {
ev_view_set_continuous (view, g_value_get_boolean (&continuous));
+ g_value_unset (&continuous);
}
/* Dual page */
if (ev_metadata_manager_get (uri, "dual-page", &dual_page, FALSE)) {
ev_view_set_dual_page (view, g_value_get_boolean (&dual_page));
+ g_value_unset (&dual_page);
}
/* Presentation */
if (g_value_get_boolean (&presentation) && uri) {
ev_window_run_presentation (window);
}
+ g_value_unset (&presentation);
}
/* Fullscreen */
if (g_value_get_boolean (&fullscreen) && uri) {
ev_window_run_fullscreen (window);
}
+ g_value_unset (&fullscreen);
}
/* Rotation */
break;
}
}
+ g_value_unset (&rotation);
}
}