#!/usr/bin/env python #lliurex-do: gnome panel widget for easily launch apps import gtk import pygtk import gnomeapplet import net.Lliurex.do import sys if __name__=="__main__": # this enables widget to run as a standalone application, so debugging is easier if len(sys.argv)>=2: if sys.argv[1]=="--run-in-window": print "running in standalone window" mainWindow = gtk.Window(gtk.WINDOW_TOPLEVEL) mainWindow.set_title("Ubuntu System Panel") mainWindow.connect("destroy", gtk.main_quit) applet = gnomeapplet.Applet() do = net.Lliurex.do.Do() do.factory(applet, None) applet.reparent(mainWindow) mainWindow.show_all() gtk.main() sys.exit() print "Starting factory" do = net.Lliurex.do.Do() gnomeapplet.bonobo_factory("OAFIID:Gnome_Panel_Lliurex_DO_Factory", gnomeapplet.Applet.__gtype__, "Lliurex r00lz", "1.0", do.factory)