]> git.ipfire.org Git - thirdparty/git.git/commitdiff
Merge branch 'ah/commit-id-to-clipboard'
authorJohannes Sixt <j6t@kdbg.org>
Tue, 17 Dec 2024 20:54:58 +0000 (21:54 +0100)
committerJohannes Sixt <j6t@kdbg.org>
Tue, 17 Dec 2024 20:54:58 +0000 (21:54 +0100)
* 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 <j6t@kdbg.org>
1  2 
gitk

diff --cc gitk
index 9012a6951a9e4f584e0bb45c2eb57480f9cc9c00,12c0dc401ee5daa346b3dfd163e94f83624f41da..47a7c1d29c430f62581eb3d66307b907c2d5aad3
--- 1/gitk
--- 2/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]
          -variable hideremotes
      grid x $page.hideremotes -sticky w
  
 -    ${NS}::label $page.ddisp -text [mc "Diff display options"]
+     ${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"] -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