From 5eb54636b84f6980ad695748385670f13c6950a9 Mon Sep 17 00:00:00 2001 From: necoro <> Date: Sat, 4 Aug 2007 19:57:47 +0000 Subject: added an uncaught exception dialog --- portato/gui/gtk/__init__.py | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'portato/gui/gtk/__init__.py') diff --git a/portato/gui/gtk/__init__.py b/portato/gui/gtk/__init__.py index 17d6299..22e5f76 100644 --- a/portato/gui/gtk/__init__.py +++ b/portato/gui/gtk/__init__.py @@ -14,14 +14,20 @@ import gtk from portato import plugin from portato.backend import system from windows import MainWindow, SearchWindow, EbuildWindow +from uncaughtException import register_ex_handler def run (): - m = MainWindow() - m.main() + try: + m = MainWindow() + register_ex_handler() + m.main() + except KeyboardInterrupt: + pass def show_ebuild (pkg): plugin.load_plugins("gtk") - + register_ex_handler() + def _show (pkg): gtk.main_quit() -- cgit v1.2.3-70-g09d2