@matheusbsbs / matheus-bagliano / commits / e01b42211c
Fork 0

git-gui: Minor options dialog UI cleanups.

Display the name of "this" repository rather than the quite ambiguous string "This". The idea is that seeing the name of the directory the repository is stored in should help jog the user's memory about what they are setting options for. Also place the options dialog immediately over the git-gui main window when it gets opened. This way the user isn't scrolling very far away to gain access to the window. At least on my Mac OS X system not doing this makes the options dialog open rather far away, thus requiring lots of mouse activity to reach it. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>

Shawn O. Pearce committed Nov 12, 2006 at 06:46 UTC e01b42211cad31b1262d152b7e2561cb8bf218ed
1 file changed +6 -4
git-gui
+6 -4
@@ -1718,9 +1718,13 @@ proc do_options {} {
1718 foreach name [array names global_config] {
1719 set global_config_new($name) $global_config($name)
1720 }
1721 + set reponame [lindex [file split \
1722 + [file normalize [file dirname $gitdir]]] \
1723 + end]
1724
1725 set w .options_editor
1726 toplevel $w
1727 + wm geometry $w "+[winfo rootx .]+[winfo rooty .]"
1728
1729 label $w.header -text "$appname Options" \
1730 -font font_uibold
@@ -1741,7 +1745,7 @@ proc do_options {} {
1745 pack $w.buttons.cancel -side right
1746 pack $w.buttons -side bottom -fill x -pady 10 -padx 10
1747
1744 - labelframe $w.repo -text {This Repository} \
1748 + labelframe $w.repo -text "$reponame Repository" \
1749 -font font_ui \
1750 -relief raised -borderwidth 2
1751 labelframe $w.global -text {Global (All Repositories)} \
@@ -1794,9 +1798,7 @@ proc do_options {} {
1798
1799 bind $w <Visibility> "grab $w; focus $w"
1800 bind $w <Key-Escape> "destroy $w"
1797 - wm title $w "$appname ([lindex [file split \
1798 - [file normalize [file dirname $gitdir]]] \
1799 - end]): Options"
1801 + wm title $w "$appname ($reponame): Options"
1802 tkwait window $w
1803 }
1804