Author Topic: User interface for project glob feature  (Read 25903 times)

Offline BlueHazzard

  • Developer
  • Lives here!
  • *****
  • Posts: 3353
Re: User interface for project glob feature
« Reply #30 on: September 07, 2018, 12:09:43 am »
Quote
1. The manage dialog shouldn't call Manager::Get()->GetProjectManager()->GetActiveProject(), but a project pointer should be passed to the constructor. This would make it possible to add this manage command to the context menu
2. Adding a relative path to the current project makes the path look like ../myproj instead of just '.'.
i can try to fix this.
Quote
3. The ok/cancel buttons in the manage dialog must be moved at the bottom using a stdbuttonsizer. The current version looks bad.
i am really bad with UI things... I would like to let this to some one else

Quote
Here are some fixes on top of yours: https://github.com/obfuscated/codeblocks_sf/tree/experiments/globs
What is this with the tabs change in the code? Do you use fewer white spaces?

in src/src/manageglobsdlg.cpp
Code
for (const cbProject::Glob &glob : m_GlobList)
full c++11 support now? also with "auto"?

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: User interface for project glob feature
« Reply #31 on: September 07, 2018, 12:50:33 am »
The files used tabs, CB project uses 4 spaces. We're c++11 for quite a while now.
I don't understand why c++11 is associated with auto. The second worst feature added after rvalue refs and lambdas are third.
Generally it is preferable (at least by me) if auto is used as little as possible and only where the types are obvious or too long.
(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 The_GTA

  • Multiple posting newcomer
  • *
  • Posts: 21
  • Developer & Entrepreneur
    • EirDev
Re: User interface for project glob feature
« Reply #32 on: January 29, 2019, 07:44:13 pm »
Glad that UnitsGlob does receive GUI attention! Usually I add UnitsGlob manually to the project file...

<UnitsGlob directory="../src" recursive="1" wildcard="*.cpp" />
<UnitsGlob directory="../src" recursive="1" wildcard="*.h" />
<UnitsGlob directory="../src" recursive="1" wildcard="*.hxx" />
<UnitsGlob directory="../include" recursive="1" wildcard="*.h" />

... but a GUI way does add more reach for a wider audience. Visual Studio team would refuse but Code::Blocks community does have an eye for detail. Thank you!

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: User interface for project glob feature
« Reply #33 on: January 29, 2019, 10:44:26 pm »
Have you tried the patches? Does they work for you?
(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 oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: User interface for project glob feature
« Reply #34 on: October 17, 2020, 01:50:11 pm »
@BlueHazzard: This seems like another thing you haven't finished. Can you do it?
(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 BlueHazzard

  • Developer
  • Lives here!
  • *****
  • Posts: 3353
Re: User interface for project glob feature
« Reply #35 on: October 19, 2020, 12:53:23 am »
Ok, i looked into this a bit again...
Can i still not convince you that we should use https://docs.wxwidgets.org/trunk/classwx_data_view_list_ctrl.html and provide all two edit possibilities? :)
On the functionality side, some points:
*)  i think we should use a https://docs.wxwidgets.org/3.0/classwx_file_system_watcher.html for checking if the folders in question have changes during runtime and add the files to the project accordingly

A) (as it is done currently)
*) add the files dynamically to the internal project, but do not save them in the project file
*) on loading the project, scan for files in globs and add them to the internal project, but store a flag, that this is a glob file and so we can not modify it (disable the property file dialog for example). At the moment it is possible to edit this options, but they are not saved for the next opening of the project.

B)
*) add the files dynamically to the internal project, save them in the project file, but also add the glob string they come from as attribute. So we can easily delete them when the glob gets deleted
*) also so we can detect if the file is not present on project load, and remove it silently from the project file, because i think files from glob should not trigger a file not found error...



Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: User interface for project glob feature
« Reply #36 on: October 19, 2020, 08:28:22 pm »
I have no opinion at the moment, nor do I intend to do more review. I don't have the time at the moment.
I have just two requirements:
1. make it reliable
2. make it fast when you have the linux source tree for example (40k+ files)
(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!]