summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 9cb268c)
raw | patch | inline | side by side (parent: 9cb268c)
author | Pat Thoyts <patthoyts@users.sourceforge.net> | |
Mon, 2 Aug 2010 12:42:45 +0000 (13:42 +0100) | ||
committer | Pat Thoyts <patthoyts@users.sourceforge.net> | |
Mon, 2 Aug 2010 12:42:45 +0000 (13:42 +0100) |
The themed panedwindow needs to have the sash position set after the
widget has been mapped therefore apply this setting in the Map event
binding. To avoid visible redraws as the application is constructed
the main window should be withdrawn until all the widgets have been added
Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
widget has been mapped therefore apply this setting in the Map event
binding. To avoid visible redraws as the application is constructed
the main window should be withdrawn until all the widgets have been added
Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
git-gui.sh | patch | blob | history |
diff --git a/git-gui.sh b/git-gui.sh
index c3f6736132625427f248aa9c8624952a1d089b13..bb104895a94450a2ade7446c8fda52910bae0868 100755 (executable)
--- a/git-gui.sh
+++ b/git-gui.sh
puts stderr $d
}
+#'" fix poor old emacs font-lock mode
+
proc _git_cmd {name} {
global _git_cmd_path
return $text
}
+wm withdraw .
set root_exists 0
bind . <Visibility> {
bind . <Visibility> {}
set current_branch $head
}
+ wm deiconify .
switch -- $subcommand {
browser {
if {$jump_spec ne {}} usage
# -- Load geometry
#
-catch {
-set gm $repo_config(gui.geometry)
-wm geometry . [lindex $gm 0]
-if {$use_ttk} {
- .vpane sashpos 0 [lindex $gm 1]
- .vpane.files sashpos 0 [lindex $gm 2]
-} else {
- .vpane sash place 0 \
- [lindex $gm 1] \
- [lindex [.vpane sash coord 0] 1]
- .vpane.files sash place 0 \
- [lindex [.vpane.files sash coord 0] 0] \
- [lindex $gm 2]
+proc on_ttk_pane_mapped {w pane pos} {
+ bind $w <Map> {}
+ after 0 [list after idle [list $w sashpos $pane $pos]]
+}
+proc on_tk_pane_mapped {w pane x y} {
+ bind $w <Map> {}
+ after 0 [list after idle [list $w sash place $pane $x $y]]
+}
+proc on_application_mapped {} {
+ global repo_config use_ttk
+ bind . <Map> {}
+ set gm $repo_config(gui.geometry)
+ if {$use_ttk} {
+ bind .vpane <Map> \
+ [list on_ttk_pane_mapped %W 0 [lindex $gm 1]]
+ bind .vpane.files <Map> \
+ [list on_ttk_pane_mapped %W 0 [lindex $gm 2]]
+ } else {
+ bind .vpane <Map> \
+ [list on_tk_pane_mapped %W 0 \
+ [lindex $gm 1] \
+ [lindex [.vpane sash coord 0] 1]]
+ bind .vpane.files <Map> \
+ [list on_tk_pane_mapped %W 0 \
+ [lindex [.vpane.files sash coord 0] 0] \
+ [lindex $gm 2]]
+ }
+ wm geometry . [lindex $gm 0]
}
-unset gm
+if {[info exists repo_config(gui.geometry)]} {
+ bind . <Map> [list on_application_mapped]
+ wm geometry . [lindex $repo_config(gui.geometry) 0]
}
# -- Load window state
#
-catch {
-set gws $repo_config(gui.wmstate)
-wm state . $gws
-unset gws
+if {[info exists repo_config(gui.wmstate)]} {
+ catch {wm state . $repo_config(gui.wmstate)}
}
# -- Key Bindings