[glade] Move GladeWidgetAdaptor code for GtkAboutDialog 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 GtkAboutDialog into it's own C file
- Date: Fri, 3 May 2013 17:07:02 +0000 (UTC)
commit 882533bee5b13d756be6e32538f79648ac84d992
Author: Tristan Van Berkom <tristan van berkom gmail com>
Date: Fri May 3 22:40:22 2013 +0900
Move GladeWidgetAdaptor code for GtkAboutDialog into it's own C file
plugins/gtk+/Makefile.am | 1 +
plugins/gtk+/glade-gtk-about-dialog.c | 67 +++++++++++++++++++++++++++++++++
plugins/gtk+/glade-gtk.c | 40 -------------------
po/POTFILES.in | 1 +
4 files changed, 69 insertions(+), 40 deletions(-)
---
diff --git a/plugins/gtk+/Makefile.am b/plugins/gtk+/Makefile.am
index 61acae5..ce52dcc 100644
--- a/plugins/gtk+/Makefile.am
+++ b/plugins/gtk+/Makefile.am
@@ -33,6 +33,7 @@ libgladegtk_la_SOURCES = \
glade-entry-editor.c \
glade-fixed.c \
glade-gtk.c \
+ glade-gtk-about-dialog.c \
glade-gtk-action-widgets.c \
glade-gtk-box.c \
glade-gtk-container.c \
diff --git a/plugins/gtk+/glade-gtk-about-dialog.c b/plugins/gtk+/glade-gtk-about-dialog.c
new file mode 100644
index 0000000..8daa0ae
--- /dev/null
+++ b/plugins/gtk+/glade-gtk-about-dialog.c
@@ -0,0 +1,67 @@
+/*
+ * glade-gtk-about-dialog.c - GladeWidgetAdaptor for GtkAboutDialog
+ *
+ * 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-gtk.h"
+
+void
+glade_gtk_about_dialog_read_widget (GladeWidgetAdaptor * adaptor,
+ GladeWidget * widget, GladeXmlNode * node)
+{
+ if (!(glade_xml_node_verify_silent (node, GLADE_XML_TAG_WIDGET) ||
+ glade_xml_node_verify_silent (node, GLADE_XML_TAG_TEMPLATE)))
+ return;
+
+ /* First chain up and read in all the normal properties.. */
+ GWA_GET_CLASS (GTK_TYPE_WIDGET)->read_widget (adaptor, widget, node);
+
+ /* Sync the logo icon mode */
+ if (glade_widget_property_original_default (widget, "logo") == FALSE)
+ glade_widget_property_set (widget, "glade-logo-as-file", TRUE);
+ else
+ glade_widget_property_set (widget, "glade-logo-as-file", FALSE);
+}
+
+void
+glade_gtk_about_dialog_set_property (GladeWidgetAdaptor * adaptor,
+ GObject * object,
+ const gchar * id, const GValue * value)
+{
+ if (!strcmp (id, "glade-logo-as-file"))
+ {
+ GladeWidget *gwidget = glade_widget_get_from_gobject (object);
+
+ glade_widget_property_set_sensitive (gwidget, "logo", FALSE, NOT_SELECTED_MSG);
+ glade_widget_property_set_sensitive (gwidget, "logo-icon-name", FALSE, NOT_SELECTED_MSG);
+
+ if (g_value_get_boolean (value))
+ glade_widget_property_set_sensitive (gwidget, "logo", TRUE, NULL);
+ else
+ glade_widget_property_set_sensitive (gwidget, "logo-icon-name", TRUE, NULL);
+ }
+ else
+ GWA_GET_CLASS (GTK_TYPE_DIALOG)->set_property (adaptor, object, id, value);
+}
diff --git a/plugins/gtk+/glade-gtk.c b/plugins/gtk+/glade-gtk.c
index 8048dc0..177fe58 100644
--- a/plugins/gtk+/glade-gtk.c
+++ b/plugins/gtk+/glade-gtk.c
@@ -86,46 +86,6 @@ glade_gtk_init (const gchar * name)
}
-/* ----------------------------- GtkAboutDialog ------------------------------ */
-void
-glade_gtk_about_dialog_read_widget (GladeWidgetAdaptor * adaptor,
- GladeWidget * widget, GladeXmlNode * node)
-{
- if (!(glade_xml_node_verify_silent (node, GLADE_XML_TAG_WIDGET) ||
- glade_xml_node_verify_silent (node, GLADE_XML_TAG_TEMPLATE)))
- return;
-
- /* First chain up and read in all the normal properties.. */
- GWA_GET_CLASS (GTK_TYPE_WIDGET)->read_widget (adaptor, widget, node);
-
- /* Sync the logo icon mode */
- if (glade_widget_property_original_default (widget, "logo") == FALSE)
- glade_widget_property_set (widget, "glade-logo-as-file", TRUE);
- else
- glade_widget_property_set (widget, "glade-logo-as-file", FALSE);
-}
-
-void
-glade_gtk_about_dialog_set_property (GladeWidgetAdaptor * adaptor,
- GObject * object,
- const gchar * id, const GValue * value)
-{
- if (!strcmp (id, "glade-logo-as-file"))
- {
- GladeWidget *gwidget = glade_widget_get_from_gobject (object);
-
- glade_widget_property_set_sensitive (gwidget, "logo", FALSE, NOT_SELECTED_MSG);
- glade_widget_property_set_sensitive (gwidget, "logo-icon-name", FALSE, NOT_SELECTED_MSG);
-
- if (g_value_get_boolean (value))
- glade_widget_property_set_sensitive (gwidget, "logo", TRUE, NULL);
- else
- glade_widget_property_set_sensitive (gwidget, "logo-icon-name", TRUE, NULL);
- }
- else
- GWA_GET_CLASS (GTK_TYPE_DIALOG)->set_property (adaptor, object, id, value);
-}
-
/* ----------------------------- GtkDialog(s) ------------------------------ */
static void
diff --git a/po/POTFILES.in b/po/POTFILES.in
index b0a66fc..ec8f512 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -62,6 +62,7 @@ plugins/gtk+/glade-column-types.c
plugins/gtk+/glade-entry-editor.c
plugins/gtk+/glade-fixed.c
plugins/gtk+/glade-gtk.c
+plugins/gtk+/glade-gtk-about-dialog.c
plugins/gtk+/glade-gtk-box.c
plugins/gtk+/glade-gtk-container.c
plugins/gtk+/glade-gtk-entry.c
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]