mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2025-12-26 20:30:08 +01:00
cli: fix metered to string property
nmc_property_connection_get_metered() must return non-localized strings that can be parsed by nmc_property_connection_set_metered(). Fixes:f0aebfd746(cherry picked from commit5eba53cd53)
This commit is contained in:
parent
586bb2799f
commit
1615d8c975
1 changed files with 11 additions and 0 deletions
|
|
@ -2752,6 +2752,17 @@ nmc_property_connection_get_metered (NMSetting *setting, NmcPropertyGetType get_
|
|||
{
|
||||
NMSettingConnection *s_conn = NM_SETTING_CONNECTION (setting);
|
||||
|
||||
if (get_type == NMC_PROPERTY_GET_PARSABLE) {
|
||||
switch (nm_setting_connection_get_metered (s_conn)) {
|
||||
case NM_METERED_YES:
|
||||
return g_strdup ("yes");
|
||||
case NM_METERED_NO:
|
||||
return g_strdup ("no");
|
||||
case NM_METERED_UNKNOWN:
|
||||
default:
|
||||
return g_strdup ("unknown");
|
||||
}
|
||||
}
|
||||
switch (nm_setting_connection_get_metered (s_conn)) {
|
||||
case NM_METERED_YES:
|
||||
return g_strdup (_("yes"));
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue