[gtk+] application: sync clipboard and recent manager on shutdown



commit c76cccd437b12daa07c417d4587a5516b0d4aac3
Author: Cosimo Cecchi <cosimoc gnome org>
Date:   Wed Jan 25 18:30:48 2012 -0500

    application: sync clipboard and recent manager on shutdown
    
    This mimics the code for gtk_main(), since GApplication iterates the
    main context directly.

 gtk/gtkapplication.c |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)
---
diff --git a/gtk/gtkapplication.c b/gtk/gtkapplication.c
index e3ead26..ac54e1e 100644
--- a/gtk/gtkapplication.c
+++ b/gtk/gtkapplication.c
@@ -30,8 +30,10 @@
 #include <string.h>
 
 #include "gtkapplicationprivate.h"
+#include "gtkclipboard.h"
 #include "gtkmarshalers.h"
 #include "gtkmain.h"
+#include "gtkrecentmanager.h"
 #include "gtkaccelmapprivate.h"
 #include "gactionmuxer.h"
 #include "gtkintl.h"
@@ -464,6 +466,12 @@ gtk_application_shutdown (GApplication *application)
   gtk_application_shutdown_quartz (GTK_APPLICATION (application));
 #endif
 
+  /* Try storing all clipboard data we have */
+  _gtk_clipboard_store_all ();
+
+  /* Synchronize the recent manager singleton */
+  _gtk_recent_manager_sync ();
+
   G_APPLICATION_CLASS (gtk_application_parent_class)
     ->shutdown (application);
 }



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]