From afb80368d6bf4dc2a55b011c9a14fa4288d2fe84 Mon Sep 17 00:00:00 2001 From: John Smith Date: Fri, 17 Feb 2012 17:05:08 +0900 Subject: Fix for 171579 : Make inkscape remember dialogs window status (bzr r10992) --- src/ui/widget/imagetoggler.cpp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'src/ui/widget/imagetoggler.cpp') diff --git a/src/ui/widget/imagetoggler.cpp b/src/ui/widget/imagetoggler.cpp index 073e071af..6517219f2 100644 --- a/src/ui/widget/imagetoggler.cpp +++ b/src/ui/widget/imagetoggler.cpp @@ -14,6 +14,8 @@ #include #include "widgets/icon.h" +#include "widgets/toolbox.h" +#include "ui/icon-names.h" namespace Inkscape { namespace UI { @@ -33,10 +35,17 @@ ImageToggler::ImageToggler( char const* on, char const* off) : int phys = sp_icon_get_phys_size((int)Inkscape::ICON_SIZE_DECORATION); Glib::RefPtr icon_theme = Gtk::IconTheme::get_default(); + if (!icon_theme->has_icon(_pixOnName)) { + Inkscape::queueIconPrerender( INKSCAPE_ICON(_pixOnName.data()), Inkscape::ICON_SIZE_DECORATION ); + } + if (!icon_theme->has_icon(_pixOffName)) { + Inkscape::queueIconPrerender( INKSCAPE_ICON(_pixOffName.data()), Inkscape::ICON_SIZE_DECORATION ); + } + + if (icon_theme->has_icon(_pixOnName)) { _property_pixbuf_on = icon_theme->load_icon(_pixOnName, phys, (Gtk::IconLookupFlags)0); } - if (icon_theme->has_icon(_pixOffName)) { _property_pixbuf_off = icon_theme->load_icon(_pixOffName, phys, (Gtk::IconLookupFlags)0); } -- cgit v1.2.3