[gnome-panel] menu: remove always_show_image from create_applications_menu
- From: Alberts Muktupāvels <muktupavels src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-panel] menu: remove always_show_image from create_applications_menu
- Date: Wed, 24 May 2017 23:00:18 +0000 (UTC)
commit 4da1101cbb9910dd9a23a0d772cd90f98bd953ba
Author: Alberts Muktupāvels <alberts muktupavels gmail com>
Date: Thu May 25 01:58:22 2017 +0300
menu: remove always_show_image from create_applications_menu
gnome-panel/menu.c | 28 +++-------------------------
gnome-panel/menu.h | 3 +--
gnome-panel/panel-menu-bar.c | 2 +-
gnome-panel/panel-menu-button.c | 3 +--
4 files changed, 6 insertions(+), 30 deletions(-)
---
diff --git a/gnome-panel/menu.c b/gnome-panel/menu.c
index 8950f8f..6e990d1 100644
--- a/gnome-panel/menu.c
+++ b/gnome-panel/menu.c
@@ -811,15 +811,8 @@ create_submenu_entry (GtkWidget *menu,
GMenuTreeDirectory *directory)
{
GtkWidget *menuitem;
- gboolean force_categories_icon;
- force_categories_icon = g_object_get_data (G_OBJECT (menu),
- "panel-menu-force-icon-for-categories") != NULL;
-
- if (force_categories_icon)
- menuitem = panel_image_menu_item_new2 ();
- else
- menuitem = panel_image_menu_item_new ();
+ menuitem = panel_image_menu_item_new2 ();
panel_load_menu_image_deferred (menuitem,
panel_menu_icon_get_size (),
@@ -846,7 +839,6 @@ create_submenu (GtkWidget *menu,
{
GtkWidget *menuitem;
GtkWidget *submenu;
- gboolean force_categories_icon;
if (alias_directory)
menuitem = create_submenu_entry (menu, alias_directory);
@@ -856,13 +848,6 @@ create_submenu (GtkWidget *menu,
submenu = create_fake_menu (directory);
gtk_menu_item_set_submenu (GTK_MENU_ITEM (menuitem), submenu);
-
- /* Keep the infor that we force (or not) the icons to be visible */
- force_categories_icon = g_object_get_data (G_OBJECT (menu),
- "panel-menu-force-icon-for-categories") != NULL;
- g_object_set_data (G_OBJECT (submenu),
- "panel-menu-force-icon-for-categories",
- GINT_TO_POINTER (force_categories_icon));
}
static void
@@ -1023,8 +1008,7 @@ remove_gmenu_tree_monitor (GtkWidget *menu,
GtkWidget *
create_applications_menu (const char *menu_file,
- const char *menu_path,
- gboolean always_show_image)
+ const char *menu_path)
{
GMenuTree *tree;
GtkWidget *menu;
@@ -1032,12 +1016,6 @@ create_applications_menu (const char *menu_file,
GError *error = NULL;
menu = create_empty_menu ();
-
- if (always_show_image)
- g_object_set_data (G_OBJECT (menu),
- "panel-menu-force-icon-for-categories",
- GINT_TO_POINTER (TRUE));
-
tree = gmenu_tree_new (menu_file, GMENU_TREE_FLAGS_SORT_DISPLAY_NAME);
if (!gmenu_tree_load_sync (tree, &error)) {
@@ -1197,7 +1175,7 @@ create_main_menu (PanelWidget *panel)
gchar *applications_menu;
applications_menu = get_applications_menu ();
- main_menu = create_applications_menu (applications_menu, NULL, TRUE);
+ main_menu = create_applications_menu (applications_menu, NULL);
g_free (applications_menu);
g_object_set_data (G_OBJECT (main_menu),
diff --git a/gnome-panel/menu.h b/gnome-panel/menu.h
index 7cfe275..6b3f6aa 100644
--- a/gnome-panel/menu.h
+++ b/gnome-panel/menu.h
@@ -40,8 +40,7 @@ void setup_menu_item_with_icon (GtkWidget *item,
GtkWidget *create_empty_menu (void);
GtkWidget *create_applications_menu (const char *menu_file,
- const char *menu_path,
- gboolean always_show_image);
+ const char *menu_path);
GtkWidget *create_main_menu (PanelWidget *panel);
void setup_internal_applet_drag (GtkWidget *menuitem,
diff --git a/gnome-panel/panel-menu-bar.c b/gnome-panel/panel-menu-bar.c
index d71ed2b..d2c0408 100644
--- a/gnome-panel/panel-menu-bar.c
+++ b/gnome-panel/panel-menu-bar.c
@@ -120,7 +120,7 @@ panel_menu_bar_init (PanelMenuBar *menubar)
menubar->priv->info = NULL;
applications_menu = get_applications_menu ();
- menubar->priv->applications_menu = create_applications_menu (applications_menu, NULL, TRUE);
+ menubar->priv->applications_menu = create_applications_menu (applications_menu, NULL);
g_free (applications_menu);
menubar->priv->applications_item = panel_image_menu_item_new2 ();
diff --git a/gnome-panel/panel-menu-button.c b/gnome-panel/panel-menu-button.c
index dc370de..ec63bab 100644
--- a/gnome-panel/panel-menu-button.c
+++ b/gnome-panel/panel-menu-button.c
@@ -360,8 +360,7 @@ panel_menu_button_create_menu (PanelMenuButton *button)
filename = panel_menu_path_root_to_filename (button->priv->path_root);
button->priv->menu = create_applications_menu (filename,
- button->priv->menu_path,
- TRUE);
+ button->priv->menu_path);
} else
button->priv->menu = create_main_menu (panel_widget);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]