=== modified file 'src/dialogs/clonetiler.cpp' --- src/dialogs/clonetiler.cpp 2012-01-13 16:34:26 +0000 +++ src/dialogs/clonetiler.cpp 2012-01-16 03:51:57 +0000 @@ -93,6 +93,9 @@ static void clonetiler_dialog_destroy(GtkObject */*object*/, gpointer /*data*/) { + Inkscape::Preferences *prefs = Inkscape::Preferences::get(); + prefs->setInt(prefs_path + "visible", 0); + sp_signal_disconnect_by_data (INKSCAPE, dlg); _color_changed_connection.disconnect(); @@ -1765,6 +1768,8 @@ h = prefs->getInt(prefs_path + "h", 0); } + prefs->setInt(prefs_path + "visible", 1); + // if (x<0) x=0; // if (y<0) y=0; === modified file 'src/dialogs/export.cpp' --- src/dialogs/export.cpp 2012-01-11 21:14:08 +0000 +++ src/dialogs/export.cpp 2012-01-16 03:51:57 +0000 @@ -154,6 +154,9 @@ static void sp_export_dialog_destroy ( GtkObject */*object*/, gpointer /*data*/ ) { + Inkscape::Preferences *prefs = Inkscape::Preferences::get(); + prefs->setInt(prefs_path + "visible", 0); + sp_signal_disconnect_by_data (INKSCAPE, dlg); wd.win = dlg = NULL; @@ -416,6 +419,8 @@ h = prefs->getInt(prefs_path + "h", 0); } + prefs->setInt(prefs_path + "visible", 1); + // if (x<0) x=0; // if (y<0) y=0; === modified file 'src/dialogs/find.cpp' --- src/dialogs/find.cpp 2011-12-14 00:07:08 +0000 +++ src/dialogs/find.cpp 2012-01-16 03:51:57 +0000 @@ -77,6 +77,9 @@ static void sp_find_dialog_destroy(GtkObject *object, gpointer) { + Inkscape::Preferences *prefs = Inkscape::Preferences::get(); + prefs->setInt(prefs_path + "visible", 0); + sp_signal_disconnect_by_data (INKSCAPE, object); wd.win = dlg = NULL; wd.stop = 0; @@ -661,6 +664,8 @@ h = prefs->getInt(prefs_path + "h", 0); } + prefs->setInt(prefs_path + "visible", 1); + // if (x<0) x=0; // if (y<0) y=0; === modified file 'src/dialogs/spellcheck.cpp' --- src/dialogs/spellcheck.cpp 2012-01-04 10:32:50 +0000 +++ src/dialogs/spellcheck.cpp 2012-01-16 03:51:57 +0000 @@ -155,6 +155,8 @@ static void sp_spellcheck_dialog_destroy(GtkObject *object, gpointer) { + _prefs->setInt(prefs_path + "visible", 0); + spellcheck_clear_rects(); spellcheck_clear_langs(); spellcheck_disconnect(); @@ -902,6 +904,8 @@ h = _prefs->getInt(prefs_path + "h", 0); } + _prefs->setInt(prefs_path + "visible", 1); + if (w && h) gtk_window_resize ((GtkWindow *) dlg, w, h); if (x >= 0 && y >= 0 && (x < (gdk_screen_width()-MIN_ONSCREEN_DISTANCE)) && (y < (gdk_screen_height()-MIN_ONSCREEN_DISTANCE))) { === modified file 'src/dialogs/text-edit.cpp' --- src/dialogs/text-edit.cpp 2012-01-08 09:00:38 +0000 +++ src/dialogs/text-edit.cpp 2012-01-16 03:51:57 +0000 @@ -91,13 +91,15 @@ static void sp_text_edit_dialog_destroy( GtkObject */*object*/, gpointer /*data*/ ) { + Inkscape::Preferences *prefs = Inkscape::Preferences::get(); + prefs->setInt(prefs_path + "visible", 0); + sp_signal_disconnect_by_data (INKSCAPE, dlg); wd.win = dlg = NULL; wd.stop = 0; } - static gboolean sp_text_edit_dialog_delete( GtkObject */*object*/, GdkEvent */*event*/, gpointer /*data*/ ) { @@ -161,6 +163,8 @@ h = prefs->getInt(prefs_path + "h", 0); } + prefs->setInt(prefs_path + "visible", 1); + // if (x<0) x=0; // if (y<0) y=0; === modified file 'src/dialogs/xml-tree.cpp' --- src/dialogs/xml-tree.cpp 2012-01-03 12:23:35 +0000 +++ src/dialogs/xml-tree.cpp 2012-01-16 03:51:57 +0000 @@ -205,6 +205,8 @@ h = prefs->getInt(prefs_path + "h", 0); } + prefs->setInt(prefs_path + "visible", 1); + // if (x<0) x=0; // if (y<0) y=0; @@ -990,6 +992,9 @@ static void on_destroy(GtkObject */*object*/, gpointer /*data*/) { + Inkscape::Preferences *prefs = Inkscape::Preferences::get(); + prefs->setInt(prefs_path + "visible", 0); + set_tree_desktop(NULL); sp_signal_disconnect_by_data(INKSCAPE, dlg); wd.win = dlg = NULL; === modified file 'src/interface.cpp' --- src/interface.cpp 2012-01-05 15:33:00 +0000 +++ src/interface.cpp 2012-01-16 03:51:57 +0000 @@ -65,6 +65,7 @@ #include "event-context.h" #include "gradient-drag.h" #include "widgets/ege-paint-def.h" +#include "verbs.h" // Include Mac OS X menu synchronization on native OSX build #ifdef GDK_WINDOWING_QUARTZ @@ -258,6 +259,9 @@ if ( SP_IS_DESKTOP_WIDGET(vw) ) { inkscape_reactivate_desktop(SP_DESKTOP_WIDGET(vw)->desktop); } + + sp_ui_workspace_show_dialogs(); + } void @@ -1637,6 +1641,76 @@ } } +void +sp_ui_workspace_show_dialogs() +{ + SPDesktop *dt = SP_ACTIVE_DESKTOP; + if (dt == NULL) { + return; + } + + Inkscape::Preferences *prefs = Inkscape::Preferences::get(); + if (prefs == NULL) { + return; + } + + int active = prefs->getInt("/options/savedialogposition/value", 1); + if (active == 0) { + // User has turned off this feature in preferences + return; + } + + /* + * Check each dialogs visible state in preferences and open if needed. + * Map dialog 'open' verb ids to dialog last visible state preference. + * Would prefer to use the Dialog Manager to open, but currently it doesn't support non-dockable dialogs + */ + std::map mapVerbPreference; + std::map::const_iterator iter; + mapVerbPreference.insert(std::make_pair ((int)SP_VERB_DIALOG_LAYERS, "/dialogs/layers") ); + mapVerbPreference.insert(std::make_pair ((int)SP_VERB_DIALOG_FILL_STROKE, "/dialogs/fillstroke") ); + mapVerbPreference.insert(std::make_pair ((int)SP_VERB_DIALOG_EXTENSIONEDITOR, "/dialogs/extensioneditor") ); + mapVerbPreference.insert(std::make_pair ((int)SP_VERB_DIALOG_ALIGN_DISTRIBUTE, "/dialogs/align") ); + mapVerbPreference.insert(std::make_pair ((int)SP_VERB_DIALOG_METADATA, "/dialogs/documentmetadata") ); + mapVerbPreference.insert(std::make_pair ((int)SP_VERB_DIALOG_NAMEDVIEW, "/dialogs/documentoptions") ); + mapVerbPreference.insert(std::make_pair ((int)SP_VERB_DIALOG_FILTER_EFFECTS, "/dialogs/filtereffects") ); + mapVerbPreference.insert(std::make_pair ((int)SP_VERB_DIALOG_FIND, "/dialogs/find") ); + mapVerbPreference.insert(std::make_pair ((int)SP_VERB_DIALOG_GLYPHS, "/dialogs/glyphs") ); + mapVerbPreference.insert(std::make_pair ((int)SP_VERB_DIALOG_DEBUG, "/dialogs/messages") ); + mapVerbPreference.insert(std::make_pair ((int)SP_VERB_HELP_MEMORY, "/dialogs/memory") ); + mapVerbPreference.insert(std::make_pair ((int)SP_VERB_DIALOG_LIVE_PATH_EFFECT, "/dialogs/livepatheffect") ); + mapVerbPreference.insert(std::make_pair ((int)SP_VERB_DIALOG_UNDO_HISTORY, "/dialogs/undo-history") ); + mapVerbPreference.insert(std::make_pair ((int)SP_VERB_DIALOG_TRANSFORM, "/dialogs/transformation") ); + mapVerbPreference.insert(std::make_pair ((int)SP_VERB_DIALOG_SWATCHES, "/dialogs/swatches") ); + mapVerbPreference.insert(std::make_pair ((int)SP_VERB_VIEW_ICON_PREVIEW, "/dialogs/iconpreview") ); + mapVerbPreference.insert(std::make_pair ((int)SP_VERB_DIALOG_SVG_FONTS, "/dialogs/svgfonts") ); + mapVerbPreference.insert(std::make_pair ((int)SP_VERB_DIALOG_INPUT, "/dialogs/inputdevices") ); + mapVerbPreference.insert(std::make_pair ((int)SP_VERB_CONTEXT_SELECT_PREFS, "/dialogs/preferences") ); + mapVerbPreference.insert(std::make_pair ((int)SP_VERB_SELECTION_GRIDTILE, "/dialogs/gridtiler") ); + mapVerbPreference.insert(std::make_pair ((int)SP_VERB_SELECTION_TRACE, "/dialogs/trace") ); + mapVerbPreference.insert(std::make_pair ((int)SP_VERB_DIALOG_TEXT, "/dialogs/textandfont") ); + mapVerbPreference.insert(std::make_pair ((int)SP_VERB_FILE_EXPORT, "/dialogs/export") ); + mapVerbPreference.insert(std::make_pair ((int)SP_VERB_DIALOG_XML_EDITOR, "/dialogs/xml") ); + mapVerbPreference.insert(std::make_pair ((int)SP_VERB_DIALOG_FIND, "/dialogs/find") ); + mapVerbPreference.insert(std::make_pair ((int)SP_VERB_DIALOG_CLONETILER, "/dialogs/clonetiler") ); + mapVerbPreference.insert(std::make_pair ((int)SP_VERB_DIALOG_ITEM, "/dialogs/object") ); + mapVerbPreference.insert(std::make_pair ((int)SP_VERB_DIALOG_SPELLCHECK, "/dialogs/spellcheck") ); + + for (iter = mapVerbPreference.begin(); iter != mapVerbPreference.end(); iter++) { + int verbId = iter->first; + Glib::ustring pref = iter->second; + int visible = prefs->getInt(pref + "/visible", 0); + if (visible) { + Inkscape::Verb *verb = Inkscape::Verb::get(verbId); + if (verb) { + SPAction *action = verb->get_action(dt); + if (action) { + sp_action_perform(action, NULL); + } + } + } + } +} /* Local Variables: === modified file 'src/interface.h' --- src/interface.h 2011-10-05 07:06:08 +0000 +++ src/interface.h 2012-01-16 03:51:57 +0000 @@ -82,6 +82,11 @@ void sp_ui_error_dialog (const gchar * message); bool sp_ui_overwrite_file (const gchar * filename); +/** + * Show all previously open dialogs + */ +void sp_ui_workspace_show_dialogs(); + #endif // SEEN_SP_INTERFACE_H /* === modified file 'src/ui/dialog/dialog.cpp' --- src/ui/dialog/dialog.cpp 2012-01-06 10:30:33 +0000 +++ src/ui/dialog/dialog.cpp 2012-01-16 05:18:23 +0000 @@ -88,6 +88,8 @@ _verb_num(verb_num), _title(), _apply_label(apply_label), + _desktop(NULL), + _activeDesktop(true), _behavior(0) { gchar title[500]; @@ -97,8 +99,8 @@ } _title = title; - _behavior = behavior_factory(*this); + _desktop = SP_ACTIVE_DESKTOP; g_signal_connect(G_OBJECT(INKSCAPE), "activate_desktop", G_CALLBACK(sp_retransientize), (void *)this); g_signal_connect(G_OBJECT(INKSCAPE), "dialogs_hide", G_CALLBACK(hideCallback), (void *)this); @@ -124,13 +126,14 @@ void Dialog::onDesktopActivated(SPDesktop *desktop) { + _activeDesktop = (desktop == _desktop); _behavior->onDesktopActivated(desktop); } void Dialog::onShutdown() { save_geometry(); - _user_hidden = true; + //_user_hidden = true; _behavior->onShutdown(); } @@ -224,6 +227,25 @@ } +void +Dialog::save_status(int visible, int state, int placement) +{ + // Only save dialog status for dialogs on the "last document" + SPDesktop *desktop = SP_ACTIVE_DESKTOP; + if (desktop != NULL || !_activeDesktop ) { + return; + } + + Inkscape::Preferences *prefs = Inkscape::Preferences::get(); + if (prefs) { + prefs->setInt(_prefs_path + "/visible", visible); + prefs->setInt(_prefs_path + "/state", state); + prefs->setInt(_prefs_path + "/placement", placement); + //g_message("Dialog::save_status visible=%d state=%d placement=%d ", visible, state, placement); + } +} + + void Dialog::_handleResponse(int response_id) { switch (response_id) { === modified file 'src/ui/dialog/dialog.h' --- src/ui/dialog/dialog.h 2012-01-06 10:30:33 +0000 +++ src/ui/dialog/dialog.h 2012-01-16 03:51:57 +0000 @@ -107,6 +107,7 @@ * Save window position to preferences. */ void save_geometry(); + void save_status(int visible, int state, int placement); bool retransientize_suppress; // when true, do not retransientize (prevents races when switching new windows too fast) @@ -115,6 +116,8 @@ int _verb_num; Glib::ustring _title; Glib::ustring _apply_label; + SPDesktop * _desktop; + bool _activeDesktop; virtual void _handleResponse(int response_id); === modified file 'src/ui/dialog/dock-behavior.cpp' --- src/ui/dialog/dock-behavior.cpp 2011-10-03 07:24:15 +0000 +++ src/ui/dialog/dock-behavior.cpp 2012-01-16 03:51:57 +0000 @@ -46,16 +46,22 @@ Inkscape::Verb::get(dialog._verb_num)->get_image() : ""), static_cast( Inkscape::Preferences::get()->getInt(_dialog._prefs_path + "/state", - UI::Widget::DockItem::DOCKED_STATE))) + UI::Widget::DockItem::DOCKED_STATE)), + static_cast( + Inkscape::Preferences::get()->getInt(_dialog._prefs_path + "/placement", + UI::Widget::DockItem::TOP))) + { // Connect signals _signal_hide_connection = signal_hide().connect(sigc::mem_fun(*this, &Inkscape::UI::Dialog::Behavior::DockBehavior::_onHide)); + signal_show().connect(sigc::mem_fun(*this, &Inkscape::UI::Dialog::Behavior::DockBehavior::_onShow)); _dock_item.signal_state_changed().connect(sigc::mem_fun(*this, &Inkscape::UI::Dialog::Behavior::DockBehavior::_onStateChanged)); if (_dock_item.getState() == Widget::DockItem::FLOATING_STATE) { if (Gtk::Window *floating_win = _dock_item.getWindow()) sp_transientize(GTK_WIDGET(floating_win->gobj())); } + } DockBehavior::~DockBehavior() @@ -178,8 +184,12 @@ { _dialog.save_geometry(); _dialog._user_hidden = true; - Inkscape::Preferences *prefs = Inkscape::Preferences::get(); - prefs->setInt(_dialog._prefs_path + "/state", _dock_item.getPrevState()); +} + +void +DockBehavior::_onShow() +{ + _dialog._user_hidden = false; } void @@ -212,8 +222,9 @@ void DockBehavior::onShutdown() { - Inkscape::Preferences *prefs = Inkscape::Preferences::get(); - prefs->setInt(_dialog._prefs_path + "/state", _dock_item.getPrevState()); + int visible = _dock_item.isIconified() || !_dialog._user_hidden; + int status = (_dock_item.getState() == Inkscape::UI::Widget::DockItem::UNATTACHED) ? _dock_item.getPrevState() : _dock_item.getState(); + _dialog.save_status( visible, status, _dock_item.getPlacement() ); } void === modified file 'src/ui/dialog/dock-behavior.h' --- src/ui/dialog/dock-behavior.h 2011-07-09 14:26:35 +0000 +++ src/ui/dialog/dock-behavior.h 2012-01-16 03:51:57 +0000 @@ -79,6 +79,7 @@ /** Internal signal handlers */ void _onHide(); + void _onShow(); bool _onDeleteEvent(GdkEventAny *event); void _onStateChanged(Widget::DockItem::State prev_state, Widget::DockItem::State new_state); bool _onKeyPress(GdkEventKey *event); === modified file 'src/ui/dialog/inkscape-preferences.cpp' --- src/ui/dialog/inkscape-preferences.cpp 2012-01-08 17:54:41 +0000 +++ src/ui/dialog/inkscape-preferences.cpp 2012-01-16 03:51:57 +0000 @@ -573,6 +573,9 @@ _win_save_geom_prefs.init ( _("Remember and use last window's geometry"), "/options/savewindowgeometry/value", 2, false, &_win_save_geom); _win_save_geom_off.init ( _("Don't save window geometry"), "/options/savewindowgeometry/value", 0, false, &_win_save_geom); + _win_save_dialog_pos_on.init ( _("Save and restore dialogs status"), "/options/savedialogposition/value", 1, true, 0); + _win_save_dialog_pos_off.init ( _("Don't save dialogs status"), "/options/savedialogposition/value", 0, false, &_win_save_dialog_pos_on); + _win_dockable.init ( _("Dockable"), "/options/dialogtype/value", 1, true, 0); _win_floating.init ( _("Floating"), "/options/dialogtype/value", 0, false, &_win_dockable); @@ -591,6 +594,12 @@ _page_windows.add_line( true, "", _win_save_geom, "", _("Save and restore window geometry for each document (saves geometry in the document)")); + _page_windows.add_group_header( _("Saving dialogs status")); + _page_windows.add_line( true, "", _win_save_dialog_pos_off, "", + _("Don't save dialogs status")); + _page_windows.add_line( true, "", _win_save_dialog_pos_on, "", + _("Save and restore dialogs status (the last open windows dialogs are saved when it closes)")); + _page_windows.add_group_header( _("Dialog behavior (requires restart)")); _page_windows.add_line( true, "", _win_dockable, "", _("Dockable")); === modified file 'src/ui/dialog/inkscape-preferences.h' --- src/ui/dialog/inkscape-preferences.h 2012-01-08 17:54:41 +0000 +++ src/ui/dialog/inkscape-preferences.h 2012-01-16 03:51:57 +0000 @@ -219,6 +219,8 @@ UI::Widget::PrefRadioButton _win_dockable; UI::Widget::PrefRadioButton _win_floating; + UI::Widget::PrefRadioButton _win_save_dialog_pos_on; + UI::Widget::PrefRadioButton _win_save_dialog_pos_off; UI::Widget::PrefRadioButton _win_ontop_none; UI::Widget::PrefRadioButton _win_ontop_normal; UI::Widget::PrefRadioButton _win_ontop_agressive; === modified file 'src/ui/widget/dock-item.cpp' --- src/ui/widget/dock-item.cpp 2012-01-14 22:05:12 +0000 +++ src/ui/widget/dock-item.cpp 2012-01-16 05:17:48 +0000 @@ -15,6 +15,7 @@ #include "inkscape.h" #include "preferences.h" #include "ui/widget/dock.h" +#include "ui/icon-names.h" #include "widgets/icon.h" namespace Inkscape { @@ -22,7 +23,7 @@ namespace Widget { DockItem::DockItem(Dock& dock, const Glib::ustring& name, const Glib::ustring& long_name, - const Glib::ustring& icon_name, State state) : + const Glib::ustring& icon_name, State state, Placement placement) : _dock(dock), _prev_state(state), _prev_position(0), @@ -39,8 +40,13 @@ GDL_DOCK_ITEM_BEH_NORMAL : GDL_DOCK_ITEM_BEH_CANT_DOCK_CENTER); + if (!icon_name.empty()) { Glib::RefPtr iconTheme = Gtk::IconTheme::get_default(); + + if (!iconTheme->has_icon(icon_name)) { + Inkscape::queueIconPrerender( INKSCAPE_ICON(icon_name.data()), Inkscape::ICON_SIZE_MENU ); + } // Icon might be in the icon theme, or might be a stock item. Check the proper source: if ( iconTheme->has_icon(icon_name) ) { int width = 0; @@ -76,7 +82,8 @@ signal_delete_event().connect(sigc::mem_fun(*this, &Inkscape::UI::Widget::DockItem::_onDeleteEvent)); signal_realize().connect(sigc::mem_fun(*this, &Inkscape::UI::Widget::DockItem::_onRealize)); - _dock.addItem(*this, (_prev_state == FLOATING_STATE ? FLOATING : TOP)); + _dock.addItem(*this, (_prev_state == FLOATING_STATE ? FLOATING : placement)); + //_dock.addItem(*this, placement); show_all(); } @@ -196,7 +203,15 @@ DockItem::State DockItem::getState() const { - return (isAttached() ? (isFloating() ? FLOATING_STATE : DOCKED_STATE) : UNATTACHED); + if (isIconified()) { + return ICONIFIED_STATE; + } else if (isFloating() && isAttached()) { + return FLOATING_STATE; + } else if (isAttached()) { + return DOCKED_STATE; + } + + return UNATTACHED; } DockItem::State @@ -208,10 +223,12 @@ DockItem::Placement DockItem::getPlacement() const { - GdlDockPlacement placement = (GdlDockPlacement)NONE; - gdl_dock_object_child_placement(gdl_dock_object_get_parent_object (GDL_DOCK_OBJECT(_gdl_dock_item)), - GDL_DOCK_OBJECT(_gdl_dock_item), - &placement); + GdlDockPlacement placement = (GdlDockPlacement)TOP; + GdlDockObject *parent = gdl_dock_object_get_parent_object (GDL_DOCK_OBJECT(_gdl_dock_item)); + if (parent) { + gdl_dock_object_child_placement(parent, GDL_DOCK_OBJECT(_gdl_dock_item), &placement); + } + return (Placement)placement; } @@ -228,6 +245,12 @@ } void +DockItem::iconify() +{ + gdl_dock_item_iconify_item (GDL_DOCK_ITEM(_gdl_dock_item)); +} + +void DockItem::show_all() { gtk_widget_show_all(_gdl_dock_item); @@ -237,7 +260,11 @@ DockItem::present() { - if (isIconified() || !isAttached()) { + if (_prev_state == ICONIFIED_STATE) { + iconify(); + } + + else if (isIconified() || !isAttached()) { show(); } @@ -249,11 +276,14 @@ gtk_notebook_set_current_page(GTK_NOTEBOOK(gtk_widget_get_parent(_gdl_dock_item)), i); } + // always grab focus, even if we're already present grab_focus(); if (!isFloating() && getWidget().is_realized()) _dock.scrollToItem(*this); + + } @@ -336,6 +366,9 @@ void DockItem::_onHide() { + if (_prev_state == ICONIFIED_STATE) + _prev_state = DOCKED_STATE; + _signal_state_changed.emit(UNATTACHED, getState()); } === modified file 'src/ui/widget/dock-item.h' --- src/ui/widget/dock-item.h 2011-10-25 07:45:35 +0000 +++ src/ui/widget/dock-item.h 2012-01-16 03:51:57 +0000 @@ -35,7 +35,8 @@ enum State { UNATTACHED, // item not bound to the dock (a temporary state) FLOATING_STATE, // item not in its dock (but can be docked in other, // e.g. floating, docks) - DOCKED_STATE }; // item in its assigned dock + DOCKED_STATE, // item in its assigned dock + ICONIFIED_STATE};// item in its assigned dock and iconified enum Placement { NONE = GDL_DOCK_NONE, @@ -48,7 +49,7 @@ }; DockItem(Dock& dock, const Glib::ustring& name, const Glib::ustring& long_name, - const Glib::ustring& icon_name, State state); + const Glib::ustring& icon_name, State state, Placement placement); ~DockItem(); @@ -78,6 +79,7 @@ void hide(); void show(); + void iconify(); void show_all(); void present(); === modified file 'src/ui/widget/imagetoggler.cpp' --- src/ui/widget/imagetoggler.cpp 2010-11-17 02:12:56 +0000 +++ src/ui/widget/imagetoggler.cpp 2012-01-16 03:51:57 +0000 @@ -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 @@ 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); }