aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--example/simple-client.c2
-rw-r--r--src/libappindicator/app-indicator.c18
2 files changed, 17 insertions, 3 deletions
diff --git a/example/simple-client.c b/example/simple-client.c
index ea4da9d..850ef18 100644
--- a/example/simple-client.c
+++ b/example/simple-client.c
@@ -58,7 +58,7 @@ main (int argc, char ** argv)
G_CALLBACK (item_clicked_cb), "1");
gtk_menu_shell_append (GTK_MENU_SHELL (menu), item);
- item = gtk_menu_item_new_with_label ("2");
+ item = gtk_check_menu_item_new_with_label ("2");
g_signal_connect (item, "activate",
G_CALLBACK (item_clicked_cb), "2");
gtk_menu_shell_append (GTK_MENU_SHELL (menu), item);
diff --git a/src/libappindicator/app-indicator.c b/src/libappindicator/app-indicator.c
index bb68cb2..8e03e07 100644
--- a/src/libappindicator/app-indicator.c
+++ b/src/libappindicator/app-indicator.c
@@ -686,15 +686,29 @@ container_iterate (GtkWidget *widget,
if (GTK_IS_SEPARATOR_MENU_ITEM (widget))
{
+ label = gtk_menu_item_get_label (GTK_MENU_ITEM (widget));
+
dbusmenu_menuitem_property_set (child,
"type",
DBUSMENU_CLIENT_TYPES_SEPARATOR);
}
else
{
- label = gtk_menu_item_get_label (GTK_MENU_ITEM (widget));
+ if (GTK_IS_CHECK_MENU_ITEM (widget))
+ {
+ label = gtk_menu_item_get_label (GTK_MENU_ITEM (widget));
+
+ dbusmenu_menuitem_property_set (child,
+ "type",
+ DBUSMENU_MENUITEM_TOGGLE_CHECK);
- if (GTK_IS_IMAGE_MENU_ITEM (widget))
+ dbusmenu_menuitem_property_set (child,
+ DBUSMENU_MENUITEM_PROP_LABEL,
+ label);
+
+ label_set = TRUE;
+ }
+ else if (GTK_IS_IMAGE_MENU_ITEM (widget))
{
GtkWidget *image = gtk_image_menu_item_get_image (GTK_IMAGE_MENU_ITEM (widget));