1
0
mirror of https://github.com/ciromattia/kcc synced 2025-12-20 13:11:47 +00:00
Files
kcc/kcc/gui.py
Ciro Mattia Gonano 988a357555 Fixed an issue in OPF generation for device resolution (fixes #4)
Reworked options system (call with -h option to get the inline help) (fixes #3)
2013-01-10 13:03:13 +01:00

44 lines
1.4 KiB
Python

#!/usr/bin/env python
#
# Copyright (c) 2013 Ciro Mattia Gonano <ciromattia@gmail.com>
#
# Permission to use, copy, modify, and/or distribute this software for
# any purpose with or without fee is hereby granted, provided that the
# above copyright notice and this permission notice appear in all
# copies.
#
# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
# WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
# WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
# AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
# DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA
# OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
# TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
# PERFORMANCE OF THIS SOFTWARE.
from Tkinter import *
import tkFileDialog
class MainWindow(Frame):
def open_files(self):
self.files = tkFileDialog.askopenfilename()
def createWidgets(self):
self.QUIT = Button(self)
self.QUIT["text"] = "Quit"
self.QUIT["fg"] = "red"
self.QUIT["command"] = self.quit
self.QUIT.pack({"side": "right"})
self.OPENFILES = Button(self)
self.OPENFILES["text"] = "Open files",
self.OPENFILES["command"] = self.open_files
self.OPENFILES.pack({"side": "left"})
def __init__(self, master=None):
Frame.__init__(self, master)
self.pack()
self.createWidgets()