Code::Blocks Forums

User forums => Help => Topic started by: arst on February 08, 2007, 09:54:01 am

Title: Truncated new project wizard
Post by: arst on February 08, 2007, 09:54:01 am
Hello,

I'm using a CB version compiled on my own machine
(rev 3557, WinXp).

When opening the New Project wizard, the dialog
is 'cut', so that only the left side with the splash
image is shown. All options, & info (on the right)
are 'cut off' from the dialog.

I have a downloaded 'precompiled' version CB in
another directory. It displays the New Project wizard
correctly.

I've gone over the resource files in the two directories,
and they are identical.

Ideas on fixes?

Thanks,
// Arst


[attachment deleted by admin]
Title: Re: Truncated new project wizard
Post by: Biplab on February 08, 2007, 10:30:24 am
Most probably the compilation of Code::Blocks was not perfect. The First Page of wizard is not called from the wizard's resource file. If you try with other wizard, it'll also give you same problem.

Did you run the update.bat file after compilation?? I think this could be the reason.

Regards,

Biplab
Title: Re: Truncated new project wizard
Post by: arst on February 08, 2007, 12:25:57 pm
I had not run update.bat, so I did. No change, still truncated
Wizard dialog.

So I rebuilt project. And removed the environment var
CODEBLOCKS_DATA_DIR (to make sure it was locating
resources locally). No change.

I execute from both the devel and output directory. Still
truncated dialog.

It has been like this for the last 3 versions I've downloaded
from SVN (Jan+Feb).

Ideas?

Title: Re: Truncated new project wizard
Post by: Biplab on February 08, 2007, 12:49:32 pm
It's weird. I've never faced it.

May be something strange.  :)
Title: Re: Truncated new project wizard
Post by: Pecan on February 08, 2007, 12:57:32 pm
Hello,

I'm using a CB version compiled on my own machine
(rev 3557, WinXp).

When opening the New Project wizard, the dialog
is 'cut', so that only the left side with the splash
image is shown. All options, & info (on the right)
are 'cut off' from the dialog.

I have a downloaded 'precompiled' version CB in
another directory. It displays the New Project wizard
correctly.

I've gone over the resource files in the two directories,
and they are identical.

Ideas on fixes?

Thanks,
// Arst


If you clicked on "don't show this page" in the wizard it used to cause this problem.

Re-run update.bat and accept the wizard splash pages as is and see if the problem goes away.

Just a guess.
Title: Re: Truncated new project wizard
Post by: mandrav on February 08, 2007, 01:02:28 pm
Since you compiled it yourself, you should give us some more info.
E.g. what wx version did you use to compile C::B??? (we officially support 2.6.x)
Title: Re: Truncated new project wizard
Post by: arst on February 08, 2007, 01:36:13 pm
More info: WxWidgets 2.8 (works just fine otherwise apart from
compiler warnings). It is Svn version 3557.

I rerun update.bat also. No change.

When I run CB downloaded as a binary from Nightly, the project
wizard comes out right.

OK
// Arst
Title: Re: Truncated new project wizard
Post by: arst on February 08, 2007, 01:49:11 pm
I checked around for option: "don't show this page", and since
I never get the full dialog, I cannot see it.

All project types behaves this way.

I could very well have checked this box at an earlier time.

OK
// Arst
Title: Re: Truncated new project wizard
Post by: Pecan on February 08, 2007, 02:04:15 pm
I checked around for option: "don't show this page", and since
I never get the full dialog, I cannot see it.

All project types behaves this way.

I could very well have checked this box at an earlier time.

OK
// Arst


You could rename your default.conf and start a new one to see if the wizard corrects itself.
Title: Re: Truncated new project wizard
Post by: mandrav on February 08, 2007, 02:26:53 pm
Quote
More info: WxWidgets 2.8

There's a patch for this issue with wx2.8. It's either in the forums or the patch tracker (can't recall now, sorry).
Title: Re: Truncated new project wizard
Post by: stahta01 on February 08, 2007, 09:12:24 pm
I have the same problem will look and verify that I am running the newest 2.8 cvs branch, will also see if problem exists under 2.9 cvs head.

Tim S
Title: Re: Truncated new project wizard
Post by: jfpjr on February 08, 2007, 11:19:25 pm
void Wiz::Finalize()
{
    // chain pages
    for (size_t i = 1; i < m_Pages.GetCount(); ++i)
        wxWizardPageSimple::Chain(m_Pages[i - 1], m_Pages);

    // allow the wizard to size itself around the pages
#if wxCHECK_VERSION(2, 8, 0)
        m_pWizard->GetPageAreaSizer()->Add(m_Pages[0]);
#else
    for (size_t i = 1; i < m_Pages.GetCount(); ++i)
        m_pWizard->GetPageAreaSizer()->Add(m_Pages);
#endif

    m_pWizard->Fit();
}

This is the fix for the Project wizard.....
Title: Re: Truncated new project wizard
Post by: stahta01 on February 09, 2007, 04:07:39 am
Patch code version of above fix, I have tested it and it worked for me.
Tim S
Code
Index: src/plugins/scriptedwizard/wiz.cpp
===================================================================
--- src/plugins/scriptedwizard/wiz.cpp (revision 3589)
+++ src/plugins/scriptedwizard/wiz.cpp (working copy)
@@ -1009,8 +1009,12 @@
         wxWizardPageSimple::Chain(m_Pages[i - 1], m_Pages[i]);

     // allow the wizard to size itself around the pages
-    for (size_t i = 1; i < m_Pages.GetCount(); ++i)
-        m_pWizard->GetPageAreaSizer()->Add(m_Pages[i]);
+    #if wxCHECK_VERSION(2, 8, 0)
+        m_pWizard->GetPageAreaSizer()->Add(m_Pages[0]);
+    #else
+        for (size_t i = 1; i < m_Pages.GetCount(); ++i)
+            m_pWizard->GetPageAreaSizer()->Add(m_Pages[i]);
+    #endif

     m_pWizard->Fit();
 }
Title: Re: Truncated new project wizard
Post by: arst on February 09, 2007, 11:18:46 am
Hello again,

Patch applied, this worked nicely.

I hope the fix makes it into svn soon.

Thanks!
// Arst
Title: Re: Truncated new project wizard
Post by: stahta01 on February 09, 2007, 01:40:27 pm
Uploaded 2.8 patch to
[ Patch #1880 ] Truncated new project scripted wizard fix for wxW28
https://developer.berlios.de/patch/index.php?func=detailpatch&patch_id=1880&group_id=5358

I was not sure who to grant credit to so I just said I did NOT write the patch.

Tim S
Title: Re: Truncated new project wizard
Post by: renaud.s on February 17, 2007, 02:24:15 pm
Hi,

Just to let you know that I had the same problem under Linux and this patch has solved the problem perfectly !
Thanks  :D

I'm running Ubuntu 6.10 on AMD64 dual-core.  I compiled Code::blocks from svn 3614.

I hope this patch will be included in svn repository soon...

Bye

Renaud S