Beispiel #1
0
    def _rsync_complete_handler(self,
                                target,
                                sender=None,
                                interface=None,
                                path=None):
        urgency = notify2.URGENCY_NORMAL
        if (self._note != None):
            self._note.close()
        # Try to pretty things up a bit by displaying volume name
        # and hinted icon instead of the raw device path,
        # and standard harddisk icon if possible.
        icon = None
        volume = util.path_to_volume(target)
        if volume == None:
            volName = target
        else:
            volName = volume.get_name()
            icon = volume.get_icon()

        self._note = notify2.Notification(_("Backup Complete"),
                                           _("Your snapshots have been backed up to:\n<b>%s</b>") \
                                           % (volName))
        self._note.connect("closed", \
                           self._notification_closed)
        self._note.set_urgency(urgency)
        self._setup_icon_for_note(icon)
        self._icon.set_has_tooltip(False)
        self.queueSize = 0
        GObject.idle_add(self._show_notification)
Beispiel #2
0
    def _rsync_complete_handler(self, target, sender=None, interface=None, path=None):
        urgency = pynotify.URGENCY_NORMAL
        if (self._note != None):
            self._note.close()
        # Try to pretty things up a bit by displaying volume name
        # and hinted icon instead of the raw device path,
        # and standard harddisk icon if possible.
        icon = None
        volume = util.path_to_volume(target)
        if volume == None:
            volName = target
        else:
            volName = volume.get_name()
            icon = volume.get_icon()

        self._note = pynotify.Notification(_("Backup Complete"),
                                           _("Your snapshots have been backed up to:\n<b>%s</b>") \
                                           % (volName))
        self._note.connect("closed", \
                           self._notification_closed)
        self._note.set_urgency(urgency)
        self._setup_icon_for_note(icon)
        self._icon.set_has_tooltip(False)
        self.queueSize = 0
        gobject.idle_add(self._show_notification)
Beispiel #3
0
    def _rsync_started_handler(self,
                               target,
                               sender=None,
                               interface=None,
                               path=None):
        urgency = notify2.URGENCY_NORMAL
        if (self._note != None):
            self._note.close()
        # Try to pretty things up a bit by displaying volume name
        # and hinted icon instead of the raw device path,
        # and standard harddisk icon if possible.
        icon = None
        volume = util.path_to_volume(target)
        if volume == None:
            volName = target
        else:
            volName = volume.get_name()
            icon = volume.get_icon()

        self._note = notify2.Notification(_("Backup Started"),
                                           _("Backing up snapshots to:\n<b>%s</b>\n" \
                                           "Do not disconnect the backup device.") \
                                            % (volName))
        self._note.connect("closed", \
                           self._notification_closed)
        self._note.set_urgency(urgency)
        self._setup_icon_for_note(icon)
        GObject.idle_add(self._show_notification)
Beispiel #4
0
 def _rsync_started_handler(self, target, sender=None, interface=None, path=None):
     urgency = pynotify.URGENCY_NORMAL
     if (self._note != None):
         self._note.close()
     # Try to pretty things up a bit by displaying volume name
     # and hinted icon instead of the raw device path,
     # and standard harddisk icon if possible.
     icon = None
     volume = util.path_to_volume(target)
     if volume == None:
         volName = target
     else:
         volName = volume.get_name()
         icon = volume.get_icon()
                   
     self._note = pynotify.Notification(_("Backup Started"),
                                        _("Backing up snapshots to:\n<b>%s</b>\n" \
                                        "Do not disconnect the backup device.") \
                                         % (volName))
     self._note.connect("closed", \
                        self._notification_closed)
     self._note.set_urgency(urgency)
     self._setup_icon_for_note(icon)
     gobject.idle_add(self._show_notification)