[gnome-panel] add GpApplication
- From: Alberts Muktupāvels <muktupavels src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-panel] add GpApplication
- Date: Sat, 28 Dec 2019 20:12:29 +0000 (UTC)
commit 7d80dfa0bc89b872685338aac98726628054ec63
Author: Alberts Muktupāvels <alberts muktupavels gmail com>
Date: Sat Dec 28 14:34:20 2019 +0200
add GpApplication
gnome-panel/Makefile.am | 2 ++
gnome-panel/gp-application.c | 43 +++++++++++++++++++++++++++++++++++++++++++
gnome-panel/gp-application.h | 32 ++++++++++++++++++++++++++++++++
gnome-panel/main.c | 5 +++++
4 files changed, 82 insertions(+)
---
diff --git a/gnome-panel/Makefile.am b/gnome-panel/Makefile.am
index aaf807474..5d4374961 100644
--- a/gnome-panel/Makefile.am
+++ b/gnome-panel/Makefile.am
@@ -12,6 +12,8 @@ bin_PROGRAMS = \
panel_sources = \
gp-add-applet-window.c \
gp-add-applet-window.h \
+ gp-application.c \
+ gp-application.h \
gp-arrow-button.c \
gp-arrow-button.h \
gp-module-manager.c \
diff --git a/gnome-panel/gp-application.c b/gnome-panel/gp-application.c
new file mode 100644
index 000000000..5af2dfa7a
--- /dev/null
+++ b/gnome-panel/gp-application.c
@@ -0,0 +1,43 @@
+/*
+ * Copyright (C) 2019 Alberts Muktupāvels
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include "config.h"
+#include "gp-application.h"
+
+struct _GpApplication
+{
+ GObject parent;
+};
+
+G_DEFINE_TYPE (GpApplication, gp_application, G_TYPE_OBJECT)
+
+static void
+gp_application_class_init (GpApplicationClass *self_class)
+{
+}
+
+static void
+gp_application_init (GpApplication *self)
+{
+}
+
+GpApplication *
+gp_application_new (void)
+{
+ return g_object_new (GP_TYPE_APPLICATION,
+ NULL);
+}
diff --git a/gnome-panel/gp-application.h b/gnome-panel/gp-application.h
new file mode 100644
index 000000000..f931bf4ec
--- /dev/null
+++ b/gnome-panel/gp-application.h
@@ -0,0 +1,32 @@
+/*
+ * Copyright (C) 2019 Alberts Muktupāvels
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef GP_APPLICATION_H
+#define GP_APPLICATION_H
+
+#include <glib-object.h>
+
+G_BEGIN_DECLS
+
+#define GP_TYPE_APPLICATION (gp_application_get_type ())
+G_DECLARE_FINAL_TYPE (GpApplication, gp_application, GP, APPLICATION, GObject)
+
+GpApplication *gp_application_new (void);
+
+G_END_DECLS
+
+#endif
diff --git a/gnome-panel/main.c b/gnome-panel/main.c
index 29e0d7957..a77159087 100644
--- a/gnome-panel/main.c
+++ b/gnome-panel/main.c
@@ -18,6 +18,7 @@
#include <libpanel-util/panel-cleanup.h>
#include <libpanel-util/panel-glib.h>
+#include "gp-application.h"
#include "panel-toplevel.h"
#include "panel-multiscreen.h"
#include "panel-session.h"
@@ -187,6 +188,7 @@ main (int argc, char **argv)
GdkDisplay *display;
GError *error;
PanelSession *session;
+ GpApplication *application;
GSList *toplevels_to_destroy;
GSList *l;
@@ -260,8 +262,11 @@ main (int argc, char **argv)
theme_variant_changed_cb (g_settings, PANEL_GENERAL_THEME_VARIANT_KEY, NULL);
+ application = gp_application_new ();
+
gtk_main ();
+ g_object_unref (application);
g_object_unref (g_settings);
g_object_unref (session);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]