Code::Blocks Forums

User forums => Nightly builds => Topic started by: killerbot on January 13, 2006, 12:40:14 am

Title: The 12 January 2006 build is out.
Post by: killerbot on January 13, 2006, 12:40:14 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 12 January 2006 build is out.
  - Windows : http://download.berlios.de/codeblocks/CB_12jan2006_rev1731_win32.7z
  - Linux : not supported yet


Resolved Fixed:


Regressions/Confirmed/Annoying/Common bugs:


Title: Re: The 12 January 2006 build is out.
Post by: artoj on January 13, 2006, 08:23:06 am
you are right, i confirm.

Thank you very much. This is now in SF..net:  #1404517 C::B fails to restore itself from taskbar (https://sourceforge.net/tracker/index.php?func=detail&aid=1404517&group_id=126998&atid=707416)

Now, if someone could reproduce this evil bug (http://forums.codeblocks.org/index.php?topic=1944.msg15269#msg15269) I could send it to SF.net.

Please post your comments/findings to this topic.

Thank you.
Title: Re: The 12 January 2006 build is out.
Post by: kkez on January 13, 2006, 02:23:53 pm
I can confirm this bug. The "check for externally modified files" option is checked. The reload file dialog is shown only when i switch to another application.

I may have found another bug:
1) Create a new file.
2) Modify it but don't save it.
3) Close this file. The confirm save dialog is shown two times.
Title: Re: The 12 January 2006 build is out.
Post by: Michael on January 13, 2006, 02:34:00 pm
I may have found another bug:
1) Create a new file.
2) Modify it but don't save it.
3) Close this file. The confirm save dialog is shown two times.

I have observed this bug too with rev1728. If you right click on the file tab and select "close", then the confirm save dialogue is shown two times. But if you close the file with the "x" icon, then it is shown just one time.

Michael
Title: Re: The 12 January 2006 build is out.
Post by: Michael on January 13, 2006, 02:48:56 pm
Now, if someone could reproduce this evil bug (http://forums.codeblocks.org/index.php?topic=1944.msg15269#msg15269) I could send it to SF.net.

I have observed this bug too with rev1728. I have also tried with UltraEdit-32. If I do not close it, there is no bug, but if I close it, the bug is there.

Michael
Title: Re: The 12 January 2006 build is out.
Post by: artoj on January 13, 2006, 03:51:41 pm
Thanks kkez and Michael. It seems I had already submitted the bug to SF.net :oops: but I now added the steps how to reproduce the bug better.

I may have found another bug:
1) Create a new file.
2) Modify it but don't save it.
3) Close this file. The confirm save dialog is shown two times.

I can confirm. You should create a new bug to SourceForge.net's Code::Blocks project page. (https://sourceforge.net/projects/codeblocks/)
Title: Re: The 12 January 2006 build is out.
Post by: agentsmith on January 13, 2006, 08:06:07 pm
Hello,
I'm not so sure if this is a right plate to post it, but I haven't found this issue anywhere on this forum, so please have mercy for a rookie ;)
Anyway, I've noticed that "Show spaces" option doesn't work. And this is unconditional. Both "All spaces" and "Only after indent" options always result that all white space is is...still white ;)
I verified this on few builds (from 02 Jan to this build) and on two different machines (both with WinXP).

Regards
Title: Re: The 12 January 2006 build is out.
Post by: mandrav on January 13, 2006, 08:20:30 pm
I'm not so sure if this is a right plate to post it

It is not the right place to post it ;).
But thanks anyway. Fixed in r1750.
Title: Re: The 12 January 2006 build is out.
Post by: Michael on January 13, 2006, 08:23:38 pm
Fixed in r1750.

And I have just finished to compile rev1749 :D. How fast bugs are fixed is always a surprise for me (and a pleasant one :D).

Michael
Title: Re: The 12 January 2006 build is out.
Post by: Ceniza on January 13, 2006, 08:31:36 pm
Heh, I always have the same "problem". I just finish compiling the most recent revision and a new one comes.

mandrav and his team of slaves developers do it on purpose, I know...
Title: Re: The 12 January 2006 build is out.
Post by: Michael on January 13, 2006, 08:35:47 pm
slaves developers

Ehm...slaves :D? I used the same methaphor with my old project supervisor :).

Michael
Title: Re: The 12 January 2006 build is out.
Post by: killerbot on January 13, 2006, 09:09:15 pm
Thanks kkez and Michael. It seems I had already submitted the bug to SF.net :oops: but I now added the steps how to reproduce the bug better.

I may have found another bug:
1) Create a new file.
2) Modify it but don't save it.
3) Close this file. The confirm save dialog is shown two times.

I can confirm. You should create a new bug to SourceForge.net's Code::Blocks project page. (https://sourceforge.net/projects/codeblocks/)

was the file part of a project ??
I just tried without projects , and for the new file, only 1 message box came up.
Title: Re: The 12 January 2006 build is out.
Post by: artoj on January 13, 2006, 09:11:21 pm
was the file part of a project ??
I just tried without projects , and for the new file, only 1 message box came up.

EDIT: You need to select No when the confirm dialog pops up first time.

So:

1) Create a new file.
2) Modify it but don't save it.
3) Close this file.
4) Select No.

The dialog is shown twice.
Title: Re: The 12 January 2006 build is out.
Post by: killerbot on January 13, 2006, 09:54:29 pm
I have found the problem and have a solution.

When you call close by right clicking on the tab , you end up in this function :
Code
bool EditorManager::Close(EditorBase* editor,bool dontsave)
{
    SANITY_CHECK(false);
    if (editor)
{
int idx = FindPageFromEditor(editor);
if (idx != -1)
{
            if(!dontsave)
                if(!QueryClose(editor))
                    return false;
            wxString filename = editor->GetFilename();
//            LOGSTREAM << wxString::Format(_T("Close(): ed=%p, title=%s\n"), editor, editor ? editor->GetTitle().c_str() : _T(""));
            m_pNotebook->DeletePage(idx);
}
}
    m_pData->m_NeedsRefresh = true;
    return true;
}

-> The QueryClose() call shows the message box. When the user clicks on no, the function returns true, so it ends up at m_pNoteBook->DeletePage(idx), and that one will call OnPageClosing
Code
void EditorManager::OnPageClosing(wxFlatNotebookEvent& event)
{
    EditorBase* eb = static_cast<EditorBase*>(m_pNotebook->GetPage(event.GetSelection()));
//    LOGSTREAM << wxString::Format(_T("OnPageClosing(): ed=%p, title=%s\n"), eb, eb ? eb->GetTitle().c_str() : _T(""));
    if (!QueryClose(eb))
        event.Veto();
    event.Skip(); // allow others to process it too
}
Which calls .... QueryClose() --> so a second message box.

If you close with the x button, then you end up immediately in OnPageClosing -> 1 message box.

My suggestion is to remove the part :

            if(!dontsave)
                if(!QueryClose(editor))
                    return false;
            wxString filename = editor->GetFilename();
//            LOGSTREAM << wxString::Format(_T("Close(): ed=%p, title=%s\n"), editor, editor ? editor->GetTitle().c_str() : _T(""));

EditorManager::QueryClose returns false, only when the saving faild for some reason or the user pressed cancel, then EditorManager::Close will return after the QueryClose call and not call the notebook anymore, so no problem for this either, the one time change is in both cases best suited inthe notebook.

Another thing is then the QueryClose checks on ed->GetModified() and on a NO click it will do ed->SetModified(false); so that means in our secon call the GetModified should return false (and hence no message box), but it seems again this returns true.



But Yiannis could you take a look at it ? Maybe the functions is also called in other flows where it is still needed ???



[EDIT], the reason why the second modify again gets returned true is :
bool cbEditor::GetModified()
{
    return m_Modified || m_pControl->GetModify();
}

m_Modified was set to false, but it is the second part that make the whole evaluate to true.
Title: Re: The 12 January 2006 build is out.
Post by: mandrav on January 13, 2006, 10:25:54 pm
I have found the problem and have a solution.

Hehe, as always ;)
Fixed.
Thanks Lieven.
Title: Re: The 12 January 2006 build is out.
Post by: rickg22 on January 13, 2006, 10:53:59 pm
mandrav and his team of slaves developers do it on purpose, I know...

That's Dr. Mandrav and his minions, to you, sir. :P