From d019e72415a54674847e10c2cd8e09087ff59bf3 Mon Sep 17 00:00:00 2001 From: Nyall Dawson Date: Thu, 21 May 2015 19:47:20 +1000 Subject: [PATCH] Remove option to set icon themes --- src/app/qgisapp.cpp | 3 --- src/app/qgsoptions.cpp | 45 ---------------------------------------- src/app/qgsoptions.h | 7 ------- src/ui/qgsoptionsbase.ui | 45 +--------------------------------------- 4 files changed, 1 insertion(+), 99 deletions(-) diff --git a/src/app/qgisapp.cpp b/src/app/qgisapp.cpp index 5fdbbf21af0..2404d0b1bf7 100644 --- a/src/app/qgisapp.cpp +++ b/src/app/qgisapp.cpp @@ -7704,9 +7704,6 @@ void QgisApp::showOptionsDialog( QWidget *parent, QString currentPage ) if ( optionsDialog->exec() ) { - // set the theme if it changed - setTheme( optionsDialog->theme() ); - QgsProject::instance()->layerTreeRegistryBridge()->setNewLayersVisible( mySettings.value( "/qgis/new_layers_visible", true ).toBool() ); setupLayerTreeViewFromSettings(); diff --git a/src/app/qgsoptions.cpp b/src/app/qgsoptions.cpp index ed53cb75f67..904486f4678 100644 --- a/src/app/qgsoptions.cpp +++ b/src/app/qgsoptions.cpp @@ -83,10 +83,6 @@ QgsOptions::QgsOptions( QWidget *parent, Qt::WindowFlags fl ) : mStyleSheetNewOpts = mStyleSheetBuilder->defaultOptions(); mStyleSheetOldOpts = QMap( mStyleSheetNewOpts ); - connect( cmbTheme, SIGNAL( activated( const QString& ) ), this, SLOT( themeChanged( const QString& ) ) ); - connect( cmbTheme, SIGNAL( highlighted( const QString& ) ), this, SLOT( themeChanged( const QString& ) ) ); - connect( cmbTheme, SIGNAL( textChanged( const QString& ) ), this, SLOT( themeChanged( const QString& ) ) ); - connect( mFontFamilyRadioCustom, SIGNAL( toggled( bool ) ), mFontFamilyComboBox, SLOT( setEnabled( bool ) ) ); connect( cmbIconSize, SIGNAL( activated( const QString& ) ), this, SLOT( iconSizeChanged( const QString& ) ) ); @@ -301,9 +297,6 @@ QgsOptions::QgsOptions( QWidget *parent, Qt::WindowFlags fl ) : //wms search server leWmsSearch->setText( settings.value( "/qgis/WMSSearchUrl", "http://geopole.org/wms/search?search=%1&type=rss" ).toString() ); - // set the current theme - cmbTheme->setItemText( cmbTheme->currentIndex(), settings.value( "/Themes" ).toString() ); - // set the attribute table default filter cmbAttrTableBehaviour->clear(); cmbAttrTableBehaviour->addItem( tr( "Show all features" ), QgsAttributeTableFilterModel::ShowAll ); @@ -488,22 +481,6 @@ QgsOptions::QgsOptions( QWidget *parent, Qt::WindowFlags fl ) : mKeepBaseUnitCheckBox->setChecked( false ); } - - // add the themes to the combo box on the option dialog - QDir myThemeDir( ":/images/themes/" ); - myThemeDir.setFilter( QDir::Dirs ); - QStringList myDirList = myThemeDir.entryList( QStringList( "*" ) ); - cmbTheme->clear(); - for ( int i = 0; i < myDirList.count(); i++ ) - { - if ( myDirList[i] != "." && myDirList[i] != ".." ) - { - cmbTheme->addItem( myDirList[i] ); - } - } - - // set the theme combo - cmbTheme->setCurrentIndex( cmbTheme->findText( settings.value( "/Themes", "default" ).toString() ) ); cmbIconSize->setCurrentIndex( cmbIconSize->findText( settings.value( "/IconSize", QGIS_ICON_SIZE ).toString() ) ); // set font size and family @@ -945,12 +922,6 @@ void QgsOptions::on_pbnTemplateFolderReset_pressed() leTemplateFolder->setText( QgsApplication::qgisSettingsDirPath() + QString( "project_templates" ) ); } -void QgsOptions::themeChanged( const QString &newThemeName ) -{ - // Slot to change the theme as user scrolls through the choices - QgisApp::instance()->setTheme( newThemeName ); -} - void QgsOptions::iconSizeChanged( const QString &iconSize ) { QgisApp::instance()->setIconSizes( iconSize.toInt() ); @@ -978,12 +949,6 @@ void QgsOptions::on_mProjectOnLaunchPushBtn_pressed() } } -QString QgsOptions::theme() -{ - // returns the current theme (as selected in the cmbTheme combo box) - return cmbTheme->currentText(); -} - void QgsOptions::saveOptions() { QSettings settings; @@ -1142,16 +1107,6 @@ void QgsOptions::saveOptions() settings.setValue( "/qgis/nullValue", leNullValue->text() ); settings.setValue( "/qgis/style", cmbStyle->currentText() ); - - if ( cmbTheme->currentText().length() == 0 ) - { - settings.setValue( "/Themes", "default" ); - } - else - { - settings.setValue( "/Themes", cmbTheme->currentText() ); - } - settings.setValue( "/IconSize", cmbIconSize->currentText() ); settings.setValue( "/qgis/messageTimeout", mMessageTimeoutSpnBx->value() ); diff --git a/src/app/qgsoptions.h b/src/app/qgsoptions.h index 51ed87a894a..bfdcbfbda10 100644 --- a/src/app/qgsoptions.h +++ b/src/app/qgsoptions.h @@ -46,11 +46,6 @@ class APP_EXPORT QgsOptions : public QgsOptionsDialogBase, private Ui::QgsOption QgsOptions( QWidget *parent = 0, Qt::WindowFlags fl = QgisGui::ModalDialogFlags ); //! Destructor ~QgsOptions(); - /** - * Return the currently selected theme - * @return theme name (a directory name in the themes directory) - */ - QString theme(); /** Sets the page with the specified widget name as the current page * @note added in QGIS 2.1 @@ -76,8 +71,6 @@ class APP_EXPORT QgsOptions : public QgsOptionsDialogBase, private Ui::QgsOption * Slot to reset any temporarily applied options on dialog close/cancel */ void rejectOptions(); //! Slot to change the theme this is handled when the user - // activates or highlights a theme name in the drop-down list - void themeChanged( const QString & ); void iconSizeChanged( const QString &iconSize ); diff --git a/src/ui/qgsoptionsbase.ui b/src/ui/qgsoptionsbase.ui index 0a836d35b90..edd44c26c7f 100644 --- a/src/ui/qgsoptionsbase.ui +++ b/src/ui/qgsoptionsbase.ui @@ -311,7 +311,7 @@ 0 0 635 - 670 + 635 @@ -351,48 +351,6 @@ - - - - - - - 0 - 0 - - - - Icon theme - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - false - - - - - - - - - - @@ -4960,7 +4918,6 @@ mOptionsListWidget mOptionsScrollArea_01 cmbStyle - cmbTheme cmbIconSize mFontFamilyRadioQt mFontFamilyRadioCustom