Author Topic: WARNING: Major interface breaking CVS changes  (Read 15022 times)

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4305
    • Code::Blocks IDE
WARNING: Major interface breaking CVS changes
« 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:
Quote
* 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.
Be patient!
This bug will be fixed soon...

Offline byo

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 837
WARNING: Major interface breaking CVS changes
« Reply #1 on: May 27, 2005, 03:56:40 pm »
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 ;)

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4305
    • Code::Blocks IDE
WARNING: Major interface breaking CVS changes
« Reply #2 on: May 27, 2005, 04:01:48 pm »
Quote
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.
Be patient!
This bug will be fixed soon...

Offline byo

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 837
WARNING: Major interface breaking CVS changes
« Reply #3 on: May 27, 2005, 04:40:33 pm »
Yep, I've found bug - used Main app window instead of EditorManager::GetNotebook()

Quote
In the meantime you can use Ctrl-W


Seems not to work close option disabled (guess this is available for default editors only)

Offline rickg22

  • Lives here!
  • ****
  • Posts: 2283
WARNING: Major interface breaking CVS changes
« Reply #4 on: May 27, 2005, 05:36:56 pm »
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?

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4305
    • Code::Blocks IDE
WARNING: Major interface breaking CVS changes
« Reply #5 on: May 27, 2005, 06:01:12 pm »
Quote
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)?

Quote
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.
Be patient!
This bug will be fixed soon...

Offline rickg22

  • Lives here!
  • ****
  • Posts: 2283
WARNING: Major interface breaking CVS changes
« Reply #6 on: May 27, 2005, 06:15:15 pm »
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.

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4305
    • Code::Blocks IDE
WARNING: Major interface breaking CVS changes
« Reply #7 on: May 27, 2005, 06:32:37 pm »
Quote from: rickg22
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.
Be patient!
This bug will be fixed soon...

Offline byo

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 837
WARNING: Major interface breaking CVS changes
« Reply #8 on: May 27, 2005, 07:27:22 pm »
Quote from: rickg22
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 :)

Quote
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: ).

Offline rickg22

  • Lives here!
  • ****
  • Posts: 2283
WARNING: Major interface breaking CVS changes
« Reply #9 on: May 27, 2005, 09:03:29 pm »
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, [email protected]) at src/main.cpp:1006
#6  0x0041e31c in StartHerePage::LinkClicked(wxHtmlLinkInfo const&) (
    this=0x1645468, [email protected]) at src/startherepage.cpp:75
#7  0x00428cb8 in MyHtmlWin::OnLinkClicked(wxHtmlLinkInfo const&) (
    this=0x1d35008, [email protected]) 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

Offline byo

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 837
WARNING: Major interface breaking CVS changes
« Reply #10 on: May 27, 2005, 09:06:17 pm »
Quote from: rickg22
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 :)

Offline rickg22

  • Lives here!
  • ****
  • Posts: 2283
WARNING: Major interface breaking CVS changes
« Reply #11 on: May 27, 2005, 09:10:41 pm »
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)

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4305
    • Code::Blocks IDE
WARNING: Major interface breaking CVS changes
« Reply #12 on: May 27, 2005, 09:27:24 pm »
Quote
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 :) ).

Quote
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...

Quote
* 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.

Quote
* I liked the filename appearing on the title bar. Can this be done, too?

That's an easy one.

Yiannis.
Be patient!
This bug will be fixed soon...

Offline tiwag

  • Developer
  • Lives here!
  • *****
  • Posts: 1196
  • sailing away ...
    • tiwag.cb
WARNING: Major interface breaking CVS changes
« Reply #13 on: May 27, 2005, 09:29:25 pm »
Quote from: rickg22
* 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.

Quote from: rickg22

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

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4305
    • Code::Blocks IDE
WARNING: Major interface breaking CVS changes
« Reply #14 on: May 27, 2005, 09:52:29 pm »
Quote from: mandrav
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.

Quote from: tiwag
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.
Be patient!
This bug will be fixed soon...

Offline tiwag

  • Developer
  • Lives here!
  • *****
  • Posts: 1196
  • sailing away ...
    • tiwag.cb
WARNING: Major interface breaking CVS changes
« Reply #15 on: May 28, 2005, 12:03:46 am »
Quote from: mandrav
...
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

Offline rickg22

  • Lives here!
  • ****
  • Posts: 2283
WARNING: Major interface breaking CVS changes
« Reply #16 on: May 28, 2005, 12:52:01 am »
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?

Offline squizzz

  • Almost regular
  • **
  • Posts: 132
WARNING: Major interface breaking CVS changes
« Reply #17 on: May 28, 2005, 01:04:36 am »
Quote from: rickg22
* The tab name should just be the basename (i.e. without path) of the file.


Quote from: mandrav
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)
this space is for rent

Offline rickg22

  • Lives here!
  • ****
  • Posts: 2283
WARNING: Major interface breaking CVS changes
« Reply #18 on: May 28, 2005, 01:26:45 am »
Squizzz, you're a genius :)

Offline cyberkoa

  • Plugin developer
  • Almost regular
  • ****
  • Posts: 145
    • http://
WARNING: Major interface breaking CVS changes
« Reply #19 on: May 28, 2005, 04:20:31 am »
A suggestion:

   The Tab only show filename. The full pathname shown in the status bar at bottom, everybody happy  :)

Offline rickg22

  • Lives here!
  • ****
  • Posts: 2283
WARNING: Major interface breaking CVS changes
« Reply #20 on: May 28, 2005, 07:48:22 am »
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

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4305
    • Code::Blocks IDE
WARNING: Major interface breaking CVS changes
« Reply #21 on: May 28, 2005, 09:26:25 am »
Quote from: rickg22
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.

Quote from: squizzz
I hope the answer to this dilemma deserves its place somewhere under "Settings->Editor"

Quote from: cyberkoa
The Tab only show filename. The full pathname shown in the status bar at bottom, everybody happy

Now, these are two nice suggestions :)

Quote from: rickg22
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.
Be patient!
This bug will be fixed soon...

Offline DreadNot

  • Multiple posting newcomer
  • *
  • Posts: 47
    • http://www.utdallas.edu/atescomp
WARNING: Major interface breaking CVS changes
« Reply #22 on: May 31, 2005, 06:28:06 pm »
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.
There are two ways to code: watertight & bulletproof!