Developer forums (C::B DEVELOPMENT STRICTLY!) > Development
nicer tree-view for "projects" and "open files list"
Charon:
Hi,
i was just working a little bit on my own code and trying to find the right file in the projects-treeview. since i have a few files which names start identical i either have to have this window quite wide or have to scroll left and right in it.
i then realised that there is a bit of wasted space in the treeview!
the root-node "Workspace" shouldn't be really needed since right now its possible to only have one workspace open at the same time.
in the open files list the "problem" is a little bit different. since the title of the window is "Open files list" i think there is no need to have a node called "Opened Files".
i searched the forum for a reason why these nodes have to be there (maybe a future update will allow more than one workspace) but couldn't find any.
attached you can find a patch (when you want to call something a patch that just changes 3 lines...) which will hide the root nodes in the projects and open files list window. it does not remove the "title" of the nodes nor does it remove the icons (yeah both are invisible, but i guess wxWidgets still allocates memory for it). if this patch is welcomed i would be more than happy to remove these too.
of course i made two screenshots so you can compare for yourself.
i just tried this on WinXP SP2 with wxWidgets 2.8.4. if you are concerned that this might break on linux i can test this on Ubuntu 7.04 too.
regards
Markus
[attachment deleted by admin]
mariocup:
Hi Charon,
to show the workspace name is necessary. If you collect different projects in a workspace you can save the workspace with a name e.g. ContriPlugins and this name is shown, so it contains additional information. If the name is not shown you can not distinguish between opened projects and a workspace.
To the changes of the open files list I agree, because the root item does not contain additional information.
Bye,
Mario
Charon:
Hi mariocup,
yeah, i guess i didn't think enough about this.
something like the attached picture should be the the right thing then i guess? (it's just a mockup)
actually the same would work for the symbol-browser. the flag wxTR_HIDE_ROOT is already set in the *.xrc but it gets ignored (but it seems like this is a wxWidgets bug). setting it after the wxTreeCtrl is created doesn't work though (SetWindowStyle doesn't work on MWS, it's even documented *yay* :-( )
regards
Markus
[attachment deleted by admin]
Charon:
hi again,
i just reworked my patch and added the name of the workspace.
man its hard to get into wxWidgets again. the last time i worked with it is a few years ago :)
could anyone be so nice and help me with the following two things?
1. the background of the wxStaticText that is used to show the name of the workspace is dark-grey and i can't get it to appear like the background behind the items on the top of the symbols-browser (light-grey)
2. of course the context-menu for the workspace (rename and so on...) doesn't work right now. any hint for an easy way to add this to the wxStaticText?
i don't know if this kind of patch is welcomed, if not just say so. atleast its an easy way for me to get a little bit familiar with the codeblocks code-base :)
regards
Markus
[attachment deleted by admin]
killerbot:
note : when right clicking on the workspace there's a menu (save, save as, rename, close). I think you will loose that with the static text.
And on the other hand you don't gain that many space by it.
Now something else, since you are experimenting in that area, what about you can right click on the workspace, or maybe even the project and have as an option 'find file', which will expand the tree and set the selection to the filename you typed in, providing that file is in the project.
Navigation
[0] Message Index
[#] Next page
Go to full version