gimp r26799 - in trunk: . app/tools



Author: mitch
Date: Thu Aug 28 12:54:14 2008
New Revision: 26799
URL: http://svn.gnome.org/viewvc/gimp?rev=26799&view=rev

Log:
2008-08-28  Michael Natterer  <mitch gimp org>

	* app/tools/gimprectangletool.c: some tiny formatting fixes.



Modified:
   trunk/ChangeLog
   trunk/app/tools/gimprectangletool.c

Modified: trunk/app/tools/gimprectangletool.c
==============================================================================
--- trunk/app/tools/gimprectangletool.c	(original)
+++ trunk/app/tools/gimprectangletool.c	Thu Aug 28 12:54:14 2008
@@ -97,14 +97,15 @@
   (gimp_rectangle_tool_get_private (GIMP_RECTANGLE_TOOL (obj)))
 
 
-typedef struct
+typedef struct _GimpRectangleToolPrivate GimpRectangleToolPrivate;
+
+struct _GimpRectangleToolPrivate
 {
   /* The following members are "constants", that is, variables that are setup
    * during gimp_rectangle_tool_button_press and then only read.
    */
 
-  /*
-   * Wether or not the rectangle currently being rubber-banded was
+  /* Wether or not the rectangle currently being rubber-banded was
    * created from scatch.
    */
   gboolean                is_new;
@@ -125,7 +126,6 @@
   gboolean                rect_adjusting;
 
 
-
   /* The rest of the members are internal state variables, that is, variables
    * that might change during the manipulation session of the rectangle. Make
    * sure these variables are in consistent states.
@@ -200,7 +200,7 @@
 
   /* Synced with options->guide, only exists for drawing. */
   GimpRectangleGuide      guide;
-} GimpRectangleToolPrivate;
+};
 
 
 static void          gimp_rectangle_tool_iface_base_init      (GimpRectangleToolInterface *iface);
@@ -1064,7 +1064,7 @@
       private->function != GIMP_RECTANGLE_TOOL_EXECUTING)
     {
       gdouble pub_x1, pub_y1, pub_x2, pub_y2;
-      gint w, h;
+      gint    w, h;
 
       gimp_tool_pop_status (tool, display);
 
@@ -1090,8 +1090,8 @@
   if (private->function == GIMP_RECTANGLE_TOOL_CREATING)
     {
       GimpRectangleFunction function = GIMP_RECTANGLE_TOOL_CREATING;
-      gdouble               dx = snapped_x - private->lastx;
-      gdouble               dy = snapped_y - private->lasty;
+      gdouble               dx       = snapped_x - private->lastx;
+      gdouble               dy       = snapped_y - private->lasty;
 
       /* When the user starts to move the cursor, set the current
        * function to one of the corner-grabbed functions, depending on
@@ -1099,27 +1099,27 @@
        */
       if (dx < 0)
         {
-          function = dy < 0 ?
-            GIMP_RECTANGLE_TOOL_RESIZING_UPPER_LEFT :
-            GIMP_RECTANGLE_TOOL_RESIZING_LOWER_LEFT;
+          function = (dy < 0 ?
+                      GIMP_RECTANGLE_TOOL_RESIZING_UPPER_LEFT :
+                      GIMP_RECTANGLE_TOOL_RESIZING_LOWER_LEFT);
         }
       else if (dx > 0)
         {
-          function = dy < 0 ?
-            GIMP_RECTANGLE_TOOL_RESIZING_UPPER_RIGHT :
-            GIMP_RECTANGLE_TOOL_RESIZING_LOWER_RIGHT;
+          function = (dy < 0 ?
+                      GIMP_RECTANGLE_TOOL_RESIZING_UPPER_RIGHT :
+                      GIMP_RECTANGLE_TOOL_RESIZING_LOWER_RIGHT);
         }
       else if (dy < 0)
         {
-          function = dx < 0 ?
-            GIMP_RECTANGLE_TOOL_RESIZING_UPPER_LEFT :
-            GIMP_RECTANGLE_TOOL_RESIZING_UPPER_RIGHT;
+          function = (dx < 0 ?
+                      GIMP_RECTANGLE_TOOL_RESIZING_UPPER_LEFT :
+                      GIMP_RECTANGLE_TOOL_RESIZING_UPPER_RIGHT);
         }
       else if (dy > 0)
         {
-          function = dx < 0 ?
-            GIMP_RECTANGLE_TOOL_RESIZING_LOWER_LEFT :
-            GIMP_RECTANGLE_TOOL_RESIZING_LOWER_RIGHT;
+          function = (dx < 0 ?
+                      GIMP_RECTANGLE_TOOL_RESIZING_LOWER_LEFT :
+                      GIMP_RECTANGLE_TOOL_RESIZING_LOWER_RIGHT);
         }
 
       gimp_rectangle_tool_set_function (rect_tool, function);
@@ -1153,7 +1153,6 @@
   private->lasty = snapped_y;
 
   gimp_draw_tool_resume (GIMP_DRAW_TOOL (tool));
-
 }
 
 void
@@ -1221,7 +1220,6 @@
 
   if (key == GDK_CONTROL_MASK)
     {
-
       g_object_set (options,
                     "fixed-center", ! options_private->fixed_center,
                     NULL);
@@ -1500,7 +1498,7 @@
 
   g_return_if_fail (GIMP_IS_RECTANGLE_TOOL (tool));
 
-  private        = GIMP_RECTANGLE_TOOL_GET_PRIVATE (tool);
+  private   = GIMP_RECTANGLE_TOOL_GET_PRIVATE (tool);
   rect_tool = GIMP_RECTANGLE_TOOL (tool);
 
   if (tool->display != display)
@@ -1764,6 +1762,7 @@
 
   gimp_rectangle_tool_get_public_rect (GIMP_RECTANGLE_TOOL (draw_tool),
                                        &pub_x1, &pub_y1, &pub_x2, &pub_y2);
+
   switch (private->guide)
     {
     case GIMP_RECTANGLE_GUIDE_NONE:
@@ -2174,7 +2173,6 @@
   g_signal_handlers_unblock_by_func (options,
                                      gimp_rectangle_tool_options_notify,
                                      rect_tool);
-
 }
 
 static void



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