SVN Commit by dpage: r4379 - in trunk/pgadmin3: . src/frm

Поиск
Список
Период
Сортировка
Искать

SVN Commit by dpage: r4379 - in trunk/pgadmin3: . src/frm

От:
svn@pgadmin.org
Дата:
Author: dpage
Date: 2005-07-06 11:26:21 +0100 (Wed, 06 Jul 2005)
New Revision: 4379

Modified:
   trunk/pgadmin3/CHANGELOG.txt
   trunk/pgadmin3/src/frm/frmQuery.cpp
Log:
Prompt the user to cancel running queries before closing the Query tool.

Modified: trunk/pgadmin3/CHANGELOG.txt
===================================================================
--- trunk/pgadmin3/CHANGELOG.txt	2005-07-05 10:03:42 UTC (rev 4378)
+++ trunk/pgadmin3/CHANGELOG.txt	2005-07-06 10:26:21 UTC (rev 4379)
@@ -17,6 +17,7 @@
 
 
    +
  • 2005-07-06 DP Prompt the user to cancel running queries before closing the Query tool.
  • 2005-07-04 DP Check for and display asynchronous notifications in the query tool.
  • 2005-06-21 AP typo fixes, rename "initial db" to "maintenance db"
  • 2005-06-19 AP pgAgent moved under server, some more fixes Modified: trunk/pgadmin3/src/frm/frmQuery.cpp =================================================================== --- trunk/pgadmin3/src/frm/frmQuery.cpp 2005-07-05 10:03:42 UTC (rev 4378) +++ trunk/pgadmin3/src/frm/frmQuery.cpp 2005-07-06 10:26:21 UTC (rev 4379) @@ -651,16 +651,20 @@ void frmQuery::OnClose(wxCloseEvent& event) { - if (CheckChanged(event.CanVeto()) && event.CanVeto()) + if (queryMenu->IsEnabled(MNU_CANCEL)) { - event.Veto(); - return; - } + if (event.CanVeto()) + { + wxMessageDialog msg(this, _("A query is running. Do you wish to cancel it?"), _("pgAdmin III Query"), + wxYES_NO|wxNO_DEFAULT|wxICON_EXCLAMATION); - Hide(); + if (msg.ShowModal() == wxID_NO) + { + event.Veto(); + return; + } + } - if (queryMenu->IsEnabled(MNU_CANCEL)) - { wxCommandEvent ev; OnCancel(ev); } @@ -670,6 +674,15 @@ wxLogInfo(wxT("SQL Query box: Waiting for query to abort")); wxSleep(1); } + + if (CheckChanged(event.CanVeto()) && event.CanVeto()) + { + event.Veto(); + return; + } + + Hide(); + Destroy(); }
FAQ