Author Topic: The 11 January 2006 build is out.  (Read 28428 times)

Offline killerbot

  • Administrator
  • Lives here!
  • *****
  • Posts: 5490
The 11 January 2006 build is out.
« on: January 12, 2006, 12:29:04 am »
Get quick announcements through the RSS feed http://www.codeblocks.org/nightly/CodeBlock_RSS.xml
A link to the unicode windows wxWidget dll for Code::Blocks : http://download.berlios.de/codeblocks/wxmsw26u_gcc_cb.7z

The 11 January 2006 build is out.
  - Windows : http://download.berlios.de/codeblocks/CB_11jan2006_rev1719_win32.7z
  - Linux : not supported yet


Resolved Fixed:

  • KeyBinder v0.4.8 fixed disappearing accelerator when duplicate named; fixed potential crash when panel closes
  • Fixed hang on exit in linux
  • Removed some ugly macros from src/main.cpp
  • updated autotools build system to changes from manager framework redesign r1706
  • Revamped the CodeCompletion plugin, Stage 1. Reparsing after saving files is much faster now. Also, the code completion functionality is much faster due to the searchtree structure.
    Known issues: The Class browser is NOT updated when using the cache. WARNING: Might cause crashes if you have the cache enabled. Please disable it
  • Added Manager::Yield(). Use this whenever you need to call wxYield() and friends. It's safer. Updated all affected code
  • Patched wxPropertyGrid (cyberkoa ported wxAdvImageProperty from the propgrid sample)
  • Added support for watching unicode wxString while debugging
  • Fixed non-working color buttons in "Settings->Environment->Appearence->Docking system"
  • Added new event (EVT_SWITCH_VIEW_LAYOUT) to request the app to switch view layout
  • The debugger now has options to automatically switch layouts on debugging session start/end. Configured in "Settings->Debugger"
  • Removed $Id and $Date SVN keywords from sdk/manager.h which caused a full rebuild after every commit
  • Debugger tooltip evaluation now supports wxString too
  • Keybinder v0.4.10 separated out and demangled the GTK menuitem update Code and SetInvalid flag for RemoveEventHandler;
    Surrounded menuitem rebuild code with __WXMSW__

Regressions/Confirmed/Annoying/Common bugs:

  • DDE bug : clicking in windows explorer on a CB registered file throws an error message box
  • toolbar-images-not-changing-state (is a wx problem)


Offline jmccay

  • Almost regular
  • **
  • Posts: 202
Re: The 11 January 2006 build is out.
« Reply #1 on: January 12, 2006, 03:07:58 am »
I actually compiled it myself.  It is awesome!  One behind moving the watches window out of question, what was the reasoning behind removing the watches window out of the management window?  (Note: I am not complaining.  I'm just curious)  I do think it is definately cool.

jmccay
OS: WinXP, Win98 SE, & sometimes Linux

a little light reading from the wxWidgets 2.6.2 readme: A detailed 2000-page reference manual is supplied in HTML, PDF and Windows Help form: see the docs hierarchy.

Offline artoj

  • Almost regular
  • **
  • Posts: 206
  • Location: Supporting my team
    • http://ajonsson.kapsi.fi/
Re: The 11 January 2006 build is out.
« Reply #2 on: January 12, 2006, 08:12:48 am »
Two new ones (both minor):

1. Launch Code::Blocks and go to the Editor settings (Settings -> Editor). Select Default code tab.
2. Select C/C++ source file and add some text to it. Close settings by pressing OK.
3. Open random project.
4. Create new c/c++ source file (File -> New, file.cpp).
5. Add this file to the project.
6. The tab shows that the file is not modified but it is (try closing it).

1. Launch Code::Blocks and open project with some files.
2. Open two random files from the project.
3. Now try to open these files again in the project view. When clicking those files the tab right activates, but the application title bar shows only one file name and opened files list selection remains the same.
« Last Edit: January 12, 2006, 08:15:17 am by artoj »

Offline artoj

  • Almost regular
  • **
  • Posts: 206
  • Location: Supporting my team
    • http://ajonsson.kapsi.fi/
Re: The 11 January 2006 build is out.
« Reply #3 on: January 12, 2006, 08:45:06 am »
1. Launch Code::Blocks and go to the Editor settings (Settings -> Editor). Select Default code tab.
2. Select C/C++ source file and add some text to it. Close settings by pressing OK.
3. Open random project.
4. Create new c/c++ source file (File -> New, file.cpp).
5. Add this file to the project.
6. The tab shows that the file is not modified but it is (try closing it).

#1403630 Tab shows file is not modified when using default code

Another way to reproduce probably the same problem:

1. Open random project.
2. Create new file (File -> New). Create the file to the
same directory as the project.
3. Answer No when asked to add the new file to the project.
4. Edit the file in the editor so the tab shows the modification marker.
5. Add the file to the project (Project -> Add files).
6. Click the file's name in the project manager.

Tab now shows that the file is unmodified.

Quote
1. Launch Code::Blocks and open project with some files.
2. Open two random files from the project.
3. Now try to open these files again in the project view. When clicking those files the tab right activates, but the application title bar shows only one file name and opened files list selection remains the same.

#1403642 App title bar / Open files list show wrong selected file

Offline artoj

  • Almost regular
  • **
  • Posts: 206
  • Location: Supporting my team
    • http://ajonsson.kapsi.fi/
Re: The 11 January 2006 build is out.
« Reply #4 on: January 12, 2006, 04:45:51 pm »
Quote
1. Launch Code::Blocks, go to the Editor settings (Settings -> Editor) and select Default code tab.
2. If you already have text in C++ source and/or C++ header remove all text from both of them, save settings by pressing OK, open the Editor settings again and select Default code tab.
3. Make sure you have C++ source selected. Type some text to the textbox.
4. Select C++ header from the listbox.
5. Select C++ source from the listbox and the text you typed is gone.

#1403994 Default C++ source code setting doesn't work properly

Sorry for the bug spam. :)

Offline artoj

  • Almost regular
  • **
  • Posts: 206
  • Location: Supporting my team
    • http://ajonsson.kapsi.fi/
Re: The 11 January 2006 build is out.
« Reply #5 on: January 12, 2006, 09:00:37 pm »
This is from yesterday:

Quote
1. Launch Code::Blocks and load the default layout (I'm using the default default layout, nothing changed).
2. Drag the management window so it will undock.
3. Dock the management window again to its default place.
4. Minimize Code::Blocks.
5. When Code::Blocks is minimizing quickly press the Code::Blocks taskbar button. You have to hit it before Code::Blocks is fully minimized. If you did it right Code::Blocks will be unrestoreable from the taskbar by pressing the taskbar button (you can actually restore it by right clicking the taskbar icon with mouse and selecting Restore).

This unrestoreable state only happens if you move the docking windows around.

It was hard to reproduce it back then but no I can reproduce it every time with ease:

1. Open Code::Blocks and load the default layout (again I'm using the very default layout).
2. Drag and drop the Open files list so it will undock.
3. Dock it back to the default place.
4. Press the editor (or start page) so any docking windows does not get focus.
5. Minimize Code::Blocks using the taskbar button, not the minimize button!
6. Try to maximize Code::Blocks by clicking taskbar button. Code::Blocks won't maximize.

Can anybody confirm? :(

Offline tiwag

  • Developer
  • Lives here!
  • *****
  • Posts: 1196
  • sailing away ...
    • tiwag.cb
Re: The 11 January 2006 build is out.
« Reply #6 on: January 13, 2006, 01:06:13 am »
...
Can anybody confirm? :(

you are right, i confirm.

Offline killerbot

  • Administrator
  • Lives here!
  • *****
  • Posts: 5490
Re: The 11 January 2006 build is out.
« Reply #7 on: January 14, 2006, 05:48:20 pm »
Quote
Quote
1. Launch Code::Blocks and open project with some files.
2. Open two random files from the project.
3. Now try to open these files again in the project view. When clicking those files the tab right activates, but the application title bar shows only one file name and opened files list selection remains the same.

#1403642 App title bar / Open files list show wrong selected file

Okay flks, I have found the cause of the poblem and I have a solution (proposal). I did NOT specify it as a patch, because a second opinion is need from the devs. They might have a better solution for this.

Let's take as an example the Keybinder plug-in project.

What is the corect behaviour : In the project tree you double click on a file nod, and an aeditor should open up in the editors pane showing the contents of that file, AND !!! the title of the Cb window should say :
file.cpp [Project] - Code::Blocks v1.0

Now let's start our excursion. Open up the keybinder project, double click on cbkeybinder.cpp i nthe project tree. It opens up [see REMARK 1 (below)] and look at the title bar (yes, I know, but hold your breath, wait till REMARK 1). What happened behind the scenes : at a given moment we ended up at :
cbEditor* EditorManager::Open(const wxString& filename, int pos,ProjectFile* data) which in the case the file is not open yet in CB ends up in the following :
        ed = new cbEditor(m_pNotebook, fname, m_Theme);
This cbEditor constructor will call the Open function :
bool cbEditor::Open()
and this function will do the following at the end :
   NotifyPlugins(cbEVT_EDITOR_OPEN);
Thie Notify function loops over all plug-ins, and already the first plug-in it looked at result in a call to :
void MainFrame::DoUpdateAppTitle()
And this method sets the (new) title.
-- >So apart from the REMARK1 we made it.

Next double click keybinder.cpp in the project tree, and the story repeats.

Alrighty, time fo the instrumental break which instruments do you want u to break Cliff ... ).
Double click on cbkeybinder.cpp, the story 'nearly repeats' itself. Again we end up at :
cbEditor* EditorManager::Open(const wxString& filename, int pos,ProjectFile* data) which in the case the
BUT .... This time the opening tests ome to the conclusion that this 'to construct' cbEditor already exists, so no need to the new call --> woops, the rest of the story remains untold, no cookies,no drinks, no MainFrame::DoUpdateAppTitle() :-(

So my first experiments was to change :
Code
        if (eb->IsBuiltinEditor())
            ed = (cbEditor*)eb;
into :
Code
        if (eb->IsBuiltinEditor())
        {
            ed = (cbEditor*)eb;
            ed->NotifyPlugins(cbEVT_EDITOR_OPEN);
        }
No luck : we notify a little bit to early,in the MainFrame::DoUpdateAppTitle() they ask for the active editor, but out reopend file did not receive the state of active editor yet. SO be patient, let's just signal that we want to update the plug-ins as follows :
Code
    bool bNotifyPlugIns = false;
    if (eb)
    {
        if (eb->IsBuiltinEditor())
        {
ed = (cbEditor*)eb;
bNotifyPlugIns = true;
        }
        else
            return 0; // is open but not a builtin editor
    }
And at the end of our EditorManager::Open(), when the reopened editor has achieved the active editor state, we check our flag and act accordingly :
Code
	if(bNotifyPlugIns)
{
ed->NotifyPlugins(cbEVT_EDITOR_OPEN);
}
    // we 're done
    s_CanShutdown = true;

    return ed;

With this adjustments ....... Problem fixed, and and and it shows in the title :
cbkeybinder.cpp [C::B KeyBinder] - Code::Blocks v1.0 :-) :-) :-) :-)

Well it is time for that remark :
REMARK 1 :
Ater opening that cbkeybinder.cpp for the first time, you will notice that the project name i no shown, it only shows :
cbkeybinder.cpp - Code::Blocks v1.0   :-( :-(

Why ? Well I know why, didn't find a solution yet, Yiannis, this is where you come in ;-)
Look at this code (from MainFrame::DoUpdateAppTitle() ):
Code
	EditorBase* ed = Manager::Get()->GetEditorManager() ? Manager::Get()->GetEditorManager()->GetActiveEditor() : 0L;
cbProject* prj = 0;
if(ed && ed->IsBuiltinEditor())
{
    ProjectFile* prjf = ((cbEditor*)ed)->GetProjectFile();
    if(prjf)
            prj = prjf->GetParentProject();
}
else
        prj = Manager::Get()->GetProjectManager() ? Manager::Get()->GetProjectManager()->GetActiveProject() : 0L;
We have an active editor (ourfile), but it seems that the editor doe not have a projectfile associated to it yet -> so no parent project -> no project name. So that's the problem my dear Watson, elementary ...

How come it worked in our fixed 'reopen' path, well then the project file was associated. So it seems, we have something like this :
- open in editor
- notify plug-ins -> app title adjustements
- ...
- somewhere now the projectfile is associated
- ...

Voila,
time to go back to the debugger ;-)
Lieven


[EDIT] back from debugger : solution for the rmark 1 :
In EditorManager::Open() :
Change :
Code
        if(data)
            ed->SetProjectFile(data,true);
By :
Code
		if(data)
{
ed->SetProjectFile(data,true);
ed->NotifyPlugins(cbEVT_EDITOR_OPEN);
}

:-) :-) :-) :-)

PS : lot of Notifying ;-)
« Last Edit: January 14, 2006, 05:56:34 pm by killerbot »

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4315
    • Code::Blocks IDE
Re: The 11 January 2006 build is out.
« Reply #8 on: January 14, 2006, 07:47:04 pm »
Thanks a lot for the insight Lieven (although I kinda of knew this stuff) ;)

There 's one fundamental flaw in your solution though: EVT_EDITOR_OPEN is supposed to fire only once, just when the editor opens. That's why you don't see it anywhere else.
The event you 're looking for is EVT_EDITOR_ACTIVATED. So the actual bug is that MainFrame doesn't hook to EVT_EDITOR_ACTIVATED and the following one liner is the fix.

In main.cpp event table, add:
EVT_EDITOR_ACTIVATED(MainFrame::OnEditorOpened)

:)
Be patient!
This bug will be fixed soon...

Offline killerbot

  • Administrator
  • Lives here!
  • *****
  • Posts: 5490
Re: The 11 January 2006 build is out.
« Reply #9 on: January 14, 2006, 08:04:25 pm »
that's why I did not make a patch out of it, because I did not like to tell something opens when it actually already open.
I knew you would have something better, hope the explanation was helpfull. ;-)

And how about the second part : attachement of projectfile ?

Offline killerbot

  • Administrator
  • Lives here!
  • *****
  • Posts: 5490
Re: The 11 January 2006 build is out.
« Reply #10 on: January 14, 2006, 09:32:18 pm »
@Yiannis :
I changed it like you said. The first problem is being soled by this. But not the second one : new proposal :
Code
		if(data)
{
ed->SetProjectFile(data,true);
ed->NotifyPlugins(cbEVT_EDITOR_ACTIVATED);
}

Or do we risk here also too many notifications ?

will you adjust manually or do you want an official patch for it ?

[EDIT] : forget about it, just saw your new revision, with the ultimate fix for it ;-)
« Last Edit: January 14, 2006, 09:38:14 pm by killerbot »