From 7bf6a5ad02334c30cfc46980dd5ba5987aab5942 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Tue, 13 Dec 2005 12:20:31 +0100 Subject: * made the options in SoftwareProperties optional, added "parent" --- SoftwareProperties/SoftwareProperties.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'SoftwareProperties') diff --git a/SoftwareProperties/SoftwareProperties.py b/SoftwareProperties/SoftwareProperties.py index baf42430..58f654e9 100644 --- a/SoftwareProperties/SoftwareProperties.py +++ b/SoftwareProperties/SoftwareProperties.py @@ -55,8 +55,11 @@ CONF_MAP = { class SoftwareProperties(SimpleGladeApp): - def __init__(self, datadir, options): + def __init__(self, datadir=None, options=None, parent=None): + # FIXME: some saner way is needed here + if datadir == None: + datadir = "/usr/share/update-manager/" self.datadir = datadir SimpleGladeApp.__init__(self, datadir+"glade/SoftwareProperties.glade", None, domain="update-manager") @@ -65,6 +68,9 @@ class SoftwareProperties(SimpleGladeApp): self.gnome_program = gnome.init("Software Properties", "0.41") self.gconfclient = gconf.client_get_default() + if parent: + self.window_main.set_transient_for(parent) + # If externally called, reparent to external application. if options and options.toplevel != None: toplevel = gtk.gdk.window_foreign_new(int(options.toplevel)) -- cgit v1.2.3