Пример #1
0
    def __init__(self, specto, id, values):
        watch_values = [("username", spectlib.config.String(True)),
                        ("password", spectlib.config.String(True)),
                        ("label", spectlib.config.String(False))]
        url = "https://mail.google.com"
        self.standard_open_command = spectlib.util.return_webpage(url)

        #Init the superclass and set some specto values
        Watch.__init__(self, specto, id, values, watch_values)

        if self.open_command == self.standard_open_command: #check if google apps url has to be used
            if "@" in self.username and not "@gmail.com" and not "@googlemail.com" in self.username:
                url = "http://mail.google.com/a/" + self.username.split("@")[1]  # We use mail.google.com instead of gmail.com because of the trademark issue in Germany
                self.standard_open_command = spectlib.util.return_webpage(url)
                self.open_command = self.standard_open_command

        self.use_network = True
        self.icon = icon
        self.type_desc = type_desc
        self.cache_file = os.path.join(self.specto.CACHE_DIR, "gmail" + self.username + ".cache")

        #watch specific values
        self.oldMsg = 0
        self.newMsg = 0
        self.mail_info = Email_collection()

        self.read_cache_file()
Пример #2
0
    def __init__(self, specto, id, values):

        watch_values = [("receivedimmsg_", spectlib.config.Boolean(False)),
                        ("receivedchatmsg_", spectlib.config.Boolean(False)),
                        ("buddystatuschanged_",
                         spectlib.config.Boolean(False)),
                        ("buddysignedon_", spectlib.config.Boolean(False)),
                        ("buddysignedoff_", spectlib.config.Boolean(False))]

        self.icon = icon
        self.standard_open_command = ''
        self.type_desc = type_desc

        #Init the superclass and set some specto values
        Watch.__init__(self, specto, id, values, watch_values)

        self.dbus = True
        self.message = ""
        self.extra_info = ""
        # Use the dbus interface we saw in dbus-notify
        self.dbus_interface = "im.pidgin.purple.PurpleInterface"
        self.dbus_path = "/im/pidgin/purple/PurpleObject"
        self.dbus_name = "im.pidgin.purple.PurpleService"

        self.signals = {
            "ReceivedImMsg": self.ReceivedImMsg,
            "ReceivedChatMsg": self.ReceivedChatMsg,
            "BuddyStatusChanged": self.BuddyStatusChanged,
            "BuddySignedOn": self.BuddySignedOn,
            "BuddySignedOff": self.BuddySignedOff,
        }
Пример #3
0
    def __init__(self, specto, id, values):

        watch_values = [("folder", spectlib.config.String(True))]

        self.icon = icon
        self.standard_open_command = 'xdg-open %s' % values['folder']
        self.type_desc = type_desc

        #Init the superclass and set some specto values
        Watch.__init__(self, specto, id, values, watch_values)

        self.use_network = True
        self.repositoy_info = []
        self.remote_branch_label = ""
        self.local_changes = []
        self.remote_changes = []

        # Kind of changes to check for, and there are two copies
        # so it is possible to make different checks for local/remote
        self.local_check_kinds = [pysvn.wc_status_kind.modified,\
                                  pysvn.wc_status_kind.added,\
                                  pysvn.wc_status_kind.deleted,\
                                  pysvn.wc_status_kind.replaced,\
                                  pysvn.wc_status_kind.merged,\
                                 ]
        self.remote_check_kinds = [pysvn.wc_status_kind.modified,\
                                   pysvn.wc_status_kind.added,\
                                   pysvn.wc_status_kind.deleted,\
                                   pysvn.wc_status_kind.replaced,\
                                   pysvn.wc_status_kind.merged,\
                                  ]

        #Init the pysvn client, and error style
        self.svn_client = pysvn.Client()
        self.svn_client.exception_style = 0
Пример #4
0
    def __init__(self, specto, id, values):

        watch_values = []
        self.icon = icon
        self.current_song = ""
        self.standard_open_command = 'amarok'
        self.type_desc = type_desc

        #Init the superclass and set some specto values
        Watch.__init__(self, specto, id, values, watch_values)

        self.dbus = True
        self.message = ""
        self.extra_info = ""
        # Use the dbus interface we saw in dbus-notify
        self.dbus_interface = "org.kde.Amarok"
        self.dbus_path = "/org/kde/Amarok"
        self.dbus_name = "org.kde.Amarok"

        self.signals = {"TrackChange": self.playingUriChanged}

        def playingUriChanged(self, title, artist, album, track):
            self.message = "%s - %s\nTrack: %s" % (artist, album, track)
            self.current_song = "%s - %s" % (artist, track)

        self.watch_changed()
Пример #5
0
    def __init__(self, specto, id, values):

        watch_values = [("folder", spectlib.config.String(True))]

        self.icon = icon
        self.standard_open_command = 'xdg-open %s' % values['folder']
        self.type_desc = type_desc

        #Init the superclass and set some specto values
        Watch.__init__(self, specto, id, values, watch_values)

        self.use_network = True
        self.repositoy_info = []
        self.remote_branch_label = ""
        self.local_changes = []
        self.remote_changes = []
        
        # Kind of changes to check for, and there are two copies
        # so it is possible to make different checks for local/remote
        self.local_check_kinds = [pysvn.wc_status_kind.modified,\
                                  pysvn.wc_status_kind.added,\
                                  pysvn.wc_status_kind.deleted,\
                                  pysvn.wc_status_kind.replaced,\
                                  pysvn.wc_status_kind.merged,\
                                 ]
        self.remote_check_kinds = [pysvn.wc_status_kind.modified,\
                                   pysvn.wc_status_kind.added,\
                                   pysvn.wc_status_kind.deleted,\
                                   pysvn.wc_status_kind.replaced,\
                                   pysvn.wc_status_kind.merged,\
                                  ]
        
        #Init the pysvn client, and error style
        self.svn_client = pysvn.Client()
        self.svn_client.exception_style = 0
Пример #6
0
    def __init__(self, specto, id, values):

        watch_values = [("receivedimmsg_", spectlib.config.Boolean(False)),
                        ("receivedchatmsg_", spectlib.config.Boolean(False)),
                        ("buddystatuschanged_", spectlib.config.Boolean(False)),
                        ("buddysignedon_", spectlib.config.Boolean(False)),
                        ("buddysignedoff_", spectlib.config.Boolean(False))
                        ]

        self.icon = icon
        self.standard_open_command = ''
        self.type_desc = type_desc

        #Init the superclass and set some specto values
        Watch.__init__(self, specto, id, values, watch_values)
        
        self.dbus = True
        self.message = ""
        self.extra_info = ""
        # Use the dbus interface we saw in dbus-notify
        self.dbus_interface = "im.pidgin.purple.PurpleInterface"
        self.dbus_path = "/im/pidgin/purple/PurpleObject"
        self.dbus_name = "im.pidgin.purple.PurpleService"

        self.signals = {
            "ReceivedImMsg": self.ReceivedImMsg,
            "ReceivedChatMsg": self.ReceivedChatMsg,
            "BuddyStatusChanged": self.BuddyStatusChanged,
            "BuddySignedOn": self.BuddySignedOn,
            "BuddySignedOff": self.BuddySignedOff,            
             }
Пример #7
0
    def __init__(self, specto, id, values):

        watch_values = []
        self.icon = icon
        self.current_song = ""
        self.standard_open_command = 'amarok'
        self.type_desc = type_desc

        #Init the superclass and set some specto values
        Watch.__init__(self, specto, id, values, watch_values)
        
        self.dbus = True
        self.message = ""
        self.extra_info = ""
        # Use the dbus interface we saw in dbus-notify
        self.dbus_interface = "org.kde.Amarok"
        self.dbus_path = "/org/kde/Amarok"
        self.dbus_name = "org.kde.Amarok"

        self.signals = {"TrackChange": self.playingUriChanged}
        
        
	def playingUriChanged(self, title, artist, album, track):
  			self.message = "%s - %s\nTrack: %s" %(artist, album, track)
  			self.current_song = "%s - %s" % (artist, track)
        self.watch_changed()
Пример #8
0
    def __init__(self, specto, id, values):

        watch_values = [("username", spectlib.config.String(True)),
                        ("password", spectlib.config.String(True)),
                        ("host", spectlib.config.String(True)),
                        ("ssl", spectlib.config.Boolean(False)),
                        ("port", spectlib.config.Integer(False))]

        self.standard_open_command = spectlib.util.open_gconf_application(
            "/desktop/gnome/url-handlers/mailto")

        Watch.__init__(self, specto, id, values, watch_values)

        self.type_desc = type_desc
        self.use_network = True
        self.icon = icon
        self.cache_file = os.path.join(
            self.specto.CACHE_DIR,
            "pop3" + self.host + self.username + ".cache")

        self.newMsg = 0
        self.unreadMsg = 0
        self.mail_id = []
        self.mail_info = Email_collection()

        self.read_cache_file()
Пример #9
0
 def __init__(self, refresh, port, specto, id,  name = _("Unknown Process Watch")):
     Watch.__init__(self, specto)
     self.name = name
     self.refresh = refresh
     self.port = port
     self.id = id
     self.error = False
     self.actually_updated=False
     self.running = self.check_port()
Пример #10
0
 def __init__(self, specto, name, refresh, url, id, error_margin):
     Watch.__init__(self, specto) #init superclass
     self.refresh = refresh
     self.id = id
     self.url_ = url
     if self.url_ == "":
         self.specto.logger.log(_("Watch: \"%s\" has error: empty url") % self.error, "error", self.__class__)
     self.name = name
     self.error_margin = error_margin#the amount in percent (as a float) of what the filesize must change to consider the page changed
     self.error = False
Пример #11
0
 def __init__(self, refresh, host, username, password, ssl, specto, id, name = _("Unknown Mail Watch")):
     Watch.__init__(self, specto)
     self.name = name
     self.refresh = refresh
     self.host = host
     self.user = username
     self.password = password
     self.id = id
     self.error = False
     self.ssl = ssl
Пример #12
0
 def __init__(self, refresh, file, mode, specto, id,  name = _("Unknown File Watch")):
     Watch.__init__(self, specto)
     self.name = name
     self.refresh = refresh
     self.file = file
     self.mode = mode
     self.id = id
     self.error = False
     self.first_time = False
     self.actually_updated = False
Пример #13
0
 def __init__(self, refresh, username, password, specto, id,  name = _("Unknown Mail Watch")):
     Watch.__init__(self, specto)
     self.name = name
     self.refresh = refresh
     if "@" not in username:
         self.user = username + "@gmail.com"
     else:
         self.user = username
     self.password = password
     self.id = id
     self.error = False
Пример #14
0
 def __init__(self, specto, name, refresh, url, id, error_margin):
     Watch.__init__(self, specto)  #init superclass
     self.refresh = refresh
     self.id = id
     self.url_ = url
     if self.url_ == "":
         self.specto.logger.log(
             _("Watch: \"%s\" has error: empty url") % self.error, "error",
             self.__class__)
     self.name = name
     self.error_margin = error_margin  #the amount in percent (as a float) of what the filesize must change to consider the page changed
     self.error = False
Пример #15
0
    def __init__(self, specto, id, values):
        watch_values = [("port", spectlib.config.Integer(True))]

        self.icon = icon
        self.standard_open_command = ''
        self.type_desc = type_desc
        self.status = ""

        #Init the superclass and set some specto values
        Watch.__init__(self, specto, id, values, watch_values)

        self.running = self.check_port()
Пример #16
0
    def __init__(self, specto, id, values):
        watch_values = [("port", spectlib.config.Integer(True))]

        self.icon = icon
        self.standard_open_command = ''
        self.type_desc = type_desc
        self.status = ""

        #Init the superclass and set some specto values
        Watch.__init__(self, specto, id, values, watch_values)

        self.running = self.check_port()
Пример #17
0
    def __init__(self, specto, id, values):
        watch_values = [("username", spectlib.config.String(True))]
        self.standard_open_command = ""     

        #Init the superclass and set some specto values
        Watch.__init__(self, specto, id, values, watch_values)

        self.use_network = True
        self.icon = icon
        self.type_desc = type_desc
        self.extra_information = ""
        self.previous_song = ""
Пример #18
0
    def __init__(self, specto, id, values):

        watch_values = [("process", spectlib.config.String(True))]

        self.icon = icon
        self.standard_open_command = values['process']
        self.type_desc = type_desc
        self.status = ""

        #Init the superclass and set some specto values
        Watch.__init__(self, specto, id, values, watch_values)

        self.running_initially = self.check_process()
Пример #19
0
    def __init__(self, specto, id, values):
        watch_values = [("file", String(True))]

        self.icon = icon
        self.open_command = ''
        self.type_desc = type_desc
        self.standard_open_command = "xdg-open '%s'" % values['file']

        #Init the superclass and set some specto values
        Watch.__init__(self, specto, id, values, watch_values)

        self.cache_file = os.path.join(self.specto.CACHE_DIR, "file" + self.file.replace("/", "_") + ".cache")
        self.first_time = False
Пример #20
0
    def __init__(self, specto, id, values):

        watch_values = [("process", spectlib.config.String(True))]

        self.icon = icon
        self.standard_open_command = values['process']
        self.type_desc = type_desc
        self.status = ""

        #Init the superclass and set some specto values
        Watch.__init__(self, specto, id, values, watch_values)

        self.running_initially = self.check_process()
Пример #21
0
 def __init__(self,
              refresh,
              port,
              specto,
              id,
              name=_("Unknown Process Watch")):
     Watch.__init__(self, specto)
     self.name = name
     self.refresh = refresh
     self.port = port
     self.id = id
     self.error = False
     self.actually_updated = False
     self.running = self.check_port()
Пример #22
0
    def __init__(self, specto, id, values):
        watch_values = [("file", String(True))]

        self.icon = icon
        self.open_command = ''
        self.type_desc = type_desc
        self.standard_open_command = "xdg-open '%s'" % values['file']

        #Init the superclass and set some specto values
        Watch.__init__(self, specto, id, values, watch_values)

        self.cache_file = os.path.join(
            self.specto.CACHE_DIR,
            "file" + self.file.replace("/", "_") + ".cache")
        self.first_time = False
Пример #23
0
 def __init__(self, refresh, host, username, password, ssl, specto, id,  name = _("Unknown Mail Watch")):
     Watch.__init__(self, specto)
     self.name = name
     self.refresh = refresh
     self.host = host
     self.user = username
     self.password = password
     self.id = id
     self.error = False
     self.ssl = ssl
             
     cacheSubDir__ = os.environ['HOME'] + "/.specto/cache/"
     if not os.path.exists(cacheSubDir__):
         os.mkdir(cacheSubDir__)
     cacheFileName = "pop" + name + ".cache"
     self.cacheFullPath_ = os.path.join(cacheSubDir__, cacheFileName)
Пример #24
0
    def __init__(self, specto, id, values):
        watch_values = [("folder", spectlib.config.String(True))]

        self.icon = icon
        self.standard_open_command = "xdg-open '%s'" % values['folder']
        self.type_desc = type_desc

        #Init the superclass and set some specto values
        Watch.__init__(self, specto, id, values, watch_values)

        self.cache_file = os.path.join(self.specto.CACHE_DIR, "folder" + self.folder.replace("/", "_") + ".cache")
        self.first_time = False
        self.info = {}
        self.info['removed'] = [0, ""]
        self.info['created'] = [0, ""]
        self.info['modified'] = [0, ""]
Пример #25
0
 def __init__(self,
              refresh,
              file,
              mode,
              specto,
              id,
              name=_("Unknown File Watch")):
     Watch.__init__(self, specto)
     self.name = name
     self.refresh = refresh
     self.file = file
     self.mode = mode
     self.id = id
     self.error = False
     self.first_time = False
     self.actually_updated = False
Пример #26
0
 def __init__(self,
              refresh,
              username,
              password,
              specto,
              id,
              name=_("Unknown Mail Watch")):
     Watch.__init__(self, specto)
     self.name = name
     self.refresh = refresh
     if "@" not in username:
         self.user = username + "@gmail.com"
     else:
         self.user = username
     self.password = password
     self.id = id
     self.error = False
Пример #27
0
    def __init__(self, specto, id, values):
        watch_values = [("folder", spectlib.config.String(True))]

        self.icon = icon
        self.standard_open_command = "xdg-open '%s'" % values['folder']
        self.type_desc = type_desc

        #Init the superclass and set some specto values
        Watch.__init__(self, specto, id, values, watch_values)

        self.cache_file = os.path.join(
            self.specto.CACHE_DIR,
            "folder" + self.folder.replace("/", "_") + ".cache")
        self.first_time = False
        self.info = {}
        self.info['removed'] = [0, ""]
        self.info['created'] = [0, ""]
        self.info['modified'] = [0, ""]
Пример #28
0
 def __init__(self,
              refresh,
              host,
              username,
              password,
              ssl,
              specto,
              id,
              name=_("Unknown Mail Watch")):
     Watch.__init__(self, specto)
     self.name = name
     self.refresh = refresh
     self.host = host
     self.user = username
     self.password = password
     self.id = id
     self.error = False
     self.ssl = ssl
Пример #29
0
    def __init__(self, specto, id, values):

        watch_values = []
        self.icon = icon
        self.standard_open_command = 'evolution'
        self.type_desc = type_desc

        #Init the superclass and set some specto values
        Watch.__init__(self, specto, id, values, watch_values)
        
        self.dbus = True
        self.message = ""
        self.extra_info = ""
        # Use the dbus interface we saw in dbus-notify
        self.dbus_interface = "org.gnome.evolution.mail.dbus.Signal"
        self.dbus_path = "/org/gnome/evolution/mail/newmail"
        self.dbus_name = "org.gnome.evolution.mail.dbus.Signal"

        self.signals = {"NewMail": self.new_mail}
Пример #30
0
    def __init__(self, specto, id, values):
        watch_values = [("uri", spectlib.config.String(True)),
                        ("username", spectlib.config.String(False)),
                        ("password", spectlib.config.String(False)),
                        ("error_margin", spectlib.config.Dec(True)),
                        ("redirect", spectlib.config.Boolean(False))]

        self.standard_open_command = spectlib.util.return_webpage(values['uri'])

        Watch.__init__(self, specto, id, values, watch_values)

        self.cacheSubDir__ = specto.CACHE_DIR
        self.use_network = True
        self.filesize_difference = 0.0
        self.icon = icon

        self.open_command = self.open_command.replace("&", "\&")
        self.url_ = self.uri
        self.diff = ""
Пример #31
0
    def __init__(self, specto, id, values):

        watch_values = []
        self.icon = icon
        self.standard_open_command = 'evolution'
        self.type_desc = type_desc

        #Init the superclass and set some specto values
        Watch.__init__(self, specto, id, values, watch_values)
        
        self.dbus = True
        self.message = ""
        self.extra_info = ""
        # Use the dbus interface we saw in dbus-notify
        self.dbus_interface = "org.gnome.evolution.mail.dbus.Signal"
        self.dbus_path = "/org/gnome/evolution/mail/newmail"
        self.dbus_name = "org.gnome.evolution.mail.dbus.Signal"

        self.signals = {"NewMail": self.new_mail}
Пример #32
0
    def __init__(self, specto, id, values):
        watch_values = [("username", spectlib.config.String(True)),
                        ("password", spectlib.config.String(True))]
        url = "https://wave.google.com"
        self.standard_open_command = spectlib.util.return_webpage(url)

        #Init the superclass and set some specto values
        Watch.__init__(self, specto, id, values, watch_values)

        self.use_network = True
        self.icon = icon
        self.type_desc = type_desc
        self.cache_file = os.path.join(self.specto.CACHE_DIR, "gwave" + self.username + ".cache")

        #watch specific values
        self.newMsg = 0
        self.waves = Wave_collection()

        self.read_cache_file()
Пример #33
0
    def __init__(self, specto, id, values):

        watch_values = [("folder", spectlib.config.String(True))]

        self.icon = icon
        self.standard_open_command = "xdg-open '%s'" % values['folder']
        self.type_desc = type_desc

        #Init the superclass and set some specto values
        Watch.__init__(self, specto, id, values, watch_values)

        self.use_network = True

        self.local_branch_ = 0
        self.remote_branch_ = 0
        self.remote_branch_label = ""
        self.local_extra = []
        self.remote_extra = []
        self.cache_file = os.path.join(self.specto.CACHE_DIR, "bazaar" + self.folder.replace("/", "_") + ".cache")
Пример #34
0
    def __init__(self, specto, id, values):

        watch_values = []
        self.icon = icon
        self.current_song = ""
        self.standard_open_command = 'banshee'
        self.type_desc = type_desc

        #Init the superclass and set some specto values
        Watch.__init__(self, specto, id, values, watch_values)

        self.dbus = True
        self.message = ""
        self.extra_info = ""
        # Use the dbus interface we saw in dbus-notify
        self.dbus_interface = "org.bansheeproject.Banshee.PlayerEngine"
        self.dbus_path = "/org/bansheeproject/Banshee/PlayerEngine"
        self.dbus_name = "org.bansheeproject.Banshee"

        self.signals = {"StateChanged": self.StateChanged}
Пример #35
0
    def __init__(self, specto, id, values):
        watch_values = [("username", spectlib.config.String(True)),
                        ("password", spectlib.config.String(True))]
        url = "https://wave.google.com"
        self.standard_open_command = spectlib.util.return_webpage(url)

        #Init the superclass and set some specto values
        Watch.__init__(self, specto, id, values, watch_values)

        self.use_network = True
        self.icon = icon
        self.type_desc = type_desc
        self.cache_file = os.path.join(self.specto.CACHE_DIR,
                                       "gwave" + self.username + ".cache")

        #watch specific values
        self.newMsg = 0
        self.waves = Wave_collection()

        self.read_cache_file()
Пример #36
0
    def __init__(self, specto, id, values):
        watch_values = [("uri", spectlib.config.String(True)),
                        ("username", spectlib.config.String(False)),
                        ("password", spectlib.config.String(False)),
                        ("error_margin", spectlib.config.Dec(True)),
                        ("redirect", spectlib.config.Boolean(False))]

        self.standard_open_command = spectlib.util.return_webpage(
            values['uri'])

        Watch.__init__(self, specto, id, values, watch_values)

        self.cacheSubDir__ = specto.CACHE_DIR
        self.use_network = True
        self.filesize_difference = 0.0
        self.icon = icon

        self.open_command = self.open_command.replace("&", "\&")
        self.url_ = self.uri
        self.diff = ""
Пример #37
0
    def __init__(self, specto, id, values):

        watch_values = []
        self.icon = icon
        self.current_song = ""
        self.standard_open_command = 'banshee'
        self.type_desc = type_desc

        #Init the superclass and set some specto values
        Watch.__init__(self, specto, id, values, watch_values)
        
        self.dbus = True
        self.message = ""
        self.extra_info = ""
        # Use the dbus interface we saw in dbus-notify
        self.dbus_interface = "org.bansheeproject.Banshee.PlayerEngine"
        self.dbus_path = "/org/bansheeproject/Banshee/PlayerEngine"
        self.dbus_name = "org.bansheeproject.Banshee"

        self.signals = {"StateChanged": self.StateChanged}
Пример #38
0
    def __init__(self, specto, id, values):

        watch_values = []
        self.icon = icon
        self.current_song = ""
        self.standard_open_command = 'rhythmbox'
        self.type_desc = type_desc

        #Init the superclass and set some specto values
        Watch.__init__(self, specto, id, values, watch_values)
        
        self.dbus = True
        self.message = ""
        self.extra_info = ""
        # Use the dbus interface we saw in dbus-notify
        self.dbus_interface = "org.gnome.Rhythmbox.Player"
        self.dbus_path = "/org/gnome/Rhythmbox/Player"
        self.dbus_name = "org.gnome.Rhythmbox"

        self.signals = {"playingUriChanged": self.playingUriChanged}
Пример #39
0
    def __init__(self, specto, id, values):

        watch_values = []
        self.icon = icon
        self.current_song = ""
        self.standard_open_command = 'rhythmbox'
        self.type_desc = type_desc

        #Init the superclass and set some specto values
        Watch.__init__(self, specto, id, values, watch_values)

        self.dbus = True
        self.message = ""
        self.extra_info = ""
        # Use the dbus interface we saw in dbus-notify
        self.dbus_interface = "org.gnome.Rhythmbox.Player"
        self.dbus_path = "/org/gnome/Rhythmbox/Player"
        self.dbus_name = "org.gnome.Rhythmbox"

        self.signals = {"playingUriChanged": self.playingUriChanged}
Пример #40
0
    def __init__(self, specto, id, values):

        watch_values = [("folder", spectlib.config.String(True))]

        self.icon = icon
        self.standard_open_command = "xdg-open '%s'" % values['folder']
        self.type_desc = type_desc

        #Init the superclass and set some specto values
        Watch.__init__(self, specto, id, values, watch_values)

        self.use_network = True

        self.local_branch_ = 0
        self.remote_branch_ = 0
        self.remote_branch_label = ""
        self.local_extra = []
        self.remote_extra = []
        self.cache_file = os.path.join(
            self.specto.CACHE_DIR,
            "bazaar" + self.folder.replace("/", "_") + ".cache")
Пример #41
0
    def __init__(self, specto, id, values):

        watch_values = []
        check_instance()

        self.icon = icon
        self.standard_open_command = ''
        self.type_desc = type_desc

        #Init the superclass and set some specto values
        Watch.__init__(self, specto, id, values, watch_values)
        
        self.dbus = True
        self.message = ""
        self.extra_info = ""
        # Use the dbus interface we saw in dbus-notify
        self.dbus_interface = MUMBLES_DBUS_INTERFACE
        self.dbus_path = MUMBLES_DBUS_OBJECT
        self.dbus_name = MUMBLES_DBUS_NAME

        self.signals = {"_Notify": self.notify}
Пример #42
0
 def __init__(self, refresh, username, password, specto, id,  name = _("Unknown Google Reader Watch")):
     Watch.__init__(self, specto)
     self.name = name
     self.refresh = refresh
     self.user = username
     self.password = password
     self.id = id
     self.error = False
     self.news_titles = []
     self.oldMsg = 0
     self.newMsg = 0
     self.source = "Specto"
     self.google_url = 'http://www.google.com'
     self.reader_url = self.google_url + '/reader'
     self.reading_url = self.reader_url + '/atom/user/-/state/com.google/reading-list'
     self.login_url = 'https://www.google.com/accounts/ClientLogin'
     self.token_url = self.reader_url + '/api/0/token'
     
     cacheSubDir__ = os.environ['HOME'] + "/.specto/cache/"
     if not os.path.exists(cacheSubDir__):
         os.mkdir(cacheSubDir__)
     self.cache_file = cacheSubDir__ + "googleReader.xml.cache"
Пример #43
0
    def __init__(self, specto, id, values):

        watch_values = [("email", spectlib.config.String(True)),
                        ("password", spectlib.config.String(True))]

        self.icon = icon
        self.type_desc = type_desc

        url = "http://www.facebook.com"
        self.standard_open_command = spectlib.util.return_webpage(url)

        #Init the superclass and set some specto values
        Watch.__init__(self, specto, id, values, watch_values)

        self.cache_file = os.path.join(self.specto.CACHE_DIR, "facebook" + self.email + ".cache")
        self.previous_messages = []
        self.previous_notifications = []
        self.previous_requests = []
        self.previous_wall = []

        self.use_network = True

        self.read_cache_file()
Пример #44
0
    def __init__(self, specto, id, values):

        watch_values = [("username", spectlib.config.String(True)),
                        ("password", spectlib.config.String(True)),
                        ("host", spectlib.config.String(True)),
                        ("ssl", spectlib.config.Boolean(False)),
                        ("port", spectlib.config.Integer(False))]

        self.standard_open_command = spectlib.util.open_gconf_application("/desktop/gnome/url-handlers/mailto")

        Watch.__init__(self, specto, id, values, watch_values)

        self.type_desc = type_desc
        self.use_network = True
        self.icon =icon
        self.cache_file = os.path.join(self.specto.CACHE_DIR, "pop3" + self.host + self.username + ".cache")

        self.newMsg = 0
        self.unreadMsg = 0
        self.mail_id = []
        self.mail_info = Email_collection()

        self.read_cache_file()
Пример #45
0
    def __init__(self, specto, id, values):

        watch_values = [("email", spectlib.config.String(True)),
                        ("password", spectlib.config.String(True))]

        self.icon = icon
        self.type_desc = type_desc

        url = "http://www.facebook.com"
        self.standard_open_command = spectlib.util.return_webpage(url)

        #Init the superclass and set some specto values
        Watch.__init__(self, specto, id, values, watch_values)

        self.cache_file = os.path.join(self.specto.CACHE_DIR,
                                       "facebook" + self.email + ".cache")
        self.previous_messages = []
        self.previous_notifications = []
        self.previous_requests = []
        self.previous_wall = []

        self.use_network = True

        self.read_cache_file()
Пример #46
0
    def __init__(self,
                 refresh,
                 host,
                 username,
                 password,
                 ssl,
                 specto,
                 id,
                 name=_("Unknown Mail Watch")):
        Watch.__init__(self, specto)
        self.name = name
        self.refresh = refresh
        self.host = host
        self.user = username
        self.password = password
        self.id = id
        self.error = False
        self.ssl = ssl

        cacheSubDir__ = os.environ['HOME'] + "/.specto/cache/"
        if not os.path.exists(cacheSubDir__):
            os.mkdir(cacheSubDir__)
        cacheFileName = "pop" + name + ".cache"
        self.cacheFullPath_ = os.path.join(cacheSubDir__, cacheFileName)