[rkward-cvs] SF.net SVN: rkward: [1508] trunk/rkward/rkward
tfry at users.sourceforge.net
tfry at users.sourceforge.net
Wed Feb 28 17:25:42 UTC 2007
Revision: 1508
http://svn.sourceforge.net/rkward/?rev=1508&view=rev
Author: tfry
Date: 2007-02-28 09:25:42 -0800 (Wed, 28 Feb 2007)
Log Message:
-----------
Don't add tool windows to workplace description
Modified Paths:
--------------
trunk/rkward/rkward/rkward.cpp
trunk/rkward/rkward/windows/rkworkplace.cpp
trunk/rkward/rkward/windows/rkworkplace.h
Modified: trunk/rkward/rkward/rkward.cpp
===================================================================
--- trunk/rkward/rkward/rkward.cpp 2007-02-28 17:09:07 UTC (rev 1507)
+++ trunk/rkward/rkward/rkward.cpp 2007-02-28 17:25:42 UTC (rev 1508)
@@ -513,7 +513,7 @@
slotSetStatusBarText (i18n ("Exiting..."));
saveOptions ();
if (RKSettingsModuleGeneral::workplaceSaveMode () == RKSettingsModuleGeneral::SaveWorkplaceWithSession) {
- RKSettingsModuleGeneral::setSavedWorkplace (RKWorkplace::mainWorkplace ()->makeWorkplaceDescription (), kapp->config ());
+ RKSettingsModuleGeneral::setSavedWorkplace (RKWorkplace::mainWorkplace ()->makeWorkplaceDescription ("\n", false), kapp->config ());
}
// if (!RObjectList::getGlobalEnv ()->isEmpty ()) {
Modified: trunk/rkward/rkward/windows/rkworkplace.cpp
===================================================================
--- trunk/rkward/rkward/windows/rkworkplace.cpp 2007-02-28 17:09:07 UTC (rev 1507)
+++ trunk/rkward/rkward/windows/rkworkplace.cpp 2007-02-28 17:25:42 UTC (rev 1508)
@@ -312,15 +312,19 @@
return (static_cast<RKMDIWindow *> (view ()->activePage ()));
}
-QString RKWorkplace::makeWorkplaceDescription () {
+QString RKWorkplace::makeWorkplaceDescription (const QString &sep, bool quote) {
RK_TRACE (APP);
QString workplace_description;
bool first = true;
for (RKWorkplaceObjectList::const_iterator it = windows.constBegin (); it != windows.constEnd (); ++it) {
+ if ((*it)->isToolWindow ()) continue;
+
if (first) first = false;
- else workplace_description.append ("\n");
- workplace_description.append ((*it)->getDescription ());
+ else workplace_description.append (sep);
+
+ if (!quote) workplace_description.append ((*it)->getDescription ());
+ else workplace_description.append (RObject::rQuote ((*it)->getDescription ()));
}
return workplace_description;
}
@@ -329,16 +333,8 @@
RK_TRACE (APP);
if (RKSettingsModuleGeneral::workplaceSaveMode () != RKSettingsModuleGeneral::SaveWorkplaceWithWorkspace) return;
- QString workplace_description;
+ QString workplace_description = ".rk.workplace.save <- c (" + makeWorkplaceDescription (", ", true) + ')';
- bool first = true;
- for (RKWorkplaceObjectList::const_iterator it = windows.constBegin (); it != windows.constEnd (); ++it) {
- if (first) first = false;
- else workplace_description.append (", ");
- workplace_description.append (RObject::rQuote ((*it)->getDescription ()));
- }
- workplace_description = ".rk.workplace.save <- c (" + workplace_description + ')';
-
RKGlobals::rInterface ()->issueCommand (workplace_description, RCommand::App | RCommand::Sync, i18n ("Save Workplace layout"), 0, 0, chain);
}
Modified: trunk/rkward/rkward/windows/rkworkplace.h
===================================================================
--- trunk/rkward/rkward/windows/rkworkplace.h 2007-02-28 17:09:07 UTC (rev 1507)
+++ trunk/rkward/rkward/windows/rkworkplace.h 2007-02-28 17:25:42 UTC (rev 1508)
@@ -115,7 +115,7 @@
@param cahin command chain to place the command in */
void clearWorkplaceDescription (RCommandChain *chain=0);
- QString makeWorkplaceDescription ();
+ QString makeWorkplaceDescription (const QString &sep, bool quote);
/** In the current design there is only ever one workplace. Use this static function to reference it.
@returns a pointer to the workplace */
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