summaryrefslogtreecommitdiffstats
path: root/src/ui/widget/imagetoggler.cpp
diff options
context:
space:
mode:
authorJohn Smith <john.smith7545@yahoo.com>2012-02-17 08:05:08 +0000
committerJohn Smith <removethis.john.q.public@bigmail.com>2012-02-17 08:05:08 +0000
commitafb80368d6bf4dc2a55b011c9a14fa4288d2fe84 (patch)
tree6ec54c830a6537271186388726542ca873ff7830 /src/ui/widget/imagetoggler.cpp
parentDocumentation of the Text and Font dialog (diff)
downloadinkscape-afb80368d6bf4dc2a55b011c9a14fa4288d2fe84.tar.gz
inkscape-afb80368d6bf4dc2a55b011c9a14fa4288d2fe84.zip
Fix for 171579 : Make inkscape remember dialogs window status
(bzr r10992)
Diffstat (limited to 'src/ui/widget/imagetoggler.cpp')
-rw-r--r--src/ui/widget/imagetoggler.cpp11
1 files changed, 10 insertions, 1 deletions
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 <gtkmm/icontheme.h>
#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<Gtk::IconTheme> 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);
}