[Xfce4-commits] [apps/parole] 02/03: Fix Repeat and Shuffle

noreply at xfce.org noreply at xfce.org
Mon Jun 9 01:51:09 CEST 2014


This is an automated email from the git hooks/post-receive script.

bluesabre pushed a commit to branch master
in repository apps/parole.

commit 988f465021b4db802f539e689cc59acdde8ac900
Author: Sean Davis <smd.seandavis at gmail.com>
Date:   Sun Jun 8 19:41:26 2014 -0400

    Fix Repeat and Shuffle
---
 src/misc/parole-provider-player.c    |  228 +++----
 src/misc/parole-provider-player.h    |   60 +-
 src/parole-medialist.c               |  690 +++++++++++----------
 src/parole-medialist.h               |   66 +-
 src/parole-player.c                  | 1099 +++++++++++++++++-----------------
 src/parole-player.h                  |   12 +-
 src/parole-plugin-player.c           |  136 ++---
 src/parole-plugins-manager.c         |   48 +-
 src/parole-utils.c                   |  186 +++---
 src/parole-utils.h                   |   12 +-
 src/plugins/notify/notify-provider.c |   64 +-
 src/plugins/tray/tray-provider.c     |  122 ++--
 12 files changed, 1372 insertions(+), 1351 deletions(-)

diff --git a/src/misc/parole-provider-player.c b/src/misc/parole-provider-player.c
index 097c052..168833e 100644
--- a/src/misc/parole-provider-player.c
+++ b/src/misc/parole-provider-player.c
@@ -56,7 +56,7 @@ parole_provider_player_get_type (void)
 
         g_type_interface_add_prerequisite (type, G_TYPE_OBJECT);
     }
-    
+
     return type;
 }
 
@@ -71,10 +71,10 @@ static void parole_provider_player_base_init (gpointer klass)
          * @player: the object which received the signal.
          * @stream: a #ParoleStream.
          * @state: the new state.
-         * 
+         *
          * Issued when the Parole state changed.
-         * 
-         * Since: 0.2 
+         *
+         * Since: 0.2
          **/
         g_signal_new   ("state-changed",
                         G_TYPE_FROM_INTERFACE (klass),
@@ -89,10 +89,10 @@ static void parole_provider_player_base_init (gpointer klass)
          * ParoleProviderPlayerIface::tag-message:
          * @player: the object which received the signal.
          * @stream: a #ParoleStream.
-         * 
+         *
          * Indicated that the stream tags were found and ready to be read.
-         * 
-         * Since: 0.2 
+         *
+         * Since: 0.2
          **/
         g_signal_new   ("tag-message",
                         G_TYPE_FROM_INTERFACE (klass),
@@ -101,14 +101,14 @@ static void parole_provider_player_base_init (gpointer klass)
                         NULL, NULL,
                         g_cclosure_marshal_VOID__OBJECT,
                         G_TYPE_NONE, 1, PAROLE_TYPE_STREAM);
-                        
+
         /**
          * ParoleProviderPlayerIface::seeked:
          * @player: the object which received the signal.
          * @value: the seeked position.
-         * 
+         *
          * Notifies when the stream has been manually advanced.
-         * 
+         *
          * Since: 0.6
          **/
         g_signal_new   ("seeked",
@@ -118,7 +118,7 @@ static void parole_provider_player_base_init (gpointer klass)
                         NULL, NULL,
                         g_cclosure_marshal_VOID__DOUBLE,
                         G_TYPE_NONE, 1, G_TYPE_DOUBLE);
-                  
+
         initialized = TRUE;
     }
 }
@@ -130,20 +130,20 @@ static void parole_provider_player_class_init (gpointer klass)
 /**
  * parole_provider_player_get_main_window:
  * @player: a #ParoleProviderPlayer
- * 
+ *
  * Ask the Player to get the Parole main window.
- * 
+ *
  * Returns: a #GtkWidget window.
- * 
- * 
+ *
+ *
  * Since: 0.2
  **/
 GtkWidget *parole_provider_player_get_main_window (ParoleProviderPlayer *player)
 {
     GtkWidget *window = NULL;
-    
+
     g_return_val_if_fail (PAROLE_IS_PROVIDER_PLAYER (player), NULL);
-    
+
     if ( PAROLE_PROVIDER_PLAYER_GET_INTERFACE (player)->get_main_window )
     {
         window  = (*PAROLE_PROVIDER_PLAYER_GET_INTERFACE (player)->get_main_window) (player);
@@ -157,71 +157,71 @@ GtkWidget *parole_provider_player_get_main_window (ParoleProviderPlayer *player)
  * @widget: a #GtkWidget.
  * @title: title
  * @container: a #ParolePluginContainer.
- * 
- * Ask the player to pack a widget in the playlist notebook if PAROLE_PLUGIN_CONTAINER_PLAYLIST 
+ *
+ * Ask the player to pack a widget in the playlist notebook if PAROLE_PLUGIN_CONTAINER_PLAYLIST
  * is specified or in the main window notebook if PAROLE_PLUGIN_CONTAINER_MAIN_VIEW is specified.
- * 
+ *
  * This function can be called once, the Player is responsible on removing the widget in
  * case the plugin was unloaded.
- * 
- * 
+ *
+ *
  * Since: 0.2
- **/ 
-void parole_provider_player_pack (ParoleProviderPlayer *player, GtkWidget *widget, 
+ **/
+void parole_provider_player_pack (ParoleProviderPlayer *player, GtkWidget *widget,
                   const gchar *title, ParolePluginContainer container)
 {
     g_return_if_fail (PAROLE_IS_PROVIDER_PLAYER (player));
-    
+
     if ( PAROLE_PROVIDER_PLAYER_GET_INTERFACE (player)->pack )
     {
         (*PAROLE_PROVIDER_PLAYER_GET_INTERFACE (player)->pack) (player, widget, title, container);
     }
 }
-        
+
 /**
  * parole_provider_player_get_state:
  * @player: a #ParoleProviderPlayer
- * 
+ *
  * Get the current state of the player.
- * 
+ *
  * Returns: a #ParoleState.
- * 
- * 
+ *
+ *
  * Since: 0.2
  **/
 ParoleState parole_provider_player_get_state (ParoleProviderPlayer *player)
 {
     ParoleState state = PAROLE_STATE_STOPPED;
-    
+
     g_return_val_if_fail (PAROLE_IS_PROVIDER_PLAYER (player), PAROLE_STATE_STOPPED);
-    
+
     if ( PAROLE_PROVIDER_PLAYER_GET_INTERFACE (player)->get_state )
     {
         state = (*PAROLE_PROVIDER_PLAYER_GET_INTERFACE (player)->get_state) (player);
     }
-    
+
     return state;
 }
 
 /**
  * parole_provider_player_get_stream:
  * @player: a #ParoleProviderPlayer
- * 
+ *
  * Get the #ParoleStream object.
- * 
+ *
  * Returns: the #ParoleStream object.
- * 
+ *
  * Since: 0.2
  **/
 const ParoleStream *parole_provider_player_get_stream   (ParoleProviderPlayer *player)
 {
     g_return_val_if_fail (PAROLE_IS_PROVIDER_PLAYER (player), NULL);
-    
+
     if ( PAROLE_PROVIDER_PLAYER_GET_INTERFACE (player)->get_stream )
     {
         return (*PAROLE_PROVIDER_PLAYER_GET_INTERFACE (player)->get_stream) (player);
     }
-    
+
     return NULL;
 }
 
@@ -229,23 +229,23 @@ const ParoleStream *parole_provider_player_get_stream   (ParoleProviderPlayer *p
  * parole_provider_player_play_uri:
  * @player: a #ParoleProviderPlayer
  * @uri: uri
- * 
+ *
  * Issue a play command on the backend for the given uri, note this function
  * can be called only of the Parole current state is PAROLE_STATE_STOPPED.
- * 
- * Returning TRUE doesn't mean that the funtion succeeded to change the state of the player, 
+ *
+ * Returning TRUE doesn't mean that the funtion succeeded to change the state of the player,
  * the state change is indicated asynchronously by #ParoleProviderPlayerIface::state-changed signal.
- * 
+ *
  * Returns: TRUE if the command is processed, FALSE otherwise.
- * 
+ *
  * Since: 0.2
  **/
 gboolean parole_provider_player_play_uri (ParoleProviderPlayer *player, const gchar *uri)
 {
     gboolean ret = FALSE;
-     
+
     g_return_val_if_fail (PAROLE_IS_PROVIDER_PLAYER (player), FALSE);
-    
+
     if ( PAROLE_PROVIDER_PLAYER_GET_INTERFACE (player)->play_uri )
     {
         ret = (*PAROLE_PROVIDER_PLAYER_GET_INTERFACE (player)->play_uri) (player, uri);
@@ -257,29 +257,29 @@ gboolean parole_provider_player_play_uri (ParoleProviderPlayer *player, const gc
 /**
  * parole_provider_player_pause:
  * @player: a #ParoleProviderPlayer
- * 
+ *
  * Issue a pause command to the backend, this function can be called when the state of the player
  * is PAROLE_STATE_PLAYING.
- * 
- * Returning TRUE doesn't mean that the funtion succeeded to change the state of the player, 
+ *
+ * Returning TRUE doesn't mean that the funtion succeeded to change the state of the player,
  * the state change is indicated asynchronously by #ParoleProviderPlayerIface::state-changed signal.
- * 
+ *
  * Returns: TRUE if the command is processed, FALSE otherwise.
- * 
- * 
+ *
+ *
  * Since: 0.2
  **/
 gboolean parole_provider_player_pause (ParoleProviderPlayer *player)
 {
     gboolean ret = FALSE;
-    
+
     g_return_val_if_fail (PAROLE_IS_PROVIDER_PLAYER (player), FALSE);
-    
+
     if ( PAROLE_PROVIDER_PLAYER_GET_INTERFACE (player)->pause )
     {
         ret = (*PAROLE_PROVIDER_PLAYER_GET_INTERFACE (player)->pause) (player);
     }
-    
+
     return ret;
 }
 
@@ -287,30 +287,30 @@ gboolean parole_provider_player_pause (ParoleProviderPlayer *player)
 /**
  * parole_provider_player_resume:
  * @player: a #ParoleProviderPlayer
- * 
- * 
+ *
+ *
  * Issue a resume command to the player, this function can be called when
  * the current state of the player is PAROLE_STATE_PAUSED.
- * 
- * Returning TRUE doesn't mean that the funtion succeeded to change the state of the player, 
+ *
+ * Returning TRUE doesn't mean that the funtion succeeded to change the state of the player,
  * the state change is indicated asynchronously by #ParoleProviderPlayerIface::state-changed signal.
- * 
+ *
  * Returns: TRUE if the command is processed, FALSE otherwise.
- * 
- * 
+ *
+ *
  * Since: 0.2
  **/
 gboolean parole_provider_player_resume (ParoleProviderPlayer *player)
 {
     gboolean ret = FALSE;
-    
+
     g_return_val_if_fail (PAROLE_IS_PROVIDER_PLAYER (player), FALSE);
-    
+
     if ( PAROLE_PROVIDER_PLAYER_GET_INTERFACE (player)->resume )
     {
         ret = (*PAROLE_PROVIDER_PLAYER_GET_INTERFACE (player)->resume) (player);
     }
-    
+
     return ret;
 }
 
@@ -318,27 +318,27 @@ gboolean parole_provider_player_resume (ParoleProviderPlayer *player)
 /**
  * parole_provider_player_stop:
  * @player: a #ParoleProviderPlayer
- * 
+ *
  * Issue a stop command to the player.
- * 
- * Returning TRUE doesn't mean that the funtion succeeded to change the state of the player, 
+ *
+ * Returning TRUE doesn't mean that the funtion succeeded to change the state of the player,
  * the state change is indicated asynchronously by #ParoleProviderPlayerIface::state-changed signal.
- * 
+ *
  * Returns: TRUE if the command is processed, FALSE otherwise.
- * 
+ *
  * Since: 0.2
  **/
 gboolean parole_provider_player_stop (ParoleProviderPlayer *player)
 {
     gboolean ret = FALSE;
-    
+
     g_return_val_if_fail (PAROLE_IS_PROVIDER_PLAYER (player), FALSE);
-    
+
     if ( PAROLE_PROVIDER_PLAYER_GET_INTERFACE (player)->stop )
     {
         ret = (*PAROLE_PROVIDER_PLAYER_GET_INTERFACE (player)->stop) (player);
     }
-    
+
     return ret;
 }
 
@@ -346,24 +346,24 @@ gboolean parole_provider_player_stop (ParoleProviderPlayer *player)
 /**
  * parole_provider_player_play_previous:
  * @player: a #ParoleProviderPlayer
- * 
+ *
  * Issue a play previous command to the player.
- * 
+ *
  * Returns: TRUE if the command is processed, FALSE otherwise.
- * 
+ *
  * Since: 0.6
  **/
 gboolean parole_provider_player_play_previous (ParoleProviderPlayer *player)
 {
     gboolean ret = FALSE;
-    
+
     g_return_val_if_fail (PAROLE_IS_PROVIDER_PLAYER (player), FALSE);
-    
+
     if ( PAROLE_PROVIDER_PLAYER_GET_INTERFACE (player)->play_previous )
     {
         ret = (*PAROLE_PROVIDER_PLAYER_GET_INTERFACE (player)->play_previous) (player);
     }
-    
+
     return ret;
 }
 
@@ -371,24 +371,24 @@ gboolean parole_provider_player_play_previous (ParoleProviderPlayer *player)
 /**
  * parole_provider_player_play_next:
  * @player: a #ParoleProviderPlayer
- * 
+ *
  * Issue a play next command to the player.
- * 
+ *
  * Returns: TRUE if the command is processed, FALSE otherwise.
- * 
+ *
  * Since: 0.6
  **/
 gboolean parole_provider_player_play_next (ParoleProviderPlayer *player)
 {
     gboolean ret = FALSE;
-    
+
     g_return_val_if_fail (PAROLE_IS_PROVIDER_PLAYER (player), FALSE);
-    
+
     if ( PAROLE_PROVIDER_PLAYER_GET_INTERFACE (player)->play_next )
     {
         ret = (*PAROLE_PROVIDER_PLAYER_GET_INTERFACE (player)->play_next) (player);
     }
-    
+
     return ret;
 }
 
@@ -397,48 +397,48 @@ gboolean parole_provider_player_play_next (ParoleProviderPlayer *player)
  * parole_provider_player_seek:
  * @player: a #ParoleProviderPlayer
  * @pos: position to seek.
- * 
- * 
+ *
+ *
  * Issue a seek command.
- * 
+ *
  * Returns: TRUE if the seek command succeeded, FALSE otherwise.
- * 
- * 
+ *
+ *
  * Since: 0.2
  **/
 gboolean parole_provider_player_seek (ParoleProviderPlayer *player, gdouble pos)
 {
     gboolean ret = FALSE;
-    
+
     g_return_val_if_fail (PAROLE_IS_PROVIDER_PLAYER (player), FALSE);
-    
+
     if ( PAROLE_PROVIDER_PLAYER_GET_INTERFACE (player)->seek )
     {
         ret = (*PAROLE_PROVIDER_PLAYER_GET_INTERFACE (player)->seek) (player, pos);
     }
-    
+
     return ret;
 }
 
 /**
  * parole_provider_player_get_stream_position:
  * @player: a #ParoleProviderPlayer
- * 
+ *
  * Get stream position (microseconds) for Parole.
  *
  * Returns: a #gdouble containing the current stream position in microseconds.
- * 
+ *
  * Since: 0.6
  **/
 gdouble parole_provider_player_get_stream_position(ParoleProviderPlayer *player)
 {
     g_return_val_if_fail (PAROLE_IS_PROVIDER_PLAYER (player), 0);
-    
+
     if ( PAROLE_PROVIDER_PLAYER_GET_INTERFACE (player)->get_stream_position )
     {
         return (*PAROLE_PROVIDER_PLAYER_GET_INTERFACE (player)->get_stream_position) (player);
     }
-    
+
     return FALSE;
 }
 
@@ -446,15 +446,15 @@ gdouble parole_provider_player_get_stream_position(ParoleProviderPlayer *player)
 /**
  * parole_provider_player_open_media_chooser:
  * @player: a #ParoleProviderPlayer
- * 
+ *
  * Ask Parole to open its media chooser dialog.
- * 
+ *
  * Since: 0.2
  **/
 void parole_provider_player_open_media_chooser (ParoleProviderPlayer *player)
 {
     g_return_if_fail (PAROLE_IS_PROVIDER_PLAYER (player));
-    
+
     if ( PAROLE_PROVIDER_PLAYER_GET_INTERFACE (player)->open_media_chooser )
     {
         (*PAROLE_PROVIDER_PLAYER_GET_INTERFACE (player)->open_media_chooser) (player);
@@ -465,47 +465,47 @@ void parole_provider_player_open_media_chooser (ParoleProviderPlayer *player)
  * parole_provider_player_get_action:
  * @player: a #ParoleProviderPlayer
  * @action: the #ParolePlayerAction to retrieve
- * 
+ *
  * Get GtkAction from Parole.
- * 
+ *
  * Returns: the requested #GtkAction.
- * 
- * 
+ *
+ *
  * Since: 0.6
  **/
 GSimpleAction *parole_provider_player_get_action(ParoleProviderPlayer *player, ParolePlayerAction action)
 {
     GSimpleAction *ret = NULL;;
-    
+
     g_return_val_if_fail (PAROLE_IS_PROVIDER_PLAYER (player), NULL);
-    
+
     if ( PAROLE_PROVIDER_PLAYER_GET_INTERFACE (player)->get_action )
     {
         ret = (*PAROLE_PROVIDER_PLAYER_GET_INTERFACE (player)->get_action) (player, action);
     }
-    
+
     return ret;
 }
 
 /**
  * parole_provider_player_get_fullscreen:
  * @player: a #ParoleProviderPlayer
- * 
+ *
  * Get fullscreen status for Parole.
  *
  * Returns: TRUE if the player window is fullscreen, FALSE otherwise.
- * 
+ *
  * Since: 0.6
  **/
 gboolean parole_provider_player_get_fullscreen(ParoleProviderPlayer *player)
 {
     g_return_val_if_fail (PAROLE_IS_PROVIDER_PLAYER (player), NULL);
-    
+
     if ( PAROLE_PROVIDER_PLAYER_GET_INTERFACE (player)->get_fullscreen )
     {
         return (*PAROLE_PROVIDER_PLAYER_GET_INTERFACE (player)->get_fullscreen) (player);
     }
-    
+
     return FALSE;
 }
 
@@ -513,21 +513,21 @@ gboolean parole_provider_player_get_fullscreen(ParoleProviderPlayer *player)
  * parole_provider_player_set_fullscreen:
  * @player: a #ParoleProviderPlayer
  * @fullscreen: TRUE for fullscreen, FALSE for unfullscreen
- * 
+ *
  * Set fullscreen status for Parole.
  *
  * Returns: TRUE if the fullscreen command succeeded, FALSE otherwise.
- * 
+ *
  * Since: 0.6
  **/
 gboolean parole_provider_player_set_fullscreen(ParoleProviderPlayer *player, gboolean fullscreen)
 {
     g_return_val_if_fail (PAROLE_IS_PROVIDER_PLAYER (player), NULL);
-    
+
     if ( PAROLE_PROVIDER_PLAYER_GET_INTERFACE (player)->get_stream )
     {
         return (*PAROLE_PROVIDER_PLAYER_GET_INTERFACE (player)->set_fullscreen) (player, fullscreen);
     }
-    
+
     return FALSE;
 }
diff --git a/src/misc/parole-provider-player.h b/src/misc/parole-provider-player.h
index c32543b..f51d064 100644
--- a/src/misc/parole-provider-player.h
+++ b/src/misc/parole-provider-player.h
@@ -31,7 +31,7 @@
 #include "parole-stream.h"
 #include "parole-player.h"
 
-G_BEGIN_DECLS 
+G_BEGIN_DECLS
 
 #define PAROLE_TYPE_PROVIDER_PLAYER                 (parole_provider_player_get_type ())
 #define PAROLE_PROVIDER_PLAYER(o)                   (G_TYPE_CHECK_INSTANCE_CAST ((o), PAROLE_TYPE_PROVIDER_PLAYER, ParoleProviderPlayer))
@@ -49,57 +49,57 @@ typedef enum
 
 
 
-struct _ParoleProviderPlayerIface 
+struct _ParoleProviderPlayerIface
 {
     GTypeInterface __parent__;
-    
+
     /*< private >*/
     GtkWidget   *(*get_main_window)             (ParoleProviderPlayer *player);
-    
+
     void        (*pack)                         (ParoleProviderPlayer *player,
-                                                 GtkWidget *widget, 
+                                                 GtkWidget *widget,
                                                  const gchar *title,
                                                  ParolePluginContainer container);
-                             
+
     ParoleState (*get_state)                    (ParoleProviderPlayer *player);
-    
+
     const ParoleStream *(*get_stream)           (ParoleProviderPlayer *player);
-    
+
     gboolean     (*play_uri)                    (ParoleProviderPlayer *player,
                                                  const gchar *uri);
-                             
+
     gboolean     (*pause)                       (ParoleProviderPlayer *player);
-    
+
     gboolean     (*resume)                      (ParoleProviderPlayer *player);
-    
+
     gboolean     (*stop)                        (ParoleProviderPlayer *player);
-    
+
     gboolean     (*play_previous)               (ParoleProviderPlayer *player);
-    
+
     gboolean     (*play_next)                   (ParoleProviderPlayer *player);
-    
+
     gboolean     (*seek)                        (ParoleProviderPlayer *player,
                                                  gdouble pos);
-                                                 
+
     gdouble      (*get_stream_position)         (ParoleProviderPlayer *player);
-                                                 
+
     gboolean     (*get_fullscreen)              (ParoleProviderPlayer *player);
-    
+
     gboolean     (*set_fullscreen)              (ParoleProviderPlayer *player,
                                                  gboolean fullscreen);
-                             
+
     void         (*open_media_chooser)          (ParoleProviderPlayer *player);
-    
+
     GSimpleAction*   (*get_action)              (ParoleProviderPlayer *player,
                                                  ParolePlayerAction action);
-                             
+
     /*< signals >*/
     void     (*tag_message)                     (ParoleProviderPlayer *player,
                                                  const ParoleStream *stream);
-                                                 
+
     void     (*seeked)                          (ParoleProviderPlayer *player,
                                                  gdouble value);
-                             
+
     void     (*state_changed)                   (ParoleProviderPlayer *player,
                                                  const ParoleStream *stream,
                                                  ParoleState state);
@@ -108,17 +108,17 @@ struct _ParoleProviderPlayerIface
 
 GType        parole_provider_player_get_type    (void) G_GNUC_CONST;
 
-GtkWidget   
+GtkWidget
 *parole_provider_player_get_main_window         (ParoleProviderPlayer *player);
 
-void         parole_provider_player_pack        (ParoleProviderPlayer *player, 
-                                                 GtkWidget *widget, 
+void         parole_provider_player_pack        (ParoleProviderPlayer *player,
+                                                 GtkWidget *widget,
                                                  const gchar *title,
                                                  ParolePluginContainer container);
-                             
+
 ParoleState parole_provider_player_get_state    (ParoleProviderPlayer *player);
 
-const ParoleStream 
+const ParoleStream
 *parole_provider_player_get_stream              (ParoleProviderPlayer *player);
 
 gboolean    parole_provider_player_play_uri     (ParoleProviderPlayer *player,
@@ -136,17 +136,17 @@ gboolean    parole_provider_player_play_next    (ParoleProviderPlayer *player);
 
 gboolean    parole_provider_player_seek         (ParoleProviderPlayer *player,
                                                  gdouble pos);
-                                                 
+
 gdouble parole_provider_player_get_stream_position(ParoleProviderPlayer *player);
 
-void        
+void
 parole_provider_player_open_media_chooser       (ParoleProviderPlayer *player);
 
 GSimpleAction *parole_provider_player_get_action(ParoleProviderPlayer *player, ParolePlayerAction action);
 
 gboolean    parole_provider_player_get_fullscreen(ParoleProviderPlayer *player);
 
-gboolean    parole_provider_player_set_fullscreen(ParoleProviderPlayer *player, 
+gboolean    parole_provider_player_set_fullscreen(ParoleProviderPlayer *player,
                                                  gboolean fullscreen);
 
 G_END_DECLS
diff --git a/src/parole-medialist.c b/src/parole-medialist.c
index 9aa9fb9..2c1e147 100644
--- a/src/parole-medialist.c
+++ b/src/parole-medialist.c
@@ -91,42 +91,42 @@ ParoleMediaList *media_list = NULL;
 static void     parole_media_list_dbus_class_init   (ParoleMediaListClass *klass);
 static void     parole_media_list_dbus_init         (ParoleMediaList      *list);
 
-static GtkTreeRowReference * 
-parole_media_list_get_row_reference_from_iter       (ParoleMediaList *list, 
-                                                     GtkTreeIter *iter, 
+static GtkTreeRowReference *
+parole_media_list_get_row_reference_from_iter       (ParoleMediaList *list,
+                                                     GtkTreeIter *iter,
                                                      gboolean select_path);
 
-static void     parole_media_list_select_path       (ParoleMediaList *list, 
+static void     parole_media_list_select_path       (ParoleMediaList *list,
                                                      gboolean disc,
                                                      GtkTreePath *path);
 
 /*
  * Callbacks for GtkBuilder
  */
-void        parole_media_list_add_clicked_cb        (GtkButton *button, 
+void        parole_media_list_add_clicked_cb        (GtkButton *button,
                                                      ParoleMediaList *list);
-                             
-void        parole_media_list_remove_clicked_cb     (GtkButton *button, 
+
+void        parole_media_list_remove_clicked_cb     (GtkButton *button,
                                                      ParoleMediaList *list);
 
-void        parole_media_list_clear_clicked_cb      (GtkButton *button, 
+void        parole_media_list_clear_clicked_cb      (GtkButton *button,
                                                      ParoleMediaList *list);
-                                                     
+
 void        parole_media_list_move_up_clicked_cb    (GtkButton *button,
                                                      ParoleMediaList *list);
-                                                     
+
 void        parole_media_list_move_down_clicked_cb    (GtkButton *button,
                                                      ParoleMediaList *list);
 
-void        parole_media_list_row_activated_cb      (GtkTreeView *view, 
+void        parole_media_list_row_activated_cb      (GtkTreeView *view,
                                                      GtkTreePath *path,
                                                      GtkTreeViewColumn *col,
                                                      ParoleMediaList *list);
 
-gboolean    parole_media_list_button_release_event  (GtkWidget *widget, 
-                                                     GdkEventButton *ev, 
+gboolean    parole_media_list_button_release_event  (GtkWidget *widget,
+                                                     GdkEventButton *ev,
                                                      ParoleMediaList *list);
-                             
+
 void        parole_media_list_drag_data_received_cb (GtkWidget *widget,
                                                      GdkDragContext *drag_context,
                                                      gint x,
@@ -136,14 +136,14 @@ void        parole_media_list_drag_data_received_cb (GtkWidget *widget,
                                                      guint drag_time,
                                                      ParoleMediaList *list);
 
-gboolean    parole_media_list_key_press             (GtkWidget *widget, 
-                                                     GdkEventKey *ev, 
+gboolean    parole_media_list_key_press             (GtkWidget *widget,
+                                                     GdkEventKey *ev,
                                                      ParoleMediaList *list);
 
-void        
+void
 parole_media_list_format_cursor_changed_cb          (GtkTreeView *view,
                                                      ParolePlaylistSave *data);
-                            
+
 void        parole_media_list_save_playlist_cb      (GtkButton *button,
                                                      ParolePlaylistSave *data);
 
@@ -153,7 +153,7 @@ gboolean    parole_media_list_query_tooltip         (GtkWidget *widget,
                                                      gboolean keyboard_mode,
                                                      GtkTooltip *tooltip,
                                                      ParoleMediaList *list);
-                             
+
 /*
  * End of GtkBuilder callbacks
  */
@@ -169,17 +169,17 @@ struct ParoleMediaListPrivate
     GtkListStore        *store, *disc_store;
     GtkTreeSelection    *sel, *disc_sel;
     GtkTreeViewColumn   *col, *disc_col;
-    
+
     GtkWidget *playlist_controls;
-    
+
     GtkWidget *playlist_notebook;
 
     GtkWidget *remove_button;
     GtkWidget *clear_button;
-    
+
     GtkWidget *repeat_button;
     GtkWidget *shuffle_button;
-    
+
     char *history[3];
 };
 
@@ -234,9 +234,9 @@ parole_media_list_set_playlist_count (ParoleMediaList *list, gint n_items)
             gtk_tree_view_column_set_title (list->priv->disc_col, g_strdup_printf(_("Playlist (%i chapters)"), n_items));
         }
     }
-    
+
     /*
-     * Will emit the signal media_cursor_changed with FALSE because there is no any 
+     * Will emit the signal media_cursor_changed with FALSE because there is no any
      * row remaining, so the player can disable click on the play button.
      */
     g_signal_emit (G_OBJECT (list), signals [MEDIA_CURSOR_CHANGED], 0, n_items != 0);
@@ -262,7 +262,7 @@ parole_media_list_get_playlist_count (ParoleMediaList *list)
  * @disc: TRUE if added to disc playlist.
  * @emit: TRUE to emit a play signal.
  * @select_row: TRUE to select the added row
- * 
+ *
  * All the media items added to the media list view are added by
  * this function, setting emit to TRUE will cause the player to
  * start playing the added file.
@@ -275,7 +275,7 @@ parole_media_list_add (ParoleMediaList *list, ParoleFile *file, gboolean disc, g
     GtkTreeRowReference *row;
     GtkTreeIter iter;
     gint nch;
-    
+
     /* Objects used for the remove-duplicates functionality. */
     gchar *filename;
     ParoleFile *row_file;
@@ -283,20 +283,20 @@ parole_media_list_add (ParoleMediaList *list, ParoleFile *file, gboolean disc, g
     g_object_get (G_OBJECT (list->priv->conf),
                   "remove-duplicated", &remove_duplicates,
                   NULL);
-    
+
     /* Set the list_store variable based on with store we're viewing. */
     if (disc)
         list_store = GTK_LIST_STORE (gtk_tree_view_get_model (GTK_TREE_VIEW (list->priv->disc_view)));
     else
         list_store = GTK_LIST_STORE (gtk_tree_view_get_model (GTK_TREE_VIEW (list->priv->view)));
-        
+
     /* Remove duplicates functionality. If the file being added is already in the
      * playlist, remove it from its current position in the playlist before
      * adding it again. */
     if (!disc && remove_duplicates && gtk_tree_model_iter_n_children (GTK_TREE_MODEL(list_store), NULL) != 0)
     {
         filename = g_strdup(parole_file_get_file_name(file));
-                
+
         /* Check the first row */
         gtk_tree_model_get_iter_first(GTK_TREE_MODEL(list_store), &iter);
         gtk_tree_model_get(GTK_TREE_MODEL(list_store), &iter, DATA_COL, &row_file, -1);
@@ -304,7 +304,7 @@ parole_media_list_add (ParoleMediaList *list, ParoleFile *file, gboolean disc, g
         {
             gtk_list_store_remove (GTK_LIST_STORE(list_store), &iter);
         }
-        
+
         /* Check subsequent rows */
         while (gtk_tree_model_iter_next(GTK_TREE_MODEL(list_store), &iter)) {
             gtk_tree_model_get(GTK_TREE_MODEL(list_store), &iter, DATA_COL, &row_file, -1);
@@ -313,20 +313,20 @@ parole_media_list_add (ParoleMediaList *list, ParoleFile *file, gboolean disc, g
                 gtk_list_store_remove (GTK_LIST_STORE(list_store), &iter);
             }
         }
-        
+
         g_object_unref(row_file);
     }
-    
+
     /* Add the file to the playlist */
     gtk_list_store_append (list_store, &iter);
-    gtk_list_store_set (list_store, 
-                        &iter, 
+    gtk_list_store_set (list_store,
+                        &iter,
                         NAME_COL, parole_file_get_display_name (file),
                         DATA_COL, file,
                         LENGTH_COL, parole_taglibc_get_media_length (file),
                         STATE_COL, PAROLE_MEDIA_STATE_NONE,
                         -1);
-    
+
     if ( emit || select_row )
     {
         path = gtk_tree_model_get_path (GTK_TREE_MODEL (list_store), &iter);
@@ -338,15 +338,15 @@ parole_media_list_add (ParoleMediaList *list, ParoleFile *file, gboolean disc, g
             g_signal_emit (G_OBJECT (list), signals [MEDIA_ACTIVATED], 0, row);
         gtk_tree_row_reference_free (row);
     }
-  
+
     /*
      * Unref it as the list store will have
      * a reference anyway.
      */
     g_object_unref (file);
-    
+
     /* Update the playlist count. */
-    nch = gtk_tree_model_iter_n_children (GTK_TREE_MODEL (list_store), NULL); 
+    nch = gtk_tree_model_iter_n_children (GTK_TREE_MODEL (list_store), NULL);
     parole_media_list_set_playlist_count(list, nch);
 }
 
@@ -356,7 +356,7 @@ parole_media_list_add (ParoleMediaList *list, ParoleFile *file, gboolean disc, g
  * @files: a #GSList contains a list of #ParoleFile
  * @disc: TRUE if files are opened to the disc playlist.
  * @emit: TRUE to emit a play signal.
- * 
+ *
  **/
 static void
 parole_media_list_files_open (ParoleMediaList *list, GSList *files, gboolean disc, gboolean emit)
@@ -365,17 +365,17 @@ parole_media_list_files_open (ParoleMediaList *list, GSList *files, gboolean dis
     gboolean replace;
     guint len;
     guint i;
-    
+
     g_object_get (G_OBJECT (list->priv->conf),
                   "replace-playlist", &replace,
                   NULL);
-    
+
     len = g_slist_length (files);
     TRACE ("Adding %i files", len);
-    
+
     if ( len > 1 && !disc )
         g_signal_emit (G_OBJECT (list), signals [SHOW_PLAYLIST], 0, TRUE);
-    
+
     if ( len != 0 )
     {
         if ( replace )
@@ -383,7 +383,7 @@ parole_media_list_files_open (ParoleMediaList *list, GSList *files, gboolean dis
         file = g_slist_nth_data (files, 0);
         parole_media_list_add (list, file, disc, emit, TRUE);
     }
-    
+
     for ( i = 1; i < len; i++)
     {
         file = g_slist_nth_data (files, i);
@@ -397,13 +397,13 @@ parole_media_list_add_cdda_tracks (ParoleMediaList *list, gint n_tracks)
     GSList *files = NULL;
     ParoleFile *file;
     int i;
-    
+
     for (i = 0; i < n_tracks; i++)
     {
         file = parole_file_new_cdda_track( i+1, g_strdup_printf( _("Track %i"), i+1) );
         files = g_slist_append(files, file);
     }
-    
+
     parole_media_list_files_open(list, files, FALSE, TRUE);
 }
 
@@ -413,29 +413,29 @@ parole_media_list_add_dvd_chapters (ParoleMediaList *list, gint n_chapters)
     GSList *files = NULL;
     ParoleFile *file;
     gint i;
-    
+
     for (i = 0; i < n_chapters; i++)
     {
         file = PAROLE_FILE(parole_file_new_dvd_chapter( i+1, g_strdup_printf( _("Chapter %i"), i+1) ));
         files = g_slist_append(files, file);
     }
-    
+
     //parole_media_list_clear_list (list);
     parole_media_list_files_open(list, files, TRUE, TRUE);
 }
 
 /* Callback to determine whether opened files should start playing immediately */
 static void
-parole_media_list_files_opened_cb (ParoleMediaChooser *chooser, 
-                   GSList *files, 
+parole_media_list_files_opened_cb (ParoleMediaChooser *chooser,
+                   GSList *files,
                    ParoleMediaList *list)
 {
     gboolean play;
-    
+
     g_object_get (G_OBJECT (list->priv->conf),
                   "play-opened-files", &play,
                   NULL);
-    
+
     parole_media_list_files_open (list, files, FALSE, play);
 }
 
@@ -443,7 +443,7 @@ void
 parole_media_list_open_uri (ParoleMediaList *list, const gchar *uri)
 {
     ParoleFile *file;
-    
+
     if ( parole_is_uri_disc (uri) )
     {
         g_signal_emit (G_OBJECT (list), signals [URI_OPENED], 0, uri);
@@ -462,8 +462,8 @@ parole_media_list_location_opened_cb (ParoleOpenLocation *obj, const gchar *loca
 }
 
 static void
-parole_media_list_iso_opened_cb (ParoleMediaChooser *chooser, 
-                   gchar *filename, 
+parole_media_list_iso_opened_cb (ParoleMediaChooser *chooser,
+                   gchar *filename,
                    ParoleMediaList *list)
 {
     gchar *uri;
@@ -475,14 +475,14 @@ static void
 parole_media_list_open_internal (ParoleMediaList *list)
 {
     ParoleMediaChooser *chooser;
-    
+
     TRACE ("start");
-    
+
     chooser = parole_media_chooser_open_local (gtk_widget_get_toplevel (GTK_WIDGET (list)));
-                           
+
     g_signal_connect (G_OBJECT (chooser), "media_files_opened",
                       G_CALLBACK (parole_media_list_files_opened_cb), list);
-                      
+
     g_signal_connect (G_OBJECT (chooser), "iso_opened",
                       G_CALLBACK (parole_media_list_iso_opened_cb), list);
 }
@@ -491,9 +491,9 @@ static void
 parole_media_list_open_location_internal (ParoleMediaList *list)
 {
     ParoleOpenLocation *location;
-    
+
     location = parole_open_location (gtk_widget_get_toplevel (GTK_WIDGET (list)));
-                           
+
     g_signal_connect (G_OBJECT (location), "location-opened",
                       G_CALLBACK (parole_media_list_location_opened_cb), list);
 }
@@ -501,12 +501,12 @@ parole_media_list_open_location_internal (ParoleMediaList *list)
 /**
  * parole_media_list_get_files:
  * @list: a #ParoleMediaList
- * 
+ *
  * Get a #GSList of all #ParoleFile media files currently displayed in the
  * media list view
- * 
+ *
  * Returns: a #GSList contains a list of #ParoleFile
- * 
+ *
  **/
 static GSList *
 parole_media_list_get_files (ParoleMediaList *list)
@@ -515,7 +515,7 @@ parole_media_list_get_files (ParoleMediaList *list)
     GtkTreeIter iter;
     gboolean valid;
     GSList *files_list = NULL;
-    
+
     for ( valid = gtk_tree_model_get_iter_first (GTK_TREE_MODEL (list->priv->store), &iter);
         valid;
         valid = gtk_tree_model_iter_next (GTK_TREE_MODEL (list->priv->store), &iter))
@@ -523,10 +523,10 @@ parole_media_list_get_files (ParoleMediaList *list)
         gtk_tree_model_get (GTK_TREE_MODEL (list->priv->store), &iter,
                             DATA_COL, &file,
                             -1);
-        
+
         files_list = g_slist_append (files_list, file);
     }
-    
+
     return files_list;
 }
 
@@ -545,15 +545,15 @@ void    parole_media_list_drag_data_received_cb (GtkWidget *widget,
     guint i;
     guint added = 0;
     gboolean play;
-    
+
     parole_window_busy_cursor (gtk_widget_get_window(GTK_WIDGET (list)));
-    
+
     g_object_get (G_OBJECT (list->priv->conf),
                   "play-opened-files", &play,
                   NULL);
-    
+
     uri_list = g_uri_list_extract_uris ((const gchar *)gtk_selection_data_get_data(data));
-    
+
     for ( i = 0; uri_list[i] != NULL; i++)
     {
         path = g_filename_from_uri (uri_list[i], NULL, NULL);
@@ -601,14 +601,14 @@ parole_media_list_add_clicked_cb (GtkButton *button, ParoleMediaList *list)
 }
 
 /* Callback for the clear button */
-void 
+void
 parole_media_list_clear_clicked_cb (GtkButton *button, ParoleMediaList *list)
 {
     gchar *playlist_filename;
     GFile *playlist_file;
     parole_media_list_clear_list (list);
-    playlist_filename = xfce_resource_save_location (XFCE_RESOURCE_DATA, 
-                                                         PAROLE_AUTO_SAVED_PLAYLIST, 
+    playlist_filename = xfce_resource_save_location (XFCE_RESOURCE_DATA,
+                                                         PAROLE_AUTO_SAVED_PLAYLIST,
                                                          FALSE);
     playlist_file = g_file_new_for_path(playlist_filename);
     g_file_delete(playlist_file, NULL, NULL);
@@ -618,12 +618,12 @@ parole_media_list_clear_clicked_cb (GtkButton *button, ParoleMediaList *list)
 /**
  * parole_media_list_get_first_selected_row:
  * @list: a #ParoleMediaList
- * 
+ *
  * Gets the first selected row in the media list view.
- * 
- * Returns: a #GtkTreeRowReference for the selected row, or NULL if no one is 
+ *
+ * Returns: a #GtkTreeRowReference for the selected row, or NULL if no one is
  *      currently selected.
- * 
+ *
  **/
 static GtkTreeRowReference *
 parole_media_list_get_first_selected_row (ParoleMediaList *list)
@@ -632,23 +632,23 @@ parole_media_list_get_first_selected_row (ParoleMediaList *list)
     GtkTreeRowReference *row = NULL;
     GtkTreeIter iter;
     GList *path_list = NULL;
-    
+
     path_list = gtk_tree_selection_get_selected_rows (list->priv->sel, &model);
-    
+
     if ( g_list_length (path_list) > 0 )
     {
         GtkTreePath *path;
         path = g_list_nth_data (path_list, 0);
-        
+
         if ( G_LIKELY (gtk_tree_model_get_iter (model, &iter, path) == TRUE ))
         {
             row = parole_media_list_get_row_reference_from_iter (list, &iter, FALSE);
         }
     }
-    
+
     g_list_foreach (path_list, (GFunc)gtk_tree_path_free, NULL);
     g_list_free (path_list);
-    
+
     return row;
 }
 
@@ -668,14 +668,14 @@ parole_media_list_get_first_selected_file (ParoleMediaList *list)
     GtkTreeIter iter;
 
     row = parole_media_list_get_first_selected_row(list);
-    
-    if ( gtk_tree_model_get_iter (GTK_TREE_MODEL (list->priv->store), 
-                                  &iter, 
+
+    if ( gtk_tree_model_get_iter (GTK_TREE_MODEL (list->priv->store),
+                                  &iter,
                                   gtk_tree_row_reference_get_path (row)) )
     {
         gtk_tree_model_get (GTK_TREE_MODEL (list->priv->store), &iter, DATA_COL, &file, -1);
     }
-    
+
     return file;
 }
 
@@ -686,22 +686,22 @@ parole_media_list_save_playlist_response_cb        (GtkDialog *dialog,
 {
     gchar *filename = NULL;
     gchar *dirname = NULL;
-    
+
     if (response_id == GTK_RESPONSE_ACCEPT)
     {
         ParolePlFormat format = PAROLE_PL_FORMAT_UNKNOWN;
         GSList *list = NULL;
         GtkTreeModel *model;
         GtkTreeIter iter;
-        
+
         filename = gtk_file_chooser_get_filename (GTK_FILE_CHOOSER (data->chooser));
         dirname = g_path_get_dirname (filename);
-        
+
         if ( gtk_tree_selection_get_selected (data->sel, &model, &iter ) )
         {
             gtk_tree_model_get (model, &iter, 2, &format, -1);
         }
-        
+
         if ( g_access (dirname, W_OK) == -1 )
         {
             gchar *msg;
@@ -712,7 +712,7 @@ parole_media_list_save_playlist_response_cb        (GtkDialog *dialog,
             g_free (msg);
             goto out;
         }
-        
+
         if ( format == PAROLE_PL_FORMAT_UNKNOWN )
         {
             format = parole_pl_parser_guess_format_from_extension (filename);
@@ -724,9 +724,9 @@ parole_media_list_save_playlist_response_cb        (GtkDialog *dialog,
                 goto out;
             }
         }
-        
+
         list = parole_media_list_get_files (data->list);
-        
+
         parole_pl_parser_save_from_files (list, filename, format);
         g_slist_free (list);
 
@@ -748,7 +748,7 @@ gboolean    parole_media_list_query_tooltip     (GtkWidget *widget,
                                                  ParoleMediaList *list)
 {
     GtkTreePath *path;
-    
+
     if (gtk_tree_view_get_path_at_pos (GTK_TREE_VIEW (list->priv->view),
             x,
             y,
@@ -758,41 +758,41 @@ gboolean    parole_media_list_query_tooltip     (GtkWidget *widget,
             NULL))
     {
         GtkTreeIter iter;
-        
+
         if ( path && gtk_tree_model_get_iter (GTK_TREE_MODEL (list->priv->store), &iter, path))
         {
             ParoleFile *file;
             gchar *tip;
             gchar *name;
             gchar *len;
-            
+
             gtk_tree_model_get (GTK_TREE_MODEL (list->priv->store), &iter,
                                 DATA_COL, &file,
                                 NAME_COL, &name,
                                 LENGTH_COL, &len,
                                 -1);
-            
+
             if (!len)
             {
                 len = g_strdup (_("Unknown"));
             }
-            
-            tip = g_strdup_printf ("File: %s\nName: %s\nLength: %s", 
+
+            tip = g_strdup_printf ("File: %s\nName: %s\nLength: %s",
                                    parole_file_get_file_name (file),
                                    name,
                                    len);
-            
+
             gtk_tooltip_set_text (tooltip, tip);
             g_free (tip);
             g_free (name);
             g_free (len);
             gtk_tree_path_free (path);
-        
+
             return TRUE;
         }
     }
-                   
-                   
+
+
     return FALSE;
 }
 
@@ -803,20 +803,20 @@ void parole_media_list_format_cursor_changed_cb (GtkTreeView *view, ParolePlayli
     ParolePlFormat format;
     gchar *filename;
     gchar *fbasename;
-    
+
     /* Workaround for bug where cursor-changed is emitted on destroy */
     if (data->closing)
         return;
-    
+
     // FIXME: replaces entered filename with Playlist.
     filename = gtk_file_chooser_get_filename (GTK_FILE_CHOOSER (data->chooser));
     if (filename)
         fbasename = g_path_get_basename (filename);
     else
         fbasename = g_strconcat (_("Playlist"), ".m3u", NULL);
-    
+
     g_free (filename);
-    
+
     if ( gtk_tree_selection_get_selected (data->sel, &model, &iter ) )
     {
         gtk_tree_model_get (model, &iter, 2, &format, -1);
@@ -831,7 +831,7 @@ void parole_media_list_format_cursor_changed_cb (GtkTreeView *view, ParolePlayli
         }
     }
     g_free (fbasename);
-    
+
 }
 
 /* Callback to save the current playlist */
@@ -844,58 +844,58 @@ void parole_media_list_save_cb (GtkWidget *widget, ParoleMediaList *list)
     GtkBuilder *builder;
     gchar *filename;
     GtkTreeIter iter;
-    
+
     data = g_new0 (ParolePlaylistSave, 1);
-    
+
     builder = parole_builder_new_from_string (save_playlist_ui, save_playlist_ui_length);
     chooser = GTK_WIDGET (gtk_builder_get_object (builder, "filechooserdialog"));
     store = GTK_LIST_STORE (gtk_builder_get_object (builder, "liststore"));
 
-    gtk_window_set_transient_for (GTK_WINDOW (chooser), 
+    gtk_window_set_transient_for (GTK_WINDOW (chooser),
                                   GTK_WINDOW (gtk_widget_get_toplevel (GTK_WIDGET (list))));
-                  
+
     gtk_file_chooser_set_do_overwrite_confirmation (GTK_FILE_CHOOSER (chooser), TRUE);
-    
+
     filename = g_strconcat (_("Playlist"), ".m3u", NULL);
     gtk_file_chooser_set_current_name (GTK_FILE_CHOOSER (chooser), filename);
     g_free (filename);
-    
+
     gtk_list_store_append (store, &iter);
-    gtk_list_store_set (store, 
-                        &iter, 
+    gtk_list_store_set (store,
+                        &iter,
                         0, _("M3U Playlists"),
                         1, "m3u",
                         2, PAROLE_PL_FORMAT_M3U,
                         -1);
-            
+
     gtk_list_store_append (store, &iter);
-    gtk_list_store_set (store, 
-                        &iter, 
+    gtk_list_store_set (store,
+                        &iter,
                         0, _("PLS Playlists"),
                         1, "pls",
                         2, PAROLE_PL_FORMAT_PLS,
                         -1);
-            
+
     gtk_list_store_append (store, &iter);
-    gtk_list_store_set (store, 
-                        &iter, 
+    gtk_list_store_set (store,
+                        &iter,
                         0, _("Advanced Stream Redirector"),
                         1, "asx",
                         2, PAROLE_PL_FORMAT_ASX,
                         -1);
-            
+
     gtk_list_store_append (store, &iter);
-    gtk_list_store_set (store, 
-                        &iter, 
+    gtk_list_store_set (store,
+                        &iter,
                         0, _("Shareable Playlist"),
                         1, "xspf",
                         2, PAROLE_PL_FORMAT_XSPF,
                         -1);
 
     view = GTK_WIDGET (gtk_builder_get_object (builder, "treeview"));
-    
+
     g_signal_connect(G_OBJECT(chooser), "response", G_CALLBACK(parole_media_list_save_playlist_response_cb), data);
-    
+
     data->chooser = chooser;
     data->closing = FALSE;
     data->sel = gtk_tree_view_get_selection (GTK_TREE_VIEW (view));
@@ -909,57 +909,57 @@ void parole_media_list_save_cb (GtkWidget *widget, ParoleMediaList *list)
 /**
  * parole_media_list_get_first_path:
  * @model: a #GtkTreeModel
- * 
+ *
  * Get the first path in the model, or NULL if the model is empty
- * 
+ *
  * Returns: a #GtkTreePath
  **/
 static GtkTreePath *
-parole_media_list_get_first_path (GtkTreeModel *model) 
+parole_media_list_get_first_path (GtkTreeModel *model)
 {
     GtkTreePath *path = NULL;
     GtkTreeIter iter;
-    
+
     if (gtk_tree_model_get_iter_first (model, &iter) )
     {
         path = gtk_tree_model_get_path (GTK_TREE_MODEL (model), &iter);
     }
-    
+
     return path;
 }
 
 /**
- * 
+ *
  * parole_media_list_paths_to_row_list:
  * @path_list: a #GList contains a list of #GtkTreePath
  * @GtkTreeModel: a #GtkTreeModel that contains the paths
- * 
+ *
  * Converts a list of #GtkTreePath to a list of #GtkTreeRowReference
- * 
+ *
  * Returns: a #GList contains a list of #GtkTreeRowReference.
- * 
- * 
+ *
+ *
  **/
 static GList *
 parole_media_list_paths_to_row_list (GList *path_list, GtkTreeModel *model)
 {
     GList *row_list = NULL;
     guint len, i;
-    
+
     len = g_list_length (path_list);
-    
+
     for ( i = 0; i < len; i++)
     {
         GtkTreePath *path;
         GtkTreeRowReference *row;
-        
+
         path = g_list_nth_data (path_list, i);
-        
+
         row = gtk_tree_row_reference_new (model, path);
 
         row_list = g_list_append (row_list, row);
     }
-    
+
     return row_list;
 }
 
@@ -977,7 +977,7 @@ parole_media_list_remove_clicked_cb (GtkButton *button, ParoleMediaList *list)
 
     /* Get the GtkTreePath GList of all selected rows */
     path_list = gtk_tree_selection_get_selected_rows (list->priv->sel, &model);
-    
+
     /**
      * Convert them to row references so when we remove one the others always points
      * to the correct node.
@@ -991,13 +991,13 @@ parole_media_list_remove_clicked_cb (GtkButton *button, ParoleMediaList *list)
     if (g_list_length (path_list) != 0)
     {
         GtkTreePath *path, *prev;
-        
+
         /* Get first item */
         path = g_list_nth_data (path_list, 0);
-        
+
         /* copy it as we don't mess with the list*/
         prev = gtk_tree_path_copy (path);
-        
+
         if ( gtk_tree_path_prev (prev) )
         {
             parole_media_list_select_path (list, FALSE, prev);
@@ -1005,36 +1005,36 @@ parole_media_list_remove_clicked_cb (GtkButton *button, ParoleMediaList *list)
         }
         gtk_tree_path_free (prev);
     }
-    
+
     g_list_foreach (path_list, (GFunc) gtk_tree_path_free, NULL);
     g_list_free (path_list);
-    
+
     len = g_list_length (row_list);
-    
+
     for ( i = 0; i < len; i++)
     {
         GtkTreePath *path;
         GtkTreeRowReference *row;
         row = g_list_nth_data (row_list, i);
         path = gtk_tree_row_reference_get_path (row);
-        
+
         if ( G_LIKELY (gtk_tree_model_get_iter (model, &iter, path) == TRUE ) )
         {
             gtk_list_store_remove (GTK_LIST_STORE (model),
                        &iter);
         }
     }
-    
+
     g_list_foreach (row_list, (GFunc) gtk_tree_row_reference_free, NULL);
     g_list_free (row_list);
-    
+
     /*
-     * Returns the number of children that iter has. 
-     * As a special case, if iter is NULL, 
+     * Returns the number of children that iter has.
+     * As a special case, if iter is NULL,
      * then the number of toplevel nodes is returned. Gtk API doc.
      */
-    nch = gtk_tree_model_iter_n_children (GTK_TREE_MODEL (list->priv->store), NULL); 
-    
+    nch = gtk_tree_model_iter_n_children (GTK_TREE_MODEL (list->priv->store), NULL);
+
     /* No row was selected, then select the first one*/
     if (!row_selected && nch != 0)
     {
@@ -1043,20 +1043,20 @@ parole_media_list_remove_clicked_cb (GtkButton *button, ParoleMediaList *list)
         parole_media_list_select_path (list, FALSE, path);
         gtk_tree_path_free (path);
     }
-    
+
     parole_media_list_set_playlist_count(list, nch);
 }
 
-void 
+void
 parole_media_list_move_up_clicked_cb (GtkButton *button, ParoleMediaList *list)
 {
     GtkTreeModel *model;
     GList *path_list = NULL;
     GtkTreeIter current, iter;
-    
+
     /* Get the GtkTreePath GList of all selected rows */
     path_list = gtk_tree_selection_get_selected_rows (list->priv->sel, &model);
-    
+
     /**
      * Select first path before the first path
      * that we going to move.
@@ -1065,14 +1065,14 @@ parole_media_list_move_up_clicked_cb (GtkButton *button, ParoleMediaList *list)
     {
         GtkTreePath *path, *prev;
         guint i;
-        
+
         /* Get first item */
         path = g_list_nth_data (path_list, 0);
         if (gtk_tree_model_get_iter (GTK_TREE_MODEL (list->priv->store), &current, path))
         {
             /* copy it as we don't mess with the list*/
             prev = gtk_tree_path_copy (path);
-            
+
             if ( gtk_tree_path_prev (prev) )
             {
                 if ( gtk_tree_model_get_iter (GTK_TREE_MODEL (list->priv->store), &iter, prev))
@@ -1089,23 +1089,23 @@ parole_media_list_move_up_clicked_cb (GtkButton *button, ParoleMediaList *list)
             gtk_tree_path_free (prev);
         }
     }
-    
+
     g_list_foreach (path_list, (GFunc) gtk_tree_path_free, NULL);
     g_list_free (path_list);
 }
-                                                     
-void 
+
+void
 parole_media_list_move_down_clicked_cb (GtkButton *button, ParoleMediaList *list)
 {
     GtkTreeModel *model;
     GList *path_list = NULL;
     GtkTreeIter current, iter;
-    
+
     /* Get the GtkTreePath GList of all selected rows */
     path_list = gtk_tree_selection_get_selected_rows (list->priv->sel, &model);
     /* Reverse the list to repopulate in the right order */
     path_list = g_list_reverse(path_list);
-    
+
     /**
      * Select first path before the first path
      * that we going to move.
@@ -1114,14 +1114,14 @@ parole_media_list_move_down_clicked_cb (GtkButton *button, ParoleMediaList *list
     {
         GtkTreePath *path, *next;
         guint i;
-        
+
         /* Get first item */
         path = g_list_nth_data (path_list, 0);
         if (gtk_tree_model_get_iter (GTK_TREE_MODEL (list->priv->store), &current, path))
         {
             /* copy it as we don't mess with the list*/
             next = gtk_tree_path_copy (path);
-            
+
             gtk_tree_path_next (next);
 
             if ( gtk_tree_model_get_iter (GTK_TREE_MODEL (list->priv->store), &iter, next))
@@ -1138,27 +1138,27 @@ parole_media_list_move_down_clicked_cb (GtkButton *button, ParoleMediaList *list
             gtk_tree_path_free (next);
         }
     }
-    
+
     g_list_foreach (path_list, (GFunc) gtk_tree_path_free, NULL);
     g_list_free (path_list);
 }
 
 /**
  * parole_media_list_row_activated_cb:
- * 
- * 
+ *
+ *
  **/
 void
-parole_media_list_row_activated_cb (GtkTreeView *view, GtkTreePath *path, 
+parole_media_list_row_activated_cb (GtkTreeView *view, GtkTreePath *path,
                     GtkTreeViewColumn *col, ParoleMediaList *list)
 {
     GtkTreeRowReference *row;
-    
+
     if (gtk_notebook_get_current_page(GTK_NOTEBOOK(list->priv->playlist_notebook)) == 0)
         row = gtk_tree_row_reference_new (gtk_tree_view_get_model (GTK_TREE_VIEW (list->priv->view)), path);
     else
         row = gtk_tree_row_reference_new (gtk_tree_view_get_model (GTK_TREE_VIEW (list->priv->disc_view)), path);
-                      
+
     g_signal_emit (G_OBJECT (list), signals [MEDIA_ACTIVATED], 0, row);
 }
 
@@ -1166,23 +1166,23 @@ static void
 parole_media_list_selection_changed_cb (GtkTreeSelection *sel, ParoleMediaList *list)
 {
     g_signal_emit  (G_OBJECT (list), signals [MEDIA_CURSOR_CHANGED], 0,
-                    gtk_tree_selection_count_selected_rows (sel) > 0); 
+                    gtk_tree_selection_count_selected_rows (sel) > 0);
 }
 
 static void
 parole_media_list_open_folder (GtkWidget *menu)
 {
     gchar *dirname;
-    
+
     dirname = (gchar *) g_object_get_data (G_OBJECT (menu), "folder");
-    
+
     if (dirname)
     {
         gchar *uri;
         uri = g_filename_to_uri (dirname, NULL, NULL);
         TRACE ("Opening %s", dirname);
         gtk_show_uri (gtk_widget_get_screen (menu),  uri, GDK_CURRENT_TIME, NULL);
-        
+
         g_free (uri);
     }
 }
@@ -1191,9 +1191,9 @@ static void
 parole_media_list_add_open_containing_folder (ParoleMediaList *list, GtkWidget *menu,
                           gint x, gint y)
 {
-    
+
     GtkTreePath *path;
-    
+
     if (gtk_tree_view_get_path_at_pos (GTK_TREE_VIEW (list->priv->view),
                                        x,
                                        y,
@@ -1202,46 +1202,46 @@ parole_media_list_add_open_containing_folder (ParoleMediaList *list, GtkWidget *
                                        NULL,
                                        NULL))
     {
-    
+
     GtkTreeIter iter;
-    
+
     if ( path && gtk_tree_model_get_iter (GTK_TREE_MODEL (list->priv->store), &iter, path))
     {
         ParoleFile *file;
         const gchar *filename;
         const gchar *uri;
-        
+
         gtk_tree_model_get (GTK_TREE_MODEL (list->priv->store), &iter,
                             DATA_COL, &file,
                             -1);
-                
+
         filename = parole_file_get_file_name (file);
         uri = parole_file_get_uri (file);
-        
+
         if (g_str_has_prefix (uri, "file:///"))
         {
             GtkWidget *mi, *img;
             gchar *dirname;
-            
+
             dirname = g_path_get_dirname (filename);
-            
+
             /* Clear */
             mi = gtk_menu_item_new_with_label (_("Open Containing Folder"));
             gtk_widget_set_sensitive (mi, TRUE);
             gtk_widget_show (mi);
             g_signal_connect_swapped   (mi, "activate",
                                         G_CALLBACK (parole_media_list_open_folder), menu);
-            
+
             g_object_set_data (G_OBJECT (menu), "folder", dirname);
-            
+
             gtk_menu_shell_append (GTK_MENU_SHELL (menu), mi);
-            
-            
+
+
             mi = gtk_separator_menu_item_new ();
             gtk_widget_show (mi);
             gtk_menu_shell_append (GTK_MENU_SHELL (menu), mi);
         }
-        
+
         gtk_tree_path_free (path);
     }
     }
@@ -1283,7 +1283,7 @@ play_opened_files_activated_cb (GtkWidget *mi, ParoleConf *conf)
     g_object_set (G_OBJECT (conf),
                   "play-opened-files", gtk_check_menu_item_get_active (GTK_CHECK_MENU_ITEM (mi)),
                   NULL);
-        
+
 }
 
 static void
@@ -1295,8 +1295,8 @@ remember_playlist_activated_cb (GtkWidget *mi, ParoleConf *conf)
                   "remember-playlist", gtk_check_menu_item_get_active (GTK_CHECK_MENU_ITEM (mi)),
                   NULL);
     if (!gtk_check_menu_item_get_active (GTK_CHECK_MENU_ITEM (mi))) {
-        playlist_filename = xfce_resource_save_location (XFCE_RESOURCE_DATA, 
-                                                         PAROLE_AUTO_SAVED_PLAYLIST, 
+        playlist_filename = xfce_resource_save_location (XFCE_RESOURCE_DATA,
+                                                         PAROLE_AUTO_SAVED_PLAYLIST,
                                                          FALSE);
         playlist_file = g_file_new_for_path(playlist_filename);
         g_file_delete(playlist_file, NULL, NULL);
@@ -1308,14 +1308,14 @@ static void
 parole_media_list_destroy_menu (GtkWidget *menu)
 {
     gchar *dirname;
-    
+
     dirname = (gchar *) g_object_get_data (G_OBJECT (menu), "folder");
-    
+
     if (dirname)
     {
         g_free (dirname);
     }
-    
+
     gtk_widget_destroy (menu);
 }
 
@@ -1323,26 +1323,26 @@ static void
 parole_media_list_show_menu (ParoleMediaList *list, GdkEventButton *ev)
 {
     gboolean val;
-    guint button = ev->button; 
+    guint button = ev->button;
     guint activate_time = ev->time;
-    
+
     GtkBuilder *builder;
-    
+
     GtkMenu *menu;
     GtkMenuItem *clear;
     GtkCheckMenuItem *replace, *play_opened;
     GtkCheckMenuItem *remember;
-    
+
     builder = parole_builder_new_from_string (playlist_ui, playlist_ui_length);
-    
+
     menu = GTK_MENU (gtk_builder_get_object (builder, "playlist-menu"));
     replace = GTK_CHECK_MENU_ITEM (gtk_builder_get_object (builder, "menu-replace"));
     play_opened = GTK_CHECK_MENU_ITEM (gtk_builder_get_object (builder, "menu-play-opened"));
     remember = GTK_CHECK_MENU_ITEM (gtk_builder_get_object (builder, "menu-remember"));
     clear = GTK_MENU_ITEM (gtk_builder_get_object (builder, "menu-clear"));
-    
+
     parole_media_list_add_open_containing_folder (list, GTK_WIDGET(menu), (gint)ev->x, (gint)ev->y);
-                  
+
     g_object_get (G_OBJECT (list->priv->conf),
                   "replace-playlist", &val,
                   NULL);
@@ -1350,7 +1350,7 @@ parole_media_list_show_menu (ParoleMediaList *list, GdkEventButton *ev)
     gtk_check_menu_item_set_active (replace, val);
     g_signal_connect (replace, "activate",
                       G_CALLBACK (replace_list_activated_cb), list->priv->conf);
-                  
+
     g_object_get (G_OBJECT (list->priv->conf),
                   "play-opened-files", &val,
                   NULL);
@@ -1370,8 +1370,8 @@ parole_media_list_show_menu (ParoleMediaList *list, GdkEventButton *ev)
 
     g_signal_connect_swapped (menu, "selection-done",
                               G_CALLBACK (parole_media_list_destroy_menu), menu);
-    
-    gtk_menu_popup (GTK_MENU (menu), 
+
+    gtk_menu_popup (GTK_MENU (menu),
                     NULL, NULL,
                     NULL, NULL,
                     button, activate_time);
@@ -1385,7 +1385,7 @@ parole_media_list_button_release_event (GtkWidget *widget, GdkEventButton *ev, P
         parole_media_list_show_menu (list, ev);
         return TRUE;
     }
-    
+
     return FALSE;
 }
 
@@ -1409,15 +1409,15 @@ parole_media_list_get_row_reference_from_iter (ParoleMediaList *list, GtkTreeIte
 {
     GtkTreePath *path;
     GtkTreeRowReference *row;
-    
+
     path = gtk_tree_model_get_path (GTK_TREE_MODEL (list->priv->store), iter);
     row = gtk_tree_row_reference_new (GTK_TREE_MODEL (list->priv->store), path);
-    
+
     if ( select_path)
         parole_media_list_select_path (list, FALSE, path);
-    
+
     gtk_tree_path_free (path);
-    
+
     return row;
 }
 
@@ -1427,7 +1427,7 @@ parole_media_list_finalize (GObject *object)
     ParoleMediaList *list;
 
     list = PAROLE_MEDIA_LIST (object);
-    
+
     dbus_g_connection_unref (list->priv->bus);
 
     G_OBJECT_CLASS (parole_media_list_parent_class)->finalize (object);
@@ -1439,8 +1439,8 @@ parole_media_list_class_init (ParoleMediaListClass *klass)
     GObjectClass *object_class = G_OBJECT_CLASS (klass);
 
     object_class->finalize = parole_media_list_finalize;
-    
-    signals[MEDIA_ACTIVATED] = 
+
+    signals[MEDIA_ACTIVATED] =
         g_signal_new ("media-activated",
                       PAROLE_TYPE_MEDIA_LIST,
                       G_SIGNAL_RUN_LAST,
@@ -1449,7 +1449,7 @@ parole_media_list_class_init (ParoleMediaListClass *klass)
                       g_cclosure_marshal_VOID__POINTER,
                       G_TYPE_NONE, 1, G_TYPE_POINTER);
 
-    signals[MEDIA_CURSOR_CHANGED] = 
+    signals[MEDIA_CURSOR_CHANGED] =
         g_signal_new ("media-cursor-changed",
                       PAROLE_TYPE_MEDIA_LIST,
                       G_SIGNAL_RUN_LAST,
@@ -1458,7 +1458,7 @@ parole_media_list_class_init (ParoleMediaListClass *klass)
                       g_cclosure_marshal_VOID__BOOLEAN,
                       G_TYPE_NONE, 1, G_TYPE_BOOLEAN);
 
-    signals[URI_OPENED] = 
+    signals[URI_OPENED] =
         g_signal_new ("uri-opened",
                       PAROLE_TYPE_MEDIA_LIST,
                       G_SIGNAL_RUN_LAST,
@@ -1466,8 +1466,8 @@ parole_media_list_class_init (ParoleMediaListClass *klass)
                       NULL, NULL,
                       g_cclosure_marshal_VOID__STRING,
                       G_TYPE_NONE, 1, G_TYPE_STRING);
-                      
-    signals[SHOW_PLAYLIST] = 
+
+    signals[SHOW_PLAYLIST] =
         g_signal_new ("show-playlist",
                       PAROLE_TYPE_MEDIA_LIST,
                       G_SIGNAL_RUN_LAST,
@@ -1475,8 +1475,8 @@ parole_media_list_class_init (ParoleMediaListClass *klass)
                       NULL, NULL,
                       g_cclosure_marshal_VOID__BOOLEAN,
                       G_TYPE_NONE, 1, G_TYPE_BOOLEAN);
-                      
-    signals[ISO_OPENED] = 
+
+    signals[ISO_OPENED] =
         g_signal_new ("iso-opened",
                       PAROLE_TYPE_MEDIA_LIST,
                       G_SIGNAL_RUN_LAST,
@@ -1486,7 +1486,7 @@ parole_media_list_class_init (ParoleMediaListClass *klass)
                       G_TYPE_NONE, 1, G_TYPE_STRING);
 
     g_type_class_add_private (klass, sizeof (ParoleMediaListPrivate));
-    
+
     parole_media_list_dbus_class_init (klass);
 }
 
@@ -1532,7 +1532,7 @@ parole_media_list_setup_view (ParoleMediaList *list)
 
     gtk_tree_view_set_model (GTK_TREE_VIEW (list->priv->view), GTK_TREE_MODEL(list_store));
     gtk_tree_view_set_model (GTK_TREE_VIEW (list->priv->disc_view), GTK_TREE_MODEL(disc_list_store));
-    
+
     gtk_tree_view_set_rules_hint (GTK_TREE_VIEW (list->priv->view), TRUE);
     gtk_tree_view_set_rules_hint (GTK_TREE_VIEW (list->priv->disc_view), TRUE);
     list->priv->col = gtk_tree_view_column_new ();
@@ -1542,7 +1542,7 @@ parole_media_list_setup_view (ParoleMediaList *list)
     disc_renderer = gtk_cell_renderer_pixbuf_new ();
     g_object_set (renderer, "stock-size", GTK_ICON_SIZE_MENU, NULL);
     g_object_set (disc_renderer, "stock-size", GTK_ICON_SIZE_MENU, NULL);
-    
+
     gtk_tree_view_column_pack_start(list->priv->col, renderer, FALSE);
     gtk_tree_view_column_pack_start(list->priv->disc_col, disc_renderer, FALSE);
     gtk_tree_view_column_set_cell_data_func (list->priv->col, renderer,
@@ -1558,39 +1558,39 @@ parole_media_list_setup_view (ParoleMediaList *list)
 
     /**
      * Name col
-     * 
+     *
      **/
     renderer = gtk_cell_renderer_text_new();
     disc_renderer = gtk_cell_renderer_text_new();
-    
+
     gtk_tree_view_column_pack_start (list->priv->col, renderer, TRUE);
     gtk_tree_view_column_set_attributes (list->priv->col, renderer, "text", NAME_COL, NULL);
-    g_object_set (renderer, 
-                  "ellipsize", PANGO_ELLIPSIZE_END, 
+    g_object_set (renderer,
+                  "ellipsize", PANGO_ELLIPSIZE_END,
                   NULL);
-          
+
     gtk_tree_view_column_pack_start (list->priv->disc_col, disc_renderer, TRUE);
     gtk_tree_view_column_set_attributes (list->priv->disc_col, disc_renderer, "text", NAME_COL, NULL);
-    g_object_set (disc_renderer, 
-                  "ellipsize", PANGO_ELLIPSIZE_END, 
+    g_object_set (disc_renderer,
+                  "ellipsize", PANGO_ELLIPSIZE_END,
                   NULL);
-                  
+
     /* Make the name column the search target */
     gtk_tree_view_set_search_column(GTK_TREE_VIEW(list->priv->view), 1);
     gtk_tree_view_set_search_column(GTK_TREE_VIEW(list->priv->disc_view), 1);
-    
+
     /**
      * Media length
-     * 
+     *
      **/
     renderer = gtk_cell_renderer_text_new();
     disc_renderer = gtk_cell_renderer_text_new();
-    
+
     gtk_tree_view_column_pack_start (list->priv->col, renderer, FALSE);
     gtk_tree_view_column_pack_start (list->priv->disc_col, disc_renderer, FALSE);
     gtk_tree_view_column_set_attributes (list->priv->col, renderer, "text", LENGTH_COL, NULL);
     gtk_tree_view_column_set_attributes (list->priv->disc_col, disc_renderer, "text", LENGTH_COL, NULL);
-    
+
     gtk_tree_view_append_column (GTK_TREE_VIEW (list->priv->view), list->priv->col);
     gtk_tree_view_append_column (GTK_TREE_VIEW (list->priv->disc_view), list->priv->disc_col);
     gtk_tree_view_column_set_title (list->priv->col, g_strdup_printf(_("Playlist (%i items)"), 0));
@@ -1598,16 +1598,16 @@ parole_media_list_setup_view (ParoleMediaList *list)
 
     gtk_drag_dest_set (list->priv->view, GTK_DEST_DEFAULT_ALL, target_entry, G_N_ELEMENTS (target_entry),
                        GDK_ACTION_COPY | GDK_ACTION_MOVE);
-    
+
     list->priv->sel = sel = gtk_tree_view_get_selection (GTK_TREE_VIEW (list->priv->view));
     list->priv->disc_sel = disc_sel = gtk_tree_view_get_selection (GTK_TREE_VIEW (list->priv->disc_view));
     gtk_tree_selection_set_mode (sel, GTK_SELECTION_MULTIPLE);
-    
+
     g_signal_connect (sel, "changed",
               G_CALLBACK (parole_media_list_selection_changed_cb), list);
     g_signal_connect (disc_sel, "changed",
               G_CALLBACK (parole_media_list_selection_changed_cb), list);
-    
+
     list->priv->store = list_store;
     list->priv->disc_store = disc_list_store;
 }
@@ -1617,39 +1617,39 @@ parole_media_list_init (ParoleMediaList *list)
 {
     GtkBuilder *builder;
     GtkWidget  *box;
-    
+
     media_list = list;
     list->priv = PAROLE_MEDIA_LIST_GET_PRIVATE (list);
-    
+
     list->priv->bus = parole_g_session_bus_get ();
-    
+
     list->priv->conf = parole_conf_new ();
-    
+
     builder = parole_builder_new_from_string (playlist_ui, playlist_ui_length);
-    
+
     list->priv->playlist_controls = GTK_WIDGET (gtk_builder_get_object(builder, "playlist_controls"));
     list->priv->playlist_notebook = GTK_WIDGET (gtk_builder_get_object(builder, "playlist_notebook"));
-    
+
     list->priv->view = GTK_WIDGET (gtk_builder_get_object (builder, "media-list"));
     list->priv->disc_view = GTK_WIDGET (gtk_builder_get_object (builder, "disc-list"));
-    
+
     box = GTK_WIDGET (gtk_builder_get_object (builder, "playlist-box"));
-    
+
     parole_media_list_setup_view (list);
-    
+
     gtk_box_pack_start (GTK_BOX (list), box, TRUE, TRUE, 0);
-    
+
     list->priv->remove_button = GTK_WIDGET (gtk_builder_get_object (builder, "remove-media"));
     list->priv->clear_button = GTK_WIDGET (gtk_builder_get_object (builder, "clear-media"));
     list->priv->repeat_button = GTK_WIDGET (gtk_builder_get_object (builder, "repeat-media"));
     list->priv->shuffle_button = GTK_WIDGET (gtk_builder_get_object (builder, "shuffle-media"));
-    
+
     gtk_builder_connect_signals (builder, list);
 
     g_object_unref (builder);
-    
+
     gtk_widget_show_all (GTK_WIDGET (list));
-    
+
     parole_media_list_dbus_init (list);
 }
 
@@ -1657,7 +1657,7 @@ GtkWidget *
 parole_media_list_get (void)
 {
     static gpointer list = NULL;
-    
+
     if ( G_LIKELY (list != NULL ) )
     {
         g_object_ref (list);
@@ -1667,7 +1667,7 @@ parole_media_list_get (void)
         list = g_object_new (PAROLE_TYPE_MEDIA_LIST, NULL);
         g_object_add_weak_pointer (list, &list);
     }
-    
+
     return GTK_WIDGET (list);
 }
 
@@ -1676,29 +1676,29 @@ void parole_media_list_load (ParoleMediaList *list)
     gboolean    load_saved_list;
     gboolean    play;
     GSList     *fileslist = NULL;
-    
+
     g_object_get (G_OBJECT (list->priv->conf),
                   "play-opened-files", &play,
                   "remember-playlist", &load_saved_list,
                   NULL);
-    
+
     if ( load_saved_list )
     {
         gchar *playlist_file;
-        
-        playlist_file = xfce_resource_save_location (XFCE_RESOURCE_DATA, 
-                                     PAROLE_AUTO_SAVED_PLAYLIST, 
+
+        playlist_file = xfce_resource_save_location (XFCE_RESOURCE_DATA,
+                                     PAROLE_AUTO_SAVED_PLAYLIST,
                                  FALSE);
         if ( playlist_file )
         {
             fileslist = parole_pl_parser_parse_from_file_by_extension (playlist_file);
             g_free (playlist_file);
-            
+
             parole_media_list_files_open (list, fileslist, FALSE, play);
             g_slist_free (fileslist);
         }
     }
-    
+
 }
 
 gboolean
@@ -1709,14 +1709,14 @@ parole_media_list_add_by_path (ParoleMediaList *list, const gchar *path, gboolea
     guint len;
     gboolean ret = FALSE;
     gchar *full_path;
-    
+
     filter = parole_get_supported_media_filter ();
     g_object_ref_sink (filter);
-    
+
     if (g_path_is_absolute(path)) {
         full_path = g_strdup(path);
     }
-    else 
+    else
     {
         if (g_file_test( g_strjoin("/", g_get_current_dir(), g_strdup(path), NULL), G_FILE_TEST_EXISTS))
         {
@@ -1728,38 +1728,38 @@ parole_media_list_add_by_path (ParoleMediaList *list, const gchar *path, gboolea
         }
     }
     TRACE ("Path=%s", full_path);
-    
+
     parole_get_media_files (filter, full_path, TRUE, &files_list);
-    
+
     parole_media_list_files_open (list, files_list, FALSE, emit);
-    
+
     len = g_slist_length (files_list);
     ret = len == 0 ? FALSE : TRUE;
-    
+
     g_free(full_path);
-    
+
     g_object_unref (filter);
     g_slist_free (files_list);
     return ret;
 }
 
-GtkTreeRowReference *parole_media_list_get_next_row (ParoleMediaList *list, 
+GtkTreeRowReference *parole_media_list_get_next_row (ParoleMediaList *list,
                              GtkTreeRowReference *row,
                              gboolean repeat)
 {
     GtkTreeRowReference *next = NULL;
     GtkTreePath *path;
     GtkTreeIter iter;
-    
+
     g_return_val_if_fail (row != NULL, NULL);
 
     if ( !gtk_tree_row_reference_valid (row) )
         return NULL;
-    
+
     path = gtk_tree_row_reference_get_path (row);
-    
+
     gtk_tree_path_next (path);
-    
+
     if ( gtk_tree_model_get_iter (GTK_TREE_MODEL (list->priv->store), &iter, path))
     {
         next = gtk_tree_row_reference_new (GTK_TREE_MODEL (list->priv->store), path);
@@ -1772,9 +1772,9 @@ GtkTreeRowReference *parole_media_list_get_next_row (ParoleMediaList *list,
             next =  parole_media_list_get_row_reference_from_iter (list, &iter, TRUE);
         }
     }
-    
+
     gtk_tree_path_free (path);
-    
+
     return next;
 }
 
@@ -1784,16 +1784,16 @@ GtkTreeRowReference *parole_media_list_get_prev_row (ParoleMediaList *list,
     GtkTreeRowReference *prev = NULL;
     GtkTreePath *path;
     GtkTreeIter iter;
-    
+
     g_return_val_if_fail (row != NULL, NULL);
 
     if ( !gtk_tree_row_reference_valid (row) )
         return NULL;
-    
+
     path = gtk_tree_row_reference_get_path (row);
-    
+
     gtk_tree_path_prev (path);
-    
+
     if ( gtk_tree_model_get_iter (GTK_TREE_MODEL (list->priv->store), &iter, path))
     {
         prev = gtk_tree_row_reference_new (GTK_TREE_MODEL (list->priv->store), path);
@@ -1801,22 +1801,22 @@ GtkTreeRowReference *parole_media_list_get_prev_row (ParoleMediaList *list,
     }
     else
         prev = row;
-    
+
     gtk_tree_path_free (path);
-    
+
     return prev;
 }
 
-GtkTreeRowReference *parole_media_list_get_row_n (ParoleMediaList *list, 
+GtkTreeRowReference *parole_media_list_get_row_n (ParoleMediaList *list,
                                                   gint wanted_row)
 {
     GtkTreeRowReference *row = NULL;
     GtkTreePath *path;
     GtkTreeIter iter;
-    
+
     if (wanted_row == -1)
         return NULL;
-        
+
     path = gtk_tree_path_new_from_string( g_strdup_printf("%i", wanted_row) );
 
     if (gtk_notebook_get_current_page(GTK_NOTEBOOK(list->priv->playlist_notebook)) == 0)
@@ -1829,12 +1829,12 @@ GtkTreeRowReference *parole_media_list_get_row_n (ParoleMediaList *list,
         if ( gtk_tree_model_get_iter (GTK_TREE_MODEL (list->priv->disc_store), &iter, path))
             row = gtk_tree_row_reference_new (GTK_TREE_MODEL (list->priv->disc_store), path);
     }
-    
+
     gtk_tree_path_free (path);
-    
+
     if ( !gtk_tree_row_reference_valid (row) )
         return NULL;
-    
+
     return row;
 }
 
@@ -1849,18 +1849,18 @@ GtkTreeRowReference *parole_media_list_get_row_random (ParoleMediaList *list)
     int count = 0;
 
     nch = gtk_tree_model_iter_n_children (GTK_TREE_MODEL (list->priv->store), NULL);
-    
+
     if ( nch == 1 || nch == 0 )
     {
         return  NULL;
     }
-    
+
     current_path = gtk_tree_path_to_string(gtk_tree_row_reference_get_path(parole_media_list_get_selected_row(list)));
     path_str = g_strdup(current_path);
-    
+
     if (!list->priv->history[0])
         list->priv->history[0] = g_strdup(path_str);
-    
+
     while (g_strcmp0(list->priv->history[0], path_str) == 0 || g_strcmp0(list->priv->history[1], path_str) == 0 || g_strcmp0(list->priv->history[2], path_str) == 0 || g_strcmp0(current_path, path_str) == 0)
     {
         path_str = g_strdup_printf ("%i", g_random_int_range (0, nch));
@@ -1868,26 +1868,26 @@ GtkTreeRowReference *parole_media_list_get_row_random (ParoleMediaList *list)
         if (count >= 10 && g_strcmp0(current_path, path_str) != 0)
             break;
     }
-        
+
     list->priv->history[2] = list->priv->history[1];
     list->priv->history[1] = list->priv->history[0];
     list->priv->history[0] = g_strdup(path_str);
-    
+
     path = gtk_tree_path_new_from_string (path_str);
     g_free (path_str);
-    
+
     if ( gtk_tree_model_get_iter (GTK_TREE_MODEL (list->priv->store), &iter, path))
     {
         row  = gtk_tree_row_reference_new (GTK_TREE_MODEL (list->priv->store), path);
     }
 
     gtk_tree_path_free (path);
-    
+
     return row;
 }
 
 gboolean parole_media_list_is_selected_row  (ParoleMediaList *list)
-{   
+{
     if (gtk_notebook_get_current_page(GTK_NOTEBOOK(list->priv->playlist_notebook)) == 0)
         return gtk_tree_selection_count_selected_rows (list->priv->sel) > 0;
     else
@@ -1897,7 +1897,7 @@ gboolean parole_media_list_is_selected_row  (ParoleMediaList *list)
 gboolean parole_media_list_is_empty (ParoleMediaList *list)
 {
     GtkTreeIter iter;
-    
+
     if (gtk_notebook_get_current_page(GTK_NOTEBOOK(list->priv->playlist_notebook)) == 0)
         return !gtk_tree_model_get_iter_first (GTK_TREE_MODEL (list->priv->store), &iter);
     else
@@ -1907,15 +1907,15 @@ gboolean parole_media_list_is_empty (ParoleMediaList *list)
 /**
  * parole_media_list_get_first_row:
  * @list: a #ParoleMediaList
- * 
- * 
+ *
+ *
  * Returns: a #GtkTreeRowReference of the first row in the media list.
  **/
 GtkTreeRowReference *parole_media_list_get_first_row (ParoleMediaList *list)
 {
     GtkTreeRowReference *row = NULL;
     GtkTreeIter iter;
-    
+
     if (gtk_notebook_get_current_page(GTK_NOTEBOOK(list->priv->playlist_notebook)) == 0)
     {
         if ( gtk_tree_model_get_iter_first (GTK_TREE_MODEL (list->priv->store), &iter) )
@@ -1926,15 +1926,15 @@ GtkTreeRowReference *parole_media_list_get_first_row (ParoleMediaList *list)
         if ( gtk_tree_model_get_iter_first (GTK_TREE_MODEL (list->priv->disc_store), &iter) )
             row = parole_media_list_get_row_reference_from_iter (list, &iter, TRUE);
     }
-    
+
     return row;
 }
 
 /**
  * parole_media_list_get_selected_row:
  * @list: a #ParoleMediaList
- * 
- * 
+ *
+ *
  * Returns: a #GtkTreeRowReference of the selected row.
  **/
 GtkTreeRowReference *parole_media_list_get_selected_row (ParoleMediaList *list)
@@ -1945,8 +1945,8 @@ GtkTreeRowReference *parole_media_list_get_selected_row (ParoleMediaList *list)
 /**
  * parole_media_list_get_selected_file:
  * @list: a #ParoleMediaList
- * 
- * 
+ *
+ *
  * Returns: a #ParoleFile of the selected row.
  **/
 ParoleFile *parole_media_list_get_selected_file (ParoleMediaList *list)
@@ -1957,12 +1957,12 @@ ParoleFile *parole_media_list_get_selected_file (ParoleMediaList *list)
 void parole_media_list_select_row (ParoleMediaList *list, GtkTreeRowReference *row)
 {
     GtkTreePath *path;
-    
+
     if ( gtk_tree_row_reference_valid (row) )
     {
         path = gtk_tree_row_reference_get_path (row);
-        parole_media_list_select_path (list, 
-            gtk_notebook_get_current_page(GTK_NOTEBOOK(list->priv->playlist_notebook)) == 1, 
+        parole_media_list_select_path (list,
+            gtk_notebook_get_current_page(GTK_NOTEBOOK(list->priv->playlist_notebook)) == 1,
             path);
         gtk_tree_path_free (path);
     }
@@ -1972,11 +1972,11 @@ void parole_media_list_set_row_playback_state  (ParoleMediaList *list, GtkTreeRo
 {
     GtkTreeIter iter;
     GtkTreePath *path;
-    
+
     if ( gtk_tree_row_reference_valid (row) )
     {
         path = gtk_tree_row_reference_get_path (row);
-        
+
         if (gtk_notebook_get_current_page(GTK_NOTEBOOK(list->priv->playlist_notebook)) == 0)
         {
             if ( gtk_tree_model_get_iter (GTK_TREE_MODEL (list->priv->store), &iter, path) )
@@ -1998,11 +1998,11 @@ GtkTreeRowReference *row)
     GtkTreeIter iter;
     GtkTreePath *path;
     gchar *name = NULL;
-    
+
     if ( gtk_tree_row_reference_valid (row) )
     {
         path = gtk_tree_row_reference_get_path (row);
-        
+
         if (gtk_notebook_get_current_page(GTK_NOTEBOOK(list->priv->playlist_notebook)) == 0)
         {
             if ( gtk_tree_model_get_iter (GTK_TREE_MODEL (list->priv->store), &iter, path) )
@@ -2013,10 +2013,10 @@ GtkTreeRowReference *row)
             if ( gtk_tree_model_get_iter (GTK_TREE_MODEL (list->priv->disc_store), &iter, path) )
                 gtk_tree_model_get (GTK_TREE_MODEL(list->priv->disc_store), &iter, NAME_COL, &name, -1);
         }
-        
+
         gtk_tree_path_free (path);
     }
-    
+
     return name;
 }
 
@@ -2024,11 +2024,11 @@ void parole_media_list_set_row_name (ParoleMediaList *list, GtkTreeRowReference
 {
     GtkTreeIter iter;
     GtkTreePath *path;
-    
+
     if ( gtk_tree_row_reference_valid (row) )
     {
         path = gtk_tree_row_reference_get_path (row);
-        
+
         if (gtk_notebook_get_current_page(GTK_NOTEBOOK(list->priv->playlist_notebook)) == 0)
         {
             if ( gtk_tree_model_get_iter (GTK_TREE_MODEL (list->priv->store), &iter, path) )
@@ -2039,7 +2039,7 @@ void parole_media_list_set_row_name (ParoleMediaList *list, GtkTreeRowReference
             if ( gtk_tree_model_get_iter (GTK_TREE_MODEL (list->priv->disc_store), &iter, path) )
                 gtk_list_store_set (list->priv->disc_store, &iter, NAME_COL, name, -1);
         }
-        
+
         gtk_tree_path_free (path);
     }
 }
@@ -2048,11 +2048,11 @@ void parole_media_list_set_row_length (ParoleMediaList *list, GtkTreeRowReferenc
 {
     GtkTreeIter iter;
     GtkTreePath *path;
-    
+
     if ( gtk_tree_row_reference_valid (row) )
     {
         path = gtk_tree_row_reference_get_path (row);
-        
+
         if (gtk_notebook_get_current_page(GTK_NOTEBOOK(list->priv->playlist_notebook)) == 0)
         {
             if ( gtk_tree_model_get_iter (GTK_TREE_MODEL (list->priv->store), &iter, path) )
@@ -2063,7 +2063,7 @@ void parole_media_list_set_row_length (ParoleMediaList *list, GtkTreeRowReferenc
             if ( gtk_tree_model_get_iter (GTK_TREE_MODEL (list->priv->disc_store), &iter, path) )
                 gtk_list_store_set (list->priv->disc_store, &iter, LENGTH_COL, len, -1);
         }
-        
+
         gtk_tree_path_free (path);
     }
 }
@@ -2082,7 +2082,7 @@ gboolean parole_media_list_add_files (ParoleMediaList *list, gchar **filenames,
 {
     guint i;
     guint added = 0;
-    
+
     for ( i = 0; filenames && filenames[i] != NULL; i++)
     {
         /*
@@ -2104,31 +2104,31 @@ gboolean parole_media_list_add_files (ParoleMediaList *list, gchar **filenames,
             added++;
         }
     }
-    
+
     return added > 0;
 }
 
 void parole_media_list_save_list (ParoleMediaList *list)
 {
     gboolean save;
-    
+
     g_object_get (G_OBJECT (list->priv->conf),
                   "remember-playlist", &save,
                   NULL);
-    
+
     if ( save )
     {
         GSList *fileslist;
         gchar *history;
 
         history = xfce_resource_save_location (XFCE_RESOURCE_DATA, PAROLE_AUTO_SAVED_PLAYLIST , TRUE);
-        
+
         if ( !history )
         {
             g_warning ("Failed to save playlist");
             return;
         }
-        
+
         fileslist = parole_media_list_get_files (list);
         if ( g_slist_length (fileslist) > 0 )
         {
@@ -2154,7 +2154,7 @@ static gboolean  parole_media_list_dbus_add_files  (ParoleMediaList *list,
 /*
  * DBus server implementation
  */
-static void 
+static void
 parole_media_list_dbus_class_init (ParoleMediaListClass *klass)
 {
     dbus_g_object_type_install_info (G_TYPE_FROM_CLASS (klass),
@@ -2176,7 +2176,7 @@ static gboolean  parole_media_list_dbus_add_files (ParoleMediaList *list,
     TRACE ("Adding files for DBus request");
     gtk_window_present (GTK_WINDOW (gtk_widget_get_toplevel (GTK_WIDGET (list))));
     parole_media_list_add_files (list, in_files, enqueue);
-    
+
     return TRUE;
 }
 
@@ -2188,14 +2188,8 @@ void parole_media_list_grab_focus (ParoleMediaList *list)
 
 void repeat_action_state_changed (GSimpleAction *simple, GVariant *value, gpointer user_data)
 {
-    GVariant *state;
-    gboolean active;
+    gboolean active = g_simple_toggle_action_get_active(simple);
 
-    g_object_get (simple,
-        "state", &state,
-        NULL);
-        
-    active = g_variant_get_boolean(state);
     if (gtk_toggle_tool_button_get_active(GTK_TOGGLE_TOOL_BUTTON(media_list->priv->repeat_button)) != active)
     {
         gtk_toggle_tool_button_set_active(GTK_TOGGLE_TOOL_BUTTON(media_list->priv->repeat_button), active);
@@ -2205,7 +2199,7 @@ void repeat_action_state_changed (GSimpleAction *simple, GVariant *value, gpoint
 void repeat_toggled(GtkWidget *widget, GSimpleAction *simple)
 {
     gboolean active = gtk_toggle_tool_button_get_active(GTK_TOGGLE_TOOL_BUTTON(media_list->priv->repeat_button));
-    g_simple_action_set_state (simple, g_variant_new_boolean(active));
+    g_simple_toggle_action_set_active(simple, active);
 }
 
 void parole_media_list_connect_repeat_action (ParoleMediaList *list, GSimpleAction *simple)
@@ -2215,17 +2209,11 @@ void parole_media_list_connect_repeat_action (ParoleMediaList *list, GSimpleActi
     /* Connect changed event to modify action */
     g_signal_connect(G_OBJECT(list->priv->repeat_button), "clicked", G_CALLBACK(repeat_toggled), simple);
 }
-                                                                
+
 void shuffle_action_state_changed (GSimpleAction *simple, GVariant *value, gpointer user_data)
 {
-    GVariant *state;
-    gboolean active;
+    gboolean active = g_simple_toggle_action_get_active(simple);
 
-    g_object_get (simple,
-        "state", &state,
-        NULL);
-        
-    active = g_variant_get_boolean(state);
     if (gtk_toggle_tool_button_get_active(GTK_TOGGLE_TOOL_BUTTON(media_list->priv->shuffle_button)) != active)
     {
         gtk_toggle_tool_button_set_active(GTK_TOGGLE_TOOL_BUTTON(media_list->priv->shuffle_button), active);
@@ -2235,7 +2223,7 @@ void shuffle_action_state_changed (GSimpleAction *simple, GVariant *value, gpoin
 void shuffle_toggled(GtkWidget *widget, GSimpleAction *simple)
 {
     gboolean active = gtk_toggle_tool_button_get_active(GTK_TOGGLE_TOOL_BUTTON(media_list->priv->shuffle_button));
-    g_simple_action_set_state (simple, g_variant_new_boolean(active));
+    g_simple_toggle_action_set_active(simple, active);
 }
 
 void parole_media_list_connect_shuffle_action (ParoleMediaList *list, GSimpleAction *simple)
@@ -2243,5 +2231,5 @@ void parole_media_list_connect_shuffle_action (ParoleMediaList *list, GSimpleAct
     /* Connect state-changed event to modify widget */
     g_signal_connect(G_OBJECT(simple), "notify::state", G_CALLBACK(shuffle_action_state_changed), NULL);
     /* Connect changed event to modify action */
-    g_signal_connect(G_OBJECT(list->priv->repeat_button), "clicked", G_CALLBACK(shuffle_toggled), simple);
+    g_signal_connect(G_OBJECT(list->priv->shuffle_button), "clicked", G_CALLBACK(shuffle_toggled), simple);
 }
diff --git a/src/parole-medialist.h b/src/parole-medialist.h
index 285a0a8..bc20803 100644
--- a/src/parole-medialist.h
+++ b/src/parole-medialist.h
@@ -59,36 +59,36 @@ typedef struct ParoleMediaListPrivate ParoleMediaListPrivate;
 typedef struct
 {
     GtkVBox                     parent;
-    
+
     ParoleMediaListPrivate     *priv;
-    
+
 } ParoleMediaList;
 
 typedef struct
 {
     GtkVBoxClass    parent_class;
-    
+
     void            (*media_activated)              (ParoleMediaList *list,
                                                      GtkTreeRowReference *row);
-                                  
+
     void            (*media_cursor_changed)         (ParoleMediaList *list,
                                                      gboolean media_selected);
-                                     
+
     void            (*uri_opened)                   (ParoleMediaList *list,
                                                      const gchar *uri);
-                                     
+
     void            (*show_playlist)                (ParoleMediaList *list,
                                                      gboolean show_playlist);
-                                     
+
     void            (*gst_dvd_nav_message)          (ParoleMediaList *list,
                                                      gint gst_dvd_nav_message);
-                                                     
+
     void            (*iso_opened)                   (ParoleMediaList *list,
                                                      const gchar *filename);
-                                                     
+
     void            (*dvd_chapter_count)            (ParoleMediaList *list,
                                                      gint chapter_count);
-    
+
 } ParoleMediaListClass;
 
 GType               parole_media_list_get_type      (void) G_GNUC_CONST;
@@ -97,25 +97,25 @@ GtkWidget          *parole_media_list_get           (void);
 
 void                parole_media_list_load          (ParoleMediaList *list);
 
-void                    
-parole_media_list_set_playlist_view                 (ParoleMediaList *list, 
+void
+parole_media_list_set_playlist_view                 (ParoleMediaList *list,
                                                      gint view);
 
-void                    
+void
 parole_media_list_clear_disc_list                   (ParoleMediaList *list);
 
 void                parole_media_list_clear_list    (ParoleMediaList *list);
 
-gboolean            parole_media_list_add_by_path   (ParoleMediaList *list, 
-                                                     const gchar *path, 
+gboolean            parole_media_list_add_by_path   (ParoleMediaList *list,
+                                                     const gchar *path,
                                                      gboolean emit);
 
-gboolean            
+gboolean
 parole_media_list_is_selected_row                   (ParoleMediaList *list);
 
 gboolean            parole_media_list_is_empty      (ParoleMediaList *list);
 
-gint                
+gint
 parole_media_list_get_playlist_count                (ParoleMediaList *list);
 
 GtkTreeRowReference
@@ -124,7 +124,7 @@ GtkTreeRowReference
 GtkTreeRowReference
 *parole_media_list_get_selected_row                 (ParoleMediaList *list);
 
-ParoleFile         
+ParoleFile
 *parole_media_list_get_selected_file                (ParoleMediaList *list);
 
 void                parole_media_list_select_row    (ParoleMediaList *list,
@@ -146,7 +146,7 @@ void
 parole_media_list_set_row_playback_state            (ParoleMediaList *list,
                                                      GtkTreeRowReference *row,
                                                      gint state);
-                                     
+
 gchar              *parole_media_list_get_row_name  (ParoleMediaList *list,
                                                      GtkTreeRowReference *row);
 
@@ -154,7 +154,7 @@ void                parole_media_list_set_row_name  (ParoleMediaList *list,
                                                      GtkTreeRowReference *row,
                                                      const gchar *name);
 
-void                
+void
 parole_media_list_set_row_length                    (ParoleMediaList *list,
                                                      GtkTreeRowReference *row,
                                                      const gchar *length);
@@ -163,40 +163,40 @@ void                parole_media_list_open          (ParoleMediaList *list);
 
 void                parole_media_list_open_location (ParoleMediaList *list);
 
-void                parole_media_list_open_uri      (ParoleMediaList *list, 
+void                parole_media_list_open_uri      (ParoleMediaList *list,
                                                      const gchar *uri);
 
 gboolean            parole_media_list_add_files     (ParoleMediaList *list,
-                                                     gchar **filenames, 
+                                                     gchar **filenames,
                                                      gboolean enqueue);
-                                     
-void                
-parole_media_list_add_cdda_tracks                   (ParoleMediaList *list, 
+
+void
+parole_media_list_add_cdda_tracks                   (ParoleMediaList *list,
                                                      gint n_tracks);
 
-void                
-parole_media_list_add_dvd_chapters                  (ParoleMediaList *list, 
+void
+parole_media_list_add_dvd_chapters                  (ParoleMediaList *list,
                                                      gint n_chapters);
 
-GtkTreeRowReference 
-*parole_media_list_get_row_n                        (ParoleMediaList *list, 
+GtkTreeRowReference
+*parole_media_list_get_row_n                        (ParoleMediaList *list,
                                                      gint wanted_row);
 
 void                parole_media_list_save_list     (ParoleMediaList *list);
 
-void                parole_media_list_save_cb       (GtkWidget *widget, 
+void                parole_media_list_save_cb       (GtkWidget *widget,
                                                      ParoleMediaList *list);
 
 void                parole_media_list_grab_focus    (ParoleMediaList *list);
-                                                     
+
 void
 parole_media_list_connect_repeat_action             (ParoleMediaList *list,
                                                      GSimpleAction *simple);
-                                                     
+
 void
 parole_media_list_connect_shuffle_action            (ParoleMediaList *list,
                                                      GSimpleAction *simple);
-                                                                
+
 void parole_media_list_add_dvd (ParoleMediaList *list, gchar *dvd_name);
 
 
diff --git a/src/parole-player.c b/src/parole-player.c
index 6bb8247..7fa99cc 100644
--- a/src/parole-player.c
+++ b/src/parole-player.c
@@ -77,8 +77,9 @@ int GTK_ICON_SIZE_ARTWORK_FALLBACK;
 GSimpleAction *playpause_action;
 GSimpleAction *previous_action;
 GSimpleAction *next_action;
+gboolean block_playlist_updates = FALSE;
 
-/* With the loss of GtkAction and the inability to pass objects or pointers 
+/* With the loss of GtkAction and the inability to pass objects or pointers
  * with GAction, we'll leave a reference to ParolePlayer on the outside
  * for now. */
 ParolePlayer *parole_player = NULL;
@@ -111,9 +112,9 @@ get_time_string (gchar *timestring, gint total_seconds)
 static void parole_player_dbus_class_init           (ParolePlayerClass *klass);
 static void parole_player_dbus_init                 (ParolePlayer *player);
 
-static void parole_player_disc_selected_cb          (ParoleDisc *disc, 
-                                                     const gchar *uri, 
-                                                     const gchar *device, 
+static void parole_player_disc_selected_cb          (ParoleDisc *disc,
+                                                     const gchar *uri,
+                                                     const gchar *device,
                                                      ParolePlayer *player);
 
 static void parole_player_select_custom_subtitle    (GtkMenuItem *widget, gpointer data);
@@ -125,97 +126,97 @@ static gboolean parole_audiobox_expose_event        (GtkWidget *w, GdkEventExpos
 /*
  * GtkBuilder Callbacks
  */
-void        on_content_area_size_allocate           (GtkWidget *widget, 
-                                                     GtkAllocation *allocation, 
+void        on_content_area_size_allocate           (GtkWidget *widget,
+                                                     GtkAllocation *allocation,
                                                      ParolePlayer *player);
 
- 
-gboolean    parole_player_configure_event_cb        (GtkWidget *widget, 
-                                                     GdkEventConfigure *ev, 
+
+gboolean    parole_player_configure_event_cb        (GtkWidget *widget,
+                                                     GdkEventConfigure *ev,
                                                      ParolePlayer *player);
-                             
-gboolean    parole_player_range_button_press        (GtkWidget *widget, 
-                                                     GdkEventButton *ev, 
+
+gboolean    parole_player_range_button_press        (GtkWidget *widget,
+                                                     GdkEventButton *ev,
                                                      ParolePlayer *player);
 
 gboolean    parole_player_range_button_release      (GtkWidget *widget,
                                                      GdkEventButton *ev,
                                                      ParolePlayer *player);
 
-void        parole_player_range_value_changed       (GtkRange *range, 
+void        parole_player_range_value_changed       (GtkRange *range,
                                                      ParolePlayer *player);
-                                                     
+
 void        parole_player_playpause_action_cb       (GSimpleAction *action);
 
-void        parole_player_pause_clicked             (GtkButton *button, 
+void        parole_player_pause_clicked             (GtkButton *button,
                                                      ParolePlayer *player);
 
 void        parole_player_next_action_cb            (GSimpleAction *action);
-                             
+
 void        parole_player_previous_action_cb        (GSimpleAction *action);
-                                                     
+
 void        parole_player_toggle_playlist_action_cb (GSimpleAction *action);
-                                                     
+
 void        parole_player_fullscreen_action_cb      (GSimpleAction *action);
 
-void        parole_player_seekf_cb                  (GtkWidget *widget, 
-                                                     ParolePlayer *player, 
+void        parole_player_seekf_cb                  (GtkWidget *widget,
+                                                     ParolePlayer *player,
                                                      gdouble seek);
 
-void        parole_player_seekb_cb                  (GtkWidget *widget, 
-                                                     ParolePlayer *player, 
+void        parole_player_seekb_cb                  (GtkWidget *widget,
+                                                     ParolePlayer *player,
                                                      gdouble seek);
-                             
+
 gboolean    parole_player_window_state_event        (GtkWidget *widget,
                                                      GdkEventWindowState *event,
                                                      ParolePlayer *player);
 
-void        parole_player_destroy_cb                (GObject *window, 
+void        parole_player_destroy_cb                (GObject *window,
                                                      ParolePlayer *player);
 
-gboolean    parole_player_delete_event_cb           (GtkWidget *widget, 
+gboolean    parole_player_delete_event_cb           (GtkWidget *widget,
                                                      GdkEvent *ev,
                                                      ParolePlayer *player);
-                             
-void        parole_player_reset_controls            (ParolePlayer *player, 
+
+void        parole_player_reset_controls            (ParolePlayer *player,
                                                      gboolean fullscreen);
 
 /*Menu items callbacks*/
-void        parole_player_menu_open_location_cb     (GtkWidget *widget, 
+void        parole_player_menu_open_location_cb     (GtkWidget *widget,
                                                      ParolePlayer *player);
 
-void        parole_player_menu_add_cb               (GtkWidget *widget, 
+void        parole_player_menu_add_cb               (GtkWidget *widget,
                                                      ParolePlayer *player);
-                             
+
 void        parole_player_media_menu_select_cb      (GtkMenuItem *widget,
                                                      ParolePlayer *player);
-                             
+
 void        parole_player_save_playlist_cb          (GtkWidget *widget,
                                                      ParolePlayer *player);
 
 void        parole_player_menu_exit_cb              (GtkWidget *widget,
                                                      ParolePlayer *player);
 
-void        parole_player_volume_up                 (GtkWidget *widget, 
+void        parole_player_volume_up                 (GtkWidget *widget,
                                                      ParolePlayer *player);
 
-void        parole_player_volume_down               (GtkWidget *widget, 
+void        parole_player_volume_down               (GtkWidget *widget,
                                                      ParolePlayer *player);
 
-void        parole_player_volume_mute               (GtkWidget *widget, 
+void        parole_player_volume_mute               (GtkWidget *widget,
                                                      ParolePlayer *player);
 
 void        parole_player_open_preferences_cb       (GtkWidget *widget,
                                                      ParolePlayer *player);
 
-void        parole_player_volume_value_changed_cb   (GtkScaleButton *widget, 
+void        parole_player_volume_value_changed_cb   (GtkScaleButton *widget,
                                                      gdouble value,
                                                      ParolePlayer *player);
 
 gboolean    parole_player_volume_scroll_event_cb    (GtkWidget *widget,
                                                      GdkEventScroll *ev,
                                                      ParolePlayer *player);
-                             
+
 static void parole_player_clear_subtitles           (ParolePlayer *player);
 
 static void parole_player_clear_audio_tracks        (ParolePlayer *player);
@@ -240,83 +241,83 @@ void        ratio_16_9_toggled_cb                   (GtkWidget *widget,
 
 void        ratio_20_9_toggled_cb                   (GtkWidget *widget,
                                                      ParolePlayer *player);
-                             
-void        parole_player_set_playlist_visible      (ParolePlayer *player, 
+
+void        parole_player_set_playlist_visible      (ParolePlayer *player,
                                                      gboolean visibility);
-                             
-gboolean    parole_player_gst_widget_button_press   (GtkWidget *widget, 
-                                                     GdkEventButton *ev, 
+
+gboolean    parole_player_gst_widget_button_press   (GtkWidget *widget,
+                                                     GdkEventButton *ev,
                                                      ParolePlayer *player);
-                                                     
-gboolean    parole_player_gst_widget_button_release (GtkWidget *widget, 
-                                                     GdkEventButton *ev, 
+
+gboolean    parole_player_gst_widget_button_release (GtkWidget *widget,
+                                                     GdkEventButton *ev,
                                                      ParolePlayer *player);
-                                                     
+
 gboolean
-parole_player_gst_widget_motion_notify_event        (GtkWidget *widget, 
-                                                     GdkEventMotion *ev, 
+parole_player_gst_widget_motion_notify_event        (GtkWidget *widget,
+                                                     GdkEventMotion *ev,
                                                      ParolePlayer *player);
 
 void        parole_show_about                       (GtkWidget *widget,
                                                      ParolePlayer *player);
-                            
+
 void        parole_player_set_audiotrack_radio_menu_item_selected(
-                                                     ParolePlayer *player, 
+                                                     ParolePlayer *player,
                                                      gint audio_index);
-                            
+
 void        parole_player_set_subtitle_radio_menu_item_selected(
-                                                     ParolePlayer *player, 
+                                                     ParolePlayer *player,
                                                      gint sub_index);
-                            
-void        
-parole_player_combo_box_audiotrack_changed_cb       (GtkWidget *widget, 
+
+void
+parole_player_combo_box_audiotrack_changed_cb       (GtkWidget *widget,
                                                      ParolePlayer *player);
-                            
-void        
-parole_player_combo_box_subtitles_changed_cb        (GtkWidget *widget, 
+
+void
+parole_player_combo_box_subtitles_changed_cb        (GtkWidget *widget,
                                                      ParolePlayer *player);
-                            
-static void 
-parole_player_audiotrack_radio_menu_item_changed_cb (GtkWidget *widget, 
+
+static void
+parole_player_audiotrack_radio_menu_item_changed_cb (GtkWidget *widget,
                                                      ParolePlayer *player);
 
-static void 
-parole_player_subtitles_radio_menu_item_changed_cb  (GtkWidget *widget, 
+static void
+parole_player_subtitles_radio_menu_item_changed_cb  (GtkWidget *widget,
                                                      ParolePlayer *player);
 
-static void 
-parole_player_dvd_chapter_count_change_cb           (ParoleGst *gst, 
-                                                     gint chapter_count, 
+static void
+parole_player_dvd_chapter_count_change_cb           (ParoleGst *gst,
+                                                     gint chapter_count,
                                                      ParolePlayer *player);
 
-static void parole_player_dvd_chapter_change_cb     (ParoleGst *gst, 
-                                                     gint chapter_count, 
+static void parole_player_dvd_chapter_change_cb     (ParoleGst *gst,
+                                                     gint chapter_count,
                                                      ParolePlayer *player);
-                                                     
-void        parole_player_dvd_menu_activated        (GtkMenuItem *widget, 
+
+void        parole_player_dvd_menu_activated        (GtkMenuItem *widget,
                                                      ParolePlayer *player);
 
-void        parole_player_dvd_title_activated       (GtkMenuItem *widget, 
+void        parole_player_dvd_title_activated       (GtkMenuItem *widget,
                                                      ParolePlayer *player);
 
-void        parole_player_dvd_audio_activated       (GtkMenuItem *widget, 
+void        parole_player_dvd_audio_activated       (GtkMenuItem *widget,
                                                      ParolePlayer *player);
 
-void        parole_player_dvd_angle_activated       (GtkMenuItem *widget, 
+void        parole_player_dvd_angle_activated       (GtkMenuItem *widget,
                                                      ParolePlayer *player);
 
-void        parole_player_dvd_chapter_activated     (GtkMenuItem *widget, 
+void        parole_player_dvd_chapter_activated     (GtkMenuItem *widget,
                                                      ParolePlayer *player);
 
-gboolean    parole_player_key_press                 (GtkWidget *widget, 
-                                                     GdkEventKey *ev, 
+gboolean    parole_player_key_press                 (GtkWidget *widget,
+                                                     GdkEventKey *ev,
                                                      ParolePlayer *player);
-                                                     
+
 void        parole_player_widget_activate_action    (GtkWidget *widget,
                                                      GSimpleAction *action);
-                                                     
+
 gboolean parole_player_hide_controls (gpointer data);
-                             
+
 static GtkTargetEntry target_entry[] =
 {
     { "STRING",        0, 0 },
@@ -335,20 +336,20 @@ struct ParolePlayerPrivate
     ParoleMediaList    *list;
     ParoleDisc         *disc;
     ParoleScreenSaver  *screen_saver;
-    
+
     ParoleConf         *conf;
     ParoleConfDialog   *settings_dialog;
 
     XfceSMClient       *sm_client;
     gchar              *client_id;
-    
+
 #ifdef HAVE_XF86_KEYSYM
     ParoleButton       *button;
 #endif
-    
+
     GtkFileFilter      *video_filter;
     GtkRecentManager   *recent;
-    
+
     gdouble             last_volume;
 
     GtkWidget          *window;
@@ -360,7 +361,7 @@ struct ParolePlayerPrivate
     gint                last_h, last_w;
     /* HPaned handle-width for calculating size with playlist */
     gint                handle_width;
-    
+
     /* Menubar */
     GtkWidget          *menu_bar;
     GtkWidget          *recent_menu;
@@ -383,7 +384,9 @@ struct ParolePlayerPrivate
     GtkWidget          *mute;
     GtkWidget          *showhide_playlist_button;
     GtkWidget          *showhide_playlist_menu_item;
-    
+    GtkWidget          *repeat_menu_item;
+    GtkWidget          *shuffle_menu_item;
+
     /* Infobar */
     GtkWidget          *infobar;
     /* Audio Track */
@@ -401,7 +404,7 @@ struct ParolePlayerPrivate
     GtkWidget          *subtitles_group;
     GtkWidget          *subtitles_menu_custom;
     GtkWidget          *subtitles_menu;
-    
+
     /* Output Widgets */
     GtkWidget          *eventbox_output;
     /* Idle Logo */
@@ -417,7 +420,7 @@ struct ParolePlayerPrivate
 
     /* Current media-list row reference */
     GtkTreeRowReference *row;
-    
+
     /* GStreamer */
     GtkWidget          *gst;
     ParoleMediaType     current_media_type;
@@ -435,7 +438,7 @@ struct ParolePlayerPrivate
     GSimpleAction      *toggle_playlist_action;
     GSimpleAction      *toggle_repeat_action;
     GSimpleAction      *toggle_shuffle_action;
-    
+
     gboolean            exit;
 };
 
@@ -500,36 +503,10 @@ void        parole_player_widget_activate_action    (GtkWidget *widget,
     g_action_activate (G_ACTION(action), NULL);
 }
 
-GSimpleAction* g_simple_toggle_action_new (const gchar *action_name,
-                                           const GVariantType *parameter_type)
-{
-    GSimpleAction *simple;
-    
-    simple = g_simple_action_new_stateful (action_name, parameter_type,
-                                           g_variant_new_boolean (FALSE));
-                                           
-    return simple;
-}
-
-void g_simple_toggle_action_set_active (GSimpleAction *simple, gboolean active)
-{
-    g_simple_action_set_state (simple, g_variant_new_boolean(active));
-}
-
-gboolean g_simple_toggle_action_get_active (GSimpleAction *simple)
-{
-    GVariant *state;
-
-    g_object_get (simple,
-        "state", &state,
-        NULL);
-        
-    return g_variant_get_boolean(state);
-}
-
 void toggle_action_cb (GtkWidget *widget, GSimpleAction *action)
 {
-    g_simple_toggle_action_set_active (action, 
+    if (!block_playlist_updates)
+    g_simple_toggle_action_set_active (action,
                                        !g_simple_toggle_action_get_active(action));
 }
 
@@ -537,12 +514,12 @@ void parole_player_set_playlist_visible (ParolePlayer *player, gboolean visibili
 {
     gint window_w, window_h, playlist_w;
     GtkAllocation *allocation = g_new0 (GtkAllocation, 1);
-    
+
     if (gtk_widget_get_visible (player->priv->playlist_nt) == visibility)
         return;
 
     gtk_window_get_size (GTK_WINDOW (player->priv->window), &window_w, &window_h);
-    
+
     /* Get the playlist width.  If we fail to get it, use the default 220. */
     gtk_widget_get_allocation( GTK_WIDGET( player->priv->playlist_nt ), allocation );
     playlist_w = allocation->width;
@@ -554,11 +531,11 @@ void parole_player_set_playlist_visible (ParolePlayer *player, gboolean visibili
     {
         if ( !player->priv->full_screen )
             gtk_window_resize(GTK_WINDOW (player->priv->window), window_w+playlist_w+player->priv->handle_width, window_h);
-        
+
         gtk_widget_show (player->priv->playlist_nt);
         gtk_menu_item_set_label (GTK_MENU_ITEM(player->priv->showhide_playlist_menu_item), _("Hide playlist") );
         gtk_widget_set_tooltip_text (GTK_WIDGET(player->priv->showhide_playlist_button), _("Hide playlist") );
-        g_object_set   (G_OBJECT (player->priv->conf),    
+        g_object_set   (G_OBJECT (player->priv->conf),
                         "showhide-playlist", TRUE,
                         NULL);
     }
@@ -567,10 +544,10 @@ void parole_player_set_playlist_visible (ParolePlayer *player, gboolean visibili
         gtk_widget_hide (player->priv->playlist_nt);
         gtk_menu_item_set_label (GTK_MENU_ITEM(player->priv->showhide_playlist_menu_item), _("Show playlist") );
         gtk_widget_set_tooltip_text (GTK_WIDGET(player->priv->showhide_playlist_button), _("Show playlist") );
-        g_object_set   (G_OBJECT (player->priv->conf),    
+        g_object_set   (G_OBJECT (player->priv->conf),
                         "showhide-playlist", FALSE,
                         NULL);
-        
+
         if ( !player->priv->full_screen )
             gtk_window_resize(GTK_WINDOW (player->priv->window), window_w-playlist_w-player->priv->handle_width, window_h);
     }
@@ -579,7 +556,7 @@ void parole_player_set_playlist_visible (ParolePlayer *player, gboolean visibili
 void parole_player_toggle_playlist_action_cb (GSimpleAction *action)
 {
     gboolean   visible;
-    
+
     visible = gtk_widget_get_visible (parole_player->priv->playlist_nt);
 
     parole_player_set_playlist_visible (parole_player, !visible );
@@ -589,16 +566,16 @@ static void
 parole_player_change_range_value (ParolePlayer *player, gdouble value)
 {
     gchar pos_text[128];
-    
+
     if ( !player->priv->user_seeking )
     {
         player->priv->internal_range_change = TRUE;
-        
+
         gtk_range_set_value (GTK_RANGE (player->priv->range), value);
 
         player->priv->internal_range_change = FALSE;
     }
-    
+
     get_time_string (pos_text, value);
     gtk_label_set_text (GTK_LABEL (player->priv->label_elapsed), pos_text);
 }
@@ -612,7 +589,7 @@ parole_player_reset (ParolePlayer *player)
     gtk_widget_hide(GTK_WIDGET(player->priv->dvd_menu));
     player->priv->audio_list = NULL;
     player->priv->subtitle_list = NULL;
-    
+
     gtk_widget_hide(GTK_WIDGET(player->priv->infobar));
     parole_player_change_range_value (player, 0);
 
@@ -622,7 +599,7 @@ parole_player_reset (ParolePlayer *player)
         gtk_tree_row_reference_free (player->priv->row);
         player->priv->row = NULL;
     }
-    
+
     if (player->priv->current_media_type == PAROLE_MEDIA_TYPE_DVD)
     {
         TRACE("CLEAR DVD LIST");
@@ -630,9 +607,9 @@ parole_player_reset (ParolePlayer *player)
         TRACE("END CLEAR DVD LIST");
     }
     player->priv->current_media_type = PAROLE_MEDIA_TYPE_UNKNOWN;
-    
+
     parole_media_list_set_playlist_view(player->priv->list, PAROLE_MEDIA_LIST_PLAYLIST_VIEW_STANDARD);
-    
+
     g_simple_action_set_enabled (player->priv->toggle_repeat_action, TRUE);
     g_simple_action_set_enabled (player->priv->toggle_shuffle_action, TRUE);
 }
@@ -664,7 +641,7 @@ void
 parole_player_dvd_audio_activated (GtkMenuItem *widget, ParolePlayer *player)
 {
     parole_gst_send_navigation_command (PAROLE_GST(player->priv->gst), GST_DVD_AUDIO_MENU);
-    
+
 }
 
 void
@@ -712,10 +689,10 @@ parole_player_clear_chapters (ParolePlayer *player)
 {
     GList *menu_items, *menu_iter;
     gint counter = 0;
-    
+
     /* Clear the chapter menu options */
     menu_items = gtk_container_get_children( GTK_CONTAINER (player->priv->chapters_menu) );
-    
+
     for (menu_iter = menu_items; menu_iter != NULL; menu_iter = g_list_next(menu_iter))
     {
         if (counter >= 2)
@@ -745,7 +722,7 @@ parole_player_update_chapters (ParolePlayer *player, gint chapter_count)
         gtk_widget_show (menu_item);
 
         g_object_set_data(G_OBJECT(menu_item), "chapter-id", g_strdup_printf("%i", chapter_id+1));
-        
+
         gtk_menu_shell_append (GTK_MENU_SHELL (player->priv->chapters_menu), menu_item);
         g_signal_connect   (menu_item, "activate",
                             G_CALLBACK (parole_player_chapter_selection_changed_cb), player);
@@ -758,17 +735,17 @@ parole_player_clear_subtitles (ParolePlayer *player)
     GtkTreeIter iter;
     GList *menu_items, *menu_iter;
     gint counter = 0;
-    
+
     /* Clear the InfoBar Combobox */
     gtk_list_store_clear(player->priv->liststore_subtitles);
     gtk_list_store_append(GTK_LIST_STORE(player->priv->liststore_subtitles), &iter);
     gtk_list_store_set(GTK_LIST_STORE(player->priv->liststore_subtitles), &iter, 0, _("None"), -1);
     gtk_combo_box_set_active( GTK_COMBO_BOX(player->priv->combobox_subtitles), 0 );
-    
+
     /* Clear the subtitle menu options */
     menu_items = gtk_container_get_children( GTK_CONTAINER (player->priv->subtitles_menu) );
     gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(player->priv->subtitles_group), TRUE);
-    
+
     for (menu_iter = menu_items; menu_iter != NULL; menu_iter = g_list_next(menu_iter))
     {
         if (counter >= 4)
@@ -783,10 +760,10 @@ parole_player_set_subtitles_list (ParolePlayer *player, GList *subtitle_list)
 {
     GList *l;
     gchar* language;
-    
+
     GtkTreeIter iter;
     gint counter = 0;
-    
+
     GtkWidget *menu_item;
 
     parole_player_clear_subtitles( player );
@@ -802,16 +779,16 @@ parole_player_set_subtitles_list (ParolePlayer *player, GList *subtitle_list)
 
         menu_item = gtk_radio_menu_item_new_with_label_from_widget (GTK_RADIO_MENU_ITEM(player->priv->subtitles_group), language);
         gtk_widget_show (menu_item);
-        
+
         gtk_menu_shell_append (GTK_MENU_SHELL (player->priv->subtitles_menu), menu_item);
         g_signal_connect   (menu_item, "activate",
                             G_CALLBACK (parole_player_subtitles_radio_menu_item_changed_cb), player);
-        
+
         g_free (language);
-        
+
         counter++;
     }
-    
+
     if (g_list_length (subtitle_list) != 1) {
         gtk_widget_show(player->priv->infobar);
     }
@@ -825,19 +802,19 @@ parole_player_clear_audio_tracks (ParolePlayer *player)
 
     gtk_list_store_clear(player->priv->liststore_audiotrack);
     player->priv->audio_group = NULL;
-    
+
     /* Clear the subtitle menu options */
-    
+
     menu_items = gtk_container_get_children( GTK_CONTAINER (player->priv->languages_menu) );
-    
+
     for (menu_iter = menu_items; menu_iter != NULL; menu_iter = g_list_next(menu_iter))
         gtk_widget_destroy(GTK_WIDGET(menu_iter->data));
     g_list_free(menu_items);
-    
+
     empty_item = gtk_menu_item_new_with_label(_("Empty"));
     gtk_widget_set_sensitive( empty_item, FALSE );
     gtk_widget_show( empty_item );
-    
+
     gtk_menu_shell_append (GTK_MENU_SHELL (player->priv->languages_menu), empty_item);
 }
 
@@ -847,51 +824,51 @@ parole_player_set_audio_list (ParolePlayer *player, GList *audio_list)
     GList *menu_iter;
     GList *l;
     gchar* language;
-    
+
     GtkTreeIter iter;
-    
+
     GtkWidget *menu_item;
-    
+
     parole_player_clear_audio_tracks( player );
 
     menu_iter = gtk_container_get_children( GTK_CONTAINER (player->priv->languages_menu) );
-    
+
     gtk_widget_destroy(GTK_WIDGET(menu_iter->data));
     g_list_free(menu_iter);
-    
+
     player->priv->audio_list = audio_list;
-    
+
     for (l = audio_list; l != NULL; l = l->next)
     {
         language = g_strdup (l->data);
-    
+
         gtk_list_store_append(GTK_LIST_STORE(player->priv->liststore_audiotrack), &iter);
         gtk_list_store_set(GTK_LIST_STORE(player->priv->liststore_audiotrack), &iter, 0, language, -1);
-        
+
         if (player->priv->audio_group == NULL)
         {
             player->priv->audio_group = GTK_WIDGET (gtk_radio_menu_item_new_with_label (NULL, language));
             gtk_widget_show (GTK_WIDGET(player->priv->audio_group));
             gtk_menu_shell_append (GTK_MENU_SHELL (player->priv->languages_menu), GTK_WIDGET(player->priv->audio_group));
             gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(player->priv->audio_group), TRUE);
-            
+
             g_signal_connect (player->priv->audio_group, "activate",
                               G_CALLBACK (parole_player_audiotrack_radio_menu_item_changed_cb), player);
         } else {
-            
+
             menu_item = gtk_radio_menu_item_new_with_label_from_widget (GTK_RADIO_MENU_ITEM(player->priv->audio_group), language);
             gtk_widget_show (menu_item);
             gtk_menu_shell_append (GTK_MENU_SHELL (player->priv->languages_menu), menu_item);
-            
+
             g_signal_connect (menu_item, "activate",
                               G_CALLBACK (parole_player_audiotrack_radio_menu_item_changed_cb), player);
         }
-        
+
         g_free (language);
     }
-    
+
     gtk_combo_box_set_active( GTK_COMBO_BOX(player->priv->combobox_audiotrack), 0 );
-    
+
     if (g_list_length (audio_list) >= 2) {
         gtk_widget_set_sensitive( GTK_WIDGET( player->priv->combobox_audiotrack ), TRUE );
         gtk_widget_show(player->priv->infobar);
@@ -905,14 +882,14 @@ static void
 parole_player_update_audio_tracks (ParolePlayer *player, ParoleGst *gst)
 {
     GList * list = gst_get_lang_list_for_type (gst, "AUDIO");
-    
+
     if (parole_sublang_equal_lists (player->priv->audio_list, list) == TRUE)
     {
         return;
     }
-    
+
     parole_player_set_audio_list (player, list);
-    
+
     g_free (list->data);
     g_list_free (list);
     list = NULL;
@@ -922,19 +899,19 @@ static void
 parole_player_update_subtitles (ParolePlayer *player, ParoleGst *gst)
 {
     GList * list = gst_get_lang_list_for_type (gst, "TEXT");
-    
+
     guint64 sub_index;
     gboolean sub_enabled;
-    
+
     sub_index = 0;
-    
+
     g_object_get (G_OBJECT (player->priv->conf),
                   "enable-subtitle", &sub_enabled,
                   NULL);
-          
+
     if (sub_enabled)
         sub_index = 1;
-    
+
     if (parole_sublang_equal_lists (player->priv->subtitle_list, list) == TRUE)
     {
         if (g_list_length (list) == 0)
@@ -945,9 +922,9 @@ parole_player_update_subtitles (ParolePlayer *player, ParoleGst *gst)
     }
 
     parole_player_set_subtitles_list (player, list);
-    
+
     gtk_combo_box_set_active( GTK_COMBO_BOX(player->priv->combobox_subtitles), sub_index );
-    
+
     if (g_list_length (list) != 1) {
         gtk_widget_show(player->priv->infobar);
     }
@@ -965,9 +942,9 @@ parole_player_update_languages (ParolePlayer *player, ParoleGst *gst)
         {
             parole_player_update_audio_tracks(player, gst);
             parole_player_update_subtitles(player, gst);
-            
+
             /* Enable custom subtitles for video as long as its not a DVD. */
-            gtk_widget_set_sensitive(player->priv->subtitles_menu_custom, 
+            gtk_widget_set_sensitive(player->priv->subtitles_menu_custom,
                 player->priv->current_media_type != PAROLE_MEDIA_TYPE_DVD);
         }
         else
@@ -979,7 +956,7 @@ parole_player_update_languages (ParolePlayer *player, ParoleGst *gst)
 static void
 parole_player_show_audiobox (ParolePlayer *player)
 {
-    /* Only show the audiobox if we're sure there's no video playing and 
+    /* Only show the audiobox if we're sure there's no video playing and
        visualizations are disabled. */
     gtk_widget_hide(player->priv->logo_image);
     if (!gst_get_has_video ( PAROLE_GST(player->priv->gst) ) &&
@@ -1008,15 +985,15 @@ parole_player_select_custom_subtitle (GtkMenuItem *widget, gpointer data)
 {
     ParolePlayer  *player;
     ParoleFile    *file;
-    
+
     GtkWidget     *chooser, *button, *img;
     GtkFileFilter *filter, *all_files;
     gint           response;
-    
+
     const gchar   *folder;
     gchar         *sub = NULL;
     gchar         *uri = NULL;
-    
+
     player = PAROLE_PLAYER(data);
 
     /* Build the FileChooser dialog for subtitle selection. */
@@ -1031,17 +1008,17 @@ parole_player_select_custom_subtitle (GtkMenuItem *widget, gpointer data)
     button = gtk_dialog_add_button(GTK_DIALOG(chooser), _("Open"), GTK_RESPONSE_OK);
     img = gtk_image_new_from_icon_name("document-open", GTK_ICON_SIZE_BUTTON);
     gtk_button_set_image(GTK_BUTTON(button), img);
-                
+
     gtk_file_chooser_set_select_multiple (GTK_FILE_CHOOSER (chooser), FALSE);
     gtk_file_chooser_set_local_only (GTK_FILE_CHOOSER (chooser), FALSE);
-    
+
     g_object_get   (G_OBJECT (player->priv->conf),
                     "media-chooser-folder", &folder,
                     NULL);
-    
+
     if ( folder )
         gtk_file_chooser_set_current_folder (GTK_FILE_CHOOSER (chooser), folder);
-    
+
     /* Subtitle format filter */
     filter = gtk_file_filter_new ();
     gtk_file_filter_set_name (filter, _("Subtitle Files"));
@@ -1053,7 +1030,7 @@ parole_player_select_custom_subtitle (GtkMenuItem *widget, gpointer data)
     gtk_file_filter_add_pattern (filter, "*.ssa");
     gtk_file_filter_add_pattern (filter, "*.ass");
     gtk_file_chooser_add_filter (GTK_FILE_CHOOSER (chooser), filter);
-    
+
     /* All files filter */
     all_files = gtk_file_filter_new ();
     gtk_file_filter_set_name (all_files, _("All files"));
@@ -1062,29 +1039,29 @@ parole_player_select_custom_subtitle (GtkMenuItem *widget, gpointer data)
 
     gtk_window_set_default_size (GTK_WINDOW (chooser), 680, 480);
 
-    /* Run the dialog, get the selected filename. */    
+    /* Run the dialog, get the selected filename. */
     response = gtk_dialog_run (GTK_DIALOG (chooser));
     if ( response == GTK_RESPONSE_OK )
         sub = gtk_file_chooser_get_filename (GTK_FILE_CHOOSER (chooser));
-    
+
     gtk_widget_destroy (chooser);
-    
+
     if ( sub )
     {
         /* Get the current playing file uri. */
         uri = parole_gst_get_file_uri(PAROLE_GST (player->priv->gst));
-        
+
         /* Reset the player. */
         parole_player_reset(player);
-        
+
         if ( g_str_has_prefix (uri, "file:/") )
         {
             TRACE ("Trying to play media file %s", uri);
             TRACE ("Trying to use subtitle file %s", sub);
             player->priv->updated_subs = TRUE;
-            
+
             file = parole_media_list_get_selected_file( player->priv->list );
-            
+
             /* Set the subtitles in gst as well as in the media list, for later
                retrieval. */
             if ( file )
@@ -1094,7 +1071,7 @@ parole_player_select_custom_subtitle (GtkMenuItem *widget, gpointer data)
                 parole_gst_play_uri (PAROLE_GST (player->priv->gst), uri, sub);
             }
         }
-        
+
         g_free (sub);
         g_free (uri);
     }
@@ -1108,21 +1085,21 @@ parole_player_media_activated_cb (ParoleMediaList *list, GtkTreeRowReference *ro
     GtkTreeModel *model;
 
     model = gtk_tree_row_reference_get_model (row);
-    
+
     if ( gtk_tree_model_get_iter (model, &iter, gtk_tree_row_reference_get_path (row)) )
     {
         gtk_tree_model_get (model, &iter, DATA_COL, &file, -1);
-    
+
     if ( file )
     {
         const gchar *sub = NULL;
         const gchar *uri;
         const gchar *directory = NULL;
         gint dvd_chapter;
-        
+
         uri = parole_file_get_uri (file);
         directory = parole_file_get_directory(file);
-        
+
         if ( g_str_has_prefix (uri, "dvd") )
         {
             parole_player_dvd_reset (player);
@@ -1134,7 +1111,7 @@ parole_player_media_activated_cb (ParoleMediaList *list, GtkTreeRowReference *ro
         }
         parole_player_reset (player);
         player->priv->row = gtk_tree_row_reference_copy (row);
-        
+
         if ( g_str_has_prefix (uri, "file:/") )
         {
             if ( parole_file_filter (player->priv->video_filter, file) )
@@ -1147,14 +1124,14 @@ parole_player_media_activated_cb (ParoleMediaList *list, GtkTreeRowReference *ro
         }
         TRACE ("Trying to play media file %s", uri);
         TRACE ("File content type %s", parole_file_get_content_type(file));
-        
-        
-        parole_gst_play_uri (PAROLE_GST (player->priv->gst), 
+
+
+        parole_gst_play_uri (PAROLE_GST (player->priv->gst),
                              parole_file_get_uri (file),
                              sub);
-        
+
         gtk_window_set_title (GTK_WINDOW (player->priv->window), parole_media_list_get_row_name (player->priv->list, player->priv->row));
-        
+
         if ( directory )
         {
             g_object_set (G_OBJECT (player->priv->conf),
@@ -1173,7 +1150,7 @@ parole_player_disc_selected_cb (ParoleDisc *disc, const gchar *uri, const gchar
     parole_player_reset (player);
     parole_gst_play_device_uri (PAROLE_GST (player->priv->gst), uri, device);
     player->priv->current_media_type = parole_gst_get_current_stream_type (PAROLE_GST (player->priv->gst));
-    
+
     if ( player->priv->current_media_type == PAROLE_MEDIA_TYPE_CDDA )
     {
         player->priv->wait_for_gst_disc_info = TRUE;
@@ -1216,27 +1193,27 @@ parole_player_recent_menu_clear_activated_cb (GtkWidget *widget, ParolePlayer *p
     GtkWidget *dlg;
     GtkWidget *clear_button;
     gint response;
-    
+
     dlg = gtk_message_dialog_new (GTK_WINDOW(player->priv->window),
                                   GTK_DIALOG_DESTROY_WITH_PARENT,
                                   GTK_MESSAGE_QUESTION,
                                   GTK_BUTTONS_NONE,
                                   NULL);
-                                  
-    gtk_message_dialog_set_markup  (GTK_MESSAGE_DIALOG(dlg), 
-                                    g_strdup_printf("<big><b>%s</b></big>", 
+
+    gtk_message_dialog_set_markup  (GTK_MESSAGE_DIALOG(dlg),
+                                    g_strdup_printf("<big><b>%s</b></big>",
                                     _("Clear Recent Items")));
-    gtk_message_dialog_format_secondary_text ( GTK_MESSAGE_DIALOG(dlg), 
+    gtk_message_dialog_format_secondary_text ( GTK_MESSAGE_DIALOG(dlg),
     _("Are you sure you wish to clear your recent items history?  This cannot be undone."));
-    
+
     gtk_dialog_add_button (GTK_DIALOG(dlg), _("Cancel"), 0);
     clear_button = gtk_dialog_add_button(GTK_DIALOG(dlg),
                                          "edit-clear",
                                          1);
     gtk_button_set_label( GTK_BUTTON(clear_button), _("Clear Recent Items") );
-    
+
     gtk_widget_show_all(dlg);
-    
+
     response = gtk_dialog_run(GTK_DIALOG(dlg));
     if (response == 1)
     {
@@ -1252,23 +1229,23 @@ parole_player_recent_menu_item_activated_cb (GtkWidget *widget, ParolePlayer *pl
     gchar *filename;
     gchar *filenames[] = {NULL, NULL};
     ParoleMediaList *list;
-    
+
     uri = gtk_recent_chooser_get_current_uri(GTK_RECENT_CHOOSER(widget));
-    
+
     filename = g_filename_from_uri(uri, NULL, NULL);
-    
-    if (g_file_test (filename, G_FILE_TEST_EXISTS)) 
+
+    if (g_file_test (filename, G_FILE_TEST_EXISTS))
     {
         gtk_recent_manager_add_item (player->priv->recent, uri);
-    
+
         filenames[0] = g_strdup(filename);
-        
+
         list = parole_player_get_media_list (player);
         parole_media_list_add_files (list, filenames, FALSE);
-        
+
         g_free(filenames[0]);
     }
-    
+
     g_free(filename);
     g_free(uri);
 }
@@ -1278,20 +1255,20 @@ parole_player_media_cursor_changed_cb (ParoleMediaList *list, gboolean media_sel
 {
     if (player->priv->state < PAROLE_STATE_PAUSED)
     {
-    g_simple_action_set_enabled (player->priv->media_playpause_action, 
+    g_simple_action_set_enabled (player->priv->media_playpause_action,
                                  media_selected || !parole_media_list_is_empty (player->priv->list));
     }
-    
-    g_simple_action_set_enabled (player->priv->media_previous_action, 
+
+    g_simple_action_set_enabled (player->priv->media_previous_action,
                                  parole_media_list_get_playlist_count (player->priv->list) > 1);
-    g_simple_action_set_enabled (player->priv->media_next_action, 
+    g_simple_action_set_enabled (player->priv->media_next_action,
                                  parole_media_list_get_playlist_count (player->priv->list) > 1);
 }
 
 static void
 parole_player_media_list_show_playlist_cb (ParoleMediaList *list, gboolean show_playlist, ParolePlayer *player)
 {
-    parole_media_list_set_playlist_view(player->priv->list, 
+    parole_media_list_set_playlist_view(player->priv->list,
                                         player->priv->current_media_type == PAROLE_MEDIA_TYPE_DVD);
     parole_player_set_playlist_visible (player, show_playlist);
 }
@@ -1302,7 +1279,7 @@ parole_player_media_progressed_cb (ParoleGst *gst, const ParoleStream *stream, g
 #ifdef DEBUG
     g_return_if_fail (value > 0);
 #endif
-    
+
     if (!player->priv->user_seeking)
     {
         parole_player_change_range_value (player, value);
@@ -1313,11 +1290,11 @@ static void
 parole_player_seekable_notify (ParoleStream *stream, GParamSpec *spec, ParolePlayer *player)
 {
     gboolean seekable;
-    
+
     g_object_get (G_OBJECT (stream),
                   "seekable", &seekable,
                   NULL);
-          
+
     gtk_widget_set_tooltip_text (GTK_WIDGET (player->priv->range), seekable ? NULL : _("Media stream is not seekable"));
     gtk_widget_set_sensitive (GTK_WIDGET (player->priv->range), seekable);
 }
@@ -1326,7 +1303,7 @@ static void
 parole_player_set_playpause_button_from_stock (ParolePlayer *player, const gchar *stock_id)
 {
     gchar *icon_name = NULL, *label = NULL, *tooltip = NULL;
-    
+
     if (g_strcmp0(stock_id, "gtk-media-play") == 0) {
         icon_name = g_strdup("media-playback-start-symbolic");
         label = _("_Play");
@@ -1336,7 +1313,7 @@ parole_player_set_playpause_button_from_stock (ParolePlayer *player, const gchar
         label = _("_Pause");
         tooltip = _("Pause");
     }
-    
+
     gtk_image_set_from_icon_name(GTK_IMAGE(player->priv->playpause_image), icon_name, 24);
     gtk_widget_set_tooltip_text(GTK_WIDGET(player->priv->playpause_button), tooltip);
 }
@@ -1353,19 +1330,19 @@ parole_player_save_uri (ParolePlayer *player, const ParoleStream *stream)
     g_object_get (G_OBJECT (stream),
                   "uri", &uri,
                   NULL);
-    
+
     g_object_get (G_OBJECT (stream),
                   "media-type", &media_type,
                   NULL);
-          
+
     if ( media_type == PAROLE_MEDIA_TYPE_LOCAL_FILE )
     {
         gtk_recent_manager_add_item (player->priv->recent, uri);
         goto out;
     }
-    
+
     lines = parole_get_history ();
-    
+
     if (lines )
     {
     for ( i = 0; lines[i]; i++)
@@ -1374,10 +1351,10 @@ parole_player_save_uri (ParolePlayer *player, const ParoleStream *stream)
         {
         save = FALSE;
         break;
-        }   
+        }
     }
     }
-    
+
     if ( media_type != PAROLE_MEDIA_TYPE_CDDA && media_type != PAROLE_MEDIA_TYPE_DVD )
     {
         if ( save )
@@ -1385,7 +1362,7 @@ parole_player_save_uri (ParolePlayer *player, const ParoleStream *stream)
             parole_insert_line_history (uri);
         }
     }
-    
+
     g_strfreev (lines);
 out:
     g_free (uri);
@@ -1397,27 +1374,27 @@ parole_player_playing (ParolePlayer *player, const ParoleStream *stream)
     gint64 duration;
     gboolean seekable;
     gboolean live;
-    
+
     parole_media_list_set_row_playback_state (player->priv->list, player->priv->row, PAROLE_MEDIA_STATE_PLAYING);
-    
+
     g_object_get (G_OBJECT (stream),
                   "seekable", &seekable,
                   "duration", &duration,
                   "live", &live,
                   NULL);
-          
+
     if (player->priv->wait_for_gst_disc_info == TRUE)
     {
         parole_media_list_add_cdda_tracks(player->priv->list, parole_gst_get_num_tracks(PAROLE_GST (player->priv->gst)));
         player->priv->wait_for_gst_disc_info = FALSE;
     }
-          
+
     g_simple_action_set_enabled (player->priv->media_playpause_action, TRUE);
-    
+
     parole_player_set_playpause_button_from_stock (player, "gtk-media-pause");
-    
+
     gtk_widget_set_sensitive (player->priv->range, seekable);
-    
+
     player->priv->internal_range_change = TRUE;
     if ( live || duration == 0)
     {
@@ -1425,7 +1402,7 @@ parole_player_playing (ParolePlayer *player, const ParoleStream *stream)
         gtk_widget_set_visible( player->priv->label_duration, FALSE );
         gtk_widget_set_visible( player->priv->label_elapsed, FALSE );
     }
-    else 
+    else
     {
         gtk_range_set_range (GTK_RANGE (player->priv->range), 0, duration);
         gtk_widget_set_visible( player->priv->label_duration, TRUE );
@@ -1445,16 +1422,16 @@ parole_player_playing (ParolePlayer *player, const ParoleStream *stream)
                                               dur_text);
         }
     }
-    
+
     player->priv->internal_range_change = FALSE;
-    
+
     gtk_widget_set_tooltip_text (GTK_WIDGET (player->priv->range), seekable ? NULL : _("Media stream is not seekable"));
-    
+
     parole_player_save_uri (player, stream);
     parole_media_list_select_row (player->priv->list, player->priv->row);
     gtk_widget_grab_focus (player->priv->gst);
     parole_player_update_languages (player, PAROLE_GST(player->priv->gst));
-    
+
     g_timeout_add_seconds (4, (GSourceFunc) parole_player_hide_controls, player);
 }
 
@@ -1464,9 +1441,9 @@ parole_player_paused (ParolePlayer *player)
     TRACE ("Player paused");
 
     parole_media_list_set_row_playback_state (player->priv->list, player->priv->row, PAROLE_MEDIA_STATE_PAUSED);
-    
+
     g_simple_action_set_enabled (player->priv->media_playpause_action, TRUE);
-    
+
     if ( player->priv->user_seeking == FALSE)
     {
         parole_player_set_playpause_button_from_stock (player, "gtk-media-play");
@@ -1488,17 +1465,17 @@ parole_player_stopped (ParolePlayer *player)
 {
     gchar dur_text[128];
     TRACE ("Player stopped");
-    
-    g_simple_action_set_enabled (player->priv->media_playpause_action, 
-                              parole_media_list_is_selected_row (player->priv->list) || 
+
+    g_simple_action_set_enabled (player->priv->media_playpause_action,
+                              parole_media_list_is_selected_row (player->priv->list) ||
                               !parole_media_list_is_empty (player->priv->list));
-                  
+
     gtk_window_set_title (GTK_WINDOW (player->priv->window), _("Parole Media Player"));
 
     gtk_widget_hide(player->priv->videobox);
     gtk_widget_hide(player->priv->audiobox);
     gtk_widget_show(player->priv->logo_image);
-    
+
     get_time_string (dur_text, 0);
     gtk_label_set_text (GTK_LABEL (player->priv->label_duration), dur_text);
 
@@ -1506,9 +1483,9 @@ parole_player_stopped (ParolePlayer *player)
     gtk_widget_set_sensitive (player->priv->range, FALSE);
 
     parole_player_set_playpause_button_from_stock (player, "gtk-media-play");
-    
+
     parole_media_list_set_row_playback_state (player->priv->list, player->priv->row, PAROLE_MEDIA_STATE_NONE);
-    
+
     if ( player->priv->exit )
     {
         parole_player_quit (player);
@@ -1519,12 +1496,12 @@ static void
 parole_player_play_selected_row (ParolePlayer *player)
 {
     GtkTreeRowReference *row;
-    
+
     row = parole_media_list_get_selected_row (player->priv->list);
-    
+
     if ( row == NULL )
         row = parole_media_list_get_first_row (player->priv->list);
-    
+
     if ( row )
         parole_player_media_activated_cb (player->priv->list, row, player);
 }
@@ -1534,27 +1511,27 @@ parole_player_play_next (ParolePlayer *player, gboolean allow_shuffle)
 {
     gboolean repeat, shuffle;
     GtkTreeRowReference *row;
-    
+
     if ( player->priv->current_media_type == PAROLE_MEDIA_TYPE_DVD )
     {
         parole_gst_next_dvd_chapter (PAROLE_GST(player->priv->gst));
         return;
     }
-    
+
     g_object_get (G_OBJECT (player->priv->conf),
                   "shuffle", &shuffle,
                   "repeat", &repeat,
                   NULL);
-    
+
     if ( player->priv->row )
     {
         parole_media_list_set_row_playback_state (player->priv->list, player->priv->row, PAROLE_MEDIA_STATE_NONE);
-        
+
         if ( shuffle && allow_shuffle )
             row = parole_media_list_get_row_random (player->priv->list);
         else
             row = parole_media_list_get_next_row (player->priv->list, player->priv->row, repeat);
-        
+
         if ( row )
         {
             parole_player_media_activated_cb (player->priv->list, row, player);
@@ -1581,13 +1558,13 @@ parole_player_play_prev (ParolePlayer *player)
         parole_gst_prev_dvd_chapter (PAROLE_GST(player->priv->gst));
         return;
     }
-    
+
     if ( player->priv->row )
     {
         parole_media_list_set_row_playback_state (player->priv->list, player->priv->row, PAROLE_MEDIA_STATE_NONE);
-        
+
         row = parole_media_list_get_prev_row (player->priv->list, player->priv->row);
-        
+
         if ( row )
         {
             parole_player_media_activated_cb (player->priv->list, row, player);
@@ -1608,23 +1585,23 @@ static void
 parole_player_reset_saver_changed (ParolePlayer *player, const ParoleStream *stream)
 {
     gboolean reset_saver;
-    
+
     TRACE ("Start");
-    
+
     g_object_get (G_OBJECT (player->priv->conf),
                   "reset-saver", &reset_saver,
                   NULL);
-          
+
     if ( !reset_saver )
         parole_screen_saver_uninhibit (player->priv->screen_saver, GTK_WINDOW (player->priv->window));
     else if ( player->priv->state ==  PAROLE_STATE_PLAYING )
     {
         gboolean has_video;
-        
+
         g_object_get (G_OBJECT (stream),
                       "has-video", &has_video,
                       NULL);
-                  
+
         if ( has_video )
         {
             parole_screen_saver_inhibit (player->priv->screen_saver, GTK_WINDOW (player->priv->window));
@@ -1641,7 +1618,7 @@ parole_player_media_state_cb (ParoleGst *gst, const ParoleStream *stream, Parole
 
     player->priv->state = state;
     parole_player_reset_saver_changed (player, stream);
-    
+
     if ( state == PAROLE_STATE_PLAYING )
     {
         parole_player_playing (player, stream);
@@ -1679,6 +1656,32 @@ on_infobar_close_clicked (GtkButton *button, ParolePlayer *player)
     gtk_widget_hide(player->priv->infobar);
 }
 
+void parole_player_repeat_state_changed (GSimpleAction *simple, GVariant *value, ParolePlayer *player)
+{
+    gboolean active = g_simple_toggle_action_get_active(simple);
+    block_playlist_updates = TRUE;
+
+    if (gtk_check_menu_item_get_active(GTK_CHECK_MENU_ITEM(player->priv->repeat_menu_item)) != active)
+    {
+        gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(player->priv->repeat_menu_item), active);
+    }
+
+    block_playlist_updates = FALSE;
+}
+
+void parole_player_shuffle_state_changed (GSimpleAction *simple, GVariant *value, ParolePlayer *player)
+{
+    gboolean active = g_simple_toggle_action_get_active(simple);
+    block_playlist_updates = TRUE;
+
+    if (gtk_check_menu_item_get_active(GTK_CHECK_MENU_ITEM(player->priv->shuffle_menu_item)) != active)
+    {
+        gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(player->priv->shuffle_menu_item), active);
+    }
+
+    block_playlist_updates = FALSE;
+}
+
 static void
 parole_player_toggle_playpause (ParolePlayer *player)
 {
@@ -1691,14 +1694,6 @@ parole_player_toggle_playpause (ParolePlayer *player)
 }
 
 void
-parole_player_playpause_enabled_cb (GSimpleAction *action, ParolePlayer *player)
-{
-    /* Set widgets sensitive when enabled or disabled */
-    gboolean enabled = g_action_get_enabled(G_ACTION(action));
-    gtk_widget_set_sensitive(GTK_WIDGET(player->priv->playpause_button), enabled);
-}
-
-void
 parole_player_playpause_action_cb (GSimpleAction *action)
 {
     parole_player_toggle_playpause (parole_player);
@@ -1714,7 +1709,7 @@ void parole_player_next_action_cb (GSimpleAction *action)
 {
     parole_player_play_next (parole_player, TRUE);
 }
-                             
+
 void parole_player_previous_action_cb (GSimpleAction *action)
 {
     parole_player_play_prev (parole_player);
@@ -1757,9 +1752,9 @@ gboolean
 parole_player_range_button_release (GtkWidget *widget, GdkEventButton *ev, ParolePlayer *player)
 {
     ev->button = 2;
-    
+
     player->priv->user_seeking = FALSE;
-    
+
     return FALSE;
 }
 
@@ -1767,9 +1762,9 @@ gboolean
 parole_player_range_button_press (GtkWidget *widget, GdkEventButton *ev, ParolePlayer *player)
 {
     ev->button = 2;
-    
+
     player->priv->user_seeking = TRUE;
-    
+
     return FALSE;
 }
 
@@ -1777,7 +1772,7 @@ void
 parole_player_range_value_changed (GtkRange *range, ParolePlayer *player)
 {
     gdouble value;
-    
+
     if ( !player->priv->internal_range_change )
     {
         value = gtk_range_get_value (GTK_RANGE (range));
@@ -1804,7 +1799,7 @@ parole_player_media_tag_cb (ParoleGst *gst, const ParoleStream *stream, ParolePl
     gchar *artist;
     gchar *year;
     GdkPixbuf *image = NULL;
-    
+
     if ( player->priv->row )
     {
         g_object_get (G_OBJECT (stream),
@@ -1830,13 +1825,13 @@ parole_player_media_tag_cb (ParoleGst *gst, const ParoleStream *stream, ParolePl
                 gtk_label_set_markup(GTK_LABEL(player->priv->audiobox_album), g_markup_printf_escaped("<big><span color='#BBBBBB'><i>%s</i></span> <span color='#F4F4F4'>%s (%s)</span></big>", _("on"), album, year));
             else
                 gtk_label_set_markup(GTK_LABEL(player->priv->audiobox_album), g_markup_printf_escaped("<big><span color='#BBBBBB'><i>%s</i></span> <span color='#F4F4F4'>%s</span></big>", _("on"), album));
-                
+
             g_free (album);
         }
-        
+
         else
             gtk_label_set_markup(GTK_LABEL(player->priv->audiobox_album), g_strdup_printf("<big><span color='#BBBBBB'><i>%s</i></span> <span color='#F4F4F4'>%s</span></big>", _("on"), _("Unknown Album")));
-        
+
         if (year)
             g_free (year);
 
@@ -1847,7 +1842,7 @@ parole_player_media_tag_cb (ParoleGst *gst, const ParoleStream *stream, ParolePl
         }
         else
             gtk_label_set_markup(GTK_LABEL(player->priv->audiobox_artist), g_strdup_printf("<big><span color='#BBBBBB'><i>%s</i></span> <span color='#F4F4F4'>%s</span></big>", _("by"), _("Unknown Artist")));
-        
+
         image = parole_stream_get_image(G_OBJECT(stream));
         if (image)
         {
@@ -1876,12 +1871,12 @@ parole_player_buffering_cb (ParoleGst *gst, const ParoleStream *stream, gint per
     else
     {
         player->priv->buffering = TRUE;
-        
+
         if ( player->priv->state == PAROLE_STATE_PLAYING )
             parole_gst_pause (PAROLE_GST (player->priv->gst));
-            
+
         buff = g_strdup_printf ("%s (%d%%)", _("Buffering"), percentage);
-        
+
         gtk_progress_bar_set_text (GTK_PROGRESS_BAR (player->priv->progressbar_buffering), buff);
         gtk_progress_bar_set_fraction (GTK_PROGRESS_BAR (player->priv->progressbar_buffering), (gdouble) percentage/100);
         gtk_widget_hide (player->priv->label_duration);
@@ -1897,10 +1892,10 @@ parole_player_dvd_chapter_count_change_cb (ParoleGst *gst, gint chapter_count, P
 {
     gtk_tree_row_reference_free (player->priv->row);
     player->priv->row = NULL;
-    
+
     /* FIXME Cannot clear list prior to adding new chapters. */
     //parole_media_list_clear_list (player->priv->list);
-    
+
     parole_media_list_add_dvd_chapters (player->priv->list, chapter_count);
     parole_player_update_chapters(player, chapter_count);
 }
@@ -1909,7 +1904,7 @@ static void
 parole_player_dvd_chapter_change_cb (ParoleGst *gst, gint chapter_count, ParolePlayer *player)
 {
     parole_media_list_set_row_playback_state (player->priv->list, player->priv->row, PAROLE_MEDIA_STATE_NONE);
-    
+
     player->priv->row = parole_media_list_get_row_n (player->priv->list, chapter_count-1);
 
     parole_media_list_set_row_playback_state (player->priv->list, player->priv->row, PAROLE_MEDIA_STATE_PLAYING);
@@ -1919,10 +1914,10 @@ parole_player_dvd_chapter_change_cb (ParoleGst *gst, gint chapter_count, ParoleP
 gboolean parole_player_delete_event_cb (GtkWidget *widget, GdkEvent *ev, ParolePlayer *player)
 {
     parole_window_busy_cursor (gtk_widget_get_window(GTK_WIDGET (player->priv->window)));
-    
+
     player->priv->exit = TRUE;
     parole_gst_terminate (PAROLE_GST (player->priv->gst));
-    
+
     return TRUE;
 }
 
@@ -1932,12 +1927,12 @@ parole_player_destroy_cb (GObject *window, ParolePlayer *player)
 }
 
 gboolean
-parole_player_window_state_event (GtkWidget *widget, 
+parole_player_window_state_event (GtkWidget *widget,
                                   GdkEventWindowState *event,
                                   ParolePlayer *player)
 {
     gboolean fullscreen = FALSE;
-    
+
     if (event->new_window_state & GDK_WINDOW_STATE_MAXIMIZED)
     {
         /* Restore the previously saved window size if maximized */
@@ -1956,10 +1951,10 @@ parole_player_window_state_event (GtkWidget *widget,
 
     if (event->new_window_state & GDK_WINDOW_STATE_FULLSCREEN)
         fullscreen = TRUE;
-    
+
     if ( player->priv->full_screen != fullscreen )
         parole_player_reset_controls( player, fullscreen );
-        
+
     return TRUE;
 }
 
@@ -1967,16 +1962,16 @@ parole_player_window_state_event (GtkWidget *widget,
  * parole_player_reset_controls:
  * @player     : the #ParolePlayer instance.
  * @fullscreen : %TRUE if player should be fullscreen, else %FALSE.
- * 
+ *
  * Reset the player controls based on existing conditions.
  **/
 void
 parole_player_reset_controls (ParolePlayer *player, gboolean fullscreen)
 {
     static gint current_page = 0;
-    
+
     gboolean show_playlist;
-    
+
     if ( player->priv->full_screen != fullscreen )
     {
         /* If the player is in fullscreen mode, change to windowed mode. */
@@ -2013,7 +2008,7 @@ parole_player_reset_controls (ParolePlayer *player, gboolean fullscreen)
             player->priv->full_screen = TRUE;
         }
     }
-    
+
     if ( player->priv->embedded )
     {
         gtk_widget_hide (player->priv->menu_bar);
@@ -2028,9 +2023,9 @@ parole_player_embedded (ParolePlayer *player)
 {
     if ( player->priv->embedded == TRUE )
         return;
-    
+
     player->priv->embedded = TRUE;
-    
+
     parole_player_reset_controls(player, player->priv->full_screen);
 }
 
@@ -2062,11 +2057,11 @@ parole_player_show_menu (ParolePlayer *player, guint button, guint activate_time
     GtkAccelGroup *accels = gtk_accel_group_new();
 
     gtk_window_add_accel_group(GTK_WINDOW(player->priv->window), accels);
-    
+
     player->priv->current_media_type = parole_gst_get_current_stream_type (PAROLE_GST (player->priv->gst));
-    
+
     menu = gtk_menu_new ();
-    
+
     /*Play menu item
      */
     mi = gtk_menu_item_new_with_mnemonic (player->priv->state == PAROLE_STATE_PLAYING ? _("_Pause"):_("_Play"));
@@ -2079,7 +2074,7 @@ parole_player_show_menu (ParolePlayer *player, guint button, guint activate_time
     gtk_widget_show (mi);
     g_signal_connect(G_OBJECT(mi), "activate", G_CALLBACK(parole_player_widget_activate_action), player->priv->media_playpause_action);
     gtk_menu_shell_append (GTK_MENU_SHELL (menu), mi);
-    
+
     /*
      * Previous item in playlist.
      */
@@ -2088,7 +2083,7 @@ parole_player_show_menu (ParolePlayer *player, guint button, guint activate_time
     gtk_widget_show (mi);
     g_signal_connect(G_OBJECT(mi), "activate", G_CALLBACK(parole_player_widget_activate_action), player->priv->media_previous_action);
     gtk_menu_shell_append (GTK_MENU_SHELL (menu), mi);
-    
+
     /*
      * Next item in playlist.
      */
@@ -2097,7 +2092,7 @@ parole_player_show_menu (ParolePlayer *player, guint button, guint activate_time
     gtk_widget_show (mi);
     g_signal_connect(G_OBJECT(mi), "activate", G_CALLBACK(parole_player_widget_activate_action), player->priv->media_next_action);
     gtk_menu_shell_append (GTK_MENU_SHELL (menu), mi);
-    
+
     /*
      * Un/Full screen
      */
@@ -2105,7 +2100,7 @@ parole_player_show_menu (ParolePlayer *player, guint button, guint activate_time
     gtk_widget_show (mi);
     g_signal_connect(G_OBJECT(mi), "activate", G_CALLBACK(parole_player_widget_activate_action), player->priv->media_fullscreen_action);
     gtk_menu_shell_append (GTK_MENU_SHELL (menu), mi);
-    
+
     if (!player->priv->full_screen)
     {
         mi = gtk_separator_menu_item_new();
@@ -2123,14 +2118,14 @@ parole_player_show_menu (ParolePlayer *player, guint button, guint activate_time
                                GDK_KEY_m, GDK_CONTROL_MASK, GTK_ACCEL_VISIBLE);
         gtk_widget_show (mi);
         gtk_menu_shell_append (GTK_MENU_SHELL (menu), mi);
-    
+
     }
 
 
     g_signal_connect_swapped (menu, "selection-done",
                               G_CALLBACK (gtk_widget_destroy), menu);
-    
-    gtk_menu_popup (GTK_MENU (menu), 
+
+    gtk_menu_popup (GTK_MENU (menu),
                     NULL, NULL,
                     NULL, NULL,
                     button, activate_time);
@@ -2154,7 +2149,7 @@ gboolean
 parole_player_gst_widget_button_release (GtkWidget *widget, GdkEventButton *ev, ParolePlayer *player)
 {
     gboolean ret_val = FALSE;
-    
+
     if ( ev->button == 3 )
     {
         parole_player_show_menu (player, ev->button, ev->time);
@@ -2166,7 +2161,7 @@ parole_player_gst_widget_button_release (GtkWidget *widget, GdkEventButton *ev,
         gtk_widget_grab_focus (widget);
         ret_val = TRUE;
     }
-    
+
     return ret_val;
 }
 
@@ -2175,13 +2170,13 @@ gboolean parole_player_hide_controls (gpointer data)
     ParolePlayer *player;
     GdkWindow *gdkwindow;
     GtkWidget *controls;
-    
+
     TRACE("start");
-    
+
     player = PAROLE_PLAYER (data);
-    
+
     controls = gtk_widget_get_parent(player->priv->control);
-    
+
     gtk_widget_hide(controls);
     gdkwindow = gtk_widget_get_window (GTK_WIDGET(player->priv->eventbox_output));
     parole_window_invisible_cursor (gdkwindow);
@@ -2194,18 +2189,18 @@ parole_player_gst_widget_motion_notify_event (GtkWidget *widget, GdkEventMotion
 {
     static gulong hide_timeout = 0;
     GdkWindow *gdkwindow;
-    
+
     if ( hide_timeout != 0)
     {
         g_source_remove (hide_timeout);
         hide_timeout = 0;
     }
-    
+
     gtk_widget_show_all (gtk_widget_get_parent(player->priv->control));
-    
+
     gdkwindow = gtk_widget_get_window (GTK_WIDGET(player->priv->eventbox_output));
     gdk_window_set_cursor (gdkwindow, NULL);
-    
+
     if ( player->priv->state == PAROLE_STATE_PLAYING )
         hide_timeout = g_timeout_add_seconds (4, (GSourceFunc) parole_player_hide_controls, player);
 
@@ -2233,8 +2228,8 @@ parole_player_save_playlist_cb (GtkWidget *widget, ParolePlayer *player)
 void
 parole_player_media_menu_select_cb (GtkMenuItem *widget, ParolePlayer *player)
 {
-    gtk_widget_set_sensitive (player->priv->save_playlist, 
-                  !parole_media_list_is_empty (player->priv->list));    
+    gtk_widget_set_sensitive (player->priv->save_playlist,
+                  !parole_media_list_is_empty (player->priv->list));
 }
 
 void parole_player_open_preferences_cb  (GtkWidget *widget, ParolePlayer *player)
@@ -2346,9 +2341,9 @@ parole_player_finalize (GObject *object)
     player = PAROLE_PLAYER (object);
 
     TRACE ("start");
-    
+
     dbus_g_connection_unref (player->priv->bus);
-    
+
     g_object_unref (player->priv->conf);
     g_object_unref (player->priv->video_filter);
     g_object_unref (player->priv->disc);
@@ -2356,7 +2351,7 @@ parole_player_finalize (GObject *object)
 
     if ( player->priv->client_id )
         g_free (player->priv->client_id);
-    
+
     g_object_unref (player->priv->sm_client);
 
 #ifdef HAVE_XF86_KEYSYM
@@ -2413,31 +2408,31 @@ parole_player_constructed (GObject *object)
 {
     ParolePlayer *player;
     gchar *current_dir;
-    
+
     const gchar *restart_command[] =
     {
         "parole",
         "--new-instance",
         NULL
     };
-    
+
     player = PAROLE_PLAYER (object);
 
     current_dir = g_get_current_dir ();
-    
+
     player->priv->sm_client =   xfce_sm_client_get_full (XFCE_SM_CLIENT_RESTART_NORMAL,
                                 XFCE_SM_CLIENT_PRIORITY_DEFAULT,
                                 player->priv->client_id,
                                 current_dir,
                                 restart_command,
                                 DESKTOPDIR "/" PACKAGE_NAME ".desktop");
-                      
+
     if ( xfce_sm_client_connect (player->priv->sm_client, NULL ) )
     {
         g_signal_connect_swapped (player->priv->sm_client, "quit-requested",
                       G_CALLBACK (parole_player_sm_quit_requested_cb), player);
     }
-    
+
     g_free (current_dir);
 }
 
@@ -2450,24 +2445,24 @@ parole_player_class_init (ParolePlayerClass *klass)
     object_class->finalize = parole_player_finalize;
     object_class->set_property = parole_player_set_property;
     object_class->get_property = parole_player_get_property;
-    
-    
+
+
     /**
      * ParolePlayer:client-id:
-     * 
+     *
      * Sm Manager client ID
      * Since: 0.2.2
      **/
     g_object_class_install_property (object_class,
                      PROP_CLIENT_ID,
                      g_param_spec_string ("client-id",
-                              NULL, 
+                              NULL,
                               NULL,
                               NULL,
                               G_PARAM_READWRITE|G_PARAM_CONSTRUCT_ONLY));
 
     g_type_class_add_private (klass, sizeof (ParolePlayerPrivate));
-    
+
     parole_player_dbus_class_init (klass);
 }
 
@@ -2475,13 +2470,13 @@ parole_player_class_init (ParolePlayerClass *klass)
  * Configuration changed regarding
  * whether to Reset the screen saver counter
  * while playing movies or not.
- * 
+ *
  */
 static void
 parole_player_reset_saver_changed_cb (ParolePlayer *player)
 {
     const ParoleStream *stream;
-    
+
     stream = parole_gst_get_stream (PAROLE_GST (player->priv->gst));
     TRACE ("Reset saver configuration changed");
     parole_player_reset_saver_changed (player, stream);
@@ -2493,14 +2488,14 @@ parole_player_handle_key_press (GdkEventKey *ev, ParolePlayer *player)
     GtkWidget *focused;
     /* Seek duration in seconds */
     gdouble seek_short = 10, seek_medium = 60, seek_long = 600;
-    
+
     gboolean ret_val = FALSE;
-    
+
     focused = gtk_window_get_focus (GTK_WINDOW (player->priv->window));
-    
+
     if ( focused )
     {
-        if ( gtk_widget_is_ancestor (focused, player->priv->playlist_nt) ) 
+        if ( gtk_widget_is_ancestor (focused, player->priv->playlist_nt) )
         {
             return FALSE;
         }
@@ -2508,7 +2503,7 @@ parole_player_handle_key_press (GdkEventKey *ev, ParolePlayer *player)
 
     if (ev->state & GDK_MOD1_MASK)
         return FALSE;
-    
+
     switch (ev->keyval)
     {
         case GDK_KEY_f:
@@ -2564,7 +2559,7 @@ parole_player_handle_key_press (GdkEventKey *ev, ParolePlayer *player)
             break;
 #endif
         break;
-        /* 
+        /*
          * Pass these to the media list and tell it to
          * grab the focus
          */
@@ -2576,7 +2571,7 @@ parole_player_handle_key_press (GdkEventKey *ev, ParolePlayer *player)
         default:
             break;
     }
-    
+
     return ret_val;
 }
 
@@ -2614,7 +2609,7 @@ parole_player_key_press (GtkWidget *widget, GdkEventKey *ev, ParolePlayer *playe
         default:
             break;
     }
-    
+
     return parole_player_handle_key_press (ev, player);
 }
 
@@ -2623,7 +2618,7 @@ static void
 parole_player_button_pressed_cb (ParoleButton *button, ParoleButtonKey key, ParolePlayer *player)
 {
     PAROLE_DEBUG_ENUM ("Button Press:", key, ENUM_GTYPE_BUTTON_KEY);
-    
+
     switch (key)
     {
         case PAROLE_KEY_AUDIO_PLAY:
@@ -2649,11 +2644,11 @@ parole_gst_set_default_aspect_ratio (ParolePlayer *player, GtkBuilder *builder)
 {
     ParoleAspectRatio ratio;
     const gchar *widget_name;
-    
+
     g_object_get (G_OBJECT (player->priv->conf),
                   "aspect-ratio", &ratio,
                   NULL);
-          
+
     switch (ratio )
     {
         case PAROLE_ASPECT_RATIO_NONE:
@@ -2678,7 +2673,7 @@ parole_gst_set_default_aspect_ratio (ParolePlayer *player, GtkBuilder *builder)
             g_warn_if_reached ();
             return;
     }
-    
+
     gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM (gtk_builder_get_object (builder, widget_name)), TRUE);
 }
 
@@ -2688,12 +2683,12 @@ on_bug_report_clicked (GtkWidget *w, ParolePlayer *player)
     GtkWidget *dialog;
     if (!gtk_show_uri(NULL, "http://docs.xfce.org/apps/parole/bugs", GDK_CURRENT_TIME, NULL))
     {
-        dialog = gtk_message_dialog_new(GTK_WINDOW(player->priv->window), 
-                                        GTK_DIALOG_DESTROY_WITH_PARENT, 
-                                        GTK_MESSAGE_ERROR, 
-                                        GTK_BUTTONS_CLOSE, 
+        dialog = gtk_message_dialog_new(GTK_WINDOW(player->priv->window),
+                                        GTK_DIALOG_DESTROY_WITH_PARENT,
+                                        GTK_MESSAGE_ERROR,
+                                        GTK_BUTTONS_CLOSE,
                                         _("Unable to open default web browser"));
-        gtk_message_dialog_format_secondary_text(GTK_MESSAGE_DIALOG(dialog), 
+        gtk_message_dialog_format_secondary_text(GTK_MESSAGE_DIALOG(dialog),
                 _("Please go to http://docs.xfce.org/apps/parole/bugs to report your bug."));
         gtk_dialog_run(GTK_DIALOG(dialog));
         gtk_widget_destroy(dialog);
@@ -2706,12 +2701,12 @@ on_contents_clicked (GtkWidget *w, ParolePlayer *player)
     GtkWidget *dialog;
     if (!gtk_show_uri(NULL, "http://docs.xfce.org/apps/parole/start", GDK_CURRENT_TIME, NULL))
     {
-        dialog = gtk_message_dialog_new(GTK_WINDOW(player->priv->window), 
-                                        GTK_DIALOG_DESTROY_WITH_PARENT, 
-                                        GTK_MESSAGE_ERROR, 
-                                        GTK_BUTTONS_CLOSE, 
+        dialog = gtk_message_dialog_new(GTK_WINDOW(player->priv->window),
+                                        GTK_DIALOG_DESTROY_WITH_PARENT,
+                                        GTK_MESSAGE_ERROR,
+                                        GTK_BUTTONS_CLOSE,
                                         _("Unable to open default web browser"));
-        gtk_message_dialog_format_secondary_text(GTK_MESSAGE_DIALOG(dialog), 
+        gtk_message_dialog_format_secondary_text(GTK_MESSAGE_DIALOG(dialog),
                 _("Please go to http://docs.xfce.org/apps/parole/start to read Parole's online documentation."));
         gtk_dialog_run(GTK_DIALOG(dialog));
         gtk_widget_destroy(dialog);
@@ -2719,11 +2714,11 @@ on_contents_clicked (GtkWidget *w, ParolePlayer *player)
 }
 
 /**
- * 
+ *
  * Draw a simple rectangular GtkOverlay
  * using the theme's background and border-color
  * to keep it on top of the gst-video-widget with Gtk3.8 and above
- * 
+ *
  * NOTE: Transparency is not supported, so there's also no fadeout.
  **/
 static gboolean
@@ -2757,18 +2752,18 @@ parole_audiobox_expose_event (GtkWidget *w, GdkEventExpose *ev, ParolePlayer *pl
 {
     GtkAllocation *allocation = g_new0 (GtkAllocation, 1);
     gboolean homogeneous;
-    
+
     /* Float the cover and text together in the middle if there is space */
     gtk_widget_get_allocation(w, allocation);
     homogeneous = allocation->width > 536;
     g_free(allocation);
-    
+
     /* Nothing to do if the homogeneous setting is already good */
     if ( gtk_box_get_homogeneous( GTK_BOX(w) ) == homogeneous )
         return FALSE;
-    
+
     gtk_box_set_homogeneous( GTK_BOX(w), homogeneous );
-    
+
     /* Expand the coverart if the parent box packing is homogenous */
     gtk_box_set_child_packing (GTK_BOX(w),
                                player->priv->audiobox_cover,
@@ -2784,11 +2779,11 @@ void
 on_content_area_size_allocate (GtkWidget *widget, GtkAllocation *allocation, ParolePlayer *player)
 {
     g_return_if_fail (allocation != NULL);
-    
+
     gtk_widget_set_allocation(widget, allocation);
 
     if ( gtk_widget_get_realized (widget) )
-    {   
+    {
         gtk_widget_queue_draw (widget);
     }
 }
@@ -2797,7 +2792,7 @@ gboolean
 parole_player_configure_event_cb (GtkWidget *widget, GdkEventConfigure *ev, ParolePlayer *player)
 {
     gint old_w, old_h, new_w, new_h;
-    
+
     if ( !player->priv->full_screen )
     {
         /* Store the previously saved window size in case of maximize */
@@ -2805,10 +2800,10 @@ parole_player_configure_event_cb (GtkWidget *widget, GdkEventConfigure *ev, Paro
                       "window-width", &old_w,
                       "window-height", &old_h,
                       NULL);
-                      
+
         /* Get the current window size */
         gtk_window_get_size (GTK_WINDOW (widget), &new_w, &new_h);
-        
+
         /* Configure gets run twice, only change on update */
         if (old_w != new_w || old_h != new_h)
         {
@@ -2820,7 +2815,7 @@ parole_player_configure_event_cb (GtkWidget *widget, GdkEventConfigure *ev, Paro
                           NULL);
         }
     }
-    
+
     return FALSE;
 }
 
@@ -2834,13 +2829,13 @@ parole_player_drag_data_received_cb (GtkWidget *widget,
                                      guint drag_time,
                                      ParolePlayer *player)
 {
-    
+
     gchar **uri_list;
     guint added  = 0;
     guint i;
-    
+
     parole_window_busy_cursor (gtk_widget_get_window(widget));
-    
+
     uri_list = g_uri_list_extract_uris ((const gchar *)gtk_selection_data_get_data(data));
     for ( i = 0; uri_list[i] != NULL; i++)
     {
@@ -2850,7 +2845,7 @@ parole_player_drag_data_received_cb (GtkWidget *widget,
 
         g_free (path);
     }
-    
+
     g_strfreev (uri_list);
 
     gdk_window_set_cursor (gtk_widget_get_window(widget), NULL);
@@ -2862,24 +2857,24 @@ parole_player_window_notify_is_active (ParolePlayer *player)
 {
     if ( !player->priv->full_screen )
         return;
-    
+
     if (!gtk_window_is_active (GTK_WINDOW (player->priv->window)) )
     {
         parole_gst_set_cursor_visible (PAROLE_GST (player->priv->gst), TRUE);
-    } 
-    else 
+    }
+    else
     {
         parole_gst_set_cursor_visible (PAROLE_GST (player->priv->gst), FALSE);
     }
-} 
+}
 
 /**
- * 
- * Sets the _NET_WM_WINDOW_OPACITY_LOCKED wm hint 
+ *
+ * Sets the _NET_WM_WINDOW_OPACITY_LOCKED wm hint
  * so window manager keep us opaque.
- * 
+ *
  * Currently it is only supported by xfwm.
- * 
+ *
  * NOTE: The widget has to be realized first.
  **/
 static void
@@ -2891,23 +2886,23 @@ parole_player_set_wm_opacity_hint (GtkWidget *widget)
     Display *xdisplay;
     Atom atom;
     char mode = 1;
-    
+
     gdkscreen = gtk_widget_get_screen (widget);
     gdkdisplay = gdk_screen_get_display (gdkscreen);
 
     xdisplay = GDK_DISPLAY_XDISPLAY (gdkdisplay);
-    
+
     atom = XInternAtom (xdisplay, "_NET_WM_WINDOW_OPACITY_LOCKED", TRUE);
-    
+
     if ( atom == None )
         return;
-    
+
     gdkwindow = gtk_widget_get_window (widget);
-    
+
     XChangeProperty (xdisplay, gdk_x11_window_get_xid (gdkwindow),
                      atom, XA_CARDINAL,
                      32, PropModeAppend,
-                     (guchar *) &mode, 
+                     (guchar *) &mode,
                      1);
 }
 
@@ -2938,64 +2933,64 @@ parole_player_init (ParolePlayer *player)
     gboolean maximized;
     gboolean showhide;
     GdkRGBA background;
-    
+
     gint volume;
 
     GtkWidget *hpaned;
     GdkPixbuf *logo;
-    
+
     GtkWidget *recent_menu;
     GtkRecentFilter *recent_filter;
     GtkWidget *clear_recent;
     GtkWidget *recent_separator;
-    
+
     GtkWidget *bug_report, *contents;
-    
+
     GtkCellRenderer *cell, *sub_cell;
-    
+
     GtkWidget *hbox_infobar;
     GtkWidget *audiotrack_box, *audiotrack_label, *subtitle_box, *subtitle_label, *infobar_close, *close_icon;
     GtkWidget *content_area;
-    
+
     GtkWidget *controls_overlay, *tmp_box;
     GtkWidget *controls_parent;
     GtkWidget *play_box;
-    
+
     GList *widgets;
-    
+
     GtkWidget *action_widget;
-    
+
     g_setenv("PULSE_PROP_media.role", "video", TRUE);
-    
+
     player->priv = PAROLE_PLAYER_GET_PRIVATE (player);
 
     player->priv->client_id = NULL;
     player->priv->sm_client = NULL;
 
     player->priv->bus = parole_g_session_bus_get ();
-    
+
     player->priv->current_media_type = PAROLE_MEDIA_TYPE_UNKNOWN;
-    
+
     player->priv->video_filter = parole_get_supported_video_filter ();
     g_object_ref_sink (player->priv->video_filter);
-    
+
     builder = parole_builder_get_main_interface ();
-    
+
     player->priv->conf = parole_conf_new ();
     player->priv->settings_dialog = parole_conf_dialog_new();
-    
+
     g_signal_connect_swapped (player->priv->conf, "notify::reset-saver",
             G_CALLBACK (parole_player_reset_saver_changed_cb), player);
-     
+
     player->priv->gst = parole_gst_new (player->priv->conf);
 
     player->priv->disc = parole_disc_new ();
     g_signal_connect (player->priv->disc, "disc-selected",
             G_CALLBACK (parole_player_disc_selected_cb), player);
-        
+
     player->priv->screen_saver = parole_screen_saver_new ();
     player->priv->list = PAROLE_MEDIA_LIST (parole_media_list_get ());
-    
+
     player->priv->state = PAROLE_STATE_STOPPED;
     player->priv->user_seeking = FALSE;
     player->priv->internal_range_change = FALSE;
@@ -3004,36 +2999,36 @@ parole_player_init (ParolePlayer *player)
     player->priv->buffering = FALSE;
     player->priv->row = NULL;
     player->priv->wait_for_gst_disc_info = FALSE;
-    
+
     player->priv->recent = gtk_recent_manager_get_default ();
-    
+
     /*
      * Gst signals
      */
     g_signal_connect (G_OBJECT (player->priv->gst), "media-state",
             G_CALLBACK (parole_player_media_state_cb), player);
-    
+
     g_signal_connect (G_OBJECT (player->priv->gst), "media-progressed",
             G_CALLBACK (parole_player_media_progressed_cb), player);
-              
+
     g_signal_connect (G_OBJECT (player->priv->gst), "media-tag",
             G_CALLBACK (parole_player_media_tag_cb), player);
-    
+
     g_signal_connect (G_OBJECT (player->priv->gst), "error",
             G_CALLBACK (parole_player_error_cb), player);
-   
+
     g_signal_connect (G_OBJECT (player->priv->gst), "buffering",
             G_CALLBACK (parole_player_buffering_cb), player);
-              
+
     g_signal_connect (G_OBJECT (player->priv->gst), "dvd-chapter-count-change",
             G_CALLBACK (parole_player_dvd_chapter_count_change_cb), player);
-              
+
     g_signal_connect (G_OBJECT (player->priv->gst), "dvd-chapter-change",
             G_CALLBACK (parole_player_dvd_chapter_change_cb), player);
-    
+
     g_signal_connect (G_OBJECT (player->priv->gst), "notify::volume",
             G_CALLBACK (parole_property_notify_cb_volume), player);
-            
+
     /*
      * GTK Actions
      */
@@ -3041,15 +3036,14 @@ parole_player_init (ParolePlayer *player)
     player->priv->media_playpause_action = g_simple_action_new("playpause_action", NULL);
     playpause_action = player->priv->media_playpause_action;
     g_signal_connect(G_OBJECT(player->priv->media_playpause_action), "activate", G_CALLBACK(parole_player_playpause_action_cb), NULL);
-    //g_signal_connect(G_OBJECT(player->priv->media_playpause_action), "notify::enabled", G_CALLBACK(parole_player_playpause_enabled_cb), player);
     g_simple_action_set_enabled(player->priv->media_playpause_action, FALSE);
-    
+
     /* Previous Track */
     player->priv->media_previous_action = g_simple_action_new("previous_action", NULL);
     previous_action = player->priv->media_previous_action;
     g_signal_connect(G_OBJECT(player->priv->media_previous_action), "activate", G_CALLBACK(parole_player_previous_action_cb), NULL);
     g_simple_action_set_enabled(player->priv->media_previous_action, FALSE);
-    
+
     /* Next Track */
     player->priv->media_next_action = g_simple_action_new("next_action", NULL);
     next_action = player->priv->media_next_action;
@@ -3060,59 +3054,52 @@ parole_player_init (ParolePlayer *player)
     player->priv->media_fullscreen_action = g_simple_action_new("fullscreen_action", NULL);
     g_signal_connect(G_OBJECT(player->priv->media_fullscreen_action), "activate", G_CALLBACK(parole_player_fullscreen_action_cb), NULL);
     g_simple_action_set_enabled(player->priv->media_fullscreen_action, TRUE);
-    
+
     /* Toggle Playlist */
     player->priv->toggle_playlist_action = g_simple_toggle_action_new("toggle_playlist_action", NULL);
     g_signal_connect(G_OBJECT(player->priv->toggle_playlist_action), "activate", G_CALLBACK(parole_player_toggle_playlist_action_cb), NULL);
     g_simple_action_set_enabled(player->priv->toggle_playlist_action, TRUE);
-    
+
     /* Toggle Repeat */
     player->priv->toggle_repeat_action = g_simple_toggle_action_new("toggle_repeat_action", NULL);
-    g_object_bind_property(G_OBJECT (player->priv->conf), "repeat", 
-                           player->priv->toggle_repeat_action, "enabled", 
-                           G_BINDING_SYNC_CREATE | G_BINDING_BIDIRECTIONAL);
     g_simple_action_set_enabled(player->priv->toggle_repeat_action, TRUE);
-    
+
     /* Toggle Shuffle */
     player->priv->toggle_shuffle_action = g_simple_toggle_action_new("toggle_shuffle_action", NULL);
-    g_object_bind_property(G_OBJECT (player->priv->conf), "shuffle", 
-                           player->priv->toggle_shuffle_action, "enabled", 
-                           G_BINDING_SYNC_CREATE | G_BINDING_BIDIRECTIONAL);
     g_simple_action_set_enabled(player->priv->toggle_shuffle_action, TRUE);
-    
-    
+
     /*
      * GTK Widgets
      */
     /* ParolePlayer Window */
     player->priv->window = GTK_WIDGET (gtk_builder_get_object (builder, "main-window"));
-    g_signal_connect_after(   G_OBJECT(player->priv->window), 
-                        "window-state-event", 
-                        G_CALLBACK(parole_player_window_state_event), 
+    g_signal_connect_after(   G_OBJECT(player->priv->window),
+                        "window-state-event",
+                        G_CALLBACK(parole_player_window_state_event),
                         PAROLE_PLAYER(player) );
-    
+
     /* Playlist notebook */
     player->priv->playlist_nt = GTK_WIDGET (gtk_builder_get_object (builder, "notebook-playlist"));
 
     /* Playlist divider/handle */
     hpaned = GTK_WIDGET (gtk_builder_get_object (builder, "hpaned"));
     gtk_widget_style_get (hpaned, "handle-size", &player->priv->handle_width, NULL);
-    
+
     /* Menu Bar */
     player->priv->menu_bar = GTK_WIDGET (gtk_builder_get_object (builder, "menubar"));
-    
+
     /* Save Playlist Menu Item */
     player->priv->save_playlist = GTK_WIDGET (gtk_builder_get_object (builder, "menu-save-playlist"));
-    g_signal_connect(   player->priv->save_playlist, 
+    g_signal_connect(   player->priv->save_playlist,
                         "activate",
-                        G_CALLBACK(parole_player_save_playlist_cb), 
+                        G_CALLBACK(parole_player_save_playlist_cb),
                         PAROLE_PLAYER(player) );
     g_signal_connect (gtk_builder_get_object (builder, "media-menu"), "select",
                   G_CALLBACK (parole_player_media_menu_select_cb), player);
-    
+
     /* Recent Menu */
     recent_menu = GTK_WIDGET (gtk_builder_get_object (builder, "recent_menu"));
-    
+
     /* Initialize the Recent Menu settings */
     player->priv->recent_menu = gtk_recent_chooser_menu_new_for_manager (player->priv->recent);
     gtk_recent_chooser_menu_set_show_numbers (GTK_RECENT_CHOOSER_MENU(player->priv->recent_menu), TRUE);
@@ -3120,89 +3107,97 @@ parole_player_init (ParolePlayer *player)
     gtk_recent_chooser_set_show_private (GTK_RECENT_CHOOSER(player->priv->recent_menu), FALSE);
     gtk_recent_chooser_set_show_not_found (GTK_RECENT_CHOOSER(player->priv->recent_menu), FALSE);
     gtk_recent_chooser_set_local_only (GTK_RECENT_CHOOSER(player->priv->recent_menu), TRUE);
-    
+
     /* Recent Menu file filter */
     recent_filter = parole_get_supported_recent_media_filter ();
     gtk_recent_filter_add_application( recent_filter, "parole" );
     gtk_recent_chooser_set_filter( GTK_RECENT_CHOOSER(player->priv->recent_menu), recent_filter);
-    
+
     /* Recent Menu Separator */
     recent_separator = gtk_separator_menu_item_new();
     gtk_menu_shell_append(GTK_MENU_SHELL(player->priv->recent_menu), recent_separator);
-    
+
     /* Clear Recent Menu Item */
     clear_recent = gtk_menu_item_new_with_mnemonic (_("_Clear recent items…"));
     g_signal_connect (clear_recent, "activate",
             G_CALLBACK (parole_player_recent_menu_clear_activated_cb), player);
     gtk_menu_shell_append(GTK_MENU_SHELL(player->priv->recent_menu), clear_recent);
-    
+
     /* Connect the Recent Menu events */
     g_signal_connect (player->priv->recent_menu, "item-activated",
             G_CALLBACK (parole_player_recent_menu_item_activated_cb), player);
-    
+
     /* Attach the Recent Menu */
     gtk_menu_item_set_submenu( GTK_MENU_ITEM(recent_menu), player->priv->recent_menu );
-    
+
     /* DVD Menu */
     player->priv->dvd_menu = GTK_WIDGET(gtk_builder_get_object (builder, "dvd-menu"));
     player->priv->chapters_menu = GTK_WIDGET (gtk_builder_get_object (builder, "chapters-menu"));
-    
+
     /* Language Menus */
     player->priv->subtitles_menu = GTK_WIDGET (gtk_builder_get_object (builder, "subtitles-menu"));
     player->priv->languages_menu = GTK_WIDGET (gtk_builder_get_object (builder, "languages-menu"));
-    
+
     player->priv->subtitles_group = GTK_WIDGET (gtk_builder_get_object (builder, "subtitles-menu-none"));
     player->priv->subtitles_menu_custom = GTK_WIDGET (gtk_builder_get_object (builder, "subtitles-menu-custom"));
-    
+
     g_signal_connect (player->priv->subtitles_menu_custom, "activate",
             G_CALLBACK (parole_player_select_custom_subtitle), player);
-    
+
     player->priv->audio_group = NULL;
-    
+
     /* Additional Menu Items */
-    
+
     /* Show/Hide Playlist */
     player->priv->showhide_playlist_menu_item = GTK_WIDGET (gtk_builder_get_object (builder, "show-hide-list"));
     g_signal_connect(G_OBJECT(player->priv->showhide_playlist_menu_item), "activate", G_CALLBACK(parole_player_widget_activate_action), player->priv->toggle_playlist_action);
-    
-    action_widget = GTK_WIDGET (gtk_builder_get_object (builder, "shuffle"));
-    g_signal_connect(G_OBJECT(action_widget), "activate", G_CALLBACK(toggle_action_cb), player->priv->toggle_shuffle_action);
+
+    player->priv->shuffle_menu_item = GTK_WIDGET (gtk_builder_get_object (builder, "shuffle"));
+    g_signal_connect(G_OBJECT(player->priv->shuffle_menu_item), "activate", G_CALLBACK(toggle_action_cb), player->priv->toggle_shuffle_action);
+    g_signal_connect(G_OBJECT(player->priv->toggle_shuffle_action), "notify::state", G_CALLBACK(parole_player_shuffle_state_changed), player);
     parole_media_list_connect_shuffle_action(player->priv->list, player->priv->toggle_shuffle_action);
-    
-    action_widget = GTK_WIDGET (gtk_builder_get_object (builder, "repeat"));
-    g_signal_connect(G_OBJECT(action_widget), "activate", G_CALLBACK(toggle_action_cb), player->priv->toggle_repeat_action);
+    g_object_bind_property(G_OBJECT (player->priv->conf), "shuffle",
+                           player->priv->shuffle_menu_item, "active",
+                           G_BINDING_SYNC_CREATE | G_BINDING_BIDIRECTIONAL);
+
+    player->priv->repeat_menu_item = GTK_WIDGET (gtk_builder_get_object (builder, "repeat"));
+    g_signal_connect(G_OBJECT(player->priv->repeat_menu_item), "activate", G_CALLBACK(toggle_action_cb), player->priv->toggle_repeat_action);
+    g_signal_connect(G_OBJECT(player->priv->toggle_repeat_action), "notify::state", G_CALLBACK(parole_player_repeat_state_changed), player);
     parole_media_list_connect_repeat_action(player->priv->list, player->priv->toggle_repeat_action);
-    
+    g_object_bind_property(G_OBJECT (player->priv->conf), "repeat",
+                           player->priv->repeat_menu_item, "active",
+                           G_BINDING_SYNC_CREATE | G_BINDING_BIDIRECTIONAL);
+
     bug_report = GTK_WIDGET (gtk_builder_get_object (builder, "bug-report"));
     g_signal_connect (bug_report, "activate", G_CALLBACK(on_bug_report_clicked), player);
     contents = GTK_WIDGET (gtk_builder_get_object (builder, "contents"));
     g_signal_connect (contents, "activate", G_CALLBACK(on_contents_clicked), player);
     /* End Menu Bar */
-    
+
 
     /* Content Area (Background, Audio, Video) */
     player->priv->eventbox_output = GTK_WIDGET (gtk_builder_get_object (builder, "content_area"));
     gdk_rgba_parse(&background, "black");
     gtk_widget_override_background_color(GTK_WIDGET(player->priv->eventbox_output), GTK_STATE_NORMAL, &background);
-    
+
     /* Enable motion-notify event to show/hide controls on mouseover */
     gtk_widget_add_events (GTK_WIDGET (player->priv->eventbox_output), GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK);
-    
+
     /* Enable DND for files onto output widget */
-    gtk_drag_dest_set  (player->priv->eventbox_output, GTK_DEST_DEFAULT_ALL, 
+    gtk_drag_dest_set  (player->priv->eventbox_output, GTK_DEST_DEFAULT_ALL,
                         target_entry, G_N_ELEMENTS (target_entry),
                         GDK_ACTION_COPY | GDK_ACTION_MOVE);
     g_signal_connect   (player->priv->eventbox_output, "drag-data-received",
                         G_CALLBACK (parole_player_drag_data_received_cb), player);
-              
+
     /* Background Image */
     logo = gdk_pixbuf_new_from_file (g_strdup_printf ("%s/parole.png", PIXMAPS_DIR), NULL);
     player->priv->logo_image = GTK_WIDGET (gtk_builder_get_object (builder, "logo"));
     gtk_image_set_from_pixbuf(GTK_IMAGE(player->priv->logo_image), logo);
-    
+
     /* Video Box */
     player->priv->videobox = GTK_WIDGET (gtk_builder_get_object (builder, "video_output"));
-    
+
     /* Audio Box */
     player->priv->audiobox = GTK_WIDGET (gtk_builder_get_object (builder, "audio_output"));
     player->priv->audiobox_cover = GTK_WIDGET (gtk_builder_get_object (builder, "audio_cover"));
@@ -3212,7 +3207,7 @@ parole_player_init (ParolePlayer *player)
     g_signal_connect(player->priv->audiobox, "draw",
             G_CALLBACK(parole_audiobox_expose_event), player);
     /* End Content Area */
-    
+
     /* FIXME: UGLY CODE IN THE NEXT BLOCK */
     /* Media Controls */
     controls_overlay = GTK_WIDGET(gtk_overlay_new());
@@ -3224,7 +3219,7 @@ parole_player_init (ParolePlayer *player)
     gtk_box_pack_start (GTK_BOX(controls_parent), controls_overlay, TRUE, TRUE, 0);
     gtk_widget_reparent(GTK_WIDGET(player->priv->eventbox_output), controls_overlay);
     tmp_box = GTK_WIDGET(gtk_event_box_new());
-    
+
     gtk_widget_set_vexpand(GTK_WIDGET(tmp_box), FALSE);
     gtk_widget_set_hexpand(GTK_WIDGET(tmp_box), FALSE);
     gtk_widget_set_margin_left(tmp_box, 10);
@@ -3243,21 +3238,21 @@ parole_player_init (ParolePlayer *player)
     gtk_box_set_child_packing( GTK_BOX(player->priv->control), GTK_WIDGET(play_box), TRUE, TRUE, 2, GTK_PACK_START );
     gtk_container_set_border_width(GTK_CONTAINER(play_box), 3);
     gtk_widget_show_all(controls_parent);
-    
+
     /* Enable motion-notify event to prevent hiding controls on mouseover */
     gtk_widget_add_events (GTK_WIDGET (player->priv->control), GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK);
-    g_signal_connect(G_OBJECT(player->priv->control), "motion-notify-event", 
+    g_signal_connect(G_OBJECT(player->priv->control), "motion-notify-event",
                      G_CALLBACK(parole_player_gst_widget_motion_notify_event), player);
-                     
+
     gtk_widget_add_events (GTK_WIDGET (play_box), GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK);
-    g_signal_connect(G_OBJECT(play_box), "motion-notify-event", 
+    g_signal_connect(G_OBJECT(play_box), "motion-notify-event",
                      G_CALLBACK(parole_player_gst_widget_motion_notify_event), player);
     for (widgets = gtk_container_get_children(GTK_CONTAINER(play_box)); widgets != NULL; widgets = g_list_next(widgets)) {
         gtk_widget_add_events (GTK_WIDGET (widgets->data), GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK);
-        g_signal_connect(G_OBJECT(widgets->data), "motion-notify-event", 
+        g_signal_connect(G_OBJECT(widgets->data), "motion-notify-event",
                      G_CALLBACK(parole_player_gst_widget_motion_notify_event), player);
     }
-    
+
     /* Previous, Play/Pause, Next */
     action_widget = GTK_WIDGET(gtk_builder_get_object(builder, "media_previous"));
     gtk_widget_set_tooltip_text(GTK_WIDGET(action_widget), _("Previous Track"));
@@ -3266,26 +3261,26 @@ parole_player_init (ParolePlayer *player)
     player->priv->playpause_button = GTK_WIDGET(gtk_builder_get_object(builder, "media_playpause"));
     player->priv->playpause_image = GTK_WIDGET(gtk_builder_get_object(builder, "image_media_playpause"));
     g_signal_connect(G_OBJECT(player->priv->playpause_button), "clicked", G_CALLBACK(parole_player_widget_activate_action), player->priv->media_playpause_action);
-    
+
     action_widget = GTK_WIDGET(gtk_builder_get_object(builder, "media_next"));
     gtk_widget_set_tooltip_text(GTK_WIDGET(action_widget), _("Next Track"));
     g_signal_connect(G_OBJECT(action_widget), "clicked", G_CALLBACK(parole_player_widget_activate_action), player->priv->media_next_action);
-    
+
     /* Elapsed/Duration labels */
     player->priv->label_duration = GTK_WIDGET(gtk_builder_get_object(builder, "media_time_duration"));
     player->priv->label_elapsed = GTK_WIDGET(gtk_builder_get_object(builder, "media_time_elapsed"));
-    
+
     /* Time Slider */
     player->priv->range = GTK_WIDGET (gtk_builder_get_object (builder, "media_progress_slider"));
     gtk_widget_set_name( player->priv->range, "ParoleScale" );
-    
+
     /* Buffering Progressbar */
     player->priv->progressbar_buffering = GTK_WIDGET (gtk_builder_get_object (builder, "media_buffering_progressbar"));
-    
+
     /* Volume Button */
     player->priv->volume = GTK_WIDGET (gtk_builder_get_object (builder, "media_volumebutton"));
     player->priv->mute = GTK_WIDGET (gtk_builder_get_object (builder, "volume-mute-menu"));
-    
+
     /* (un)Fullscreen button */
     player->priv->fullscreen_button = GTK_WIDGET (gtk_builder_get_object (builder, "media_fullscreen"));
     g_signal_connect(G_OBJECT(player->priv->fullscreen_button), "clicked", G_CALLBACK(parole_player_widget_activate_action), player->priv->media_fullscreen_action);
@@ -3293,54 +3288,54 @@ parole_player_init (ParolePlayer *player)
     player->priv->fullscreen_menu_item = GTK_WIDGET (gtk_builder_get_object (builder, "fullscreen-menu"));
     g_signal_connect(G_OBJECT(player->priv->fullscreen_menu_item), "activate", G_CALLBACK(parole_player_widget_activate_action), player->priv->media_fullscreen_action);
     player->priv->fullscreen_image = GTK_WIDGET (gtk_builder_get_object (builder, "image_media_fullscreen"));
-    
+
     /* Show/Hide Playlist button */
     player->priv->showhide_playlist_button = GTK_WIDGET (gtk_builder_get_object (builder, "media_toggleplaylist"));
     g_signal_connect(G_OBJECT(player->priv->showhide_playlist_button), "clicked", G_CALLBACK(parole_player_widget_activate_action), player->priv->toggle_playlist_action);
 
     /* End Media Controls */
-    
+
     gtk_widget_set_direction (GTK_WIDGET (gtk_builder_get_object (builder, "ltrbox")),GTK_TEXT_DIR_LTR);
     g_signal_connect(player->priv->control, "draw", G_CALLBACK(parole_overlay_expose_event), NULL);
-    
+
     /* Info Bar */
     /* placeholder widget */
     hbox_infobar = GTK_WIDGET (gtk_builder_get_object (builder, "infobar_placeholder"));
-    
+
     /* Initialize the InfoBar */
     player->priv->infobar = gtk_info_bar_new ();
     gtk_info_bar_set_message_type (GTK_INFO_BAR (player->priv->infobar),
                             GTK_MESSAGE_QUESTION);
-                            
+
     gtk_widget_set_no_show_all (player->priv->infobar, TRUE);
 
     content_area = gtk_info_bar_get_content_area (GTK_INFO_BAR (player->priv->infobar));
     g_signal_connect (content_area, "size-allocate",
               G_CALLBACK (on_content_area_size_allocate), player);
-              
+
     gtk_box_pack_start( GTK_BOX( hbox_infobar ), player->priv->infobar, TRUE, TRUE, 0);
-    
+
     /* Initialize the Audio Track combobox */
     player->priv->liststore_audiotrack = gtk_list_store_new(1, G_TYPE_STRING);
     player->priv->combobox_audiotrack = gtk_combo_box_new_with_model(GTK_TREE_MODEL(player->priv->liststore_audiotrack));
     player->priv->audio_list = NULL;
-    
+
     cell = gtk_cell_renderer_text_new();
     gtk_cell_layout_pack_start( GTK_CELL_LAYOUT( player->priv->combobox_audiotrack ), cell, TRUE );
     gtk_cell_layout_set_attributes( GTK_CELL_LAYOUT( player->priv->combobox_audiotrack ), cell, "text", 0, NULL );
-    
+
     /* Humanize and pack the Audio Track combobox */
     audiotrack_box = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 6);
     audiotrack_label = gtk_label_new(_("Audio Track:"));
     gtk_box_pack_start(GTK_BOX(audiotrack_box), audiotrack_label, FALSE, FALSE, 0);
     gtk_box_pack_end(GTK_BOX(audiotrack_box), player->priv->combobox_audiotrack, FALSE, FALSE, 0);
     gtk_container_add(GTK_CONTAINER(content_area), audiotrack_box);
-    
+
     /* Initialize the Subtitles combobox */
     player->priv->liststore_subtitles = gtk_list_store_new(1, G_TYPE_STRING);
     player->priv->combobox_subtitles = gtk_combo_box_new_with_model(GTK_TREE_MODEL(player->priv->liststore_subtitles));
     player->priv->subtitle_list = NULL;
-    
+
     sub_cell = gtk_cell_renderer_text_new();
     gtk_cell_layout_pack_start( GTK_CELL_LAYOUT( player->priv->combobox_subtitles ), sub_cell, TRUE );
     gtk_cell_layout_set_attributes( GTK_CELL_LAYOUT( player->priv->combobox_subtitles ), sub_cell, "text", 0, NULL );
@@ -3351,65 +3346,65 @@ parole_player_init (ParolePlayer *player)
     gtk_box_pack_start(GTK_BOX(subtitle_box), subtitle_label, FALSE, FALSE, 0);
     gtk_box_pack_end(GTK_BOX(subtitle_box), player->priv->combobox_subtitles, FALSE, FALSE, 0);
     gtk_container_add(GTK_CONTAINER(content_area), subtitle_box);
-    
+
     infobar_close = gtk_button_new_with_label(_("Close"));
     close_icon = gtk_image_new_from_icon_name("gtk-close", GTK_ICON_SIZE_BUTTON);
     gtk_button_set_image(GTK_BUTTON(infobar_close), close_icon);
     g_signal_connect (infobar_close, "clicked",
               G_CALLBACK (on_infobar_close_clicked), player);
     gtk_box_pack_end(GTK_BOX(content_area), infobar_close, FALSE, FALSE, 0);
-    
+
     gtk_widget_show_all(content_area);
-    
+
     player->priv->update_languages = FALSE;
     player->priv->updated_subs = FALSE;
     /* End Info Bar */
-    
+
     g_object_get (G_OBJECT (player->priv->conf),
                   "volume", &volume,
                   NULL);
-    gtk_scale_button_set_value (GTK_SCALE_BUTTON (player->priv->volume), 
+    gtk_scale_button_set_value (GTK_SCALE_BUTTON (player->priv->volume),
              (gdouble) (volume/100.));
-                                 
+
     /*
      * Pack the playlist.
      */
-    gtk_notebook_append_page (GTK_NOTEBOOK (player->priv->playlist_nt), 
+    gtk_notebook_append_page (GTK_NOTEBOOK (player->priv->playlist_nt),
                   GTK_WIDGET (player->priv->list),
                   gtk_label_new (_("Playlist")));
-                  
+
     g_object_get (G_OBJECT (player->priv->conf),
                   "showhide-playlist", &showhide,
                   NULL);
-          
+
     g_object_get (G_OBJECT (player->priv->conf),
                   "window-width", &w,
                   "window-height", &h,
                   "window-maximized", &maximized,
                   NULL);
-                  
+
     player->priv->last_w = w;
     player->priv->last_h = h;
-          
+
     parole_player_set_playlist_visible(player, showhide);
-    gtk_widget_set_tooltip_text (GTK_WIDGET(player->priv->showhide_playlist_button), 
+    gtk_widget_set_tooltip_text (GTK_WIDGET(player->priv->showhide_playlist_button),
                                  showhide ? _("Hide Playlist") : _("Show Playlist"));
-    gtk_menu_item_set_label (GTK_MENU_ITEM(player->priv->showhide_playlist_menu_item), 
+    gtk_menu_item_set_label (GTK_MENU_ITEM(player->priv->showhide_playlist_menu_item),
                                  showhide ? _("Hide Playlist") : _("Show Playlist"));
-    
+
     gtk_window_set_default_size (GTK_WINDOW (player->priv->window), w, h);
     gtk_window_resize (GTK_WINDOW (player->priv->window), w, h);
     if (maximized)
         gtk_window_maximize(GTK_WINDOW (player->priv->window));
-    
+
     gtk_widget_show_all (player->priv->window);
 
     parole_player_set_wm_opacity_hint (player->priv->window);
-    
-    gtk_box_pack_start (GTK_BOX (player->priv->videobox), 
+
+    gtk_box_pack_start (GTK_BOX (player->priv->videobox),
                         player->priv->gst,
                         TRUE, TRUE, 0);
-    
+
     gtk_widget_realize (player->priv->gst);
     gtk_widget_show (player->priv->gst);
 
@@ -3420,37 +3415,37 @@ parole_player_init (ParolePlayer *player)
 
     g_signal_connect (player->priv->list, "media_activated",
               G_CALLBACK (parole_player_media_activated_cb), player);
-              
+
     g_signal_connect (player->priv->list, "media_cursor_changed",
               G_CALLBACK (parole_player_media_cursor_changed_cb), player);
-              
+
     g_signal_connect (player->priv->list, "uri-opened",
               G_CALLBACK (parole_player_uri_opened_cb), player);
-              
+
     g_signal_connect (player->priv->list, "show-playlist",
               G_CALLBACK (parole_player_media_list_show_playlist_cb), player);
-              
+
     g_signal_connect (player->priv->list, "iso-opened",
               G_CALLBACK (parole_player_iso_opened_cb), player);
-    
+
     /*
      * Load auto saved media list.
      */
     parole_media_list_load (player->priv->list);
-  
+
     parole_gst_set_default_aspect_ratio (player, builder);
-    
+
     gtk_builder_connect_signals (builder, player);
-    
+
     g_object_unref (builder);
-    
+
     parole_player_setup_multimedia_keys (player);
-    
+
     g_signal_connect_swapped (player->priv->window, "notify::is-active",
               G_CALLBACK (parole_player_window_notify_is_active), player);
-                  
+
     gtk_widget_grab_focus (player->priv->gst);
-    
+
     parole_player_dbus_init (player);
 }
 
@@ -3489,9 +3484,9 @@ void parole_player_set_audiotrack_radio_menu_item_selected(ParolePlayer *player,
 {
     GList *menu_items, *menu_iter;
     gint counter = 0;
-    
+
     menu_items = gtk_container_get_children( GTK_CONTAINER (player->priv->languages_menu) );
-    
+
     for (menu_iter = menu_items; menu_iter != NULL; menu_iter = g_list_next(menu_iter))
     {
         if (counter == audio_index) {
@@ -3507,7 +3502,7 @@ void parole_player_set_subtitle_radio_menu_item_selected(ParolePlayer *player, g
 {
     GList *menu_items, *menu_iter;
     menu_items = gtk_container_get_children( GTK_CONTAINER (player->priv->subtitles_menu) );
-    
+
     if (sub_index <= 0)
     {
         gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(menu_items->data), TRUE);
@@ -3533,9 +3528,9 @@ void parole_player_audiotrack_radio_menu_item_changed_cb(GtkWidget *widget, Paro
     GList *menu_items, *menu_iter;
     gint counter = 0;
     gint combobox_index;
-    
+
     menu_items = gtk_container_get_children( GTK_CONTAINER (player->priv->languages_menu) );
-    
+
     for (menu_iter = menu_items; menu_iter != NULL; menu_iter = g_list_next(menu_iter))
     {
         if (gtk_check_menu_item_get_active(GTK_CHECK_MENU_ITEM(menu_iter->data)) == TRUE) {
@@ -3545,7 +3540,7 @@ void parole_player_audiotrack_radio_menu_item_changed_cb(GtkWidget *widget, Paro
         counter++;
     }
     g_list_free(menu_items);
-    
+
     combobox_index = gtk_combo_box_get_active(GTK_COMBO_BOX(player->priv->combobox_audiotrack));
     if (radio_index != combobox_index)
         gtk_combo_box_set_active(GTK_COMBO_BOX(player->priv->combobox_audiotrack), radio_index);
@@ -3554,12 +3549,12 @@ void parole_player_audiotrack_radio_menu_item_changed_cb(GtkWidget *widget, Paro
 void parole_player_subtitles_radio_menu_item_changed_cb(GtkWidget *widget, ParolePlayer *player)
 {
     gint radio_index = 0;
-    gint combobox_index = 0; 
+    gint combobox_index = 0;
     gint counter = 0;
-    
+
     GList *menu_items, *menu_iter;
     menu_items = gtk_container_get_children( GTK_CONTAINER (player->priv->subtitles_menu) );
-    
+
     for (menu_iter = menu_items; menu_iter != NULL; menu_iter = g_list_next(menu_iter))
     {
         if (counter == 0 || counter > 3)
@@ -3572,7 +3567,7 @@ void parole_player_subtitles_radio_menu_item_changed_cb(GtkWidget *widget, Parol
         counter++;
     }
     g_list_free(menu_items);
-    
+
     if (radio_index != 0)
         radio_index -= 3;
 
@@ -3603,7 +3598,7 @@ void parole_player_terminate (ParolePlayer *player)
 }
 
 
-static gboolean     parole_player_dbus_play             (ParolePlayer *player, 
+static gboolean     parole_player_dbus_play             (ParolePlayer *player,
                                                          GError *error);
 
 static gboolean     parole_player_dbus_next_track       (ParolePlayer *player,
@@ -3617,10 +3612,10 @@ static gboolean     parole_player_dbus_raise_volume     (ParolePlayer *player,
 
 static gboolean     parole_player_dbus_lower_volume     (ParolePlayer *player,
                                                          GError *error);
-                     
+
 static gboolean     parole_player_dbus_mute             (ParolePlayer *player,
                                                          GError *error);
-                                                         
+
 static gboolean     parole_player_dbus_unmute           (ParolePlayer *player,
                                                          GError *error);
 
@@ -3634,7 +3629,7 @@ static gboolean     parole_player_dbus_play_disc        (ParolePlayer *player,
 /*
  * DBus server implementation
  */
-static void 
+static void
 parole_player_dbus_class_init (ParolePlayerClass *klass)
 {
     dbus_g_object_type_install_info (G_TYPE_FROM_CLASS (klass),
@@ -3669,7 +3664,7 @@ static gboolean parole_player_dbus_prev_track (ParolePlayer *player,
     parole_player_play_prev (player);
     return TRUE;
 }
-            
+
 static gboolean parole_player_dbus_raise_volume (ParolePlayer *player,
                                                  GError *error)
 {
@@ -3683,14 +3678,14 @@ static gboolean parole_player_dbus_lower_volume (ParolePlayer *player,
     parole_player_volume_down (NULL, player);
     return TRUE;
 }
-                     
+
 static gboolean parole_player_dbus_mute (ParolePlayer *player,
                                          GError *error)
 {
     if (!gtk_scale_button_get_value (GTK_SCALE_BUTTON (player->priv->volume)) == 0.0)
     {
         parole_player_volume_mute(NULL, player);
-    }   
+    }
     return TRUE;
 }
 
@@ -3700,7 +3695,7 @@ static gboolean parole_player_dbus_unmute (ParolePlayer *player,
     if (gtk_scale_button_get_value (GTK_SCALE_BUTTON (player->priv->volume)) == 0.0)
     {
         parole_player_volume_mute(NULL, player);
-    }   
+    }
     return TRUE;
 }
 
@@ -3710,12 +3705,12 @@ static gboolean parole_player_dbus_play_disc (ParolePlayer *player,
                                               GError **error)
 {
     TRACE ("uri : %s", in_uri);
-    
+
     gtk_window_present (GTK_WINDOW (player->priv->window));
-    
+
     if ( parole_is_uri_disc (in_uri) )
         parole_player_disc_selected_cb (NULL, in_uri, in_device, player);
-    
+
     return TRUE;
 }
 
diff --git a/src/parole-player.h b/src/parole-player.h
index 460df7d..c56aa5b 100644
--- a/src/parole-player.h
+++ b/src/parole-player.h
@@ -38,19 +38,19 @@ typedef struct
 {
     GObject                     parent;
     ParolePlayerPrivate        *priv;
-    
+
 } ParolePlayer;
 
 typedef struct
 {
     GObjectClass                parent_class;
-    
+
     void                        (*shuffle_toggled)              (ParolePlayer *player,
                                                                  gboolean shuffle_toggled);
-                                     
+
     void                        (*repeat_toggled)               (ParolePlayer *player,
                                                                  gboolean repeat_toggled);
-                                                                 
+
     void                        (*gst_dvd_nav_message)          (ParolePlayer *player,
                                                                  gint gst_dvd_nav_message);
 
@@ -76,9 +76,9 @@ void                            parole_player_terminate         (ParolePlayer *p
 
 void                            parole_player_embedded          (ParolePlayer *player);
 
-void                            parole_player_full_screen       (ParolePlayer *player, 
+void                            parole_player_full_screen       (ParolePlayer *player,
                                                                  gboolean fullscreen);
-                                                                 
+
 GSimpleAction                  *parole_player_get_action(ParolePlayerAction action);
 
 
diff --git a/src/parole-plugin-player.c b/src/parole-plugin-player.c
index 24080ef..0c42612 100644
--- a/src/parole-plugin-player.c
+++ b/src/parole-plugin-player.c
@@ -48,30 +48,30 @@ struct ParolePluginPlayerPrivate
 {
     GtkWidget *gst;
     GtkWidget *box;
-    
+
     gulong state_changed;
     gulong tag_message;
     gulong seeked;
     gboolean packed;
-    
+
     gboolean fullscreen;
 
 };
 
 G_DEFINE_TYPE_WITH_CODE (ParolePluginPlayer, parole_plugin_player, G_TYPE_OBJECT,
                          G_IMPLEMENT_INTERFACE (PAROLE_TYPE_PROVIDER_PLAYER, parole_plugin_player_iface_init))
-                         
+
 static void
 parole_plugin_player_send_message (const gchar *message)
 {
     DBusGProxy *proxy;
-    
+
     proxy = parole_get_proxy (PAROLE_DBUS_PATH, PAROLE_DBUS_INTERFACE);
-    
+
     dbus_g_proxy_call_no_reply (proxy, message,
                                 G_TYPE_INVALID,
                                 G_TYPE_INVALID);
-    
+
     g_object_unref (proxy);
 }
 
@@ -79,36 +79,36 @@ static GtkWidget *
 parole_plugin_player_get_main_window (ParoleProviderPlayer *provider)
 {
     ParolePluginPlayer *player;
-    
+
     player = PAROLE_PLUGIN_PLAYER (provider);
     return gtk_widget_get_toplevel (player->priv->gst);
 }
 
 static void
-parole_plugin_player_pack_widget (ParoleProviderPlayer *provider, GtkWidget *widget, 
+parole_plugin_player_pack_widget (ParoleProviderPlayer *provider, GtkWidget *widget,
                                   const gchar *title, ParolePluginContainer container_type)
 {
     ParolePluginPlayer *player;
     ParolePluginsManager *manager;
-    
+
     manager = parole_plugins_manager_get ();
     player = PAROLE_PLUGIN_PLAYER (provider);
-    
+
     g_return_if_fail (player->priv->packed == FALSE);
-    
+
     player->priv->packed = TRUE;
     player->priv->box = widget;
-    
+
     parole_plugins_manager_pack (manager, widget, title, container_type);
 }
 
-static ParoleState 
+static ParoleState
 parole_plugin_player_get_state (ParoleProviderPlayer *provider)
 {
     ParolePluginPlayer *player;
-    
+
     player = PAROLE_PLUGIN_PLAYER (provider);
-    
+
     return parole_gst_get_state (PAROLE_GST (player->priv->gst));
 }
 
@@ -116,86 +116,86 @@ static const ParoleStream *
 parole_plugin_player_get_stream (ParoleProviderPlayer *provider)
 {
     ParolePluginPlayer *player;
-    
+
     player = PAROLE_PLUGIN_PLAYER (provider);
-    
+
     return parole_gst_get_stream (PAROLE_GST (player->priv->gst));
 }
 
-static gboolean 
+static gboolean
 parole_plugin_player_play_uri (ParoleProviderPlayer *provider, const gchar *uri)
 {
     ParoleMediaList *list;
 
     list = PAROLE_MEDIA_LIST (parole_media_list_get ());
     parole_media_list_open_uri (list, uri);
-    
+
     g_object_unref (list);
-    
+
     return TRUE;
 }
 
-static gboolean 
+static gboolean
 parole_plugin_player_pause (ParoleProviderPlayer *provider)
 {
     ParolePluginPlayer *player;
-    
+
     player = PAROLE_PLUGIN_PLAYER (provider);
-    
+
     parole_gst_pause (PAROLE_GST (player->priv->gst));
-    
+
     return TRUE;
 }
 
-static gboolean 
+static gboolean
 parole_plugin_player_resume (ParoleProviderPlayer *provider)
 {
     ParolePluginPlayer *player;
-    
+
     player = PAROLE_PLUGIN_PLAYER (provider);
-    
+
     parole_gst_resume (PAROLE_GST (player->priv->gst));
-    
+
     return TRUE;
 }
 
-static gboolean 
+static gboolean
 parole_plugin_player_stop (ParoleProviderPlayer *provider)
 {
     ParolePluginPlayer *player;
-    
+
     player = PAROLE_PLUGIN_PLAYER (provider);
-    
+
     parole_gst_stop (PAROLE_GST (player->priv->gst));
-    
+
     return TRUE;
 }
 
-static gboolean 
+static gboolean
 parole_plugin_player_play_previous (ParoleProviderPlayer *provider)
 {
     parole_plugin_player_send_message ("PrevTrack");
-    
+
     return TRUE;
 }
 
-static gboolean 
+static gboolean
 parole_plugin_player_play_next (ParoleProviderPlayer *provider)
 {
     parole_plugin_player_send_message ("NextTrack");
-    
+
     return TRUE;
 }
 
-static gboolean 
+static gboolean
 parole_plugin_player_seek (ParoleProviderPlayer *provider, gdouble pos)
 {
     ParolePluginPlayer *player;
-    
+
     player = PAROLE_PLUGIN_PLAYER (provider);
-    
+
     parole_gst_seek (PAROLE_GST (player->priv->gst), pos);
-    
+
     return TRUE;
 }
 
@@ -204,11 +204,11 @@ parole_plugin_player_get_stream_position (ParoleProviderPlayer *provider)
 {
     ParolePluginPlayer *player;
     gdouble position = 0;
-    
+
     player = PAROLE_PLUGIN_PLAYER (provider);
 
     position = parole_gst_get_stream_position (PAROLE_GST (player->priv->gst));
-    
+
     /* Return as microseconds */
     return position*1000000.0;
 }
@@ -219,7 +219,7 @@ static void parole_plugin_player_open_media_chooser (ParoleProviderPlayer *provi
 
     list = PAROLE_MEDIA_LIST (parole_media_list_get ());
     parole_media_list_open (list);
-    
+
     g_object_unref (list);
 }
 
@@ -231,23 +231,23 @@ static GSimpleAction* parole_plugin_player_get_action (ParoleProviderPlayer *pro
 static gboolean parole_plugin_player_get_fullscreen (ParoleProviderPlayer *provider)
 {
     ParolePluginPlayer *player;
-    
+
     player = PAROLE_PLUGIN_PLAYER (provider);
-    
+
     return player->priv->fullscreen;
 }
 
 static gboolean parole_plugin_player_set_fullscreen (ParoleProviderPlayer *provider, gboolean fullscreen)
 {
     GtkWidget *window;
-    
+
     window = parole_plugin_player_get_main_window (provider);
-    
+
     if (fullscreen)
         gtk_window_fullscreen(GTK_WINDOW(window));
     else
         gtk_window_unfullscreen(GTK_WINDOW(window));
-        
+
     return TRUE;
 }
 
@@ -271,14 +271,14 @@ static void parole_plugin_player_iface_init (ParoleProviderPlayerIface *iface)
     iface->set_fullscreen = parole_plugin_player_set_fullscreen;
 }
 
-static void 
-parole_plugin_player_media_state_changed_cb (ParoleGst *gst, const ParoleStream *stream, 
+static void
+parole_plugin_player_media_state_changed_cb (ParoleGst *gst, const ParoleStream *stream,
                                              ParoleState state, ParolePluginPlayer *player)
 {
     g_signal_emit_by_name (G_OBJECT (player), "state-changed", stream, state);
 }
 
-static void 
+static void
 parole_plugin_player_media_tag_cb (ParoleGst *gst, const ParoleStream *stream, ParolePluginPlayer *player)
 {
     g_signal_emit_by_name (G_OBJECT (player), "tag-message", stream);
@@ -291,7 +291,7 @@ parole_plugin_player_media_seeked_cb (ParoleGst *gst, ParolePluginPlayer *player
 }
 
 static gboolean
-parole_plugin_player_window_state_event  (GtkWidget *widget, 
+parole_plugin_player_window_state_event  (GtkWidget *widget,
                                           GdkEventWindowState *event,
                                           ParolePluginPlayer *player)
 {
@@ -317,23 +317,23 @@ parole_plugin_player_init (ParolePluginPlayer *player)
 {
     GtkWidget *window;
     player->priv = PAROLE_PLUGIN_PLAYER_GET_PRIVATE (player);
-    
+
     player->priv->gst = parole_gst_get ();
-    
+
     player->priv->state_changed = g_signal_connect (G_OBJECT (player->priv->gst), "media-state",
                         G_CALLBACK (parole_plugin_player_media_state_changed_cb), player);
-              
+
     player->priv->tag_message = g_signal_connect (G_OBJECT (player->priv->gst), "media-tag",
                         G_CALLBACK (parole_plugin_player_media_tag_cb), player);
-                        
+
     player->priv->seeked = g_signal_connect (G_OBJECT (player->priv->gst), "media-seeked",
                         G_CALLBACK (parole_plugin_player_media_seeked_cb), player);
 
-    player->priv->fullscreen = FALSE;                        
+    player->priv->fullscreen = FALSE;
     window = GTK_WIDGET(gtk_widget_get_toplevel (player->priv->gst));
-    g_signal_connect(   G_OBJECT(window), 
-                        "window-state-event", 
-                        G_CALLBACK(parole_plugin_player_window_state_event), 
+    g_signal_connect(   G_OBJECT(window),
+                        "window-state-event",
+                        G_CALLBACK(parole_plugin_player_window_state_event),
                         player );
 
     player->priv->packed = FALSE;
@@ -346,19 +346,19 @@ parole_plugin_player_finalize (GObject *object)
     ParolePluginPlayer *player;
 
     player = PAROLE_PLUGIN_PLAYER (object);
-    
+
     if ( G_IS_OBJECT (player->priv->gst) )
     {
-        if (g_signal_handler_is_connected (player->priv->gst, player->priv->state_changed)) 
+        if (g_signal_handler_is_connected (player->priv->gst, player->priv->state_changed))
             g_signal_handler_disconnect (player->priv->gst, player->priv->state_changed);
 
-        if (g_signal_handler_is_connected (player->priv->gst, player->priv->tag_message)) 
+        if (g_signal_handler_is_connected (player->priv->gst, player->priv->tag_message))
             g_signal_handler_disconnect (player->priv->gst, player->priv->tag_message);
-            
-        if (g_signal_handler_is_connected (player->priv->gst, player->priv->seeked)) 
+
+        if (g_signal_handler_is_connected (player->priv->gst, player->priv->seeked))
             g_signal_handler_disconnect (player->priv->gst, player->priv->seeked);
     }
-    
+
     if ( player->priv->packed && GTK_IS_WIDGET (player->priv->box))
         gtk_widget_destroy (player->priv->box);
 
@@ -369,8 +369,8 @@ ParolePluginPlayer *
 parole_plugin_player_new (void)
 {
     ParolePluginPlayer *player = NULL;
-    
+
     player = g_object_new (PAROLE_TYPE_PLUGIN_PLAYER, NULL);
-    
+
     return player;
 }
diff --git a/src/parole-plugins-manager.c b/src/parole-plugins-manager.c
index 1564256..2831c7d 100644
--- a/src/parole-plugins-manager.c
+++ b/src/parole-plugins-manager.c
@@ -52,13 +52,13 @@
 
 #define PAROLE_PLUGIN_EXT = ".desktop"
 
-typedef struct 
+typedef struct
 {
     gchar *name;
     gchar *authors;
     gchar *desc;
     gchar *website;
-    
+
 } ParolePluginInfo;
 
 typedef struct
@@ -72,15 +72,15 @@ typedef struct
     GtkWidget *author;
     GtkWidget *site;
     GtkWidget *configure;
-    
+
 } PrefData;
 
 void parole_plugins_manager_pref_response_cb       (GtkDialog *dialog,
                                                     gint reponse_id,
                                                     PrefData *pref);
 
-void parole_plugins_manager_cell_toggled_cb        (GtkCellRendererToggle *cell_renderer, 
-                                                    gchar *path, 
+void parole_plugins_manager_cell_toggled_cb        (GtkCellRendererToggle *cell_renderer,
+                                                    gchar *path,
                                                     PrefData *pref);
 
 void parole_plugins_manager_tree_cursor_changed_cb (GtkTreeView *view,
@@ -105,11 +105,11 @@ struct ParolePluginsManagerPrivate
 {
     GtkWidget *list_nt;
     GtkWidget *main_window;
-    
+
     GPtrArray *array;
-    
+
     gboolean   load_plugins;
-    
+
     ParoleConf *conf;
 };
 
@@ -166,7 +166,7 @@ parole_plugins_manager_get_selected_module_data (PrefData *pref, ParoleProviderM
     GtkTreeIter       iter;
 
     sel = gtk_tree_view_get_selection (GTK_TREE_VIEW (pref->view));
-    
+
     if ( !sel )
     {
         *module = NULL;
@@ -244,9 +244,9 @@ parole_plugins_manager_save_rc (ParolePluginsManager *manager, gchar *filename,
     g_strfreev (saved_plugins);
 }
 
-void 
-parole_plugins_manager_cell_toggled_cb (GtkCellRendererToggle *cell_renderer, 
-                                        gchar *path_str, 
+void
+parole_plugins_manager_cell_toggled_cb (GtkCellRendererToggle *cell_renderer,
+                                        gchar *path_str,
                                         PrefData *pref)
 {
     ParoleProviderModule *module = NULL;
@@ -258,8 +258,8 @@ parole_plugins_manager_cell_toggled_cb (GtkCellRendererToggle *cell_renderer,
 
     if (gtk_tree_model_get_iter (GTK_TREE_MODEL (pref->store), &iter, path))
     {
-        gtk_tree_model_get (GTK_TREE_MODEL (pref->store), &iter, 
-                            COL_ACTIVE, &active, 
+        gtk_tree_model_get (GTK_TREE_MODEL (pref->store), &iter,
+                            COL_ACTIVE, &active,
                             COL_MODULE, &module,
                             -1);
 
@@ -286,7 +286,7 @@ parole_plugins_manager_cell_toggled_cb (GtkCellRendererToggle *cell_renderer,
             }
         }
 
-        gtk_list_store_set (GTK_LIST_STORE (pref->store), &iter, 
+        gtk_list_store_set (GTK_LIST_STORE (pref->store), &iter,
                             COL_ACTIVE, active,
                             -1);
     }
@@ -406,7 +406,7 @@ parole_plugins_manager_show_plugins_pref (GtkWidget *widget, ParolePluginsManage
     {
         parole_dialog_info (GTK_WINDOW (manager->priv->main_window),
         _("No installed plugins found on this system"),
-        _("Please check your installation.")); 
+        _("Please check your installation."));
         return;
     }
 
@@ -425,7 +425,7 @@ parole_plugins_manager_show_plugins_pref (GtkWidget *widget, ParolePluginsManage
     pref->site = GTK_WIDGET (gtk_builder_get_object (builder, "sitebutton"));
     pref->configure = GTK_WIDGET (gtk_builder_get_object (builder, "configure"));
 
-    gtk_window_set_transient_for (GTK_WINDOW (pref->window), 
+    gtk_window_set_transient_for (GTK_WINDOW (pref->window),
     GTK_WINDOW (manager->priv->main_window));
 
     for ( i = 0; i < manager->priv->array->len; i++)
@@ -437,9 +437,9 @@ parole_plugins_manager_show_plugins_pref (GtkWidget *widget, ParolePluginsManage
         info = parole_plugins_manager_get_plugin_info (module->desktop_file);
 
         gtk_list_store_append (pref->store, &iter);
-        gtk_list_store_set (pref->store, &iter, 
+        gtk_list_store_set (pref->store, &iter,
                             COL_ACTIVE, parole_provider_module_get_is_active (module),
-                            COL_PLUGIN, info->name, 
+                            COL_PLUGIN, info->name,
                             COL_MODULE, module,
                             COL_INFO, info,
                             -1);
@@ -519,7 +519,7 @@ static void parole_plugins_manager_get_property    (GObject *object,
     }
 }
 
-static gchar * 
+static gchar *
 parole_plugins_manager_get_module_name (const gchar *desktop_file)
 {
     GKeyFile *file;
@@ -643,7 +643,7 @@ parole_plugins_manager_finalize (GObject *object)
 
     manager = PAROLE_PLUGINS_MANAGER (object);
 
-    g_ptr_array_foreach    (manager->priv->array, 
+    g_ptr_array_foreach    (manager->priv->array,
                             (GFunc)parole_plugins_manager_unload_all, NULL);
     g_ptr_array_free (manager->priv->array, TRUE);
 
@@ -659,8 +659,8 @@ parole_plugins_manager_new (gboolean load_plugins)
     }
     else
     {
-        parole_plugins_manager_object = g_object_new   (PAROLE_TYPE_PLUGINS_MANAGER, 
-                                                        "load-plugins", load_plugins, 
+        parole_plugins_manager_object = g_object_new   (PAROLE_TYPE_PLUGINS_MANAGER,
+                                                        "load-plugins", load_plugins,
                                                         NULL);
         g_object_add_weak_pointer (parole_plugins_manager_object, &parole_plugins_manager_object);
     }
@@ -728,7 +728,7 @@ void parole_plugins_manager_load (ParolePluginsManager *manager)
 
 }
 
-void 
+void
 parole_plugins_manager_pack (ParolePluginsManager *manager, GtkWidget *widget, const gchar *title, ParolePluginContainer container)
 {
     if ( container == PAROLE_PLUGIN_CONTAINER_PLAYLIST )
diff --git a/src/parole-utils.c b/src/parole-utils.c
index f5df3ea..b58753d 100644
--- a/src/parole-utils.c
+++ b/src/parole-utils.c
@@ -63,9 +63,9 @@ static const char subtitle_ext[][4] = {
 
 /*
  * compare_by_name_using_number
- * 
+ *
  * * Copyright (c) 2005-2007 Benedikt Meurer <benny at xfce.org>
- * 
+ *
  */
 static gint
 compare_by_name_using_number (const gchar *ap,
@@ -93,9 +93,9 @@ compare_by_name_using_number (const gchar *ap,
 
 /*
  * thunar_file_compare_by_name
- * 
+ *
  * * Copyright (c) 2005-2007 Benedikt Meurer <benny at xfce.org>
- * 
+ *
  */
 gint
 thunar_file_compare_by_name (ParoleFile *file_a,
@@ -236,15 +236,15 @@ parole_get_name_without_extension (const gchar *name)
 {
     guint len, suffix;
     gchar *ret;
-    
+
     len = strlen (name);
-    
+
     for ( suffix = len -1; suffix > 0;  suffix--)
     {
         if ( name [suffix] == '.' )
             break;
     }
-    
+
     ret = g_strndup (name, sizeof (char) * (suffix));
     return ret;
 }
@@ -255,13 +255,13 @@ parole_get_subtitle_in_dir (const gchar *dir_path, const gchar *file)
     gchar *sub_path = NULL;
     gchar *file_no_ext;
     guint i;
-    
+
     file_no_ext = parole_get_name_without_extension (file);
-    
+
     for ( i = 0; i < G_N_ELEMENTS (subtitle_ext); i++)
     {
         sub_path = g_strdup_printf ("%s%c%s.%s", dir_path, G_DIR_SEPARATOR, file_no_ext, subtitle_ext[i]);
-        
+
         if ( g_file_test (sub_path, G_FILE_TEST_EXISTS | G_FILE_TEST_IS_REGULAR ) )
             break;
 
@@ -270,7 +270,7 @@ parole_get_subtitle_in_dir (const gchar *dir_path, const gchar *file)
     }
 
     g_free (file_no_ext);
-    
+
     return sub_path;
 }
 
@@ -282,51 +282,51 @@ gchar *parole_get_subtitle_path (const gchar *uri)
     gchar *path;
     gchar *file_name;
     gchar *ret = NULL;
-    
+
     file = g_file_new_for_commandline_arg (uri);
     parent = g_file_get_parent (file);
-    
+
     TRACE ("uri : %s", uri);
-    
+
     if ( !parent )
     {
         g_object_unref (file);
         return NULL;
     }
-    
-    info = g_file_query_info (file, 
+
+    info = g_file_query_info (file,
                   "standard::*,",
                   0,
                   NULL,
                   &error);
-    
+
     if ( error )
     {
         g_warning ("%s: \n", error->message);
         g_error_free (error);
         return NULL;
     }
-    
+
     file_name = g_strdup (g_file_info_get_display_name (info));
-    
+
     path = g_file_get_path (parent);
-    
+
     ret = parole_get_subtitle_in_dir (path, file_name);
 
     g_object_unref (file);
     g_object_unref (parent);
     g_object_unref (info);
-    
+
     g_free (file_name);
     g_free (path);
-    
+
     return ret;
 }
 
 gboolean
 parole_is_uri_disc (const gchar *uri)
 {
-    if (   g_str_has_prefix (uri, "dvd:/")  || g_str_has_prefix (uri, "vcd:/") 
+    if (   g_str_has_prefix (uri, "dvd:/")  || g_str_has_prefix (uri, "vcd:/")
         || g_str_has_prefix (uri, "svcd:/") || g_str_has_prefix (uri, "cdda:/"))
         return TRUE;
     else
@@ -337,24 +337,24 @@ GdkPixbuf *parole_icon_load (const gchar *icon_name, gint size)
 {
     GdkPixbuf *pix = NULL;
     GError *error = NULL;
-    
-    pix = gtk_icon_theme_load_icon (gtk_icon_theme_get_default (), 
-                                    icon_name, 
+
+    pix = gtk_icon_theme_load_icon (gtk_icon_theme_get_default (),
+                                    icon_name,
                                     size,
                                     GTK_ICON_LOOKUP_USE_BUILTIN,
                                     &error);
-                    
+
     if ( error )
     {
         g_warning ("Unable to load icon : %s : %s", icon_name, error->message);
         g_error_free (error);
     }
-    
+
     return pix;
-    
+
 }
 
-void parole_get_media_files (GtkFileFilter *filter, const gchar *path, 
+void parole_get_media_files (GtkFileFilter *filter, const gchar *path,
                  gboolean recursive, GSList **list)
 {
     GtkFileFilter *playlist_filter;
@@ -368,12 +368,12 @@ void parole_get_media_files (GtkFileFilter *filter, const gchar *path,
     g_object_ref_sink (playlist_filter);
 
     gtk_main_iteration_do (FALSE);
-     
+
 
     if ( g_file_test (path, G_FILE_TEST_IS_REGULAR ) )
     {
         file = parole_file_new (path);
-        if ( parole_file_filter (playlist_filter, file) && 
+        if ( parole_file_filter (playlist_filter, file) &&
              parole_pl_parser_guess_format_from_extension (path) != PAROLE_PL_FORMAT_UNKNOWN )
         {
             playlist = parole_pl_parser_parse_from_file_by_extension (path);
@@ -393,10 +393,10 @@ void parole_get_media_files (GtkFileFilter *filter, const gchar *path,
     else if ( g_file_test (path, G_FILE_TEST_IS_DIR ) )
     {
         dir = g_dir_open (path, 0, NULL);
-        
+
         if ( G_UNLIKELY (dir == NULL) )
             return;
-        
+
         while ( (name = g_dir_read_name (dir)) )
         {
             gchar *path_internal = g_build_filename (path, name, NULL);
@@ -441,21 +441,21 @@ void parole_get_media_files (GtkFileFilter *filter, const gchar *path,
 
 gboolean
 parole_device_has_cdda (const gchar *device)
-{   
+{
     gboolean ret_val = FALSE;
- 
+
 #if defined(__linux__)
     gint fd;
     gint drive;
-    
+
     TRACE ("device : %s", device);
-    
+
     if ( (fd = open (device, O_RDONLY)) < 0 )
     {
         g_debug ("Failed to open device : %s", device);
         return FALSE;
     }
-    
+
     if ( (drive = ioctl (fd, CDROM_DRIVE_STATUS, NULL)) )
     {
         if ( drive == CDS_DRIVE_NOT_READY )
@@ -473,7 +473,7 @@ parole_device_has_cdda (const gchar *device)
             }
         }
     }
-    
+
     close (fd);
 #endif /* if defined(__linux__) */
     return ret_val;
@@ -484,11 +484,11 @@ parole_guess_uri_from_mount (GMount *mount)
 {
     GFile *file;
     gchar *uri = NULL;
-    
+
     g_return_val_if_fail (G_IS_MOUNT (mount), NULL);
-    
+
     file = g_mount_get_root (mount);
-    
+
     if ( g_file_has_uri_scheme (file, "cdda") )
     {
         uri = g_strdup ("cdda://");
@@ -497,13 +497,13 @@ parole_guess_uri_from_mount (GMount *mount)
     {
         gchar **content_type;
         int i;
-        
+
         content_type = g_content_type_guess_for_tree (file);
-        
+
         for ( i = 0; content_type && content_type[i]; i++)
         {
             TRACE ("Checking disc content type : %s", content_type[i]);
-            
+
             if ( !g_strcmp0 (content_type[i], "x-content/video-dvd") )
             {
                 uri = g_strdup ("dvd:/");
@@ -525,15 +525,15 @@ parole_guess_uri_from_mount (GMount *mount)
                 break;
             }
         }
-        
+
         if ( content_type )
             g_strfreev (content_type);
     }
-    
+
     g_object_unref (file);
-    
+
     TRACE ("Got uri=%s for mount=%s", uri, g_mount_get_name (mount));
-       
+
     return uri;
 }
 
@@ -545,31 +545,31 @@ parole_get_uri_from_unix_device (const gchar *device)
     guint len;
     guint i;
     gchar *uri = NULL;
-    
+
     if ( device == NULL )
         return NULL;
-    
+
     /*Check for cdda */
     if ( parole_device_has_cdda (device) )
     {
         return g_strdup ("cdda://");
     }
-    
+
     monitor = g_volume_monitor_get ();
-    
+
     list = g_volume_monitor_get_volumes (monitor);
-    
+
     len = g_list_length (list);
-    
+
     for ( i = 0; i < len; i++)
     {
         GVolume *volume;
         GDrive *drive;
-        
+
         volume = g_list_nth_data (list, i);
-        
+
         drive = g_volume_get_drive (volume);
-        
+
         if ( g_drive_can_eject (drive) && g_drive_has_media (drive) )
         {
             gchar *unix_device;
@@ -579,7 +579,7 @@ parole_get_uri_from_unix_device (const gchar *device)
             {
                 GMount *mount;
                 mount = g_volume_get_mount (volume);
-                
+
                 if ( mount )
                 {
                     uri = parole_guess_uri_from_mount (mount);
@@ -591,31 +591,31 @@ parole_get_uri_from_unix_device (const gchar *device)
             }
             g_free (unix_device);
         }
-        
+
         g_object_unref (drive);
     }
-    
+
     g_list_foreach (list, (GFunc) g_object_unref, NULL);
     g_list_free (list);
-    
+
     g_object_unref (monitor);
-    
+
     TRACE ("Got uri=%s for device=%s", uri, device);
-    
+
     return uri;
 }
 
 /**
  * parole_format_media_length:
- * 
+ *
  * @total_seconds: lenght of the media file in seconds
- * 
+ *
  * Returns : formated string for the media lenght
  **/
 gchar *parole_format_media_length (gint total_seconds)
 {
     gchar *timestring;
-    
+
     gint  hours;
     gint  minutes;
     gint  seconds;
@@ -633,44 +633,74 @@ gchar *parole_format_media_length (gint total_seconds)
     {
         timestring = g_strdup_printf ("%i:%02i:%02i", hours, minutes, seconds);
     }
-    
+
     return timestring;
 }
 
 
 /**
  * parole_taglibc_get_media_length:
- * 
+ *
  * @ParoleFile: a ParoleFile
- * 
+ *
  * Returns: the length of the media only if the file is a local
  *          media file.
  **/
 gchar *parole_taglibc_get_media_length (ParoleFile *file)
 {
     #ifdef HAVE_TAGLIBC
-    
+
     TagLib_File *tag_file;
-    
+
     if (g_str_has_prefix (parole_file_get_uri (file), "file:/"))
     {
         tag_file = taglib_file_new (parole_file_get_file_name (file));
-    
+
         if ( tag_file )
         {
             gint length = 0;
             const TagLib_AudioProperties *prop = taglib_file_audioproperties (tag_file);
-            
+
             if (prop)
                 length = taglib_audioproperties_length (prop);
-            
+
             taglib_file_free (tag_file);
-            
+
             if (length != 0)
                 return parole_format_media_length (length);
         }
     }
     #endif /* HAVE_TAGLIBC */
-    
+
     return NULL;
 }
+
+GSimpleAction* g_simple_toggle_action_new (const gchar *action_name,
+                                           const GVariantType *parameter_type)
+{
+    GSimpleAction *simple;
+
+    simple = g_simple_action_new_stateful (action_name, parameter_type,
+                                           g_variant_new_boolean (FALSE));
+
+    return simple;
+}
+
+gboolean g_simple_toggle_action_get_active (GSimpleAction *simple)
+{
+    GVariant *state;
+
+    g_object_get (simple,
+        "state", &state,
+        NULL);
+
+    return g_variant_get_boolean(state);
+}
+
+void g_simple_toggle_action_set_active (GSimpleAction *simple, gboolean active)
+{
+    if (g_simple_toggle_action_get_active(simple) != active)
+    {
+        g_simple_action_set_state (simple, g_variant_new_boolean(active));
+    }
+}
diff --git a/src/parole-utils.h b/src/parole-utils.h
index 63a7741..65ea5b3 100644
--- a/src/parole-utils.h
+++ b/src/parole-utils.h
@@ -45,15 +45,23 @@ void        parole_get_media_files              (GtkFileFilter *filter,
                                                  const gchar *path,
                                                  gboolean recursive,
                                                  GSList **list);
-                             
+
 gboolean    parole_device_has_cdda              (const gchar *device);
 
 gchar      *parole_guess_uri_from_mount         (GMount *mount);
-                             
+
 gchar      *parole_get_uri_from_unix_device     (const gchar *device);
 
 gchar      *parole_format_media_length          (gint total_seconds);
 
 gchar      *parole_taglibc_get_media_length     (ParoleFile *file);
 
+GSimpleAction* g_simple_toggle_action_new       (const gchar *action_name,
+                                                 const GVariantType *parameter_type);
+
+gboolean g_simple_toggle_action_get_active      (GSimpleAction *simple);
+
+void g_simple_toggle_action_set_active          (GSimpleAction *simple,
+                                                 gboolean active);
+
 #endif /* __PAROLE_UTILS_ */
diff --git a/src/plugins/notify/notify-provider.c b/src/plugins/notify/notify-provider.c
index a132504..ec3c0fa 100644
--- a/src/plugins/notify/notify-provider.c
+++ b/src/plugins/notify/notify-provider.c
@@ -51,10 +51,10 @@ struct _NotifyProvider
     NotifyNotification     *notification;
 };
 
-PAROLE_DEFINE_TYPE_WITH_CODE   (NotifyProvider, 
-                                notify_provider, 
+PAROLE_DEFINE_TYPE_WITH_CODE   (NotifyProvider,
+                                notify_provider,
                                 G_TYPE_OBJECT,
-                                PAROLE_IMPLEMENT_INTERFACE (PAROLE_TYPE_PROVIDER_PLUGIN, 
+                                PAROLE_IMPLEMENT_INTERFACE (PAROLE_TYPE_PROVIDER_PLUGIN,
                                 notify_provider_iface_init));
 
 static void
@@ -102,23 +102,23 @@ notify_playing (NotifyProvider *notify, const ParoleStream *stream)
     gchar *message;
     ParoleMediaType media_type;
     GSimpleAction *action;
-    
-    g_object_get (G_OBJECT (stream), 
+
+    g_object_get (G_OBJECT (stream),
                   "title", &title,
                   "album", &album,
                   "artist", &artist,
                   "year", &year,
                   "has-video", &has_video,
-                  "media-type", &media_type,    
-                  "uri", &stream_uri,  
+                  "media-type", &media_type,
+                  "uri", &stream_uri,
                   NULL);
-          
+
     if ( g_strcmp0(stream_uri, notify->last_played_uri) == 0 )
         return;
-    
+
     notify->last_played_uri = g_strdup(stream_uri);
     g_free(stream_uri);
-          
+
     if ( has_video )
         return;
 
@@ -129,7 +129,7 @@ notify_playing (NotifyProvider *notify, const ParoleStream *stream)
         g_object_get (G_OBJECT (stream),
                       "uri", &uri,
                       NULL);
-                  
+
         filename = g_filename_from_uri (uri, NULL, NULL);
         g_free (uri);
         if ( filename )
@@ -140,12 +140,12 @@ notify_playing (NotifyProvider *notify, const ParoleStream *stream)
             return;
         }
     }
-    
+
     if (!album)
         album = g_strdup( _("Unknown Album") );
     if (!artist)
         artist = g_strdup( _("Unknown Artist") );
-    
+
     if (!year)
         message = g_strdup_printf ("%s %s\n%s %s", _("<i>on</i>"), album, _("<i>by</i>"), artist);
     else
@@ -153,12 +153,12 @@ notify_playing (NotifyProvider *notify, const ParoleStream *stream)
         message = g_strdup_printf ("%s %s (%s)\n%s %s", _("<i>on</i>"), album, year, _("<i>by</i>"), artist);
         g_free(year);
     }
-    
+
     g_free(artist);
     g_free(album);
-    
+
 #ifdef NOTIFY_CHECK_VERSION
-#if NOTIFY_CHECK_VERSION (0, 7, 0)    
+#if NOTIFY_CHECK_VERSION (0, 7, 0)
     notify->notification = notify_notification_new (title, message, NULL);
 #else
     notify->notification = notify_notification_new (title, message, NULL, NULL);
@@ -168,7 +168,7 @@ notify_playing (NotifyProvider *notify, const ParoleStream *stream)
 #endif
     g_free (title);
     g_free (message);
-    
+
     if (media_type == PAROLE_MEDIA_TYPE_CDDA)
         pix = gtk_icon_theme_load_icon (gtk_icon_theme_get_default (),
                                         "media-cdrom-audio",
@@ -177,7 +177,7 @@ notify_playing (NotifyProvider *notify, const ParoleStream *stream)
                                         NULL);
     else
         pix  = parole_stream_get_image(G_OBJECT(stream));
-    
+
     if (!pix)
         pix = gtk_icon_theme_load_icon (gtk_icon_theme_get_default (),
                                         "audio-x-generic",
@@ -192,7 +192,7 @@ notify_playing (NotifyProvider *notify, const ParoleStream *stream)
     }
     notify_notification_set_urgency (notify->notification, NOTIFY_URGENCY_LOW);
     notify_notification_set_timeout (notify->notification, 5000);
-    
+
     /* Only show Previous Track item if clicking previous is possible */
     action = parole_provider_player_get_action(PAROLE_PROVIDER_PLAYER(notify->player), PAROLE_PLAYER_ACTION_PREVIOUS);
     g_object_get (G_OBJECT (action),
@@ -200,8 +200,8 @@ notify_playing (NotifyProvider *notify, const ParoleStream *stream)
                   NULL);
     if (enabled)
     {
-    notify_notification_add_action (notify->notification, 
-                                    "play-previous", _("Previous Track"), 
+    notify_notification_add_action (notify->notification,
+                                    "play-previous", _("Previous Track"),
                                     NOTIFY_ACTION_CALLBACK(on_previous_clicked),
                                     notify, NULL);
     }
@@ -213,12 +213,12 @@ notify_playing (NotifyProvider *notify, const ParoleStream *stream)
                   NULL);
     if (enabled)
     {
-    notify_notification_add_action (notify->notification, 
-                                    "play-next", _("Next Track"), 
+    notify_notification_add_action (notify->notification,
+                                    "play-next", _("Next Track"),
                                     NOTIFY_ACTION_CALLBACK(on_next_clicked),
                                     notify, NULL);
     }
-    
+
     notify_notification_show (notify->notification, NULL);
     g_signal_connect (notify->notification, "closed",
                       G_CALLBACK (notification_closed_cb), notify);
@@ -229,7 +229,7 @@ state_changed_cb (ParoleProviderPlayer *player, const ParoleStream *stream, Paro
 {
     if ( state == PAROLE_STATE_PLAYING )
         notify_playing (notify, stream);
-        
+
     else if ( state <= PAROLE_STATE_PAUSED )
         close_notification (notify);
 }
@@ -243,15 +243,15 @@ static void
 notify_provider_set_player (ParoleProviderPlugin *plugin, ParoleProviderPlayer *player)
 {
     NotifyProvider *notify;
-    
+
     notify = NOTIFY_PROVIDER (plugin);
-    
+
     notify->player = player;
 
     notify->notification = NULL;
     notify_init ("parole-notify");
-                  
-    g_signal_connect (player, "state_changed", 
+
+    g_signal_connect (player, "state_changed",
                       G_CALLBACK (state_changed_cb), notify);
 }
 
@@ -265,7 +265,7 @@ notify_provider_iface_init (ParoleProviderPluginIface *iface)
 static void notify_provider_class_init (NotifyProviderClass *klass)
 {
     GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
-    
+
     gobject_class->finalize = notify_provider_finalize;
 }
 
@@ -277,10 +277,10 @@ static void notify_provider_init (NotifyProvider *provider)
 static void notify_provider_finalize (GObject *object)
 {
     NotifyProvider *notify;
-    
+
     notify = NOTIFY_PROVIDER (object);
 
     close_notification (notify);
- 
+
     G_OBJECT_CLASS (notify_provider_parent_class)->finalize (object);
 }
diff --git a/src/plugins/tray/tray-provider.c b/src/plugins/tray/tray-provider.c
index 6697c08..8676710 100644
--- a/src/plugins/tray/tray-provider.c
+++ b/src/plugins/tray/tray-provider.c
@@ -57,12 +57,12 @@ struct _TrayProvider
     GtkWidget              *menu;
 };
 
-PAROLE_DEFINE_TYPE_WITH_CODE   (TrayProvider, 
-                                tray_provider, 
+PAROLE_DEFINE_TYPE_WITH_CODE   (TrayProvider,
+                                tray_provider,
                                 G_TYPE_OBJECT,
-                                PAROLE_IMPLEMENT_INTERFACE (PAROLE_TYPE_PROVIDER_PLUGIN, 
+                                PAROLE_IMPLEMENT_INTERFACE (PAROLE_TYPE_PROVIDER_PLUGIN,
                                 tray_provider_iface_init));
-    
+
 static void
 menu_selection_done_cb (TrayProvider *tray)
 {
@@ -74,9 +74,9 @@ static void
 exit_activated_cb (TrayProvider *tray)
 {
     GdkEventAny ev;
-    
+
     menu_selection_done_cb (tray);
-    
+
     ev.type = GDK_DELETE;
     ev.window = gtk_widget_get_window(tray->window);
     ev.send_event = TRUE;
@@ -116,11 +116,11 @@ open_activated_cb (TrayProvider *tray)
 }
 
 static void
-popup_menu_cb (GtkStatusIcon *icon, guint button, 
+popup_menu_cb (GtkStatusIcon *icon, guint button,
                guint activate_time, TrayProvider *tray)
 {
     GtkWidget *menu, *mi;
-    
+
     menu = gtk_menu_new ();
 
     /*
@@ -131,7 +131,7 @@ popup_menu_cb (GtkStatusIcon *icon, guint button,
     gtk_widget_show (mi);
     g_signal_connect_swapped (mi, "activate", G_CALLBACK (play_pause_activated_cb), tray);
     gtk_menu_shell_append (GTK_MENU_SHELL (menu), mi);
-    
+
     /*
      * Previous Track
      */
@@ -140,7 +140,7 @@ popup_menu_cb (GtkStatusIcon *icon, guint button,
     gtk_widget_show (mi);
     g_signal_connect_swapped (mi, "activate", G_CALLBACK (previous_activated_cb), tray);
     gtk_menu_shell_append (GTK_MENU_SHELL (menu), mi);
-    
+
     /*
      * Next Track
      */
@@ -149,14 +149,14 @@ popup_menu_cb (GtkStatusIcon *icon, guint button,
     gtk_widget_show (mi);
     g_signal_connect_swapped (mi, "activate", G_CALLBACK (next_activated_cb), tray);
     gtk_menu_shell_append (GTK_MENU_SHELL (menu), mi);
-    
+
     /*
      * Separator
      */
     mi = gtk_separator_menu_item_new ();
     gtk_widget_show (mi);
     gtk_menu_shell_append (GTK_MENU_SHELL (menu), mi);
-    
+
     /*
      * Open
      */
@@ -164,14 +164,14 @@ popup_menu_cb (GtkStatusIcon *icon, guint button,
     gtk_widget_show (mi);
     g_signal_connect_swapped (mi, "activate", G_CALLBACK (open_activated_cb), tray);
     gtk_menu_shell_append (GTK_MENU_SHELL (menu), mi);
-    
+
     /*
      * Separator.
      */
     mi = gtk_separator_menu_item_new ();
     gtk_widget_show (mi);
     gtk_menu_shell_append (GTK_MENU_SHELL (menu), mi);
-    
+
     /*
      * Exit
      */
@@ -180,9 +180,9 @@ popup_menu_cb (GtkStatusIcon *icon, guint button,
     gtk_widget_show (mi);
     g_signal_connect_swapped (mi, "activate", G_CALLBACK (exit_activated_cb), tray);
     gtk_menu_shell_append (GTK_MENU_SHELL (menu), mi);
-    
+
     gtk_menu_popup (GTK_MENU (menu), NULL, NULL,
-                    gtk_status_icon_position_menu, 
+                    gtk_status_icon_position_menu,
                     icon, button, activate_time);
 
     g_signal_connect_swapped (menu, "selection-done",
@@ -205,7 +205,7 @@ static void
 state_changed_cb (ParoleProviderPlayer *player, const ParoleStream *stream, ParoleState state, TrayProvider *tray)
 {
     tray->state = state;
-    
+
     if ( tray->menu )
     {
         gtk_widget_destroy (tray->menu);
@@ -221,15 +221,15 @@ read_entry_bool (const gchar *entry, gboolean fallback)
     gboolean ret_val = fallback;
     gchar prop_name[64];
     GValue src = { 0, };
-    
+
     channel = xfconf_channel_get ("parole");
     g_snprintf (prop_name, sizeof (prop_name), "/plugins/tray/%s", entry);
-    
+
     g_value_init(&src, G_TYPE_BOOLEAN);
-    
+
     if (xfconf_channel_get_property (channel, prop_name, &src))
         ret_val = g_value_get_boolean(&src);
-    
+
     return ret_val;
 }
 
@@ -239,13 +239,13 @@ write_entry_bool (const gchar *entry, gboolean value)
     XfconfChannel *channel;
     gchar prop_name[64];
     GValue dst = { 0, };
-    
+
     channel = xfconf_channel_get ("parole");
     g_snprintf (prop_name, sizeof (prop_name), "/plugins/tray/%s", entry);
-    
+
     g_value_init(&dst, G_TYPE_BOOLEAN);
     g_value_set_boolean(&dst, value);
-    
+
     xfconf_channel_set_property (channel, prop_name, &dst);
 }
 
@@ -265,8 +265,8 @@ configure_plugin (TrayProvider *tray, GtkWidget *widget)
 
     GtkWidget *hide_on_delete;
     gboolean hide_on_delete_b;
-    
-    dialog = gtk_dialog_new_with_buttons   (_("Tray icon plugin"), 
+
+    dialog = gtk_dialog_new_with_buttons   (_("Tray icon plugin"),
                                             GTK_WINDOW (widget),
                                             GTK_DIALOG_DESTROY_WITH_PARENT,
                                             _("Close"),
@@ -278,15 +278,15 @@ configure_plugin (TrayProvider *tray, GtkWidget *widget)
     hide_on_delete_b = read_entry_bool ("minimize-to-tray", TRUE);
     hide_on_delete = gtk_check_button_new_with_label (_("Always minimize to tray when window is closed"));
     gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (hide_on_delete), hide_on_delete_b);
-    
+
     g_signal_connect (hide_on_delete, "toggled",
               G_CALLBACK (hide_on_delete_toggled_cb), NULL);
-    
+
     gtk_box_pack_start (GTK_BOX (content_area), hide_on_delete, TRUE, TRUE, 0);
-    
+
     g_signal_connect (dialog, "response",
               G_CALLBACK (gtk_widget_destroy), NULL);
-    
+
     gtk_widget_show_all (dialog);
 }
 
@@ -294,9 +294,9 @@ static void
 action_on_hide_confirmed_cb (GtkWidget *widget, gpointer data)
 {
     gboolean toggled;
-    
+
     toggled = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (widget));
-    
+
     write_entry_bool ("remember-quit-action", toggled);
 }
 
@@ -306,10 +306,10 @@ delete_event_cb (GtkWidget *widget, GdkEvent *ev, TrayProvider *tray)
     GtkWidget *dialog, *check, *content_area, *button;
     GtkWidget *minimize, *img;
     gboolean confirmed, ret_val = TRUE, minimize_to_tray;
-    
+
     confirmed = read_entry_bool ("remember-quit-action", FALSE);
     minimize_to_tray = read_entry_bool ("minimize-to-tray", TRUE);
-    
+
     if ( confirmed )
     {
         return minimize_to_tray ? gtk_widget_hide_on_delete (widget) : FALSE;
@@ -320,44 +320,44 @@ delete_event_cb (GtkWidget *widget, GdkEvent *ev, TrayProvider *tray)
                                     GTK_MESSAGE_QUESTION,
                                     GTK_BUTTONS_NONE,
                                     NULL);
-                                    
+
     gtk_message_dialog_set_markup  (GTK_MESSAGE_DIALOG(dialog),
                                     g_strdup_printf("<big><b>%s</b></big>", _("Are you sure you want to quit?")));
-                                    
+
     gtk_message_dialog_format_secondary_text (GTK_MESSAGE_DIALOG(dialog),
             _("Parole can be minimized to the system tray instead."));
-    
+
     minimize = gtk_dialog_add_button(   GTK_DIALOG(dialog),
                                         _("Minimize to tray"),
                                         GTK_RESPONSE_OK );
     img = gtk_image_new_from_icon_name ("go-down", GTK_ICON_SIZE_BUTTON);
     gtk_button_set_image (GTK_BUTTON (minimize), img);
-    
+
     button = gtk_dialog_add_button( GTK_DIALOG(dialog),
                                     _("Cancel"),
                                     GTK_RESPONSE_CANCEL );
     img = gtk_image_new_from_icon_name ("gtk-cancel", GTK_ICON_SIZE_BUTTON);
     gtk_button_set_image(GTK_BUTTON(button), img);
-    
+
     button = gtk_dialog_add_button(  GTK_DIALOG(dialog),
                                      _("Quit"),
                                      GTK_RESPONSE_CLOSE );
     img = gtk_image_new_from_icon_name ("gtk-quit", GTK_ICON_SIZE_BUTTON);
     gtk_button_set_image(GTK_BUTTON(button), img);
-                                    
+
     gtk_dialog_set_default_response (GTK_DIALOG (dialog), GTK_RESPONSE_OK);
-    
+
     content_area = gtk_dialog_get_content_area (GTK_DIALOG (dialog));
-    
+
     check = gtk_check_button_new_with_mnemonic (_("Remember my choice"));
     gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (check), FALSE);
-    
+
     g_signal_connect (check, "toggled",
               G_CALLBACK (action_on_hide_confirmed_cb), NULL);
-         
+
     gtk_box_pack_start (GTK_BOX (content_area), check, TRUE, TRUE, 0);
     gtk_widget_set_margin_left(GTK_WIDGET(check), 3);
-                     
+
     gtk_widget_show_all( GTK_WIDGET(dialog) );
 
     switch ( gtk_dialog_run (GTK_DIALOG (dialog)) )
@@ -383,7 +383,7 @@ delete_event_cb (GtkWidget *widget, GdkEvent *ev, TrayProvider *tray)
         default:
             break;
     }
-    
+
     gtk_widget_destroy (dialog);
     return ret_val;
 }
@@ -398,15 +398,15 @@ tray_provider_set_player (ParoleProviderPlugin *plugin, ParoleProviderPlayer *pl
 {
     TrayProvider *tray;
     GdkPixbuf *pix;
-    
+
     tray = TRAY_PROVIDER (plugin);
-    
+
     tray->player = player;
-    
+
     tray->state = PAROLE_STATE_STOPPED;
-    
+
     tray->window = parole_provider_player_get_main_window (player);
-    
+
     tray->tray = gtk_status_icon_new ();
     tray->player = player;
     tray->menu = NULL;
@@ -416,23 +416,23 @@ tray_provider_set_player (ParoleProviderPlugin *plugin, ParoleProviderPlayer *pl
                                     48,
                                     GTK_ICON_LOOKUP_USE_BUILTIN,
                                     NULL);
-    
+
     if ( pix )
     {
         gtk_status_icon_set_from_pixbuf (tray->tray, pix);
         g_object_unref (pix);
     }
-    
+
     g_signal_connect (tray->tray, "popup-menu",
               G_CALLBACK (popup_menu_cb), tray);
-    
+
     g_signal_connect (tray->tray, "activate",
               G_CALLBACK (tray_activate_cb), tray);
-    
+
     tray->sig = g_signal_connect (tray->window, "delete-event",
               G_CALLBACK (delete_event_cb), NULL);
-                  
-    g_signal_connect (player, "state_changed", 
+
+    g_signal_connect (player, "state_changed",
               G_CALLBACK (state_changed_cb), tray);
 }
 
@@ -455,7 +455,7 @@ tray_provider_iface_init (ParoleProviderPluginIface *iface)
 static void tray_provider_class_init (TrayProviderClass *klass)
 {
     GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
-    
+
     gobject_class->finalize = tray_provider_finalize;
 }
 
@@ -467,13 +467,13 @@ static void tray_provider_init (TrayProvider *provider)
 static void tray_provider_finalize (GObject *object)
 {
     TrayProvider *tray;
-    
+
     tray = TRAY_PROVIDER (object);
-    
+
     if ( GTK_IS_WIDGET (tray->window) && g_signal_handler_is_connected (tray->window, tray->sig) )
         g_signal_handler_disconnect (tray->window, tray->sig);
 
     g_object_unref (G_OBJECT (tray->tray));
-    
+
     G_OBJECT_CLASS (tray_provider_parent_class)->finalize (object);
 }

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Xfce4-commits mailing list