diff --git a/sugar/__init__.py b/sugar/__init__.py index e69de29b..5ecc9df1 100644 --- a/sugar/__init__.py +++ b/sugar/__init__.py @@ -0,0 +1,11 @@ +import pygtk +pygtk.require('2.0') +import gtk + +settings = gtk.settings_get_default() + +if settings.get_property('gtk-theme-name') != 'olpc': + settings.set_string_property('gtk-theme-name', 'olpc', '') + +if settings.get_property('gtk-icon-theme-name') != 'olpc': + settings.set_string_property('gtk-icon-theme-name', 'olpc', '') diff --git a/sugar/browser/AddressItem.py b/sugar/browser/AddressItem.py index 50556bf3..eb6df4f9 100644 --- a/sugar/browser/AddressItem.py +++ b/sugar/browser/AddressItem.py @@ -31,14 +31,14 @@ class AddressEntry(gtk.HBox): def _update_folded_state(self): if self.folded: image = gtk.Image() - image.set_from_file(sugar.env.get_data_file('unfold.png')) + image.set_from_icon_name('expand', gtk.ICON_SIZE_SMALL_TOOLBAR) self.button.set_image(image) image.show() self.entry.hide() else: image = gtk.Image() - image.set_from_file(sugar.env.get_data_file('fold.png')) + image.set_from_icon_name('unexpand', gtk.ICON_SIZE_SMALL_TOOLBAR) self.button.set_image(image) image.show() diff --git a/sugar/browser/NavigationToolbar.py b/sugar/browser/NavigationToolbar.py index e857849e..2063c206 100644 --- a/sugar/browser/NavigationToolbar.py +++ b/sugar/browser/NavigationToolbar.py @@ -12,17 +12,20 @@ class NavigationToolbar(gtk.Toolbar): self.set_style(gtk.TOOLBAR_BOTH_HORIZ) - self.back = gtk.ToolButton(gtk.STOCK_GO_BACK) + self.back = gtk.ToolButton(None, 'Back') + self.back.set_icon_name('back') self.back.connect("clicked", self.__go_back_cb) self.insert(self.back, -1) self.back.show() - self.forward = gtk.ToolButton(gtk.STOCK_GO_FORWARD) + self.forward = gtk.ToolButton(None, 'Forward') + self.forward.set_icon_name('forward') self.forward.connect("clicked", self.__go_forward_cb) self.insert(self.forward, -1) self.forward.show() - self.reload = gtk.ToolButton(gtk.STOCK_REFRESH) + self.reload = gtk.ToolButton(None, 'Reload') + self.reload.set_icon_name('reload') self.reload.connect("clicked", self.__reload_cb) self.insert(self.reload, -1) self.reload.show() diff --git a/sugar/p2p/Stream.py b/sugar/p2p/Stream.py index 3d0914db..375c66ec 100644 --- a/sugar/p2p/Stream.py +++ b/sugar/p2p/Stream.py @@ -83,6 +83,8 @@ class UnicastStream(Stream): except(socket.error): port = port + 1 tries = tries - 1 + if self._reader is None: + print 'Could not start xmlrpc server.' self._service.set_port(port) def _message(self, nick_name, message):