After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 709555 - Fix run-time warnings and spinner interaction
Fix run-time warnings and spinner interaction
Status: RESOLVED FIXED
Product: gnome-control-center
Classification: Core
Component: Network
unspecified
Other All
: Normal normal
: ---
Assigned To: Control-Center Maintainers
Control-Center Maintainers
Depends on:
Blocks:
 
 
Reported: 2013-10-07 11:04 UTC by Bastien Nocera
Modified: 2013-10-07 16:37 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
network: Fix run-time warning (1.31 KB, patch)
2013-10-07 11:04 UTC, Bastien Nocera
committed Details | Review
network: Fix warnings when clicking Wi-Fi network (1.72 KB, patch)
2013-10-07 11:05 UTC, Bastien Nocera
committed Details | Review
network: Only start the spinner when we can stop it (1.63 KB, patch)
2013-10-07 11:05 UTC, Bastien Nocera
committed Details | Review
network: Merge two similar functions (2.60 KB, patch)
2013-10-07 14:59 UTC, Bastien Nocera
committed Details | Review

Description Bastien Nocera 2013-10-07 11:04:55 UTC
.
Comment 1 Bastien Nocera 2013-10-07 11:04:58 UTC
Created attachment 256614 [details] [review]
network: Fix run-time warning

The "edit" widget is only set as data when there is a connection
(in make_row) so only hide it when there is a connection.
Comment 2 Bastien Nocera 2013-10-07 11:05:04 UTC
Created attachment 256615 [details] [review]
network: Fix warnings when clicking Wi-Fi network

Those 2 widgets (the edit page, and the spinner) might be available
but we need to read about them from the correct widget, eg. the
GtkListBoxRow, not the GtkBox it contains.
Comment 3 Bastien Nocera 2013-10-07 11:05:09 UTC
Created attachment 256616 [details] [review]
network: Only start the spinner when we can stop it
Comment 4 Bastien Nocera 2013-10-07 11:46:34 UTC
Comment on attachment 256616 [details] [review]
network: Only start the spinner when we can stop it

The list box elements will be destroyed when the state changes, as refresh calls populate_ap_list, which empties and recreates the whole list.
Comment 5 Bastien Nocera 2013-10-07 11:48:21 UTC
Comment on attachment 256616 [details] [review]
network: Only start the spinner when we can stop it

Actually, for EAP networks, we'll just pop up a dialog, and cancelling it won't stop the spinner, so we still need that.
Comment 6 Rui Matos 2013-10-07 14:20:09 UTC
Review of attachment 256615 [details] [review]:

yes
Comment 7 Rui Matos 2013-10-07 14:20:56 UTC
Review of attachment 256614 [details] [review]:

Correct
Comment 8 Rui Matos 2013-10-07 14:35:54 UTC
Review of attachment 256616 [details] [review]:

Wouldn't it be better if connection_[add_]activate_cb() stopped the spinner when connection != NULL ?

Actually those two callbacks should be merged since the code is exactly the same modulo debug message which meh.
Comment 9 Bastien Nocera 2013-10-07 14:51:17 UTC
Attachment 256614 [details] pushed as ce8c2eb - network: Fix run-time warning
Attachment 256615 [details] pushed as 3c1b58a - network: Fix warnings when clicking Wi-Fi network
Comment 10 Bastien Nocera 2013-10-07 14:59:16 UTC
Created attachment 256634 [details] [review]
network: Merge two similar functions

Merge connection_add_activate_cb() and connection_activate_cb(),
the code is too similar.
Comment 11 Rui Matos 2013-10-07 15:26:20 UTC
Review of attachment 256634 [details] [review]:

Right.

But what about stopping the spinner here? Looks like the right place to me.
Comment 12 Rui Matos 2013-10-07 15:51:29 UTC
Review of attachment 256616 [details] [review]:

17:45 <@hadess> rtcm, we never get a signal back when connecting to an EAP network is cancelled
17:49 < rtcm> hadess: ah ok, I actually feared that would be the case :-/

So, ok
Comment 13 Bastien Nocera 2013-10-07 16:36:46 UTC
Comment on attachment 256616 [details] [review]
network: Only start the spinner when we can stop it

Attachment 256616 [details] pushed as 23bf28d - network: Only start the spinner when we can stop it
Comment 14 Bastien Nocera 2013-10-07 16:37:04 UTC
Attachment 256634 [details] pushed as 57b6436 - network: Merge two similar functions