Apply activity font settings earlier (#1607)

Fixes some minor changes in toolbar appearance that my previous
work unintentionally introduced.
This commit is contained in:
Daniel Drake 2009-12-24 14:41:52 +00:00
parent ec7464bdcd
commit 709d44d602
2 changed files with 7 additions and 3 deletions

View File

@ -280,9 +280,6 @@ class Activity(Window, gtk.Container):
self._jobject = None self._jobject = None
self._read_file_called = False self._read_file_called = False
settings = gtk.settings_get_default()
settings.set_property("gtk-font-name", "%s %f" % (style.FONT_FACE, style.FONT_SIZE))
self._session = _get_session() self._session = _get_session()
self._session.register(self) self._session.register(self)
self._session.connect('quit-requested', self._session.connect('quit-requested',

View File

@ -28,6 +28,7 @@ import dbus.glib
import sugar import sugar
from sugar.activity import activityhandle from sugar.activity import activityhandle
from sugar.bundle.activitybundle import ActivityBundle from sugar.bundle.activitybundle import ActivityBundle
from sugar.graphics import style
from sugar import logger from sugar import logger
@ -96,6 +97,12 @@ def main():
gtk.icon_theme_get_default().append_search_path(bundle.get_icons_path()) gtk.icon_theme_get_default().append_search_path(bundle.get_icons_path())
# This code can be removed when we grow an xsettings daemon (the GTK+
# init routines will then automatically figure out the font settings)
settings = gtk.settings_get_default()
settings.set_property('gtk-font-name',
'%s %f' % (style.FONT_FACE, style.FONT_SIZE))
locale_path = None locale_path = None
if 'SUGAR_LOCALEDIR' in os.environ: if 'SUGAR_LOCALEDIR' in os.environ:
locale_path = os.environ['SUGAR_LOCALEDIR'] locale_path = os.environ['SUGAR_LOCALEDIR']