origin: Add country-code property

And add a binding in CallsManager for the default origin
This commit is contained in:
Evangelos Ribeiro Tzaras
2021-03-25 20:25:09 +01:00
parent 69b170ecfe
commit 7d69d78b70
6 changed files with 59 additions and 1 deletions

View File

@@ -58,6 +58,7 @@ enum {
PROP_NAME,
PROP_CALLS,
PROP_COUNTRY_CODE,
PROP_LAST_PROP,
};
static GParamSpec *props[PROP_LAST_PROP];
@@ -198,6 +199,10 @@ get_property (GObject *object,
g_value_set_pointer (value, g_list_copy (self->calls));
break;
case PROP_COUNTRY_CODE:
g_value_set_string (value, NULL);
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
break;
@@ -252,6 +257,7 @@ calls_dummy_origin_class_init (CallsDummyOriginClass *klass)
IMPLEMENTS (PROP_NAME, "name");
IMPLEMENTS (PROP_CALLS, "calls");
IMPLEMENTS (PROP_COUNTRY_CODE, "country-code");
#undef IMPLEMENTS
}