Merge lp:~seb128/unity-control-center/nm1 into lp:unity-control-center

Proposed by Sebastien Bacher on 2015-09-15
Status: Merged
Approved by: Sebastien Bacher on 2015-09-15
Approved revision: 12829
Merged at revision: 12829
Proposed branch: lp:~seb128/unity-control-center/nm1
Merge into: lp:unity-control-center
Diff against target: 46 lines (+3/-15)
1 file modified
panels/network/cc-network-panel.c (+3/-15)
To merge this branch: bzr merge lp:~seb128/unity-control-center/nm1
Reviewer Review Type Date Requested Status
Mathieu Trudel-Lapierre 2015-09-15 Approve on 2015-09-15
Review via email: mp+271157@code.launchpad.net

Commit message

network: Also work with NM 1.0
Remove the NetworkManager version checking altogether. The code was made
to check for now very old versions of NetworkManager, and anything newer
than ancient should degrade gracefully if we support newer features.

https://bugzilla.gnome.org/show_bug.cgi?id=741661

Description of the change

network: Also work with NM 1.0
Remove the NetworkManager version checking altogether. The code was made
to check for now very old versions of NetworkManager, and anything newer
than ancient should degrade gracefully if we support newer features.

https://bugzilla.gnome.org/show_bug.cgi?id=741661

To post a comment you must log in.
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'panels/network/cc-network-panel.c'
2--- panels/network/cc-network-panel.c 2013-11-28 04:32:11 +0000
3+++ panels/network/cc-network-panel.c 2015-09-15 17:06:17 +0000
4@@ -928,30 +928,18 @@
5 panel_check_network_manager_version (CcNetworkPanel *panel)
6 {
7 const gchar *version;
8- gchar **split = NULL;
9- guint major = 0;
10- guint micro = 0;
11 guint minor = 0;
12 gboolean ret = TRUE;
13
14 /* parse running version */
15 version = nm_client_get_version (panel->priv->client);
16- if (version != NULL) {
17- split = g_strsplit (version, ".", -1);
18- major = atoi (split[0]);
19- minor = atoi (split[1]);
20- micro = atoi (split[2]);
21- }
22-
23- /* is it too new or old */
24- if (major > 0 || major > 9 || (minor <= 8 && micro < 992)) {
25+ if (version == NULL) {
26 ret = FALSE;
27
28 /* do modal dialog in idle so we don't block startup */
29 panel->priv->nm_warning_idle = g_idle_add ((GSourceFunc)display_version_warning_idle, panel);
30 }
31
32- g_strfreev (split);
33 return ret;
34 }
35
36@@ -1017,8 +1005,8 @@
37 {
38 gboolean ret;
39
40- /* is the user compiling against a new version, but running an
41- * old daemon version? */
42+ /* is the user compiling against a new version, but not running
43+ * the daemon? */
44 ret = panel_check_network_manager_version (panel);
45 if (ret) {
46 manager_running (panel->priv->client, NULL, panel);

Subscribers

People subscribed via source and target branches