[rkward-cvs] SF.net SVN: rkward:[2783] trunk/rkward
tfry at users.sourceforge.net
tfry at users.sourceforge.net
Thu Mar 11 14:50:46 UTC 2010
Revision: 2783
http://rkward.svn.sourceforge.net/rkward/?rev=2783&view=rev
Author: tfry
Date: 2010-03-11 14:50:46 +0000 (Thu, 11 Mar 2010)
Log Message:
-----------
Fix recent file actions
Modified Paths:
--------------
trunk/rkward/ChangeLog
trunk/rkward/rkward/agents/rksaveagent.cpp
trunk/rkward/rkward/core/robjectlist.cpp
trunk/rkward/rkward/core/robjectlist.h
trunk/rkward/rkward/rkward.cpp
trunk/rkward/rkward/rkward.h
trunk/rkward/rkward/windows/rkcommandeditorwindow.cpp
Modified: trunk/rkward/ChangeLog
===================================================================
--- trunk/rkward/ChangeLog 2010-03-10 19:24:43 UTC (rev 2782)
+++ trunk/rkward/ChangeLog 2010-03-11 14:50:46 UTC (rev 2783)
@@ -1,6 +1,7 @@
+- Fixed: No entries were added the recent script/workspaces actions after "save as"
- Initialize the output file with an appropriate encoding specification
- Add SVG support to export (graphics) plugin
-- Add basic settings format settings for graphics output TODO: somehow, SVG does not work correctly in khtmlpart, thus not the default for now. Can we do anything about this?
+- Add basic settings format settings for graphics output TODO: somehow, SVG does not work correctly in khtmlpart/KDE 4.3, thus not the default for now. Can we do anything about this?
- Convert all plugins to use ECMAscript instead of PHP; RKWard no longer depends on PHP
- Fixed: Frequent crashes while running automated plugintests
- Fixed: Filenames without extension would not be shown in file dialogs
Modified: trunk/rkward/rkward/agents/rksaveagent.cpp
===================================================================
--- trunk/rkward/rkward/agents/rksaveagent.cpp 2010-03-10 19:24:43 UTC (rev 2782)
+++ trunk/rkward/rkward/agents/rksaveagent.cpp 2010-03-11 14:50:46 UTC (rev 2783)
@@ -2,7 +2,7 @@
rksaveagent - description
-------------------
begin : Sun Aug 29 2004
- copyright : (C) 2004, 2009 by Thomas Friedrichsmeier
+ copyright : (C) 2004, 2009, 2010 by Thomas Friedrichsmeier
email : tfry at users.sourceforge.net
***************************************************************************/
@@ -91,7 +91,6 @@
when_done = DoNothing;
} else {
RObjectList::getObjectList ()->setWorkspaceURL (save_url);
- RKWardMainWindow::getMain ()->setCaption (QString::null); // trigger update of caption
}
done ();
}
Modified: trunk/rkward/rkward/core/robjectlist.cpp
===================================================================
--- trunk/rkward/rkward/core/robjectlist.cpp 2010-03-10 19:24:43 UTC (rev 2782)
+++ trunk/rkward/rkward/core/robjectlist.cpp 2010-03-11 14:50:46 UTC (rev 2783)
@@ -2,7 +2,7 @@
robjectlist - description
-------------------
begin : Wed Aug 18 2004
- copyright : (C) 2004, 2006, 2007, 2009 by Thomas Friedrichsmeier
+ copyright : (C) 2004, 2006, 2007, 2009, 2010 by Thomas Friedrichsmeier
email : tfry at users.sourceforge.net
***************************************************************************/
@@ -59,6 +59,15 @@
RK_TRACE (OBJECTS);
}
+void RObjectList::setWorkspaceURL (const KUrl &url) {
+ RK_TRACE (OBJECTS);
+
+ if (url != current_url) {
+ current_url = url;
+ emit (workspaceUrlChanged (url));
+ }
+}
+
QStringList RObjectList::detachPackages (const QStringList &packages, RCommandChain *chain, RKProgressControl* control) {
RK_TRACE (OBJECTS);
Modified: trunk/rkward/rkward/core/robjectlist.h
===================================================================
--- trunk/rkward/rkward/core/robjectlist.h 2010-03-10 19:24:43 UTC (rev 2782)
+++ trunk/rkward/rkward/core/robjectlist.h 2010-03-11 14:50:46 UTC (rev 2783)
@@ -2,7 +2,7 @@
robjectlist - description
-------------------
begin : Wed Aug 18 2004
- copyright : (C) 2004, 2006, 2007, 2009 by Thomas Friedrichsmeier
+ copyright : (C) 2004, 2006, 2007, 2009, 2010 by Thomas Friedrichsmeier
email : tfry at users.sourceforge.net
***************************************************************************/
@@ -78,6 +78,8 @@
void updateStarted ();
/// emitted when the list of objects has been updated // TODO: remove me
void updateComplete ();
+/** emitted when the workspace Url has changed */
+ void workspaceUrlChanged (const KUrl& url);
protected:
/// reimplemented from RContainerObject to call "remove (objectname)" instead of "objectname <- NULL"
QString removeChildCommand (RObject *object) const;
@@ -91,7 +93,7 @@
private:
friend class RKLoadAgent;
friend class RKSaveAgent;
- void setWorkspaceURL (const KUrl &url) { current_url = url; };
+ void setWorkspaceURL (const KUrl &url);
QTimer *update_timer;
RCommandChain *update_chain;
Modified: trunk/rkward/rkward/rkward.cpp
===================================================================
--- trunk/rkward/rkward/rkward.cpp 2010-03-10 19:24:43 UTC (rev 2782)
+++ trunk/rkward/rkward/rkward.cpp 2010-03-11 14:50:46 UTC (rev 2783)
@@ -2,7 +2,7 @@
rkward.cpp - description
-------------------
begin : Tue Oct 29 20:06:08 CET 2002
- copyright : (C) 2002, 2005, 2006, 2007, 2008, 2009 by Thomas Friedrichsmeier
+ copyright : (C) 2002, 2005, 2006, 2007, 2008, 2009, 2010 by Thomas Friedrichsmeier
email : tfry at users.sourceforge.net
***************************************************************************/
@@ -292,6 +292,7 @@
RKGlobals::rinter = new RInterface ();
new RObjectList ();
+ connect (RObjectList::getObjectList (), SIGNAL (workspaceUrlChanged(const KUrl&)), this, SLOT (addWorkspaceUrl(const KUrl&)));
RKGlobals::rInterface ()->startThread ();
@@ -424,7 +425,6 @@
if (url.isEmpty ()) return;
new RKLoadAgent (url, false);
- fileOpenRecentWorkspace->addUrl (url);
}
void RKWardMainWindow::saveOptions () {
@@ -583,6 +583,13 @@
new RKSaveAgent (RObjectList::getObjectList ()->getWorkspaceURL (), true);
}
+void RKWardMainWindow::addWorkspaceUrl (const KUrl &url) {
+ RK_TRACE (APP);
+
+ if (!url.isEmpty ()) fileOpenRecentWorkspace->addUrl (url);
+ setCaption (QString::null); // trigger update of caption
+}
+
void RKWardMainWindow::updateCWD () {
RK_TRACE (APP);
@@ -658,13 +665,17 @@
slotOpenCommandEditor (KUrl ());
}
+void RKWardMainWindow::addScriptUrl (const KUrl& url) {
+ RK_TRACE (APP);
+
+ if (!url.isEmpty ()) fileOpenRecent->addUrl (url);
+}
+
void RKWardMainWindow::slotOpenCommandEditor (const KUrl &url) {
RK_TRACE (APP);
- if (RKWorkplace::mainWorkplace ()->openScriptEditor (url)) {
- if (!url.isEmpty ()) fileOpenRecent->addUrl (url);
- }
-};
+ RKWorkplace::mainWorkplace ()->openScriptEditor (url);
+}
void RKWardMainWindow::slotOpenCommandEditor () {
RK_TRACE (APP);
Modified: trunk/rkward/rkward/rkward.h
===================================================================
--- trunk/rkward/rkward/rkward.h 2010-03-10 19:24:43 UTC (rev 2782)
+++ trunk/rkward/rkward/rkward.h 2010-03-11 14:50:46 UTC (rev 2783)
@@ -2,7 +2,7 @@
rkward.h - description
-------------------
begin : Tue Oct 29 20:06:08 CET 2002
-copyright : (C) 2002, 2005, 2006, 2007, 2008, 2009 by Thomas Friedrichsmeier
+copyright : (C) 2002, 2005, 2006, 2007, 2008, 2009, 2010 by Thomas Friedrichsmeier
email : tfry at users.sourceforge.net
***************************************************************************/
@@ -124,6 +124,11 @@
/** configures RKward-settings */
void slotConfigure ();
+/** Add the given url to the list of recent scripts */
+ void addScriptUrl (const KUrl& url);
+/** Add the given url to the list of recent workspaces */
+ void addWorkspaceUrl (const KUrl& url);
+
/** Init-procedures to be done after the exec-loop was started */
void doPostInit ();
Modified: trunk/rkward/rkward/windows/rkcommandeditorwindow.cpp
===================================================================
--- trunk/rkward/rkward/windows/rkcommandeditorwindow.cpp 2010-03-10 19:24:43 UTC (rev 2782)
+++ trunk/rkward/rkward/windows/rkcommandeditorwindow.cpp 2010-03-11 14:50:46 UTC (rev 2783)
@@ -355,8 +355,9 @@
setCaption (name);
- // Well, this does not really belong, here, but needs to happen on pretty much the same occastions:
+ // Well, these do not really belong, here, but need to happen on pretty much the same occasions:
action_setwd_to_script->setEnabled (!url ().isEmpty ());
+ RKWardMainWindow::getMain ()->addScriptUrl (url ());
}
void RKCommandEditorWindow::showHelp () {
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