Update of /cvsroot/mahogany/M/src/gui
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28791/src/gui

Modified Files:
        wxDialogLayout.cpp 
Log Message:
cosmetic fixes to the options dialog; fixed memory leak

Index: wxDialogLayout.cpp
===================================================================
RCS file: /cvsroot/mahogany/M/src/gui/wxDialogLayout.cpp,v
retrieving revision 1.116
retrieving revision 1.117
diff -b -u -2 -r1.116 -r1.117
--- wxDialogLayout.cpp  7 Jul 2005 18:48:45 -0000       1.116
+++ wxDialogLayout.cpp  9 Jul 2005 23:49:28 -0000       1.117
@@ -1266,17 +1266,9 @@
    wxLayoutConstraints *c;
 
-   wxStaticLine *line = new wxStaticLine(panel, -1);
-   c = new wxLayoutConstraints;
-   c->left.SameAs(panel, wxLeft, LAYOUT_X_MARGIN);
-   c->right.SameAs(panel, wxRight, LAYOUT_X_MARGIN);
-   c->height.AsIs();
-   c->bottom.SameAs(panel, wxBottom, 5*LAYOUT_Y_MARGIN + hBtn);
-   line->SetConstraints(c);
-
    c = new wxLayoutConstraints;
    c->right.SameAs(panel, wxRight, LAYOUT_X_MARGIN);
    c->width.AsIs();
    c->height.AsIs();
-   c->bottom.Above(line, -LAYOUT_Y_MARGIN);
+   c->bottom.SameAs(panel, wxBottom, 5*LAYOUT_Y_MARGIN + hBtn);
    m_chcSources->SetConstraints(c);
 
@@ -1289,5 +1281,13 @@
    label->SetConstraints(c);
 
-   return m_chcSources;
+   wxStaticLine *line = new wxStaticLine(panel, -1);
+   c = new wxLayoutConstraints;
+   c->left.SameAs(panel, wxLeft, LAYOUT_X_MARGIN);
+   c->right.SameAs(panel, wxRight, LAYOUT_X_MARGIN);
+   c->height.AsIs();
+   c->bottom.Above(m_chcSources, -LAYOUT_Y_MARGIN);
+   line->SetConstraints(c);
+
+   return line;
 }
 
@@ -1385,14 +1385,4 @@
 bool wxOptionsEditDialog::TransferDataToWindow()
 {
-#ifdef OS_WIN
-   // we have a problem under Windows: although initially the focus is set
-   // correctly in the dialog, when we call wxRadioBox::SetSelection from one
-   // of the pages TransferDataToWindow(), it is changed to the radio box which
-   // is wrong as it might go to a hidden page
-   //
-   // this should be somehow fixed in wxMSW but for now do it here
-   wxWindow *focusOld = FindFocus();
-#endif // OS_WIN
-
    const int count = m_notebook->GetPageCount();
    for ( int nPage = 0; nPage < count; nPage++ ) {
@@ -1403,9 +1393,4 @@
    }
 
-#ifdef OS_WIN
-   if ( focusOld )
-      focusOld->SetFocus();
-#endif // OS_WIN
-
    ResetDirty();
 
@@ -1496,5 +1481,5 @@
    }
 
-   Profile *profile = GetProfile();
+   Profile_obj profile(GetProfile());
    wxCHECK_RET( profile, _T("no profile in wxOptionsEditDialog?") );
 
@@ -1514,5 +1499,5 @@
    if ( m_changedConfigSource )
    {
-      Profile *profile = GetProfile();
+      Profile_obj profile(GetProfile());
       if ( profile )
       {



-------------------------------------------------------
This SF.Net email is sponsored by the 'Do More With Dual!' webinar happening
July 14 at 8am PDT/11am EDT. We invite you to explore the latest in dual
core and dual graphics technology at this free one hour event hosted by HP,
AMD, and NVIDIA.  To register visit http://www.hp.com/go/dualwebinar
_______________________________________________
Mahogany-cvsupdates mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mahogany-cvsupdates

Reply via email to