Fix title handling. Hide old browser and chat.

master
Marco Pesenti Gritti 18 years ago
parent f1778669ba
commit c7fdae2606

@ -3,4 +3,4 @@ name = Web
id = com.redhat.Sugar.BrowserActivity
icon = activity-web
python_module = browser.BrowserActivity.BrowserActivity
show_launcher = yes
show_launcher = no

@ -3,4 +3,4 @@ name = GroupChat
icon = activity-groupchat
id = com.redhat.Sugar.GroupChatActivity
python_module = groupchat.GroupChatActivity.GroupChatActivity
show_launcher = yes
show_launcher = no

@ -1,4 +1,5 @@
import gtk
from gettext import gettext as _
from sugar.activity.Activity import Activity
from webbrowser import WebBrowser
@ -10,9 +11,12 @@ class WebActivity(Activity):
def __init__(self):
Activity.__init__(self)
self.set_title(_('Web Activity'))
vbox = gtk.VBox()
self._browser = WebBrowser()
self._browser.connect('notify::title', self._title_changed_cb)
toolbar = Toolbar(self._browser)
vbox.pack_start(toolbar, False)
@ -25,3 +29,6 @@ class WebActivity(Activity):
vbox.show()
self._browser.load_url(_HOMEPAGE)
def _title_changed_cb(self, embed, pspec):
self.set_title(embed.props.title)

@ -104,7 +104,8 @@ class _ActivityRegistry:
self._activities.append(module)
if cp.has_option('Activity', 'show_launcher'):
module.set_show_launcher(True)
if cp.get('Activity', 'show_launcher') == 'yes':
module.set_show_launcher(True)
if cp.has_option('Activity', 'icon'):
module.set_icon(cp.get('Activity', 'icon'))

Loading…
Cancel
Save