[glade] Added GladeRecentChooserDialogEditor
- From: Tristan Van Berkom <tvb src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glade] Added GladeRecentChooserDialogEditor
- Date: Sun, 5 May 2013 12:36:19 +0000 (UTC)
commit cc607ee9142fd926da7ffe4dbee4fc17be9f945d
Author: Tristan Van Berkom <tristan van berkom gmail com>
Date: Sun May 5 18:45:45 2013 +0900
Added GladeRecentChooserDialogEditor
A GladeWindowEditor embedding a GladeRecentChooserEditor
plugins/gtk+/Makefile.am | 3 +
plugins/gtk+/glade-gtk-resources.gresource.xml | 1 +
plugins/gtk+/glade-gtk-window.c | 3 +
plugins/gtk+/glade-recent-chooser-dialog-editor.c | 48 ++++++++++++++++
plugins/gtk+/glade-recent-chooser-dialog-editor.h | 57 ++++++++++++++++++++
plugins/gtk+/glade-recent-chooser-dialog-editor.ui | 32 +++++++++++
plugins/gtk+/gtk+.xml.in | 17 ++++++-
plugins/gtk-private/glade-gtk-private.xml | 3 +
po/POTFILES.in | 2 +
9 files changed, 165 insertions(+), 1 deletions(-)
---
diff --git a/plugins/gtk+/Makefile.am b/plugins/gtk+/Makefile.am
index 98fb95c..f292611 100644
--- a/plugins/gtk+/Makefile.am
+++ b/plugins/gtk+/Makefile.am
@@ -102,6 +102,7 @@ libgladegtk_la_SOURCES = \
glade-label-editor.c \
glade-message-dialog-editor.c \
glade-model-data.c \
+ glade-recent-chooser-dialog-editor.c \
glade-recent-chooser-editor.c \
glade-store-editor.c \
glade-string-list.c \
@@ -150,6 +151,7 @@ noinst_HEADERS = \
glade-label-editor.h \
glade-message-dialog-editor.h \
glade-model-data.h \
+ glade-recent-chooser-dialog-editor.h \
glade-recent-chooser-editor.h \
glade-store-editor.h \
glade-string-list.h \
@@ -196,6 +198,7 @@ UI_FILES = \
glade-image-editor.ui \
glade-label-editor.ui \
glade-message-dialog-editor.ui \
+ glade-recent-chooser-dialog-editor.ui \
glade-recent-chooser-editor.ui \
glade-tool-button-editor.ui \
glade-widget-editor.ui \
diff --git a/plugins/gtk+/glade-gtk-resources.gresource.xml b/plugins/gtk+/glade-gtk-resources.gresource.xml
index b4860ac..722ddbb 100644
--- a/plugins/gtk+/glade-gtk-resources.gresource.xml
+++ b/plugins/gtk+/glade-gtk-resources.gresource.xml
@@ -16,6 +16,7 @@
<file compressed="true" preprocess="xml-stripblanks">glade-image-editor.ui</file>
<file compressed="true" preprocess="xml-stripblanks">glade-label-editor.ui</file>
<file compressed="true" preprocess="xml-stripblanks">glade-message-dialog-editor.ui</file>
+ <file compressed="true" preprocess="xml-stripblanks">glade-recent-chooser-dialog-editor.ui</file>
<file compressed="true" preprocess="xml-stripblanks">glade-recent-chooser-editor.ui</file>
<file compressed="true" preprocess="xml-stripblanks">glade-tool-button-editor.ui</file>
<file compressed="true" preprocess="xml-stripblanks">glade-widget-editor.ui</file>
diff --git a/plugins/gtk+/glade-gtk-window.c b/plugins/gtk+/glade-gtk-window.c
index f27955b..8b3767e 100644
--- a/plugins/gtk+/glade-gtk-window.c
+++ b/plugins/gtk+/glade-gtk-window.c
@@ -30,6 +30,7 @@
#include "glade-file-chooser-dialog-editor.h"
#include "glade-font-chooser-dialog-editor.h"
#include "glade-message-dialog-editor.h"
+#include "glade-recent-chooser-dialog-editor.h"
#include "glade-gtk.h"
#define GLADE_TAG_ACCEL_GROUPS "accel-groups"
@@ -174,6 +175,8 @@ glade_gtk_window_create_editable (GladeWidgetAdaptor * adaptor,
editable = (GladeEditable *) glade_file_chooser_dialog_editor_new ();
else if (g_type_is_a (window_type, GTK_TYPE_FONT_CHOOSER_DIALOG))
editable = (GladeEditable *) glade_font_chooser_dialog_editor_new ();
+ else if (g_type_is_a (window_type, GTK_TYPE_RECENT_CHOOSER_DIALOG))
+ editable = (GladeEditable *) glade_recent_chooser_dialog_editor_new ();
else if (g_type_is_a (window_type, GTK_TYPE_MESSAGE_DIALOG))
editable = (GladeEditable *) glade_message_dialog_editor_new ();
else
diff --git a/plugins/gtk+/glade-recent-chooser-dialog-editor.c
b/plugins/gtk+/glade-recent-chooser-dialog-editor.c
new file mode 100644
index 0000000..6e9d1cc
--- /dev/null
+++ b/plugins/gtk+/glade-recent-chooser-dialog-editor.c
@@ -0,0 +1,48 @@
+/*
+ * Copyright (C) 2013 Tristan Van Berkom.
+ *
+ * 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.
+ *
+ * Authors:
+ * Tristan Van Berkom <tvb gnome org>
+ */
+
+#include <config.h>
+#include <gladeui/glade.h>
+#include <glib/gi18n-lib.h>
+
+#include "glade-recent-chooser-dialog-editor.h"
+
+G_DEFINE_TYPE (GladeRecentChooserDialogEditor, glade_recent_chooser_dialog_editor, GLADE_TYPE_WINDOW_EDITOR)
+
+static void
+glade_recent_chooser_dialog_editor_class_init (GladeRecentChooserDialogEditorClass * klass)
+{
+ GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (klass);
+
+ gtk_widget_class_set_template_from_resource (widget_class,
"/org/gnome/gladegtk/glade-recent-chooser-dialog-editor.ui");
+}
+
+static void
+glade_recent_chooser_dialog_editor_init (GladeRecentChooserDialogEditor * self)
+{
+ gtk_widget_init_template (GTK_WIDGET (self));
+}
+
+GtkWidget *
+glade_recent_chooser_dialog_editor_new (void)
+{
+ return g_object_new (GLADE_TYPE_RECENT_CHOOSER_DIALOG_EDITOR, NULL);
+}
diff --git a/plugins/gtk+/glade-recent-chooser-dialog-editor.h
b/plugins/gtk+/glade-recent-chooser-dialog-editor.h
new file mode 100644
index 0000000..4f97f06
--- /dev/null
+++ b/plugins/gtk+/glade-recent-chooser-dialog-editor.h
@@ -0,0 +1,57 @@
+/*
+ * Copyright (C) 2013 Tristan Van Berkom.
+ *
+ * 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.
+ *
+ * Authors:
+ * Tristan Van Berkom <tvb gnome org>
+ */
+#ifndef _GLADE_RECENT_CHOOSER_DIALOG_EDITOR_H_
+#define _GLADE_RECENT_CHOOSER_DIALOG_EDITOR_H_
+
+#include <gtk/gtk.h>
+#include "glade-window-editor.h"
+
+G_BEGIN_DECLS
+
+#define GLADE_TYPE_RECENT_CHOOSER_DIALOG_EDITOR
(glade_recent_chooser_dialog_editor_get_type ())
+#define GLADE_RECENT_CHOOSER_DIALOG_EDITOR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj),
GLADE_TYPE_RECENT_CHOOSER_DIALOG_EDITOR, GladeRecentChooserDialogEditor))
+#define GLADE_RECENT_CHOOSER_DIALOG_EDITOR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass),
GLADE_TYPE_RECENT_CHOOSER_DIALOG_EDITOR, GladeRecentChooserDialogEditorClass))
+#define GLADE_IS_RECENT_CHOOSER_DIALOG_EDITOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj),
GLADE_TYPE_RECENT_CHOOSER_DIALOG_EDITOR))
+#define GLADE_IS_RECENT_CHOOSER_DIALOG_EDITOR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass),
GLADE_TYPE_RECENT_CHOOSER_DIALOG_EDITOR))
+#define GLADE_RECENT_CHOOSER_DIALOG_EDITOR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj),
GLADE_TYPE_RECENT_CHOOSER_DIALOG_EDITOR, GladeRecentChooserDialogEditorClass))
+
+typedef struct _GladeRecentChooserDialogEditor GladeRecentChooserDialogEditor;
+typedef struct _GladeRecentChooserDialogEditorClass GladeRecentChooserDialogEditorClass;
+typedef struct _GladeRecentChooserDialogEditorPrivate GladeRecentChooserDialogEditorPrivate;
+
+struct _GladeRecentChooserDialogEditor
+{
+ GladeWindowEditor parent;
+
+ GladeRecentChooserDialogEditorPrivate *priv;
+};
+
+struct _GladeRecentChooserDialogEditorClass
+{
+ GladeWindowEditorClass parent;
+};
+
+GType glade_recent_chooser_dialog_editor_get_type (void) G_GNUC_CONST;
+GtkWidget *glade_recent_chooser_dialog_editor_new (void);
+
+G_END_DECLS
+
+#endif /* _GLADE_RECENT_CHOOSER_DIALOG_EDITOR_H_ */
diff --git a/plugins/gtk+/glade-recent-chooser-dialog-editor.ui
b/plugins/gtk+/glade-recent-chooser-dialog-editor.ui
new file mode 100644
index 0000000..ce993e0
--- /dev/null
+++ b/plugins/gtk+/glade-recent-chooser-dialog-editor.ui
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<interface domain="glade">
+ <!-- interface-requires glade-gtk-plugin 0.0 -->
+ <!-- interface-requires gtk+ 3.10 -->
+ <template class="GladeRecentChooserDialogEditor" parent="GladeWindowEditor">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="orientation">vertical</property>
+ <child internal-child="extension_port">
+ <object class="GtkBox" id="extension_port">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="orientation">vertical</property>
+ <child>
+ <object class="GladeRecentChooserEditor" id="recentchoosereditor">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="orientation">vertical</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ </object>
+ </child>
+ <child-editors>
+ <editor id="recentchoosereditor"/>
+ </child-editors>
+ </template>
+</interface>
diff --git a/plugins/gtk+/gtk+.xml.in b/plugins/gtk+/gtk+.xml.in
index 6d0fd0e..1ee9a4b 100644
--- a/plugins/gtk+/gtk+.xml.in
+++ b/plugins/gtk+/gtk+.xml.in
@@ -2406,7 +2406,22 @@ embedded in another object</_tooltip>
</properties>
</glade-widget-class>
- <glade-widget-class name="GtkRecentChooserDialog" generic-name="recentchooserdialog" _title="Recent
Chooser Dialog"/>
+ <glade-widget-class name="GtkRecentChooserDialog" generic-name="recentchooserdialog" _title="Recent
Chooser Dialog">
+ <!-- Claim the GladeRecentChooserEditor properties -->
+ <properties>
+ <property id="recent-manager" custom-layout="True"/>
+ <property id="filter" custom-layout="True"/>
+ <property id="limit" custom-layout="True"/>
+ <property id="sort-type" custom-layout="True"/>
+ <property id="show-private" custom-layout="True"/>
+ <property id="show-tips" custom-layout="True"/>
+ <property id="show-icons" custom-layout="True"/>
+ <property id="show-not-found" custom-layout="True"/>
+ <property id="select-multiple" custom-layout="True"/>
+ <property id="local-only" custom-layout="True"/>
+ </properties>
+
+ </glade-widget-class>
<glade-widget-class name="GtkSizeGroup" generic-name="sizegroup" _title="Size Group" toplevel="True">
<depends-function>glade_gtk_size_group_depends</depends-function>
diff --git a/plugins/gtk-private/glade-gtk-private.xml b/plugins/gtk-private/glade-gtk-private.xml
index 11477e7..2ec6daf 100644
--- a/plugins/gtk-private/glade-gtk-private.xml
+++ b/plugins/gtk-private/glade-gtk-private.xml
@@ -11,6 +11,8 @@
icon-name="widget-gtk-filechooserwidget"/>
<glade-widget-class name="GladeFontChooserEditor" generic-name="fontchoosereditor" title="Font Chooser
Editor"
icon-name="widget-gtk-fontselection"/>
+ <glade-widget-class name="GladeRecentChooserEditor" generic-name="recentchoosereditor" title="Recent
Chooser Editor"
+ icon-name="widget-gtk-recentchooser"/>
<glade-widget-class name="GladeWindowEditor" generic-name="windoweditor" title="Window Editor"
icon-name="widget-gtk-window">
<post-create-function>glade_window_editor_post_create</post-create-function>
@@ -31,6 +33,7 @@
<glade-widget-class-ref name="GladeButtonEditor"/>
<glade-widget-class-ref name="GladeFileChooserEditor"/>
<glade-widget-class-ref name="GladeFontChooserEditor"/>
+ <glade-widget-class-ref name="GladeRecentChooserEditor"/>
<glade-widget-class-ref name="GladeWindowEditor"/>
</glade-widget-group>
</glade-catalog>
diff --git a/po/POTFILES.in b/po/POTFILES.in
index 2fc118b..8d27c93 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -131,6 +131,7 @@ plugins/gtk+/glade-image-item-editor.c
plugins/gtk+/glade-label-editor.c
plugins/gtk+/glade-message-dialog-editor.c
plugins/gtk+/glade-model-data.c
+plugins/gtk+/glade-recent-chooser-dialog-editor.c
plugins/gtk+/glade-recent-chooser-editor.c
plugins/gtk+/glade-store-editor.c
plugins/gtk+/glade-string-list.c
@@ -155,6 +156,7 @@ plugins/gtk+/gtk+.xml.in
[type: gettext/glade]plugins/gtk+/glade-image-editor.ui
[type: gettext/glade]plugins/gtk+/glade-label-editor.ui
[type: gettext/glade]plugins/gtk+/glade-message-dialog-editor.ui
+[type: gettext/glade]plugins/gtk+/glade-recent-chooser-dialog-editor.ui
[type: gettext/glade]plugins/gtk+/glade-recent-chooser-editor.ui
[type: gettext/glade]plugins/gtk+/glade-tool-button-editor.ui
[type: gettext/glade]plugins/gtk+/glade-widget-editor.ui
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]