diff --git a/WKNcharts/wknGUI.py b/WKNcharts/wknGUI.py index 6798455..b234671 100644 --- a/WKNcharts/wknGUI.py +++ b/WKNcharts/wknGUI.py @@ -12,8 +12,6 @@ class WknGUI: configs = {} wkns = "" log = "" - maxloglevel = 3 - '''0:no logging; 1:errors; 2:status messages; 3:debug ''' def __init__(self, gtk): self.gladefile = "wkncharts.glade" @@ -38,7 +36,7 @@ class WknGUI: that's why, we let it read in the wkn file''' charts = getWKNcharts.WKNCharts() charts.readwkndictfromstring(self.wkns) - #charts.set_times([30, 300]) + ## configure getWKNcharts charts.set_times(self.configs["times"]) charts.set_dstdir(self.configs["tf_dstdir"]) ## downlaoding in threads, so the gui won't hang @@ -49,6 +47,7 @@ class WknGUI: def clicked_read_settings(self, widget): configs = self.configs + self.configs["maxloglevel"] = 3 ## 0:no logging; 1:errors; 2:status messages; 3:debug ## textfield values are stored in 'configs' textfieldnames = ["tf_srcfile", "tf_dstdir"] for name in textfieldnames: @@ -140,7 +139,7 @@ class WknGUI: self.add_log("Verzeichnis nicht gefunden",1) def add_log(self, text, loglevel=2): - if loglevel <= self.maxloglevel: + if int(loglevel) <= int(self.configs["maxloglevel"]): self.logbuch = self.wkngui.get_widget("tf_logbook") self.buffer = self.logbuch.get_buffer() self.log += "\n"+self.time.strftime('%H:%M:%S')+" " diff --git a/WKNcharts/wkncharts.glade b/WKNcharts/wkncharts.glade index 6f87a4b..401340d 100644 --- a/WKNcharts/wkncharts.glade +++ b/WKNcharts/wkncharts.glade @@ -88,7 +88,7 @@ True False False - True + False GTK_JUSTIFY_CENTER GTK_WRAP_NONE True @@ -452,7 +452,6 @@ True True - True GDK_EXTENSION_EVENTS_ALL True False @@ -804,6 +803,64 @@ + + + 2 + True + False + 3 + + + + True + Loglevel: + False + False + GTK_JUSTIFY_LEFT + False + False + 0.5 + 0.5 + 0 + 0 + + + 0 + False + False + + + + + + True + True + 1 + 0 + True + GTK_UPDATE_IF_VALID + False + False + 3 0 3 1 10 10 + + + 0 + False + True + + + + + + + + + 0 + False + True + + + True