"Insecure connection" pops up frequently when network starts slowly
Bug description
when i'm connecting in a high-loss network, or (easier to reproduce) start the connecting process before the network is fully available ("hey, why am i showing offline? [clicks 'available']. oh, it's because my wifi is off. [enables wifi]."), the "insecure connection" dialog pops up frequently -- but i never want to connect insecurely.
Steps to reproduce
it might be required to have more than one network device available and connected (eg. a virtual machine interface) to keep gajim from recognizing network-manager's offline state. then, disable wifi, start a reconnection attempt in gajim, and enable wifi after some seconds. you might need to try a few times.
Ways around this
i see two approaches that would mitigate the issue, both of which might be a good idea to do, but any of them will be sufficient:
-
offer a "never use unencrypted connections" option in the account settings. that could be settable also in the insecure connection dialog by checking the "do not ask me again" and hitting cancel, although "cancel" might need to be reworded then to satisfy hig requirements of cancel never doing anything.
-
only offer using the unencrypted connection when it has (in this sequence) been discovered as available for connecting, and successive attempts at achieving an encrypted connection have failed.
Software versions
OS version: debian sid