diff options
author | Gary Kramlich <grim@reaperworld.com> | 2020-08-10 19:59:56 -0500 |
---|---|---|
committer | Gary Kramlich <grim@reaperworld.com> | 2020-08-10 19:59:56 -0500 |
commit | 943018e236b4e910c9942d3cca3ccd19d73005bc (patch) | |
tree | d6021c75136670adb785ae29442ae9ed2cdc5a7a /libpurple/accounts.c | |
parent | 2f5ab4b1ff6fa43f9c1d4454cf2100a83fed817b (diff) | |
download | pidgin-943018e236b4e910c9942d3cca3ccd19d73005bc.tar.gz |
fix some issues that were identified while working on a flatpak build
Fix some issues that were discovered while working on a flatpak
Testing Done:
built a flatpak (that'll be a separate review request) and ran into some issues..
First was bonjour_ft wouldn't build, not sure how/why that isn't happening elsewhere.. but whatever..
Next was the network monitor stuff I moved us to way back in december of 2015 works, but under flatpak the network is initially unavailable but then becomes available. A bunch of our code was __only__ checking network availability at startup and then not listening for changes later. This code is really gross right now, but a lot of it is going to need some major refactoring where as this effort was just to get this going right now.
Reviewed at https://reviews.imfreedom.org/r/66/
Diffstat (limited to 'libpurple/accounts.c')
-rw-r--r-- | libpurple/accounts.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/libpurple/accounts.c b/libpurple/accounts.c index 7c9344e3a2..7bbf7f5066 100644 --- a/libpurple/accounts.c +++ b/libpurple/accounts.c @@ -36,6 +36,15 @@ static GList *accounts = NULL; static guint save_timer = 0; static gboolean accounts_loaded = FALSE; +static void +purple_accounts_network_changed_cb(GNetworkMonitor *m, gboolean available, + gpointer data) +{ + if(available) { + purple_accounts_restore_current_statuses(); + } +} + /********************************************************************* * Writing to disk * *********************************************************************/ @@ -986,6 +995,9 @@ purple_accounts_init(void) load_accounts(); + g_signal_connect(G_OBJECT(g_network_monitor_get_default()), + "network-changed", + purple_accounts_network_changed_cb, NULL); } void |