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

[PATCH] Improve Cmd-Q / Exit-Menu-Item on OSX

From: "Florian G(dot) Pflug" <fgp(at)phlo(dot)org>
To: pgadmin-hackers <pgadmin-hackers(at)postgresql(dot)org>
Subject: [PATCH] Improve Cmd-Q / Exit-Menu-Item on OSX
Date: 2005-04-24 19:55:18
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgadmin-hackers

Turns out that wxMac actually supports a macish behaviour of
the "Quit" MenuItem. It works similar to the About and Help menu
handling - you just set s_macEditMenuItemId to the id of
the Exit-Menuitem, and wx takes care of the rest.

Here is is patch (3-liner, including the compiler conditionals)
for this.

---------------- cut here ------------------------------------
Index: src/ui/frmMain.cpp
RCS file: /projects/pgadmin3/src/ui/frmMain.cpp,v
retrieving revision 1.128
diff -a -u -r1.128 frmMain.cpp
--- src/ui/frmMain.cpp	24 Apr 2005 12:19:50 -0000	1.128
+++ src/ui/frmMain.cpp	24 Apr 2005 19:38:02 -0000
@@ -178,6 +178,9 @@
      fileMenu->Append(MNU_HBAFILECONFIG, _("Open pg_hba.conf"),    _("Open configuration editor 
with pg_hba.conf."));
      fileMenu->Append(MNU_EXIT, _("E&xit\tAlt-F4"),                _("Quit this program."));
+#ifdef __WXMAC__
+    wxApp::s_macExitMenuItemId = MNU_EXIT ;
      menuBar->Append(fileMenu, _("&File"));

      // Edit Menu
------------------------ cut here -----------------------------

Please apply. (This is not sent as an attachment, because
I had trouble getting attachments through to the list...)

Greetings, Florian Pflug

pgadmin-hackers by date

Next:From: cvsDate: 2005-04-25 08:23:07
Subject: CVS Commit by dpage: Turns out that wxMac actually supports a macish
Previous:From: Florian G. PflugDate: 2005-04-24 15:42:02
Subject: Re: OS X Window Management

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