=== modified file 'compile' --- compile 2008-12-07 22:42:33 +0000 +++ compile 2009-02-25 12:38:32 +0000 @@ -1,7 +1,7 @@ #! /bin/sh rm -f .error$$ ERROR=0 -export PATH=/home/remi/bin:/usr/local/bin:/usr/bin:/bin:/usr/bin/X11:/usr/games:/sbin:/usr/sbin:/usr/local/sbin:~/bin:/opt/intel_cc_80/bin:/usr/lib/j2se/1.4/bin LANG=C +export PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games LANG=C (make $@ 2>&1 || touch .error$$)| \ `sed -ne "s/^top_srcdir *= *//p" < Makefile`/extras/buildsystem/make.pl test -f .error$$ && ERROR=1 === 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-25 12:38:32 +0000 @@ -272,6 +272,35 @@ pl_Release( ((vlc_object_t*) p) ); } +static gboolean +can_support_actions () +{ + static gboolean supports_actions = FALSE; + static gboolean have_checked = FALSE; + + if( !have_checked ) { + GList *caps = NULL; + GList *c; + + have_checked = TRUE; + + 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 ); + } + + return supports_actions; +} + static int Notify( vlc_object_t *p_this, const char *psz_temp, GdkPixbuf *pix, intf_thread_t *p_intf ) { @@ -296,11 +325,13 @@ 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 ); + /* Adds previous and next buttons in the notification if actions are supported. */ + if( can_support_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);