Code

Modified filter rendering area handling to better accommodate upcoming feOffset
[inkscape.git] / src / dialogs / fill-style.cpp
index 1efae59e1a56da5c1ffc20843f6618d0cac78b76..9933887f31f6e7f9d0e045e308c2339c6514ded6 100644 (file)
@@ -34,6 +34,8 @@
 #include <inkscape.h>
 #include <document-private.h>
 #include <xml/repr.h>
+#include <glibmm/i18n.h>
+#include <display/sp-canvas.h>
 
 
 // These can be deleted once we sort out the libart dependence.
@@ -285,7 +287,8 @@ sp_fill_style_widget_fillrule_changed ( SPPaintSelector *psel,
 
     sp_repr_css_attr_unref (css);
 
-    sp_document_done (SP_ACTIVE_DOCUMENT);
+    sp_document_done (SP_ACTIVE_DOCUMENT, SP_VERB_DIALOG_FILL_STROKE, 
+                      _("Change fill rule"));
 }
 
 static gchar *undo_label_1 = "fill:flatcolor:1";
@@ -324,7 +327,8 @@ sp_fill_style_widget_paint_dragged (SPPaintSelector *psel, SPWidget *spw)
         case SP_PAINT_SELECTOR_MODE_COLOR_CMYK:
         {
             sp_paint_selector_set_flat_color (psel, SP_ACTIVE_DESKTOP, "fill", "fill-opacity");
-            sp_document_maybe_done (sp_desktop_document(SP_ACTIVE_DESKTOP), undo_label);
+            sp_document_maybe_done (sp_desktop_document(SP_ACTIVE_DESKTOP), undo_label, SP_VERB_DIALOG_FILL_STROKE, 
+                                    _("Set fill color"));
             g_object_set_data (G_OBJECT (spw), "local", GINT_TO_POINTER (TRUE)); // local change, do not update from selection
             break;
         }
@@ -385,15 +389,22 @@ sp_fill_style_widget_paint_changed ( SPPaintSelector *psel,
 
             sp_repr_css_attr_unref (css);
 
-            sp_document_done (document);
+            sp_document_done (document, SP_VERB_DIALOG_FILL_STROKE, 
+                              _("Remove fill"));
             break;
         }
 
         case SP_PAINT_SELECTOR_MODE_COLOR_RGB:
         case SP_PAINT_SELECTOR_MODE_COLOR_CMYK:
         {
+            // FIXME: fix for GTK breakage, see comment in SelectedStyle::on_opacity_changed; here it results in losing release events
+            sp_canvas_force_full_redraw_after_interruptions(sp_desktop_canvas(desktop), 0);
+
             sp_paint_selector_set_flat_color (psel, desktop, "fill", "fill-opacity");
-            sp_document_maybe_done (sp_desktop_document(desktop), undo_label);
+            sp_document_maybe_done (sp_desktop_document(desktop), undo_label, SP_VERB_DIALOG_FILL_STROKE,
+                                    _("Set fill color"));
+            // resume interruptibility
+            sp_canvas_end_forced_full_redraws(sp_desktop_canvas(desktop));
 
             // on release, toggle undo_label so that the next drag will not be lumped with this one
             if (undo_label == undo_label_1)
@@ -459,7 +470,8 @@ sp_fill_style_widget_paint_changed ( SPPaintSelector *psel,
 
                 sp_repr_css_attr_unref (css);
 
-                sp_document_done (document);
+                sp_document_done (document, SP_VERB_DIALOG_FILL_STROKE, 
+                                  _("Set gradient on fill"));
             }
             break;
 
@@ -505,7 +517,8 @@ sp_fill_style_widget_paint_changed ( SPPaintSelector *psel,
 
                 } // end if
 
-                sp_document_done (document);
+                sp_document_done (document, SP_VERB_DIALOG_FILL_STROKE, 
+                                  _("Set pattern on fill"));
 
             } // end if
 
@@ -519,7 +532,8 @@ sp_fill_style_widget_paint_changed ( SPPaintSelector *psel,
                     sp_desktop_set_style (desktop, css);
                     sp_repr_css_attr_unref (css);
 
-                    sp_document_done (document);
+                    sp_document_done (document, SP_VERB_DIALOG_FILL_STROKE, 
+                                      _("Unset fill"));
             }
             break;