index f8c07cf535c16e4bd99c7687a8ae86e02f93f31d..17215ac00a772f5e45be5d7111111a6218780a00 100644 (file)
// Appears to cause a segfault if we do
}
+
+DialogManager &DialogManager::getInstance()
+{
+ int dialogs_type = prefs_get_int_attribute_limited ("options.dialogtype", "value", DOCK, 0, 1);
+
+ /* Use singleton behavior for floating dialogs */
+ if (dialogs_type == FLOATING) {
+ static DialogManager *instance = 0;
+
+ if (!instance)
+ instance = new DialogManager();
+ return *instance;
+ }
+
+ return *new DialogManager();
+}
+
/**
* Registers a dialog factory function used to create the named dialog.
*/