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
+1 -1
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
+1 -1
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
+7
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)