[glade] Move GladeWidgetAdaptor code for GtkRadioMenuItem 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 GtkRadioMenuItem into it's own C file
- Date: Fri, 3 May 2013 17:07:58 +0000 (UTC)
commit 916233cebf7a29d2529238fcbb2cafecbef6b99d
Author: Tristan Van Berkom <tristan van berkom gmail com>
Date: Fri May 3 23:33:48 2013 +0900
Move GladeWidgetAdaptor code for GtkRadioMenuItem into it's own C file
plugins/gtk+/Makefile.am | 1 +
plugins/gtk+/glade-gtk-radio-menu-item.c | 55 ++++++++++++++++++++++++++++++
plugins/gtk+/glade-gtk.c | 29 ----------------
po/POTFILES.in | 1 +
4 files changed, 57 insertions(+), 29 deletions(-)
---
diff --git a/plugins/gtk+/Makefile.am b/plugins/gtk+/Makefile.am
index e3ef0ee..76acff7 100644
--- a/plugins/gtk+/Makefile.am
+++ b/plugins/gtk+/Makefile.am
@@ -54,6 +54,7 @@ libgladegtk_la_SOURCES = \
glade-gtk-message-dialog.c \
glade-gtk-notebook.c \
glade-gtk-paned.c \
+ glade-gtk-radio-menu-item.c \
glade-gtk-recent-chooser-menu.c \
glade-gtk-switch.c \
glade-gtk-table.c \
diff --git a/plugins/gtk+/glade-gtk-radio-menu-item.c b/plugins/gtk+/glade-gtk-radio-menu-item.c
new file mode 100644
index 0000000..d50def0
--- /dev/null
+++ b/plugins/gtk+/glade-gtk-radio-menu-item.c
@@ -0,0 +1,55 @@
+/*
+ * glade-gtk-radio-menu-item.c - GladeWidgetAdaptor for GtkRadioMenuItem
+ *
+ * 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>
+
+static void
+glade_gtk_radio_menu_item_set_group (GObject * object, const GValue * value)
+{
+ GObject *val;
+
+ g_return_if_fail (GTK_IS_RADIO_MENU_ITEM (object));
+
+ if ((val = g_value_get_object (value)))
+ {
+ GSList *group = gtk_radio_menu_item_get_group (GTK_RADIO_MENU_ITEM (val));
+
+ if (!g_slist_find (group, GTK_RADIO_MENU_ITEM (object)))
+ gtk_radio_menu_item_set_group (GTK_RADIO_MENU_ITEM (object), group);
+ }
+}
+
+void
+glade_gtk_radio_menu_item_set_property (GladeWidgetAdaptor * adaptor,
+ GObject * object,
+ const gchar * id, const GValue * value)
+{
+
+ if (!strcmp (id, "group"))
+ glade_gtk_radio_menu_item_set_group (object, value);
+ else
+ GWA_GET_CLASS (GTK_TYPE_MENU_ITEM)->set_property (adaptor, object,
+ id, value);
+}
diff --git a/plugins/gtk+/glade-gtk.c b/plugins/gtk+/glade-gtk.c
index 8a76f90..d717b85 100644
--- a/plugins/gtk+/glade-gtk.c
+++ b/plugins/gtk+/glade-gtk.c
@@ -81,35 +81,6 @@ glade_gtk_init (const gchar * name)
{
}
-/* ----------------------------- GtkRadioMenuItem ------------------------------ */
-static void
-glade_gtk_radio_menu_item_set_group (GObject * object, const GValue * value)
-{
- GObject *val;
-
- g_return_if_fail (GTK_IS_RADIO_MENU_ITEM (object));
-
- if ((val = g_value_get_object (value)))
- {
- GSList *group = gtk_radio_menu_item_get_group (GTK_RADIO_MENU_ITEM (val));
-
- if (!g_slist_find (group, GTK_RADIO_MENU_ITEM (object)))
- gtk_radio_menu_item_set_group (GTK_RADIO_MENU_ITEM (object), group);
- }
-}
-
-void
-glade_gtk_radio_menu_item_set_property (GladeWidgetAdaptor * adaptor,
- GObject * object,
- const gchar * id, const GValue * value)
-{
-
- if (!strcmp (id, "group"))
- glade_gtk_radio_menu_item_set_group (object, value);
- else
- GWA_GET_CLASS (GTK_TYPE_MENU_ITEM)->set_property (adaptor, object,
- id, value);
-}
/* ----------------------------- GtkMenuBar ------------------------------ */
static GladeWidget *
diff --git a/po/POTFILES.in b/po/POTFILES.in
index 5f88dc9..9f4b9a6 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -81,6 +81,7 @@ plugins/gtk+/glade-gtk-menu-shell.c
plugins/gtk+/glade-gtk-message-dialog.c
plugins/gtk+/glade-gtk-notebook.c
plugins/gtk+/glade-gtk-paned.c
+plugins/gtk+/glade-gtk-radio-menu-item.c
plugins/gtk+/glade-gtk-recent-chooser-menu.c
plugins/gtk+/glade-gtk-switch.c
plugins/gtk+/glade-gtk-table.c
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]