[glade] Added GladeScaleEditor
- From: Tristan Van Berkom <tvb src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glade] Added GladeScaleEditor
- Date: Wed, 15 May 2013 13:49:25 +0000 (UTC)
commit 0cd980f6f185beeaeabb7d5d0a8ec5534f42647a
Author: Tristan Van Berkom <tristan van berkom gmail com>
Date: Wed May 15 22:32:16 2013 +0900
Added GladeScaleEditor
plugins/gtk+/Makefile.am | 4 +
plugins/gtk+/glade-gtk-resources.gresource.xml | 1 +
plugins/gtk+/glade-gtk-scale.c | 68 +++
plugins/gtk+/glade-scale-editor.c | 75 ++++
plugins/gtk+/glade-scale-editor.h | 56 +++
plugins/gtk+/glade-scale-editor.ui | 539 ++++++++++++++++++++++++
plugins/gtk+/gtk+.xml.in | 21 +-
po/POTFILES.in | 3 +
8 files changed, 766 insertions(+), 1 deletions(-)
---
diff --git a/plugins/gtk+/Makefile.am b/plugins/gtk+/Makefile.am
index 3747921..dca6207 100644
--- a/plugins/gtk+/Makefile.am
+++ b/plugins/gtk+/Makefile.am
@@ -90,6 +90,7 @@ libgladegtk_la_SOURCES = \
glade-gtk-recent-chooser-menu.c \
glade-gtk-recent-chooser-widget.c \
glade-gtk-recent-file-filter.c \
+ glade-gtk-scale.c \
glade-gtk-scrolled-window.c \
glade-gtk-size-group.c \
glade-gtk-spin-button.c \
@@ -120,6 +121,7 @@ libgladegtk_la_SOURCES = \
glade-recent-chooser-menu-editor.c \
glade-recent-chooser-widget-editor.c \
glade-scale-button-editor.c \
+ glade-scale-editor.c \
glade-scrolled-window-editor.c \
glade-spin-button-editor.c \
glade-store-editor.c \
@@ -182,6 +184,7 @@ noinst_HEADERS = \
glade-recent-chooser-editor.h \
glade-recent-chooser-menu-editor.h \
glade-recent-chooser-widget-editor.h \
+ glade-scale-editor.h \
glade-scale-button-editor.h \
glade-scrolled-window-editor.h \
glade-spin-button-editor.h \
@@ -243,6 +246,7 @@ UI_FILES = \
glade-recent-chooser-editor.ui \
glade-recent-chooser-menu-editor.ui \
glade-recent-chooser-widget-editor.ui \
+ glade-scale-editor.ui \
glade-scale-button-editor.ui \
glade-scrolled-window-editor.ui \
glade-spin-button-editor.ui \
diff --git a/plugins/gtk+/glade-gtk-resources.gresource.xml b/plugins/gtk+/glade-gtk-resources.gresource.xml
index b057aa0..65bbfef 100644
--- a/plugins/gtk+/glade-gtk-resources.gresource.xml
+++ b/plugins/gtk+/glade-gtk-resources.gresource.xml
@@ -29,6 +29,7 @@
<file compressed="true" preprocess="xml-stripblanks">glade-recent-chooser-editor.ui</file>
<file compressed="true" preprocess="xml-stripblanks">glade-recent-chooser-widget-editor.ui</file>
<file compressed="true" preprocess="xml-stripblanks">glade-recent-chooser-menu-editor.ui</file>
+ <file compressed="true" preprocess="xml-stripblanks">glade-scale-editor.ui</file>
<file compressed="true" preprocess="xml-stripblanks">glade-scale-button-editor.ui</file>
<file compressed="true" preprocess="xml-stripblanks">glade-scrolled-window-editor.ui</file>
<file compressed="true" preprocess="xml-stripblanks">glade-spin-button-editor.ui</file>
diff --git a/plugins/gtk+/glade-gtk-scale.c b/plugins/gtk+/glade-gtk-scale.c
new file mode 100644
index 0000000..4ed14c1
--- /dev/null
+++ b/plugins/gtk+/glade-gtk-scale.c
@@ -0,0 +1,68 @@
+/*
+ * glade-gtk-scale.c - GladeWidgetAdaptor for GtkScale
+ *
+ * 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-scale-editor.h"
+
+#define DRAW_VALUE_DISABLED_MSG _("Scale is configured to not draw the value")
+
+GladeEditable *
+glade_gtk_scale_create_editable (GladeWidgetAdaptor * adaptor,
+ GladeEditorPageType type)
+{
+ if (type == GLADE_PAGE_GENERAL)
+ {
+ return (GladeEditable *)glade_scale_editor_new ();
+ }
+
+ return GWA_GET_CLASS (GTK_TYPE_CONTAINER)->create_editable (adaptor, type);
+}
+
+void
+glade_gtk_scale_set_property (GladeWidgetAdaptor * adaptor,
+ GObject * object,
+ const gchar * id, const GValue * value)
+{
+ GladeWidget *widget = glade_widget_get_from_gobject (object);
+ GladeProperty *property = glade_widget_get_property (widget, id);
+
+ if (strcmp (id, "draw-value") == 0)
+ {
+ if (g_value_get_boolean (value))
+ {
+ glade_widget_property_set_sensitive (widget, "digits", TRUE, NULL);
+ glade_widget_property_set_sensitive (widget, "value-pos", TRUE, NULL);
+ }
+ else
+ {
+ glade_widget_property_set_sensitive (widget, "digits", FALSE, DRAW_VALUE_DISABLED_MSG);
+ glade_widget_property_set_sensitive (widget, "value-pos", FALSE, DRAW_VALUE_DISABLED_MSG);
+ }
+ }
+
+ if (GPC_VERSION_CHECK (glade_property_get_class (property), gtk_major_version, gtk_minor_version + 1))
+ GWA_GET_CLASS (GTK_TYPE_CONTAINER)->set_property (adaptor, object, id, value);
+}
diff --git a/plugins/gtk+/glade-scale-editor.c b/plugins/gtk+/glade-scale-editor.c
new file mode 100644
index 0000000..a3d2b0d
--- /dev/null
+++ b/plugins/gtk+/glade-scale-editor.c
@@ -0,0 +1,75 @@
+/*
+ * 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 <gdk/gdkkeysyms.h>
+
+#include "glade-scale-editor.h"
+
+static void glade_scale_editor_grab_focus (GtkWidget * widget);
+
+struct _GladeScaleEditorPrivate
+{
+ GtkWidget *embed;
+};
+
+G_DEFINE_TYPE (GladeScaleEditor, glade_scale_editor, GLADE_TYPE_EDITOR_SKELETON)
+
+static void
+glade_scale_editor_class_init (GladeScaleEditorClass * klass)
+{
+ GObjectClass *object_class = G_OBJECT_CLASS (klass);
+ GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (klass);
+
+ widget_class->grab_focus = glade_scale_editor_grab_focus;
+
+ gtk_widget_class_set_template_from_resource (widget_class, "/org/gnome/gladegtk/glade-scale-editor.ui");
+ gtk_widget_class_bind_child (widget_class, GladeScaleEditorPrivate, embed);
+
+ g_type_class_add_private (object_class, sizeof (GladeScaleEditorPrivate));
+}
+
+static void
+glade_scale_editor_init (GladeScaleEditor * self)
+{
+ self->priv =
+ G_TYPE_INSTANCE_GET_PRIVATE (self,
+ GLADE_TYPE_SCALE_EDITOR,
+ GladeScaleEditorPrivate);
+
+ gtk_widget_init_template (GTK_WIDGET (self));
+}
+
+static void
+glade_scale_editor_grab_focus (GtkWidget * widget)
+{
+ GladeScaleEditor *scale_editor = GLADE_SCALE_EDITOR (widget);
+
+ gtk_widget_grab_focus (scale_editor->priv->embed);
+}
+
+GtkWidget *
+glade_scale_editor_new (void)
+{
+ return g_object_new (GLADE_TYPE_SCALE_EDITOR, NULL);
+}
diff --git a/plugins/gtk+/glade-scale-editor.h b/plugins/gtk+/glade-scale-editor.h
new file mode 100644
index 0000000..9201cb3
--- /dev/null
+++ b/plugins/gtk+/glade-scale-editor.h
@@ -0,0 +1,56 @@
+/*
+ * 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_SCALE_EDITOR_H_
+#define _GLADE_SCALE_EDITOR_H_
+
+#include <gtk/gtk.h>
+
+G_BEGIN_DECLS
+
+#define GLADE_TYPE_SCALE_EDITOR (glade_scale_editor_get_type ())
+#define GLADE_SCALE_EDITOR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj),
GLADE_TYPE_SCALE_EDITOR, GladeScaleEditor))
+#define GLADE_SCALE_EDITOR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass),
GLADE_TYPE_SCALE_EDITOR, GladeScaleEditorClass))
+#define GLADE_IS_SCALE_EDITOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GLADE_TYPE_SCALE_EDITOR))
+#define GLADE_IS_SCALE_EDITOR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GLADE_TYPE_SCALE_EDITOR))
+#define GLADE_SCALE_EDITOR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GLADE_TYPE_SCALE_EDITOR,
GladeScaleEditorClass))
+
+typedef struct _GladeScaleEditor GladeScaleEditor;
+typedef struct _GladeScaleEditorClass GladeScaleEditorClass;
+typedef struct _GladeScaleEditorPrivate GladeScaleEditorPrivate;
+
+struct _GladeScaleEditor
+{
+ GladeEditorSkeleton parent;
+
+ GladeScaleEditorPrivate *priv;
+};
+
+struct _GladeScaleEditorClass
+{
+ GladeEditorSkeletonClass parent;
+};
+
+GType glade_scale_editor_get_type (void) G_GNUC_CONST;
+GtkWidget *glade_scale_editor_new (void);
+
+G_END_DECLS
+
+#endif /* _GLADE_SCALE_EDITOR_H_ */
diff --git a/plugins/gtk+/glade-scale-editor.ui b/plugins/gtk+/glade-scale-editor.ui
new file mode 100644
index 0000000..aeedbb5
--- /dev/null
+++ b/plugins/gtk+/glade-scale-editor.ui
@@ -0,0 +1,539 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<interface domain="glade">
+ <!-- interface-requires gladeui 0.0 -->
+ <!-- interface-requires gtk+ 3.10 -->
+ <template class="GladeScaleEditor" 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="GladeEditorTable" id="embed">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ </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="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">Scale Attributes</property>
+ <attributes>
+ <attribute name="weight" value="bold"/>
+ </attributes>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">1</property>
+ <property name="width">6</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GladePropertyLabel" id="orientation_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">orientation</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="orientation_editor">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="hexpand">False</property>
+ <property name="property_name">orientation</property>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="top_attach">2</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GladePropertyLabel" id="adjustment_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">adjustment</property>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">3</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GladePropertyShell" id="adjustment_editor">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="hexpand">False</property>
+ <property name="property_name">adjustment</property>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="top_attach">3</property>
+ <property name="width">2</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="stepper_sensitivity_label">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="halign">start</property>
+ <property name="valign">center</property>
+ <property name="margin_left">12</property>
+ <property name="hexpand">False</property>
+ <property name="label" translatable="yes">Stepper Sensitivity</property>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">11</property>
+ <property name="width">2</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GladePropertyLabel" id="lower_label">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="halign">end</property>
+ <property name="margin_left">12</property>
+ <property name="hexpand">False</property>
+ <property name="property_name">lower-stepper-sensitivity</property>
+ <property name="custom_text" translatable="yes">Lower:</property>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">12</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GladePropertyShell" id="lower_editor">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="hexpand">False</property>
+ <property name="property_name">lower-stepper-sensitivity</property>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="top_attach">12</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GladePropertyLabel" id="round_digits_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">round-digits</property>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">4</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GladePropertyShell" id="round_digits_editor">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="hexpand">False</property>
+ <property name="property_name">round-digits</property>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="top_attach">4</property>
+ <property name="width">2</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GladePropertyLabel" id="upper_label">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="halign">end</property>
+ <property name="margin_left">12</property>
+ <property name="hexpand">False</property>
+ <property name="property_name">upper-stepper-sensitivity</property>
+ <property name="custom_text" translatable="yes">Upper:</property>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">13</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GladePropertyShell" id="upper_editor">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="hexpand">False</property>
+ <property name="property_name">upper-stepper-sensitivity</property>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="top_attach">13</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GladePropertyShell" id="inverted_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">inverted</property>
+ <property name="editor_type">GladeEpropCheck</property>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">6</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GladePropertyShell" id="has_origin_editor">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="hexpand">False</property>
+ <property name="property_name">has-origin</property>
+ <property name="editor_type">GladeEpropCheck</property>
+ <property name="custom_text" translatable="yes">Highlight Origin</property>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="top_attach">6</property>
+ <property name="width">2</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GladePropertyShell" id="show_fill_level_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-fill-level</property>
+ <property name="editor_type">GladeEpropCheck</property>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">7</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GladePropertyShell" id="restrict_fill_level_editor">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="hexpand">False</property>
+ <property name="property_name">restrict-to-fill-level</property>
+ <property name="editor_type">GladeEpropCheck</property>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="top_attach">7</property>
+ <property name="width">2</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GladePropertyShell" id="draw_value_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">draw-value</property>
+ <property name="editor_type">GladeEpropCheck</property>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">8</property>
+ <property name="width">2</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GladePropertyLabel" id="digits_label">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="halign">end</property>
+ <property name="valign">center</property>
+ <property name="margin_left">12</property>
+ <property name="hexpand">False</property>
+ <property name="property_name">digits</property>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">10</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GladePropertyLabel" id="value_position_label">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="halign">end</property>
+ <property name="valign">center</property>
+ <property name="margin_left">12</property>
+ <property name="hexpand">False</property>
+ <property name="property_name">value-pos</property>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">9</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GladePropertyShell" id="digits_editor">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="hexpand">False</property>
+ <property name="property_name">digits</property>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="top_attach">10</property>
+ <property name="width">2</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GladePropertyShell" id="value_pos_editor">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="hexpand">False</property>
+ <property name="property_name">value-pos</property>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="top_attach">9</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GladePropertyLabel" id="fill_level_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">fill-level</property>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">5</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GladePropertyShell" id="fill_level_editor">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="hexpand">False</property>
+ <property name="property_name">fill-level</property>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="top_attach">5</property>
+ <property name="width">2</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>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </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="embed"/>
+ <editor id="orientation_label"/>
+ <editor id="orientation_editor"/>
+ <editor id="adjustment_label"/>
+ <editor id="adjustment_editor"/>
+ <editor id="lower_label"/>
+ <editor id="lower_editor"/>
+ <editor id="round_digits_label"/>
+ <editor id="round_digits_editor"/>
+ <editor id="upper_label"/>
+ <editor id="upper_editor"/>
+ <editor id="inverted_editor"/>
+ <editor id="has_origin_editor"/>
+ <editor id="show_fill_level_editor"/>
+ <editor id="restrict_fill_level_editor"/>
+ <editor id="draw_value_editor"/>
+ <editor id="digits_label"/>
+ <editor id="value_position_label"/>
+ <editor id="digits_editor"/>
+ <editor id="value_pos_editor"/>
+ <editor id="fill_level_label"/>
+ <editor id="fill_level_editor"/>
+ </child-editors>
+ </template>
+</interface>
diff --git a/plugins/gtk+/gtk+.xml.in b/plugins/gtk+/gtk+.xml.in
index 0686d15..16e48e8 100644
--- a/plugins/gtk+/gtk+.xml.in
+++ b/plugins/gtk+/gtk+.xml.in
@@ -1953,8 +1953,27 @@ range of values</_tooltip>
</glade-widget-class>
<glade-widget-class name="GtkScale" generic-name="scale" _title="Scale">
+ <create-editable-function>glade_gtk_scale_create_editable</create-editable-function>
+ <set-property-function>glade_gtk_scale_set_property</set-property-function>
<properties>
- <property id="orientation" default="GTK_ORIENTATION_VERTICAL"/>
+ <property id="orientation" default="GTK_ORIENTATION_VERTICAL" custom-layout="True"/>
+ <property id="adjustment" custom-layout="True"/>
+ <property id="round-digits" custom-layout="True">
+ <_tooltip>The number of digits to round the value to when the value changes</_tooltip>
+ </property>
+ <property id="lower-stepper-sensitivity" custom-layout="True"/>
+ <property id="upper-stepper-sensitivity" custom-layout="True"/>
+ <property id="has-origin" custom-layout="True">
+ <_tooltip>Whether to highlight the area of the trough from the bottom or left leading up to the
knob</_tooltip>
+ </property>
+ <property id="inverted" custom-layout="True"/>
+ <property id="draw-value" custom-layout="True" needs-sync="True"/>
+ <property id="value-pos" custom-layout="True"/>
+ <property id="show-fill-level" custom-layout="True"/>
+ <property id="restrict-to-fill-level" custom-layout="True"/>
+ <property id="digits" custom-layout="True"/>
+ <property id="fill-level" custom-layout="True"/>
+
</properties>
</glade-widget-class>
diff --git a/po/POTFILES.in b/po/POTFILES.in
index 0266a54..3fd1cf9 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -119,6 +119,7 @@ plugins/gtk+/glade-gtk-radio-menu-item.c
plugins/gtk+/glade-gtk-recent-chooser-menu.c
plugins/gtk+/glade-gtk-recent-chooser-widget.c
plugins/gtk+/glade-gtk-recent-file-filter.c
+plugins/gtk+/glade-gtk-scale.c
plugins/gtk+/glade-gtk-scrolled-window.c
plugins/gtk+/glade-gtk-size-group.c
plugins/gtk+/glade-gtk-spin-button.c
@@ -148,6 +149,7 @@ plugins/gtk+/glade-recent-chooser-dialog-editor.c
plugins/gtk+/glade-recent-chooser-editor.c
plugins/gtk+/glade-recent-chooser-menu-editor.c
plugins/gtk+/glade-recent-chooser-widget-editor.c
+plugins/gtk+/glade-scale-editor.c
plugins/gtk+/glade-scale-button-editor.c
plugins/gtk+/glade-scrolled-window-editor.c
plugins/gtk+/glade-spin-button-editor.c
@@ -187,6 +189,7 @@ plugins/gtk+/gtk+.xml.in
[type: gettext/glade]plugins/gtk+/glade-recent-chooser-editor.ui
[type: gettext/glade]plugins/gtk+/glade-recent-chooser-menu-editor.ui
[type: gettext/glade]plugins/gtk+/glade-recent-chooser-widget-editor.ui
+[type: gettext/glade]plugins/gtk+/glade-scale-editor.ui
[type: gettext/glade]plugins/gtk+/glade-scale-button-editor.ui
[type: gettext/glade]plugins/gtk+/glade-scrolled-window-editor.ui
[type: gettext/glade]plugins/gtk+/glade-spin-button-editor.ui
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]