summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--modules/gtk/gtk_mod.c18
1 files changed, 12 insertions, 6 deletions
diff --git a/modules/gtk/gtk_mod.c b/modules/gtk/gtk_mod.c
index a6d804e..d492b0e 100644
--- a/modules/gtk/gtk_mod.c
+++ b/modules/gtk/gtk_mod.c
@@ -276,8 +276,14 @@ static void notify_incoming_call(struct gtk_mod *mod,
id[sizeof id - 1] = '\0';
notification = g_notification_new("Incoming call");
+
+#if GLIB_CHECK_VERSION(2,4,2)
g_notification_set_priority(notification,
G_NOTIFICATION_PRIORITY_URGENT);
+#else
+ g_notification_set_urgent(notification, TRUE);
+#endif
+
target = g_variant_new_int64(GPOINTER_TO_INT(call));
g_notification_set_body(notification, call_peeruri(call));
g_notification_add_button_with_target_value(notification,
@@ -588,7 +594,7 @@ static void *gtk_thread(void *arg)
struct gtk_mod *mod = arg;
GtkMenuShell *app_menu;
GtkWidget *item;
- GError *error = NULL;
+ GError *err = NULL;
gdk_threads_init();
gtk_init(0, NULL);
@@ -597,12 +603,12 @@ static void *gtk_thread(void *arg)
mod->app = g_application_new ("com.creytiv.baresip",
G_APPLICATION_FLAGS_NONE);
- g_application_register (G_APPLICATION (mod->app), NULL, &error);
- if (error != NULL) {
+ g_application_register (G_APPLICATION (mod->app), NULL, &err);
+ if (err != NULL) {
warning ("Unable to register GApplication: %s",
- error->message);
- g_error_free (error);
- error = NULL;
+ err->message);
+ g_error_free (err);
+ err = NULL;
}
mod->status_icon = gtk_status_icon_new_from_icon_name("call-start");