From 2df60469ba9b50c49e54e071512a1e01267442c1 Mon Sep 17 00:00:00 2001 From: Sven Neumann Date: Thu, 27 Mar 2008 06:58:29 +0000 Subject: [PATCH] disable automatic startup notification. (gui_restore_after_callback): 2008-03-27 Sven Neumann * app/gui/gui.c (gui_init): disable automatic startup notification. (gui_restore_after_callback): notify the display enviroment that the application has finished loading. * app/gui/splash.c: no need to deal with startup notification here any longer. svn path=/trunk/; revision=25254 --- ChangeLog | 9 +++++++++ app/gui/gui.c | 9 +++++++-- app/gui/splash.c | 16 ---------------- 3 files changed, 16 insertions(+), 18 deletions(-) diff --git a/ChangeLog b/ChangeLog index 2e11e9d5e9..e7772cd1c6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2008-03-27 Sven Neumann + + * app/gui/gui.c (gui_init): disable automatic startup notification. + (gui_restore_after_callback): notify the display enviroment that + the application has finished loading. + + * app/gui/splash.c: no need to deal with startup notification here + any longer. + 2008-03-26 Mukund Sivaraman * plug-ins/common/dicom.c: Forget about negative values in signed diff --git a/app/gui/gui.c b/app/gui/gui.c index 2e791ada7b..4e8230f3cd 100644 --- a/app/gui/gui.c +++ b/app/gui/gui.c @@ -214,6 +214,9 @@ gui_init (Gimp *gimp, the_gui_gimp = gimp; + /* disable automatic startup notification */ + gtk_window_set_auto_startup_notification (FALSE); + gimp_dnd_init (gimp); themes_init (gimp); @@ -350,9 +353,8 @@ gui_initialize_after_callback (Gimp *gimp, if (name) { - gchar *display; + gchar *display = gdk_get_display (); - display = gdk_get_display (); gimp_environ_table_add (gimp->plug_in_manager->environ_table, name, display, NULL); g_free (display); @@ -543,6 +545,9 @@ gui_restore_after_callback (Gimp *gimp, /* move keyboard focus to the display */ gtk_window_present (GTK_WINDOW (display->shell)); + + /* indicate that the application has finished loading */ + gdk_notify_startup_complete (); } static gboolean diff --git a/app/gui/splash.c b/app/gui/splash.c index 9b87a1236e..ed18893cc0 100644 --- a/app/gui/splash.c +++ b/app/gui/splash.c @@ -61,7 +61,6 @@ typedef struct static GimpSplash *splash = NULL; -static void splash_map (void); static void splash_position_layouts (GimpSplash *splash, const gchar *text1, const gchar *text2, @@ -124,12 +123,6 @@ splash_create (gboolean be_verbose) G_CALLBACK (exit), GINT_TO_POINTER (0)); - /* we don't want the splash screen to send the startup notification */ - gtk_window_set_auto_startup_notification (FALSE); - g_signal_connect (splash->window, "map", - G_CALLBACK (splash_map), - NULL); - screen = gtk_widget_get_screen (splash->window); splash->width = MIN (gdk_pixbuf_animation_get_width (pixbuf), @@ -289,15 +282,6 @@ splash_area_expose (GtkWidget *widget, return FALSE; } -static void -splash_map (void) -{ - /* Reenable startup notification after the splash has been shown - * so that the next window that is mapped sends the notification. - */ - gtk_window_set_auto_startup_notification (TRUE); -} - /* area returns the union of the previous and new ink rectangles */ static void splash_position_layouts (GimpSplash *splash,