Do not look in the icon theme for activity icons
This commit is contained in:
parent
8f50955479
commit
6527077928
@ -34,6 +34,14 @@ ACTIVITY_SERVICE_NAME = "org.laptop.Activity"
|
||||
ACTIVITY_SERVICE_PATH = "/org/laptop/Activity"
|
||||
ACTIVITY_INTERFACE = "org.laptop.Activity"
|
||||
|
||||
from sugar.graphics.grid import Grid
|
||||
|
||||
settings = gtk.settings_get_default()
|
||||
|
||||
grid = Grid()
|
||||
sizes = 'gtk-large-toolbar=%d, %d' % (grid.dimension(1), grid.dimension(1))
|
||||
settings.set_string_property('gtk-icon-sizes', sizes, '')
|
||||
|
||||
def get_service_name(xid):
|
||||
return ACTIVITY_SERVICE_NAME + '%d' % xid
|
||||
|
||||
|
@ -1,9 +0,0 @@
|
||||
import gtk
|
||||
|
||||
from sugar.graphics.grid import Grid
|
||||
|
||||
settings = gtk.settings_get_default()
|
||||
|
||||
grid = Grid()
|
||||
sizes = 'gtk-large-toolbar=%d, %d' % (grid.dimension(1), grid.dimension(1))
|
||||
settings.set_string_property('gtk-icon-sizes', sizes, '')
|
@ -3,8 +3,6 @@ import os
|
||||
|
||||
from ConfigParser import ConfigParser
|
||||
|
||||
import gtk
|
||||
|
||||
class Bundle:
|
||||
"""Info about an activity bundle. Wraps the activity.info file."""
|
||||
def __init__(self, path):
|
||||
@ -52,11 +50,8 @@ class Bundle:
|
||||
|
||||
if cp.has_option(section, 'icon'):
|
||||
icon = cp.get(section, 'icon')
|
||||
if gtk.icon_theme_get_default().has_icon(icon):
|
||||
self._icon = 'theme:' + icon
|
||||
else:
|
||||
activity_path = os.path.join(self._path, 'activity')
|
||||
self._icon = os.path.join(activity_path, icon + ".svg")
|
||||
activity_path = os.path.join(self._path, 'activity')
|
||||
self._icon = os.path.join(activity_path, icon + ".svg")
|
||||
|
||||
if cp.has_option(section, 'activity_version'):
|
||||
self._activity_version = int(cp.get(section, 'activity_version'))
|
||||
|
Loading…
Reference in New Issue
Block a user