[gnome-panel] remove panel-globals.h
- From: Alberts Muktupāvels <muktupavels src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-panel] remove panel-globals.h
- Date: Mon, 19 Dec 2016 00:37:41 +0000 (UTC)
commit 8c17c0c237274343747cfb5caf75391bc569aa85
Author: Alberts Muktupāvels <alberts muktupavels gmail com>
Date: Mon Dec 19 02:26:40 2016 +0200
remove panel-globals.h
gnome-panel/Makefile.am | 1 -
gnome-panel/main.c | 3 ---
gnome-panel/menu.c | 1 -
gnome-panel/panel-action-protocol.c | 3 ++-
gnome-panel/panel-globals.h | 34 ----------------------------------
gnome-panel/panel-widget.c | 8 +++++++-
gnome-panel/panel-widget.h | 2 ++
gnome-panel/panel.c | 1 -
8 files changed, 11 insertions(+), 42 deletions(-)
---
diff --git a/gnome-panel/Makefile.am b/gnome-panel/Makefile.am
index 7cee2b8..75a38e6 100644
--- a/gnome-panel/Makefile.am
+++ b/gnome-panel/Makefile.am
@@ -57,7 +57,6 @@ panel_sources = \
panel_headers = \
panel-types.h \
panel-widget.h \
- panel-globals.h \
button-widget.h \
panel-session.h \
panel.h \
diff --git a/gnome-panel/main.c b/gnome-panel/main.c
index c617749..aee2378 100644
--- a/gnome-panel/main.c
+++ b/gnome-panel/main.c
@@ -26,9 +26,6 @@
#include "panel-layout.h"
#include "panel-schemas.h"
-/* globals */
-GSList *panels = NULL;
-
static gboolean replace = FALSE;
static gboolean version = FALSE;
diff --git a/gnome-panel/menu.c b/gnome-panel/menu.c
index e3a6194..f54f2e6 100644
--- a/gnome-panel/menu.c
+++ b/gnome-panel/menu.c
@@ -39,7 +39,6 @@
#include "panel-action-button.h"
#include "panel-menu-button.h"
#include "panel-menu-items.h"
-#include "panel-globals.h"
#include "panel-run-dialog.h"
#include "panel-lockdown.h"
#include "panel-icon-names.h"
diff --git a/gnome-panel/panel-action-protocol.c b/gnome-panel/panel-action-protocol.c
index 70fb58b..e9b052b 100644
--- a/gnome-panel/panel-action-protocol.c
+++ b/gnome-panel/panel-action-protocol.c
@@ -30,7 +30,6 @@
#include "menu.h"
#include "applet.h"
-#include "panel-globals.h"
#include "panel-toplevel.h"
#include "panel-util.h"
#include "panel-force-quit.h"
@@ -47,6 +46,7 @@ static void
panel_action_protocol_main_menu (GdkScreen *screen,
guint32 activate_time)
{
+ GSList *panels;
PanelWidget *panel_widget;
GtkWidget *menu;
AppletInfo *info;
@@ -65,6 +65,7 @@ panel_action_protocol_main_menu (GdkScreen *screen,
return;
}
+ panels = panel_widget_get_panels ();
panel_widget = panels->data;
menu = create_main_menu (panel_widget);
diff --git a/gnome-panel/panel-widget.c b/gnome-panel/panel-widget.c
index 29bf7e6..5451881 100644
--- a/gnome-panel/panel-widget.c
+++ b/gnome-panel/panel-widget.c
@@ -23,7 +23,6 @@
#include "panel-util.h"
#include "panel-typebuiltins.h"
#include "panel-applet-frame.h"
-#include "panel-globals.h"
#include "panel-lockdown.h"
typedef enum {
@@ -47,6 +46,8 @@ enum {
static guint panel_widget_signals [LAST_SIGNAL] = {0};
+static GSList *panels = NULL;
+
/*define for some debug output*/
#undef PANEL_WIDGET_DEBUG
@@ -2658,3 +2659,8 @@ panel_widget_register_open_dialog (PanelWidget *panel,
panel,
G_CONNECT_SWAPPED);
}
+
+GSList *panel_widget_get_panels (void)
+{
+ return panels;
+}
diff --git a/gnome-panel/panel-widget.h b/gnome-panel/panel-widget.h
index 762a6de..2ac978a 100644
--- a/gnome-panel/panel-widget.h
+++ b/gnome-panel/panel-widget.h
@@ -202,6 +202,8 @@ void panel_widget_set_applet_size_hints (PanelWidget *panel,
void panel_widget_register_open_dialog (PanelWidget *panel,
GtkWidget *dialog);
+GSList *panel_widget_get_panels (void);
+
G_END_DECLS
#endif /* PANEL_WIDGET_H */
diff --git a/gnome-panel/panel.c b/gnome-panel/panel.c
index 342f11b..b8e7e4c 100644
--- a/gnome-panel/panel.c
+++ b/gnome-panel/panel.c
@@ -36,7 +36,6 @@
#include "panel-multiscreen.h"
#include "panel-toplevel.h"
#include "panel-menu-button.h"
-#include "panel-globals.h"
#include "panel-lockdown.h"
#include "panel-icon-names.h"
#include "panel-layout.h"
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]