Author Topic: Message if a project from history could not be found?  (Read 7452 times)

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Message if a project from history could not be found?
« on: December 20, 2005, 07:06:46 pm »
Dear all,
now that it happend to me the third time for today I thought I request a comment on that:
The history of my C::B contains often projects that I've moved / deleted because they were just temporary. Due to my bad memory (:lol:) it happens to me often that I click on a project in the history list several times and nothing happens. Then I usually got to the folder where I expect the project and it's there. Then I take a look into the history menu again and - :shock: - I had changed the path and missed that the menu entry still points to the old one.

My request is: Couldn't there please (!) be an error message that a project failed to load because it does not / no longer exist? Even better (but not neccesary) would be to remove this project from the history then. That would people like me help a lot... :cry:

Morten.
Ps.: I had a look how the history menu entries are handeled but couldn't find where to start implementing the verification. Any help on that and I'll do and provide a patch if agreed on that topic.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

Offline rickg22

  • Lives here!
  • ****
  • Posts: 2283
Re: Message if a project from history could not be found?
« Reply #1 on: December 20, 2005, 07:08:31 pm »
This is fixed in the SVN version of codeblocks.

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: Message if a project from history could not be found?
« Reply #2 on: December 20, 2005, 07:19:01 pm »
This is fixed in the SVN version of codeblocks.
...now I'm confused: I am using the SVN version 1573 (sorry, I forgot to add that). Did you just do it - I saw there is a 1574 - or am I missing something?

Morten.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

Offline thomas

  • Administrator
  • Lives here!
  • *****
  • Posts: 3979
Re: Message if a project from history could not be found?
« Reply #3 on: December 20, 2005, 07:32:11 pm »
Keep it in mind please, in case target vars finally work 100% now (which I think...) I might look into that later at night.
You know what you have to do if you don't hear about it for 2 days ;)
"We should forget about small efficiencies, say about 97% of the time: Premature quotation is the root of public humiliation."

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: Message if a project from history could not be found?
« Reply #4 on: December 20, 2005, 07:37:41 pm »
[...] I might look into that later at night.
You know what you have to do if you don't hear about it for 2 days ;)
Thanks a lot in advance...
I hope I don't bother you guys too much, it was just that for today it was really bothering me... :|
But I know now, what to do... :lol:
Morten.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

Offline thomas

  • Administrator
  • Lives here!
  • *****
  • Posts: 3979
Re: Message if a project from history could not be found?
« Reply #5 on: December 20, 2005, 07:55:01 pm »
Looked into it. Revision 1573 should already display the error message...

Removing files from history is tedious, would have to walk through the list and compare names, that's quite stupid.
So... revision 1575 will not add missing files or projects to history in the first place, that should catch 99% :)
"We should forget about small efficiencies, say about 97% of the time: Premature quotation is the root of public humiliation."

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: Message if a project from history could not be found?
« Reply #6 on: December 20, 2005, 08:31:21 pm »
So... revision 1575 will not add missing files or projects to history in the first place, that should catch 99% :)
Excellent solution. I've verified it by now - suddenly my history is quite small. :lol: Thanks a lot, I owe you something. By the way: I think found where the message would normally be triggered, it's in cbProject::Open(), right? I still wonder why it doesn't work on my machine... very strange...
Morten.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: Message if a project from history could not be found?
« Reply #7 on: December 20, 2005, 09:06:55 pm »
Solution! :D
Thomas, I am sorry, but I couldn't stop thinking about why I the message was not triggered. Sometimes I am so blind (or is it because it's too late?!)... it's aweful.
Of course it was not a project that always failed to load but a workspace. Knowing this I was able to locate, why: In cbworkspace.cpp (cbWorkspace::Load()) this is not taken care of. I've filed a patch on sourceforge.net to fix this. If you have any time and don't know what else to do, please take a look at: SF.NET patch, ID 1386464. You may additionally look at ID 1382521, too (its' somehow related).
With best regards,
Morten.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

Offline thomas

  • Administrator
  • Lives here!
  • *****
  • Posts: 3979
Re: Message if a project from history could not be found?
« Reply #8 on: December 20, 2005, 09:35:39 pm »
Done.
"We should forget about small efficiencies, say about 97% of the time: Premature quotation is the root of public humiliation."

Offline rickg22

  • Lives here!
  • ****
  • Posts: 2283
Re: Message if a project from history could not be found?
« Reply #9 on: December 21, 2005, 12:02:18 am »
This is fixed in the SVN version of codeblocks.
...now I'm confused: I am using the SVN version 1573 (sorry, I forgot to add that). Did you just do it - I saw there is a 1574 - or am I missing something?

Morten.


Oops... guess I was the one confused. I thought this had been fixed already. Sorry :oops:

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: Message if a project from history could not be found?
« Reply #10 on: December 21, 2005, 12:15:36 am »
Oops... guess I was the one confused. I thought this had been fixed already. Sorry :oops:
No Rick, you were right: My description was about ptojects where it was solved, hence only for workspaces it was simply not implemented the same way as for projects.
Morten.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ