summaryrefslogtreecommitdiffstats
path: root/src/dialogs/iconpreview.cpp
diff options
context:
space:
mode:
authorgustav_b <gustav_b@users.sourceforge.net>2007-12-07 01:41:04 +0000
committergustav_b <gustav_b@users.sourceforge.net>2007-12-07 01:41:04 +0000
commit1d22b74180777745a27e7ddbd3006c950063cf41 (patch)
treedf270c16e2856da62210ce610e3da52c45fe6c0d /src/dialogs/iconpreview.cpp
parentFized crashes & odd behaviour when resizing, zooming and rotating feTurbulence (diff)
downloadinkscape-1d22b74180777745a27e7ddbd3006c950063cf41.tar.gz
inkscape-1d22b74180777745a27e7ddbd3006c950063cf41.zip
Rework dialog management. Use singleton behavior for dialogs when
started in floating dialogs mode and use one dialog/desktop behavior when started in dockable dialogs mode. Replace the panels use of the SP_ACTIVE_DESKTOP macro and unify the panels' handling of desktop activation events. (bzr r4188)
Diffstat (limited to 'src/dialogs/iconpreview.cpp')
-rw-r--r--src/dialogs/iconpreview.cpp12
1 files changed, 4 insertions, 8 deletions
diff --git a/src/dialogs/iconpreview.cpp b/src/dialogs/iconpreview.cpp
index c36414705..e61b7d7f9 100644
--- a/src/dialogs/iconpreview.cpp
+++ b/src/dialogs/iconpreview.cpp
@@ -47,18 +47,14 @@ namespace UI {
namespace Dialogs {
-IconPreviewPanel* IconPreviewPanel::instance = 0;
-
IconPreviewPanel&
IconPreviewPanel::getInstance()
{
- if ( !instance ) {
- instance = new IconPreviewPanel();
- }
+ IconPreviewPanel &instance = *new IconPreviewPanel();
- instance->refreshPreview();
+ instance.refreshPreview();
- return *instance;
+ return instance;
}
//#########################################################################
@@ -214,7 +210,7 @@ IconPreviewPanel::IconPreviewPanel() :
void IconPreviewPanel::refreshPreview()
{
- SPDesktop *desktop = SP_ACTIVE_DESKTOP;
+ SPDesktop *desktop = getDesktop();
if ( desktop ) {
if ( selectionButton && selectionButton->get_active() )