1
0
Fork 0
mirror of https://gitlab.gnome.org/GNOME/calls.git synced 2024-12-12 15:47:35 +00:00

application: Notify when opening URI/files fails

This commit is contained in:
Evangelos Ribeiro Tzaras 2021-01-12 18:24:12 +01:00
parent dc6b675a14
commit 2568ea8179

View file

@ -436,6 +436,12 @@ open_tel_uri (CallsApplication *self,
number = e_phone_number_from_string (uri, NULL, &error); number = e_phone_number_from_string (uri, NULL, &error);
if (!number) if (!number)
{ {
g_autofree gchar *msg =
g_strdup_printf (_("Tried dialing unparsable tel URI `%s'"), uri);
g_signal_emit_by_name (calls_manager_get_default (),
"error",
msg);
g_warning ("Ignoring unparsable tel URI `%s': %s", g_warning ("Ignoring unparsable tel URI `%s': %s",
uri, error->message); uri, error->message);
return; return;
@ -475,10 +481,18 @@ app_open (GApplication *application,
} }
else else
{ {
g_autofree gchar *msg = NULL;
uri = g_file_get_parse_name (files[i]); uri = g_file_get_parse_name (files[i]);
g_warning ("Don't know how to" g_warning ("Don't know how to"
" open file `%s', ignoring", " open file `%s', ignoring",
uri); uri);
msg = g_strdup_printf (_("Don't know how to open `%s'"), uri);
g_signal_emit_by_name (calls_manager_get_default (),
"error",
msg);
} }
} }
} }