On reconfigure, make the apps menu's linkbase refresh.
authorDana Jansens <danakj@orodu.net>
Sun, 24 Jul 2011 22:37:50 +0000 (18:37 -0400)
committerDana Jansens <danakj@orodu.net>
Sun, 16 Oct 2011 22:54:05 +0000 (18:54 -0400)
obt/linkbase.c
obt/linkbase.h
openbox/apps_menu.c

index 4c97ed654660b9bb6dc8b9c443dffe4ec0fce8e8..26b935c579d9fcb259fddb456f0df49ea3cda70c 100644 (file)
@@ -406,6 +406,11 @@ void obt_linkbase_unref(ObtLinkBase *self)
     }
 }
 
+void obt_linkbase_refresh(ObtLinkBase *lb)
+{
+    obt_watch_refresh(lb->watch);
+}
+
 void obt_linkbase_set_update_func(ObtLinkBase *lb, ObtLinkBaseUpdateFunc func,
                                   gpointer data)
 {
index 9ed2c032dcdf5063bd34f5050ef81e0dec6f1041..f952d34d74188b015f508105d4d1a1cab43130d5 100644 (file)
@@ -45,6 +45,8 @@ ObtLinkBase* obt_linkbase_new(struct _ObtPaths *paths, const gchar *locale,
 void obt_linkbase_ref(ObtLinkBase *lb);
 void obt_linkbase_unref(ObtLinkBase *lb);
 
+void obt_linkbase_refresh(ObtLinkBase *lb);
+
 void obt_linkbase_set_update_func(ObtLinkBase *lb, ObtLinkBaseUpdateFunc func,
                                   gpointer data);
 
index 91e44f24cb23fd98a0e3a38f12717e5f89984f23..22717cb3bd55d8017b89af17e8de1674657f9697 100644 (file)
@@ -277,7 +277,12 @@ static int cat_friendly_cmp(const void *a, const void *b)
 
 void apps_menu_startup(gboolean reconfig)
 {
-    if (!reconfig) {
+    if (reconfig) {
+        /* Force a re-read of the applications available in case we are not
+           getting notifications about changes. */
+        obt_linkbase_refresh(linkbase);
+    }
+    else {
         ObtPaths *paths;
         guint i;