[network-manager-applet] libnm-gtk: use new providers database constant



commit 3f5f9c2d38db363487b1dc9e2091e5a46d61168b
Author: Jan Tojnar <jtojnar gmail com>
Date:   Thu Aug 9 15:33:54 2018 +0200

    libnm-gtk: use new providers database constant
    
    https://gitlab.gnome.org/GNOME/network-manager-applet/merge_requests/18
    introduced a new constant providing more accurate path for Mobile Broadband
    provider info database. We should use it in libnm-gtk as well.
    
    This also prevents a cyclic dependency on NixOS.
    
    https://gitlab.gnome.org/GNOME/network-manager-applet/merge_requests/19

 meson.build                         | 2 +-
 src/libnm-gtk/nm-mobile-providers.c | 6 +-----
 2 files changed, 2 insertions(+), 6 deletions(-)
---
diff --git a/meson.build b/meson.build
index 8059b6c1..cfaa50fe 100644
--- a/meson.build
+++ b/meson.build
@@ -137,7 +137,7 @@ if enable_mobile_broadband_provider_info
   mobile_broadband_provider_info_dep = dependency('mobile-broadband-provider-info')
   config_h.set_quoted('MOBILE_BROADBAND_PROVIDER_INFO_DATABASE', 
mobile_broadband_provider_info_dep.get_pkgconfig_variable('database'))
 else
-  config_h.set_quoted('MOBILE_BROADBAND_PROVIDER_INFO_DATABASE', join_paths(nma_prefix, 'share', 
'mobile-broadband-provider-info', 'serviceproviders.xml'))
+  config_h.set_quoted('MOBILE_BROADBAND_PROVIDER_INFO_DATABASE', join_paths(nma_datadir, 
'mobile-broadband-provider-info', 'serviceproviders.xml'))
 endif
 
 gio_dep = dependency('gio-2.0', version: '>= 2.38')
diff --git a/src/libnm-gtk/nm-mobile-providers.c b/src/libnm-gtk/nm-mobile-providers.c
index 20611823..572e2956 100644
--- a/src/libnm-gtk/nm-mobile-providers.c
+++ b/src/libnm-gtk/nm-mobile-providers.c
@@ -30,10 +30,6 @@
 
 #include "nm-mobile-providers.h"
 
-#ifndef MOBILE_BROADBAND_PROVIDER_INFO
-#define MOBILE_BROADBAND_PROVIDER_INFO DATADIR"/mobile-broadband-provider-info/serviceproviders.xml"
-#endif
-
 #define ISO_3166_COUNTRY_CODES ISO_CODES_PREFIX"/share/xml/iso-codes/iso_3166.xml"
 #define ISO_CODES_LOCALESDIR ISO_CODES_PREFIX"/share/locale"
 
@@ -990,7 +986,7 @@ mobile_providers_parse_sync (const gchar *country_codes,
        if (!country_codes)
                country_codes = ISO_3166_COUNTRY_CODES;
        if (!service_providers)
-               service_providers = MOBILE_BROADBAND_PROVIDER_INFO;
+               service_providers = MOBILE_BROADBAND_PROVIDER_INFO_DATABASE;
 
        countries = read_country_codes (country_codes,
                                        cancellable,


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]