News:

Accounts with zero posts and zero activity during the last months will be deleted periodically to fight SPAM!

Main Menu

default workspace doesn't load at startup

Started by tiwag, May 29, 2005, 06:07:45 PM

Previous topic - Next topic

tiwag

after an update today to the latest CVS version (at the time of writing)
i can't any longer use a default workspace.

regardless if i select in
"Setting->Environment->On application start-up:"
"Open default workspace"
it always opens a blank workspace (with no title!, only a blank " ")

If i create my favorite workspace and select
"File->Save Workspace"
and save my workspace as
"Documents and Settings\CurrentUser\.Codeblocks\default.workspace"
it doesn't load this as default workspace when i start C::B the next time.

This was working for me before i updated from CVS and leads me to the question: How can i save a default workspace now?

mandrav

I fixed the "Save workspace" and "Save workspace as" commands which didn't work. Apparently, it broke the default workspace handling  :oops:
Let me take a look and fix it.

Yiannis.
Be patient!
This bug will be fixed soon...

mandrav

Fixed it. Here's the patch if you need it until anonymous CVS is up-to-date.

--- sdk/projectmanager.1.60.cpp Sun May 29 11:50:46 2005
+++ sdk/projectmanager.cpp Sun May 29 19:50:27 2005
@@ -784,7 +784,9 @@
    if (!CloseWorkspace())
        return false; // didn't close
    m_IsLoadingWorkspace=true;    
-    m_pWorkspace = new cbWorkspace(filename);
+// TODO (mandrav#1#): Change default value for 'filename' to DEFAULT_WORKSPACE and
+//                    remove the ternary operator in "new cbWorkspace()" below
+    m_pWorkspace = new cbWorkspace(filename.IsEmpty() ? DEFAULT_WORKSPACE : filename);
    m_IsLoadingWorkspace=false;
    Manager::Get()->GetEditorManager()->RebuildOpenedFilesTree();
    SANITY_CHECK(false);


Yiannis.
Be patient!
This bug will be fixed soon...

tiwag