[gnome-applets] drivemount: don't use deprecated image menu items
- From: Alberts Muktupāvels <muktupavels src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-applets] drivemount: don't use deprecated image menu items
- Date: Wed, 25 Mar 2015 23:24:08 +0000 (UTC)
commit a53828e4a8863a1de62a9a1444c0cbca16deb6f6
Author: Alberts Muktupāvels <alberts muktupavels gmail com>
Date: Thu Mar 26 00:39:03 2015 +0200
drivemount: don't use deprecated image menu items
drivemount/drive-button.c | 23 +++++++++++------------
1 files changed, 11 insertions(+), 12 deletions(-)
---
diff --git a/drivemount/drive-button.c b/drivemount/drive-button.c
index 491eb6e..a7c0454 100644
--- a/drivemount/drive-button.c
+++ b/drivemount/drive-button.c
@@ -475,23 +475,22 @@ escape_underscores (const char *str)
return new_str;
}
static GtkWidget *
-create_menu_item (DriveButton *self, const gchar *icon_name,
- const gchar *label, GCallback callback,
- gboolean sensitive)
+create_menu_item (DriveButton *self,
+ const gchar *icon_name,
+ const gchar *label,
+ GCallback callback,
+ gboolean sensitive)
{
- GtkWidget *item, *image;
+ GtkWidget *item;
+
+ item = gtk_menu_item_new_with_mnemonic (label);
- item = gtk_image_menu_item_new_with_mnemonic (label);
- if (icon_name) {
- image = gtk_image_new_from_icon_name (icon_name, GTK_ICON_SIZE_MENU);
- gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (item), image);
- gtk_widget_show (image);
- }
if (callback)
- g_signal_connect_object (item, "activate", callback, self,
- G_CONNECT_SWAPPED);
+ g_signal_connect_object (item, "activate", callback, self, G_CONNECT_SWAPPED);
+
gtk_widget_set_sensitive (item, sensitive);
gtk_widget_show (item);
+
return item;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]