[kde-doc-english] [trojita] src/Gui: GUI: don't switch the layout too early

Jan Kundrát jkt at flaska.net
Sun May 26 23:39:49 UTC 2013


Git commit ffe70477838d62a612008979fae7e5f468ae6fb6 by Jan Kundrát.
Committed on 26/05/2013 at 19:39.
Pushed by jkt into branch 'master'.

GUI: don't switch the layout too early

If the stored user's preferences were applied too early, the order of the
toolbar icons would not be preserved because the one-at-time layout manipulates
the toolbar.

M  +8    -7    src/Gui/Window.cpp

http://commits.kde.org/trojita/ffe70477838d62a612008979fae7e5f468ae6fb6

diff --git a/src/Gui/Window.cpp b/src/Gui/Window.cpp
index 4fa609c..1fb3715 100644
--- a/src/Gui/Window.cpp
+++ b/src/Gui/Window.cpp
@@ -124,6 +124,14 @@ MainWindow::MainWindow(): QMainWindow(), model(0), m_actionSortNone(0), m_ignore
     slotUpdateWindowTitle();
 
     recoverDrafts();
+
+    if (QSettings().value(Common::SettingsNames::guiMainWindowLayout) == Common::SettingsNames::guiMainWindowLayoutWide) {
+        m_actionLayoutWide->setChecked(true);
+        slotLayoutWide();
+    } else if (QSettings().value(Common::SettingsNames::guiMainWindowLayout) == Common::SettingsNames::guiMainWindowLayoutOneAtTime) {
+        m_actionLayoutOneAtTime->setChecked(true);
+        slotLayoutOneAtTime();
+    }
 }
 
 void MainWindow::defineActions()
@@ -367,13 +375,6 @@ void MainWindow::createActions()
     m_actionLayoutOneAtTime->setCheckable(true);
     connect(m_actionLayoutOneAtTime, SIGNAL(triggered()), this, SLOT(slotLayoutOneAtTime()));
 
-    if (QSettings().value(Common::SettingsNames::guiMainWindowLayout) == Common::SettingsNames::guiMainWindowLayoutWide) {
-        m_actionLayoutWide->setChecked(true);
-        slotLayoutWide();
-    } else if (QSettings().value(Common::SettingsNames::guiMainWindowLayout) == Common::SettingsNames::guiMainWindowLayoutOneAtTime) {
-        m_actionLayoutOneAtTime->setChecked(true);
-        slotLayoutOneAtTime();
-    }
 
     m_actionShowOnlySubscribed = new QAction(tr("Show Only S&ubscribed Folders"), this);
     m_actionShowOnlySubscribed->setCheckable(true);



More information about the kde-doc-english mailing list