Merge branch 'master' of git+ssh://dev.laptop.org/git/sugar

This commit is contained in:
Dan Williams 2007-08-31 14:32:37 -04:00
commit 2751714ca7
3 changed files with 7 additions and 7 deletions

1
NEWS
View File

@ -1,3 +1,4 @@
* Don't allow removing system-installed activities. (tomeu)
* #3063: Make the 'Keep' button in the activity toolbar create a copy of the * #3063: Make the 'Keep' button in the activity toolbar create a copy of the
activity in the journal. Add a copy() method for activities to use. (tomeu) activity in the journal. Add a copy() method for activities to use. (tomeu)
* #3045: Fix issues with the clipboard icons and palettes. (tomeu) * #3045: Fix issues with the clipboard icons and palettes. (tomeu)

View File

@ -54,6 +54,7 @@ class ActivityButton(TrayButton, gobject.GObject):
self.set_palette(palette) self.set_palette(palette)
palette.props.invoker = FrameWidgetInvoker(self) palette.props.invoker = FrameWidgetInvoker(self)
if os.path.dirname(self._activity_info.path) == os.path.expanduser('~/Activities'):
menu_item = gtk.MenuItem(_('Remove')) menu_item = gtk.MenuItem(_('Remove'))
menu_item.connect('activate', self.item_remove_cb) menu_item.connect('activate', self.item_remove_cb)
palette.menu.append(menu_item) palette.menu.append(menu_item)

View File

@ -219,11 +219,9 @@ class Bundle:
file_names = zip_file.namelist() file_names = zip_file.namelist()
root_dir = self._get_bundle_root_dir(file_names) root_dir = self._get_bundle_root_dir(file_names)
icon_path = os.path.join(root_dir, 'activity', self._icon + '.svg') icon_path = os.path.join(root_dir, 'activity', self._icon + '.svg')
print icon_path
print file_names
if icon_path in file_names: if icon_path in file_names:
icon_data = zip_file.read(icon_path) icon_data = zip_file.read(icon_path)
temp_file, temp_file_path = tempfile.mkstemp(self._icon) temp_file, temp_file_path = tempfile.mkstemp(suffix='.svg', prefix=self._icon)
os.write(temp_file, icon_data) os.write(temp_file, icon_data)
os.close(temp_file) os.close(temp_file)
return temp_file_path return temp_file_path