Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimon Schampijer <simon@schampijer.de>2007-10-16 12:11:44 (GMT)
committer Simon Schampijer <simon@schampijer.de>2007-10-16 12:11:44 (GMT)
commit209831888e9a0e6603bb8c322d3f3ce4d48832ea (patch)
tree7ed129ec0ee8e8b8fa6f1fed3fbc549ca460001f
parentb31888b2e3eb6845b2dead0d7147c4ae0bf09f69 (diff)
Removed hack to set the right service name for sharing
-rw-r--r--NEWS3
-rw-r--r--downloadmanager.py11
-rwxr-xr-xwebactivity.py7
3 files changed, 11 insertions, 10 deletions
diff --git a/NEWS b/NEWS
index 02de197..3c0fd3b 100644
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,6 @@
+* Removed hack to set the right service name for sharing (erikos)
+* Removed the clipboard part from the download manager and added alerts (erikos)
+
64
63
diff --git a/downloadmanager.py b/downloadmanager.py
index d9ccfac..22a88cb 100644
--- a/downloadmanager.py
+++ b/downloadmanager.py
@@ -186,12 +186,17 @@ class Download:
activities_info = activity.get_registry().get_activities_for_type(
self._mime_type)
activities = []
+ bundle_id = None
for activity_info in activities_info:
activities.append(activity_info)
- logging.debug('--> act=%s mime=%s'%(activities, self._mime_type))
bundle_id = activities[0].bundle_id
- logging.debug('--> bundle_id=%s'%bundle_id)
- activityfactory.create_with_object_id(bundle_id, self._object_id)
+ if bundle_id is not None:
+ logging.debug('--> Found activity to open mime=%s bundle_id=%s'
+ %(self._mime_type, bundle_id))
+ activityfactory.create_with_object_id(bundle_id, self._object_id)
+ else:
+ logging.debug('--> Can not open mime=%s'%(self._mime_type))
+
_activity.remove_alert(alert)
def _cleanup_datastore_write(self):
diff --git a/webactivity.py b/webactivity.py
index bca8531..ea84619 100755
--- a/webactivity.py
+++ b/webactivity.py
@@ -29,7 +29,6 @@ from sugar import env
from sugar.graphics import style
import telepathy
import telepathy.client
-from sugar import _sugarext
from sugar.presence import presenceservice
from sugar.graphics.tray import HTray
from sugar import profile
@@ -111,7 +110,6 @@ class WebActivity(activity.Activity):
self.current = _('blank')
self.webtitle = _('blank')
self.connect('key-press-event', self._key_press_cb)
- self.sname = _sugarext.get_prgname()
self.toolbox.set_current_toolbar(_TOOLBAR_BROWSE)
@@ -122,8 +120,6 @@ class WebActivity(activity.Activity):
# opening URIs and default docs.
self._load_homepage()
- _sugarext.set_prgname(self.sname)
-
self.messenger = None
self.connect('shared', self._shared_cb)
@@ -249,7 +245,6 @@ class WebActivity(activity.Activity):
self._browser.load_uri('file://' + _LIBRARY_PATH)
else:
self._browser.load_uri('about:blank')
- _sugarext.set_prgname(self.sname)
def _session_history_changed_cb(self, session_history, link):
_logger.debug('NewPage: %s.' %link)
@@ -259,7 +254,6 @@ class WebActivity(activity.Activity):
if embed.props.title is not '':
_logger.debug('Title changed=%s' % embed.props.title)
self.webtitle = embed.props.title
- _sugarext.set_prgname("org.laptop.WebActivity")
def read_file(self, file_path):
if self.metadata['mime_type'] == 'text/plain':
@@ -281,7 +275,6 @@ class WebActivity(activity.Activity):
self._browser.set_session(self.model.data['history'])
else:
self._browser.load_uri(file_path)
- _sugarext.set_prgname(self.sname)
def write_file(self, file_path):
if not self.metadata['mime_type']: