mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-01-20 04:28:10 +00:00
Avoid crash when using linphone/gtk with libnotify < 0.7.0
This commit is contained in:
parent
0cae72bf52
commit
9e87f9d217
2 changed files with 8 additions and 4 deletions
|
|
@ -330,7 +330,6 @@ if test "$gtk_ui" = "true" ; then
|
|||
AC_DEFINE([HAVE_NOTIFY1],[1],[NOTIFY1 support])
|
||||
esac
|
||||
else
|
||||
NotifyNotification *n;
|
||||
echo "Libnotify support is disabled."
|
||||
fi
|
||||
fi
|
||||
|
|
|
|||
11
gtk/main.c
11
gtk/main.c
|
|
@ -1228,14 +1228,19 @@ static bool_t notify_actions_supported() {
|
|||
}
|
||||
|
||||
static NotifyNotification* build_notification(const char *title, const char *body) {
|
||||
const char *icon_path = linphone_gtk_get_ui_config("icon", LINPHONE_ICON);
|
||||
GdkPixbuf *pbuf = create_pixbuf(icon_path);
|
||||
NotifyNotification *n = notify_notification_new(title, body, NULL
|
||||
#ifdef HAVE_NOTIFY1
|
||||
,NULL
|
||||
#endif
|
||||
);
|
||||
notify_notification_set_icon_from_pixbuf(n, pbuf);
|
||||
#ifndef HAVE_NOTIFY1
|
||||
{
|
||||
const char *icon_path = linphone_gtk_get_ui_config("icon", LINPHONE_ICON);
|
||||
GdkPixbuf *pbuf = create_pixbuf(icon_path);
|
||||
/*with notify1, this function makes the notification crash the app with obscure dbus glib critical errors*/
|
||||
notify_notification_set_icon_from_pixbuf(n, pbuf);
|
||||
}
|
||||
#endif
|
||||
return n;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue