diff -urNad smart-0.42~/smart/interfaces/gtk/__init__.py smart-0.42/smart/interfaces/gtk/__init__.py --- smart-0.42~/smart/interfaces/gtk/__init__.py 2005-12-21 16:12:42.000000000 +0100 +++ smart-0.42/smart/interfaces/gtk/__init__.py 2006-07-27 12:45:26.000000000 +0200 @@ -23,6 +23,7 @@ from smart.interface import getImagePath from smart import * import os +import sys try: import pygtk @@ -35,13 +36,27 @@ traceback.print_exc() raise Error, _("System has no support for gtk python interface") +def splitted_error(): + print _("ERROR: The Smartpm package is splitted in two subpackages") + print _(" - smartpm-core: Core of the Smart Package Manager") + print _(" - smartpm: The GUI frontend") + print _("It seems that you tried to run the GUI frontend which is not installed yet") + print _("You need to install the smartpm package in order to use the GUI frontend") + sys.exit(1) + def create(ctrl, command=None, argv=None): if command: - from smart.interfaces.gtk.command import GtkCommandInterface - return GtkCommandInterface(ctrl) + try: + from smart.interfaces.gtk.command import GtkCommandInterface + return GtkCommandInterface(ctrl) + except ImportError: + splitted_error() else: - from smart.interfaces.gtk.interactive import GtkInteractiveInterface - return GtkInteractiveInterface(ctrl) + try: + from smart.interfaces.gtk.interactive import GtkInteractiveInterface + return GtkInteractiveInterface(ctrl) + except ImportError: + splitted_error() _pixbuf = {} @@ -62,3 +77,4 @@ r"automatically registered." warnings.filterwarnings("ignore", MESSAGE) +