# HG changeset patch # User Dan Drogichen # Date 1401998540 25200 # Thu Jun 05 13:02:20 2014 -0700 # Node ID 211b69347d68d69086554fa72b580bf724614082 # Parent 796b6bf2476a0f0f0e8dc208f11df2298d09e67b [developer] Control fontsize of hex diff/dump display - #1681 Add user specification of the font size to use for the hex diff/dump display, without affecting any other Chirp displays. This is done with a new chirp.config integer property diff_fontsize in a new [developer] section. The default is unchanged at 11. #1681 diff -r 796b6bf2476a -r 211b69347d68 chirpui/common.py --- a/chirpui/common.py Thu May 22 18:44:42 2014 -0400 +++ b/chirpui/common.py Thu Jun 05 13:02:20 2014 -0700 @@ -23,7 +23,9 @@ import traceback from chirp import errors -from chirpui import reporting +from chirpui import reporting, config + +CONF = config.get() class Editor(gobject.GObject): __gsignals__ = { @@ -391,6 +393,11 @@ tag.set_property("weight", pango.WEIGHT_BOLD) tags.add(tag) + try: + fontsize = CONF.get_int("diff_fontsize", "developer") + except Exception: + fontsize = 11 + lines = result.split(os.linesep) for line in lines: if line.startswith("-"): @@ -401,7 +408,7 @@ tags = () b.insert_with_tags_by_name(b.get_end_iter(), line + os.linesep, *tags) v = gtk.TextView(b) - fontdesc = pango.FontDescription("Courier 11") + fontdesc = pango.FontDescription("Courier %i" % fontsize) v.modify_font(fontdesc) v.set_editable(False) v.show()