[glade] Move GladeWidgetAdaptor code for GtkMenu into it's own C file
- From: Tristan Van Berkom <tvb src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glade] Move GladeWidgetAdaptor code for GtkMenu into it's own C file
- Date: Fri, 3 May 2013 17:07:32 +0000 (UTC)
commit 65b70fbbd101a849d1a363801337a1e42c430d8c
Author: Tristan Van Berkom <tristan van berkom gmail com>
Date: Fri May 3 23:09:32 2013 +0900
Move GladeWidgetAdaptor code for GtkMenu into it's own C file
plugins/gtk+/Makefile.am | 1 +
plugins/gtk+/glade-gtk-menu.c | 45 +++++++++++++++++++++++++++++++++++++++++
plugins/gtk+/glade-gtk.c | 20 ------------------
po/POTFILES.in | 1 +
4 files changed, 47 insertions(+), 20 deletions(-)
---
diff --git a/plugins/gtk+/Makefile.am b/plugins/gtk+/Makefile.am
index 0d040fb..ec074dd 100644
--- a/plugins/gtk+/Makefile.am
+++ b/plugins/gtk+/Makefile.am
@@ -47,6 +47,7 @@ libgladegtk_la_SOURCES = \
glade-gtk-grid.c \
glade-gtk-image.c \
glade-gtk-info-bar.c \
+ glade-gtk-menu.c \
glade-gtk-message-dialog.c \
glade-gtk-notebook.c \
glade-gtk-paned.c \
diff --git a/plugins/gtk+/glade-gtk-menu.c b/plugins/gtk+/glade-gtk-menu.c
new file mode 100644
index 0000000..09a3914
--- /dev/null
+++ b/plugins/gtk+/glade-gtk-menu.c
@@ -0,0 +1,45 @@
+/*
+ * glade-gtk-menu.c - GladeWidgetAdaptor for GtkMenu
+ *
+ * Copyright (C) 2013 Tristan Van Berkom
+ *
+ * Authors:
+ * Tristan Van Berkom <tristan van berkom gmail com>
+ *
+ * This library is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This library 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
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+#include <config.h>
+#include <glib/gi18n-lib.h>
+#include <gladeui/glade.h>
+
+GObject *
+glade_gtk_menu_constructor (GType type,
+ guint n_construct_properties,
+ GObjectConstructParam * construct_properties)
+{
+ GladeWidgetAdaptor *adaptor;
+ GObject *ret_obj;
+
+ ret_obj = GWA_GET_OCLASS (GTK_TYPE_CONTAINER)->constructor
+ (type, n_construct_properties, construct_properties);
+
+ adaptor = GLADE_WIDGET_ADAPTOR (ret_obj);
+
+ glade_widget_adaptor_action_remove (adaptor, "add_parent");
+ glade_widget_adaptor_action_remove (adaptor, "remove_parent");
+
+ return ret_obj;
+}
diff --git a/plugins/gtk+/glade-gtk.c b/plugins/gtk+/glade-gtk.c
index 77b3542..3dea091 100644
--- a/plugins/gtk+/glade-gtk.c
+++ b/plugins/gtk+/glade-gtk.c
@@ -80,26 +80,6 @@ glade_gtk_init (const gchar * name)
{
}
-/* ----------------------------- GtkMenu ------------------------------ */
-GObject *
-glade_gtk_menu_constructor (GType type,
- guint n_construct_properties,
- GObjectConstructParam * construct_properties)
-{
- GladeWidgetAdaptor *adaptor;
- GObject *ret_obj;
-
- ret_obj = GWA_GET_OCLASS (GTK_TYPE_CONTAINER)->constructor
- (type, n_construct_properties, construct_properties);
-
- adaptor = GLADE_WIDGET_ADAPTOR (ret_obj);
-
- glade_widget_adaptor_action_remove (adaptor, "add_parent");
- glade_widget_adaptor_action_remove (adaptor, "remove_parent");
-
- return ret_obj;
-}
-
/* ----------------------------- GtkRecentChooserMenu ------------------------------ */
GladeEditable *
glade_gtk_recent_chooser_menu_create_editable (GladeWidgetAdaptor * adaptor,
diff --git a/po/POTFILES.in b/po/POTFILES.in
index e487425..1271d59 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -74,6 +74,7 @@ plugins/gtk+/glade-gtk-fixed-layout.c
plugins/gtk+/glade-gtk-frame.c
plugins/gtk+/glade-gtk-grid.c
plugins/gtk+/glade-gtk-image.c
+plugins/gtk+/glade-gtk-menu.c
plugins/gtk+/glade-gtk-message-dialog.c
plugins/gtk+/glade-gtk-notebook.c
plugins/gtk+/glade-gtk-paned.c
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]