[gimp] app: fixes for previously contributed commit.



commit 3fa21278544dfcca3076e10baba052330b283a49
Author: Jehan <jehan girinstud io>
Date:   Tue Jul 18 13:23:23 2017 +0200

    app: fixes for previously contributed commit.
    
    - trailing whitespaces cleaned out;
    - vectors are called "path" in all visible strings;
    - do not check for floating selection and active channel: oppositely to
      layers, a vector can be selected in the same time as a channel, and
      while there is a floating selection.

 app/actions/vectors-actions.c  |   40 ++++++++++++++++++----------------------
 app/actions/vectors-commands.c |    2 +-
 app/actions/vectors-commands.h |    2 +-
 app/widgets/gimphelp-ids.h     |    9 ++++-----
 4 files changed, 24 insertions(+), 29 deletions(-)
---
diff --git a/app/actions/vectors-actions.c b/app/actions/vectors-actions.c
index a703eae..4d7a901 100644
--- a/app/actions/vectors-actions.c
+++ b/app/actions/vectors-actions.c
@@ -301,28 +301,28 @@ static const GimpEnumActionEntry vectors_selection_to_vectors_actions[] =
 static const GimpEnumActionEntry vectors_select_actions[] =
 {
   { "vectors-select-top", NULL,
-    NC_("vectors-action", "Select _Top Vectors"), NULL,
-    NC_("vectors-action", "Select the topmost vector"),
+    NC_("vectors-action", "Select _Top Path"), NULL,
+    NC_("vectors-action", "Select the topmost path"),
     GIMP_ACTION_SELECT_FIRST, FALSE,
-    GIMP_HELP_VECTORS_TOP },
+    GIMP_HELP_PATH_TOP },
 
   { "vectors-select-bottom", NULL,
-    NC_("vectors-action", "Select _Bottom Vectors"), NULL,
-    NC_("vectors-action", "Select the bottommost vector"),
+    NC_("vectors-action", "Select _Bottom Path"), NULL,
+    NC_("vectors-action", "Select the bottommost path"),
     GIMP_ACTION_SELECT_LAST, FALSE,
-    GIMP_HELP_VECTORS_BOTTOM },
+    GIMP_HELP_PATH_BOTTOM },
 
   { "vectors-select-previous", NULL,
-    NC_("vectors-action", "Select _Previous Vectors"), NULL,
-    NC_("vectors-action", "Select the vector above the current vector"),
+    NC_("vectors-action", "Select _Previous Path"), NULL,
+    NC_("vectors-action", "Select the path above the current path"),
     GIMP_ACTION_SELECT_PREVIOUS, FALSE,
-    GIMP_HELP_VECTORS_PREVIOUS },
+    GIMP_HELP_PATH_PREVIOUS },
 
   { "vectors-select-next", NULL,
-    NC_("vectors-action", "Select _Next Vector"), NULL,
-    NC_("vectors-action", "Select the vector below the current vector"),
+    NC_("vectors-action", "Select _Next Path"), NULL,
+    NC_("vectors-action", "Select the vector below the current path"),
     GIMP_ACTION_SELECT_NEXT, FALSE,
-    GIMP_HELP_VECTORS_NEXT }
+    GIMP_HELP_PATH_NEXT }
 };
 
 void
@@ -355,7 +355,7 @@ vectors_actions_setup (GimpActionGroup *group)
                                       vectors_select_actions,
                                       G_N_ELEMENTS (vectors_select_actions),
                                       G_CALLBACK (vectors_select_cmd_callback));
-                                      
+
   items_actions_setup (group, "vectors");
 }
 
@@ -372,13 +372,9 @@ vectors_actions_update (GimpActionGroup *group,
   gboolean      dr_children   = FALSE;
   GList        *next          = NULL;
   GList        *prev          = NULL;
-  gboolean      fs            = FALSE;    /*  floating sel           */
-  gboolean      ac            = FALSE;    /*  active channel         */
 
   if (image)
     {
-      fs      = (gimp_image_get_floating_selection (image) != NULL);
-      ac      = (gimp_image_get_active_channel (image) != NULL);
       n_vectors  = gimp_image_get_n_vectors (image);
       mask_empty = gimp_channel_is_empty (gimp_image_get_mask (image));
 
@@ -455,12 +451,12 @@ vectors_actions_update (GimpActionGroup *group,
   SET_SENSITIVE ("vectors-selection-from-vectors", vectors);
   SET_SENSITIVE ("vectors-selection-add",          vectors);
   SET_SENSITIVE ("vectors-selection-subtract",     vectors);
-  SET_SENSITIVE ("vectors-selection-intersect",    vectors);  
+  SET_SENSITIVE ("vectors-selection-intersect",    vectors);
 
-  SET_SENSITIVE ("vectors-select-top",       vectors && !fs && !ac && prev);
-  SET_SENSITIVE ("vectors-select-bottom",    vectors && !fs && !ac && next);
-  SET_SENSITIVE ("vectors-select-previous",  vectors && !fs && !ac && prev);
-  SET_SENSITIVE ("vectors-select-next",      vectors && !fs && !ac && next);
+  SET_SENSITIVE ("vectors-select-top",       vectors && prev);
+  SET_SENSITIVE ("vectors-select-bottom",    vectors && next);
+  SET_SENSITIVE ("vectors-select-previous",  vectors && prev);
+  SET_SENSITIVE ("vectors-select-next",      vectors && next);
 
 #undef SET_SENSITIVE
 #undef SET_ACTIVE
diff --git a/app/actions/vectors-commands.c b/app/actions/vectors-commands.c
index 4b5207e..d29f4e4 100644
--- a/app/actions/vectors-commands.c
+++ b/app/actions/vectors-commands.c
@@ -855,4 +855,4 @@ vectors_select_cmd_callback (GtkAction *action,
       gimp_image_set_active_vectors (image, new_vectors);
       gimp_image_flush (image);
     }
-}
\ No newline at end of file
+}
diff --git a/app/actions/vectors-commands.h b/app/actions/vectors-commands.h
index ca88480..43f65bc 100644
--- a/app/actions/vectors-commands.h
+++ b/app/actions/vectors-commands.h
@@ -84,5 +84,5 @@ void   vectors_color_tag_cmd_callback            (GtkAction   *action,
 void   vectors_select_cmd_callback               (GtkAction   *action,
                                                   gint         value,
                                                   gpointer     data);
-                                                  
+
 #endif /* __VECTORS_COMMANDS_H__ */
diff --git a/app/widgets/gimphelp-ids.h b/app/widgets/gimphelp-ids.h
index c63585c..6a36014 100644
--- a/app/widgets/gimphelp-ids.h
+++ b/app/widgets/gimphelp-ids.h
@@ -222,11 +222,6 @@
 #define GIMP_HELP_LAYER_CROP                      "gimp-layer-crop"
 #define GIMP_HELP_LAYER_EDIT                      "gimp-layer-edit"
 
-#define GIMP_HELP_VECTORS_PREVIOUS                "gimp-vector-previous"
-#define GIMP_HELP_VECTORS_NEXT                    "gimp-vector-next"
-#define GIMP_HELP_VECTORS_TOP                     "gimp-vector-top"
-#define GIMP_HELP_VECTORS_BOTTOM                  "gimp-vector-bottom"
-
 #define GIMP_HELP_CHANNEL_DIALOG                  "gimp-channel-dialog"
 #define GIMP_HELP_CHANNEL_NEW                     "gimp-channel-new"
 #define GIMP_HELP_CHANNEL_RAISE                   "gimp-channel-raise"
@@ -253,6 +248,10 @@
 
 #define GIMP_HELP_PATH_DIALOG                     "gimp-path-dialog"
 #define GIMP_HELP_PATH_NEW                        "gimp-path-new"
+#define GIMP_HELP_PATH_PREVIOUS                   "gimp-path-previous"
+#define GIMP_HELP_PATH_NEXT                       "gimp-path-next"
+#define GIMP_HELP_PATH_TOP                        "gimp-path-top"
+#define GIMP_HELP_PATH_BOTTOM                     "gimp-path-bottom"
 #define GIMP_HELP_PATH_RAISE                      "gimp-path-raise"
 #define GIMP_HELP_PATH_RAISE_TO_TOP               "gimp-path-raise-to-top"
 #define GIMP_HELP_PATH_LOWER                      "gimp-path-lower"


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