diff --git a/code/nel/include/nel/gui/libwww.h b/code/nel/include/nel/gui/libwww.h index 6a744b8c0..bb6b2da86 100644 --- a/code/nel/include/nel/gui/libwww.h +++ b/code/nel/include/nel/gui/libwww.h @@ -25,6 +25,8 @@ extern "C" #include "WWWInit.h" } +#include "nel/misc/rgba.h" + namespace NLGUI { class CCtrlBaseButton; diff --git a/code/nel/include/nel/misc/path.h b/code/nel/include/nel/misc/path.h index f3120c907..cd19c43ee 100644 --- a/code/nel/include/nel/misc/path.h +++ b/code/nel/include/nel/misc/path.h @@ -507,6 +507,13 @@ public: */ static bool makePathRelative (const char *basePath, std::string &relativePath); + /** Make path absolute + * \param relativePath - The relative path + * \param directory - the directory to which the path is relative to + * returns the absolute path, or empty if something went wrong. + */ + static std::string makePathAbsolute (const std::string &relativePath, const std::string &directory ); + /** If File in this list is added more than one in an addSearchPath, it doesn't launch a warning. */ static void addIgnoredDoubleFile(const std::string &ignoredFile); diff --git a/code/nel/src/misc/path.cpp b/code/nel/src/misc/path.cpp index d47b8ce4a..2a25276e8 100644 --- a/code/nel/src/misc/path.cpp +++ b/code/nel/src/misc/path.cpp @@ -2544,6 +2544,57 @@ bool CPath::makePathRelative (const char *basePath, std::string &relativePath) return false; } +std::string CPath::makePathAbsolute( const std::string &relativePath, const std::string &directory ) +{ + if( relativePath.empty() ) + return ""; + if( directory.empty() ) + return ""; + +#ifdef NL_OS_WINDOWS + // Windows network address. Eg.: \\someshare\path + if( ( relativePath[ 0 ] == '\\' ) && ( relativePath[ 1 ] == '\\' ) ) + return relativePath; + + // Normal Windows absolute path. Eg.: C:\something + // + if( isalpha( relativePath[ 0 ] ) && ( relativePath[ 1 ] == ':' ) && ( ( relativePath[ 2 ] == '\\' ) || ( relativePath[ 2 ] == '/' ) ) ) + return relativePath; +#else + // Unix filesystem absolute path + if( relativePath[ 0 ] == '/' ) + return relativePath; + +#endif + + // Add a slash to the directory if necessary. + // If the relative path starts with dots we need a slash. + // If the relative path starts with a slash we don't. + // If it starts with neither, we need a slash. + bool needSlash = true; + char c = relativePath[ 0 ]; + if( ( c == '\\' ) || ( c == '/' ) ) + needSlash = false; + + bool hasSlash = false; + std::string npath = directory; + c = npath[ npath.size() - 1 ]; + if( ( c == '\\' ) || ( c == '/' ) ) + hasSlash = true; + + if( needSlash && !hasSlash ) + npath += '/'; + else + if( hasSlash && !needSlash ) + npath.resize( npath.size() - 1 ); + + // Now build the new absolute path + npath += relativePath; + npath = standardizePath( npath, false ); + + return npath; +} + bool CFile::setRWAccess(const std::string &filename) { #ifdef NL_OS_WINDOWS diff --git a/code/studio/CMakeLists.txt b/code/studio/CMakeLists.txt index bf9ee062c..c10f2ea59 100644 --- a/code/studio/CMakeLists.txt +++ b/code/studio/CMakeLists.txt @@ -10,15 +10,18 @@ IF(WIN32) SET(OVQT_PLUGIN_SPECS_DIR "plugins") SET(OVQT_PLUGIN_DIR "plugins") SET(OVQT_DATA_DIR ".") + SET(OVQT_IMP_DATA_DIR "${OVQT_DATA_DIR}") ELSEIF(APPLE) # TODO: under Mac OS X, don't install but copy files in application package SET(OVQT_PLUGIN_SPECS_DIR "plugins") SET(OVQT_PLUGIN_DIR "plugins") SET(OVQT_DATA_DIR ".") + SET(OVQT_IMP_DATA_DIR "${OVQT_DATA_DIR}") ELSE(WIN32) SET(OVQT_PLUGIN_SPECS_DIR ${NL_SHARE_PREFIX}/studio/plugins) SET(OVQT_PLUGIN_DIR ${NL_LIB_PREFIX}/studio) SET(OVQT_DATA_DIR ${NL_SHARE_PREFIX}/studio/data) + SET(OVQT_IMP_DATA_DIR "${CMAKE_INSTALL_PREFIX}/${OVQT_DATA_DIR}") CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/ovqt_config.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/ovqt_config.h) INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR}) diff --git a/code/studio/src/CMakeLists.txt b/code/studio/src/CMakeLists.txt index 9bc071bf2..510f0f93b 100644 --- a/code/studio/src/CMakeLists.txt +++ b/code/studio/src/CMakeLists.txt @@ -11,7 +11,7 @@ FILE(GLOB STUDIO_SRC extension_system/*.h SET(STUDIO_HDR extension_system/iplugin_manager.h extension_system/plugin_manager.h - settings_dialog.h + startup_settings_dlg.h splash_screen.h pm_watcher.h ) @@ -22,7 +22,7 @@ SET(STUDIO_TS translations/object_viewer_qt_en.ts translations/object_viewer_qt_de.ts translations/object_viewer_qt_ru.ts) -SET(STUDIO_PLUGIN_UIS settings_dialog.ui ) +SET(STUDIO_PLUGIN_UIS startup_settings_dlg.ui ) SET(QT_USE_QTGUI TRUE) SET(QT_USE_QTOPENGL TRUE) diff --git a/code/studio/src/main.cpp b/code/studio/src/main.cpp index e758037c0..dc1e7efb6 100644 --- a/code/studio/src/main.cpp +++ b/code/studio/src/main.cpp @@ -41,7 +41,7 @@ #include #include -#include "settings_dialog.h" +#include "startup_settings_dlg.h" #include "splash_screen.h" #include "pm_watcher.h" @@ -160,7 +160,7 @@ int main(int argc, char **argv) { settings->setValue( "FirstRun", false ); - SettingsDialog sd; + StartupSettingsDlg sd; sd.setSettings( settings ); sd.load(); sd.exec(); diff --git a/code/studio/src/plugins/core/CMakeLists.txt b/code/studio/src/plugins/core/CMakeLists.txt index 2c21c9b58..db99b807c 100644 --- a/code/studio/src/plugins/core/CMakeLists.txt +++ b/code/studio/src/plugins/core/CMakeLists.txt @@ -38,6 +38,10 @@ SET(OVQT_CORE_PLUGIN_UIS settings_dialog.ui SET(OVQT_CORE_PLUGIN_RCS core.qrc) +IF(NOT WIN32) +CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/core_config.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/core_config.h) +ENDIF(NOT WIN32) + SET(QT_USE_QTGUI TRUE) SET(QT_USE_QTOPENGL TRUE) diff --git a/code/studio/src/plugins/core/core_config.h.cmake b/code/studio/src/plugins/core/core_config.h.cmake new file mode 100644 index 000000000..1aab54c12 --- /dev/null +++ b/code/studio/src/plugins/core/core_config.h.cmake @@ -0,0 +1,7 @@ +#ifndef CORE_CONFIG_H +#define CORE_CONFIG_H + +#define STUDIO_DATA_DIR "${OVQT_IMP_DATA_DIR}" + +#endif + diff --git a/code/studio/src/plugins/core/search_paths_settings_page.cpp b/code/studio/src/plugins/core/search_paths_settings_page.cpp index e76d6c796..516d3d3f3 100644 --- a/code/studio/src/plugins/core/search_paths_settings_page.cpp +++ b/code/studio/src/plugins/core/search_paths_settings_page.cpp @@ -28,6 +28,10 @@ #include #include +#if !defined NL_OS_WINDOWS +#include "core_config.h" +#endif + namespace Core { @@ -118,6 +122,10 @@ void SearchPathsSettingsPage::applySearchPaths() for (int i = 1; i < remapExt.size(); i += 2) NLMISC::CPath::remapExtension(remapExt.at(i - 1).toUtf8().constData(), remapExt.at(i).toUtf8().constData(), true); +#if !defined NL_OS_WINDOWS + NLMISC::CPath::addSearchPath(std::string(STUDIO_DATA_DIR), false, false); +#endif + Q_FOREACH(QString path, paths) { NLMISC::CPath::addSearchPath(path.toUtf8().constData(), m_recurse, false); @@ -216,4 +224,4 @@ void SearchPathsSettingsPage::checkEnabledButton() m_ui.downToolButton->setEnabled(bEnabled); } -} /* namespace Core */ \ No newline at end of file +} /* namespace Core */ diff --git a/code/studio/src/plugins/core/settings_dialog.cpp b/code/studio/src/plugins/core/settings_dialog.cpp index 0b38e4e80..b1027212c 100644 --- a/code/studio/src/plugins/core/settings_dialog.cpp +++ b/code/studio/src/plugins/core/settings_dialog.cpp @@ -145,11 +145,17 @@ void SettingsDialog::pageSelected() void SettingsDialog::accept() { m_applied = true; + + setCursor( Qt::WaitCursor ); + Q_FOREACH(IOptionsPage *page, m_pages) { page->apply(); page->finish(); } + + setCursor( Qt::ArrowCursor ); + done(QDialog::Accepted); } @@ -162,8 +168,13 @@ void SettingsDialog::reject() void SettingsDialog::apply() { + setCursor( Qt::WaitCursor ); + Q_FOREACH(IOptionsPage *page, m_pages) page->apply(); + + setCursor( Qt::ArrowCursor ); + m_applied = true; } diff --git a/code/studio/src/plugins/core/settings_dialog.h b/code/studio/src/plugins/core/settings_dialog.h index a90f88b18..9e1c86444 100644 --- a/code/studio/src/plugins/core/settings_dialog.h +++ b/code/studio/src/plugins/core/settings_dialog.h @@ -19,7 +19,7 @@ #ifndef SETTINGS_DIALOG_H #define SETTINGS_DIALOG_H -#include "../core/ui_settings_dialog.h" +#include "ui_settings_dialog.h" // Qt includes #include diff --git a/code/studio/src/plugins/gui_editor/CMakeLists.txt b/code/studio/src/plugins/gui_editor/CMakeLists.txt index e1e8b38be..f2f5bfcb1 100644 --- a/code/studio/src/plugins/gui_editor/CMakeLists.txt +++ b/code/studio/src/plugins/gui_editor/CMakeLists.txt @@ -4,6 +4,8 @@ INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR} ${QT_INCLUDES} ${LUA_INCLUDE_DIR}) +CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/gui_editor_config.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/gui_editor_config.h) + FILE(GLOB SRC *.cpp *.h) SET(OVQT_EXT_SYS_SRC ${CMAKE_CURRENT_SOURCE_DIR}/../../extension_system/iplugin.h @@ -112,3 +114,11 @@ ELSE(WIN32) ENDIF(WIN32) INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/studio_plugin_gui_editor.xml DESTINATION ${OVQT_PLUGIN_SPECS_DIR} COMPONENT tools3d) + +FILE(GLOB widgets "${CMAKE_CURRENT_SOURCE_DIR}/widgets/*.xml") +FILE(GLOB expressions "${CMAKE_CURRENT_SOURCE_DIR}/expressions/*.xml") + +INSTALL(FILES ${widgets} DESTINATION "${OVQT_DATA_DIR}/widgets" COMPONENT tools3d) +INSTALL(FILES ${expressions} DESTINATION "${OVQT_DATA_DIR}/expressions" COMPONENT tools3d) + +INSTALL(DIRECTORY fonts/ DESTINATION ${OVQT_DATA_DIR} COMPONENT data) diff --git a/code/studio/src/plugins/gui_editor/expression_store.cpp b/code/studio/src/plugins/gui_editor/expression_store.cpp index 9f2218b4e..0016374d3 100644 --- a/code/studio/src/plugins/gui_editor/expression_store.cpp +++ b/code/studio/src/plugins/gui_editor/expression_store.cpp @@ -21,6 +21,7 @@ #include "expression_loader.h" #include #include +#include "gui_editor_config.h" class ExpressionStorePvt { @@ -50,7 +51,7 @@ ExpressionStore::~ExpressionStore() bool ExpressionStore::load() { - QDir d( "expressions" ); + QDir d( EXPRESSIONS_DIR ); if( !d.exists() ) return false; diff --git a/code/studio/src/plugins/gui_editor/fonts/ryzom.ttf b/code/studio/src/plugins/gui_editor/fonts/ryzom.ttf new file mode 100644 index 000000000..c1b19d870 Binary files /dev/null and b/code/studio/src/plugins/gui_editor/fonts/ryzom.ttf differ diff --git a/code/studio/src/plugins/gui_editor/gui_editor_config.h.cmake b/code/studio/src/plugins/gui_editor/gui_editor_config.h.cmake new file mode 100644 index 000000000..0e36dcb79 --- /dev/null +++ b/code/studio/src/plugins/gui_editor/gui_editor_config.h.cmake @@ -0,0 +1,8 @@ +#ifndef GUI_EDITOR_CONFIG_H +#define GUI_EDITOR_CONFIG_H + +#define WIDGETS_DIR "${OVQT_IMP_DATA_DIR}/widgets" +#define EXPRESSIONS_DIR "${OVQT_IMP_DATA_DIR}/expressions" + +#endif + diff --git a/code/studio/src/plugins/gui_editor/widget_properties_parser.cpp b/code/studio/src/plugins/gui_editor/widget_properties_parser.cpp index e0f346fc9..fd74dcae4 100644 --- a/code/studio/src/plugins/gui_editor/widget_properties_parser.cpp +++ b/code/studio/src/plugins/gui_editor/widget_properties_parser.cpp @@ -20,6 +20,7 @@ #include #include "nel/misc/debug.h" #include "widget_info_tree.h" +#include "gui_editor_config.h" using namespace NLMISC; @@ -36,7 +37,7 @@ namespace GUIEditor void CWidgetPropParser::parseGUIWidgets() { - QDir d( "widgets" ); + QDir d( WIDGETS_DIR ); if( !d.exists() ) { nlwarning( "GUI widgets directory doesn't exist!" ); @@ -55,7 +56,7 @@ namespace GUIEditor QStringListIterator itr( files ); while( itr.hasNext() ) - parseGUIWidget( "widgets/" + itr.next() ); + parseGUIWidget( QString( WIDGETS_DIR ) + QString( "/" ) + itr.next() ); buildWidgetInfoTree(); diff --git a/code/studio/src/plugins/world_editor/world_editor_misc.cpp b/code/studio/src/plugins/world_editor/world_editor_misc.cpp index 5d6b7f94e..a2736b1c5 100644 --- a/code/studio/src/plugins/world_editor/world_editor_misc.cpp +++ b/code/studio/src/plugins/world_editor/world_editor_misc.cpp @@ -59,6 +59,8 @@ bool loadWorldEditFile(const std::string &fileName, WorldEditList &worldEditList lastError = ""; + std::string p = NLMISC::CFile::getPath( fileName ); + // Load the document NLMISC::CIFile file; if (file.open(fileName)) @@ -122,6 +124,8 @@ bool loadWorldEditFile(const std::string &fileName, WorldEditList &worldEditList { std::string dataDir; NLMISC::CIXml::getPropertyString(dataDir, node, "VALUE"); + + dataDir = NLMISC::CPath::makePathAbsolute( dataDir, p ); worldEditList.push_back(WorldEditItem(DataDirectoryType, dataDir)); } @@ -149,6 +153,9 @@ bool loadWorldEditFile(const std::string &fileName, WorldEditList &worldEditList std::string filenameChild; if ( NLMISC::CIXml::getPropertyString(filenameChild, node, "FILENAME")) { + + filenameChild = NLMISC::CPath::makePathAbsolute( filenameChild, p ); + // Is it a landscape ? if (type == "landscape") { diff --git a/code/studio/src/plugins/world_editor/world_editor_settings_page.cpp b/code/studio/src/plugins/world_editor/world_editor_settings_page.cpp index bb8ef2a00..d3b8bb849 100644 --- a/code/studio/src/plugins/world_editor/world_editor_settings_page.cpp +++ b/code/studio/src/plugins/world_editor/world_editor_settings_page.cpp @@ -17,9 +17,11 @@ // Project includes #include "world_editor_settings_page.h" #include "world_editor_constants.h" +#include "../core/icore.h" // Qt includes #include +#include // NeL includes @@ -61,11 +63,31 @@ QWidget *WorldEditorSettingsPage::createPage(QWidget *parent) { m_currentPage = new QWidget(parent); m_ui.setupUi(m_currentPage); + readSettings(); + return m_currentPage; } +void WorldEditorSettingsPage::readSettings() +{ + QSettings *settings = Core::ICore::instance()->settings(); + settings->beginGroup(Constants::WORLD_EDITOR_SECTION); + bool b = false; + + b = settings->value( Constants::WORLD_EDITOR_USE_OPENGL, true ).toBool(); + m_ui.glCB->setChecked( b ); + + settings->endGroup(); +} + void WorldEditorSettingsPage::apply() { + QSettings *settings = Core::ICore::instance()->settings(); + settings->beginGroup(Constants::WORLD_EDITOR_SECTION); + bool b = false; + b = m_ui.glCB->isChecked(); + settings->setValue( Constants::WORLD_EDITOR_USE_OPENGL, b ); + settings->endGroup(); } } /* namespace WorldEditor */ \ No newline at end of file diff --git a/code/studio/src/plugins/world_editor/world_editor_settings_page.h b/code/studio/src/plugins/world_editor/world_editor_settings_page.h index aa7677b9f..7eeb30e1d 100644 --- a/code/studio/src/plugins/world_editor/world_editor_settings_page.h +++ b/code/studio/src/plugins/world_editor/world_editor_settings_page.h @@ -46,6 +46,7 @@ public: QIcon categoryIcon() const; virtual QWidget *createPage(QWidget *parent); + virtual void readSettings(); virtual void apply(); virtual void finish() {} diff --git a/code/studio/src/plugins/world_editor/world_editor_settings_page.ui b/code/studio/src/plugins/world_editor/world_editor_settings_page.ui index 9219da6c4..a5cb12559 100644 --- a/code/studio/src/plugins/world_editor/world_editor_settings_page.ui +++ b/code/studio/src/plugins/world_editor/world_editor_settings_page.ui @@ -3,7 +3,7 @@ WorldEditorSettingsPage - false + true @@ -25,6 +25,9 @@ + + true + Workspace @@ -37,10 +40,18 @@ - + + + false + + - + + + false + + @@ -50,15 +61,32 @@ - + + + false + + - + + + false + + - + + + true + - Use OpenGL + Use OpenGL ( requires restart ) + + + true + + + false @@ -79,7 +107,11 @@ - + + + false + + @@ -89,7 +121,11 @@ - + + + false + + @@ -101,10 +137,17 @@ - + + + false + + + + false + ... diff --git a/code/studio/src/plugins/world_editor/world_editor_window.cpp b/code/studio/src/plugins/world_editor/world_editor_window.cpp index cec3baee1..6dbd07a8a 100644 --- a/code/studio/src/plugins/world_editor/world_editor_window.cpp +++ b/code/studio/src/plugins/world_editor/world_editor_window.cpp @@ -436,6 +436,7 @@ void WorldEditorWindow::writeSettings() settings->beginGroup(Constants::WORLD_EDITOR_SECTION); settings->setValue(Constants::WORLD_WINDOW_STATE, saveState()); settings->setValue(Constants::WORLD_WINDOW_GEOMETRY, saveGeometry()); + settings->setValue(Constants::WORLD_EDITOR_USE_OPENGL, settings->value(Constants::WORLD_EDITOR_USE_OPENGL)); settings->endGroup(); settings->sync(); } diff --git a/code/studio/src/settings_dialog.cpp b/code/studio/src/startup_settings_dlg.cpp similarity index 84% rename from code/studio/src/settings_dialog.cpp rename to code/studio/src/startup_settings_dlg.cpp index df2718b9b..645df7040 100644 --- a/code/studio/src/settings_dialog.cpp +++ b/code/studio/src/startup_settings_dlg.cpp @@ -15,7 +15,7 @@ // along with this program. If not, see . -#include "settings_dialog.h" +#include "startup_settings_dlg.h" #include #include #include @@ -32,7 +32,7 @@ int findListItem( QListWidget *l, const QString &s ) return -1; } -SettingsDialog::SettingsDialog( QDialog *parent ) : +StartupSettingsDlg::StartupSettingsDlg( QDialog *parent ) : QDialog( parent ) { setupUi( this ); @@ -40,11 +40,11 @@ QDialog( parent ) settings = NULL; } -SettingsDialog::~SettingsDialog() +StartupSettingsDlg::~StartupSettingsDlg() { } -void SettingsDialog::load() +void StartupSettingsDlg::load() { pluginsLE->setText( settings->value( "PluginPath" ).toString() ); @@ -82,7 +82,7 @@ void SettingsDialog::load() settings->endGroup(); } -void SettingsDialog::saveSearchPaths() +void StartupSettingsDlg::saveSearchPaths() { QStringList l; for( int i = 0; i < searchLW->count(); i++ ) @@ -93,7 +93,7 @@ void SettingsDialog::saveSearchPaths() settings->setValue( "SearchPaths", l ); } -void SettingsDialog::saveRecursivePaths() +void StartupSettingsDlg::saveRecursivePaths() { QStringList l; for( int i = 0; i < recursiveLW->count(); i++ ) @@ -104,7 +104,7 @@ void SettingsDialog::saveRecursivePaths() settings->setValue( "RecursiveSearchPathes", l ); } -void SettingsDialog::save() +void StartupSettingsDlg::save() { settings->setValue( "PluginPath", pluginsLE->text() ); @@ -123,59 +123,59 @@ void SettingsDialog::save() settings->sync(); } -void SettingsDialog::accept() +void StartupSettingsDlg::accept() { save(); QDialog::accept(); } -void SettingsDialog::reject() +void StartupSettingsDlg::reject() { QDialog::reject(); } -void SettingsDialog::onOKClicked() +void StartupSettingsDlg::onOKClicked() { accept(); } -void SettingsDialog::onCancelClicked() +void StartupSettingsDlg::onCancelClicked() { reject(); } -void SettingsDialog::onPluginBClicked() +void StartupSettingsDlg::onPluginBClicked() { QString p = QFileDialog::getExistingDirectory( this, tr( "Plugins directory" ), "" ); pluginsLE->setText( p ); } -void SettingsDialog::onSheetsBClicked() +void StartupSettingsDlg::onSheetsBClicked() { QString p = QFileDialog::getExistingDirectory( this, tr( "Sheets directory" ), "" ); sheetsLE->setText( p ); } -void SettingsDialog::onAssetsBClicked() +void StartupSettingsDlg::onAssetsBClicked() { QString p = QFileDialog::getExistingDirectory( this, tr( "Assets directory" ), "" ); assetsLE->setText( p ); } -void SettingsDialog::onPrimitivesBClicked() +void StartupSettingsDlg::onPrimitivesBClicked() { QString p = QFileDialog::getExistingDirectory( this, tr( "Primitives directory" ), "" ); primitivesLE->setText( p ); } -void SettingsDialog::onLigoBClicked() +void StartupSettingsDlg::onLigoBClicked() { QString p; p = QFileDialog::getOpenFileName( this, tr( "LIGO config file" ), "" ); ligoLE->setText( p ); } -void SettingsDialog::onPathAddClicked() +void StartupSettingsDlg::onPathAddClicked() { QString p = QFileDialog::getExistingDirectory( this, tr( "Search path" ), "" ); if( p.isEmpty() ) @@ -187,7 +187,7 @@ void SettingsDialog::onPathAddClicked() searchLW->addItem( p ); } -void SettingsDialog::onPathRemoveClicked() +void StartupSettingsDlg::onPathRemoveClicked() { QListWidgetItem *i = searchLW->currentItem(); if( i == NULL ) @@ -196,7 +196,7 @@ void SettingsDialog::onPathRemoveClicked() delete i; } -void SettingsDialog::onRecursiveAddClicked() +void StartupSettingsDlg::onRecursiveAddClicked() { QString p = QFileDialog::getExistingDirectory( this, tr( "Recursive search path" ), "" ); if( p.isEmpty() ) @@ -208,7 +208,7 @@ void SettingsDialog::onRecursiveAddClicked() recursiveLW->addItem( p ); } -void SettingsDialog::onRecursiveRemoveClicked() +void StartupSettingsDlg::onRecursiveRemoveClicked() { QListWidgetItem *i = recursiveLW->currentItem(); if( i == NULL ) @@ -218,7 +218,7 @@ void SettingsDialog::onRecursiveRemoveClicked() } -void SettingsDialog::setupConnections() +void StartupSettingsDlg::setupConnections() { connect( bb, SIGNAL( accepted() ), this, SLOT( onOKClicked() ) ); connect( bb, SIGNAL( rejected() ), this, SLOT( onCancelClicked() ) ); diff --git a/code/studio/src/settings_dialog.h b/code/studio/src/startup_settings_dlg.h similarity index 84% rename from code/studio/src/settings_dialog.h rename to code/studio/src/startup_settings_dlg.h index 173ba37d4..49dd01ef7 100644 --- a/code/studio/src/settings_dialog.h +++ b/code/studio/src/startup_settings_dlg.h @@ -14,19 +14,19 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -#ifndef SETTINGS_DIALOG_H -#define SETTINGS_DIALOG_H +#ifndef STARTUP_SETTINGS_DIALOG_H +#define STARTUP_SETTINGS_DIALOG_H -#include "ui_settings_dialog.h" +#include "ui_startup_settings_dlg.h" class QSettings; -class SettingsDialog : public QDialog, public Ui::SettingsDialog +class StartupSettingsDlg : public QDialog, public Ui::StartupSettingsDlg { Q_OBJECT public: - SettingsDialog( QDialog *parent = NULL ); - ~SettingsDialog(); + StartupSettingsDlg( QDialog *parent = NULL ); + ~StartupSettingsDlg(); void setSettings( QSettings *s ){ settings = s; } diff --git a/code/studio/src/settings_dialog.ui b/code/studio/src/startup_settings_dlg.ui similarity index 95% rename from code/studio/src/settings_dialog.ui rename to code/studio/src/startup_settings_dlg.ui index 2fb6151d3..5f125ed14 100644 --- a/code/studio/src/settings_dialog.ui +++ b/code/studio/src/startup_settings_dlg.ui @@ -1,7 +1,7 @@ - SettingsDialog - + StartupSettingsDlg + Qt::ApplicationModal