SVN Commit by andreas: r4500 - in trunk/pgadmin3/src: ctl frm main - Mailing list pgadmin-hackers

From svn@pgadmin.org
Subject SVN Commit by andreas: r4500 - in trunk/pgadmin3/src: ctl frm main
Date
Msg-id 200510051055.j95AtSR0018139@developer.pgadmin.org
Whole thread Raw
List pgadmin-hackers
Author: andreas
Date: 2005-10-05 11:55:28 +0100 (Wed, 05 Oct 2005)
New Revision: 4500

Modified:
   trunk/pgadmin3/src/ctl/ctlSQLResult.cpp
   trunk/pgadmin3/src/frm/frmExport.cpp
   trunk/pgadmin3/src/main/events.cpp
Log:
some minor fixes

Modified: trunk/pgadmin3/src/ctl/ctlSQLResult.cpp
===================================================================
--- trunk/pgadmin3/src/ctl/ctlSQLResult.cpp    2005-10-05 10:41:15 UTC (rev 4499)
+++ trunk/pgadmin3/src/ctl/ctlSQLResult.cpp    2005-10-05 10:55:28 UTC (rev 4500)
@@ -45,7 +45,7 @@
     if (rowsRetrieved>0 || (thread && thread->DataSet()->NumRows() > 0))
     {
         frmExport dlg(this);
-        if (dlg.ShowModal() > 0)
+        if (dlg.ShowModal() == wxID_OK)
         {
             if (rowsRetrieved> 0)
                 return dlg.Export(this);

Modified: trunk/pgadmin3/src/frm/frmExport.cpp
===================================================================
--- trunk/pgadmin3/src/frm/frmExport.cpp    2005-10-05 10:41:15 UTC (rev 4499)
+++ trunk/pgadmin3/src/frm/frmExport.cpp    2005-10-05 10:55:28 UTC (rev 4500)
@@ -128,7 +128,7 @@


     if (IsModal())
-        EndModal(1);
+        EndModal(wxID_OK);
     else
         Destroy();
 }
@@ -257,7 +257,7 @@
 void frmExport::OnCancel(wxCommandEvent &ev)
 {
     if (IsModal())
-        EndModal(-1);
+        EndModal(wxID_CANCEL);
     else
         Destroy();
 }

Modified: trunk/pgadmin3/src/main/events.cpp
===================================================================
--- trunk/pgadmin3/src/main/events.cpp    2005-10-05 10:41:15 UTC (rev 4499)
+++ trunk/pgadmin3/src/main/events.cpp    2005-10-05 10:55:28 UTC (rev 4500)
@@ -372,9 +372,13 @@
     wxMenuItem *item=menuBar->FindItem(id);
     if (item)
     {
-        wxMenu *menu=item->GetMenu();
-        size_t position=0;
-        do
+        wxMenu *menu=item->GetSubMenu();
+        wxASSERT(menu);
+        if (!menu)
+            return;
+
+        size_t position;
+        for (position = 0 ; position < menu->GetMenuItemCount() ; position++)
         {
             item = menu->FindItemByPosition(position);
             if (item && item->IsEnabled())
@@ -382,9 +386,8 @@
                 menuBar->Enable(id, true);
                 return;
             }
-            position++;
         }
-        while (item);
+
         menuBar->Enable(id, false);
     }
 }


pgadmin-hackers by date:

Previous
From: svn@pgadmin.org
Date:
Subject: SVN Commit by andreas: r4499 - in trunk/pgadmin3/docs/en_US: . images
Next
From: svn@pgadmin.org
Date:
Subject: SVN Commit by andreas: r4502 - trunk/pgadmin3/src/ui