summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPavel Šimerda <psimerda@redhat.com>2015-02-17 15:25:13 +0100
committerDan Williams <dcbw@redhat.com>2015-02-17 14:05:09 -0600
commit5455c67d58820b1050fff5dc31e5bbf89c92d769 (patch)
treec72d89f45c6538e8b9cc42cc3e0c723c4f98428e
parentb3fa934e4f55ae5511dd18de8af43de9d5e97191 (diff)
downloadnetwork-manager-applet-5455c67d58820b1050fff5dc31e5bbf89c92d769.tar.gz
applet: use GtkCheckMenuItem for the VPN menu
Without this patch the VPN items won't display correctly in appindicator mode.
-rw-r--r--src/applet.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/src/applet.c b/src/applet.c
index d4a1458a..2b42002c 100644
--- a/src/applet.c
+++ b/src/applet.c
@@ -1785,8 +1785,7 @@ nma_menu_add_vpn_submenu (GtkWidget *menu, NMApplet *applet)
name = get_connection_id (connection);
- item = GTK_MENU_ITEM (gtk_image_menu_item_new_with_label (name));
- gtk_image_menu_item_set_always_show_image(GTK_IMAGE_MENU_ITEM(item), TRUE);
+ item = GTK_MENU_ITEM (gtk_check_menu_item_new_with_label (name));
/* If no VPN connections are active, draw all menu items enabled. If
* >= 1 VPN connections are active, only the active VPN menu item is
@@ -1804,11 +1803,7 @@ nma_menu_add_vpn_submenu (GtkWidget *menu, NMApplet *applet)
else
gtk_widget_set_sensitive (GTK_WIDGET (item), FALSE);
- if (active) {
- GtkWidget *image = gtk_image_new_from_stock (GTK_STOCK_CONNECT, GTK_ICON_SIZE_MENU);
-
- gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (item), image);
- }
+ gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM (item), !!active);
g_object_set_data_full (G_OBJECT (item), "connection",
g_object_ref (connection),