Commit efd6c905 authored by Michael Natterer's avatar Michael Natterer 😴

plug-ins: remove calls to gtk_range_set_update_policy() where useless

either because we were setting the default value, or because there is
already a delay in the callback code like calling gimp_preview_update().
parent 413dc033
......@@ -276,7 +276,6 @@ exchange_dialog (GimpDrawable *drawable)
GtkWidget *table;
GtkWidget *threshold;
GtkWidget *colorbutton;
GtkWidget *scale;
GtkObject *adj;
GtkSizeGroup *group;
gint framenumber;
......@@ -428,8 +427,6 @@ exchange_dialog (GimpDrawable *drawable)
G_CALLBACK (gimp_preview_invalidate),
preview);
scale = GTK_WIDGET (GIMP_SCALE_ENTRY_SCALE (adj));
gtk_range_set_update_policy (GTK_RANGE (scale), GTK_UPDATE_DELAYED);
gtk_size_group_add_widget (group, GIMP_SCALE_ENTRY_LABEL (adj));
if (! framenumber)
......@@ -454,8 +451,6 @@ exchange_dialog (GimpDrawable *drawable)
G_CALLBACK (gimp_preview_invalidate),
preview);
scale = GTK_WIDGET (GIMP_SCALE_ENTRY_SCALE (adj));
gtk_range_set_update_policy (GTK_RANGE (scale), GTK_UPDATE_DELAYED);
gtk_size_group_add_widget (group, GIMP_SCALE_ENTRY_LABEL (adj));
}
......@@ -488,8 +483,6 @@ exchange_dialog (GimpDrawable *drawable)
G_CALLBACK (gimp_preview_invalidate),
preview);
scale = GTK_WIDGET (GIMP_SCALE_ENTRY_SCALE (adj));
gtk_range_set_update_policy (GTK_RANGE (scale), GTK_UPDATE_DELAYED);
gtk_size_group_add_widget (group, GIMP_SCALE_ENTRY_LABEL (adj));
if (! framenumber)
......@@ -514,9 +507,6 @@ exchange_dialog (GimpDrawable *drawable)
G_CALLBACK (gimp_preview_invalidate),
preview);
scale = GTK_WIDGET (GIMP_SCALE_ENTRY_SCALE (adj));
gtk_range_set_update_policy (GTK_RANGE (scale), GTK_UPDATE_DELAYED);
gtk_size_group_add_widget (group, GIMP_SCALE_ENTRY_LABEL (adj));
}
......@@ -549,8 +539,6 @@ exchange_dialog (GimpDrawable *drawable)
G_CALLBACK (gimp_preview_invalidate),
preview);
scale = GTK_WIDGET (GIMP_SCALE_ENTRY_SCALE (adj));
gtk_range_set_update_policy (GTK_RANGE (scale), GTK_UPDATE_DELAYED);
gtk_size_group_add_widget (group, GIMP_SCALE_ENTRY_LABEL (adj));
if (! framenumber)
......@@ -575,8 +563,6 @@ exchange_dialog (GimpDrawable *drawable)
G_CALLBACK (gimp_preview_invalidate),
preview);
scale = GTK_WIDGET (GIMP_SCALE_ENTRY_SCALE (adj));
gtk_range_set_update_policy (GTK_RANGE (scale), GTK_UPDATE_DELAYED);
gtk_size_group_add_widget (group, GIMP_SCALE_ENTRY_LABEL (adj));
}
......
......@@ -276,7 +276,6 @@ retinex_dialog (GimpDrawable *drawable)
GtkWidget *preview;
GtkWidget *table;
GtkWidget *combo;
GtkWidget *scale;
GtkObject *adj;
gboolean run;
......@@ -340,8 +339,6 @@ retinex_dialog (GimpDrawable *drawable)
rvals.scale,
MIN_GAUSSIAN_SCALE, MAX_GAUSSIAN_SCALE, 1, 1, 0,
TRUE, 0, 0, NULL, NULL);
scale = GIMP_SCALE_ENTRY_SCALE (adj);
gtk_range_set_update_policy (GTK_RANGE (scale), GTK_UPDATE_DISCONTINUOUS);
g_signal_connect (adj, "value-changed",
G_CALLBACK (gimp_int_adjustment_update),
......@@ -355,8 +352,6 @@ retinex_dialog (GimpDrawable *drawable)
rvals.nscales,
0, MAX_RETINEX_SCALES, 1, 1, 0,
TRUE, 0, 0, NULL, NULL);
scale = GIMP_SCALE_ENTRY_SCALE (adj);
gtk_range_set_update_policy (GTK_RANGE (scale), GTK_UPDATE_DISCONTINUOUS);
g_signal_connect (adj, "value-changed",
G_CALLBACK (gimp_int_adjustment_update),
......@@ -369,8 +364,6 @@ retinex_dialog (GimpDrawable *drawable)
_("Dy_namic:"), SCALE_WIDTH, ENTRY_WIDTH,
rvals.cvar, 0, 4, 0.1, 0.1, 1,
TRUE, 0, 0, NULL, NULL);
scale = GIMP_SCALE_ENTRY_SCALE (adj);
gtk_range_set_update_policy (GTK_RANGE (scale), GTK_UPDATE_DISCONTINUOUS);
g_signal_connect (adj, "value-changed",
G_CALLBACK (gimp_float_adjustment_update),
......
......@@ -1403,7 +1403,6 @@ mng_save_dialog (gint32 image_id)
gtk_widget_set_size_request (scale, SCALE_WIDTH, -1);
gtk_scale_set_value_pos (GTK_SCALE (scale), GTK_POS_TOP);
gtk_scale_set_digits (GTK_SCALE (scale), 0);
gtk_range_set_update_policy (GTK_RANGE (scale), GTK_UPDATE_DELAYED);
gimp_table_attach_aligned (GTK_TABLE (table), 0, 2,
_("PNG compression level:"), 0.0, 0.9,
scale, 1, FALSE);
......@@ -1424,7 +1423,6 @@ mng_save_dialog (gint32 image_id)
gtk_widget_set_size_request (scale, SCALE_WIDTH, -1);
gtk_scale_set_value_pos (GTK_SCALE (scale), GTK_POS_TOP);
gtk_scale_set_digits (GTK_SCALE (scale), 2);
gtk_range_set_update_policy (GTK_RANGE (scale), GTK_UPDATE_DELAYED);
gtk_widget_set_sensitive (scale, FALSE);
gimp_table_attach_aligned (GTK_TABLE (table), 0, 3,
_("JPEG compression quality:"), 0.0, 0.9,
......@@ -1441,7 +1439,6 @@ mng_save_dialog (gint32 image_id)
gtk_widget_set_size_request (scale, SCALE_WIDTH, -1);
gtk_scale_set_value_pos (GTK_SCALE (scale), GTK_POS_TOP);
gtk_scale_set_digits (GTK_SCALE (scale), 2);
gtk_range_set_update_policy (GTK_RANGE (scale), GTK_UPDATE_DELAYED);
gtk_widget_set_sensitive (scale, FALSE);
gimp_table_attach_aligned (GTK_TABLE (table), 0, 4,
_("JPEG smoothing factor:"), 0.0, 0.9,
......
......@@ -1404,7 +1404,6 @@ fp_advanced_dialog (GtkWidget *parent)
gtk_widget_set_size_request (scale, 200, -1);
gtk_scale_set_digits (GTK_SCALE (scale), 2);
gtk_scale_set_value_pos (GTK_SCALE (scale), GTK_POS_TOP);
gtk_range_set_update_policy (GTK_RANGE (scale), 0);
gtk_box_pack_start (GTK_BOX (vbox), scale, FALSE, FALSE, 0);
gtk_widget_show (scale);
......@@ -1432,7 +1431,6 @@ fp_advanced_dialog (GtkWidget *parent)
gtk_widget_set_size_request (scale, 100, -1);
gtk_scale_set_digits (GTK_SCALE (scale), 0);
gtk_scale_set_value_pos (GTK_SCALE (scale), GTK_POS_TOP);
gtk_range_set_update_policy (GTK_RANGE (scale), 0);
gtk_widget_show (scale);
g_signal_connect (smoothnessData, "value-changed",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment