diff options
author | Alfred E. Heggestad <aeh@db.org> | 2015-07-18 19:45:41 +0200 |
---|---|---|
committer | Alfred E. Heggestad <aeh@db.org> | 2015-07-18 19:45:41 +0200 |
commit | 275548908f851d9d679d59b65fe08e58601a2211 (patch) | |
tree | 15a86dea19069b2807fb5ffbcb8b5e15c5875ca7 | |
parent | 2076043d899a575c524a9c7132226d4461836aaf (diff) | |
parent | 74c1c47d1504f54e019dbc7734abcc3327d40c7b (diff) |
Merge pull request #54 from clehner/openbsd-fixes
Attempt to fix OpenBSD 5.7 gtk module compile errors
-rw-r--r-- | modules/gtk/gtk_mod.c | 18 |
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"); |