[totem] Bug 589808 – Set always-show-image on some menu items
- From: Philip Withnall <pwithnall src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [totem] Bug 589808 – Set always-show-image on some menu items
- Date: Sat, 8 Aug 2009 20:27:41 +0000 (UTC)
commit 2aff9b91410a9223822680cb577c2f2dc6f036c3
Author: Robin Stocker <robin nibor org>
Date: Sat Aug 8 21:27:08 2009 +0100
Bug 589808 â?? Set always-show-image on some menu items
src/totem-menu.c | 11 +++++++++++
1 files changed, 11 insertions(+), 0 deletions(-)
---
diff --git a/src/totem-menu.c b/src/totem-menu.c
index ff92161..42cf2d8 100644
--- a/src/totem-menu.c
+++ b/src/totem-menu.c
@@ -544,6 +544,7 @@ connect_proxy_cb (GtkActionGroup *action_group,
}
gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (proxy), image);
+ gtk_image_menu_item_set_always_show_image (GTK_IMAGE_MENU_ITEM (proxy), TRUE);
}
static void
@@ -778,6 +779,8 @@ add_drive_to_menu (GDrive *drive, guint position, Totem *totem)
const char *icon_name;
guint j;
char *device_path;
+ GtkWidget *menu_item;
+ char *menu_item_path;
disabled = FALSE;
@@ -847,6 +850,14 @@ add_drive_to_menu (GDrive *drive, guint position, Totem *totem)
"/tmw-menubar/movie/devices-placeholder", name, name,
GTK_UI_MANAGER_MENUITEM, FALSE);
+ /* TODO: This can be made cleaner once bug #589842 is fixed */
+ menu_item_path = g_strdup_printf ("/tmw-menubar/movie/devices-placeholder/%s", name);
+ menu_item = gtk_ui_manager_get_widget (totem->ui_manager, menu_item_path);
+ g_free (menu_item_path);
+
+ if (menu_item != NULL)
+ gtk_image_menu_item_set_always_show_image (GTK_IMAGE_MENU_ITEM (menu_item), TRUE);
+
g_free (name);
g_free (label);
g_object_unref (icon);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]