On Mon, Feb 02, 2009 at 03:23:55PM +0100, Pablo Castellano wrote: > Youness Alaoui wrote: > > Hi, > > Thanks for the patch and for giving a detailed explanation > > of your changes... > > Hello again. > I have the patch ready :) > > > however, I see two problems : > > 1 - code duplication.. it would be better to have the code > > that checks for the system configs in config.tcl after we > > loadProfile... this way, the code will be there only one... > > Now the code is cleaner and there's a procedure to retrieve the proxy > data that is executed everytime you want to login if the option to use > system-wide proxy is checked. >
Ok, great.. now another little issue, I hope you don't mind changing your code again, hehe... I see you used connectiontype = system.. wouldn't it be better to have a checkbox "Use system settings" that would disable the manual config, and would fill in the info for us ? This way, you don't need to check for 'connectiontype' everywhere it is being used (for example, some plugins, like gnotify use the proxy connectiontype, etc..) So on load_config, you would see if config::getKey use_system_proxy, then you fetch the proxy settings, and replace the proxy_connectiontype, proxy_host, etc... This would also let the users see what settings amsn was able to fetch... However, we don't want someone to loose his settings (user/pass for example) if he mistakenly enables the system settings.. so it would be nice to store the manually configured ones in something like : ::config::setKey manual_proxy_settings [list $type $host $port $user $pass] and if the system_settings are disabled, and that variable contains a 5-element list, then overwrite the settings with it, then free it. The system settings should also be fetched when a user does SavePreferences.. sorry if you did it already, I don't remember seeing it (and I'm lazy to go look again at the diff :p) > > Also, make sure that the option for 'use system settings' > > would only be available when it is actually possible to > > check user settings (on mac, windows, do not show the > > option).. > > DONE. > > > also note that it might be confusing if someone has old > > settings for gnome, and is using KDE, and amsn takes gnome > > settings instead of his new KDE settings... maybe check for > > the $::env(DESKTOP) variable too... > > > > I have not found any way to guess the desktop manager that the user is > running. $::env(DESKTOP) is not set. Any other idea? > kakaroto% echo $DESKTOP Enlightenment-0.17.0 I have no idea apart from that.. desktop-integration plugin does some stuff to detect which desktop you are using (basically checks for available commands, and if gnome and kde commands are available, lists processes and checks how many kde process vs. gnome processes are launched...) but I'm not sure if that's the right thing to do... Maybe check a list in the preferences a list of methods to get the proxy settings and let the user choose which method ? (in case they use both gnome and kde, or xfce or enlightenment, etc.. and they have their proxy settings stored in one desktop settings, but are using another one...) > > Thanks again for the contribution! > > > > KaKaRoTo > > > > I think this would be a good feature to have in 0.98. > What do you think? > Sure, I agree, and I'll make sure it goes in 0.98 :) I'll add it to the TODO mails... :) Thanks for your work, and I hope you can fix the little things I just said. KaKaRoTo > -- > Regards, Pablo. > > > > > > On Tue, Dec 23, 2008 at 04:43:11PM +0100, Pablo Castellano wrote: > >> Hello again! > >> > >> Here I attach a patch to use the system proxy settings like Firefox or > >> Pidgin does. > >> > >> Actually it supports the environment variable "http_proxy" > >> (ex: $ export http_proxy=http://myproxy.com:81) > >> > >> and the proxy set in the gnome preferences: > >> (System -> Preferences -> Proxy) > >> > >> It has a lot of checks about gconf that I didn't know if it would be > >> better to remove to make the code more readable but finally I have left > >> them there. Remove them if you think it's better. > >> > >> Finally I couldn't test authentication but it should work so if someone > >> can confirm it, please do it! > >> > >> > >> ToDo: > >> * Translate the key "systemconnection" "Use system proxy settings" to > >> all of the languages except spanish and english. You can look into the > >> network preferences of firefox and use the same phrase. > >> * KDE, Xfce support... > >> * Testing authentication > >> * Test... > >> > >> > >> > >> I have been using it for two weeks and everything seems to work fine. > >> > >> -- > >> Regards, Pablo. > > ------------------------------------------------------------------------------ Create and Deploy Rich Internet Apps outside the browser with Adobe(R)AIR(TM) software. With Adobe AIR, Ajax developers can use existing skills and code to build responsive, highly engaging applications that combine the power of local resources and data with the reach of the web. Download the Adobe AIR SDK and Ajax docs to start building applications today-http://p.sf.net/sfu/adobe-com _______________________________________________ Amsn-devel mailing list Amsn-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/amsn-devel