Ejemplo n.º 1
0
    def on_day_start_changed(self, widget):
        day_start = self.day_start.time
        if day_start is None:
            return

        day_start = day_start.hour * 60 + day_start.minute

        conf.set("day_start_minutes", day_start)
    def on_save_button_clicked(self):
        path, format = None, None

        format = "html"
        if self.dialog.get_filter() in self.filters:
            format = self.filters[self.dialog.get_filter()]
        path = self.dialog.get_filename()

        # append correct extension if it is missing
        # TODO - proper way would be to change extension on filter change
        # only pointer in web is http://www.mail-archive.com/[email protected]/msg08740.html
        if path.endswith(".%s" % format) == False:
            path = "%s.%s" % (path.rstrip("."), format)

        categories = []

        conf.set("last_report_folder", os.path.dirname(path))

        # format, path, start_date, end_date
        self.emit("report-chosen", format, path)
        self.dialog.destroy()
        self.dialog = None
Ejemplo n.º 3
0
 def on_notify_interval_value_changed(self, scale):
     value = int(scale.get_value())
     conf.set("notify_interval", value)
Ejemplo n.º 4
0
 def on_idle_track_toggled(self, checkbox):
     conf.set("enable_timeout", checkbox.get_active())
Ejemplo n.º 5
0
 def on_shutdown_track_toggled(self, checkbox):
     conf.set("stop_on_shutdown", checkbox.get_active())