On 15/7/11 09:17, ~suv wrote:
BTW - the changes to the icon naming in r10451 broke toggling the status icons in the "Layers" dialog and in the layer indicator on the status line. The icon names changed in 'src/ui/dialog/layers.cpp' ignore the status, but even after correcting those the icons do not change on click. I don't know what fixes/reverts are needed in 'src/ui/widget/imagetoggler.*'.
My mistake - I didn't correct the icon names in both files: - src/ui/dialog/layers.cpp - src/ui/widget/layer-selector.cpp
With attached diff it works ok for me (no changes needed on imagetoggler.cpp).
~suv
=== modified file 'src/ui/dialog/layers.cpp' --- src/ui/dialog/layers.cpp 2011-07-15 00:21:05 +0000 +++ src/ui/dialog/layers.cpp 2011-07-15 06:48:30 +0000 @@ -582,7 +582,7 @@ _tree.set_headers_visible(false);
Inkscape::UI::Widget::ImageToggler *eyeRenderer = manage( new Inkscape::UI::Widget::ImageToggler( - INKSCAPE_ICON("object-visible"), INKSCAPE_ICON("object-visible")) ); + INKSCAPE_ICON("object-visible"), INKSCAPE_ICON("object-hidden")) ); int visibleColNum = _tree.append_column("vis", *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) ); @@ -593,7 +593,7 @@ }
Inkscape::UI::Widget::ImageToggler * renderer = manage( new Inkscape::UI::Widget::ImageToggler( - INKSCAPE_ICON("object-locked"), INKSCAPE_ICON("object-locked")) ); + INKSCAPE_ICON("object-locked"), INKSCAPE_ICON("object-unlocked")) ); int lockedColNum = _tree.append_column("lock", *renderer) - 1; renderer->signal_pre_toggle().connect( sigc::mem_fun(*this, &LayersPanel::_preToggle) ); renderer->signal_toggled().connect( sigc::bind( sigc::mem_fun(*this, &LayersPanel::_toggled), (int)COL_LOCKED) );
=== modified file 'src/ui/widget/layer-selector.cpp' --- src/ui/widget/layer-selector.cpp 2011-07-15 00:21:05 +0000 +++ src/ui/widget/layer-selector.cpp 2011-07-15 07:35:12 +0000 @@ -95,7 +95,7 @@ AlternateIcons *label;
label = Gtk::manage(new AlternateIcons(Inkscape::ICON_SIZE_DECORATION, - INKSCAPE_ICON("object-visible"), INKSCAPE_ICON("object-visible"))); + INKSCAPE_ICON("object-visible"), INKSCAPE_ICON("object-hidden"))); _visibility_toggle.add(*label); _visibility_toggle.signal_toggled().connect( sigc::compose( @@ -116,7 +116,7 @@ pack_start(_visibility_toggle, Gtk::PACK_EXPAND_PADDING);
label = Gtk::manage(new AlternateIcons(Inkscape::ICON_SIZE_DECORATION, - INKSCAPE_ICON("object-unlocked"), INKSCAPE_ICON("object-unlocked"))); + INKSCAPE_ICON("object-unlocked"), INKSCAPE_ICON("object-locked"))); _lock_toggle.add(*label); _lock_toggle.signal_toggled().connect( sigc::compose(