From: Johannes Sixt Date: Tue, 17 Dec 2024 20:54:58 +0000 (+0100) Subject: Merge branch 'ah/commit-id-to-clipboard' X-Git-Tag: v2.48.0-rc1~31^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=661734e6c8c38d2cd2000481ffb22cca6e2b0e5e;p=thirdparty%2Fgit.git Merge branch 'ah/commit-id-to-clipboard' * ah/commit-id-to-clipboard: gitk: offer "Copy commit ID to X11 selection" only on X11 gitk: support auto-copy comit ID to primary clipboard gitk: prefs dialog: refine Auto-select UI gitk: UI text: change "SHA1 ID" to "Commit ID" Signed-off-by: Johannes Sixt --- 661734e6c8c38d2cd2000481ffb22cca6e2b0e5e diff --cc gitk index 9012a6951a,12c0dc401e..47a7c1d29c --- a/gitk +++ b/gitk @@@ -11576,7 -11584,7 +11584,8 @@@ proc create_prefs_page {w} proc prefspage_general {notebook} { global NS maxwidth maxgraphpct showneartags showlocalchanges - global tabstop wrapcomment wrapdefault limitdiffs autoselect autosellen extdifftool perfile_attrs - global tabstop limitdiffs autocopy autoselect autosellen extdifftool perfile_attrs ++ global tabstop wrapcomment wrapdefault limitdiffs ++ global autocopy autoselect autosellen extdifftool perfile_attrs global hideremotes want_ttk have_ttk maxrefs web_browser set page [create_prefs_page $notebook.general] @@@ -11602,7 -11606,19 +11607,19 @@@ -variable hideremotes grid x $page.hideremotes -sticky w + ${NS}::checkbutton $page.autocopy -text [mc "Copy commit ID to clipboard"] \ + -variable autocopy + grid x $page.autocopy -sticky w + if {[haveselectionclipboard]} { + ${NS}::checkbutton $page.autoselect -text [mc "Copy commit ID to X11 selection"] \ + -variable autoselect + grid x $page.autoselect -sticky w + } + spinbox $page.autosellen -from 1 -to 40 -width 4 -textvariable autosellen + ${NS}::label $page.autosellenl -text [mc "Length of commit ID to copy"] + grid x $page.autosellenl $page.autosellen -sticky w + - ${NS}::label $page.ddisp -text [mc "Diff display options"] + ${NS}::label $page.ddisp -text [mc "Diff display options"] -font mainfontbold grid $page.ddisp - -sticky w -pady 10 ${NS}::label $page.tabstopl -text [mc "Tab spacing"] spinbox $page.tabstop -from 1 -to 20 -width 4 -textvariable tabstop @@@ -12516,7 -12514,7 +12534,8 @@@ config_check_tmp_exists 5 set config_variables { mainfont textfont uifont tabstop findmergefiles maxgraphpct maxwidth - cmitmode wrapcomment wrapdefault autoselect autosellen showneartags maxrefs visiblerefs - cmitmode wrapcomment autocopy autoselect autosellen showneartags maxrefs visiblerefs ++ cmitmode wrapcomment wrapdefault autocopy autoselect autosellen ++ showneartags maxrefs visiblerefs hideremotes showlocalchanges datetimeformat limitdiffs uicolor want_ttk bgcolor fgcolor uifgcolor uifgdisabledcolor colors diffcolors mergecolors markbgcolor diffcontext selectbgcolor foundbgcolor currentsearchhitbgcolor