[Bug 5374] Re: please add gconf key support to set the --minport argument
Christopher Taylor
ccmtaylor at gmail.com
Thu May 11 02:09:42 UTC 2006
I've fixed it. Here's a patch (sorry, I'm new to launchpad, as in just registered and haven't figured out how to attach files yet ;)
Oh and while I'm writing disclaimers, this is my first ever patch to a python/gnome app, but it looks alright and works for me...
--- 8< ---
diff -ur gnome-btdownload-0.0.22/src/gnome-btdownload gnome-btdownload-0.0.22-timrod/src/gnome-btdownload
--- gnome-btdownload-0.0.22/src/gnome-btdownload 2005-05-31 05:33:34.000000000 +0200
+++ gnome-btdownload-0.0.22-timrod/src/gnome-btdownload 2006-05-11 03:48:42.000000000 +0200
@@ -770,6 +775,12 @@
#self.gconf_client.notify_add('/apps/'+app_name+'/settings', self.on_gconf_settings_notify)
# Bt Setup
+ if not "--minport" in args:
+ minport = self.gconf_client.get_int('/apps/'+app_name+'/settings/min_port')
+ if minport > 0:
+ args.append("--minport")
+ args.append(minport)
+
bt_state_args = BtState.Args(args[1:])
if not bt_state_args.path_origin:
diff -ur gnome-btdownload-0.0.22/src/gnome-btdownload.schemas.in gnome-btdownload-0.0.22-timrod/src/gnome-btdownload.schemas.in
--- gnome-btdownload-0.0.22/src/gnome-btdownload.schemas.in 2005-05-30 00:06:12.000000000 +0200
+++ gnome-btdownload-0.0.22-timrod/src/gnome-btdownload.schemas.in 2006-05-11 03:51:04.000000000 +0200
@@ -66,5 +66,16 @@
<long>If true, display an error dialog as well as log an event whenever an error occurs; otherwise, just log an error</long>
</locale>
</schema>
+ <schema>
+ <key>/schemas/apps/gnome-btdownload/settings/min_port</key>
+ <applyto>/apps/gnome-btdownload/settings/min_port</applyto>
+ <owner>gnome-btdownload</owner>
+ <type>int</type>
+ <default>6881</default>
+ <locale name="C">
+ <short>First port to bind to</short>
+ <long>Specifies the minimum port gnome-btdownload should bind to. If it is in use, the port is increased.</long>
+ </locale>
+ </schema>
</schemalist>
</gconfschemafile>
** Attachment added: "adds min_port gconf option"
http://librarian.launchpad.net/2562332/gconf-min_port.patch
--
please add gconf key support to set the --minport argument
https://launchpad.net/bugs/5374
More information about the desktop-bugs
mailing list