summaryrefslogtreecommitdiffstats
path: root/src/ui/dialog/attrdialog.cpp
diff options
context:
space:
mode:
authorMartin Owens <doctormo@gmail.com>2018-09-27 02:44:51 +0000
committerMartin Owens <doctormo@gmail.com>2018-09-27 02:44:51 +0000
commit42969f6dc9924dc1b604ac163fbf29ad60e12fdd (patch)
treef3a81142978739026441112bf926aea922bd6c00 /src/ui/dialog/attrdialog.cpp
parentFix crash in fill and stroke dialog (diff)
downloadinkscape-42969f6dc9924dc1b604ac163fbf29ad60e12fdd.tar.gz
inkscape-42969f6dc9924dc1b604ac163fbf29ad60e12fdd.zip
Refactor addtoicon and turn into more generic iconrenderer CellRenderer
Diffstat (limited to 'src/ui/dialog/attrdialog.cpp')
-rw-r--r--src/ui/dialog/attrdialog.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/ui/dialog/attrdialog.cpp b/src/ui/dialog/attrdialog.cpp
index 3133ff279..0c00a6b76 100644
--- a/src/ui/dialog/attrdialog.cpp
+++ b/src/ui/dialog/attrdialog.cpp
@@ -16,7 +16,7 @@
#include "document-undo.h"
#include "helper/icon-loader.h"
-#include "ui/widget/addtoicon.h"
+#include "ui/widget/iconrenderer.h"
#include "xml/node-event-vector.h"
#include "xml/attribute-record.h"
@@ -65,14 +65,13 @@ AttrDialog::AttrDialog():
_store = Gtk::ListStore::create(_attrColumns);
_treeView.set_model(_store);
- Inkscape::UI::Widget::AddToIcon * addRenderer = manage(new Inkscape::UI::Widget::AddToIcon());
- addRenderer->property_active() = false;
+ Inkscape::UI::Widget::IconRenderer * addRenderer = manage(new Inkscape::UI::Widget::IconRenderer());
+ addRenderer->add_icon("edit-delete");
_treeView.append_column("", *addRenderer);
Gtk::TreeViewColumn *col = _treeView.get_column(0);
if (col) {
auto add_icon = Gtk::manage(sp_get_icon_image("list-add", GTK_ICON_SIZE_SMALL_TOOLBAR));
- col->add_attribute(addRenderer->property_active(), _attrColumns._colUnsetAttr);
col->set_clickable(true);
col->set_widget(*add_icon);
add_icon->set_tooltip_text(_("Add a new attribute"));