mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2025-12-25 11:50:14 +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
This commit is contained in:
parent
94a393e9ed
commit
5eba53cd53
1 changed files with 11 additions and 0 deletions
|
|
@ -2699,6 +2699,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