[rkward-cvs] SF.net SVN: rkward: [1515] trunk/rkward/rkward

tfry at users.sourceforge.net tfry at users.sourceforge.net
Wed Feb 28 23:05:29 UTC 2007


Revision: 1515
          http://svn.sourceforge.net/rkward/?rev=1515&view=rev
Author:   tfry
Date:     2007-02-28 15:05:28 -0800 (Wed, 28 Feb 2007)

Log Message:
-----------
Some correction to window history keeping

Modified Paths:
--------------
    trunk/rkward/rkward/dataeditor/rkeditordataframe.cpp
    trunk/rkward/rkward/windows/rkworkplace.cpp
    trunk/rkward/rkward/windows/rkworkplace.h

Modified: trunk/rkward/rkward/dataeditor/rkeditordataframe.cpp
===================================================================
--- trunk/rkward/rkward/dataeditor/rkeditordataframe.cpp	2007-02-28 23:01:34 UTC (rev 1514)
+++ trunk/rkward/rkward/dataeditor/rkeditordataframe.cpp	2007-02-28 23:05:28 UTC (rev 1515)
@@ -40,6 +40,7 @@
 	RK_TRACE (EDITOR);
 
 	RKEditorDataFrame::part = part;
+	initializeActivationSignals ();
 
 	open_chain = 0;
 }

Modified: trunk/rkward/rkward/windows/rkworkplace.cpp
===================================================================
--- trunk/rkward/rkward/windows/rkworkplace.cpp	2007-02-28 23:01:34 UTC (rev 1514)
+++ trunk/rkward/rkward/windows/rkworkplace.cpp	2007-02-28 23:05:28 UTC (rev 1515)
@@ -106,6 +106,7 @@
 	windows.append (window);
 	connect (window, SIGNAL (destroyed (QObject *)), this, SLOT (windowDestroyed (QObject *)));
 	connect (window, SIGNAL (windowActivated(RKMDIWindow*)), history, SLOT (windowActivated(RKMDIWindow*)));
+	connect (window, SIGNAL (destroyed (QObject *)), history, SLOT (windowDestroyed (QObject *)));
 	if (attached) attachWindow (window);
 	else detachWindow (window, false);
 }
@@ -411,6 +412,8 @@
 
 RKMDIWindowHistory::~RKMDIWindowHistory () {
 	RK_TRACE (APP);
+
+	RK_DO (qDebug ("Remaining windows in history: forward: %d, backward: %d", forward_list.count (), back_list.count ()), APP, DL_DEBUG);
 }
 
 void RKMDIWindowHistory::addActions (KActionCollection *ac, const char *prev_id, const char *next_id) {
@@ -486,4 +489,13 @@
 	}
 }
 
+void RKMDIWindowHistory::windowDestroyed (QObject *window) {
+	RK_TRACE (APP);
+
+	back_list.remove (static_cast<RKMDIWindow *> (window));
+	forward_list.remove (static_cast<RKMDIWindow *> (window));
+	if (current == window) current = 0;
+	updateActions ();
+}
+
 #include "rkworkplace.moc"

Modified: trunk/rkward/rkward/windows/rkworkplace.h
===================================================================
--- trunk/rkward/rkward/windows/rkworkplace.h	2007-02-28 23:01:34 UTC (rev 1514)
+++ trunk/rkward/rkward/windows/rkworkplace.h	2007-02-28 23:05:28 UTC (rev 1515)
@@ -48,6 +48,7 @@
 	void next ();
 	void prev ();
 	void windowActivated (RKMDIWindow *window);
+	void windowDestroyed (QObject *window);
 private:
 	void updateActions ();
 


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the rkward-tracker mailing list