Revision: 7436
          http://mahogany.svn.sourceforge.net/mahogany/?rev=7436&view=rev
Author:   vadz
Date:     2008-05-01 16:04:18 -0700 (Thu, 01 May 2008)

Log Message:
-----------
allow using -1 as max width with CreateCheckBox(): this is useful if there is 
one entry only

Modified Paths:
--------------
    trunk/M/include/gui/wxDialogLayout.h
    trunk/M/src/gui/wxDialogLayout.cpp

Modified: trunk/M/include/gui/wxDialogLayout.h
===================================================================
--- trunk/M/include/gui/wxDialogLayout.h        2008-05-01 23:03:32 UTC (rev 
7435)
+++ trunk/M/include/gui/wxDialogLayout.h        2008-05-01 23:04:18 UTC (rev 
7436)
@@ -33,6 +33,9 @@
    #define wxPNotebook wxPListbook
    #define wxNotebookEvent wxListbookEvent
 
+   #undef wxNotebookEventHandler
+   #define wxNotebookEventHandler wxListbookEventHandler
+
    #define wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGED 
wxEVT_COMMAND_LISTBOOK_PAGE_CHANGED
    #define wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGING 
wxEVT_COMMAND_LISTBOOK_PAGE_CHANGING
 

Modified: trunk/M/src/gui/wxDialogLayout.cpp
===================================================================
--- trunk/M/src/gui/wxDialogLayout.cpp  2008-05-01 23:03:32 UTC (rev 7435)
+++ trunk/M/src/gui/wxDialogLayout.cpp  2008-05-01 23:04:18 UTC (rev 7436)
@@ -290,8 +290,11 @@
    wxLayoutConstraints *c = new wxLayoutConstraints;
    SetTopConstraint(parent, c, last, 0);
    c->width.AsIs();
-   c->right.SameAs(parent, wxLeft, -(int)(2*LAYOUT_X_MARGIN + widthMax
-                                           + widthCheck));
+   if ( widthMax == -1 )
+      c->left.SameAs(parent, wxLeft, LAYOUT_X_MARGIN);
+   else
+      c->right.SameAs(parent, wxLeft, -(int)(2*LAYOUT_X_MARGIN + widthMax
+                                              + widthCheck));
    c->height.AsIs();
 
    checkbox->SetConstraints(c);


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
Mahogany-cvsupdates mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mahogany-cvsupdates

Reply via email to