[gimp] Build with GSEAL_ENABLE



commit fb1fdf49b49b7261bac6e38e793061a8df37769e
Author: Michael Natterer <mitch gimp org>
Date:   Sat Oct 17 19:33:46 2009 +0200

    Build with GSEAL_ENABLE

 app/tools/gimpcolorpickertool.c  |    4 +-
 app/tools/gimplevelstool.c       |   45 ++++++++++++++++++++++----------------
 app/tools/gimpmeasuretool.c      |    4 +-
 app/tools/gimppaintoptions-gui.c |   15 ++++++++----
 4 files changed, 40 insertions(+), 28 deletions(-)
---
diff --git a/app/tools/gimpcolorpickertool.c b/app/tools/gimpcolorpickertool.c
index 5166ef9..9e2f304 100644
--- a/app/tools/gimpcolorpickertool.c
+++ b/app/tools/gimpcolorpickertool.c
@@ -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),
                               sample_type, color, color_index);
 
-  if (GTK_WIDGET_VISIBLE (picker_tool->dialog))
-    gdk_window_show (picker_tool->dialog->window);
+  if (gtk_widget_get_visible (picker_tool->dialog))
+    gdk_window_show (gtk_widget_get_window (picker_tool->dialog));
   else
     gtk_widget_show (picker_tool->dialog);
 }
diff --git a/app/tools/gimplevelstool.c b/app/tools/gimplevelstool.c
index e50fd82..8803fa3 100644
--- a/app/tools/gimplevelstool.c
+++ b/app/tools/gimplevelstool.c
@@ -860,10 +860,15 @@ gimp_levels_tool_config_notify (GObject        *object,
            ! strcmp (pspec->name, "low-input") ||
            ! strcmp (pspec->name, "high-input"))
     {
-      tool->low_input->upper    = 255;
-      tool->high_input->lower   = 0;
-      tool->gamma_linear->lower = 0;
-      tool->gamma_linear->upper = 255;
+      g_object_freeze_notify (G_OBJECT (tool->low_input));
+      g_object_freeze_notify (G_OBJECT (tool->high_input));
+      g_object_freeze_notify (G_OBJECT (tool->gamma_linear));
+
+      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,
                                 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,
                                 config->high_input[config->channel] * 255.0);
 
-      tool->low_input->upper    = gtk_adjustment_get_value (tool->high_input);
-      tool->high_input->lower   = gtk_adjustment_get_value (tool->low_input);
-      tool->gamma_linear->lower = gtk_adjustment_get_value (tool->low_input);
-      tool->gamma_linear->upper = gtk_adjustment_get_value (tool->high_input);
-      gtk_adjustment_changed (tool->low_input);
-      gtk_adjustment_changed (tool->high_input);
-      gtk_adjustment_changed (tool->gamma_linear);
+      gtk_adjustment_set_upper (tool->low_input,
+                                gtk_adjustment_get_value (tool->high_input));
+      gtk_adjustment_set_lower (tool->high_input,
+                                gtk_adjustment_get_value (tool->low_input));
+
+      gtk_adjustment_set_lower (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);
     }
@@ -1055,10 +1066,8 @@ levels_low_input_changed (GtkAdjustment  *adjustment,
   GimpLevelsConfig *config = tool->config;
   gint              value  = ROUND (gtk_adjustment_get_value (adjustment));
 
-  tool->high_input->lower   = value;
-  tool->gamma_linear->lower = value;
-  gtk_adjustment_changed (tool->high_input);
-  gtk_adjustment_changed (tool->gamma_linear);
+  gtk_adjustment_set_lower (tool->high_input, value);
+  gtk_adjustment_set_lower (tool->gamma_linear, value);
 
   if (config->low_input[config->channel] != value / 255.0)
     {
@@ -1094,10 +1103,8 @@ levels_high_input_changed (GtkAdjustment  *adjustment,
   GimpLevelsConfig *config = tool->config;
   gint              value  = ROUND (gtk_adjustment_get_value (adjustment));
 
-  tool->low_input->upper    = value;
-  tool->gamma_linear->upper = value;
-  gtk_adjustment_changed (tool->low_input);
-  gtk_adjustment_changed (tool->gamma_linear);
+  gtk_adjustment_set_upper (tool->low_input, value);
+  gtk_adjustment_set_upper (tool->gamma_linear, value);
 
   if (config->high_input[config->channel] != value / 255.0)
     {
diff --git a/app/tools/gimpmeasuretool.c b/app/tools/gimpmeasuretool.c
index 7b9c4bb..45529dd 100644
--- a/app/tools/gimpmeasuretool.c
+++ b/app/tools/gimpmeasuretool.c
@@ -978,8 +978,8 @@ gimp_measure_tool_dialog_update (GimpMeasureTool *measure,
           gtk_label_set_text (GTK_LABEL (measure->unit_label[3]), NULL);
         }
 
-      if (GTK_WIDGET_VISIBLE (measure->dialog))
-        gdk_window_show (measure->dialog->window);
+      if (gtk_widget_get_visible (measure->dialog))
+        gdk_window_show (gtk_widget_get_window (measure->dialog));
       else
         gtk_widget_show (measure->dialog);
     }
diff --git a/app/tools/gimppaintoptions-gui.c b/app/tools/gimppaintoptions-gui.c
index 3dd34ca..e837e19 100644
--- a/app/tools/gimppaintoptions-gui.c
+++ b/app/tools/gimppaintoptions-gui.c
@@ -447,17 +447,22 @@ dynamics_check_button_size_allocate (GtkWidget     *toggle,
                                      GtkAllocation *allocation,
                                      GtkWidget     *label)
 {
-  GtkWidget *fixed = label->parent;
-  gint       x, y;
+  GtkWidget     *fixed = gtk_widget_get_parent (label);
+  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)
     x = allocation->x;
   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);
 }



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]