Code

place apply horizonally
[inkscape.git] / src / ui / dialog / livepatheffect-editor.cpp
index ee010eeca4a12597eefc8f09e6f6cbf0d6114180..6da07c2d876c34fd753c20817a12fb0cc0e7dff6 100644 (file)
@@ -81,15 +81,15 @@ LivePathEffectEditor::LivePathEffectEditor(Behavior::BehaviorFactory behavior_fa
     Gtk::VBox *vbox = get_vbox();\r
     vbox->set_spacing(4);\r
 \r
-    effectapplication_vbox.set_spacing(4);\r
+    effectapplication_hbox.set_spacing(4);\r
     effectcontrol_vbox.set_spacing(4);\r
 \r
-    effectapplication_vbox.pack_start(combo_effecttype, true, true);\r
-    effectapplication_vbox.pack_start(button_apply, true, true);\r
-    effectapplication_vbox.pack_start(button_remove, true, true);\r
-    effectapplication_frame.add(effectapplication_vbox);\r
+    effectapplication_hbox.pack_start(combo_effecttype, true, true);\r
+    effectapplication_hbox.pack_start(button_apply, true, true);\r
+    effectapplication_frame.add(effectapplication_hbox);\r
 \r
     effectcontrol_vbox.pack_start(explain_label, true, true);\r
+    effectcontrol_vbox.pack_end(button_remove, true, true);\r
     effectcontrol_frame.add(effectcontrol_vbox);\r
 \r
     vbox->pack_start(effectapplication_frame, true, true);\r
@@ -108,6 +108,7 @@ LivePathEffectEditor::LivePathEffectEditor(Behavior::BehaviorFactory behavior_fa
 \r
     setDesktop(SP_ACTIVE_DESKTOP);\r
     show_all_children();\r
+               button_remove.hide();\r
 }\r
 \r
 LivePathEffectEditor::~LivePathEffectEditor() \r
@@ -136,6 +137,7 @@ LivePathEffectEditor::showParams(LivePathEffect::Effect* effect)
     if (effectwidget) {\r
         effectcontrol_vbox.pack_start(*effectwidget, true, true);\r
     }\r
+    button_remove.show();\r
 \r
     effectcontrol_vbox.show_all_children();\r
     // fixme: do resizing of dialog \r
@@ -150,6 +152,7 @@ LivePathEffectEditor::showText(Glib::ustring const &str)
     }\r
 \r
     explain_label.set_label(str);\r
+    button_remove.hide();\r
 \r
     // fixme: do resizing of dialog ?\r
 }\r
@@ -183,7 +186,7 @@ LivePathEffectEditor::onSelectionChanged(Inkscape::Selection *sel)
                     button_remove.set_sensitive(false);\r
                 }\r
             } else {\r
-                showText(_("Item is not a shape"));\r
+                showText(_("Item is not a shape or path"));\r
                 set_sensitize_all(false);\r
             }\r
         } else {\r
@@ -230,6 +233,8 @@ LivePathEffectEditor::setDesktop(SPDesktop *desktop)
 # BUTTON CLICK HANDLERS    (callbacks)\r
 ########################################################################*/\r
 \r
+// TODO:  factor out the effect applying code which can be called from anywhere. (selection-chemistry.cpp also needs it)\r
+\r
 void\r
 LivePathEffectEditor::onApply()\r
 {\r
@@ -263,7 +268,7 @@ LivePathEffectEditor::onApply()
             }\r
 \r
             sp_document_done(doc, SP_VERB_DIALOG_LIVE_PATH_EFFECT, \r
-                             _("Create and apply live effect"));\r
+                             _("Create and apply path effect"));\r
         }\r
     }\r
 }\r
@@ -277,7 +282,7 @@ LivePathEffectEditor::onRemove()
         if ( item && SP_IS_SHAPE(item) ) {\r
             sp_shape_remove_path_effect(SP_SHAPE(item));\r
             sp_document_done ( sp_desktop_document (current_desktop), SP_VERB_DIALOG_LIVE_PATH_EFFECT, \r
-                               _("Remove live path effect") );\r
+                               _("Remove path effect") );\r
         }\r
     }\r
 }\r