Remove orientation settings.
authorAkos Polster <akos@pipacs.com>
Sun, 30 Jan 2011 17:12:09 +0000 (18:12 +0100)
committerAkos Polster <akos@pipacs.com>
Sun, 30 Jan 2011 17:12:09 +0000 (18:12 +0100)
pkg/changelog
settingswindow.cpp
settingswindow.h

index 2ea1627..4c40da4 100644 (file)
@@ -1,6 +1,6 @@
 dorian (0.4.5-1) unstable; urgency=low
 
-  *
+  * Remove orientation settings from Settings (can be changed directly)
 
  -- Akos Polster <akos@pipacs.com>  Mon, 10 Jan 2011 02:00:00 +0100
 
index f09f9b2..8b301ca 100644 (file)
@@ -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();
 }
 
index 6cf421f..d89a028 100644 (file)
@@ -41,7 +41,6 @@ private:
     QSlider *zoomSlider;
     QLabel *zoomLabel;
     QFontComboBox *fontButton;
-    ToolButtonBox *orientationBox;
 };
 
 #endif // SETTINGSWINDOW_H