Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSascha Silbe <sascha-pgp@silbe.org>2010-07-16 08:55:51 (GMT)
committer Sascha Silbe <sascha-pgp@silbe.org>2010-07-16 08:55:51 (GMT)
commit4000cf24f2d9af41b031bdf2ccf210ac1af7806a (patch)
treeef1440c4b6fd24bf151fa5315e3f1ce190ca4062
parent867ee73912acf8e9a4078c72aeb0ed12a77dab8b (diff)
parent29aa609b57c64b4e312625d0e41f5dfc2381f01a (diff)
Merge commit 'refs/top-bases/t/bug-1786' into t/bug-1786
-rw-r--r--configure.ac2
-rw-r--r--src/sugar/activity/bundlebuilder.py2
-rw-r--r--src/sugar/activity/widgets.py11
-rw-r--r--src/sugar/bundle/activitybundle.py12
-rw-r--r--src/sugar/bundle/bundle.py5
-rw-r--r--src/sugar/graphics/palette.py3
-rw-r--r--src/sugar/graphics/palettewindow.py4
7 files changed, 21 insertions, 18 deletions
diff --git a/configure.ac b/configure.ac
index b874e49..07210c4 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,4 +1,4 @@
-AC_INIT([sugar-toolkit],[0.88.0],[],[sugar-toolkit])
+AC_INIT([sugar-toolkit],[0.89.1],[],[sugar-toolkit])
AC_PREREQ([2.59])
diff --git a/src/sugar/activity/bundlebuilder.py b/src/sugar/activity/bundlebuilder.py
index 868ca3d..fc8ebc8 100644
--- a/src/sugar/activity/bundlebuilder.py
+++ b/src/sugar/activity/bundlebuilder.py
@@ -82,7 +82,7 @@ class Config(object):
def update(self):
self.bundle = bundle = ActivityBundle(self.source_dir)
self.version = bundle.get_activity_version()
- self.activity_name = bundle.get_name()
+ self.activity_name = bundle.get_bundle_name()
self.bundle_id = bundle.get_bundle_id()
self.bundle_name = reduce(lambda x, y: x+y, self.activity_name.split())
self.bundle_root_dir = self.bundle_name + '.activity'
diff --git a/src/sugar/activity/widgets.py b/src/sugar/activity/widgets.py
index 2867666..5b712f2 100644
--- a/src/sugar/activity/widgets.py
+++ b/src/sugar/activity/widgets.py
@@ -108,6 +108,7 @@ class CopyButton(ToolButton):
def __init__(self, **kwargs):
ToolButton.__init__(self, 'edit-copy', **kwargs)
self.props.tooltip = _('Copy')
+ self.props.accelerator = '<Ctrl>C'
class PasteButton(ToolButton):
@@ -115,6 +116,7 @@ class PasteButton(ToolButton):
def __init__(self, **kwargs):
ToolButton.__init__(self, 'edit-paste', **kwargs)
self.props.tooltip = _('Paste')
+ self.props.accelerator = '<Ctrl>V'
class ShareButton(RadioMenuButton):
@@ -202,9 +204,10 @@ class TitleEntry(gtk.ToolItem):
self.entry.set_text(jobject['title'])
def __title_changed_cb(self, entry, activity):
- if not self._update_title_sid:
- self._update_title_sid = gobject.timeout_add_seconds(
- 1, self.__update_title_cb, activity)
+ if self._update_title_sid is not None:
+ gobject.source_remove(self._update_title_sid)
+ self._update_title_sid = gobject.timeout_add_seconds(
+ 1, self.__update_title_cb, activity)
def __update_title_cb(self, activity):
title = self.entry.get_text()
@@ -333,7 +336,7 @@ class ActivityToolbox(Toolbox):
... your code, inserting all other toolbars you need, like EditToolbar
# Add the toolbox to the activity frame:
- self.set_toolbox(toolbox)
+ self.set_toolbar_box(toolbox)
# And make it visible:
toolbox.show()
"""
diff --git a/src/sugar/bundle/activitybundle.py b/src/sugar/bundle/activitybundle.py
index a1f10b9..c83257f 100644
--- a/src/sugar/bundle/activitybundle.py
+++ b/src/sugar/bundle/activitybundle.py
@@ -51,6 +51,7 @@ class ActivityBundle(Bundle):
self.bundle_exec = None
self._name = None
+ self._local_name = None
self._icon = None
self._bundle_id = None
self._mime_types = None
@@ -69,6 +70,9 @@ class ActivityBundle(Bundle):
if linfo_file:
self._parse_linfo(linfo_file)
+ if self._local_name == None:
+ self._local_name = self._name
+
def _get_manifest(self):
if self._manifest is None:
self._manifest = self._read_manifest()
@@ -217,7 +221,7 @@ class ActivityBundle(Bundle):
section = 'Activity'
if cp.has_option(section, 'name'):
- self._name = cp.get(section, 'name')
+ self._local_name = cp.get(section, 'name')
if cp.has_option(section, 'tags'):
tag_list = cp.get(section, 'tags').strip(';')
@@ -240,7 +244,11 @@ class ActivityBundle(Bundle):
return self._path
def get_name(self):
- """Get the activity user visible name."""
+ """Get the activity user-visible name."""
+ return self._local_name
+
+ def get_bundle_name(self):
+ """Get the activity bundle name."""
return self._name
def get_installation_time(self):
diff --git a/src/sugar/bundle/bundle.py b/src/sugar/bundle/bundle.py
index c9763a0..cb110cc 100644
--- a/src/sugar/bundle/bundle.py
+++ b/src/sugar/bundle/bundle.py
@@ -68,10 +68,9 @@ class Bundle(object):
def __init__(self, path):
self._path = path
self._zip_root_dir = None
+ self._zip_file = None
- if os.path.isdir(self._path):
- self._zip_file = None
- else:
+ if not os.path.isdir(self._path):
self._zip_file = zipfile.ZipFile(self._path)
self._check_zip_bundle()
diff --git a/src/sugar/graphics/palette.py b/src/sugar/graphics/palette.py
index 6ce92f6..d4632eb 100644
--- a/src/sugar/graphics/palette.py
+++ b/src/sugar/graphics/palette.py
@@ -164,7 +164,6 @@ class Palette(PaletteWindow):
self.menu.set_active(True)
def __hide_cb(self, widget):
- logging.debug('__hide_cb')
self.menu.set_active(False)
self.menu.cancel()
self._secondary_anim.stop()
@@ -183,8 +182,6 @@ class Palette(PaletteWindow):
return self._full_request
def popup(self, immediate=False, state=None):
- logging.debug('Palette.popup immediate %r', immediate)
-
if self._invoker is not None:
self._update_full_request()
diff --git a/src/sugar/graphics/palettewindow.py b/src/sugar/graphics/palettewindow.py
index 3049f55..22131c2 100644
--- a/src/sugar/graphics/palettewindow.py
+++ b/src/sugar/graphics/palettewindow.py
@@ -326,8 +326,6 @@ class PaletteWindow(gtk.Window):
self.update_position()
def popdown(self, immediate=False):
- logging.debug('PaletteWindow.popdown immediate %r', immediate)
-
self._popup_anim.stop()
self._mouse_detector.stop()
@@ -379,8 +377,6 @@ class PaletteWindow(gtk.Window):
self.emit('popup')
def __hide_cb(self, widget):
- logging.debug('__hide_cb')
-
if self._invoker:
self._invoker.notify_popdown()