added boolean property 'emulate-brush-dynamics', in preparation for bug
2008-07-21 Sven Neumann <sven@gimp.org> * app/core/gimpstrokedesc.[ch]: added boolean property 'emulate-brush-dynamics', in preparation for bug #543706. * app/dialogs/stroke-dialog.c: added a toggle for the new parameter. svn path=/trunk/; revision=26255
This commit is contained in:

committed by
Sven Neumann

parent
9cd0585a33
commit
7c6c5cd6d4
@ -1,3 +1,10 @@
|
||||
2008-07-21 Sven Neumann <sven@gimp.org>
|
||||
|
||||
* app/core/gimpstrokedesc.[ch]: added boolean property
|
||||
'emulate-brush-dynamics', in preparation for bug #543706.
|
||||
|
||||
* app/dialogs/stroke-dialog.c: added a toggle for the new parameter.
|
||||
|
||||
2008-07-21 Sven Neumann <sven@gimp.org>
|
||||
|
||||
* configure.in (ALL_LINGUAS): updated note to translators.
|
||||
|
@ -47,6 +47,7 @@ enum
|
||||
PROP_METHOD,
|
||||
PROP_STROKE_OPTIONS,
|
||||
PROP_PAINT_INFO,
|
||||
PROP_EMULATE_DYNAMICS,
|
||||
PROP_PAINT_OPTIONS
|
||||
};
|
||||
|
||||
@ -109,6 +110,10 @@ gimp_stroke_desc_class_init (GimpStrokeDescClass *klass)
|
||||
"paint-info", NULL,
|
||||
GIMP_TYPE_PAINT_INFO,
|
||||
GIMP_PARAM_STATIC_STRINGS);
|
||||
GIMP_CONFIG_INSTALL_PROP_BOOLEAN (object_class, PROP_EMULATE_DYNAMICS,
|
||||
"emulate-brush-dynamics", NULL,
|
||||
FALSE,
|
||||
GIMP_PARAM_STATIC_STRINGS);
|
||||
GIMP_CONFIG_INSTALL_PROP_OBJECT (object_class, PROP_PAINT_OPTIONS,
|
||||
"paint-options", NULL,
|
||||
GIMP_TYPE_PAINT_OPTIONS,
|
||||
@ -189,19 +194,27 @@ gimp_stroke_desc_set_property (GObject *object,
|
||||
case PROP_GIMP:
|
||||
desc->gimp = g_value_get_object (value);
|
||||
break;
|
||||
|
||||
case PROP_METHOD:
|
||||
desc->method = g_value_get_enum (value);
|
||||
break;
|
||||
|
||||
case PROP_STROKE_OPTIONS:
|
||||
if (g_value_get_object (value))
|
||||
gimp_config_sync (g_value_get_object (value),
|
||||
G_OBJECT (desc->stroke_options), 0);
|
||||
break;
|
||||
|
||||
case PROP_PAINT_INFO:
|
||||
if (desc->paint_info)
|
||||
g_object_unref (desc->paint_info);
|
||||
desc->paint_info = (GimpPaintInfo *) g_value_dup_object (value);
|
||||
break;
|
||||
|
||||
case PROP_EMULATE_DYNAMICS:
|
||||
desc->emulate_dynamics = g_value_get_boolean (value);
|
||||
break;
|
||||
|
||||
case PROP_PAINT_OPTIONS:
|
||||
if (desc->paint_options)
|
||||
g_object_unref (desc->paint_options);
|
||||
@ -227,15 +240,23 @@ gimp_stroke_desc_get_property (GObject *object,
|
||||
case PROP_GIMP:
|
||||
g_value_set_object (value, desc->gimp);
|
||||
break;
|
||||
|
||||
case PROP_METHOD:
|
||||
g_value_set_enum (value, desc->method);
|
||||
break;
|
||||
|
||||
case PROP_STROKE_OPTIONS:
|
||||
g_value_set_object (value, desc->stroke_options);
|
||||
break;
|
||||
|
||||
case PROP_PAINT_INFO:
|
||||
g_value_set_object (value, desc->paint_info);
|
||||
break;
|
||||
|
||||
case PROP_EMULATE_DYNAMICS:
|
||||
g_value_set_boolean (value, desc->emulate_dynamics);
|
||||
break;
|
||||
|
||||
case PROP_PAINT_OPTIONS:
|
||||
g_value_set_object (value, desc->paint_options);
|
||||
break;
|
||||
|
@ -46,13 +46,14 @@ struct _GimpStrokeDesc
|
||||
|
||||
GimpStrokeOptions *stroke_options;
|
||||
GimpPaintInfo *paint_info;
|
||||
gboolean emulate_dynamics;
|
||||
|
||||
GimpPaintOptions *paint_options;
|
||||
};
|
||||
|
||||
struct _GimpStrokeDescClass
|
||||
{
|
||||
GimpObjectClass parent_class;
|
||||
GimpObjectClass parent_class;
|
||||
};
|
||||
|
||||
|
||||
|
@ -204,18 +204,24 @@ stroke_dialog_new (GimpItem *item,
|
||||
NULL);
|
||||
|
||||
{
|
||||
GtkWidget *vbox;
|
||||
GtkWidget *hbox;
|
||||
GtkWidget *label;
|
||||
GtkWidget *combo;
|
||||
GtkWidget *button;
|
||||
|
||||
vbox = gtk_vbox_new (FALSE, 6);
|
||||
gtk_container_add (GTK_CONTAINER (frame), vbox);
|
||||
gtk_widget_show (vbox);
|
||||
|
||||
gtk_widget_set_sensitive (vbox,
|
||||
desc->method == GIMP_STROKE_METHOD_PAINT_CORE);
|
||||
g_object_set_data (G_OBJECT (paint_radio), "set_sensitive", vbox);
|
||||
|
||||
hbox = gtk_hbox_new (FALSE, 6);
|
||||
gtk_container_add (GTK_CONTAINER (frame), hbox);
|
||||
gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 0);
|
||||
gtk_widget_show (hbox);
|
||||
|
||||
gtk_widget_set_sensitive (hbox,
|
||||
desc->method == GIMP_STROKE_METHOD_PAINT_CORE);
|
||||
g_object_set_data (G_OBJECT (paint_radio), "set_sensitive", hbox);
|
||||
|
||||
label = gtk_label_new (_("Paint tool:"));
|
||||
gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 0);
|
||||
gtk_widget_show (label);
|
||||
@ -234,6 +240,12 @@ stroke_dialog_new (GimpItem *item,
|
||||
|
||||
|
||||
g_object_set_data (G_OBJECT (dialog), "gimp-tool-menu", combo);
|
||||
|
||||
button = gimp_prop_check_button_new (G_OBJECT (desc),
|
||||
"emulate-brush-dynamics",
|
||||
_("_Emulate brush dynamics"));
|
||||
gtk_box_pack_start (GTK_BOX (vbox), button, FALSE, FALSE, 0);
|
||||
gtk_widget_show (button);
|
||||
}
|
||||
|
||||
return dialog;
|
||||
|
Reference in New Issue
Block a user