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

tfry at users.sourceforge.net tfry at users.sourceforge.net
Tue May 19 14:24:21 UTC 2009


Revision: 2490
          http://rkward.svn.sourceforge.net/rkward/?rev=2490&view=rev
Author:   tfry
Date:     2009-05-19 14:24:21 +0000 (Tue, 19 May 2009)

Log Message:
-----------
Activate external modification warnings

Modified Paths:
--------------
    trunk/rkward/ChangeLog
    trunk/rkward/rkward/windows/rkcommandeditorwindow.cpp

Modified: trunk/rkward/ChangeLog
===================================================================
--- trunk/rkward/ChangeLog	2009-05-19 14:23:27 UTC (rev 2489)
+++ trunk/rkward/ChangeLog	2009-05-19 14:24:21 UTC (rev 2490)
@@ -1,3 +1,4 @@
+- Fixed: No warning was shown, when an open script file was changed on disk, externally
 - Fixed: Opening most file types (e.g. PDF) from the help browser was broken		TODO: output refresh is somewhat broken, now
 - Fixed: Make built-in editor work again for file.edit ()
 - (Almost) all plugins now write a header to the output window		TODO: work in progress; which ones should not?

Modified: trunk/rkward/rkward/windows/rkcommandeditorwindow.cpp
===================================================================
--- trunk/rkward/rkward/windows/rkcommandeditorwindow.cpp	2009-05-19 14:23:27 UTC (rev 2489)
+++ trunk/rkward/rkward/windows/rkcommandeditorwindow.cpp	2009-05-19 14:24:21 UTC (rev 2490)
@@ -21,6 +21,7 @@
 #include <ktexteditor/configinterface.h>
 #include <ktexteditor/sessionconfiginterface.h>
 #include <ktexteditor/editorchooser.h>
+#include <ktexteditor/modificationinterface.h>
 
 #include <qlayout.h>
 #include <qapplication.h>
@@ -82,6 +83,12 @@
 
 	m_doc = editor->createDocument (this);
 	RK_ASSERT (m_doc);
+	// yes, we want to be notified, if the file has changed on disk.
+	// why, oh why is this not the default?
+	// this needs to be set *before* the view is created!
+	KTextEditor::ModificationInterface* em_iface = qobject_cast<KTextEditor::ModificationInterface*> (m_doc);
+	if (em_iface) em_iface->setModifiedOnDiskWarning (true);
+	else RK_ASSERT (false);
 	m_view = m_doc->createView (this);
 
 	setFocusProxy (m_view);


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