diff options
| author | Michael Vogt <egon@top> | 2005-12-09 18:26:22 +0100 |
|---|---|---|
| committer | Michael Vogt <egon@top> | 2005-12-09 18:26:22 +0100 |
| commit | 13e6224748902fe35c9f7a5030b80387a376fe45 (patch) | |
| tree | c71095a7844ea35512d212dd2d733258a0a2fd9c | |
| parent | 467c5b4dc66942ba28cb8d29b82c21ed8bc98b74 (diff) | |
| download | python-apt-13e6224748902fe35c9f7a5030b80387a376fe45.tar.gz | |
* SoftwareProperties/SoftwareProperties.py, gnome-software-properties:
- switched to "--toplevel" here too (instead of --plug)
| -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() |
