forked from git/git
-
Notifications
You must be signed in to change notification settings - Fork 157
gitk: text wrapping in ctext (commit headers, subject, and body) #1835
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Closed
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2089,7 +2089,7 @@ proc makewindow {} { | |
global diffcontextstring diffcontext | ||
global ignorespace | ||
global maincursor textcursor curtextcursor | ||
global rowctxmenu fakerowmenu mergemax wrapcomment | ||
global rowctxmenu fakerowmenu mergemax wrapcomment wrapdefault | ||
global highlight_files gdttype | ||
global searchstring sstring | ||
global bgcolor fgcolor bglist fglist diffcolors diffbgcolors selectbgcolor | ||
|
@@ -2431,7 +2431,7 @@ proc makewindow {} { | |
set ctext .bleft.bottom.ctext | ||
text $ctext -background $bgcolor -foreground $fgcolor \ | ||
-state disabled -undo 0 -font textfont \ | ||
-yscrollcommand scrolltext -wrap none \ | ||
-yscrollcommand scrolltext -wrap $wrapdefault \ | ||
-xscrollcommand ".bleft.bottom.sbhorizontal set" | ||
if {$have_tk85} { | ||
$ctext conf -tabstyle wordprocessor | ||
|
@@ -11576,12 +11576,12 @@ proc create_prefs_page {w} { | |
|
||
proc prefspage_general {notebook} { | ||
global NS maxwidth maxgraphpct showneartags showlocalchanges | ||
global tabstop limitdiffs autoselect autosellen extdifftool perfile_attrs | ||
global tabstop wrapcomment wrapdefault limitdiffs autoselect autosellen extdifftool perfile_attrs | ||
global hideremotes want_ttk have_ttk maxrefs web_browser | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. On the Git mailing list, Johannes Sixt wrote (reply to this): Am 09.12.24 um 19:08 schrieb Christoph Sommer via GitGitGadget:
> From: Christoph Sommer <[email protected]>
>
> Make preference groups like "Diff display options" stand out more.
This is a nice and obvious improvement.
-- Hannes
|
||
set page [create_prefs_page $notebook.general] | ||
|
||
${NS}::label $page.ldisp -text [mc "Commit list display options"] | ||
${NS}::label $page.ldisp -text [mc "Commit list display options"] -font mainfontbold | ||
grid $page.ldisp - -sticky w -pady 10 | ||
${NS}::label $page.spacer -text " " | ||
${NS}::label $page.maxwidthl -text [mc "Maximum graph width (lines)"] | ||
|
@@ -11602,11 +11602,22 @@ proc prefspage_general {notebook} { | |
-variable hideremotes | ||
grid x $page.hideremotes -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 | ||
grid x $page.tabstopl $page.tabstop -sticky w | ||
|
||
${NS}::label $page.wrapcommentl -text [mc "Wrap comment text"] | ||
${NS}::combobox $page.wrapcomment -values {none char word} -state readonly \ | ||
-textvariable wrapcomment | ||
grid x $page.wrapcommentl $page.wrapcomment -sticky w | ||
|
||
${NS}::label $page.wrapdefaultl -text [mc "Wrap other text"] | ||
${NS}::combobox $page.wrapdefault -values {none char word} -state readonly \ | ||
-textvariable wrapdefault | ||
grid x $page.wrapdefaultl $page.wrapdefault -sticky w | ||
|
||
${NS}::checkbutton $page.ntag -text [mc "Display nearby tags/heads"] \ | ||
-variable showneartags | ||
grid x $page.ntag -sticky w | ||
|
@@ -11635,7 +11646,7 @@ proc prefspage_general {notebook} { | |
pack configure $page.webbrowserf.l -padx 10 | ||
grid x $page.webbrowserf $page.webbrowser -sticky ew | ||
|
||
${NS}::label $page.lgen -text [mc "General options"] | ||
${NS}::label $page.lgen -text [mc "General options"] -font mainfontbold | ||
grid $page.lgen - -sticky w -pady 10 | ||
${NS}::checkbutton $page.want_ttk -variable want_ttk \ | ||
-text [mc "Use themed widgets"] | ||
|
@@ -11654,7 +11665,7 @@ proc prefspage_colors {notebook} { | |
|
||
set page [create_prefs_page $notebook.colors] | ||
|
||
${NS}::label $page.cdisp -text [mc "Colors: press to choose"] | ||
${NS}::label $page.cdisp -text [mc "Colors: press to choose"] -font mainfontbold | ||
grid $page.cdisp - -sticky w -pady 10 | ||
label $page.ui -padx 40 -relief sunk -background $uicolor | ||
${NS}::button $page.uibut -text [mc "Interface"] \ | ||
|
@@ -11712,7 +11723,7 @@ proc prefspage_colors {notebook} { | |
proc prefspage_fonts {notebook} { | ||
global NS | ||
set page [create_prefs_page $notebook.fonts] | ||
${NS}::label $page.cfont -text [mc "Fonts: press to choose"] | ||
${NS}::label $page.cfont -text [mc "Fonts: press to choose"] -font mainfontbold | ||
grid $page.cfont - -sticky w -pady 10 | ||
mkfontdisp mainfont $page [mc "Main font"] | ||
mkfontdisp textfont $page [mc "Diff display font"] | ||
|
@@ -11725,7 +11736,7 @@ proc doprefs {} { | |
global oldprefs prefstop showneartags showlocalchanges | ||
global uicolor bgcolor fgcolor ctext diffcolors selectbgcolor markbgcolor | ||
global tabstop limitdiffs autoselect autosellen extdifftool perfile_attrs | ||
global hideremotes want_ttk have_ttk | ||
global hideremotes want_ttk have_ttk wrapcomment wrapdefault | ||
|
||
set top .gitkprefs | ||
set prefstop $top | ||
|
@@ -11734,7 +11745,7 @@ proc doprefs {} { | |
return | ||
} | ||
foreach v {maxwidth maxgraphpct showneartags showlocalchanges \ | ||
limitdiffs tabstop perfile_attrs hideremotes want_ttk} { | ||
limitdiffs tabstop perfile_attrs hideremotes want_ttk wrapcomment wrapdefault} { | ||
set oldprefs($v) [set $v] | ||
} | ||
ttk_toplevel $top | ||
|
@@ -11860,7 +11871,7 @@ proc prefscan {} { | |
global oldprefs prefstop | ||
|
||
foreach v {maxwidth maxgraphpct showneartags showlocalchanges \ | ||
limitdiffs tabstop perfile_attrs hideremotes want_ttk} { | ||
limitdiffs tabstop perfile_attrs hideremotes want_ttk wrapcomment wrapdefault} { | ||
global $v | ||
set $v $oldprefs($v) | ||
} | ||
|
@@ -11874,7 +11885,8 @@ proc prefsok {} { | |
global oldprefs prefstop showneartags showlocalchanges | ||
global fontpref mainfont textfont uifont | ||
global limitdiffs treediffs perfile_attrs | ||
global hideremotes | ||
global hideremotes wrapcomment wrapdefault | ||
global ctext | ||
|
||
catch {destroy $prefstop} | ||
unset prefstop | ||
|
@@ -11923,6 +11935,12 @@ proc prefsok {} { | |
if {$hideremotes != $oldprefs(hideremotes)} { | ||
rereadrefs | ||
} | ||
if {$wrapcomment != $oldprefs(wrapcomment)} { | ||
$ctext tag conf comment -wrap $wrapcomment | ||
} | ||
if {$wrapdefault != $oldprefs(wrapdefault)} { | ||
$ctext configure -wrap $wrapdefault | ||
} | ||
} | ||
|
||
proc formatdate {d} { | ||
|
@@ -12392,6 +12410,7 @@ set downarrowlen 5 | |
set mingaplen 100 | ||
set cmitmode "patch" | ||
set wrapcomment "none" | ||
set wrapdefault "none" | ||
set showneartags 1 | ||
set hideremotes 0 | ||
set maxrefs 20 | ||
|
@@ -12497,7 +12516,7 @@ config_check_tmp_exists 50 | |
|
||
set config_variables { | ||
mainfont textfont uifont tabstop findmergefiles maxgraphpct maxwidth | ||
cmitmode wrapcomment autoselect autosellen showneartags maxrefs visiblerefs | ||
cmitmode wrapcomment wrapdefault autoselect autosellen showneartags maxrefs visiblerefs | ||
hideremotes showlocalchanges datetimeformat limitdiffs uicolor want_ttk | ||
bgcolor fgcolor uifgcolor uifgdisabledcolor colors diffcolors mergecolors | ||
markbgcolor diffcontext selectbgcolor foundbgcolor currentsearchhitbgcolor | ||
|
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On the Git mailing list, Johannes Sixt wrote (reply to this):