[gimp/gimp-2-10] app: in the warp tool, blink stroke frame when no events are selected



commit 6f4e233cf026ef02d993d993ab16619cb3f70dd9
Author: Ell <ell_se yahoo com>
Date:   Wed Dec 12 10:51:04 2018 -0500

    app: in the warp tool, blink stroke frame when no events are selected
    
    In the warp tool, when no stroke events are selected, blink the
    stroke frame widget in the tool options, in addition to showing an
    error message in the status bar, to hint at the source of the
    error.
    
    (cherry picked from commit 17cc44a7be4557e15b9ddc0fb5d1023178201364)

 app/tools/gimpwarpoptions.c | 2 ++
 app/tools/gimpwarpoptions.h | 1 +
 app/tools/gimpwarptool.c    | 2 ++
 3 files changed, 5 insertions(+)
---
diff --git a/app/tools/gimpwarpoptions.c b/app/tools/gimpwarpoptions.c
index 4abdd43169..1a585b56e4 100644
--- a/app/tools/gimpwarpoptions.c
+++ b/app/tools/gimpwarpoptions.c
@@ -340,6 +340,8 @@ gimp_warp_options_gui (GimpToolOptions *tool_options)
   gtk_box_pack_start (GTK_BOX (vbox), frame, FALSE, FALSE, 0);
   gtk_widget_show (frame);
 
+  options->stroke_frame = frame;
+
   vbox2 = gtk_box_new (GTK_ORIENTATION_VERTICAL, 2);
   gtk_container_add (GTK_CONTAINER (frame), vbox2);
   gtk_widget_show (vbox2);
diff --git a/app/tools/gimpwarpoptions.h b/app/tools/gimpwarpoptions.h
index 7f14e676b6..c81894255e 100644
--- a/app/tools/gimpwarpoptions.h
+++ b/app/tools/gimpwarpoptions.h
@@ -55,6 +55,7 @@ struct _GimpWarpOptions
   gint                   n_animation_frames;
 
   /*  options gui  */
+  GtkWidget             *stroke_frame;
   GtkWidget             *animate_button;
 };
 
diff --git a/app/tools/gimpwarptool.c b/app/tools/gimpwarptool.c
index 2e4db55aa6..c092f43297 100644
--- a/app/tools/gimpwarptool.c
+++ b/app/tools/gimpwarptool.c
@@ -655,6 +655,8 @@ gimp_warp_tool_can_stroke (GimpWarpTool *wt,
         {
           gimp_tool_message_literal (tool, display,
                                      _("No stroke events selected."));
+
+          gimp_widget_blink (options->stroke_frame);
         }
 
       return FALSE;


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