Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimon Schampijer <simon@schampijer.de>2009-08-12 09:26:26 (GMT)
committer Simon Schampijer <simon@schampijer.de>2009-08-12 09:26:26 (GMT)
commit10b5a30bc9c2e2c05a5ae23a796e482db6169f85 (patch)
tree7f65cd730b946f5dee33a5f922a126a5e0a338db
parentd02ab6bb9a34bc5f41326eb393ba2c925c891b8a (diff)
Make the share button insensitive when max_participants is set to 1
-rw-r--r--src/sugar/activity/widgets.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/sugar/activity/widgets.py b/src/sugar/activity/widgets.py
index 40c38ec..9e87fab 100644
--- a/src/sugar/activity/widgets.py
+++ b/src/sugar/activity/widgets.py
@@ -1,4 +1,4 @@
-# Copyright (C) 2009, Aleksey Lim
+# Copyright (C) 2009, Aleksey Lim, Simon Schampijer
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
@@ -99,6 +99,8 @@ class ShareButton(RadioMenuButton):
RadioMenuButton.__init__(self, **kwargs)
self.props.palette = palette
+ if activity.max_participants == 1:
+ self.props.sensitive = False
def __neighborhood_clicked_cb(self, button, activity):
activity.share()