diff --git a/howdy-gtk/src/onboarding.py b/howdy-gtk/src/onboarding.py index e6a4aa7b..16f533d6 100644 --- a/howdy-gtk/src/onboarding.py +++ b/howdy-gtk/src/onboarding.py @@ -19,9 +19,6 @@ def __init__(self): # Make the class a GTK window gtk.Window.__init__(self) - self.connect("destroy", self.exit) - self.connect("delete_event", self.exit) - self.builder = gtk.Builder() self.builder.add_from_file(paths_factory.onboarding_wireframe_path()) self.builder.connect_signals(self) @@ -29,6 +26,9 @@ def __init__(self): self.window = self.builder.get_object("onboardingwindow") self.nextbutton = self.builder.get_object("nextbutton") + self.window.connect("destroy", self.exit) + self.window.connect("delete_event", self.exit) + self.slides = [ self.builder.get_object("slide0"), self.builder.get_object("slide1"), @@ -317,7 +317,7 @@ def show_error(self, error, secon=""): dialog.destroy() self.exit() - def exit(self, widget=None): + def exit(self, widget=None, context=None): """Cleanly exit""" gtk.main_quit() sys.exit(0) diff --git a/howdy-gtk/src/window.py b/howdy-gtk/src/window.py index f43e35de..4bc13ebd 100644 --- a/howdy-gtk/src/window.py +++ b/howdy-gtk/src/window.py @@ -23,9 +23,6 @@ def __init__(self): # Make the class a GTK window gtk.Window.__init__(self) - self.connect("destroy", self.exit) - self.connect("delete_event", self.exit) - self.builder = gtk.Builder() self.builder.add_from_file(paths_factory.main_window_wireframe_path()) self.builder.connect_signals(self) @@ -35,6 +32,9 @@ def __init__(self): self.modellistbox = self.builder.get_object("modellistbox") self.opencvimage = self.builder.get_object("opencvimage") + self.window.connect("destroy", self.exit) + self.window.connect("delete_event", self.exit) + # Init capture for video tab self.capture = None @@ -105,7 +105,7 @@ def on_about_link(self, label, uri): status, output = subprocess.getstatusoutput(["sudo -u " + user + " timeout 10 xdg-open " + uri]) return True - def exit(self, widget, context): + def exit(self, widget=None, context=None): """Cleanly exit""" if self.capture is not None: self.capture.release()