Merge lp://qastaging/~barcc/acire/style2 into lp://qastaging/acire

Proposed by B. Clausius
Status: Merged
Merged at revision: not available
Proposed branch: lp://qastaging/~barcc/acire/style2
Merge into: lp://qastaging/acire
Diff against target: 17 lines (+7/-0)
1 file modified
bin/acire (+7/-0)
To merge this branch: bzr merge lp://qastaging/~barcc/acire/style2
Reviewer Review Type Date Requested Status
Jono Bacon Pending
Review via email: mp+20275@code.qastaging.launchpad.net
To post a comment you must log in.
Revision history for this message
B. Clausius (barcc) wrote :

This branch makes the GTKSourceView looks like in Gedit. This is good for users who use different themes and styles.

GTKSourceView supports different style schemes to color the text. Acire should support this too and a simple way is to look which scheme gedit uses. In GConf-key "/apps/gedit-2/preferences/editor/colors/scheme" Gedit stores the id of a GtkSourceView Style Scheme used to color the text. This branch uses this id to select a color style scheme at initializing acire.

Another solution would be to add a menu "View->Color Style Schemes->..." and a gconf key to let acire select and store its own choice.

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-02-26 22:13:44 +0000
3+++ bin/acire 2010-02-27 17:18:21 +0000
4@@ -118,6 +118,13 @@
5 self.editor_view.modify_font(font_desc)
6
7 self.editor_scroll.add(self.editor_view)
8+
9+ # apply gtksourceview2 colors used by gedit
10+ style_scheme_name = self.gconf.get_string('/apps/gedit-2/preferences/editor/colors/scheme')
11+ if style_scheme_name is not None:
12+ style_scheme = gtksourceview2.StyleSchemeManager().get_scheme(style_scheme_name)
13+ if style_scheme:
14+ self.editor_buffer.set_style_scheme(style_scheme)
15
16 # set up terminal
17 self.terminal = vte.Terminal()

Subscribers

People subscribed via source and target branches