PLUGINS: Adds UI consistence to jpeg-save dialog. Fixes #747054
This commit is contained in:
@ -123,6 +123,8 @@ static void subsampling_changed (GtkWidget *combo,
|
|||||||
GtkObject *entry);
|
GtkObject *entry);
|
||||||
static void quality_changed (GtkObject *scale_entry,
|
static void quality_changed (GtkObject *scale_entry,
|
||||||
GtkWidget *toggle);
|
GtkWidget *toggle);
|
||||||
|
static void subsampling_changed2 (GtkObject *combo,
|
||||||
|
GtkWidget *toggle);
|
||||||
static void use_orig_qual_changed (GtkWidget *toggle,
|
static void use_orig_qual_changed (GtkWidget *toggle,
|
||||||
GtkObject *scale_entry);
|
GtkObject *scale_entry);
|
||||||
static void use_orig_qual_changed2 (GtkWidget *toggle,
|
static void use_orig_qual_changed2 (GtkWidget *toggle,
|
||||||
@ -1040,7 +1042,9 @@ save_dialog (void)
|
|||||||
|
|
||||||
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (toggle),
|
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (toggle),
|
||||||
jsvals.use_orig_quality
|
jsvals.use_orig_quality
|
||||||
&& (orig_quality > 0));
|
&& (orig_quality > 0)
|
||||||
|
&& (orig_subsmp == jsvals.subsmp)
|
||||||
|
);
|
||||||
gtk_widget_set_sensitive (toggle, (orig_quality > 0));
|
gtk_widget_set_sensitive (toggle, (orig_quality > 0));
|
||||||
|
|
||||||
/* changing quality disables custom quantization tables, and vice-versa */
|
/* changing quality disables custom quantization tables, and vice-versa */
|
||||||
@ -1080,7 +1084,9 @@ save_dialog (void)
|
|||||||
jsvals.subsmp,
|
jsvals.subsmp,
|
||||||
G_CALLBACK (subsampling_changed),
|
G_CALLBACK (subsampling_changed),
|
||||||
entry);
|
entry);
|
||||||
|
g_signal_connect (pg.subsmp, "changed",
|
||||||
|
G_CALLBACK (subsampling_changed2),
|
||||||
|
pg.use_orig_quality);
|
||||||
g_signal_connect (pg.use_orig_quality, "toggled",
|
g_signal_connect (pg.use_orig_quality, "toggled",
|
||||||
G_CALLBACK (use_orig_qual_changed2),
|
G_CALLBACK (use_orig_qual_changed2),
|
||||||
pg.subsmp);
|
pg.subsmp);
|
||||||
@ -1400,6 +1406,16 @@ quality_changed (GtkObject *scale_entry,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
subsampling_changed2 (GtkObject *combo,
|
||||||
|
GtkWidget *toggle)
|
||||||
|
{
|
||||||
|
if (jsvals.use_orig_quality && orig_subsmp != jsvals.subsmp)
|
||||||
|
{
|
||||||
|
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (toggle), FALSE);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
use_orig_qual_changed (GtkWidget *toggle,
|
use_orig_qual_changed (GtkWidget *toggle,
|
||||||
GtkObject *scale_entry)
|
GtkObject *scale_entry)
|
||||||
|
Reference in New Issue
Block a user