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