Skip site navigation (1) Skip section navigation (2)

SVN Commit by dpage: r4458 - in trunk/pgadmin3/src: agent dlg

From: svn(at)pgadmin(dot)org
To: pgadmin-hackers(at)postgresql(dot)org
Subject: SVN Commit by dpage: r4458 - in trunk/pgadmin3/src: agent dlg
Date: 2005-09-23 07:47:01
Message-ID: 200509230747.j8N7l116004687@developer.pgadmin.org (view raw or flat)
Thread:
Lists: pgadmin-hackers
Author: dpage
Date: 2005-09-23 08:47:01 +0100 (Fri, 23 Sep 2005)
New Revision: 4458

Modified:
   trunk/pgadmin3/src/agent/dlgJob.cpp
   trunk/pgadmin3/src/dlg/dlgTable.cpp
Log:
Prevent cancelled sub-property dialogues overwriting/adding properties.

Modified: trunk/pgadmin3/src/agent/dlgJob.cpp
===================================================================
--- trunk/pgadmin3/src/agent/dlgJob.cpp	2005-09-20 09:37:45 UTC (rev 4457)
+++ trunk/pgadmin3/src/agent/dlgJob.cpp	2005-09-23 07:47:01 UTC (rev 4458)
@@ -240,7 +240,7 @@
     step.CenterOnParent();
     step.SetConnection(connection);
 
-    if (step.Go(true) >= 0)
+    if (step.Go(true) != wxID_CANCEL)
     {
         lstSteps->SetItem(pos, 0, step.GetName());
         lstSteps->SetItem(pos, 1, step.GetComment());
@@ -273,7 +273,7 @@
     dlgStep step(&stepFactory, mainForm, NULL, job);
     step.CenterOnParent();
     step.SetConnection(connection);
-    if (step.Go(true) >= 0)
+    if (step.Go(true) != wxID_CANCEL)
     {
         int pos = lstSteps->AppendItem(stepFactory.GetIconId(), step.GetName(), step.GetComment());
 		wxString *stepSql = new wxString(step.GetInsertSql());
@@ -311,7 +311,7 @@
     schedule.CenterOnParent();
     schedule.SetConnection(connection);
 
-    if (schedule.Go(true) >= 0)
+    if (schedule.Go(true) != wxID_CANCEL)
     {
         lstSchedules->SetItem(pos, 0, schedule.GetName());
         lstSchedules->SetItem(pos, 1, schedule.GetComment());
@@ -337,7 +337,7 @@
     dlgSchedule schedule(&scheduleFactory, mainForm, NULL, job);
     schedule.CenterOnParent();
     schedule.SetConnection(connection);
-    if (schedule.Go(true) >= 0)
+    if (schedule.Go(true) != wxID_CANCEL)
     {
         int pos = lstSchedules->AppendItem(scheduleFactory.GetIconId(), schedule.GetName(), schedule.GetComment());
         wxString *scheduleSql = new wxString(schedule.GetInsertSql());

Modified: trunk/pgadmin3/src/dlg/dlgTable.cpp
===================================================================
--- trunk/pgadmin3/src/dlg/dlgTable.cpp	2005-09-20 09:37:45 UTC (rev 4457)
+++ trunk/pgadmin3/src/dlg/dlgTable.cpp	2005-09-23 07:47:01 UTC (rev 4458)
@@ -636,7 +636,7 @@
     dlgColumn col(&columnFactory, mainForm, column, table);
     col.CenterOnParent();
     col.SetDatabase(database);
-    if (col.Go(true) >= 0)
+    if (col.Go(true) != wxID_CANCEL)
     {
         lstColumns->SetItem(pos, 0, col.GetName());
         lstColumns->SetItem(pos, 1, col.GetDefinition());
@@ -653,7 +653,7 @@
     dlgColumn col(&columnFactory, mainForm, NULL, table);
     col.CenterOnParent();
     col.SetDatabase(database);
-    if (col.Go(true) >= 0)
+    if (col.Go(true) != wxID_CANCEL)
     {
         long pos = lstColumns->AppendItem(columnFactory.GetIconId(), col.GetName(), col.GetDefinition());
         if (table && !connection->BackendMinimumVersion(8, 0))
@@ -706,7 +706,7 @@
             dlgPrimaryKey pk(&primaryKeyFactory, mainForm, lstColumns);
             pk.CenterOnParent();
             pk.SetDatabase(database);
-            if (pk.Go(true) >= 0)
+            if (pk.Go(true) != wxID_CANCEL)
             {
                 lstConstraints->AppendItem(primaryKeyFactory.GetIconId(), pk.GetName(), pk.GetDefinition());
                 hasPK=true;
@@ -719,7 +719,7 @@
             dlgForeignKey fk(&foreignKeyFactory, mainForm, lstColumns);
             fk.CenterOnParent();
             fk.SetDatabase(database);
-            if (fk.Go(true) >= 0)
+            if (fk.Go(true) != wxID_CANCEL)
             {
                 wxString str=fk.GetDefinition();
                 str.Replace(wxT("\n"), wxT(" "));
@@ -732,7 +732,7 @@
             dlgUnique unq(&uniqueFactory, mainForm, lstColumns);
             unq.CenterOnParent();
             unq.SetDatabase(database);
-            if (unq.Go(true) >= 0)
+            if (unq.Go(true) != wxID_CANCEL)
                 lstConstraints->AppendItem(uniqueFactory.GetIconId(), unq.GetName(), unq.GetDefinition());
             break;
         }
@@ -741,7 +741,7 @@
             dlgCheck chk(&checkFactory, mainForm);
             chk.CenterOnParent();
             chk.SetDatabase(database);
-            if (chk.Go(true) >= 0)
+            if (chk.Go(true) != wxID_CANCEL)
                 lstConstraints->AppendItem(checkFactory.GetIconId(), chk.GetName(), chk.GetDefinition());
             break;
         }


pgadmin-hackers by date

Next:From: svnDate: 2005-09-23 08:56:53
Subject: SVN Commit by dpage: r4459 - in trunk/pgadmin3/src: dlg schema
Previous:From: Diego GilDate: 2005-09-22 14:34:49
Subject: Re: wrong order of drop ... create ... sentences

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group