added start time parameter to CmdWindow
This commit is contained in:
parent
4d641af494
commit
99d37c6268
@ -2,7 +2,7 @@
|
|||||||
import gtk
|
import gtk
|
||||||
|
|
||||||
class CmdWindow:
|
class CmdWindow:
|
||||||
def __init__(self, status = ''):
|
def __init__(self, status = '', starttime = None):
|
||||||
self.window = gtk.Window(gtk.WINDOW_TOPLEVEL)
|
self.window = gtk.Window(gtk.WINDOW_TOPLEVEL)
|
||||||
self.window.set_geometry_hints(min_width = 350);
|
self.window.set_geometry_hints(min_width = 350);
|
||||||
self.window.connect("delete_event", self.delete_event)
|
self.window.connect("delete_event", self.delete_event)
|
||||||
@ -17,6 +17,9 @@ class CmdWindow:
|
|||||||
hbox = gtk.HBox()
|
hbox = gtk.HBox()
|
||||||
lbl = gtk.Label(status)
|
lbl = gtk.Label(status)
|
||||||
hbox.pack_start(lbl, expand = False)
|
hbox.pack_start(lbl, expand = False)
|
||||||
|
if starttime is not None:
|
||||||
|
lbl = gtk.Label('Start: ' + starttime.strftime('%I:%M%p'))
|
||||||
|
hbox.pack_end(lbl, expand = False)
|
||||||
vbox.pack_start(hbox)
|
vbox.pack_start(hbox)
|
||||||
|
|
||||||
hbox = gtk.HBox()
|
hbox = gtk.HBox()
|
||||||
|
4
dwtt
4
dwtt
@ -39,10 +39,12 @@ def main(argv):
|
|||||||
|
|
||||||
while True:
|
while True:
|
||||||
status = ''
|
status = ''
|
||||||
|
starttime = None
|
||||||
ct = ds.getCurrentTask()
|
ct = ds.getCurrentTask()
|
||||||
if ct is not None:
|
if ct is not None:
|
||||||
status = 'Current Task: ' + ds.getTaskByID(ct.taskid).name
|
status = 'Current Task: ' + ds.getTaskByID(ct.taskid).name
|
||||||
cw = CmdWindow(status)
|
starttime = ct.time
|
||||||
|
cw = CmdWindow(status, starttime)
|
||||||
cmdline = cw.main()
|
cmdline = cw.main()
|
||||||
if cmdline.strip() == '':
|
if cmdline.strip() == '':
|
||||||
break
|
break
|
||||||
|
Loading…
x
Reference in New Issue
Block a user