Code::Blocks Forums
Developer forums (C::B DEVELOPMENT STRICTLY!) => Development => Topic started by: mandrav on May 27, 2005, 01:48:40 pm
-
I just commited in CVS some changes that might interest some people, especially plugin writers.
Here's the commit log:
* Converted from MDI to wxNotebook :)
* Note to plugin developers: Manager::Get()->GetAppWindow() now returns a wxFrame as opposed to wxMDIParentFrame. Also, EditorBase is now a wxPanel instead of wxMDIChildFrame.
* Added two new SDK events: EVT_APP_STARTUP_DONE (fires when app finished loading) and EVT_APP_START_SHUTDOWN (fires just before app starts shutting down).
* Added "Start here" page with common tasks (can be disabled in env. settings).
I hope everyone is pleased now ;)
Yiannis.
-
Hi, as I've noticed, currently only my wxSmith plugin has some problems with these changes.
I have some problems with addopting to new editor system - something is going wrong with sizers. It changes size of editor's area properly but position seems to be always set to left of client area in main C::B widow. Compiling but yet not fuly compatible version is in CVS.
And there's one thing missing (I thing) - there should be close window button somewhere in the toolbar because MDI one has been removed ;)
-
And there's one thing missing (I thing) - there should be close window button somewhere in the toolbar because MDI one has been removed
OK :)
In the meantime you can use Ctrl-W
I will compile wxSmith later and see if I can help you. Please commit any updates you did for the new system.
Yiannis.
-
Yep, I've found bug - used Main app window instead of EditorManager::GetNotebook()
In the meantime you can use Ctrl-W
Seems not to work close option disabled (guess this is available for default editors only)
-
Hmmmmmmmmmm.... I ought to look into this. Anyway
(start daydream) I wish there could be a "close button" on every tab, like in Shareaza.
* Update: Wait a minute! Shareaza USES wxWidgets! :o So there MUST be a way, huh?
(end daydream)
Anyway, does ctrl-f4 work?
Oh, Yiannis - thanks a lot for the interface changes (haven't looked at them tho). Now I can work on the EditorBase changes I had planned :)
P.S. Do you think that with this change to notebook we can work on the wx2.6 conversion now?
-
Seems not to work close option disabled (guess this is available for default editors only)
That's right. It is intentionaly so, but maybe it's wrong this way though.
Does everyone think that custom editors should behave like builtins in this regard (like "close" menu enabled)?
P.S. Do you think that with this change to notebook we can work on the wx2.6 conversion now?
Haven't worked on it yet, but IIRC the only problem I had with wx2.6 was with the MDI interface. Now that it's out of the way, I think we can switch to wx2.6.
I 'll run some tests and if no major incompatibility is found (like unexpected crashes ;) ), we 're gonna switch :)
Yiannis.
-
I posted a thread about wx2.6 compat. problems, so you can vent off your oh-no's there ;-)
And yes, I think custom editors should behave like all editors. In fact, what I wanted to do was moving the save,close and ismodified functions etc. (cann't remember the exact names tho) to EditorBase so custom editors could appear in the open files tree.
-
And yes, I think custom editors should behave like all editors. In fact, what I wanted to do was moving the save,close and ismodified functions etc. (cann't remember the exact names tho) to EditorBase so custom editors could appear in the open files tree.
OK, I 'll do that. But I need you to take a look at the open files tree.
One minor thing I didn't like was that the order of the files in there would change randomly. But now with the notebook, it's irritating because you can see the active tab (which was not the case with MDI). When you close a file, you expect the next tab to get activated. Nope, it seems like it's choosing randomly the next active file :)
Yiannis.
-
And yes, I think custom editors should behave like all editors. In fact, what I wanted to do was moving the save,close and ismodified functions etc. (cann't remember the exact names tho) to EditorBase so custom editors could appear in the open files tree.
I agree - in fact it would eliminate many problems with mime plugin development :)
Anyway, does ctrl-f4 work?
Does not (under Win), alt-f4 currently closes whole application (closing all editor windows - so goal partially reached :wink: :wink: ).
-
Some bugs i noticed with CB in tabs mode.
a) Upon start, I get an error of entry points not found. On quitting, I get errors about plugins not loaded (incidentally, it's the contrib plugins that i deleted before). Oh wait, somehow the plugins get re-copied there - nevermind :roll:
b) If I click on one of the "links" on the intro page, CB shuts down. (I've experienced this before, so it must be a crash). (This usually happens after closing a project and then clicking on one of the links - oh btw, having a "hand" cursor would help for the look'n'feel ;-) )
Here's a sample backtrace from GDB.
Program received signal SIGSEGV, Segmentation fault.
0x016fe7ee in ?? ()
(gdb) bt
#0 0x016fe7ee in ?? ()
#1 0x016fde56 in ?? ()
#2 0x016b8cad in ?? ()
#3 0x016b6b61 in ?? ()
#4 0x016fcae4 in ?? ()
#5 0x00414ef6 in MainFrame::HandleStartHereLink(wxString const&) (
this=0xd39740, link=@0x22f828) at src/main.cpp:1006
#6 0x0041e31c in StartHerePage::LinkClicked(wxHtmlLinkInfo const&) (
this=0x1645468, link=@0x22f8f8) at src/startherepage.cpp:75
#7 0x00428cb8 in MyHtmlWin::OnLinkClicked(wxHtmlLinkInfo const&) (
this=0x1d35008, link=@0x22f8f8) at src/startherepage.cpp:31
#8 0x10172db0 in wxHtmlCell::OnMouseClick(wxWindow*, int, int, wxMouseEvent con
st&) ()
Maybe it's the plugins again?
c) Well if we're having problem with closing windows, i'll ask this anyway :) Ctrl-shift-f4 for closing all "windows" and ctrl-f4 for closing single "window". I'm used to it from other editors :P
-
a) Upon start, I get an error of entry points not found. On quitting, I get errors about plugins not loaded (incidentally, it's the contrib plugins that i deleted before). Oh wait, somehow the plugins get re-copied there - nevermind :roll:
Got same problem - just rebuild-all for al plugins was enough :)
-
More suggestions for tabs :P (I'm at work, so I can't work on it now. Maybe someone can beat me to it if it's an easy task) :
* The tab name should just be the basename (i.e. without path) of the file. However, a hint/tip on hovering would reveal the full pathname of the file.
* I liked the filename appearing on the title bar. Can this be done, too?
Oh, yeah. TABS ROCK!!!!!! 8) 8) 8) 8) 8) 8)
-
a) Upon start, I get an error of entry points not found. On quitting, I get errors about plugins not loaded (incidentally, it's the contrib plugins that i deleted before). Oh wait, somehow the plugins get re-copied there - nevermind
These errors tell you which plugins failed to find the entry points. I bet they 're the contrib plugins ;)
And yes, the update.bat copies all dlls from devel plugins to output plugins, so you have to delete them from both locations (or rebuild them :) ).
b) If I click on one of the "links" on the intro page, CB shuts down. (I've experienced this before, so it must be a crash). (This usually happens after closing a project and then clicking on one of the links - oh btw, having a "hand" cursor would help for the look'n'feel
Maybe you can post more info after you build it correctly (no missing entry points etc). I 'm testing it since yesterday and it hasn't crashed on me.
I 'm pretty sure it has something to do with your build.
After all, it's only working under windows (the web links I mean) and it uses ShellExecute(), so I see no reason for crashing...
* The tab name should just be the basename (i.e. without path) of the file. However, a hint/tip on hovering would reveal the full pathname of the file.
Yeah, I know it would be nicer if it would be smaller (the tab text), but some of us (including me) work with projects having files with the same filename under different dirs. I 'd be lost if all I could see would be three tabs labeled, say, "console.h" ;)
And I would hate leaving the keyboard and getting the mouse just to move it over the tab for a hint to be displayed.
* I liked the filename appearing on the title bar. Can this be done, too?
That's an easy one.
Yiannis.
-
* The tab name should just be the basename (i.e. without path) of the file.
i strongly disagree, it's perfect, like it's implemented now, it show's the relative path from the project's base directory.
it's perfect for my needs, because i have a lot of include files which have the same name, but they differ by their directory location of storage.
However, a hint/tip on hovering would reveal the full pathname of the file.
* I liked the filename appearing on the title bar. Can this be done, too?
Oh, yeah. TABS ROCK!!!!!! 8) 8) 8) 8) 8) 8)
i completely agree with these points !
thanks
--tiwag
-
Yeah, I know it would be nicer if it would be smaller (the tab text), but some of us (including me) work with projects having files with the same filename under different dirs. I 'd be lost if all I could see would be three tabs labeled, say, "console.h" Wink
And I would hate leaving the keyboard and getting the mouse just to move it over the tab for a hint to be displayed.
i strongly disagree, it's perfect, like it's implemented now, it show's the relative path from the project's base directory.
it's perfect for my needs, because i have a lot of include files which have the same name, but they differ by their directory location of storage.
Hey tiwag, it seems I beat you to it :lol:
Yiannis.
-
...
Hey tiwag, it seems I beat you to it :lol:
Yiannis.
yeah, when i started editing my follow up, you haven't had posted,
and then you 've been 2minutes faster !!!
i've read it just now
-
Well i just mentioned it because I remembered seeing a bug report at SF about CB displaying extremely huge tabs. And we know that project files can be under VERY DEEP directories.
Anyway, I think I found out how to handle the ctrl-f4 stuff. There are two choices:
a) Add wxKeyEvent handlers to EditorManager so that it will close windows using certain key presses.
b) Add a "Window" menu with shortcuts.
Should we stick with a), or include b, too?
-
* The tab name should just be the basename (i.e. without path) of the file.
Yeah, I know it would be nicer if it would be smaller (the tab text), but some of us (including me) work with projects having files with the same filename under different dirs. I 'd be lost if all I could see would be three tabs labeled, say, "console.h" ;)
I hope the answer to this dilemma deserves its place somewhere under "Settings->Editor" 8)
-
Squizzz, you're a genius :)
-
A suggestion:
The Tab only show filename. The full pathname shown in the status bar at bottom, everybody happy :)
-
Hey, I added the shortcuts on main.cpp:
Ctrl F4, Ctrl-Shift F4, Ctrl F6, Ctrl Shift F6 (plus the usual ctrl w, and ctrl-shift w)
Now that it works I replaced my copy of Codeblocks with CVS :D
-
Well i just mentioned it because I remembered seeing a bug report at SF about CB displaying extremely huge tabs. And we know that project files can be under VERY DEEP directories.
There was a time when the tab would display the full filename, not the relative. When I closed this bug report, I made it display the relative one.
I hope the answer to this dilemma deserves its place somewhere under "Settings->Editor"
The Tab only show filename. The full pathname shown in the status bar at bottom, everybody happy
Now, these are two nice suggestions :)
Hey, I added the shortcuts on main.cpp:
Ctrl F4, Ctrl-Shift F4, Ctrl F6, Ctrl Shift F6 (plus the usual ctrl w, and ctrl-shift w)
I hope that's true.
Yiannis.
-
I like squizzz'z idea. A "show full path in tab" checkbox or something.
Might there be a max string length for the path+filename and trucate to "..."+endofpath+filename when it is exceded? Could this also be a user setting? The status bar filename should work the same way.