summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJohn Smith <john.smith7545@yahoo.com>2012-03-02 09:31:25 +0000
committerJohn Smith <removethis.john.q.public@bigmail.com>2012-03-02 09:31:25 +0000
commit5a838eb403143abf75ffed2f3b32c470b979d16f (patch)
tree9a3727b054f268345a97d52d74c5ae0bb108e4c8 /src
parentFix for 168351 : layer rename doesn't update layers dialog (diff)
downloadinkscape-5a838eb403143abf75ffed2f3b32c470b979d16f.tar.gz
inkscape-5a838eb403143abf75ffed2f3b32c470b979d16f.zip
Fix for 927074 : resize buttons, and add on tree double click
(bzr r11040)
Diffstat (limited to 'src')
-rw-r--r--src/ui/dialog/livepatheffect-add.cpp9
-rw-r--r--src/ui/dialog/livepatheffect-add.h8
-rw-r--r--src/ui/dialog/livepatheffect-editor.cpp19
-rw-r--r--src/ui/dialog/livepatheffect-editor.h8
4 files changed, 35 insertions, 9 deletions
diff --git a/src/ui/dialog/livepatheffect-add.cpp b/src/ui/dialog/livepatheffect-add.cpp
index d53c85e33..6420702ef 100644
--- a/src/ui/dialog/livepatheffect-add.cpp
+++ b/src/ui/dialog/livepatheffect-add.cpp
@@ -80,6 +80,7 @@ LivePathEffectAdd::LivePathEffectAdd() :
/**
* Signal handlers
*/
+ effectlist_treeview.signal_button_press_event().connect_notify( sigc::mem_fun(*this, &LivePathEffectAdd::onButtonEvent) );
close_button.signal_clicked().connect(sigc::mem_fun(*this, &LivePathEffectAdd::onClose));
add_button.signal_clicked().connect(sigc::mem_fun(*this, &LivePathEffectAdd::onAdd));
signal_delete_event().connect( sigc::bind_return(sigc::hide(sigc::mem_fun(*this, &LivePathEffectAdd::onClose)), true ) );
@@ -100,6 +101,14 @@ void LivePathEffectAdd::onClose()
hide();
}
+void LivePathEffectAdd::onButtonEvent(GdkEventButton* evt)
+{
+ // Double click on tree is same as clicking the add button
+ if (evt->type == GDK_2BUTTON_PRESS) {
+ onAdd();
+ }
+}
+
const Util::EnumData<LivePathEffect::EffectType>*
LivePathEffectAdd::getActiveData()
{
diff --git a/src/ui/dialog/livepatheffect-add.h b/src/ui/dialog/livepatheffect-add.h
index 4fe1d41a6..be01e21df 100644
--- a/src/ui/dialog/livepatheffect-add.h
+++ b/src/ui/dialog/livepatheffect-add.h
@@ -54,16 +54,22 @@ public:
static const Util::EnumData<LivePathEffect::EffectType>* getActiveData();
protected:
+
/**
* Close button was clicked
*/
-
void onClose();
+
/**
* Add button was clicked
*/
void onAdd();
+ /**
+ * Tree was clicked
+ */
+ void onButtonEvent(GdkEventButton* evt);
+
private:
Gtk::TreeView effectlist_treeview;
diff --git a/src/ui/dialog/livepatheffect-editor.cpp b/src/ui/dialog/livepatheffect-editor.cpp
index c662abe8f..588dcacb1 100644
--- a/src/ui/dialog/livepatheffect-editor.cpp
+++ b/src/ui/dialog/livepatheffect-editor.cpp
@@ -82,10 +82,10 @@ LivePathEffectEditor::LivePathEffectEditor()
status_label("", Gtk::ALIGN_CENTER),
effectcontrol_frame(""),
effectlist_frame(_("Effect list")),
- button_add(Gtk::Stock::ADD),
- button_remove(Gtk::Stock::REMOVE),
- button_up(Gtk::Stock::GO_UP),
- button_down(Gtk::Stock::GO_DOWN),
+ button_add(),
+ button_remove(),
+ button_up(),
+ button_down(),
current_desktop(NULL),
current_lpeitem(NULL)
{
@@ -107,9 +107,20 @@ LivePathEffectEditor::LivePathEffectEditor()
effectcontrol_frame.add(effectcontrol_vbox);
button_add.set_tooltip_text(_("Add path effect"));
+ button_add.set_image(*manage(Glib::wrap(gtk_image_new_from_stock ( GTK_STOCK_ADD, GTK_ICON_SIZE_SMALL_TOOLBAR ) )));
+ button_add.set_relief(Gtk::RELIEF_NONE);
+
button_remove.set_tooltip_text(_("Delete current path effect"));
+ button_remove.set_image(*manage(Glib::wrap(gtk_image_new_from_stock ( GTK_STOCK_REMOVE, GTK_ICON_SIZE_SMALL_TOOLBAR ) )));
+ button_remove.set_relief(Gtk::RELIEF_NONE);
+
button_up.set_tooltip_text(_("Raise the current path effect"));
+ button_up.set_image(*manage(Glib::wrap(gtk_image_new_from_stock ( GTK_STOCK_GO_UP, GTK_ICON_SIZE_SMALL_TOOLBAR ) )));
+ button_up.set_relief(Gtk::RELIEF_NONE);
+
button_down.set_tooltip_text(_("Lower the current path effect"));
+ button_down.set_image(*manage(Glib::wrap(gtk_image_new_from_stock ( GTK_STOCK_GO_DOWN, GTK_ICON_SIZE_SMALL_TOOLBAR ) )));
+ button_down.set_relief(Gtk::RELIEF_NONE);
// Add toolbar items to toolbar
toolbar_hbox.set_layout (Gtk::BUTTONBOX_END);
diff --git a/src/ui/dialog/livepatheffect-editor.h b/src/ui/dialog/livepatheffect-editor.h
index 9c749a812..11ab8ea89 100644
--- a/src/ui/dialog/livepatheffect-editor.h
+++ b/src/ui/dialog/livepatheffect-editor.h
@@ -103,10 +103,10 @@ private:
void on_visibility_toggled( Glib::ustring const& str );
Gtk::HButtonBox toolbar_hbox;
- Gtk::ToolButton button_add;
- Gtk::ToolButton button_remove;
- Gtk::ToolButton button_up;
- Gtk::ToolButton button_down;
+ Gtk::Button button_add;
+ Gtk::Button button_remove;
+ Gtk::Button button_up;
+ Gtk::Button button_down;
SPDesktop * current_desktop;