[glade] Added GladeRecentChooserEditor



commit 40fcf1db0dca6edb27ac268095840b027eeb5374
Author: Tristan Van Berkom <tristan van berkom gmail com>
Date:   Sun May 5 17:24:43 2013 +0900

    Added GladeRecentChooserEditor
    
    An embeddable recent chooser editor for recent chooser editors.

 plugins/gtk+/Makefile.am                       |    3 +
 plugins/gtk+/glade-gtk-resources.gresource.xml |    1 +
 plugins/gtk+/glade-recent-chooser-editor.c     |   48 ++++
 plugins/gtk+/glade-recent-chooser-editor.h     |   57 +++++
 plugins/gtk+/glade-recent-chooser-editor.ui    |  281 ++++++++++++++++++++++++
 po/POTFILES.in                                 |    2 +
 6 files changed, 392 insertions(+), 0 deletions(-)
---
diff --git a/plugins/gtk+/Makefile.am b/plugins/gtk+/Makefile.am
index 6b3e391..98fb95c 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-editor.c   \
        glade-store-editor.c            \
        glade-string-list.c             \
        glade-tool-button-editor.c      \
@@ -149,6 +150,7 @@ noinst_HEADERS =                    \
        glade-label-editor.h            \
        glade-message-dialog-editor.h   \
        glade-model-data.h              \
+       glade-recent-chooser-editor.h   \
        glade-store-editor.h            \
        glade-string-list.h             \
        glade-tool-button-editor.h      \
@@ -194,6 +196,7 @@ UI_FILES =                          \
        glade-image-editor.ui           \
        glade-label-editor.ui           \
        glade-message-dialog-editor.ui  \
+       glade-recent-chooser-editor.ui  \
        glade-tool-button-editor.ui     \
        glade-widget-editor.ui          \
        glade-window-editor.ui
diff --git a/plugins/gtk+/glade-gtk-resources.gresource.xml b/plugins/gtk+/glade-gtk-resources.gresource.xml
index b228ee1..b4860ac 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-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>
     <file compressed="true" preprocess="xml-stripblanks">glade-window-editor.ui</file>
diff --git a/plugins/gtk+/glade-recent-chooser-editor.c b/plugins/gtk+/glade-recent-chooser-editor.c
new file mode 100644
index 0000000..009e59a
--- /dev/null
+++ b/plugins/gtk+/glade-recent-chooser-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-editor.h"
+
+G_DEFINE_TYPE (GladeRecentChooserEditor, glade_recent_chooser_editor, GLADE_TYPE_EDITOR_SKELETON)
+
+static void
+glade_recent_chooser_editor_class_init (GladeRecentChooserEditorClass * klass)
+{
+  GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (klass);
+
+  gtk_widget_class_set_template_from_resource (widget_class, 
"/org/gnome/gladegtk/glade-recent-chooser-editor.ui");
+}
+
+static void
+glade_recent_chooser_editor_init (GladeRecentChooserEditor * self)
+{
+  gtk_widget_init_template (GTK_WIDGET (self));
+}
+
+GtkWidget *
+glade_recent_chooser_editor_new (void)
+{
+  return g_object_new (GLADE_TYPE_RECENT_CHOOSER_EDITOR, NULL);
+}
diff --git a/plugins/gtk+/glade-recent-chooser-editor.h b/plugins/gtk+/glade-recent-chooser-editor.h
new file mode 100644
index 0000000..c1b703f
--- /dev/null
+++ b/plugins/gtk+/glade-recent-chooser-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_EDITOR_H_
+#define _GLADE_RECENT_CHOOSER_EDITOR_H_
+
+#include <gtk/gtk.h>
+#include "glade-window-editor.h"
+
+G_BEGIN_DECLS
+
+#define GLADE_TYPE_RECENT_CHOOSER_EDITOR           (glade_recent_chooser_editor_get_type ())
+#define GLADE_RECENT_CHOOSER_EDITOR(obj)           (G_TYPE_CHECK_INSTANCE_CAST ((obj), 
GLADE_TYPE_RECENT_CHOOSER_EDITOR, GladeRecentChooserEditor))
+#define GLADE_RECENT_CHOOSER_EDITOR_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST ((klass), 
GLADE_TYPE_RECENT_CHOOSER_EDITOR, GladeRecentChooserEditorClass))
+#define GLADE_IS_RECENT_CHOOSER_EDITOR(obj)        (G_TYPE_CHECK_INSTANCE_TYPE ((obj), 
GLADE_TYPE_RECENT_CHOOSER_EDITOR))
+#define GLADE_IS_RECENT_CHOOSER_EDITOR_CLASS(klass)  (G_TYPE_CHECK_CLASS_TYPE ((klass), 
GLADE_TYPE_RECENT_CHOOSER_EDITOR))
+#define GLADE_RECENT_CHOOSER_EDITOR_GET_CLASS(obj)   (G_TYPE_INSTANCE_GET_CLASS ((obj), 
GLADE_TYPE_RECENT_CHOOSER_EDITOR, GladeRecentChooserEditorClass))
+
+typedef struct _GladeRecentChooserEditor        GladeRecentChooserEditor;
+typedef struct _GladeRecentChooserEditorClass   GladeRecentChooserEditorClass;
+typedef struct _GladeRecentChooserEditorPrivate GladeRecentChooserEditorPrivate;
+
+struct _GladeRecentChooserEditor
+{
+  GladeEditorSkeleton  parent;
+
+  GladeRecentChooserEditorPrivate *priv;
+};
+
+struct _GladeRecentChooserEditorClass
+{
+  GladeEditorSkeletonClass parent;
+};
+
+GType            glade_recent_chooser_editor_get_type (void) G_GNUC_CONST;
+GtkWidget       *glade_recent_chooser_editor_new      (void);
+
+G_END_DECLS
+
+#endif  /* _GLADE_RECENT_CHOOSER_EDITOR_H_ */
diff --git a/plugins/gtk+/glade-recent-chooser-editor.ui b/plugins/gtk+/glade-recent-chooser-editor.ui
new file mode 100644
index 0000000..da96656
--- /dev/null
+++ b/plugins/gtk+/glade-recent-chooser-editor.ui
@@ -0,0 +1,281 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<interface domain="glade">
+  <!-- interface-requires gladeui 0.0 -->
+  <!-- interface-requires gtk+ 3.10 -->
+  <template class="GladeRecentChooserEditor" parent="GladeEditorSkeleton">
+    <property name="visible">True</property>
+    <property name="can_focus">False</property>
+    <property name="orientation">vertical</property>
+    <child>
+      <object class="GtkGrid" id="grid">
+        <property name="visible">True</property>
+        <property name="can_focus">False</property>
+        <property name="row_spacing">6</property>
+        <property name="column_spacing">6</property>
+        <child>
+          <object class="GtkLabel" id="title">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="halign">start</property>
+            <property name="valign">center</property>
+            <property name="label" translatable="yes">Recent Chooser Attributes</property>
+            <attributes>
+              <attribute name="weight" value="bold"/>
+            </attributes>
+          </object>
+          <packing>
+            <property name="left_attach">0</property>
+            <property name="top_attach">0</property>
+            <property name="width">6</property>
+            <property name="height">1</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GladePropertyLabel" id="recent_manager_label">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="margin_left">12</property>
+            <property name="hexpand">False</property>
+            <property name="property_name">recent-manager</property>
+          </object>
+          <packing>
+            <property name="left_attach">0</property>
+            <property name="top_attach">1</property>
+            <property name="width">2</property>
+            <property name="height">1</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GladePropertyShell" id="recent_manager_editor">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="property_name">recent-manager</property>
+          </object>
+          <packing>
+            <property name="left_attach">2</property>
+            <property name="top_attach">1</property>
+            <property name="width">4</property>
+            <property name="height">1</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GladePropertyLabel" id="filter_label">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="margin_left">12</property>
+            <property name="hexpand">False</property>
+            <property name="property_name">filter</property>
+          </object>
+          <packing>
+            <property name="left_attach">0</property>
+            <property name="top_attach">2</property>
+            <property name="width">2</property>
+            <property name="height">1</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GladePropertyLabel" id="sort_label">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="margin_left">12</property>
+            <property name="hexpand">False</property>
+            <property name="property_name">sort-type</property>
+          </object>
+          <packing>
+            <property name="left_attach">0</property>
+            <property name="top_attach">3</property>
+            <property name="width">2</property>
+            <property name="height">1</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GladePropertyShell" id="filter_editor">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="property_name">filter</property>
+          </object>
+          <packing>
+            <property name="left_attach">2</property>
+            <property name="top_attach">2</property>
+            <property name="width">4</property>
+            <property name="height">1</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GladePropertyShell" id="sort_editor">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="hexpand">False</property>
+            <property name="property_name">sort-type</property>
+          </object>
+          <packing>
+            <property name="left_attach">2</property>
+            <property name="top_attach">3</property>
+            <property name="width">2</property>
+            <property name="height">1</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GladePropertyLabel" id="limit_label">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="margin_left">12</property>
+            <property name="hexpand">False</property>
+            <property name="property_name">limit</property>
+          </object>
+          <packing>
+            <property name="left_attach">0</property>
+            <property name="top_attach">4</property>
+            <property name="width">2</property>
+            <property name="height">1</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GladePropertyShell" id="limit_editor">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="hexpand">False</property>
+            <property name="property_name">limit</property>
+          </object>
+          <packing>
+            <property name="left_attach">2</property>
+            <property name="top_attach">4</property>
+            <property name="width">2</property>
+            <property name="height">1</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GladePropertyShell" id="show_private_editor">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="margin_left">12</property>
+            <property name="hexpand">False</property>
+            <property name="property_name">show-private</property>
+            <property name="editor_type">GladeEpropCheck</property>
+          </object>
+          <packing>
+            <property name="left_attach">0</property>
+            <property name="top_attach">5</property>
+            <property name="width">2</property>
+            <property name="height">1</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GladePropertyShell" id="show_tips_editor">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="hexpand">False</property>
+            <property name="property_name">show-tips</property>
+            <property name="editor_type">GladeEpropCheck</property>
+          </object>
+          <packing>
+            <property name="left_attach">2</property>
+            <property name="top_attach">5</property>
+            <property name="width">2</property>
+            <property name="height">1</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GladePropertyShell" id="show_icons_editor">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="hexpand">False</property>
+            <property name="property_name">show-icons</property>
+            <property name="editor_type">GladeEpropCheck</property>
+          </object>
+          <packing>
+            <property name="left_attach">4</property>
+            <property name="top_attach">5</property>
+            <property name="width">1</property>
+            <property name="height">1</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GladePropertyShell" id="show_not_found_editor">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="margin_left">12</property>
+            <property name="hexpand">False</property>
+            <property name="property_name">show-not-found</property>
+            <property name="editor_type">GladeEpropCheck</property>
+          </object>
+          <packing>
+            <property name="left_attach">0</property>
+            <property name="top_attach">6</property>
+            <property name="width">2</property>
+            <property name="height">1</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GladePropertyShell" id="select_multiple_editor">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="hexpand">False</property>
+            <property name="property_name">select-multiple</property>
+            <property name="editor_type">GladeEpropCheck</property>
+          </object>
+          <packing>
+            <property name="left_attach">2</property>
+            <property name="top_attach">6</property>
+            <property name="width">2</property>
+            <property name="height">1</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GladePropertyShell" id="local_only_editor">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="hexpand">False</property>
+            <property name="property_name">local-only</property>
+            <property name="editor_type">GladeEpropCheck</property>
+          </object>
+          <packing>
+            <property name="left_attach">4</property>
+            <property name="top_attach">6</property>
+            <property name="width">1</property>
+            <property name="height">1</property>
+          </packing>
+        </child>
+        <child>
+          <placeholder/>
+        </child>
+        <child>
+          <placeholder/>
+        </child>
+        <child>
+          <placeholder/>
+        </child>
+        <child>
+          <placeholder/>
+        </child>
+        <child>
+          <placeholder/>
+        </child>
+        <child>
+          <placeholder/>
+        </child>
+      </object>
+      <packing>
+        <property name="expand">False</property>
+        <property name="fill">True</property>
+        <property name="position">0</property>
+      </packing>
+    </child>
+    <child-editors>
+      <editor id="recent_manager_label"/>
+      <editor id="recent_manager_editor"/>
+      <editor id="filter_label"/>
+      <editor id="sort_label"/>
+      <editor id="filter_editor"/>
+      <editor id="sort_editor"/>
+      <editor id="limit_label"/>
+      <editor id="limit_editor"/>
+      <editor id="show_private_editor"/>
+      <editor id="show_tips_editor"/>
+      <editor id="show_icons_editor"/>
+      <editor id="show_not_found_editor"/>
+      <editor id="select_multiple_editor"/>
+      <editor id="local_only_editor"/>
+    </child-editors>
+  </template>
+</interface>
diff --git a/po/POTFILES.in b/po/POTFILES.in
index 9622939..2fc118b 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-editor.c
 plugins/gtk+/glade-store-editor.c
 plugins/gtk+/glade-string-list.c
 plugins/gtk+/glade-tool-button-editor.c
@@ -154,6 +155,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-editor.ui
 [type: gettext/glade]plugins/gtk+/glade-tool-button-editor.ui
 [type: gettext/glade]plugins/gtk+/glade-widget-editor.ui
 [type: gettext/glade]plugins/gtk+/glade-window-editor.ui


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]