GNOME Bugzilla – Bug 699275
VPN switch on/off button not updated dynamically
Last modified: 2013-05-15 13:33:07 UTC
When switching the VPN on/off from the shell, the control center does not update its state dynamically.
Created attachment 242871 [details] [review] network: update on/off switch button when vpn becomes active/inactive
Dan?
Comment on attachment 242871 [details] [review] network: update on/off switch button when vpn becomes active/inactive The general idea is correct. However, there were already a few places in net-vpn.c that scanned the active connections list looking for the VPN's connection, and they can be simplified to use priv->active_connection now, as long as you also call nm_active_connections_changed() at construct time to initialize it. >+ g_object_add_weak_pointer (G_OBJECT (conn), >+ (gpointer *) &vpn->priv->active_connection); Any reason you don't just take a ref on it?
Created attachment 244151 [details] [review] network: update on/off switch button when vpn becomes active/inactive Updated the patch. Removed the iteration through active-connections. Also disconnect so more signals in the finalize()
Review of attachment 244151 [details] [review]: ::: panels/network/net-vpn.c @@ +39,3 @@ { GtkBuilder *builder; + Whitespace change. @@ +527,3 @@ + vpn); + g_signal_handlers_disconnect_by_func (priv->connection, + connection_removed_cb, Those 3 signal disconnections should probably be in a separate bug fix commit, no?
Created attachment 244303 [details] [review] network: update on/off switch button when vpn becomes active/inactive
Review of attachment 244303 [details] [review]: Looks good.
Comment on attachment 244303 [details] [review] network: update on/off switch button when vpn becomes active/inactive Committed to 3.8 and master.