forked from mirrors/linphone-iphone
Add debug message when opening chatroom link fails
This commit is contained in:
parent
2920354d29
commit
28db12870d
1 changed files with 9 additions and 2 deletions
11
gtk/chat.c
11
gtk/chat.c
|
|
@ -408,6 +408,7 @@ static GdkColor *_linphone_gtk_chatroom_get_link_color(GtkWidget *chatview) {
|
|||
|
||||
static void open_uri(const char *uri) {
|
||||
#ifdef __linux
|
||||
GError *error = NULL;
|
||||
gchar *argv[3] = {
|
||||
g_strdup("xdg-open"),
|
||||
g_strdup(uri),
|
||||
|
|
@ -421,11 +422,17 @@ static void open_uri(const char *uri) {
|
|||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL
|
||||
&error
|
||||
);
|
||||
|
||||
g_free(argv[0]);
|
||||
g_free(argv[1]);
|
||||
|
||||
if(error) {
|
||||
g_warning("Cannot open %s: %s", uri, error->message);
|
||||
g_error_free(error);
|
||||
}
|
||||
#else
|
||||
g_warning("Cannot open URIs from chat room on this platform");
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue