home *** CD-ROM | disk | FTP | other *** search
- # Source Generated with Decompyle++
- # File: in.pyo (Python 2.5)
-
-
- try:
- _
- except NameError:
-
- _ = lambda s: s
-
-
- class SupportMechanism(object):
- action_text = None
- description = None
- tooltip = None
- action_url = None
- say_thanks = False
- confirm = False
- confirm_text = None
- confirm_title = None
- confirm_default = True
-
- def on_action(self):
- pass
-
-
-
- class SearchHomepage(SupportMechanism):
- action_text = _('Set')
- description = _('Make Google Powered Digsby Search your homepage')
- say_thanks = True
-
- def on_action(self):
- import util.checkoptions as co
- co.set_homepage_active()
-
-
-
- class SearchEngine(SupportMechanism):
- action_text = _('Set')
- description = _('Make Google Powered Digsby Search your default search engine')
- say_thanks = True
-
- def on_action(self):
- import util.checkoptions as co
- co.set_search_active()
-
-
-
- class EmailInviter(SupportMechanism):
- action_text = _('Invite')
- description = _('Invite your friends via Email')
- action_url = 'http://www.digsby.com/invite/'
-
-
- class FacebookInviter(SupportMechanism):
- action_text = _('Invite')
- description = _('Invite your friends via Facebook')
- action_url = 'http://apps.facebook.com/digsbyim/invite.php'
-
-
- class FacebookFan(SupportMechanism):
- action_text = _('Join Group')
- description = _('Become a fan on Facebook')
- action_url = 'http://www.facebook.com/apps/application.php?id=5895217474'
-
-
- class LinkedInFan(SupportMechanism):
- action_text = _('Join Group')
- description = _('Become a fan on LinkedIn')
- action_url = 'http://www.linkedin.com/groups?gid=911917'
-
-
- class TwitterFollow(SupportMechanism):
- action_text = _('Follow')
- description = _('Follow us on Twitter')
- action_url = 'http://www.twitter.com/digsby'
-
-
- class Research(SupportMechanism):
- description = _('Help Digsby conduct research')
- confirm = False
- confirm_text = _('Helping us conduct research keeps Digsby free and ad-free. Are you sure you want to disable this option?')
- confirm_title = _('Are you sure?')
- confirm_default = False
-
- def should_confirm(self):
- import common
- return common.pref('research.enabled', type = bool, default = True)
-
-
- def _get_action_text(self):
- import common
- if common.pref('research.enabled', type = bool, default = True):
- return _('Disable')
- else:
- return _('Enable')
-
- action_text = property(_get_action_text)
-
- def on_action(self):
- import common
- common.setpref('research.enabled', not common.pref('research.enabled', type = bool, default = True))
-
-
-
- class BlogSubscribe(SupportMechanism):
- action_text = _('Subscribe')
- description = _('Subscribe to our Blog')
- action_url = 'http://blog.digsby.com/feed'
-
-
- class CreateWidget(SupportMechanism):
- action_text = _('Create')
- description = _('Create a Digsby widget for your blog or website')
- action_url = 'http://widget.digsby.com/'
-
-
- class IncrementCounter(SupportMechanism):
-
- def _get_action_text(self):
- return _('Set to %r') % (getattr(self, 'counter', 0) + 1)
-
-
- def _get_description(self):
- return _('Increment this number: %r') % getattr(self, 'counter', 0)
-
- action_text = property(_get_action_text)
- description = property(_get_description)
-
- def on_action(self):
- setattr(self, 'counter', getattr(self, 'counter', 0) + 1)
-
-
-
- class TextElongonator(SupportMechanism):
- action_text = 'More!'
- description = 'Add dashes to this text label '
-
- def on_action(self):
- self.description += '-'
-
-
- enabled = [
- SearchHomepage,
- SearchEngine,
- EmailInviter,
- FacebookInviter,
- FacebookFan,
- LinkedInFan,
- TwitterFollow,
- BlogSubscribe,
- CreateWidget]
-
- def get_enabled():
- import common
- myenabled = enabled[:]
- if common.pref('support.show_research_option', type = bool, default = True):
- if Research not in myenabled:
- myenabled.insert(-2, Research)
-
-
- return myenabled
-
-