Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/extra
diff options
context:
space:
mode:
authorWalter Bender <walter.bender@gmail.com>2011-02-12 13:02:16 (GMT)
committer Walter Bender <walter.bender@gmail.com>2011-02-12 13:02:16 (GMT)
commit17f94a0bd8fa8935b807d27721cfc6efbadef8dd (patch)
tree44cb4596eb82a6b319e12647e265775f35ce4b88 /extra
parent70537d12c6d72c2860d5edaa93038983d3fd6bc9 (diff)
disable share and configure until after collaboration has been enabled
Diffstat (limited to 'extra')
-rw-r--r--extra/collaborationplugin.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/extra/collaborationplugin.py b/extra/collaborationplugin.py
index 8f8486f..4f95ab7 100644
--- a/extra/collaborationplugin.py
+++ b/extra/collaborationplugin.py
@@ -65,6 +65,7 @@ class CollaborationPlugin(Plugin):
# This could be hashed from the file path (if resuming)
self._activity_id = "1234567"
self._nick = ""
+ self._setup_has_been_called = False
self._config_file_path = config_file_path
self._collaboration_config_values = ConfigFile(self._config_file_path)
self._valid_config_values = {
@@ -92,6 +93,10 @@ class CollaborationPlugin(Plugin):
def setup(self):
self._collaboration = Collaboration(self.tw, self)
self._collaboration.setup()
+ # Do we know if we were successful?
+ self._setup_has_been_called = True
+ # TODO:
+ # use set_sensitive to enable Share and Configuration menuitems
def set_tw(self, turtleart_window):
self.tw = turtleart_window
@@ -270,6 +275,8 @@ class CollaborationPlugin(Plugin):
self.emit('joined')
def _config_neighborhood_cb(self, widget):
+ if not self._setup_has_been_called:
+ return
config_w = ConfigWizard(self._config_file_path)
config_items = [
{"item_label": _("Nickname"), "item_type": "text",
@@ -294,6 +301,8 @@ class CollaborationPlugin(Plugin):
config_w.show()
def _share_cb(self, button):
+ if not self._setup_has_been_called:
+ return
properties = {}
properties['id'] = self._get_activity_id()
properties['type'] = self._get_bundle_id()