diff options
author | Pootle Translation <pootle@dev.laptop.org> | 2008-01-27 00:06:08 (GMT) |
---|---|---|
committer | Pootle Translation <pootle@dev.laptop.org> | 2008-01-27 00:06:08 (GMT) |
commit | f69461eaf0015395af6812f73e5133d9a2054d67 (patch) | |
tree | 96e14e9ac718c64b6c12808dfff3e0895f67f893 | |
parent | 00c0e9db468557e1468a0aaba9f702e20c8e1bd7 (diff) | |
parent | 82d97bf8c0d80f65824673f46990a7e54c713447 (diff) |
Merge branch 'update-1' of git+ssh://dev.laptop.org/git/journal-activity into update-1
-rw-r--r-- | NEWS | 7 | ||||
-rwxr-xr-x | activity/activity.info | 2 | ||||
-rw-r--r-- | journaltoolbox.py | 14 | ||||
-rw-r--r-- | misc.py | 9 | ||||
-rw-r--r-- | po/de.po | 3 | ||||
-rw-r--r-- | volumesmanager.py | 18 |
6 files changed, 41 insertions, 12 deletions
@@ -1,3 +1,10 @@ +85 + +84 + +* #6190 Don't crash when an activity has its icon missing. (tomeu) +* #6029 Don't fail when the mount point is already occupied. (tomeu) + 83 * #5863 Correctly invalidate icon cache. (tomeu) diff --git a/activity/activity.info b/activity/activity.info index d83afd1..6ac17db 100755 --- a/activity/activity.info +++ b/activity/activity.info @@ -1,6 +1,6 @@ [Activity] name = Journal -activity_version = 83 +activity_version = 85 service_name = org.laptop.JournalActivity icon = activity-journal class = journalactivity.JournalActivity diff --git a/journaltoolbox.py b/journaltoolbox.py index 652cd08..630d245 100644 --- a/journaltoolbox.py +++ b/journaltoolbox.py @@ -18,6 +18,7 @@ from gettext import gettext as _ import logging import time from datetime import datetime, timedelta +import os import gobject import gtk @@ -260,9 +261,16 @@ class SearchToolbar(gtk.Toolbar): if not appended_separator: self._what_search_combo.append_separator() appended_separator = True - self._what_search_combo.append_item(service_name, - activity_info.name, - file_name=activity_info.icon) + + if os.path.exists(activity_info.icon): + self._what_search_combo.append_item(service_name, + activity_info.name, + file_name=activity_info.icon) + else: + self._what_search_combo.append_item(service_name, + activity_info.name, + icon_name='application-octet-stream') + if service_name == current_value: current_value_index = len(self._what_search_combo.get_model()) - 1 @@ -20,6 +20,7 @@ import logging import time import traceback import sys +import os import gtk @@ -61,9 +62,9 @@ def get_icon_name(jobject): except: logging.warning('Could not read bundle:\n' + \ ''.join(traceback.format_exception(*sys.exc_info()))) - return _get_icon_file_name('application-octet-stream') + file_name = _get_icon_file_name('application-octet-stream') - if jobject.metadata['activity']: + if not file_name and jobject.metadata['activity']: service_name = jobject.metadata['activity'] activity_info = activity.get_registry().get_activity(service_name) if activity_info: @@ -75,8 +76,8 @@ def get_icon_name(jobject): if icon_name: file_name = _get_icon_file_name(icon_name) - if not file_name: - return _get_icon_file_name('application-octet-stream') + if not file_name or not os.path.exists(file_name): + file_name = _get_icon_file_name('application-octet-stream') _icon_cache[cache_key] = file_name @@ -27,9 +27,6 @@ msgstr "Ohne Titel" msgid " Activity " msgstr " Aktivität " -msgid "" -msgstr " Aktivität " - #: expandedentry.py:214 msgid "No preview" msgstr "Keine Vorschau" diff --git a/volumesmanager.py b/volumesmanager.py index 91efc81..6147681 100644 --- a/volumesmanager.py +++ b/volumesmanager.py @@ -156,7 +156,23 @@ class VolumesManager(gobject.GObject): mount_point = device.GetProperty('volume.uuid') volume = dbus.Interface(device_object, HAL_VOLUME_IFACE) - volume.Mount(mount_point, fs_type, options) + + # Try 100 times to get a mount point + mounted = False + i = 0 + while not mounted: + try: + if i > 0: + volume.Mount('%s_%d' % (mount_point, i), fs_type, options) + else: + volume.Mount(mount_point, fs_type, options) + mounted = True + except dbus.DBusException, e: + if i < 100 and e.get_dbus_name() == \ + 'org.freedesktop.Hal.Device.Volume.MountPointNotAvailable': + i += 1 + else: + raise def _hal_device_property_modified_cb(self, udi, count, changes): if 'volume.is_mounted' in [change[0] for change in changes]: |