[prev in list] [next in list] [prev in thread] [next in thread] 

List:       koffice-devel
Subject:    koffice/libs/main
From:       Cyrille Berger <cyb () lepi ! org>
Date:       2009-04-24 12:38:38
Message-ID: 1240576718.856398.31186.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 958588 by berger:

Fix: force the non-closable dockers to be visible at startup

To test this, I forged a "state" where all dockers are hidden, including the tool \
box, it would still need validation by someone having a state broken by a crash.

CCMAIL:koffice-devel@kde.org


 M  +10 -0     KoMainWindow.cpp  


--- trunk/koffice/libs/main/KoMainWindow.cpp #958587:958588
@@ -211,6 +211,7 @@
     KActionMenu* m_dockWidgetMenu;
     QMap<QDockWidget*, bool> m_dockWidgetVisibilityMap;
     KoDockerManager *m_dockerManager;
+    QList<QDockWidget*> m_dockWidgets;
 };
 
 KoMainWindow::KoMainWindow(const KComponentData &componentData)
@@ -1615,6 +1616,14 @@
         // Position and show toolbars according to user's preference
         setAutoSaveSettings(newPart->componentData().componentName(), false);
 
+        foreach(QDockWidget* wdg, d->m_dockWidgets)
+        {
+            if ((wdg->features()&QDockWidget::DockWidgetClosable) == 0)
+            {
+                wdg->setVisible(true);
+            }
+        }
+
         // Create and plug toolbar list for Settings menu
         //QPtrListIterator<KToolBar> it = toolBarIterator();
         foreach(QWidget* it, factory->containers("ToolBar")) {
@@ -1782,6 +1791,7 @@
 
     if (!d->m_dockWidgetMap.contains(factory->id())) {
         dockWidget = factory->createDockWidget();
+        d->m_dockWidgets.push_back(dockWidget);
 
         // It is quite possible that a dock factory cannot create the dock; don't
         // do anything in that case.
_______________________________________________
koffice-devel mailing list
koffice-devel@kde.org
https://mail.kde.org/mailman/listinfo/koffice-devel


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic