aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--bindings/mono/Makefile.am3
-rw-r--r--bindings/mono/libappindicator-api.metadata15
-rw-r--r--src/app-indicator.c31
3 files changed, 48 insertions, 1 deletions
diff --git a/bindings/mono/Makefile.am b/bindings/mono/Makefile.am
index 98fe6f9..203dcae 100644
--- a/bindings/mono/Makefile.am
+++ b/bindings/mono/Makefile.am
@@ -77,6 +77,9 @@ $(API): $(MIDDLE_API) Makefile.am
-e "s|PROP_ICON_THEME_PATH_S|icon-theme-path|" \
-e "s|PROP_MENU_S|menu|" \
-e "s|PROP_CONNECTED_S|connected|" \
+ -e "s|PROP_LABEL_S|label|" \
+ -e "s|PROP_LABEL_GUIDE_S|label-guide|" \
+ -e "s|PROP_ORDERING_INDEX_S|ordering-index|" \
$< > $@
api_includes = $(GTK_SHARP_CFLAGS)
diff --git a/bindings/mono/libappindicator-api.metadata b/bindings/mono/libappindicator-api.metadata
index 718c500..06313ba 100644
--- a/bindings/mono/libappindicator-api.metadata
+++ b/bindings/mono/libappindicator-api.metadata
@@ -5,11 +5,13 @@
<attr path="/api/namespace/object[@cname='AppIndicator']/signal[@field_name='new_attention_icon']" name="cname">new-attention-icon</attr>
<attr path="/api/namespace/object[@cname='AppIndicator']/signal[@field_name='new_status']" name="name">NewStatus</attr>
<attr path="/api/namespace/object[@cname='AppIndicator']/signal[@field_name='new_status']" name="cname">new-status</attr>
+ <attr path="/api/namespace/object[@cname='AppIndicator']/signal[@field_name='new_label']" name="name">NewLabel</attr>
+ <attr path="/api/namespace/object[@cname='AppIndicator']/signal[@field_name='new_label']" name="cname">new-label</attr>
<attr path="/api/namespace/object[@cname='AppIndicator']/signal[@field_name='connection_changed']" name="name">ConnectionChanged</attr>
<attr path="/api/namespace/object[@cname='AppIndicator']/signal[@field_name='connection_changed']" name="cname">connection-changed</attr>
<attr path="/api/namespace/object[@cname='AppIndicator']/signal[@field_name='new_icon']" name="name">NewIcon</attr>
<attr path="/api/namespace/object[@cname='AppIndicator']/signal[@field_name='new_icon']" name="cname">new-icon</attr>
- <attr path="/api/namespace/object[@cname='AppIndicator']/signal[@field_name='new_icon_theme_path']" name="name">NewIconThemePath</attr>
+ <attr path="/api/namespace/object[@cname='AppIndicator']/signal[@field_name='new_icon_theme_path']" name="name">NewIconThemePath</attr>
<attr path="/api/namespace/object[@cname='AppIndicator']/signal[@field_name='new_icon_theme_path']" name="cname">new-icon-theme-path</attr>
<attr path="/api/namespace/object[@cname='AppIndicator']/property[@cname='PROP_ID_S']" name="name">ID</attr>
<attr path="/api/namespace/object[@cname='AppIndicator']/property[@cname='PROP_CATEGORY_S']" name="hidden">true</attr>
@@ -20,6 +22,9 @@
<attr path="/api/namespace/object[@cname='AppIndicator']/property[@cname='PROP_MENU_S']" name="name">Menu</attr>
<attr path="/api/namespace/object[@cname='AppIndicator']/property[@cname='PROP_MENU_S']" name="type">GtkMenu*</attr>
<attr path="/api/namespace/object[@cname='AppIndicator']/property[@cname='PROP_CONNECTED_S']" name="name">Connected</attr>
+ <attr path="/api/namespace/object[@cname='AppIndicator']/property[@cname='PROP_LABEL_S']" name="name">Label</attr>
+ <attr path="/api/namespace/object[@cname='AppIndicator']/property[@cname='PROP_LABEL_GUIDE_S']" name="name">LabelGuide</attr>
+ <attr path="/api/namespace/object[@cname='AppIndicator']/property[@cname='PROP_ORDERING_INDEX_S']" name="name">OrderingIndex</attr>
<attr path="/api/namespace/object[@cname='AppIndicator']/method[@name='SetMenu']" name="name">SetMenu</attr>
<attr path="/api/namespace/object[@cname='AppIndicator']/constructor[@cname='app_indicator_new']/*/*[@name='id']" name="property_name">id</attr>
@@ -30,16 +35,24 @@
<attr path="/api/namespace/object[@cname='AppIndicator']/constructor[@cname='app_indicator_new_with_path']/*/*[@name='category']" name="property_name">category</attr>
<attr path="/api/namespace/object[@cname='AppIndicator']/constructor[@cname='app_indicator_new_with_path']/*/*[@name='icon_theme_path']" name="property_name">icon-theme-path</attr>
+ <remove-node path="/api/namespace/object[@cname='AppIndicator']/signal[@field_name='x_ayatana_new_label']" />
+ <remove-node path="/api/namespace/object[@cname='AppIndicator']/property[@cname='PROP_X_LABEL_S']" />
+ <remove-node path="/api/namespace/object[@cname='AppIndicator']/property[@cname='PROP_X_LABEL_GUIDE_S']" />
+ <remove-node path="/api/namespace/object[@cname='AppIndicator']/property[@cname='PROP_X_ORDERING_INDEX_S']" />
+
<remove-node path="/api/namespace/object/method[@cname='app_indicator_get_id']" />
<remove-node path="/api/namespace/object/method[@cname='app_indicator_get_status']" />
<remove-node path="/api/namespace/object/method[@cname='app_indicator_get_icon']" />
<remove-node path="/api/namespace/object/method[@cname='app_indicator_get_icon_theme_path']" />
<remove-node path="/api/namespace/object/method[@cname='app_indicator_get_category']" />
<remove-node path="/api/namespace/object/method[@cname='app_indicator_get_attention_icon']" />
+ <remove-node path="/api/namespace/object/method[@cname='app_indicator_get_label']" />
+ <remove-node path="/api/namespace/object/method[@cname='app_indicator_get_label_guide']" />
<remove-node path="/api/namespace/object/method[@cname='app_indicator_set_id']" />
<remove-node path="/api/namespace/object/method[@cname='app_indicator_set_status']" />
<remove-node path="/api/namespace/object/method[@cname='app_indicator_set_icon']" />
<remove-node path="/api/namespace/object/method[@cname='app_indicator_set_icon_theme_path']" />
<remove-node path="/api/namespace/object/method[@cname='app_indicator_set_attention_icon']" />
+ <remove-node path="/api/namespace/object/method[@cname='app_indicator_set_label']" />
</metadata>
diff --git a/src/app-indicator.c b/src/app-indicator.c
index 6511589..3d15690 100644
--- a/src/app-indicator.c
+++ b/src/app-indicator.c
@@ -174,6 +174,7 @@ static gchar * append_panel_icon_suffix (const gchar * icon_name);
static void watcher_proxy_destroyed (GObject * object, gpointer data);
static void client_menu_changed (GtkWidget *widget, GtkWidget *child, AppIndicator *indicator);
static void submenu_changed (GtkWidget *widget, GtkWidget *child, gpointer data);
+static void submenu_added (GtkWidget *widget, GtkWidget *submenu, gpointer data);
static void theme_changed_cb (GtkIconTheme * theme, gpointer user_data);
@@ -1749,6 +1750,14 @@ container_iterate (GtkWidget *widget,
child,
0);
}
+ g_signal_connect (GTK_MENU_ITEM(widget),
+ "submenu-added",
+ G_CALLBACK (submenu_added),
+ child);
+ g_signal_connect (GTK_MENU_ITEM(widget),
+ "submenu-removed",
+ G_CALLBACK (submenu_changed),
+ child);
}
dbusmenu_menuitem_property_set_bool (child,
@@ -1813,6 +1822,28 @@ submenu_changed (GtkWidget *widget,
}
static void
+submenu_added (GtkWidget *widget,
+ GtkWidget *submenu,
+ gpointer data)
+{
+ DbusmenuMenuitem *root = (DbusmenuMenuitem *)data;
+
+ gtk_container_foreach (GTK_CONTAINER (submenu),
+ container_iterate,
+ root);
+ g_signal_connect_object (GTK_MENU(submenu),
+ "child-added",
+ G_CALLBACK (submenu_changed),
+ root,
+ 0);
+ g_signal_connect_object (GTK_MENU(submenu),
+ "child-removed",
+ G_CALLBACK (submenu_changed),
+ root,
+ 0);
+}
+
+static void
setup_dbusmenu (AppIndicator *self)
{
AppIndicatorPrivate *priv;