app: coding style and tooltip fixes

This commit is contained in:
Michael Natterer 2014-11-15 22:23:14 +01:00
parent 78120dcb87
commit 0aaee2a0e0
1 changed files with 51 additions and 53 deletions

View File

@ -67,17 +67,18 @@ static GtkWidget * jitter_options_gui (GimpPaintOptions *paint_options,
GType tool_type);
static GtkWidget * smoothing_options_gui (GimpPaintOptions *paint_options,
GType tool_type);
static GtkWidget * gimp_paint_options_gui_scale_with_reset_button
(GObject *config,
gchar *prop_name,
gchar *prop_descr,
gchar *reset_tooltip,
gdouble minor_step,
gdouble major_step,
gdouble min,
gdouble max,
gdouble step_increment,
gdouble page_increment,
gdouble scale_min,
gdouble scale_max,
gdouble gamma,
GCallback callback);
GCallback reset_callback);
/* public functions */
@ -143,7 +144,6 @@ gimp_paint_options_gui (GimpToolOptions *tool_options)
gtk_box_pack_start (GTK_BOX (vbox), button, FALSE, FALSE, 0);
gtk_widget_show (button);
/*Size spinner*/
hbox = gimp_paint_options_gui_scale_with_reset_button
(config, "brush-size", _("Size"),
_("Reset size to brush's native size"),
@ -152,16 +152,14 @@ gimp_paint_options_gui (GimpToolOptions *tool_options)
gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 0);
gtk_widget_show (hbox);
/*Aspect ratio spinner*/
hbox = gimp_paint_options_gui_scale_with_reset_button
(config, "brush-aspect-ratio", _("Aspect Ratio"),
_("Reset size to brush's native size"),
_("Reset aspect ratio to brush's native"),
0.1, 1.0, -20.0, 20.0, 1.0,
G_CALLBACK (gimp_paint_options_gui_reset_aspect_ratio));
gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 0);
gtk_widget_show (hbox);
/*Brush angle spinner*/
hbox = gimp_paint_options_gui_scale_with_reset_button
(config, "brush-angle", _("Angle"),
_("Reset angle to zero"),
@ -170,10 +168,9 @@ gimp_paint_options_gui (GimpToolOptions *tool_options)
gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 0);
gtk_widget_show (hbox);
/*Brush spacing spinner*/
hbox = gimp_paint_options_gui_scale_with_reset_button
(config, "brush-spacing", _("Spacing"),
_("Reset spacing to zero"),
_("Reset spacing to brush's native spacing"),
0.1, 1.0, 1.0, 200.0, 1.7,
G_CALLBACK (gimp_paint_options_gui_reset_spacing));
gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 0);
@ -420,12 +417,12 @@ gimp_paint_options_gui_scale_with_reset_button (GObject *config,
gchar *prop_name,
gchar *prop_descr,
gchar *reset_tooltip,
gdouble minor_step,
gdouble major_step,
gdouble min,
gdouble max,
gdouble step_increment,
gdouble page_increment,
gdouble scale_min,
gdouble scale_max,
gdouble gamma,
GCallback callback)
GCallback reset_callback)
{
GtkWidget *scale;
GtkWidget *hbox;
@ -435,8 +432,9 @@ gimp_paint_options_gui_scale_with_reset_button (GObject *config,
scale = gimp_prop_spin_scale_new (config, prop_name,
prop_descr,
minor_step, major_step, 2);
gimp_spin_scale_set_scale_limits (GIMP_SPIN_SCALE (scale), min, max);
step_increment, page_increment, 2);
gimp_spin_scale_set_scale_limits (GIMP_SPIN_SCALE (scale),
scale_min, scale_max);
gimp_spin_scale_set_gamma (GIMP_SPIN_SCALE (scale), gamma);
gtk_box_pack_start (GTK_BOX (hbox), scale, TRUE, TRUE, 0);
gtk_widget_show (scale);
@ -449,7 +447,7 @@ gimp_paint_options_gui_scale_with_reset_button (GObject *config,
gtk_widget_show (button);
g_signal_connect (button, "clicked",
callback,
reset_callback,
config);
gimp_help_set_help_data (button,