diff options
author | Junio C Hamano <gitster@pobox.com> | 2025-07-22 13:30:52 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2025-07-22 13:30:52 -0700 |
commit | 0e8243a355a69035dac269528b49dc8c9bc81f8a (patch) | |
tree | 27c22155636324250e9a60faa56de9a73a2507a1 /git-gui/lib/browser.tcl | |
parent | afea2205b4cfccc93bb8633218130c0f602ac929 (diff) | |
parent | 436dad00c5a717d56bf4feb8a1f5d39126579fe6 (diff) |
Merge branch 'master' of https://github.com/j6t/git-gui
* 'master' of https://github.com/j6t/git-gui: (26 commits)
git-gui: eliminate _search_exe
git-gui: remove procs gitexec and _git_cmd
git-gui: use dashless 'git cmd' form for read/write
git-gui: default to full copy for linked worktrees
git-gui: use git-clone
git-gui: remove non-ttk code
git-gui: remove ${NS} indirection for ttk
git-gui: always use themed widgets from ttk
git-gui: remove redundant check for Tk >= 8.5
git-gui: remove unreachable Tk 8.4 code
git-gui: remove unused git-version
git-gui: use git_init to create new repository dir
git-gui: git-remote is always available
git-gui: git merge understands --strategy=recursive
git-gui: git-diff knows submodules and textconv
git-gui: git-blame understands -w and textconv
git-gui: git rev-parse knows show_toplevel
git-gui: use git-branch --show-current
git-gui: git-diff-index always knows submodules
git-gui: git ls-files knows --exclude-standard
...
Diffstat (limited to 'git-gui/lib/browser.tcl')
-rw-r--r-- | git-gui/lib/browser.tcl | 23 |
1 files changed, 10 insertions, 13 deletions
diff --git a/git-gui/lib/browser.tcl b/git-gui/lib/browser.tcl index 6fc8d4d637..f53eb952cf 100644 --- a/git-gui/lib/browser.tcl +++ b/git-gui/lib/browser.tcl @@ -21,7 +21,7 @@ field browser_busy 1 field ls_buf {}; # Buffered record output from ls-tree constructor new {commit {path {}}} { - global cursor_ptr M1B use_ttk NS + global cursor_ptr M1B make_dialog top w wm withdraw $top wm title $top [mc "%s (%s): File Browser" [appname] [reponame]] @@ -35,15 +35,14 @@ constructor new {commit {path {}}} { set browser_commit $commit set browser_path "$browser_commit:[escape_path $path]" - ${NS}::label $w.path \ + ttk::label $w.path \ -textvariable @browser_path \ -anchor w \ -justify left \ -font font_uibold - if {!$use_ttk} { $w.path configure -borderwidth 1 -relief sunken} pack $w.path -anchor w -side top -fill x - ${NS}::frame $w.list + ttk::frame $w.list set w_list $w.list.l text $w_list -background white -foreground black \ -borderwidth 0 \ @@ -55,18 +54,17 @@ constructor new {commit {path {}}} { -xscrollcommand [list $w.list.sbx set] \ -yscrollcommand [list $w.list.sby set] rmsel_tag $w_list - ${NS}::scrollbar $w.list.sbx -orient h -command [list $w_list xview] - ${NS}::scrollbar $w.list.sby -orient v -command [list $w_list yview] + ttk::scrollbar $w.list.sbx -orient h -command [list $w_list xview] + ttk::scrollbar $w.list.sby -orient v -command [list $w_list yview] pack $w.list.sbx -side bottom -fill x pack $w.list.sby -side right -fill y pack $w_list -side left -fill both -expand 1 pack $w.list -side top -fill both -expand 1 - ${NS}::label $w.status \ + ttk::label $w.status \ -textvariable @browser_status \ -anchor w \ -justify left - if {!$use_ttk} { $w.status configure -borderwidth 1 -relief sunken} pack $w.status -anchor w -side bottom -fill x bind $w_list <Button-1> "[cb _click 0 @%x,%y];break" @@ -269,7 +267,6 @@ field w ; # widget path field w_rev ; # mega-widget to pick the initial revision constructor dialog {} { - global use_ttk NS make_dialog top w wm withdraw $top wm title $top [mc "%s (%s): Browse Branch Files" [appname] [reponame]] @@ -278,18 +275,18 @@ constructor dialog {} { wm transient $top . } - ${NS}::label $w.header \ + ttk::label $w.header \ -text [mc "Browse Branch Files"] \ -font font_uibold \ -anchor center pack $w.header -side top -fill x - ${NS}::frame $w.buttons - ${NS}::button $w.buttons.browse -text [mc Browse] \ + ttk::frame $w.buttons + ttk::button $w.buttons.browse -text [mc Browse] \ -default active \ -command [cb _open] pack $w.buttons.browse -side right - ${NS}::button $w.buttons.cancel -text [mc Cancel] \ + ttk::button $w.buttons.cancel -text [mc Cancel] \ -command [list destroy $w] pack $w.buttons.cancel -side right -padx 5 pack $w.buttons -side bottom -fill x -pady 10 -padx 10 |