--- trunk/RCS/lohnrechner.py 2005/01/13 13:01:58 16 +++ trunk/RCS/lohnrechner.py 2005/01/13 16:59:53 18 @@ -16,7 +16,7 @@ __version__ = "$Revision$" # $Source$ -_release_version = "0.1alpha" +_release_version = "0.%s alpha" % __version__[11:-2] import LST2005 from Tkinter import * @@ -27,6 +27,8 @@ LST2005.LStRechner2005.__init__(self) root.title("Lohnrechner 2005 - v%s" % _release_version) + root.resizable(NO, NO) + self.root = root Label(root, text="Lohn:").grid(row=0, sticky=E) self.lohn = Entry(root) @@ -78,8 +80,11 @@ self.kist = Entry(root) self.kist.grid(row=2, column=3, sticky=W) - self.calcbutton = Button(root, text="Berechnen", command=self.CalcOutput) - self.calcbutton.grid(row=3, columnspan=4) + buttons = Frame() + buttons.grid(row=3, columnspan=4) + Button(buttons, text="Quit", command=root.quit).pack(side=LEFT) + Button(buttons, text="Info", command=self.Info).pack(side=LEFT) + Button(buttons, text="Berechnen", command=self.CalcOutput).pack(side=LEFT) self.CalcOutput() @@ -112,6 +117,20 @@ self.kist.delete(0, END) self.kist.insert(0, "%.2f" % self.GetKirchensteuer()) + def Info(self): + infowin = Toplevel(self.root) + infowin.title("Info") + Label(infowin, text="Lohnrechner 2005 v%s" % _release_version, + font=("Times", 14, "bold italic")).grid(row=0, pady=20) + Label(infowin, text= + "Copyright (C) 2005 Intevation GmbH \n\n\ +Lohnrechner 2005 comes with ABSOLUTELY NO WARRANTY.\n\ +This is free software, and you are welcome to redistribute it\n\ +under the terms of the GNU General Public License.\n\ +For more information about these matters, see the file named COPYING.\n\n\ +Dieses Programm verwendet LST2005 %s" % LST2005._ModulVersion()).grid(row=1, padx=10) + Button(infowin, text="Ok", command=infowin.destroy).grid(row=2, pady=10) + if __name__ == "__main__": root = Tk()