|
|
|
@ -1,16 +1,18 @@ |
|
|
|
from tkinter import * |
|
|
|
from tkinter import * |
|
|
|
|
|
|
|
from tkinter.messagebox import showinfo |
|
|
|
from tkinter import filedialog, ttk |
|
|
|
from tkinter import filedialog, ttk |
|
|
|
from tkinter.ttk import * |
|
|
|
from tkinter.ttk import * |
|
|
|
import os |
|
|
|
import os |
|
|
|
from PIL import Image |
|
|
|
from PIL import Image |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
VERSIONSTRING = "1.0.2" |
|
|
|
|
|
|
|
|
|
|
|
class ProjectLiferFrame(Frame): |
|
|
|
class ProjectLiferFrame(Frame): |
|
|
|
files = list() |
|
|
|
files = list() |
|
|
|
|
|
|
|
|
|
|
|
def __init__(self, root): |
|
|
|
def __init__(self, root): |
|
|
|
|
|
|
|
|
|
|
|
ttk.Frame.__init__(self, root, padding=(5, 5, 5, 5)) |
|
|
|
ttk.Frame.__init__(self, root) |
|
|
|
|
|
|
|
|
|
|
|
# define buttonframe |
|
|
|
# define buttonframe |
|
|
|
self.buttonframe = Frame(self) |
|
|
|
self.buttonframe = Frame(self) |
|
|
|
@ -28,6 +30,8 @@ class ProjectLiferFrame(Frame): |
|
|
|
self.listbox.config(yscrollcommand=self.scrollbar.set) |
|
|
|
self.listbox.config(yscrollcommand=self.scrollbar.set) |
|
|
|
self.scrollbar.config(command=self.listbox.yview) |
|
|
|
self.scrollbar.config(command=self.listbox.yview) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
self.bottom_hbar = Separator(self,orient=HORIZONTAL) |
|
|
|
|
|
|
|
|
|
|
|
# define progressframe |
|
|
|
# define progressframe |
|
|
|
self.pframe = Frame(self) |
|
|
|
self.pframe = Frame(self) |
|
|
|
|
|
|
|
|
|
|
|
@ -51,9 +55,12 @@ class ProjectLiferFrame(Frame): |
|
|
|
self.listbox.grid(row=0, column=1, sticky=W + E + N + S, pady=5, padx=5) |
|
|
|
self.listbox.grid(row=0, column=1, sticky=W + E + N + S, pady=5, padx=5) |
|
|
|
self.scrollbar.grid(column=1, sticky=N + S) |
|
|
|
self.scrollbar.grid(column=1, sticky=N + S) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Horizontal Bar |
|
|
|
|
|
|
|
self.bottom_hbar.grid(row=1, columnspan=2, sticky=W + E) |
|
|
|
|
|
|
|
|
|
|
|
# layout progressbar and text |
|
|
|
# layout progressbar and text |
|
|
|
self.pframe.columnconfigure(1,weight=1) |
|
|
|
self.pframe.columnconfigure(1,weight=1) |
|
|
|
self.pframe.grid(row=1, column=0, columnspan=2, sticky=W+E+N+S, pady=5, padx=5) |
|
|
|
self.pframe.grid(row=2, column=0, columnspan=2, sticky=W+E+N+S, pady=5, padx=5) |
|
|
|
self.ptext.grid(row=0, column=0, sticky=W) |
|
|
|
self.ptext.grid(row=0, column=0, sticky=W) |
|
|
|
self.pbar.grid(row=0, column=1, sticky=W + E + N + S) |
|
|
|
self.pbar.grid(row=0, column=1, sticky=W + E + N + S) |
|
|
|
|
|
|
|
|
|
|
|
@ -66,7 +73,7 @@ class ProjectLiferFrame(Frame): |
|
|
|
self.columnconfigure(0, weight=0) |
|
|
|
self.columnconfigure(0, weight=0) |
|
|
|
self.columnconfigure(1, weight=1) |
|
|
|
self.columnconfigure(1, weight=1) |
|
|
|
self.rowconfigure(0, weight=1) |
|
|
|
self.rowconfigure(0, weight=1) |
|
|
|
self.rowconfigure(1, weight=0) |
|
|
|
#self.rowconfigure(1, weight=0) |
|
|
|
|
|
|
|
|
|
|
|
def combine_pictures(self): |
|
|
|
def combine_pictures(self): |
|
|
|
|
|
|
|
|
|
|
|
@ -145,12 +152,27 @@ class ProjectLiferFrame(Frame): |
|
|
|
def select_none(self): |
|
|
|
def select_none(self): |
|
|
|
self.listbox.selection_clear(0, END) |
|
|
|
self.listbox.selection_clear(0, END) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def about_popup(self): |
|
|
|
|
|
|
|
showinfo("Über", 'ProjectLifer \n Version {}'.format(VERSIONSTRING)) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if __name__ == '__main__': |
|
|
|
if __name__ == '__main__': |
|
|
|
root = Tk() |
|
|
|
root = Tk() |
|
|
|
root.columnconfigure(0, weight=1) |
|
|
|
root.columnconfigure(0, weight=1) |
|
|
|
root.rowconfigure(0, weight=1) |
|
|
|
root.rowconfigure(0, weight=1) |
|
|
|
root.minsize(700, 500) |
|
|
|
root.minsize(700, 500) |
|
|
|
root.title("ProjectLifer 1.0.2") |
|
|
|
root.title("ProjectLifer") |
|
|
|
ProjectLiferFrame(root).grid(row=0, column=0, sticky=(N, S, E, W)) |
|
|
|
main_frame = ProjectLiferFrame(root) |
|
|
|
|
|
|
|
main_frame.grid(row=0, column=0, sticky=(N, S, E, W)) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# create menu |
|
|
|
|
|
|
|
menubar = Menu(root) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
file_menu = Menu(menubar, tearoff=0) |
|
|
|
|
|
|
|
file_menu.add_command(label="Beenden", command=root.quit) |
|
|
|
|
|
|
|
menubar.add_cascade(label="Datei", menu=file_menu) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
menubar.add_command(label="Über", command=main_frame.about_popup) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
root.config(menu=menubar) |
|
|
|
root.mainloop() |
|
|
|
root.mainloop() |
|
|
|
|