ev_window_title_set_type (ev_window->priv->title, EV_WINDOW_TITLE_DOCUMENT);
ev_job_queue_add_job (ev_window->priv->xfer_job, EV_JOB_PRIORITY_HIGH);
- gtk_widget_destroy (password_dialog);
+ gtk_widget_destroy (password_dialog);
return;
}
uris = gtk_file_chooser_get_uris (GTK_FILE_CHOOSER (chooser));
- ev_application_open_uri_list (EV_APP, uris, GDK_CURRENT_TIME);
+ ev_application_open_uri_list (EV_APP, uris,
+ gtk_window_get_screen (GTK_WINDOW (ev_window)),
+ GDK_CURRENT_TIME);
g_slist_foreach (uris, (GFunc)g_free, NULL);
g_slist_free (uris);
#ifdef HAVE_GTK_RECENT
static void
ev_window_cmd_recent_file_activate (GtkAction *action,
- GtkRecentInfo *info)
+ EvWindow *window)
{
- const gchar *uri;
+ GtkRecentInfo *info;
+ const gchar *uri;
+ info = g_object_get_data (G_OBJECT (action), "gtk-recent-info");
+ g_assert (info != NULL);
+
uri = gtk_recent_info_get_uri (info);
- ev_application_open_uri (EV_APP, uri, NULL,
- GDK_CURRENT_TIME, NULL);
+ ev_application_open_uri_at_dest (EV_APP, uri,
+ gtk_window_get_screen (GTK_WINDOW (window)),
+ NULL, 0,
+ GDK_CURRENT_TIME);
}
#else
static void
"label", label,
NULL);
- g_object_weak_ref (G_OBJECT (action),
- (GWeakNotify) gtk_recent_info_unref,
- gtk_recent_info_ref (info));
+ g_object_set_data_full (G_OBJECT (action),
+ "gtk-recent-info",
+ gtk_recent_info_ref (info),
+ (GDestroyNotify) gtk_recent_info_unref);
+
g_signal_connect (G_OBJECT (action), "activate",
G_CALLBACK (ev_window_cmd_recent_file_activate),
- (gpointer) info);
+ (gpointer) ev_window);
gtk_action_group_add_action (ev_window->priv->recent_action_group,
action);
gint response,
EvWindow *window)
{
- EvPrintRange *ranges = NULL;
- EvPageCache *page_cache;
- gint n_ranges = 0;
- gint copies;
- gboolean collate;
- gboolean reverse;
- gdouble scale;
- gint current_page;
- gint width;
- gint height;
- GtkPrintPages print_pages;
+ EvPrintRange *ranges = NULL;
+ EvPrintPageSet page_set;
+ EvPageCache *page_cache;
+ gint n_ranges = 0;
+ gint copies;
+ gboolean collate;
+ gboolean reverse;
+ gdouble scale;
+ gint current_page;
+ gint width;
+ gint height;
+ GtkPrintPages print_pages;
if (response != GTK_RESPONSE_OK) {
gtk_widget_destroy (GTK_WIDGET (dialog));
break;
}
+ page_set = (EvPrintPageSet)gtk_print_settings_get_page_set (window->priv->print_settings);
+
scale = gtk_print_settings_get_scale (window->priv->print_settings) * 0.01;
page_cache = ev_page_cache_get (window->priv->document);
ev_page_cache_get_size (page_cache,
(gdouble)width,
(gdouble)height,
ranges, n_ranges,
- copies, collate, reverse);
+ page_set,
+ copies, collate,
+ reverse);
g_signal_connect (window->priv->print_job, "finished",
G_CALLBACK (ev_window_print_job_cb),
GTK_PRINT_CAPABILITY_COLLATE |
GTK_PRINT_CAPABILITY_REVERSE |
GTK_PRINT_CAPABILITY_SCALE |
- GTK_PRINT_CAPABILITY_GENERATE_PS);
+ GTK_PRINT_CAPABILITY_GENERATE_PS |
+ GTK_PRINT_CAPABILITY_GENERATE_PDF);
gtk_print_unix_dialog_set_current_page (GTK_PRINT_UNIX_DIALOG (dialog),
current_page);
gnome_vfs_uri_list_free (uri_list);
- ev_application_open_uri_list (EV_APP, uris, 0);
+ ev_application_open_uri_list (EV_APP, uris,
+ gtk_widget_get_screen (widget),
+ 0);
g_slist_free (uris);
}
GtkAction *action;
action = gtk_action_group_get_action (action_group, "GoPreviousPage");
+ g_object_set (action, "is-important", TRUE, NULL);
/*translators: this is the label for toolbar button*/
g_object_set (action, "short_label", _("Previous"), NULL);
- g_object_set (action, "is-important", TRUE, NULL);
action = gtk_action_group_get_action (action_group, "GoNextPage");
g_object_set (action, "is-important", TRUE, NULL);
action = gtk_action_group_get_action (action_group, "ViewZoomIn");
/*translators: this is the label for toolbar button*/
g_object_set (action, "short_label", _("Zoom In"), NULL);
- action = gtk_action_group_get_action (action_group, "ViewZoomIn");
action = gtk_action_group_get_action (action_group, "ViewZoomOut");
/*translators: this is the label for toolbar button*/
g_object_set (action, "short_label", _("Zoom Out"), NULL);
- action = gtk_action_group_get_action (action_group, "ViewZoomIn");
action = gtk_action_group_get_action (action_group, "ViewBestFit");
/*translators: this is the label for toolbar button*/
g_object_set (action, "short_label", _("Best Fit"), NULL);
- action = gtk_action_group_get_action (action_group, "ViewZoomIn");
action = gtk_action_group_get_action (action_group, "ViewPageWidth");
/*translators: this is the label for toolbar button*/
g_object_set (action, "short_label", _("Fit Width"), NULL);
- action = gtk_action_group_get_action (action_group, "ViewZoomIn");
action = gtk_action_group_get_action (action_group, "LeaveFullscreen");
g_object_set (action, "is-important", TRUE, NULL);
g_free (dir);
ev_application_open_uri_at_dest (EV_APP, uri,
+ gtk_window_get_screen (GTK_WINDOW (window)),
ev_link_action_get_dest (action),
0,
GDK_CURRENT_TIME);