Skip to content

Commit d019e72

Browse files
committedMay 21, 2015
Remove option to set icon themes
1 parent 4e09d4d commit d019e72

File tree

4 files changed

+1
-99
lines changed

4 files changed

+1
-99
lines changed
 

‎src/app/qgisapp.cpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7704,9 +7704,6 @@ void QgisApp::showOptionsDialog( QWidget *parent, QString currentPage )
77047704

77057705
if ( optionsDialog->exec() )
77067706
{
7707-
// set the theme if it changed
7708-
setTheme( optionsDialog->theme() );
7709-
77107707
QgsProject::instance()->layerTreeRegistryBridge()->setNewLayersVisible( mySettings.value( "/qgis/new_layers_visible", true ).toBool() );
77117708

77127709
setupLayerTreeViewFromSettings();

‎src/app/qgsoptions.cpp

Lines changed: 0 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -83,10 +83,6 @@ QgsOptions::QgsOptions( QWidget *parent, Qt::WindowFlags fl ) :
8383
mStyleSheetNewOpts = mStyleSheetBuilder->defaultOptions();
8484
mStyleSheetOldOpts = QMap<QString, QVariant>( mStyleSheetNewOpts );
8585

86-
connect( cmbTheme, SIGNAL( activated( const QString& ) ), this, SLOT( themeChanged( const QString& ) ) );
87-
connect( cmbTheme, SIGNAL( highlighted( const QString& ) ), this, SLOT( themeChanged( const QString& ) ) );
88-
connect( cmbTheme, SIGNAL( textChanged( const QString& ) ), this, SLOT( themeChanged( const QString& ) ) );
89-
9086
connect( mFontFamilyRadioCustom, SIGNAL( toggled( bool ) ), mFontFamilyComboBox, SLOT( setEnabled( bool ) ) );
9187

9288
connect( cmbIconSize, SIGNAL( activated( const QString& ) ), this, SLOT( iconSizeChanged( const QString& ) ) );
@@ -301,9 +297,6 @@ QgsOptions::QgsOptions( QWidget *parent, Qt::WindowFlags fl ) :
301297
//wms search server
302298
leWmsSearch->setText( settings.value( "/qgis/WMSSearchUrl", "http://geopole.org/wms/search?search=%1&type=rss" ).toString() );
303299

304-
// set the current theme
305-
cmbTheme->setItemText( cmbTheme->currentIndex(), settings.value( "/Themes" ).toString() );
306-
307300
// set the attribute table default filter
308301
cmbAttrTableBehaviour->clear();
309302
cmbAttrTableBehaviour->addItem( tr( "Show all features" ), QgsAttributeTableFilterModel::ShowAll );
@@ -488,22 +481,6 @@ QgsOptions::QgsOptions( QWidget *parent, Qt::WindowFlags fl ) :
488481
mKeepBaseUnitCheckBox->setChecked( false );
489482
}
490483

491-
492-
// add the themes to the combo box on the option dialog
493-
QDir myThemeDir( ":/images/themes/" );
494-
myThemeDir.setFilter( QDir::Dirs );
495-
QStringList myDirList = myThemeDir.entryList( QStringList( "*" ) );
496-
cmbTheme->clear();
497-
for ( int i = 0; i < myDirList.count(); i++ )
498-
{
499-
if ( myDirList[i] != "." && myDirList[i] != ".." )
500-
{
501-
cmbTheme->addItem( myDirList[i] );
502-
}
503-
}
504-
505-
// set the theme combo
506-
cmbTheme->setCurrentIndex( cmbTheme->findText( settings.value( "/Themes", "default" ).toString() ) );
507484
cmbIconSize->setCurrentIndex( cmbIconSize->findText( settings.value( "/IconSize", QGIS_ICON_SIZE ).toString() ) );
508485

509486
// set font size and family
@@ -945,12 +922,6 @@ void QgsOptions::on_pbnTemplateFolderReset_pressed()
945922
leTemplateFolder->setText( QgsApplication::qgisSettingsDirPath() + QString( "project_templates" ) );
946923
}
947924

948-
void QgsOptions::themeChanged( const QString &newThemeName )
949-
{
950-
// Slot to change the theme as user scrolls through the choices
951-
QgisApp::instance()->setTheme( newThemeName );
952-
}
953-
954925
void QgsOptions::iconSizeChanged( const QString &iconSize )
955926
{
956927
QgisApp::instance()->setIconSizes( iconSize.toInt() );
@@ -978,12 +949,6 @@ void QgsOptions::on_mProjectOnLaunchPushBtn_pressed()
978949
}
979950
}
980951

981-
QString QgsOptions::theme()
982-
{
983-
// returns the current theme (as selected in the cmbTheme combo box)
984-
return cmbTheme->currentText();
985-
}
986-
987952
void QgsOptions::saveOptions()
988953
{
989954
QSettings settings;
@@ -1142,16 +1107,6 @@ void QgsOptions::saveOptions()
11421107

11431108
settings.setValue( "/qgis/nullValue", leNullValue->text() );
11441109
settings.setValue( "/qgis/style", cmbStyle->currentText() );
1145-
1146-
if ( cmbTheme->currentText().length() == 0 )
1147-
{
1148-
settings.setValue( "/Themes", "default" );
1149-
}
1150-
else
1151-
{
1152-
settings.setValue( "/Themes", cmbTheme->currentText() );
1153-
}
1154-
11551110
settings.setValue( "/IconSize", cmbIconSize->currentText() );
11561111

11571112
settings.setValue( "/qgis/messageTimeout", mMessageTimeoutSpnBx->value() );

‎src/app/qgsoptions.h

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -46,11 +46,6 @@ class APP_EXPORT QgsOptions : public QgsOptionsDialogBase, private Ui::QgsOption
4646
QgsOptions( QWidget *parent = 0, Qt::WindowFlags fl = QgisGui::ModalDialogFlags );
4747
//! Destructor
4848
~QgsOptions();
49-
/**
50-
* Return the currently selected theme
51-
* @return theme name (a directory name in the themes directory)
52-
*/
53-
QString theme();
5449

5550
/** Sets the page with the specified widget name as the current page
5651
* @note added in QGIS 2.1
@@ -76,8 +71,6 @@ class APP_EXPORT QgsOptions : public QgsOptionsDialogBase, private Ui::QgsOption
7671
* Slot to reset any temporarily applied options on dialog close/cancel */
7772
void rejectOptions();
7873
//! Slot to change the theme this is handled when the user
79-
// activates or highlights a theme name in the drop-down list
80-
void themeChanged( const QString & );
8174

8275
void iconSizeChanged( const QString &iconSize );
8376

‎src/ui/qgsoptionsbase.ui

Lines changed: 1 addition & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -311,7 +311,7 @@
311311
<x>0</x>
312312
<y>0</y>
313313
<width>635</width>
314-
<height>670</height>
314+
<height>635</height>
315315
</rect>
316316
</property>
317317
<layout class="QVBoxLayout" name="verticalLayout_28">
@@ -351,48 +351,6 @@
351351
</item>
352352
</layout>
353353
</item>
354-
<item>
355-
<layout class="QHBoxLayout" name="horizontalLayout_3">
356-
<item>
357-
<widget class="QLabel" name="textLabel1_4">
358-
<property name="sizePolicy">
359-
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
360-
<horstretch>0</horstretch>
361-
<verstretch>0</verstretch>
362-
</sizepolicy>
363-
</property>
364-
<property name="text">
365-
<string>Icon theme</string>
366-
</property>
367-
</widget>
368-
</item>
369-
<item>
370-
<spacer name="horizontalSpacer_2">
371-
<property name="orientation">
372-
<enum>Qt::Horizontal</enum>
373-
</property>
374-
<property name="sizeHint" stdset="0">
375-
<size>
376-
<width>40</width>
377-
<height>20</height>
378-
</size>
379-
</property>
380-
</spacer>
381-
</item>
382-
<item>
383-
<widget class="QComboBox" name="cmbTheme">
384-
<property name="duplicatesEnabled">
385-
<bool>false</bool>
386-
</property>
387-
<item>
388-
<property name="text">
389-
<string/>
390-
</property>
391-
</item>
392-
</widget>
393-
</item>
394-
</layout>
395-
</item>
396354
<item>
397355
<layout class="QHBoxLayout" name="horizontalLayout_7">
398356
<item>
@@ -4960,7 +4918,6 @@
49604918
<tabstop>mOptionsListWidget</tabstop>
49614919
<tabstop>mOptionsScrollArea_01</tabstop>
49624920
<tabstop>cmbStyle</tabstop>
4963-
<tabstop>cmbTheme</tabstop>
49644921
<tabstop>cmbIconSize</tabstop>
49654922
<tabstop>mFontFamilyRadioQt</tabstop>
49664923
<tabstop>mFontFamilyRadioCustom</tabstop>

0 commit comments

Comments
 (0)
Failed to load comments.