Author Topic: Recent Projects  (Read 11671 times)

Offline johne53

  • Regular
  • ***
  • Posts: 253
Recent Projects
« on: October 28, 2009, 05:05:44 pm »
It's a long shot but just out of interest.... is ti possible to configure C::B so that it only keeps recently saved workspaces in its 'Recent Project' list, instead of keeping both workspaces and projects? I almost never need to load a project without loading the workspace that contained it so I find it quite annoying to have a list full of projects when I'm really only interested in the workspaces.

Offline killerbot

  • Administrator
  • Lives here!
  • *****
  • Posts: 5491
Re: Recent Projects
« Reply #1 on: October 28, 2009, 06:40:26 pm »
I don't think it is configurable.

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Recent Projects
« Reply #2 on: October 28, 2009, 08:09:52 pm »
Maybe projects belonging to the workspace the user just opened, should not be added to the recent projects list?
What do the devs think about that?
If all agree on that behaviour I can make a patch :-)
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: Recent Projects
« Reply #3 on: October 28, 2009, 08:21:39 pm »
What do the devs think about that?
...not too bad, but please configurable. ;-)
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 oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Recent Projects
« Reply #4 on: October 28, 2009, 09:24:53 pm »
Hm, after some testing the if I open only workspaces,
I've got not project files in the recent list.

johne53: What version do you use?
Mine is debugger-branch-head on gentoo linux.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline Zini

  • Multiple posting newcomer
  • *
  • Posts: 64
Re: Recent Projects
« Reply #5 on: October 28, 2009, 09:31:59 pm »
Try editing a project (Project -> Properties or something) and then save it. It will show up in the recent file list; at least it does that for me (rev 5679).

Offline johne53

  • Regular
  • ***
  • Posts: 253
Re: Recent Projects
« Reply #6 on: October 28, 2009, 09:51:54 pm »
Yes, it's as Zini said. Open a workspace containing (say) 6 projects. Change a few of them then save each project. Next time you open C::B they'll appear at the top of the Recent projects list. In fact, if there are a lot of projects, you can end up losing your workspace off the bottom of the list, which is really quite annoying.

I'm running version svn5859 but this has been standard behaviour for as far back as I can remember. It's one of those things that I've always meant to suggest but never quite got around to it.

I like the idea of not adding projects that are part of a workspace that was just opened.

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: Recent Projects
« Reply #7 on: October 29, 2009, 06:36:13 am »
Does not happen here (debian 64-bit svn r5873 from trunk).

Offline johne53

  • Regular
  • ***
  • Posts: 253
Re: Recent Projects
« Reply #8 on: October 29, 2009, 08:24:37 am »
You mean your Recent Project list contains only workspaces?

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: Recent Projects
« Reply #9 on: October 29, 2009, 10:03:27 am »
You mean your Recent Project list contains only workspaces?
No, if I open a projectfile directly, it appears in the list, and that's a behaviour I expect, but if I open a workspace, that contains lots of project files, only the workspace file appears, even if I change and save a single project.
« Last Edit: October 29, 2009, 10:06:09 am by jens »

Offline Zini

  • Multiple posting newcomer
  • *
  • Posts: 64
Re: Recent Projects
« Reply #10 on: October 29, 2009, 05:00:39 pm »
Just updated to rev 5892. The undesirable behaviour regarding project saving is still present for me.

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: Recent Projects
« Reply #11 on: October 29, 2009, 06:37:13 pm »
I just updated my working copy to 5892 and build a debian-package of it, to see if something has changed.

Offline Zini

  • Multiple posting newcomer
  • *
  • Posts: 64
Re: Recent Projects
« Reply #12 on: October 29, 2009, 07:00:23 pm »
Looks like these functions are the culprit:

Code
void MainFrame::OnFileSaveProject(wxCommandEvent& event)
{
    // no need to call SaveActiveProjectAs(), because this is handled in cbProject::Save()
    if (Manager::Get()->GetProjectManager()->SaveActiveProject())
        AddToRecentProjectsHistory(Manager::Get()->GetProjectManager()->GetActiveProject()->GetFilename());
    DoUpdateStatusBar();
    DoUpdateAppTitle();
}

void MainFrame::OnFileSaveProjectAs(wxCommandEvent& event)
{
    if (Manager::Get()->GetProjectManager()->SaveActiveProjectAs())
        AddToRecentProjectsHistory(Manager::Get()->GetProjectManager()->GetActiveProject()->GetFilename());
    DoUpdateStatusBar();
    DoUpdateAppTitle();
}

Though that doesn't explain why it happens only for some people.

Offline Zini

  • Multiple posting newcomer
  • *
  • Posts: 64
Re: Recent Projects
« Reply #13 on: October 29, 2009, 11:41:36 pm »
I modified these two functions and that seems indeed to have fixed it. Here is the patch:

http://developer.berlios.de/patch/index.php?func=detailpatch&patch_id=2844&group_id=5358

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: Recent Projects
« Reply #14 on: October 30, 2009, 12:03:19 am »
It still does not happen here.

EDIT:
It does happen if it is saved from the file-menu, but I almost always save my projects from the projects-tree content-menu.

So there is an inconsitency between this two menus, that should not be.
When the projects are (or the workspace is) saved with the appropriate "save all xxx" menu-item, they are also not added to recent-projects history.
« Last Edit: October 30, 2009, 12:41:35 am by jens »