Fix title handling. Hide old browser and chat.
This commit is contained in:
parent
f1778669ba
commit
c7fdae2606
@ -3,4 +3,4 @@ name = Web
|
|||||||
id = com.redhat.Sugar.BrowserActivity
|
id = com.redhat.Sugar.BrowserActivity
|
||||||
icon = activity-web
|
icon = activity-web
|
||||||
python_module = browser.BrowserActivity.BrowserActivity
|
python_module = browser.BrowserActivity.BrowserActivity
|
||||||
show_launcher = yes
|
show_launcher = no
|
||||||
|
@ -3,4 +3,4 @@ name = GroupChat
|
|||||||
icon = activity-groupchat
|
icon = activity-groupchat
|
||||||
id = com.redhat.Sugar.GroupChatActivity
|
id = com.redhat.Sugar.GroupChatActivity
|
||||||
python_module = groupchat.GroupChatActivity.GroupChatActivity
|
python_module = groupchat.GroupChatActivity.GroupChatActivity
|
||||||
show_launcher = yes
|
show_launcher = no
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
import gtk
|
import gtk
|
||||||
|
from gettext import gettext as _
|
||||||
|
|
||||||
from sugar.activity.Activity import Activity
|
from sugar.activity.Activity import Activity
|
||||||
from webbrowser import WebBrowser
|
from webbrowser import WebBrowser
|
||||||
@ -10,9 +11,12 @@ class WebActivity(Activity):
|
|||||||
def __init__(self):
|
def __init__(self):
|
||||||
Activity.__init__(self)
|
Activity.__init__(self)
|
||||||
|
|
||||||
|
self.set_title(_('Web Activity'))
|
||||||
|
|
||||||
vbox = gtk.VBox()
|
vbox = gtk.VBox()
|
||||||
|
|
||||||
self._browser = WebBrowser()
|
self._browser = WebBrowser()
|
||||||
|
self._browser.connect('notify::title', self._title_changed_cb)
|
||||||
|
|
||||||
toolbar = Toolbar(self._browser)
|
toolbar = Toolbar(self._browser)
|
||||||
vbox.pack_start(toolbar, False)
|
vbox.pack_start(toolbar, False)
|
||||||
@ -25,3 +29,6 @@ class WebActivity(Activity):
|
|||||||
vbox.show()
|
vbox.show()
|
||||||
|
|
||||||
self._browser.load_url(_HOMEPAGE)
|
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)
|
self._activities.append(module)
|
||||||
|
|
||||||
if cp.has_option('Activity', 'show_launcher'):
|
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'):
|
if cp.has_option('Activity', 'icon'):
|
||||||
module.set_icon(cp.get('Activity', 'icon'))
|
module.set_icon(cp.get('Activity', 'icon'))
|
||||||
|
Loading…
Reference in New Issue
Block a user