[glade] Added GladeFontChooserEditor



commit 3fe212478c4d7f60ce2ff694274baafc6e3f73e5
Author: Tristan Van Berkom <tristan van berkom gmail com>
Date:   Sat May 4 22:41:29 2013 +0900

    Added GladeFontChooserEditor

 plugins/gtk+/Makefile.am                       |    3 +
 plugins/gtk+/glade-font-chooser-editor.c       |   48 +++++++++
 plugins/gtk+/glade-font-chooser-editor.h       |   57 +++++++++++
 plugins/gtk+/glade-font-chooser-editor.ui      |  124 ++++++++++++++++++++++++
 plugins/gtk+/glade-gtk-resources.gresource.xml |    1 +
 po/POTFILES.in                                 |    2 +
 6 files changed, 235 insertions(+), 0 deletions(-)
---
diff --git a/plugins/gtk+/Makefile.am b/plugins/gtk+/Makefile.am
index 675764b..abc3562 100644
--- a/plugins/gtk+/Makefile.am
+++ b/plugins/gtk+/Makefile.am
@@ -36,6 +36,7 @@ libgladegtk_la_SOURCES =              \
        glade-file-chooser-editor.c     \
        glade-file-chooser-widget-editor.c \
        glade-fixed.c                   \
+       glade-font-chooser-editor.c     \
        glade-gtk-about-dialog.c        \
        glade-gtk-action.c              \
        glade-gtk-action-group.c        \
@@ -121,6 +122,7 @@ noinst_HEADERS =                    \
        glade-file-chooser-editor.h     \
        glade-file-chooser-widget-editor.h \
        glade-fixed.h                   \
+       glade-font-chooser-editor.h     \
        glade-gtk.h                     \
        glade-gtk-action-widgets.h      \
        glade-gtk-button.h              \
@@ -176,6 +178,7 @@ UI_FILES =                          \
        glade-file-chooser-dialog-editor.ui \
        glade-file-chooser-editor.ui    \
        glade-file-chooser-widget-editor.ui \
+       glade-font-chooser-editor.ui    \
        glade-image-editor.ui           \
        glade-label-editor.ui           \
        glade-tool-button-editor.ui     \
diff --git a/plugins/gtk+/glade-font-chooser-editor.c b/plugins/gtk+/glade-font-chooser-editor.c
new file mode 100644
index 0000000..dc25fa5
--- /dev/null
+++ b/plugins/gtk+/glade-font-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-font-chooser-editor.h"
+
+G_DEFINE_TYPE (GladeFontChooserEditor, glade_font_chooser_editor, GLADE_TYPE_EDITOR_SKELETON)
+
+static void
+glade_font_chooser_editor_class_init (GladeFontChooserEditorClass * klass)
+{
+  GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (klass);
+
+  gtk_widget_class_set_template_from_resource (widget_class, 
"/org/gnome/gladegtk/glade-font-chooser-editor.ui");
+}
+
+static void
+glade_font_chooser_editor_init (GladeFontChooserEditor * self)
+{
+  gtk_widget_init_template (GTK_WIDGET (self));
+}
+
+GtkWidget *
+glade_font_chooser_editor_new (void)
+{
+  return g_object_new (GLADE_TYPE_FONT_CHOOSER_EDITOR, NULL);
+}
diff --git a/plugins/gtk+/glade-font-chooser-editor.h b/plugins/gtk+/glade-font-chooser-editor.h
new file mode 100644
index 0000000..aa5709a
--- /dev/null
+++ b/plugins/gtk+/glade-font-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_FONT_CHOOSER_EDITOR_H_
+#define _GLADE_FONT_CHOOSER_EDITOR_H_
+
+#include <gtk/gtk.h>
+#include "glade-window-editor.h"
+
+G_BEGIN_DECLS
+
+#define GLADE_TYPE_FONT_CHOOSER_EDITOR             (glade_font_chooser_editor_get_type ())
+#define GLADE_FONT_CHOOSER_EDITOR(obj)             (G_TYPE_CHECK_INSTANCE_CAST ((obj), 
GLADE_TYPE_FONT_CHOOSER_EDITOR, GladeFontChooserEditor))
+#define GLADE_FONT_CHOOSER_EDITOR_CLASS(klass)     (G_TYPE_CHECK_CLASS_CAST ((klass), 
GLADE_TYPE_FONT_CHOOSER_EDITOR, GladeFontChooserEditorClass))
+#define GLADE_IS_FONT_CHOOSER_EDITOR(obj)          (G_TYPE_CHECK_INSTANCE_TYPE ((obj), 
GLADE_TYPE_FONT_CHOOSER_EDITOR))
+#define GLADE_IS_FONT_CHOOSER_EDITOR_CLASS(klass)  (G_TYPE_CHECK_CLASS_TYPE ((klass), 
GLADE_TYPE_FONT_CHOOSER_EDITOR))
+#define GLADE_FONT_CHOOSER_EDITOR_GET_CLASS(obj)   (G_TYPE_INSTANCE_GET_CLASS ((obj), 
GLADE_TYPE_FONT_CHOOSER_EDITOR, GladeFontChooserEditorClass))
+
+typedef struct _GladeFontChooserEditor        GladeFontChooserEditor;
+typedef struct _GladeFontChooserEditorClass   GladeFontChooserEditorClass;
+typedef struct _GladeFontChooserEditorPrivate GladeFontChooserEditorPrivate;
+
+struct _GladeFontChooserEditor
+{
+  GladeEditorSkeleton  parent;
+
+  GladeFontChooserEditorPrivate *priv;
+};
+
+struct _GladeFontChooserEditorClass
+{
+  GladeEditorSkeletonClass parent;
+};
+
+GType            glade_font_chooser_editor_get_type (void) G_GNUC_CONST;
+GtkWidget       *glade_font_chooser_editor_new      (void);
+
+G_END_DECLS
+
+#endif  /* _GLADE_FONT_CHOOSER_EDITOR_H_ */
diff --git a/plugins/gtk+/glade-font-chooser-editor.ui b/plugins/gtk+/glade-font-chooser-editor.ui
new file mode 100644
index 0000000..f0560ce
--- /dev/null
+++ b/plugins/gtk+/glade-font-chooser-editor.ui
@@ -0,0 +1,124 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<interface domain="glade">
+  <!-- interface-requires gladeui 0.0 -->
+  <!-- interface-requires gtk+ 3.10 -->
+  <template class="GladeFontChooserEditor" 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">Font 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="font_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">font</property>
+          </object>
+          <packing>
+            <property name="left_attach">0</property>
+            <property name="top_attach">1</property>
+            <property name="width">1</property>
+            <property name="height">1</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GladePropertyShell" id="font_editor">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="property_name">font</property>
+          </object>
+          <packing>
+            <property name="left_attach">1</property>
+            <property name="top_attach">1</property>
+            <property name="width">5</property>
+            <property name="height">1</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GladePropertyLabel" id="preview_text_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">preview-text</property>
+          </object>
+          <packing>
+            <property name="left_attach">0</property>
+            <property name="top_attach">2</property>
+            <property name="width">1</property>
+            <property name="height">1</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GladePropertyShell" id="preview_text_editor">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="property_name">preview-text</property>
+          </object>
+          <packing>
+            <property name="left_attach">1</property>
+            <property name="top_attach">2</property>
+            <property name="width">5</property>
+            <property name="height">1</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GladePropertyShell" id="show_preview_editor">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="property_name">show-preview-entry</property>
+            <property name="editor_type">GladeEpropCheck</property>
+          </object>
+          <packing>
+            <property name="left_attach">1</property>
+            <property name="top_attach">3</property>
+            <property name="width">4</property>
+            <property name="height">1</property>
+          </packing>
+        </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="font_label"/>
+      <editor id="font_editor"/>
+      <editor id="preview_text_label"/>
+      <editor id="preview_text_editor"/>
+      <editor id="show_preview_editor"/>
+    </child-editors>
+  </template>
+</interface>
diff --git a/plugins/gtk+/glade-gtk-resources.gresource.xml b/plugins/gtk+/glade-gtk-resources.gresource.xml
index 0b7a1e6..f23d474 100644
--- a/plugins/gtk+/glade-gtk-resources.gresource.xml
+++ b/plugins/gtk+/glade-gtk-resources.gresource.xml
@@ -9,6 +9,7 @@
     <file compressed="true" preprocess="xml-stripblanks">glade-file-chooser-dialog-editor.ui</file>
     <file compressed="true" preprocess="xml-stripblanks">glade-file-chooser-editor.ui</file>
     <file compressed="true" preprocess="xml-stripblanks">glade-file-chooser-widget-editor.ui</file>
+    <file compressed="true" preprocess="xml-stripblanks">glade-font-chooser-editor.ui</file>
     <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-tool-button-editor.ui</file>
diff --git a/po/POTFILES.in b/po/POTFILES.in
index 654ed1c..eac50ba 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -65,6 +65,7 @@ plugins/gtk+/glade-file-chooser-dialog-editor.c
 plugins/gtk+/glade-file-chooser-editor.c
 plugins/gtk+/glade-file-chooser-widget-editor.c
 plugins/gtk+/glade-fixed.c
+plugins/gtk+/glade-font-chooser-editor.c
 plugins/gtk+/glade-gtk-about-dialog.c
 plugins/gtk+/glade-gtk-action.c
 plugins/gtk+/glade-gtk-action-group.c
@@ -142,6 +143,7 @@ plugins/gtk+/gtk+.xml.in
 [type: gettext/glade]plugins/gtk+/glade-file-chooser-dialog-editor.ui
 [type: gettext/glade]plugins/gtk+/glade-file-chooser-editor.ui
 [type: gettext/glade]plugins/gtk+/glade-file-chooser-widget-editor.ui
+[type: gettext/glade]plugins/gtk+/glade-font-chooser-editor.ui
 [type: gettext/glade]plugins/gtk+/glade-image-editor.ui
 [type: gettext/glade]plugins/gtk+/glade-label-editor.ui
 [type: gettext/glade]plugins/gtk+/glade-tool-button-editor.ui


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