[gimp] app: rename selection member "hidden" to "show_selection"



commit 71a50bc58a29b98d16a55d9f0ff1404f1242cfff
Author: Michael Natterer <mitch gimp org>
Date:   Sat Oct 9 12:55:11 2010 +0200

    app: rename selection member "hidden" to "show_selection"
    
    and invert its meaning. This has confused me long enough now...

 app/display/gimpdisplayshell-appearance.c |    2 +-
 app/display/gimpdisplayshell-selection.c  |   18 +++++++++---------
 app/display/gimpdisplayshell-selection.h  |   12 ++++++------
 3 files changed, 16 insertions(+), 16 deletions(-)
---
diff --git a/app/display/gimpdisplayshell-appearance.c b/app/display/gimpdisplayshell-appearance.c
index 2e2ef77..233bf10 100644
--- a/app/display/gimpdisplayshell-appearance.c
+++ b/app/display/gimpdisplayshell-appearance.c
@@ -232,7 +232,7 @@ gimp_display_shell_set_show_selection (GimpDisplayShell *shell,
 
   g_object_set (options, "show-selection", show, NULL);
 
-  gimp_display_shell_selection_set_hidden (shell, ! show);
+  gimp_display_shell_selection_set_show (shell, show);
 
   appearance_set_action_active (shell, "view-show-selection", show);
 }
diff --git a/app/display/gimpdisplayshell-selection.c b/app/display/gimpdisplayshell-selection.c
index 103fd0e..72533a8 100644
--- a/app/display/gimpdisplayshell-selection.c
+++ b/app/display/gimpdisplayshell-selection.c
@@ -54,7 +54,7 @@ struct _Selection
   guint             index;            /*  index of current stipple pattern  */
   gint              paused;           /*  count of pause requests           */
   gboolean          shell_visible;    /*  visility of the display shell     */
-  gboolean          hidden;           /*  is the selection hidden?          */
+  gboolean          show_selection;   /*  is the selection visible?         */
   guint             timeout;          /*  timer for successive draws        */
   cairo_pattern_t  *segs_in_mask;     /*  cache for rendered segments       */
 };
@@ -103,9 +103,9 @@ gimp_display_shell_selection_init (GimpDisplayShell *shell)
 
   selection = g_slice_new0 (Selection);
 
-  selection->shell         = shell;
-  selection->shell_visible = TRUE;
-  selection->hidden        = ! gimp_display_shell_get_show_selection (shell);
+  selection->shell          = shell;
+  selection->shell_visible  = TRUE;
+  selection->show_selection = gimp_display_shell_get_show_selection (shell);
 
   shell->selection = selection;
 
@@ -180,8 +180,8 @@ gimp_display_shell_selection_control (GimpDisplayShell     *shell,
 }
 
 void
-gimp_display_shell_selection_set_hidden (GimpDisplayShell *shell,
-                                         gboolean          hidden)
+gimp_display_shell_selection_set_show (GimpDisplayShell *shell,
+                                       gboolean          show)
 {
   g_return_if_fail (GIMP_IS_DISPLAY_SHELL (shell));
 
@@ -189,11 +189,11 @@ gimp_display_shell_selection_set_hidden (GimpDisplayShell *shell,
     {
       Selection *selection = shell->selection;
 
-      if (hidden != selection->hidden)
+      if (show != selection->show_selection)
         {
           selection_undraw (selection);
 
-          selection->hidden = hidden;
+          selection->show_selection = show;
 
           selection_start (selection);
         }
@@ -425,7 +425,7 @@ selection_start_timeout (Selection *selection)
   selection->index = 0;
 
   /*  Draw the ants  */
-  if (! selection->hidden)
+  if (selection->show_selection)
     {
       GimpDisplayConfig *config = selection->shell->display->config;
 
diff --git a/app/display/gimpdisplayshell-selection.h b/app/display/gimpdisplayshell-selection.h
index 3289eb0..f1bcb35 100644
--- a/app/display/gimpdisplayshell-selection.h
+++ b/app/display/gimpdisplayshell-selection.h
@@ -19,14 +19,14 @@
 #define __GIMP_DISPLAY_SHELL_SELECTION_H__
 
 
-void   gimp_display_shell_selection_init       (GimpDisplayShell     *shell);
-void   gimp_display_shell_selection_free       (GimpDisplayShell     *shell);
+void   gimp_display_shell_selection_init     (GimpDisplayShell     *shell);
+void   gimp_display_shell_selection_free     (GimpDisplayShell     *shell);
 
-void   gimp_display_shell_selection_control    (GimpDisplayShell     *shell,
-                                                GimpSelectionControl  control);
+void   gimp_display_shell_selection_control  (GimpDisplayShell     *shell,
+                                              GimpSelectionControl  control);
 
-void   gimp_display_shell_selection_set_hidden (GimpDisplayShell     *shell,
-                                                gboolean              hidden);
+void   gimp_display_shell_selection_set_show (GimpDisplayShell     *shell,
+                                              gboolean              show);
 
 
 #endif  /*  __GIMP_DISPLAY_SHELL_SELECTION_H__  */



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