Re: [PATCH v2] git-gui: bring Wish process to front on Mac

2013-06-15 Thread Pat Thoyts
On 14 June 2013 18:54, Junio C Hamano gits...@pobox.com wrote:
 Stefan Haller ste...@haller-berlin.de writes:

 On Mac OS X, any application that is started from the Terminal will open
 behind all running applications; as a work-around, manually bring ourselves
 to the front. (Stolen from gitk, commit 76bf6ff93e.)

 We do this as the very first thing, so that any message boxes that might pop
 up during the rest of the startup sequence are actually seen by the user.

 Signed-off-by: Stefan Haller ste...@haller-berlin.de
 ---

 Pat, is there any progress on this?  I do not mind, and I actually
 would prefer, a pull request early in the development cycle.


yep - I applied this and a couple of others and sent up a pull request
now. I see there are some commits in git's tree that I don't have on
this side so I'll merge those in here shortly.
--
To unsubscribe from this list: send the line unsubscribe git in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v2] git-gui: bring Wish process to front on Mac

2013-06-14 Thread Junio C Hamano
Stefan Haller ste...@haller-berlin.de writes:

 On Mac OS X, any application that is started from the Terminal will open
 behind all running applications; as a work-around, manually bring ourselves
 to the front. (Stolen from gitk, commit 76bf6ff93e.)

 We do this as the very first thing, so that any message boxes that might pop
 up during the rest of the startup sequence are actually seen by the user.

 Signed-off-by: Stefan Haller ste...@haller-berlin.de
 ---

Pat, is there any progress on this?  I do not mind, and I actually
would prefer, a pull request early in the development cycle.

I've been busy and haven't got around to it, is a perfectly
acceptable response.  Just pinging to check.

 Changes since the first patch: 
  - add catch
  - specify full path to /usr/bin/osascript

  git-gui.sh | 15 +++
  1 file changed, 15 insertions(+)

 diff --git a/git-gui.sh b/git-gui.sh
 index e11..a792924 100755
 --- a/git-gui.sh
 +++ b/git-gui.sh
 @@ -29,6 +29,21 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  
 02111-1307  USA}]
  
  ##
  ##
 +## On Mac, bring the current Wish process window to front
 +
 +if {[tk windowingsystem] eq aqua} {
 + catch {
 + exec /usr/bin/osascript -e [format {
 + tell application System Events
 + set frontmost of processes whose unix id is %d 
 to true
 + end tell
 + } [pid] ]
 + }
 +}
 +
 +
 +##
 +##
  ## Tcl/Tk sanity check
  
  if {[catch {package require Tcl 8.4} err]
--
To unsubscribe from this list: send the line unsubscribe git in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH v2] git-gui: bring Wish process to front on Mac

2013-06-07 Thread Stefan Haller
On Mac OS X, any application that is started from the Terminal will open
behind all running applications; as a work-around, manually bring ourselves
to the front. (Stolen from gitk, commit 76bf6ff93e.)

We do this as the very first thing, so that any message boxes that might pop
up during the rest of the startup sequence are actually seen by the user.

Signed-off-by: Stefan Haller ste...@haller-berlin.de
---
Changes since the first patch: 
 - add catch
 - specify full path to /usr/bin/osascript

 git-gui.sh | 15 +++
 1 file changed, 15 insertions(+)

diff --git a/git-gui.sh b/git-gui.sh
index e11..a792924 100755
--- a/git-gui.sh
+++ b/git-gui.sh
@@ -29,6 +29,21 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  
02111-1307  USA}]
 
 ##
 ##
+## On Mac, bring the current Wish process window to front
+
+if {[tk windowingsystem] eq aqua} {
+   catch {
+   exec /usr/bin/osascript -e [format {
+   tell application System Events
+   set frontmost of processes whose unix id is %d 
to true
+   end tell
+   } [pid] ]
+   }
+}
+
+
+##
+##
 ## Tcl/Tk sanity check
 
 if {[catch {package require Tcl 8.4} err]
-- 
1.8.3.14.g33f718c

--
To unsubscribe from this list: send the line unsubscribe git in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html