Author Topic: default workspace doesn't load at startup  (Read 10635 times)

Offline tiwag

  • Developer
  • Lives here!
  • *****
  • Posts: 1196
  • sailing away ...
    • tiwag.cb
default workspace doesn't load at startup
« on: May 29, 2005, 06:07:45 pm »
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?

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4305
    • Code::Blocks IDE
default workspace doesn't load at startup
« Reply #1 on: May 29, 2005, 06:44:27 pm »
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...

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4305
    • Code::Blocks IDE
default workspace doesn't load at startup
« Reply #2 on: May 29, 2005, 06:55:51 pm »
Fixed it. Here's the patch if you need it until anonymous CVS is up-to-date.

Code: [Select]
--- 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...

Offline tiwag

  • Developer
  • Lives here!
  • *****
  • Posts: 1196
  • sailing away ...
    • tiwag.cb
default workspace doesn't load at startup
« Reply #3 on: May 29, 2005, 08:35:38 pm »
hi Yiannis !
thanks a lot