Fix title handling. Hide old browser and chat.

This commit is contained in:
Marco Pesenti Gritti 2006-10-13 11:17:35 +02:00
parent f1778669ba
commit c7fdae2606
4 changed files with 11 additions and 3 deletions

View File

@ -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

View File

@ -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

View File

@ -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)

View File

@ -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'))