X-Git-Url: https://www.fi.muni.cz/~kas/git//home/kas/public_html/git/?a=blobdiff_plain;ds=sidebyside;f=shell%2Fev-window.c;h=528226b3ba1325903312e01846626f76d289c85f;hb=5f554d8e362a35e05840068e1b3ea935be5d3c47;hp=8356ead31c3ac10a535273346e22dc5aa5ebd3d3;hpb=14e56a441c3377613fe37bc2d16bf6592c1d2e52;p=evince.git diff --git a/shell/ev-window.c b/shell/ev-window.c index 8356ead3..528226b3 100644 --- a/shell/ev-window.c +++ b/shell/ev-window.c @@ -2075,7 +2075,7 @@ file_open_dialog_response_cb (GtkWidget *chooser, ev_application_open_uri_list (EV_APP, uris, gtk_window_get_screen (GTK_WINDOW (ev_window)), - GDK_CURRENT_TIME); + gtk_get_current_event_time ()); g_slist_foreach (uris, (GFunc)g_free, NULL); g_slist_free (uris); @@ -2177,7 +2177,7 @@ ev_window_cmd_recent_file_activate (GtkAction *action, ev_application_open_uri_at_dest (EV_APP, uri, gtk_window_get_screen (GTK_WINDOW (window)), - NULL, 0, NULL, GDK_CURRENT_TIME); + NULL, 0, NULL, gtk_get_current_event_time ()); } static void @@ -2187,7 +2187,7 @@ ev_window_open_recent_action_item_activated (EvOpenRecentAction *action, { ev_application_open_uri_at_dest (EV_APP, uri, gtk_window_get_screen (GTK_WINDOW (window)), - NULL, 0, NULL, GDK_CURRENT_TIME); + NULL, 0, NULL, gtk_get_current_event_time ()); } static void @@ -3946,7 +3946,7 @@ ev_window_cmd_help_contents (GtkAction *action, EvWindow *ev_window) gtk_show_uri (gtk_window_get_screen (GTK_WINDOW (ev_window)), "ghelp:evince", - GDK_CURRENT_TIME, + gtk_get_current_event_time (), &error); if (error) { ev_window_error_message (ev_window, error, @@ -5407,7 +5407,8 @@ launch_action (EvWindow *window, EvLinkAction *action) context = G_APP_LAUNCH_CONTEXT (gdk_app_launch_context_new ()); gdk_app_launch_context_set_screen (GDK_APP_LAUNCH_CONTEXT (context), gtk_window_get_screen (GTK_WINDOW (window))); - gdk_app_launch_context_set_timestamp (GDK_APP_LAUNCH_CONTEXT (context), GDK_CURRENT_TIME); + gdk_app_launch_context_set_timestamp (GDK_APP_LAUNCH_CONTEXT (context), + gtk_get_current_event_time ()); file_list.data = file; if (!g_app_info_launch (app_info, &file_list, context, &error)) { @@ -5419,6 +5420,7 @@ launch_action (EvWindow *window, EvLinkAction *action) g_object_unref (app_info); g_object_unref (file); + /* FIXMEchpe: unref launch context? */ /* According to the PDF spec filename can be an executable. I'm not sure allowing to launch executables is a good idea though. -- marco */ @@ -5436,7 +5438,7 @@ launch_external_uri (EvWindow *window, EvLinkAction *action) gdk_app_launch_context_set_screen (GDK_APP_LAUNCH_CONTEXT (context), gtk_window_get_screen (GTK_WINDOW (window))); gdk_app_launch_context_set_timestamp (GDK_APP_LAUNCH_CONTEXT (context), - GDK_CURRENT_TIME); + gtk_get_current_event_time ()); if (!g_strstr_len (uri, strlen (uri), "://") && !g_str_has_prefix (uri, "mailto:")) { @@ -5444,10 +5446,10 @@ launch_external_uri (EvWindow *window, EvLinkAction *action) /* Not a valid uri, assuming it's http */ http = g_strdup_printf ("http://%s", uri); - ret = g_app_info_launch_default_for_uri (http, NULL, &error); + ret = g_app_info_launch_default_for_uri (http, context, &error); g_free (http); } else { - ret = g_app_info_launch_default_for_uri (uri, NULL, &error); + ret = g_app_info_launch_default_for_uri (uri, context, &error); } if (ret == FALSE) { @@ -5455,6 +5457,8 @@ launch_external_uri (EvWindow *window, EvLinkAction *action) "%s", _("Unable to open external link")); g_error_free (error); } + + /* FIXMEchpe: unref launch context? */ } static void @@ -5474,7 +5478,7 @@ open_remote_link (EvWindow *window, EvLinkAction *action) ev_link_action_get_dest (action), 0, NULL, - GDK_CURRENT_TIME); + gtk_get_current_event_time ()); g_free (uri); } @@ -5754,7 +5758,7 @@ ev_attachment_popup_cmd_open_attachment (GtkAction *action, EvWindow *window) attachment = (EvAttachment *) l->data; - ev_attachment_open (attachment, screen, GDK_CURRENT_TIME, &error); + ev_attachment_open (attachment, screen, gtk_get_current_event_time (), &error); if (error) { ev_window_error_message (window, error,