mirror of
https://gitlab.gnome.org/GNOME/calls.git
synced 2024-11-04 15:41:19 +00:00
application: Notify when opening URI/files fails
This commit is contained in:
parent
dc6b675a14
commit
2568ea8179
1 changed files with 14 additions and 0 deletions
|
@ -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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue