[Bug 56476] KDevelop does not remember the state of visible panes when it exits

Amilcar do Carmo Lucas amilcar at ida.ing.tu-bs.de
Wed Jul 9 10:52:04 UTC 2003


------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
     
http://bugs.kde.org/show_bug.cgi?id=56476     
amilcar at ida.ing.tu-bs.de changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED



------- Additional Comments From amilcar at ida.ing.tu-bs.de  2003-07-09 10:51 -------
Subject: kdevelop

CVS commit by aclu: 

Save the state of IDEAl mode when closing.
Only works on a global basis, not per project.
Patch by: Charles Thorpe <cthorp at globalnet.co.uk>
CCMAIL: 56476-done at bugs.kde.org


  M +3 -1      lib/widgets/ktabzoomwidget.cpp   1.26
  M +7 -2      src/mainwindowideal.cpp   1.36
  M +3 -0      src/mainwindowideal.h   1.13


--- kdevelop/lib/widgets/ktabzoomwidget.cpp  #1.25:1.26
@@ -368,4 +368,6 @@ void KTabZoomWidget::saveSettings(KConfi
   else
     config->writeEntry("Strut", d->m_popup->height());
+
+        config->writeEntry("TabIndex", indexOf(current()));
 }
 
@@ -388,5 +390,5 @@ void KTabZoomWidget::loadSettings(KConfi
     KTZWidgetInfo *i=d->m_info.first();
     if (i) {
-      d->m_tabBar->setActiveIndex(i->m_barIndex);
+      d->m_tabBar->setActiveIndex(config->readNumEntry("TabIndex", 0));
     } else {
       // np parts there to show so we just hide ourselves

--- kdevelop/src/mainwindowideal.cpp  #1.35:1.36
@@ -154,5 +154,5 @@ void MainWindowIDEAl::init() {
     disconnect(a, SIGNAL(activated()), 0, 0);
     connect(a, SIGNAL(activated()), m_pMainWindowShare, SLOT(slotReportBug()));
-
+        connect( Core::getInstance(), SIGNAL(projectOpened()), this, SLOT(projectOpened()));
     m_pWindowMenu = (QPopupMenu*) main()->child( "window", "KPopupMenu" );
 
@@ -188,4 +188,6 @@ MainWindowIDEAl::~MainWindowIDEAl() {
 bool MainWindowIDEAl::queryClose()
 {
+    saveSettings(); //moved from queryClose so tab settings can be saved while
+                    //the components still exist.
     return Core::getInstance()->queryClose();
 }
@@ -193,5 +195,4 @@ bool MainWindowIDEAl::queryClose()
 bool MainWindowIDEAl::queryExit()
 {
-  saveSettings();
   return true;
 }
@@ -776,4 +777,8 @@ void MainWindowIDEAl::restoreOutputViewT
   }
   previous_output_view = NULL;
+}
+
+void MainWindowIDEAl::projectOpened() {
+  loadSettings();
 }
 

--- kdevelop/src/mainwindowideal.h  #1.12:1.13
@@ -92,4 +92,7 @@ public slots:
   void restoreOutputViewTab();
 
+  /** Just after the project gets opened */
+  void projectOpened();
+
 private slots:
   void slotBufferSelected();      // One entry of the Windows menu has been selected




More information about the KDevelop-devel mailing list