From f022d4d369f0721e0036268c0869adcda52d1061 Mon Sep 17 00:00:00 2001 From: Akos Polster Date: Sun, 30 Jan 2011 18:12:09 +0100 Subject: [PATCH] Remove orientation settings. --- pkg/changelog | 2 +- settingswindow.cpp | 32 ++++---------------------------- settingswindow.h | 1 - 3 files changed, 5 insertions(+), 30 deletions(-) diff --git a/pkg/changelog b/pkg/changelog index 2ea1627..4c40da4 100644 --- a/pkg/changelog +++ b/pkg/changelog @@ -1,6 +1,6 @@ dorian (0.4.5-1) unstable; urgency=low - * + * Remove orientation settings from Settings (can be changed directly) -- Akos Polster Mon, 10 Jan 2011 02:00:00 +0100 diff --git a/settingswindow.cpp b/settingswindow.cpp index f09f9b2..8b301ca 100644 --- a/settingswindow.cpp +++ b/settingswindow.cpp @@ -71,7 +71,8 @@ SettingsWindow::SettingsWindow(QWidget *parent): AdopterWindow(parent) QLabel *fontLabel = new QLabel(tr("Font:"), contents); layout->addWidget(fontLabel); - QString family = settings->value("font", platform->defaultFont()).toString(); + QString family = + settings->value("font", platform->defaultFont()).toString(); fontButton = new QFontComboBox(contents); fontButton->setCurrentFont(QFont(family)); fontButton->setEditable(false); @@ -85,7 +86,8 @@ SettingsWindow::SettingsWindow(QWidget *parent): AdopterWindow(parent) Platform::instance()->icon("style-default")); box->addButton(SchemeNight, tr("Night"), Platform::instance()->icon("style-night")); - box->addButton(SchemeDay, tr("Day"), Platform::instance()->icon("style-day")); + box->addButton(SchemeDay, tr("Day"), + Platform::instance()->icon("style-day")); box->addButton(SchemeSand, tr("Sand"), Platform::instance()->icon("style-sand")); box->addStretch(); @@ -100,25 +102,6 @@ SettingsWindow::SettingsWindow(QWidget *parent): AdopterWindow(parent) box->toggle(SchemeDefault); } -#if defined(Q_WS_MAEMO_5) || defined(Q_OS_SYMBIAN) - QLabel *orientationLabel = new QLabel(tr("Orientation:"), contents); - layout->addWidget(orientationLabel); - orientationBox = new ToolButtonBox(this); - layout->addWidget(orientationBox); - orientationBox->addButton(OrientationPortrait, tr("Portrait"), - ":/icons/settings-portrait.png"); - orientationBox->addButton(OrientationLandscape, tr("Landscape"), - ":/icons/settings-landscape.png"); - orientationBox->addStretch(); - QString orientation = - settings->value("orientation", platform->defaultOrientation()).toString(); - if (orientation == "portrait") { - orientationBox->toggle(OrientationPortrait); - } else { - orientationBox->toggle(OrientationLandscape); - } -#endif // defined(Q_WS_MAEMO_5) || defined(Q_OS_SYMBIAN) - layout->addStretch(); scroller->setWidget(contents); contents->show(); @@ -138,10 +121,6 @@ SettingsWindow::SettingsWindow(QWidget *parent): AdopterWindow(parent) this, SLOT(onCurrentFontChanged(const QFont &))); connect(box, SIGNAL(buttonClicked(int)), this, SLOT(onSchemeButtonClicked(int))); -#ifndef Q_OS_SYMBIAN - connect(orientationBox, SIGNAL(buttonClicked(int)), - this, SLOT(onOrientationButtonClicked(int))); -#endif #ifdef Q_OS_SYMBIAN QAction *closeAction = new QAction(parent? tr("Back"): tr("Exit"), this); @@ -198,9 +177,6 @@ void SettingsWindow::closeEvent(QCloseEvent *e) Settings *settings = Settings::instance(); settings->setValue("zoom", zoomSlider->value()); settings->setValue("font", fontButton->currentFont().family()); - settings->setValue("orientation", - (orientationBox->checkedId() == OrientationLandscape)? - "landscape": "portrait"); e->accept(); } diff --git a/settingswindow.h b/settingswindow.h index 6cf421f..d89a028 100644 --- a/settingswindow.h +++ b/settingswindow.h @@ -41,7 +41,6 @@ private: QSlider *zoomSlider; QLabel *zoomLabel; QFontComboBox *fontButton; - ToolButtonBox *orientationBox; }; #endif // SETTINGSWINDOW_H -- 1.7.9.5