summaryrefslogtreecommitdiffstats
path: root/src/ui/dialog/dialog-manager.cpp
diff options
context:
space:
mode:
authorgustav_b <gustav_b@users.sourceforge.net>2007-11-22 00:14:41 +0000
committergustav_b <gustav_b@users.sourceforge.net>2007-11-22 00:14:41 +0000
commit5caa6ff4dfb7b538555d60fa2732272bf8b9828b (patch)
tree65c6fb0232f8621fa6cecdcdf68d0790bd955777 /src/ui/dialog/dialog-manager.cpp
parentFix ordering of LPE parameters (no longer use map, just use vector) (diff)
downloadinkscape-5caa6ff4dfb7b538555d60fa2732272bf8b9828b.tar.gz
inkscape-5caa6ff4dfb7b538555d60fa2732272bf8b9828b.zip
The dialog to panel refactoring:
* Made the current dialogs subclass the Panel class instead of the Dialog class. * Extended the Panel class with some functionality that the dialogs relied on. * Added a PanelDialog class which is a dialog container for a single panel with the dialog behavior as a template parameter. (* Fixed coding style for the Panel and Dialog class) For details, see http://www.nabble.com/Re%3A-Dockable-dialogs%2C-todo-list-p12728194.html http://www.nabble.com/Re%3A-Inkscape-overcomes-Xara-in-Google-Trends-p13126622.html (bzr r4126)
Diffstat (limited to 'src/ui/dialog/dialog-manager.cpp')
-rw-r--r--src/ui/dialog/dialog-manager.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/ui/dialog/dialog-manager.cpp b/src/ui/dialog/dialog-manager.cpp
index e5d326efe..f8c07cf53 100644
--- a/src/ui/dialog/dialog-manager.cpp
+++ b/src/ui/dialog/dialog-manager.cpp
@@ -37,6 +37,7 @@
#include "ui/dialog/transformation.h"
#include "ui/dialog/undo-history.h"
#include "ui/dialog/xml-editor.h"
+#include "ui/dialog/panel-dialog.h"
#include "dialogs/layers-panel.h"
#include "dialogs/tiledialog.h"
@@ -51,8 +52,10 @@ namespace Dialog {
namespace {
+using namespace Behavior;
+
template <typename T, typename B>
-inline Dialog *create() { return T::create(&B::create); }
+inline Dialog *create() { return PanelDialog<B>::template create<T>(); }
}
@@ -101,6 +104,7 @@ DialogManager::DialogManager() {
registerFactory("Memory", &create<Memory, FloatingBehavior>);
registerFactory("Messages", &create<Messages, FloatingBehavior>);
registerFactory("Script", &create<ScriptDialog, FloatingBehavior>);
+ registerFactory("Swatches", &create<SwatchesPanel, FloatingBehavior>);
registerFactory("TextProperties", &create<TextProperties, FloatingBehavior>);
registerFactory("TileDialog", &create<TileDialog, FloatingBehavior>);
registerFactory("Trace", &create<TraceDialog, FloatingBehavior>);
@@ -126,6 +130,7 @@ DialogManager::DialogManager() {
registerFactory("Memory", &create<Memory, DockBehavior>);
registerFactory("Messages", &create<Messages, DockBehavior>);
registerFactory("Script", &create<ScriptDialog, DockBehavior>);
+ registerFactory("Swatches", &create<SwatchesPanel, DockBehavior>);
registerFactory("TextProperties", &create<TextProperties, DockBehavior>);
registerFactory("TileDialog", &create<TileDialog, DockBehavior>);
registerFactory("Trace", &create<TraceDialog, DockBehavior>);