[gimp] app: use a GimpSpinScale instead of a scale entry in the prop_table
- From: Michael Natterer <mitch src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] app: use a GimpSpinScale instead of a scale entry in the prop_table
- Date: Wed, 2 May 2012 16:23:37 +0000 (UTC)
commit 28913496bb1a1ec48ad42b8fed979b7b6a1cd4ee
Author: Michael Natterer <mitch gimp org>
Date: Fri Mar 30 01:24:48 2012 +0200
app: use a GimpSpinScale instead of a scale entry in the prop_table
app/widgets/gimppropwidgets.c | 37 ++++++++++++++++++++++---------------
1 files changed, 22 insertions(+), 15 deletions(-)
---
diff --git a/app/widgets/gimppropwidgets.c b/app/widgets/gimppropwidgets.c
index 7e2730c..38df10c 100644
--- a/app/widgets/gimppropwidgets.c
+++ b/app/widgets/gimppropwidgets.c
@@ -1480,18 +1480,12 @@ gimp_prop_table_new (GObject *config,
G_IS_PARAM_SPEC_FLOAT (pspec) ||
G_IS_PARAM_SPEC_DOUBLE (pspec))
{
- GtkObject *adj;
- gint digits = (G_IS_PARAM_SPEC_FLOAT (pspec) ||
- G_IS_PARAM_SPEC_DOUBLE (pspec)) ? 2 : 0;
-
- adj = gimp_prop_scale_entry_new (config, pspec->name,
- GTK_TABLE (table), 0, row++,
- g_param_spec_get_nick (pspec),
- 1.0, 1.0, digits,
- FALSE, 0.0, 0.0);
-
- gtk_size_group_add_widget (size_group,
- GIMP_SCALE_ENTRY_SPINBUTTON (adj));
+ gint digits = (G_IS_PARAM_SPEC_FLOAT (pspec) ||
+ G_IS_PARAM_SPEC_DOUBLE (pspec)) ? 2 : 0;
+
+ widget = gimp_prop_spin_scale_new (config, pspec->name,
+ g_param_spec_get_nick (pspec),
+ 1.0, 1.0, digits);
}
else if (GIMP_IS_PARAM_SPEC_RGB (pspec))
{
@@ -1509,9 +1503,22 @@ gimp_prop_table_new (GObject *config,
}
if (widget)
- gimp_table_attach_aligned (GTK_TABLE (table), 0, row++,
- label, 0.0, 0.5,
- widget, 2, FALSE);
+ {
+ if (label)
+ {
+ gimp_table_attach_aligned (GTK_TABLE (table), 0, row,
+ label, 0.0, 0.5,
+ widget, 2, FALSE);
+ }
+ else
+ {
+ gtk_table_attach_defaults (GTK_TABLE (table), widget,
+ 0, 3, row, row + 1);
+ gtk_widget_show (widget);
+ }
+
+ row++;
+ }
}
g_object_unref (size_group);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]