SVN Commit by dpage: r4379 - in trunk/pgadmin3: . src/frm
От | svn@pgadmin.org |
---|---|
Тема | SVN Commit by dpage: r4379 - in trunk/pgadmin3: . src/frm |
Дата | |
Msg-id | 200507061026.j66AQL0N032761@developer.pgadmin.org обсуждение исходный текст |
Список | pgadmin-hackers |
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 @@ </ul> <br> <ul> + <li>2005-07-06 DP Prompt the user to cancel running queries before closing the Query tool. <li>2005-07-04 DP Check for and display asynchronous notifications in the query tool. <li>2005-06-21 AP typo fixes, rename "initial db" to "maintenance db" <li>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(); }
В списке pgadmin-hackers по дате отправления: