diff options
| author | Johan B. C. Engelen <jbc.engelen@swissonline.ch> | 2008-07-20 21:10:46 +0000 |
|---|---|---|
| committer | johanengelen <johanengelen@users.sourceforge.net> | 2008-07-20 21:10:46 +0000 |
| commit | af42e81f1e5cf2faf9da4e3004ffe63eba3275e3 (patch) | |
| tree | 8f540c9e86def6a56ca90b226ce6cbda882b0cfd /src/ui/dialog/livepatheffect-editor.cpp | |
| parent | extract ImageToggler from layers dialog (diff) | |
| download | inkscape-af42e81f1e5cf2faf9da4e3004ffe63eba3275e3.tar.gz inkscape-af42e81f1e5cf2faf9da4e3004ffe63eba3275e3.zip | |
add visibility icon to LPE stack dialog. not clickable yet
(bzr r6378)
Diffstat (limited to 'src/ui/dialog/livepatheffect-editor.cpp')
| -rw-r--r-- | src/ui/dialog/livepatheffect-editor.cpp | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/src/ui/dialog/livepatheffect-editor.cpp b/src/ui/dialog/livepatheffect-editor.cpp index f46a6bc95..232f2ebfe 100644 --- a/src/ui/dialog/livepatheffect-editor.cpp +++ b/src/ui/dialog/livepatheffect-editor.cpp @@ -17,6 +17,7 @@ #include <glibmm/i18n.h> #include "livepatheffect-editor.h" +#include "ui/widget/imagetoggler.h" #include "verbs.h" #include "selection.h" #include "sp-shape.h" @@ -131,9 +132,19 @@ LivePathEffectEditor::LivePathEffectEditor() effectlist_selection = effectlist_view.get_selection(); effectlist_selection->signal_changed().connect( sigc::mem_fun(*this, &LivePathEffectEditor::on_effect_selection_changed) ); - //Add the TreeView's view columns: - effectlist_view.append_column("Effect", columns.col_name); + //Add the visibility icon column: + Inkscape::UI::Widget::ImageToggler *eyeRenderer = manage( new Inkscape::UI::Widget::ImageToggler("visible", "hidden") ); + int visibleColNum = effectlist_view.append_column("is_visible", *eyeRenderer) - 1; +// eyeRenderer->signal_pre_toggle().connect( sigc::mem_fun(*this, &LayersPanel::_preToggle) ); +// eyeRenderer->signal_toggled().connect( sigc::bind( sigc::mem_fun(*this, &LayersPanel::_toggled), (int)COL_VISIBLE) ); + eyeRenderer->property_activatable() = true; + Gtk::TreeViewColumn* col = effectlist_view.get_column(visibleColNum); + if ( col ) { + col->add_attribute( eyeRenderer->property_active(), columns.col_visible ); + } + //Add the effect name column: + effectlist_view.append_column("Effect", columns.col_name); contents->pack_start(effectapplication_frame, false, false); contents->pack_start(effectlist_frame, true, true); @@ -269,6 +280,7 @@ LivePathEffectEditor::effect_list_reload(SPLPEItem *lpeitem) Gtk::TreeModel::Row row = *(effectlist_store->append()); row[columns.col_name] = (*it)->lpeobject->lpe->getName(); row[columns.lperef] = *it; + row[columns.col_visible] = (*it)->lpeobject->lpe->isVisible(); } } |
