[gnome-panel] panel-menu-items: remove set_panel functions
- From: Alberts Muktupāvels <muktupavels src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-panel] panel-menu-items: remove set_panel functions
- Date: Wed, 24 May 2017 21:44:33 +0000 (UTC)
commit 9fe9b1361aad9c4740629dcba71e59d3023a1dd3
Author: Alberts Muktupāvels <alberts muktupavels gmail com>
Date: Thu May 25 00:33:14 2017 +0300
panel-menu-items: remove set_panel functions
gnome-panel/menu.c | 5 -----
gnome-panel/panel-menu-bar.c | 4 ----
gnome-panel/panel-menu-items.c | 24 ------------------------
gnome-panel/panel-menu-items.h | 6 ------
gnome-panel/panel-user-menu.c | 22 ----------------------
5 files changed, 0 insertions(+), 61 deletions(-)
---
diff --git a/gnome-panel/menu.c b/gnome-panel/menu.c
index f54f2e6..7b48310 100644
--- a/gnome-panel/menu.c
+++ b/gnome-panel/menu.c
@@ -1166,14 +1166,11 @@ static void
main_menu_append (GtkWidget *main_menu,
gpointer data)
{
- PanelWidget *panel;
GtkWidget *item;
gboolean add_separator;
GList *children;
GList *last;
- panel = PANEL_WIDGET (data);
-
add_separator = FALSE;
children = gtk_container_get_children (GTK_CONTAINER (main_menu));
last = g_list_last (children);
@@ -1186,12 +1183,10 @@ main_menu_append (GtkWidget *main_menu,
add_menu_separator (main_menu);
item = panel_place_menu_item_new (TRUE, FALSE);
- panel_place_menu_item_set_panel (item, panel);
gtk_menu_shell_append (GTK_MENU_SHELL (main_menu), item);
gtk_widget_show (item);
item = panel_desktop_menu_item_new (TRUE, FALSE, FALSE);
- panel_desktop_menu_item_set_panel (item, panel);
gtk_menu_shell_append (GTK_MENU_SHELL (main_menu), item);
gtk_widget_show (item);
diff --git a/gnome-panel/panel-menu-bar.c b/gnome-panel/panel-menu-bar.c
index eb8652e..d71ed2b 100644
--- a/gnome-panel/panel-menu-bar.c
+++ b/gnome-panel/panel-menu-bar.c
@@ -161,10 +161,6 @@ panel_menu_bar_parent_set (GtkWidget *widget,
g_assert (!parent || PANEL_IS_WIDGET (parent));
menubar->priv->panel = (PanelWidget *) parent;
-
- if (menubar->priv->places_item)
- panel_place_menu_item_set_panel (menubar->priv->places_item,
- menubar->priv->panel);
}
static void
diff --git a/gnome-panel/panel-menu-items.c b/gnome-panel/panel-menu-items.c
index cb09ae1..f23af70 100644
--- a/gnome-panel/panel-menu-items.c
+++ b/gnome-panel/panel-menu-items.c
@@ -69,7 +69,6 @@ G_DEFINE_TYPE (PanelDesktopMenuItem, panel_desktop_menu_item, PANEL_TYPE_IMAGE_M
struct _PanelPlaceMenuItemPrivate {
GtkWidget *menu;
- PanelWidget *panel;
GSettings *settings;
GtkRecentManager *recent_manager;
@@ -90,7 +89,6 @@ struct _PanelPlaceMenuItemPrivate {
struct _PanelDesktopMenuItemPrivate {
GtkWidget *menu;
- PanelWidget *panel;
GtkIconSize icon_size;
};
@@ -1525,28 +1523,6 @@ panel_desktop_menu_item_new (gboolean use_image,
return GTK_WIDGET (menuitem);
}
-void
-panel_place_menu_item_set_panel (GtkWidget *item,
- PanelWidget *panel)
-{
- PanelPlaceMenuItem *place_item;
-
- place_item = PANEL_PLACE_MENU_ITEM (item);
-
- place_item->priv->panel = panel;
-}
-
-void
-panel_desktop_menu_item_set_panel (GtkWidget *item,
- PanelWidget *panel)
-{
- PanelDesktopMenuItem *desktop_item;
-
- desktop_item = PANEL_DESKTOP_MENU_ITEM (item);
-
- desktop_item->priv->panel = panel;
-}
-
static void
panel_menu_items_lock_logout_separator_notified (PanelLockdown *lockdown,
gpointer user_data)
diff --git a/gnome-panel/panel-menu-items.h b/gnome-panel/panel-menu-items.h
index cb5d96b..ac23e2b 100644
--- a/gnome-panel/panel-menu-items.h
+++ b/gnome-panel/panel-menu-items.h
@@ -23,7 +23,6 @@
#define __PANEL_MENU_ITEMS_H__
#include "panel-image-menu-item.h"
-#include "panel-widget.h"
G_BEGIN_DECLS
@@ -80,11 +79,6 @@ GtkWidget *panel_desktop_menu_item_new (gboolean use_image,
gboolean in_menubar,
gboolean append_lock_logout);
-void panel_place_menu_item_set_panel (GtkWidget *item,
- PanelWidget *panel);
-void panel_desktop_menu_item_set_panel (GtkWidget *item,
- PanelWidget *panel);
-
void panel_menu_items_append_lock_logout (GtkWidget *menu);
void panel_menu_item_activate_desktop_file (GtkWidget *menuitem,
const char *path);
diff --git a/gnome-panel/panel-user-menu.c b/gnome-panel/panel-user-menu.c
index 7553ceb..f4c91bc 100644
--- a/gnome-panel/panel-user-menu.c
+++ b/gnome-panel/panel-user-menu.c
@@ -37,7 +37,6 @@ G_DEFINE_TYPE (PanelUserMenu, panel_user_menu, PANEL_TYPE_MENU_BAR_OBJECT)
struct _PanelUserMenuPrivate {
AppletInfo *info;
- PanelWidget *panel;
GtkWidget *desktop_item;
};
@@ -56,29 +55,8 @@ panel_user_menu_init (PanelUserMenu *usermenu)
}
static void
-panel_user_menu_parent_set (GtkWidget *widget,
- GtkWidget *previous_parent)
-{
- PanelUserMenu *usermenu = PANEL_USER_MENU (widget);
- GtkWidget *parent;
-
- parent = gtk_widget_get_parent (widget);
- g_assert (!parent || PANEL_IS_WIDGET (parent));
-
- usermenu->priv->panel = (PanelWidget *) parent;
-
- if (usermenu->priv->desktop_item)
- panel_desktop_menu_item_set_panel (usermenu->priv->desktop_item,
- usermenu->priv->panel);
-}
-
-static void
panel_user_menu_class_init (PanelUserMenuClass *klass)
{
- GtkWidgetClass *widget_class = (GtkWidgetClass *) klass;
-
- widget_class->parent_set = panel_user_menu_parent_set;
-
g_type_class_add_private (klass, sizeof (PanelUserMenuPrivate));
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]