start_localhost deluged config to gtkui location...
While trying to hack on deluge (installed in a develop dir) and preserve my current deluge configuration, I noticed that deluged would use the configuration from my current deluge configuration. As I didn't want to risk messing up my current config or torrents, I looked around the deluge and found that, when deluge is started in classic_mode, the daemon is started and the config location is the default one (even if a gtkui config location is specified). Therefore, the attached diff feeds the gtkui config location to the daemon if the daemon is started up in classic_mode. You will notice that the start_localhost method in connectionmanager uses: 1) the long options, and 2) the winprocess call isn't changed. The first because the short options weren't being correctly parsed in main (or my poor usage of python is so bad that I could only get the long options to work). The second was because I don't have a windows box to test changes to the winprocess call on.
The connectionmanager file diff also includes usage of the DEFAULT_CONFIG host if: (1) the host isn't specified, or (2) the port was hardcoded. The reason is that I hate to see strings hardcoded into code, and the DEFAULT_CONFIG is specified -- therefore, it should be used. I also think that the logic for the 'classic_mode' and 'autoconnect' (along with 'autoconnect_host_uri' and 'autostart_localhost') could lead to configuration problems for the users, but I'll have to look at the whole thing more in depth in order to see if the logic should be reworked.
BTW, I also had to hack the filtertree and tracker_icons files so that they didn't, as well, write to the default config location if that location wasn't specified at deluge startup.
deluged config concordance with gtkui in classic_mode