Beispiel #1
0
    def __init__(self):
        HIGWindow.__init__(self)

        self.tooltips = gtk.Tooltips()
        self.data_lbl = HIGSectionLabel(_("Delete data older than"))
        self.days_lbl = HIGSectionLabel(_("days"))
        self.days = gtk.SpinButton(gtk.Adjustment(value=get_decays()[1],
            lower=0, upper=5000, step_incr=1), 1)

        self.tooltips.set_tip(self.days,
            _("Set value as 0 to disable data removal"))

        self.cancel = HIGButton(stock=gtk.STOCK_CANCEL)
        self.apply = HIGButton(stock=gtk.STOCK_APPLY)

        self.cancel.connect("clicked", self._exit)
        self.apply.connect("clicked", self._set_new_decay)

        self.__set_props()
        self.__do_layout()
    def _exit_ni(self, *args):
        """
        Do necessary cleanup before destroying window.
        """
        # remove tip timer if still running
        if self.tip_timer != -1:
            gobject.source_remove(self.tip_timer)
            self._clear_tip_statusbar()

        # stop updater timer
        gobject.source_remove(self.timer_updater)

        self.hide()

        # remove old data
        if get_decays()[1]:
            win = RemoveOldData()
            win.show_all()
            win.connect('destroy', self.__leave_ni)
        else:
            self.__leave_ni()
Beispiel #3
0
    def _exit_ni(self, *args):
        """
        Do necessary cleanup before destroying window.
        """
        # remove tip timer if still running
        if self.tip_timer != -1:
            gobject.source_remove(self.tip_timer)
            self._clear_tip_statusbar()

        # stop updater timer
        gobject.source_remove(self.timer_updater)

        self.hide()

        # remove old data
        if get_decays()[1]:
            win = RemoveOldData()
            win.show_all()
            win.connect('destroy', self.__leave_ni)
        else:
            self.__leave_ni()
    def __init__(self):
        HIGWindow.__init__(self)

        self.tooltips = gtk.Tooltips()
        self.data_lbl = HIGSectionLabel(_("Delete data older than"))
        self.days_lbl = HIGSectionLabel(_("days"))
        self.days = gtk.SpinButton(
            gtk.Adjustment(value=get_decays()[1],
                           lower=0,
                           upper=5000,
                           step_incr=1), 1)

        self.tooltips.set_tip(self.days,
                              _("Set value as 0 to disable data removal"))

        self.cancel = HIGButton(stock=gtk.STOCK_CANCEL)
        self.apply = HIGButton(stock=gtk.STOCK_APPLY)

        self.cancel.connect("clicked", self._exit)
        self.apply.connect("clicked", self._set_new_decay)

        self.__set_props()
        self.__do_layout()