Also you need to provide an edit button.I will try to add an "search" button in the first column that opens the path control (that one used by the project search paths)... As far as i can see this is also more easily made with the wxGrid control then the wxListCtrl. A other possibility would be wxPropGrid, but i am annoyed by the different implementations in wx2.8 and wx3.0....
It is common for C::B's UI to open secondary dialogs where stuff is edited.and i hate it... If you want to change one letter in 3 libraries (to add a debug "d" for example) you have to click 12 times 3x(select entry, open dialog, activate, close dialog), instead of 3 times (select entry and set cursor at correct position at the same time)... Quick copy and paste? Naaa forget it... you have open a dialog to get the value... Don't put design over usability, we have this crap everywhere in the new web and programing....
I doubt it would be common to want to change all entries. What would be this situation?I gave you an example:
I was talking about the glob feature. Changing libraries in bulk is more common I agree.QuoteI doubt it would be common to want to change all entries. What would be this situation?I gave you an example:
Changing from release to debug libraries or for example wx2.8 to wx30.
Copy and paste many paths from one project to a other over a text file... From a make file to codeblocks...
I don't know, i had so many situations where a lot editing had to be done... Editing the cbp file directly is also no real alternative because of the xml file format...
I had this problems for the library setting and i see that coming for this settings, so i wanted to mitigate this with a ui where every field is editable in place...
So what is to do?1. I don't think wxDVC it is an option until we're at 3.2. wxDVS is something that is always active on the wx's issue tracker.
1) If we use the wxDataViewCtrl i am not really willing to implement it in wx2.8. So this UI would be only for cb wx3.0 and past (it is better as now, because now is no ui for no wx version)
2) Pimp the wxGrid so that it looks better? ( kicad uses this control a lot, so we could look if they have some nice changes)
3) Use property grid.
4) Use wxListCtrl and make a separate dialog for editing (not my favorite.... Adding a other dialog... Not being able to edit in place...)
[EDIT:]
5) Using wxListCtrl but make the whole dialog bigger so there is a wxTextCtrl for every column. You select the entry in the ListCtrl on the left and the values from the textCtrls get updated on the right... Something like this http://wxdsgn.sourceforge.net/images/tutorials/Multicolumn_table_using_virtual_wxListCtrl_Tutorial.files/image046.jpg
1. Mismatch between the comment and the name of AddGlob (glob vs globs).Can you point out the line in the patch?
3. Get/SetGlobs should be added to the script bindings. Can we have tests for these 3?Not really... there is no independent read back possibility from script bindings, to check the success... If i remember correctly i have not implemented any test for all project functions, because it was not possible to create a project from the script binding and get a independent result from the function (compare a pre made project file for example) ... Testing project binding should not be topic for this patch... If there is need we should create a new topic/ticket
4.2. The click handle methods should have better names, using the names created by wxsmith is rarely a good ideasuggestions? I think OnbtnBrowseClick nicely verbose :
"On" --- On (obviously english adverb)
"btn" --- Button
"Browse" --- Button name
"Click" --- on what? --> on click
"btnBrowse" --- also Variable name of button...
4.3. filenames should be lower case and if you need more clarity you can use underscores. This prevents nasty case sensitivity problems in different oses.I have not found any camel case / upper case filename in the patch?
5.3. It is better to use wxString::Format when there is a string which will be translated instead of using operator+, different languages have different word order.Doesn't this add unicode problems? Or how do i printf a wxString with unicode support?
5.8. Repeated calls to prj->GetGlobs()[i\] aren't good idea - store them in variablesisn't this optimized out? Isn't a copy slower?
6. Do not pass nullptr when creating dialogs. It leads to really bad problems on linux.what instead?
Can you point out the line in the patch?This one: "@param glob the globs to add to the project."
Not really... there is no independent read back possibility from script bindings, to check the success... If i remember correctly i have not implemented any test for all project functions, because it was not possible to create a project from the script binding and get a independent result from the function (compare a pre made project file for example) ... Testing project binding should not be topic for this patch... If there is need we should create a new topic/ticketOk, not testing, but what about setglobs and getglobs support in scripting?
suggestions? I think OnbtnBrowseClick nicely verbose :OnBrowseClick is obvious and clear, IMO. If you want to stick btn or button you should make it CamelCase. Nobody cares if the variable for the button has the same name as the method name.
I have not found any camel case / upper case filename in the patch?There you go:
Doesn't this add unicode problems? Or how do i printf a wxString with unicode support?No. Use .wx_str() when calling wxString::Format, you can also use the short F function.
How calling an unknown method from a dll could be optimized away? But I don't really care too much for optimizations, copy pasting shows the laziness of the writer of the code and it is hard to read because it is more text and you should verify that the function call doesn't return different value every time it is called.Quote5.8. Repeated calls to prj->GetGlobs()[i\] aren't good idea - store them in variablesisn't this optimized out? Isn't a copy slower?
Either a parent dialog or the main frame or the app window (these two can be accessed from the manager class).Quote6. Do not pass nullptr when creating dialogs. It leads to really bad problems on linux.what instead?
On the functionality's side - I've not seen any code to rebuild the project tree or to add the files to the project. Are people still expected to reload the project after changing the globs?Here you have a point. I tested this and have found some problems:
For now probably an automatic reload would be fine or just a warning that a reload is needed.Then we have to save the project after leaving the dialog?
Ok, not testing, but what about setglobs and getglobs support in scripting?To add setglobs/getglobs we would have to add some kind of binding for the std::vector<Globs> class. I do not think this is needed... And i do not know how to make it nicely, i don't think it is possible to bind a generic std::vector class. And i don't feel the need to bind a set, get, remove ecc... by hand...
Have you tried to delete two or more globs simultaneously and see if the results are correct?As far as i can tell it works as expected... I have tested in a few times with deleting only a few items, all items and random items.... All seem to work...
ok, i fixed it... I also removed the unnecessary delete from the list, and made the OK button default.
ok, i fixed it... I also removed the unnecessary delete from the list, and made the OK button default.
Cannot download file. Gets error "Failed- insufficient pemissions"
I tried 4 different ways to download. All failed.
The deletion is still not correct. .size() returns size_t, substituting 1 from 0 leads to very long loop and misery.the good old unsigned underflow... Well it worked during testing...
I don't think the sort is required, but if you still want to use it why don't you just reverse the list there?I don't know how c++11 (lambdas) are welcome in the code, and i did not wanted to make a function or class only for sorting...
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 menui can try to fix this.
2. Adding a relative path to the current project makes the path look like ../myproj instead of just '.'.
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
Here are some fixes on top of yours: https://github.com/obfuscated/codeblocks_sf/tree/experiments/globsWhat is this with the tabs change in the code? Do you use fewer white spaces?
for (const cbProject::Glob &glob : m_GlobList)