=== modified file 'modules/misc/notify/notify.c' --- modules/misc/notify/notify.c 2008-11-28 09:56:50 +0000 +++ modules/misc/notify/notify.c 2009-02-23 14:02:19 +0000 @@ -277,6 +277,9 @@ { NotifyNotification * notification; GError *p_error = NULL; + gboolean supports_actions = FALSE; + GList *caps = NULL; + GList *c; /* Close previous notification if still active */ if( p_intf->p_sys->notification ) @@ -296,11 +299,27 @@ gdk_pixbuf_unref( pix ); } - /* Adds previous and next buttons in the notification */ - notify_notification_add_action( notification, "previous", _("Previous"), Prev, - (gpointer*) p_intf, NULL ); - notify_notification_add_action( notification, "next", _("Next"), Next, - (gpointer*) p_intf, NULL ); + /* Determine if the notification server can handle actions */ + caps = notify_get_server_caps(); + if( caps != NULL ) { + for( c = caps; c != NULL; c = c->next) { + if( strcmp( (char*)c->data, "actions") == 0 ) { + supports_actions = TRUE; + break; + } + } + + g_list_foreach( caps, (GFunc)g_free, NULL); + g_list_free( caps ); + } + + /* Adds previous and next buttons in the notification if actions are supported. */ + if( supports_actions ) { + notify_notification_add_action( notification, "previous", _("Previous"), Prev, + (gpointer*) p_intf, NULL ); + notify_notification_add_action( notification, "next", _("Next"), Next, + (gpointer*) p_intf, NULL ); + } notify_notification_show( notification, NULL);