Permalink
Browse files

Merge branch 'window-title'

Conflicts:
	gitk
  • Loading branch information...
2 parents b43b9ef + 554977d commit c8d4a0a0fa24f5d4203a5ce92c16c61d78788979 @keszybz committed Feb 20, 2012
Showing with 12 additions and 1 deletion.
  1. +12 −1 gitk
View
13 gitk
@@ -34,6 +34,15 @@ proc gitworktree {} {
return $_gitworktree
}
+proc reponame {} {
+ global gitdir
+ set n [file normalize $gitdir]
+ if {[string match "*/.git" $n]} {
+ set n [string range $n 0 end-5]
+ }
+ return [file tail $n]
+}
+
# A simple scheduler for compute-intensive stuff.
# The aim is to make sure that event handlers for GUI actions can
# run at least every 50-100 ms. Unfortunately fileevent handlers are
@@ -11700,6 +11709,8 @@ if {[package vcompare $git_version "1.6.6.2"] >= 0} {
set show_notes "--show-notes"
}
+set appname "gitk"
+
set runq {}
set history {}
set historyindex 0
@@ -11769,7 +11780,7 @@ catch {
}
# wait for the window to become visible
tkwait visibility .
-wm title . "[file tail $argv0]: [file tail [pwd]]"
+wm title . "$appname: [reponame]"
update
readrefs

0 comments on commit c8d4a0a

Please sign in to comment.