[gnome-panel] remove panel_list global
- From: Alberts Muktupāvels <muktupavels src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-panel] remove panel_list global
- Date: Mon, 19 Dec 2016 00:37:00 +0000 (UTC)
commit 3d6011bca69e8fc0bd6e13e2b9267e6a6992a0fa
Author: Alberts Muktupāvels <alberts muktupavels gmail com>
Date: Sun Dec 18 23:35:03 2016 +0200
remove panel_list global
gnome-panel/main.c | 1 -
gnome-panel/panel-globals.h | 1 -
gnome-panel/panel.c | 12 +-----------
3 files changed, 1 insertions(+), 13 deletions(-)
---
diff --git a/gnome-panel/main.c b/gnome-panel/main.c
index 4409b17..beff203 100644
--- a/gnome-panel/main.c
+++ b/gnome-panel/main.c
@@ -29,7 +29,6 @@
/* globals */
GSList *panels = NULL;
-GSList *panel_list = NULL;
static gboolean replace = FALSE;
static gboolean version = FALSE;
diff --git a/gnome-panel/panel-globals.h b/gnome-panel/panel-globals.h
index 9823bd1..223d10d 100644
--- a/gnome-panel/panel-globals.h
+++ b/gnome-panel/panel-globals.h
@@ -28,7 +28,6 @@
G_BEGIN_DECLS
extern GSList *panels;
-extern GSList *panel_list;
G_END_DECLS
diff --git a/gnome-panel/panel.c b/gnome-panel/panel.c
index 075516c..615ddee 100644
--- a/gnome-panel/panel.c
+++ b/gnome-panel/panel.c
@@ -160,8 +160,6 @@ panel_destroy (PanelToplevel *toplevel,
pd->deactivate_idle = 0;
g_object_set_data (G_OBJECT (toplevel), "PanelData", NULL);
-
- panel_list = g_slist_remove (panel_list, pd);
g_free (pd);
}
@@ -226,13 +224,7 @@ make_popup_panel_menu (PanelWidget *panel_widget)
PanelData *pd;
GtkWidget *menu;
- if (!panel_widget) {
- PanelToplevel *toplevel;
-
- toplevel = PANEL_TOPLEVEL (((PanelData *) panel_list->data)->panel);
-
- panel_widget = panel_toplevel_get_panel_widget (toplevel);
- }
+ g_assert (panel_widget != NULL);
pd = g_object_get_data (G_OBJECT (panel_widget->toplevel), "PanelData");
menu = panel_menu_get (panel_widget, pd);
@@ -1211,8 +1203,6 @@ panel_setup (PanelToplevel *toplevel)
pd->insert_pack_type = PANEL_OBJECT_PACK_START;
pd->deactivate_idle = 0;
- panel_list = g_slist_append (panel_list, pd);
-
g_object_set_data (G_OBJECT (toplevel), "PanelData", pd);
panel_widget_setup (panel_widget);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]