From 99d37c6268fc68003ad91b5fa01a09e45fd44924 Mon Sep 17 00:00:00 2001 From: Josh Holtrop Date: Mon, 3 Jan 2011 11:05:40 -0500 Subject: [PATCH] added start time parameter to CmdWindow --- CmdWindow.py | 5 ++++- dwtt | 4 +++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/CmdWindow.py b/CmdWindow.py index ce94859..dd9554f 100644 --- a/CmdWindow.py +++ b/CmdWindow.py @@ -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() diff --git a/dwtt b/dwtt index 2817737..c3809d6 100755 --- a/dwtt +++ b/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