Hi,

It's a trivial patch: I miss a shortcut key for this function, and thus
created a patch to support it.

I don't get why this was:
        wxAcceleratorTable accel(12, entries);
and not 14, as suggested in the manual:

http://docs.wxwidgets.org/3.0/classwx_accelerator_table.html

Thank you,
-- 
Med Venlig Hilsen / Kind regards,
Mads Jensen

Max Jerry Horovitz: "Unfortunately, in America, babies are not found in
cola cans. I asked my mother when I was four and she said they came from
eggs laid by rabbis. If you aren't Jewish, they're laid by Catholic
nuns. If you're an atheist, they're laid by dirty, lonely prostitutes."
         -- Mary and Max (2009)
>From 246b9fe520efa9da89a1e831316605c744956ef7 Mon Sep 17 00:00:00 2001
From: Mads Jensen <[email protected]>
Date: Fri, 24 Oct 2014 23:39:54 +0200
Subject: [PATCH] F8 keyboard shortcut for executing result to a file

---
 pgadmin/frm/frmQuery.cpp | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/pgadmin/frm/frmQuery.cpp b/pgadmin/frm/frmQuery.cpp
index 1ef6417..f234739 100644
--- a/pgadmin/frm/frmQuery.cpp
+++ b/pgadmin/frm/frmQuery.cpp
@@ -300,7 +300,7 @@ frmQuery::frmQuery(frmMain *form, const wxString &_title, pgConn *_conn, const w
 	queryMenu = new wxMenu();
 	queryMenu->Append(MNU_EXECUTE, _("&Execute\tF5"), _("Execute query"));
 	queryMenu->Append(MNU_EXECPGS, _("Execute &pgScript\tF6"), _("Execute pgScript"));
-	queryMenu->Append(MNU_EXECFILE, _("Execute to file"), _("Execute query, write result to file"));
+	queryMenu->Append(MNU_EXECFILE, _("Execute to file\tF8"), _("Execute query, write result to file"));
 	queryMenu->Append(MNU_EXPLAIN, _("E&xplain\tF7"), _("Explain query"));
 	queryMenu->Append(MNU_EXPLAINANALYZE, _("Explain analyze\tShift-F7"), _("Explain and analyze query"));
 
@@ -375,7 +375,7 @@ frmQuery::frmQuery(frmMain *form, const wxString &_title, pgConn *_conn, const w
 
 	UpdateRecentFiles();
 
-	wxAcceleratorEntry entries[14];
+	wxAcceleratorEntry entries[15];
 
 	entries[0].Set(wxACCEL_CTRL,                (int)'E',      MNU_EXECUTE);
 	entries[1].Set(wxACCEL_CTRL,                (int)'O',      MNU_OPEN);
@@ -391,8 +391,9 @@ frmQuery::frmQuery(frmMain *form, const wxString &_title, pgConn *_conn, const w
 	entries[11].Set(wxACCEL_NORMAL,              WXK_F1,        MNU_HELP);
 	entries[12].Set(wxACCEL_CTRL,               (int)'N',      MNU_NEW);
 	entries[13].Set(wxACCEL_CTRL,               WXK_F6,        MNU_EXECPGS);
+	entries[14].Set(wxACCEL_CTRL,               WXK_F8,        MNU_EXECFILE);
 
-	wxAcceleratorTable accel(12, entries);
+	wxAcceleratorTable accel(15, entries);
 	SetAcceleratorTable(accel);
 
 	queryMenu->Enable(MNU_CANCEL, false);
-- 
1.9.1

-- 
Sent via pgadmin-hackers mailing list ([email protected])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-hackers

Reply via email to