[Xfce4-commits] [apps/mousepad] 23/45: Keep the UI in sync with the recent-menu-items setting

noreply at xfce.org noreply at xfce.org
Fri Jul 11 13:03:28 CEST 2014


This is an automated email from the git hooks/post-receive script.

mbrush pushed a commit to branch master
in repository apps/mousepad.

commit e0ff5aa62ca909ac3a1ff4138c32c411e4c07311
Author: Matthew Brush <mbrush at codebrainz.ca>
Date:   Sun Jul 6 23:16:31 2014 -0700

    Keep the UI in sync with the recent-menu-items setting
---
 mousepad/mousepad-window.c |   16 ++++++++++++++++
 1 file changed, 16 insertions(+)

diff --git a/mousepad/mousepad-window.c b/mousepad/mousepad-window.c
index 2dc76d9..11d258b 100644
--- a/mousepad/mousepad-window.c
+++ b/mousepad/mousepad-window.c
@@ -580,6 +580,16 @@ mousepad_window_update_tabs (MousepadWindow   *window,
 
 
 
+/* Called when 'window-recent-menu-items' setting changes to update the UI. */
+static void
+mousepad_window_update_recent_menu (MousepadWindow   *window,
+                                    gchar            *key,
+                                    MousepadSettings *settings)
+{
+  mousepad_window_recent_menu (window);
+}
+
+
 static void
 mousepad_window_init (MousepadWindow *window)
 {
@@ -756,6 +766,12 @@ mousepad_window_init (MousepadWindow *window)
                             "changed::window-always-show-tabs",
                             G_CALLBACK (mousepad_window_update_tabs),
                             window);
+
+  /* update the recent items menu when 'window-recent-menu-items' setting changes */
+  g_signal_connect_swapped (MOUSEPAD_GSETTINGS,
+                            "changed::window-recent-menu-items",
+                            G_CALLBACK (mousepad_window_update_recent_menu),
+                            window);
 }
 
 

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Xfce4-commits mailing list