[gimp/soc-2011-gimpunitentry: 68/68] foo



commit c9a727fd48ecf6d1980973ebd8d118b61c4211ca
Author: Michael Natterer <mitch gimp org>
Date:   Sat May 25 22:33:06 2013 +0200

    foo

 app/dialogs/image-new-dialog.c    |   10 ++++++----
 app/tools/gimprotatetool.c        |   10 +++++-----
 app/widgets/gimptextstyleeditor.c |   17 +++++++++++------
 3 files changed, 22 insertions(+), 15 deletions(-)
---
diff --git a/app/dialogs/image-new-dialog.c b/app/dialogs/image-new-dialog.c
index bfc871d..73efb5c 100644
--- a/app/dialogs/image-new-dialog.c
+++ b/app/dialogs/image-new-dialog.c
@@ -80,10 +80,12 @@ static void   image_new_create_image     (ImageNewDialog *dialog);
 GtkWidget *
 image_new_dialog_new (GimpContext *context)
 {
-  ImageNewDialog      *dialog;
-  GtkWidget           *main_vbox;
-  GtkWidget           *table;
-  GimpUnitEntries     *unit_entries;
+  ImageNewDialog  *dialog;
+  GtkWidget       *main_vbox;
+  GtkWidget       *hbox;
+  GtkWidget       *label;
+  GtkWidget       *table;
+  GimpUnitEntries *unit_entries;
 
   g_return_val_if_fail (GIMP_IS_CONTEXT (context), NULL);
 
diff --git a/app/tools/gimprotatetool.c b/app/tools/gimprotatetool.c
index c0b3984..6502a08 100644
--- a/app/tools/gimprotatetool.c
+++ b/app/tools/gimprotatetool.c
@@ -226,9 +226,9 @@ gimp_rotate_tool_dialog_update (GimpTransformTool *tr_tool)
                                    rotate_center_changed,
                                    tr_tool);
 
-  gimp_unit_entries_set_pixels (rotate->unit_entries, 
-                                "center_x", (gdouble) tr_tool->trans_info[CENTER_X],
-                                "center_y", (gdouble) tr_tool->trans_info[CENTER_Y],
+  gimp_unit_entries_set_pixels (rotate->unit_entries,
+                                "center_x", (gdouble) tr_tool->trans_info[PIVOT_X],
+                                "center_y", (gdouble) tr_tool->trans_info[PIVOT_Y],
                                 NULL);
 
   g_signal_handlers_unblock_by_func (rotate->unit_entries,
@@ -397,8 +397,8 @@ rotate_center_changed (GObject           *entries,
                        GtkWidget         *widget,
                        GimpTransformTool *tr_tool)
 {
-  gdouble cx = gimp_unit_entries_get_pixels (GIMP_UNIT_ENTRIES (entries), "center_x");
-  gdouble cy = gimp_unit_entries_get_pixels (GIMP_UNIT_ENTRIES (entries), "center_y");
+  gdouble px = gimp_unit_entries_get_pixels (GIMP_UNIT_ENTRIES (entries), "center_x");
+  gdouble py = gimp_unit_entries_get_pixels (GIMP_UNIT_ENTRIES (entries), "center_y");
 
   if ((px != tr_tool->trans_info[PIVOT_X]) ||
       (py != tr_tool->trans_info[PIVOT_Y]))
diff --git a/app/widgets/gimptextstyleeditor.c b/app/widgets/gimptextstyleeditor.c
index 0831edf..0359104 100644
--- a/app/widgets/gimptextstyleeditor.c
+++ b/app/widgets/gimptextstyleeditor.c
@@ -297,6 +297,7 @@ static void
 gimp_text_style_editor_constructed (GObject *object)
 {
   GimpTextStyleEditor *editor = GIMP_TEXT_STYLE_EDITOR (object);
+  GimpUnitAdjustment  *adjustment;
 
   G_OBJECT_CLASS (parent_class)->constructed (object);
 
@@ -311,8 +312,9 @@ gimp_text_style_editor_constructed (GObject *object)
                     G_CALLBACK (gimp_text_style_editor_font_changed),
                     editor);
 
-  gimp_size_entry_set_resolution (GIMP_SIZE_ENTRY (editor->size_entry), 0,
-                                  editor->resolution_y, TRUE);
+  adjustment =
+    gimp_unit_entry_get_adjustment (GIMP_UNIT_ENTRY (editor->unit_entry));
+  gimp_unit_adjustment_set_resolution (adjustment, editor->resolution_y);
 
   /* use the global user context so we get the global FG/BG colors */
   gimp_color_panel_set_context (GIMP_COLOR_PANEL (editor->color_button),
@@ -462,9 +464,12 @@ gimp_text_style_editor_set_property (GObject      *object,
       break;
     case PROP_RESOLUTION_Y:
       editor->resolution_y = g_value_get_double (value);
-      if (editor->size_entry)
-        gimp_size_entry_set_resolution (GIMP_SIZE_ENTRY (editor->size_entry), 0,
-                                        editor->resolution_y, TRUE);
+      if (editor->unit_entry)
+        {
+          GimpUnitAdjustment *adjustment =
+            gimp_unit_entry_get_adjustment (GIMP_UNIT_ENTRY (editor->unit_entry));
+          gimp_unit_adjustment_set_resolution (adjustment, editor->resolution_y);
+        }
       break;
 
     default:
@@ -568,7 +573,7 @@ gimp_text_style_editor_list_tags (GimpTextStyleEditor  *editor,
     for (list = editor->buffer->size_tags; list; list = g_list_next (list))
       *remove_tags = g_list_prepend (*remove_tags, list->data);
 
-    pixels = gimp_size_entry_get_refval (GIMP_SIZE_ENTRY (editor->size_entry), 0);
+    pixels = gimp_unit_entry_get_pixels (GIMP_UNIT_ENTRY (editor->unit_entry));
 
     if (pixels != 0.0)
       {


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