[glade] Move GladeWidgetAdaptor code for GtkRecentChooserMenu 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 GtkRecentChooserMenu into it's own C file
- Date: Fri, 3 May 2013 17:07:38 +0000 (UTC)
commit bd00d95c74e4c94246d55d824838b2bd695fe3db
Author: Tristan Van Berkom <tristan van berkom gmail com>
Date: Fri May 3 23:12:44 2013 +0900
Move GladeWidgetAdaptor code for GtkRecentChooserMenu into it's own C file
plugins/gtk+/Makefile.am | 1 +
plugins/gtk+/glade-gtk-recent-chooser-menu.c | 50 ++++++++++++++++++++++++++
plugins/gtk+/glade-gtk.c | 23 ------------
po/POTFILES.in | 2 +
4 files changed, 53 insertions(+), 23 deletions(-)
---
diff --git a/plugins/gtk+/Makefile.am b/plugins/gtk+/Makefile.am
index ec074dd..f459b97 100644
--- a/plugins/gtk+/Makefile.am
+++ b/plugins/gtk+/Makefile.am
@@ -51,6 +51,7 @@ libgladegtk_la_SOURCES = \
glade-gtk-message-dialog.c \
glade-gtk-notebook.c \
glade-gtk-paned.c \
+ glade-gtk-recent-chooser-menu.c \
glade-gtk-switch.c \
glade-gtk-table.c \
glade-gtk-widget.c \
diff --git a/plugins/gtk+/glade-gtk-recent-chooser-menu.c b/plugins/gtk+/glade-gtk-recent-chooser-menu.c
new file mode 100644
index 0000000..4b8687e
--- /dev/null
+++ b/plugins/gtk+/glade-gtk-recent-chooser-menu.c
@@ -0,0 +1,50 @@
+/*
+ * glade-gtk-recent-chooser-menu.c - GladeWidgetAdaptor for GtkRecentChooserMenu
+ *
+ * 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>
+
+#include "glade-activatable-editor.h"
+
+GladeEditable *
+glade_gtk_recent_chooser_menu_create_editable (GladeWidgetAdaptor * adaptor,
+ GladeEditorPageType type)
+{
+ if (type == GLADE_PAGE_GENERAL)
+ return (GladeEditable *) glade_activatable_editor_new (adaptor, NULL);
+
+ return GWA_GET_CLASS (GTK_TYPE_MENU)->create_editable (adaptor, type);
+}
+
+void
+glade_gtk_recent_chooser_menu_set_property (GladeWidgetAdaptor * adaptor,
+ GObject * object,
+ const gchar * id, const GValue * value)
+{
+ GladeWidget *widget = glade_widget_get_from_gobject (object);
+ GladeProperty *property = glade_widget_get_property (widget, id);
+
+ if (GPC_VERSION_CHECK (glade_property_get_class (property), gtk_major_version, gtk_minor_version + 1))
+ GWA_GET_CLASS (GTK_TYPE_MENU)->set_property (adaptor, object, id, value);
+}
diff --git a/plugins/gtk+/glade-gtk.c b/plugins/gtk+/glade-gtk.c
index 3dea091..21ad9da 100644
--- a/plugins/gtk+/glade-gtk.c
+++ b/plugins/gtk+/glade-gtk.c
@@ -80,29 +80,6 @@ glade_gtk_init (const gchar * name)
{
}
-/* ----------------------------- GtkRecentChooserMenu ------------------------------ */
-GladeEditable *
-glade_gtk_recent_chooser_menu_create_editable (GladeWidgetAdaptor * adaptor,
- GladeEditorPageType type)
-{
- if (type == GLADE_PAGE_GENERAL)
- return (GladeEditable *) glade_activatable_editor_new (adaptor, NULL);
-
- return GWA_GET_CLASS (GTK_TYPE_MENU)->create_editable (adaptor, type);
-}
-
-void
-glade_gtk_recent_chooser_menu_set_property (GladeWidgetAdaptor * adaptor,
- GObject * object,
- const gchar * id, const GValue * value)
-{
- GladeWidget *widget = glade_widget_get_from_gobject (object);
- GladeProperty *property = glade_widget_get_property (widget, id);
-
- if (GPC_VERSION_CHECK (glade_property_get_class (property), gtk_major_version, gtk_minor_version + 1))
- GWA_GET_CLASS (GTK_TYPE_MENU)->set_property (adaptor, object, id, value);
-}
-
/* ----------------------------- GtkMenuShell ------------------------------ */
gboolean
glade_gtk_menu_shell_add_verify (GladeWidgetAdaptor *adaptor,
diff --git a/po/POTFILES.in b/po/POTFILES.in
index 1271d59..c34d093 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -78,6 +78,8 @@ 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
+plugins/gtk+/glade-gtk-recent-chooser-menu.c
+plugins/gtk+/glade-gtk-switch.c
plugins/gtk+/glade-gtk-table.c
plugins/gtk+/glade-gtk-widget.c
plugins/gtk+/glade-gtk-window.c
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]