sugar-toolkit-gtk3/examples/gmail/gmail.py

23 lines
490 B
Python
Raw Normal View History

2006-05-24 02:03:35 +02:00
import os
import geckoembed
2006-06-21 22:54:13 +02:00
from sugar.activity.Activity import Activity
2006-05-24 02:03:35 +02:00
import sugar.env
_GMAIL_ACTIVITY_TYPE = "_gmail_google._tcp"
2006-06-21 22:54:13 +02:00
class GMailActivity(Activity):
2006-07-12 22:45:13 +02:00
def __init__(self, args):
2006-06-21 22:54:13 +02:00
Activity.__init__(self, _GMAIL_ACTIVITY_TYPE)
2006-07-12 22:45:13 +02:00
2006-05-24 02:03:35 +02:00
profile_path = os.path.join(sugar.env.get_user_dir(), 'gmail')
geckoembed.set_profile_path(profile_path)
2006-07-12 22:45:13 +02:00
self.set_title("Mail")
embed = geckoembed.Embed()
2006-07-12 22:45:13 +02:00
self.add(embed)
embed.show()
embed.load_address("http://www.gmail.com")