Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/shell/ev-application.c
diff options
context:
space:
mode:
authorRyan Lortie <desrt@desrt.ca>2005-08-26 02:34:30 (GMT)
committer Ryan Lortie <ryanl@src.gnome.org>2005-08-26 02:34:30 (GMT)
commit2eecd9167f17b9b0506675a9dc05dff487779afa (patch)
treedb76828ec740f747cdf6549029a54e3551fe5412 /shell/ev-application.c
parent37c2570fb37d29b576f70b210e3334cb3d7b04b1 (diff)
Add 'timestamp' argument to ev_application_open_window and
2005-08-25 Ryan Lortie <desrt@desrt.ca> * shell/ev-application-service.xml: Add 'timestamp' argument to ev_application_open_window and ev_application_open_uri methods. * shell/ev-application.h: Add 'timestamp' argument to ev_application_open_window, ev_application_open_uri, and ev_application_open_uri_list functions. * shell/ev-application.c (ev_application_open_window, ev_application_open_uri, ev_application_open_uri_list): Change functions that show/present windows to use a timestamp if one is passed in. * shell/ev-window.c (ev_window_cmd_file_open, ev_window_cmd_recent_file_activate, drag_data_received_cb): * shell/main.c (load_files): Modify calls to ev_application to include GDK_CURRENT_TIME as timestamp. * shell/main.c (load_files_remote): Obtain timestamp for client instance from GDK and pass to server instance so new windows are focused properly. Fix dbus_g_proxy_call() calls by including second G_TYPE_INVALID. Closes bug #314475.
Diffstat (limited to 'shell/ev-application.c')
-rw-r--r--shell/ev-application.c23
1 files changed, 18 insertions, 5 deletions
diff --git a/shell/ev-application.c b/shell/ev-application.c
index 6cbb149..ea66f65 100644
--- a/shell/ev-application.c
+++ b/shell/ev-application.c
@@ -113,9 +113,14 @@ ev_application_get_instance (void)
gboolean
ev_application_open_window (EvApplication *application,
+ guint32 timestamp,
GError **error)
{
- gtk_widget_show (ev_window_new ());
+ GtkWidget *new_window = ev_window_new ();
+
+ gtk_widget_show (new_window);
+ gtk_window_present_with_time (GTK_WINDOW (new_window),
+ timestamp);
return TRUE;
}
@@ -173,6 +178,7 @@ gboolean
ev_application_open_uri (EvApplication *application,
const char *uri,
const char *page_label,
+ guint timestamp,
GError **error)
{
EvWindow *new_window;
@@ -181,7 +187,8 @@ ev_application_open_uri (EvApplication *application,
new_window = ev_application_get_uri_window (application, uri);
if (new_window != NULL) {
- gtk_window_present (GTK_WINDOW (new_window));
+ gtk_window_present_with_time (GTK_WINDOW (new_window),
+ timestamp);
return TRUE;
}
@@ -190,11 +197,12 @@ ev_application_open_uri (EvApplication *application,
if (new_window == NULL) {
new_window = EV_WINDOW (ev_window_new ());
+ gtk_widget_show (GTK_WIDGET (new_window));
}
ev_window_open_uri (new_window, uri);
- gtk_window_present (GTK_WINDOW (new_window));
+ gtk_window_present_with_time (GTK_WINDOW (new_window), timestamp);
if (page_label != NULL) {
ev_window_open_page_label (new_window, page_label);
@@ -204,12 +212,17 @@ ev_application_open_uri (EvApplication *application,
}
void
-ev_application_open_uri_list (EvApplication *application, GSList *uri_list)
+ev_application_open_uri_list (EvApplication *application,
+ GSList *uri_list,
+ guint timestamp)
{
GSList *l;
for (l = uri_list; l != NULL; l = l->next) {
- ev_application_open_uri (application, (char *)l->data, NULL, NULL);
+ ev_application_open_uri (application, (char *)l->data,
+ NULL,
+ timestamp,
+ NULL);
}
}