Merge lp://qastaging/~themolok/acire/acire_gconf into lp://qastaging/acire

Proposed by Alessio Bolognino
Status: Merged
Merge reported by: Jono Bacon
Merged at revision: not available
Proposed branch: lp://qastaging/~themolok/acire/acire_gconf
Merge into: lp://qastaging/acire
Diff against target: 29 lines (+11/-2)
1 file modified
bin/acire (+11/-2)
To merge this branch: bzr merge lp://qastaging/~themolok/acire/acire_gconf
Reviewer Review Type Date Requested Status
Jono Bacon Disapprove
Review via email: mp+17208@code.qastaging.launchpad.net
To post a comment you must log in.
Revision history for this message
Alessio Bolognino (themolok) wrote :

I'm new to PyGTK, I love acire and I wanted it to use system's default monospace font. This branch needs the gconf module, I hope that's OK.

Revision history for this message
Jono Bacon (jonobacon) wrote :

Merged in manually due to some other changes - so setting to Dispprove even though I merged it. :-)

Thanks Alessio!

review: Disapprove

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'bin/acire'
2--- bin/acire 2010-01-11 02:48:02 +0000
3+++ bin/acire 2010-01-12 08:35:21 +0000
4@@ -24,6 +24,7 @@
5 import gtksourceview
6 import gnome.vfs
7 import pango
8+import gconf
9
10 # Check if we are working in the source tree or from the installed
11 # package and mangle the python path accordingly
12@@ -89,8 +90,16 @@
13 self.editor_buffer.set_data('languages-manager', self.editor_lm)
14 self.editor_view = gtksourceview.SourceView(self.editor_buffer)
15 self.editor_view.set_show_line_numbers(True)
16-
17- font_desc = pango.FontDescription('monospace 10')
18+
19+ # read system's monospace font, fallback to 'monospace 10'
20+
21+ self.gconf = gconf.client_get_default()
22+ gconf_mono_font = self.gconf.get_string(\
23+ "/desktop/gnome/interface/monospace_font_name")
24+ if gconf_mono_font:
25+ font_desc = pango.FontDescription(gconf_mono_font)
26+ else:
27+ font_desc = pango.FontDescription('monospace 10')
28 if font_desc:
29 self.editor_view.modify_font(font_desc)
30

Subscribers

People subscribed via source and target branches