summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 5ad0193)
raw | patch | inline | side by side (parent: 5ad0193)
author | johanengelen <johanengelen@users.sourceforge.net> | |
Sun, 20 Jul 2008 21:10:46 +0000 (21:10 +0000) | ||
committer | johanengelen <johanengelen@users.sourceforge.net> | |
Sun, 20 Jul 2008 21:10:46 +0000 (21:10 +0000) |
src/ui/dialog/livepatheffect-editor.cpp | patch | blob | history | |
src/ui/dialog/livepatheffect-editor.h | patch | blob | history |
index f46a6bc95ccd5d5c9f93c9378c0bd997590b3704..232f2ebfe7f0b40217602643d7990faa80d5f89e 100644 (file)
#include <glibmm/i18n.h>
#include "livepatheffect-editor.h"
+#include "ui/widget/imagetoggler.h"
#include "verbs.h"
#include "selection.h"
#include "sp-shape.h"
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);
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();
}
}
index 76ee9f09c8a2d1afc514aa9290d2fa163dc2e977..61378f329c6b5f3db01608f37c7055ed447a10d5 100644 (file)
{
add(col_name);
add(lperef);
+ add(col_visible);
}
virtual ~ModelColumns() {}
Gtk::TreeModelColumn<Glib::ustring> col_name;
Gtk::TreeModelColumn<LivePathEffect::LPEObjectReference *> lperef;
+ Gtk::TreeModelColumn<bool> col_visible;
};
Inkscape::UI::Widget::ComboBoxEnum<LivePathEffect::EffectType> combo_effecttype;