Author: dpage
Date: 2006-01-09 09:11:33 +0000 (Mon, 09 Jan 2006)
New Revision: 4881

Modified:
   trunk/pgadmin3/CHANGELOG.txt
   trunk/pgadmin3/src/ctl/ctlSQLResult.cpp
   trunk/pgadmin3/src/frm/frmQuery.cpp
   trunk/pgadmin3/src/include/ctl/ctlSQLResult.h
   trunk/pgadmin3/src/include/frmQuery.h
   trunk/pgadmin3/src/include/menu.h
Log:
Use Ctrl-A to select all results in the query results pane. [Magnus Hagander]

Modified: trunk/pgadmin3/CHANGELOG.txt
===================================================================
--- trunk/pgadmin3/CHANGELOG.txt        2006-01-09 08:47:06 UTC (rev 4880)
+++ trunk/pgadmin3/CHANGELOG.txt        2006-01-09 09:11:33 UTC (rev 4881)
@@ -18,6 +18,7 @@
 </ul>
 <br>
 <ul>
+    <li>2006-01-09 DP         Use Ctrl-A to select all results in the query 
results pane. [Magnus Hagander]
     <li>2006-01-09 DP  1.4.2  Set the initial Unicode/Local charset options 
correctly in the Export dialogue [Magnus Hagander]
     <li>2005-12-26 AP  1.4.2  Fix PK detection in EditGrid per Andrus Moor
     <li>2005-12-26 AP  1.4.2  Fix Bitmap Index explain per Alexander Kirpa

Modified: trunk/pgadmin3/src/ctl/ctlSQLResult.cpp
===================================================================
--- trunk/pgadmin3/src/ctl/ctlSQLResult.cpp     2006-01-09 08:47:06 UTC (rev 
4880)
+++ trunk/pgadmin3/src/ctl/ctlSQLResult.cpp     2006-01-09 09:11:33 UTC (rev 
4881)
@@ -40,6 +40,12 @@
 }
 
 
+void ctlSQLResult::SelectAll()
+{
+       for (int i = 0; i < GetItemCount(); i++)
+               Select(i);
+}
+
 bool ctlSQLResult::Export()
 {
     if (rowsRetrieved>0 || (thread && thread->DataSet()->NumRows() > 0))

Modified: trunk/pgadmin3/src/frm/frmQuery.cpp
===================================================================
--- trunk/pgadmin3/src/frm/frmQuery.cpp 2006-01-09 08:47:06 UTC (rev 4880)
+++ trunk/pgadmin3/src/frm/frmQuery.cpp 2006-01-09 09:11:33 UTC (rev 4881)
@@ -73,6 +73,7 @@
     EVT_MENU(MNU_HELP,              frmQuery::OnHelp)
     EVT_MENU(MNU_CLEARHISTORY,      frmQuery::OnClearHistory)
     EVT_MENU(MNU_SAVEHISTORY,       frmQuery::OnSaveHistory)
+       EVT_MENU(MNU_SELECTALL,             frmQuery::OnSelectAll)
     EVT_ACTIVATE(                   frmQuery::OnActivate)
     EVT_STC_MODIFIED(CTL_SQLQUERY,  frmQuery::OnChangeStc)
     EVT_STC_UPDATEUI(CTL_SQLQUERY,  frmQuery::OnPositionStc)
@@ -158,7 +159,7 @@
 
     UpdateRecentFiles();
 
-    wxAcceleratorEntry entries[9];
+    wxAcceleratorEntry entries[10];
 
     entries[0].Set(wxACCEL_CTRL,                (int)'E',      MNU_EXECUTE);
     entries[1].Set(wxACCEL_CTRL,                (int)'O',      MNU_OPEN);
@@ -168,9 +169,10 @@
     entries[5].Set(wxACCEL_NORMAL,              WXK_F5,        MNU_EXECUTE);
     entries[6].Set(wxACCEL_NORMAL,              WXK_F7,        MNU_EXPLAIN);
     entries[7].Set(wxACCEL_ALT,                 WXK_PAUSE,     MNU_CANCEL);
-    entries[8].Set(wxACCEL_NORMAL,              WXK_F1,        MNU_HELP);
+       entries[8].Set(wxACCEL_CTRL,                            (int)'A',       
   MNU_SELECTALL);
+    entries[9].Set(wxACCEL_NORMAL,              WXK_F1,        MNU_HELP);
 
-    wxAcceleratorTable accel(8, entries);
+    wxAcceleratorTable accel(9, entries);
     SetAcceleratorTable(accel);
 
     queryMenu->Enable(MNU_CANCEL, false);
@@ -630,6 +632,20 @@
         msgHistory->Clear();
 }
 
+void frmQuery::OnSelectAll(wxCommandEvent& ev)
+{
+       wxWindow *wnd=currentControl();
+
+       if (wnd == sqlQuery)
+               sqlQuery->SelectAll();
+       else if (wnd == msgResult)
+               msgResult->SelectAll();
+       else if (wnd == msgHistory)
+               msgHistory->SelectAll();
+       else if (wnd == sqlResult)
+               sqlResult->SelectAll();
+}
+
 void frmQuery::OnFind(wxCommandEvent& ev)
 {
       sqlQuery->OnFind(ev);

Modified: trunk/pgadmin3/src/include/ctl/ctlSQLResult.h
===================================================================
--- trunk/pgadmin3/src/include/ctl/ctlSQLResult.h       2006-01-09 08:47:06 UTC 
(rev 4880)
+++ trunk/pgadmin3/src/include/ctl/ctlSQLResult.h       2006-01-09 09:11:33 UTC 
(rev 4881)
@@ -41,6 +41,8 @@
     int RetrieveOne();
     int Abort();
 
+       void SelectAll();
+
     bool Export();
     bool CanExport() { return rowsRetrieved>0 && colNames.GetCount() > 0; }
 

Modified: trunk/pgadmin3/src/include/frmQuery.h
===================================================================
--- trunk/pgadmin3/src/include/frmQuery.h       2006-01-09 08:47:06 UTC (rev 
4880)
+++ trunk/pgadmin3/src/include/frmQuery.h       2006-01-09 09:11:33 UTC (rev 
4881)
@@ -65,6 +65,7 @@
     void OnClearHistory(wxCommandEvent& event);
     void OnActivate(wxActivateEvent& event);
     void OnFocus(wxFocusEvent& event);
+       void OnSelectAll(wxCommandEvent& event);
 
     bool CheckChanged(bool canVeto);
     void OpenLastFile();

Modified: trunk/pgadmin3/src/include/menu.h
===================================================================
--- trunk/pgadmin3/src/include/menu.h   2006-01-09 08:47:06 UTC (rev 4880)
+++ trunk/pgadmin3/src/include/menu.h   2006-01-09 09:11:33 UTC (rev 4881)
@@ -55,6 +55,7 @@
     MNU_CLEARHISTORY,
     MNU_SAVEHISTORY,
     MNU_CHECKALIVE,
+       MNU_SELECTALL,
 
     MNU_CONTENTS,
     MNU_HELP,


---------------------------(end of broadcast)---------------------------
TIP 6: explain analyze is your friend

Reply via email to