Build with GSEAL_ENABLE

This commit is contained in:
Michael Natterer
2009-10-17 19:33:46 +02:00
parent fa21f2da5b
commit fb1fdf49b4
4 changed files with 40 additions and 28 deletions

View File

@ -397,8 +397,8 @@ gimp_color_picker_tool_info_update (GimpColorPickerTool *picker_tool,
gimp_color_frame_set_color (GIMP_COLOR_FRAME (picker_tool->color_frame2), gimp_color_frame_set_color (GIMP_COLOR_FRAME (picker_tool->color_frame2),
sample_type, color, color_index); sample_type, color, color_index);
if (GTK_WIDGET_VISIBLE (picker_tool->dialog)) if (gtk_widget_get_visible (picker_tool->dialog))
gdk_window_show (picker_tool->dialog->window); gdk_window_show (gtk_widget_get_window (picker_tool->dialog));
else else
gtk_widget_show (picker_tool->dialog); gtk_widget_show (picker_tool->dialog);
} }

View File

@ -860,10 +860,15 @@ gimp_levels_tool_config_notify (GObject *object,
! strcmp (pspec->name, "low-input") || ! strcmp (pspec->name, "low-input") ||
! strcmp (pspec->name, "high-input")) ! strcmp (pspec->name, "high-input"))
{ {
tool->low_input->upper = 255; g_object_freeze_notify (G_OBJECT (tool->low_input));
tool->high_input->lower = 0; g_object_freeze_notify (G_OBJECT (tool->high_input));
tool->gamma_linear->lower = 0; g_object_freeze_notify (G_OBJECT (tool->gamma_linear));
tool->gamma_linear->upper = 255;
gtk_adjustment_set_upper (tool->low_input, 255);
gtk_adjustment_set_lower (tool->high_input, 0);
gtk_adjustment_set_lower (tool->gamma_linear, 0);
gtk_adjustment_set_upper (tool->gamma_linear, 255);
gtk_adjustment_set_value (tool->low_input, gtk_adjustment_set_value (tool->low_input,
config->low_input[config->channel] * 255.0); config->low_input[config->channel] * 255.0);
@ -872,13 +877,19 @@ gimp_levels_tool_config_notify (GObject *object,
gtk_adjustment_set_value (tool->high_input, gtk_adjustment_set_value (tool->high_input,
config->high_input[config->channel] * 255.0); config->high_input[config->channel] * 255.0);
tool->low_input->upper = gtk_adjustment_get_value (tool->high_input); gtk_adjustment_set_upper (tool->low_input,
tool->high_input->lower = gtk_adjustment_get_value (tool->low_input); gtk_adjustment_get_value (tool->high_input));
tool->gamma_linear->lower = gtk_adjustment_get_value (tool->low_input); gtk_adjustment_set_lower (tool->high_input,
tool->gamma_linear->upper = gtk_adjustment_get_value (tool->high_input); gtk_adjustment_get_value (tool->low_input));
gtk_adjustment_changed (tool->low_input);
gtk_adjustment_changed (tool->high_input); gtk_adjustment_set_lower (tool->gamma_linear,
gtk_adjustment_changed (tool->gamma_linear); gtk_adjustment_get_value (tool->low_input));
gtk_adjustment_set_upper (tool->gamma_linear,
gtk_adjustment_get_value (tool->high_input));
g_object_thaw_notify (G_OBJECT (tool->low_input));
g_object_thaw_notify (G_OBJECT (tool->high_input));
g_object_thaw_notify (G_OBJECT (tool->gamma_linear));
levels_update_input_bar (tool); levels_update_input_bar (tool);
} }
@ -1055,10 +1066,8 @@ levels_low_input_changed (GtkAdjustment *adjustment,
GimpLevelsConfig *config = tool->config; GimpLevelsConfig *config = tool->config;
gint value = ROUND (gtk_adjustment_get_value (adjustment)); gint value = ROUND (gtk_adjustment_get_value (adjustment));
tool->high_input->lower = value; gtk_adjustment_set_lower (tool->high_input, value);
tool->gamma_linear->lower = value; gtk_adjustment_set_lower (tool->gamma_linear, value);
gtk_adjustment_changed (tool->high_input);
gtk_adjustment_changed (tool->gamma_linear);
if (config->low_input[config->channel] != value / 255.0) if (config->low_input[config->channel] != value / 255.0)
{ {
@ -1094,10 +1103,8 @@ levels_high_input_changed (GtkAdjustment *adjustment,
GimpLevelsConfig *config = tool->config; GimpLevelsConfig *config = tool->config;
gint value = ROUND (gtk_adjustment_get_value (adjustment)); gint value = ROUND (gtk_adjustment_get_value (adjustment));
tool->low_input->upper = value; gtk_adjustment_set_upper (tool->low_input, value);
tool->gamma_linear->upper = value; gtk_adjustment_set_upper (tool->gamma_linear, value);
gtk_adjustment_changed (tool->low_input);
gtk_adjustment_changed (tool->gamma_linear);
if (config->high_input[config->channel] != value / 255.0) if (config->high_input[config->channel] != value / 255.0)
{ {

View File

@ -978,8 +978,8 @@ gimp_measure_tool_dialog_update (GimpMeasureTool *measure,
gtk_label_set_text (GTK_LABEL (measure->unit_label[3]), NULL); gtk_label_set_text (GTK_LABEL (measure->unit_label[3]), NULL);
} }
if (GTK_WIDGET_VISIBLE (measure->dialog)) if (gtk_widget_get_visible (measure->dialog))
gdk_window_show (measure->dialog->window); gdk_window_show (gtk_widget_get_window (measure->dialog));
else else
gtk_widget_show (measure->dialog); gtk_widget_show (measure->dialog);
} }

View File

@ -447,17 +447,22 @@ dynamics_check_button_size_allocate (GtkWidget *toggle,
GtkAllocation *allocation, GtkAllocation *allocation,
GtkWidget *label) GtkWidget *label)
{ {
GtkWidget *fixed = label->parent; GtkWidget *fixed = gtk_widget_get_parent (label);
gint x, y; GtkAllocation label_allocation;
GtkAllocation fixed_allocation;
gint x, y;
gtk_widget_get_allocation (label, &label_allocation);
gtk_widget_get_allocation (fixed, &fixed_allocation);
if (gtk_widget_get_direction (label) == GTK_TEXT_DIR_LTR) if (gtk_widget_get_direction (label) == GTK_TEXT_DIR_LTR)
x = allocation->x; x = allocation->x;
else else
x = allocation->x + allocation->width - label->allocation.width; x = allocation->x + allocation->width - label_allocation.width;
x -= fixed->allocation.x; x -= fixed_allocation.x;
y = fixed->allocation.height - label->allocation.height; y = fixed_allocation.height - label_allocation.height;
gtk_fixed_move (GTK_FIXED (fixed), label, x, y); gtk_fixed_move (GTK_FIXED (fixed), label, x, y);
} }