From 1cb8825ff0b864f2740dfa7f79765fe06b10e0b8 Mon Sep 17 00:00:00 2001 From: Akira Ohgaki <akiraohgaki@gmail.com> Date: Fri, 15 Jul 2016 09:58:10 +0900 Subject: [PATCH] Code cleanup --- src/xdgurl.py | 45 --------------------------------------------- 1 file changed, 45 deletions(-) diff --git a/src/xdgurl.py b/src/xdgurl.py index c397706..132887f 100644 --- a/src/xdgurl.py +++ b/src/xdgurl.py @@ -31,7 +31,6 @@ else: import tkMessageBox class XdgUrl: - """Core class of xdgurl""" def __init__(self, xdg_url=''): self.xdg_url = xdg_url @@ -310,43 +309,6 @@ class XdgUrl: else: raise Exception('Incorrect XDG-URL ' + self.xdg_url) -''' -class XdgUrlApp(Tkinter.Frame): - """Confirmation dialog for xdgurl""" - - def __init__(self, master=None, core=None): - Tkinter.Frame.__init__(self, master) - self.pack() - self.core = core - self.master.title('xdgurl') - self.master.geometry('300x120') - self.create_widget() - - def create_widget(self): - execute_text = 'Download' - if self.core.meta['command'] == 'install': - execute_text = 'Install' - - info_label = Tkinter.Label(self, text=execute_text + ': ' + self.core.meta['filename']) - info_label.pack(padx=10, pady=5, anchor=Tkinter.W) - - message_label = Tkinter.Label(self, text='Do you want to continue?') - message_label.pack(padx=10, pady=5, anchor=Tkinter.W) - - execute_button = Tkinter.Button(self, text=execute_text, command=self.execute) - execute_button.pack(padx=5, pady=10, side=Tkinter.RIGHT) - - quit_button = Tkinter.Button(self, text='Cancel', command=self.quit) - quit_button.pack(padx=5, pady=10, side=Tkinter.RIGHT) - - def execute(self): - self.core.execute() - sys.exit() - - def quit(self): - sys.exit() -''' - def main(): program = 'xdgurl' version = '1.0.0' @@ -365,13 +327,6 @@ def main(): args = parser.parse_args() if args.xdg_url: - """ - core = XdgUrl(args.xdg_url) - window = Tkinter.Tk() - app = XdgUrlApp(window, core) - app.mainloop() - """ - core = XdgUrl(args.xdg_url) if sys.version_info.major >= 3: window = tkinter.Tk() -- GitLab