diff options
| -rw-r--r-- | SoftwareProperties/SoftwareProperties.py | 12 | ||||
| -rw-r--r-- | gnome-software-properties | 15 |
2 files changed, 13 insertions, 14 deletions
diff --git a/SoftwareProperties/SoftwareProperties.py b/SoftwareProperties/SoftwareProperties.py index 60a2ecdd..14c0873e 100644 --- a/SoftwareProperties/SoftwareProperties.py +++ b/SoftwareProperties/SoftwareProperties.py @@ -68,12 +68,12 @@ class SoftwareProperties(SimpleGladeApp): self.window_main.hide() # If externally called, reparent to external application. - if (options.socket != None): - plug = gtk.Plug(long(options.socket)) - self.vbox1.reparent(plug) - plug.show_all() - else: - self.window_main.show() + if options.toplevel != None: + # don't show the add-cdrom button for now + # FIXME: on the long run interface with apt-pkg/cdrom.h + b = self.button_add_cdrom.hide() + toplevel = gtk.gdk.window_foreign_new(int(options.toplevel)) + self.window_main.window.set_transient_for(toplevel) self.init_sourceslist() self.reload_sourceslist() diff --git a/gnome-software-properties b/gnome-software-properties index 2bc04755..b39a860a 100644 --- a/gnome-software-properties +++ b/gnome-software-properties @@ -48,12 +48,11 @@ if __name__ == "__main__": dest="no_update", default=False, help="No update on repository change (usefull if called "\ "from a external program).") - - parser.add_option ("-p", "--plug", - action="store", type="string", dest="socket", - help="Set socket-id to embedd into parent (if used a "\ - "embedded control") - + parser.add_option("-t", "--toplevel", + action="store", type="string", dest="toplevel", + help="Set x-window-id of the toplevel parent for the "\ + "dialog (usefull for embedding)") + (options, args) = parser.parse_args() # Check for root permissions @@ -72,7 +71,7 @@ if __name__ == "__main__": gtk.glade.bindtextdomain(localesApp, localesDir) gtk.glade.textdomain(localesApp) - #data_dir="/usr/share/update-manager/" - data_dir="/tmp/xxx/share/update-manager/" + data_dir="/usr/share/update-manager/" + #data_dir="/tmp/xxx/share/update-manager/" app = SoftwareProperties.SoftwareProperties(data_dir,options) app.run() |
