]> git.sesse.net Git - vlc/blobdiff - modules/gui/pda/pda_callbacks.c
Removes trailing spaces. Removes tabs.
[vlc] / modules / gui / pda / pda_callbacks.c
index fb01a1fafccae900807c45a0559707a3181f3985..f0e8dd4afad8ce8911a9e34b26bbd9e6199d477b 100644 (file)
@@ -1,10 +1,10 @@
 /*****************************************************************************
  * pda_callbacks.c : Callbacks for the pda Linux Gtk+ plugin.
  *****************************************************************************
- * Copyright (C) 2000, 2001 VideoLAN
- * $Id: pda_callbacks.c,v 1.22 2003/12/06 22:41:40 jpsaman Exp $
+ * Copyright (C) 2000, 2001 the VideoLAN team
+ * $Id$
  *
- * Authors: Jean-Paul Saman <jpsaman@wxs.nl>
+ * Authors: Jean-Paul Saman <jpsaman _at_ videolan _dot_ org>
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
  *
  * You should have received a copy of the GNU General Public License
  * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111, USA.
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
  *****************************************************************************/
 
 /*****************************************************************************
  * Preamble
  *****************************************************************************/
 #include <sys/types.h>                                              /* off_t */
-#include <stdlib.h>
 #include <vlc/vlc.h>
-#include <vlc/intf.h>
-#include <vlc/vout.h>
+#include <vlc_interface.h>
+#include <vlc_playlist.h>
+#include <vlc_vout.h>
 
-#include <stdio.h>
-#include <string.h>
 #include <dirent.h>
 #include <sys/stat.h>
 #include <unistd.h>
@@ -91,6 +89,7 @@ void PlaylistAddItem(GtkWidget *widget, gchar *name, char **ppsz_options, int i_
 {
     intf_thread_t *p_intf = GtkGetIntf( widget );
     playlist_t    *p_playlist;
+    int           i_id , i_pos=0;
     GtkTreeView   *p_tvplaylist = NULL;
 
     p_playlist = (playlist_t *)
@@ -109,7 +108,7 @@ void PlaylistAddItem(GtkWidget *widget, gchar *name, char **ppsz_options, int i_
         GtkTreeIter   p_play_iter;
 
         p_play_model = gtk_tree_view_get_model(p_tvplaylist);
-
         if (p_play_model)
         {
             int i;
@@ -132,8 +131,11 @@ void PlaylistAddItem(GtkWidget *widget, gchar *name, char **ppsz_options, int i_
             else
 #endif
             {
-                playlist_Add( p_playlist, (const char*)name, (const char**)ppsz_options, i_size,
-                              PLAYLIST_APPEND, PLAYLIST_END );
+                i_id = playlist_AddExt( p_playlist, (const char*)name,
+                              (const char*)name,
+                              PLAYLIST_APPEND, PLAYLIST_END,
+                              (mtime_t) 0,
+                              (const char **) ppsz_options, i_pos );
             }
 
             /* Cleanup memory */
@@ -159,7 +161,7 @@ void PlaylistRebuildListStore( GtkListStore * p_list, playlist_t * p_playlist )
     vlc_mutex_lock( &p_playlist->object_lock );
     for( i_dummy = 0; i_dummy < p_playlist->i_size ; i_dummy++ )
     {
-        ppsz_text[0] = p_playlist->pp_items[i_dummy]->psz_name;
+        ppsz_text[0] = p_playlist->pp_items[i_dummy]->input.psz_name;
         ppsz_text[1] = "no info";
         gtk_list_store_append (p_list, &iter);
         gtk_list_store_set (p_list, &iter,
@@ -225,7 +227,7 @@ void ReadDirectory(intf_thread_t *p_intf, GtkListStore *p_list, char *psz_dir )
         }
             /* kludge */
         for (i=0; i<n; i++)
-        {           
+        {
             if ((pp_namelist[i]->d_name[0] != '.') &&
                 (lstat(pp_namelist[i]->d_name, &st)==0))
             {
@@ -317,7 +319,7 @@ static char *get_file_perms(const struct stat st)
         psz_perm[8]= 'w';
     if (st.st_mode & S_IXOTH)
     {
-        // 'sticky' bit
+        /* 'sticky' bit */
         if (st.st_mode &S_ISVTX)
             psz_perm[9] = 't';
         else
@@ -338,32 +340,30 @@ gboolean onPDADeleteEvent(GtkWidget *widget, GdkEvent *event, gpointer user_data
     intf_thread_t *p_intf = GtkGetIntf( widget );
 
     vlc_mutex_lock( &p_intf->change_lock );
-    p_intf->p_vlc->b_die = VLC_TRUE;
+    vlc_object_kill( p_intf->p_libvlc );
     vlc_mutex_unlock( &p_intf->change_lock );
-    msg_Dbg( p_intf, "about to exit vlc ... signalled" );
+    msg_Dbg( p_intf, "about to exit vlc ... signaled" );
 
     return TRUE;
 }
 
-
 void onRewind(GtkButton *button, gpointer user_data)
 {
     intf_thread_t *p_intf = GtkGetIntf( button );
 
     if (p_intf->p_sys->p_input != NULL)
     {
-        input_SetStatus( p_intf->p_sys->p_input, INPUT_STATUS_SLOWER );
+        var_SetVoid( p_intf->p_sys->p_input, "rate-slower" );
     }
 }
 
-
 void onPause(GtkButton *button, gpointer user_data)
 {
     intf_thread_t *p_intf = GtkGetIntf( button );
 
     if (p_intf->p_sys->p_input != NULL)
     {
-        input_SetStatus( p_intf->p_sys->p_input, INPUT_STATUS_PAUSE );
+        var_SetInteger( p_intf->p_sys->p_input, "state", PAUSE_S );
     }
 }
 
@@ -380,6 +380,7 @@ void onPlay(GtkButton *button, gpointer user_data)
         {
             vlc_mutex_unlock( &p_playlist->object_lock );
             playlist_Play( p_playlist );
+            gdk_window_lower( p_intf->p_sys->p_window->window );
         }
         else
         {
@@ -389,7 +390,6 @@ void onPlay(GtkButton *button, gpointer user_data)
     }
 }
 
-
 void onStop(GtkButton *button, gpointer user_data)
 {
     intf_thread_t *p_intf = GtkGetIntf( GTK_WIDGET( button ) );
@@ -399,17 +399,17 @@ void onStop(GtkButton *button, gpointer user_data)
     {
         playlist_Stop( p_playlist );
         vlc_object_release( p_playlist );
+        gdk_window_raise( p_intf->p_sys->p_window->window );
     }
 }
 
-
 void onForward(GtkButton *button, gpointer user_data)
 {
     intf_thread_t *p_intf = GtkGetIntf( button );
 
     if (p_intf->p_sys->p_input != NULL)
     {
-        input_SetStatus( p_intf->p_sys->p_input, INPUT_STATUS_FASTER );
+        var_SetVoid( p_intf->p_sys->p_input, "rate-faster" );
     }
 }
 
@@ -418,7 +418,7 @@ void onAbout(GtkButton *button, gpointer user_data)
 {
     intf_thread_t *p_intf = GtkGetIntf( GTK_WIDGET(button) );
 
-    // Toggle notebook
+    /* Toggle notebook */
     if (p_intf->p_sys->p_notebook)
     {
         gtk_widget_show( GTK_WIDGET(p_intf->p_sys->p_notebook) );
@@ -426,7 +426,6 @@ void onAbout(GtkButton *button, gpointer user_data)
     }
 }
 
-
 gboolean SliderRelease(GtkWidget *widget, GdkEventButton *event, gpointer user_data)
 {
     intf_thread_t *p_intf = GtkGetIntf( widget );
@@ -439,7 +438,6 @@ gboolean SliderRelease(GtkWidget *widget, GdkEventButton *event, gpointer user_d
     return TRUE;
 }
 
-
 gboolean SliderPress(GtkWidget *widget, GdkEventButton *event, gpointer user_data)
 {
     intf_thread_t *p_intf = GtkGetIntf( widget );
@@ -449,7 +447,7 @@ gboolean SliderPress(GtkWidget *widget, GdkEventButton *event, gpointer user_dat
     p_intf->p_sys->b_slider_free = 0;
     vlc_mutex_unlock( &p_intf->change_lock );
 
-    return TRUE;
+    return FALSE;
 }
 
 void SliderMove(GtkRange *range, GtkScrollType scroll, gpointer user_data)
@@ -518,16 +516,8 @@ void onFileListRow(GtkTreeView *treeview, GtkTreePath *path,
                     g_object_unref(p_store);
                 }
             }
-            else
-            {
-                gtk_tree_selection_selected_foreach(p_selection, (GtkTreeSelectionForeachFunc) &addSelectedToPlaylist, (gpointer) treeview);
-            }
         }
     }
-    else
-    {
-        gtk_tree_selection_selected_foreach(p_selection, (GtkTreeSelectionForeachFunc) &addSelectedToPlaylist, (gpointer) treeview);
-    }
 }
 
 void onAddFileToPlaylist(GtkButton *button, gpointer user_data)
@@ -539,7 +529,7 @@ void onAddFileToPlaylist(GtkButton *button, gpointer user_data)
     {
         GtkTreeSelection *p_selection = gtk_tree_view_get_selection(p_treeview);
 
-        gtk_tree_selection_selected_foreach(p_selection, (GtkTreeSelectionForeachFunc) &addSelectedToPlaylist, (gpointer) p_treeview);    
+        gtk_tree_selection_selected_foreach(p_selection, (GtkTreeSelectionForeachFunc) &addSelectedToPlaylist, (gpointer) p_treeview);
     }
 }
 
@@ -590,17 +580,27 @@ void NetworkBuildMRL(GtkEditable *editable, gpointer user_data)
 
 void onAddNetworkPlaylist(GtkButton *button, gpointer user_data)
 {
-    GtkEntry     *p_mrl = NULL;
-    const gchar  *psz_mrl_name;
+    intf_thread_t  *p_intf = GtkGetIntf( button );
+
+    GtkEntry       *p_mrl = NULL;
+    GtkCheckButton *p_network_transcode = NULL;
+    gboolean        b_network_transcode;
+    const gchar    *psz_mrl_name;
 
     p_mrl = (GtkEntry*) lookup_widget(GTK_WIDGET(button),"entryMRL" );
-    if (p_mrl)
+    psz_mrl_name = gtk_entry_get_text(p_mrl);
+
+    p_network_transcode = (GtkCheckButton*) lookup_widget(GTK_WIDGET(button), "checkNetworkTranscode" );
+    b_network_transcode = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(p_network_transcode));
+    if (b_network_transcode)
     {
-        psz_mrl_name = gtk_entry_get_text(p_mrl);
-        if (psz_mrl_name != NULL)
-        {
-            PlaylistAddItem(GTK_WIDGET(button), (gchar *)psz_mrl_name, 0, 0);
-        }
+        msg_Dbg( p_intf, "Network transcode option selected." );
+        onAddTranscodeToPlaylist(GTK_WIDGET(button), (gchar *)psz_mrl_name);
+    }
+    else
+    {
+        msg_Dbg( p_intf, "Network receiving selected." );
+        PlaylistAddItem(GTK_WIDGET(button), (gchar *)psz_mrl_name, 0, 0);
     }
 }
 
@@ -638,6 +638,9 @@ void onAddCameraToPlaylist(GtkButton *button, gpointer user_data)
     gint            i_v4l_decimation;
     /* end MJPEG only */
 
+    GtkCheckButton  *p_check_v4l_transcode = NULL;
+    gboolean         b_v4l_transcode;
     char **ppsz_options = NULL; /* list of options */
     int  i_options=0;
     char v4l_mrl[6];
@@ -664,7 +667,7 @@ void onAddCameraToPlaylist(GtkButton *button, gpointer user_data)
     }
 
     i_pos = snprintf( &v4l_mrl[0], 6, "v4l");
-    v4l_mrl[5]='\0'; 
+    v4l_mrl[5]='\0';
 
     entryV4LChannel    = (GtkSpinButton*) lookup_widget( GTK_WIDGET(button), "entryV4LChannel" );
     entryV4LFrequency  = (GtkSpinButton*) lookup_widget( GTK_WIDGET(button), "entryV4LFrequency" );
@@ -725,7 +728,18 @@ void onAddCameraToPlaylist(GtkButton *button, gpointer user_data)
     }
     /* end MJPEG only */
 
-    PlaylistAddItem(GTK_WIDGET(button), (gchar*) &v4l_mrl, ppsz_options, i_options);
+    p_check_v4l_transcode = (GtkCheckButton*) lookup_widget(GTK_WIDGET(button), "checkV4LTranscode" );
+    b_v4l_transcode = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(p_check_v4l_transcode));
+    if (b_v4l_transcode)
+    {
+        msg_Dbg( p_intf, "Camera transcode option selected." );
+        onAddTranscodeToPlaylist(GTK_WIDGET(button), (gchar *)v4l_mrl);
+    }
+    else
+    {
+        msg_Dbg( p_intf, "Camera reception option selected." );
+        PlaylistAddItem(GTK_WIDGET(button), (gchar*) &v4l_mrl, ppsz_options, i_options);
+    }
 }
 
 
@@ -749,6 +763,39 @@ gboolean onPlaylistRowSelected(GtkTreeView *treeview, gboolean start_editing, gp
 void onPlaylistRow(GtkTreeView *treeview, GtkTreePath *path,
                    GtkTreeViewColumn *column, gpointer user_data)
 {
+    intf_thread_t *p_intf = GtkGetIntf( GTK_WIDGET(treeview) );
+    GtkTreeSelection *p_selection = gtk_tree_view_get_selection(treeview);
+    playlist_t * p_playlist = vlc_object_find( p_intf, VLC_OBJECT_PLAYLIST,
+                                                       FIND_ANYWHERE );
+
+    if( p_playlist == NULL )
+    {
+        return; // FALSE;
+    }
+
+    if (gtk_tree_selection_count_selected_rows(p_selection) == 1)
+    {
+        GtkTreeModel *p_model;
+        GtkTreeIter   iter;
+        int           i_row;
+
+        /* This might be a directory selection */
+        p_model = gtk_tree_view_get_model(treeview);
+        if (!p_model)
+        {
+            msg_Err(p_intf, "PDA: Playlist model contains a NULL pointer\n" );
+            return;
+        }
+        if (!gtk_tree_model_get_iter(p_model, &iter, path))
+        {
+            msg_Err( p_intf, "PDA: Playlist could not get iter from model" );
+            return;
+        }
+
+        gtk_tree_model_get(p_model, &iter, 2, &i_row, -1);
+        playlist_Goto( p_playlist, i_row );
+    }
+    vlc_object_release( p_playlist );
 }
 
 
@@ -784,6 +831,11 @@ void onUpdatePlaylist(GtkButton *button, gpointer user_data)
     vlc_object_release( p_playlist );
 }
 
+void deleteItemFromPlaylist(gpointer data, gpointer user_data)
+{
+    gtk_tree_path_free((GtkTreePath*) data); // removing an item.
+}
+
 void onDeletePlaylist(GtkButton *button, gpointer user_data)
 {
     intf_thread_t *p_intf = GtkGetIntf( button );
@@ -813,7 +865,7 @@ void onDeletePlaylist(GtkButton *button, gpointer user_data)
                  */
                 p_rows = g_list_reverse( p_rows );
             }
-    
+
             for (p_node=p_rows; p_node!=NULL; p_node = p_node->next)
             {
                 GtkTreeIter iter;
@@ -827,11 +879,14 @@ void onDeletePlaylist(GtkButton *button, gpointer user_data)
                         gint item;
 
                         gtk_tree_model_get(p_model, &iter, 2, &item, -1);
-                        playlist_Delete(p_playlist, item);
+                        msg_Err( p_playlist, "PDA delete broken");
                     }
                 }
             }
+#if 0
             g_list_foreach (p_rows, (GFunc*)gtk_tree_path_free, NULL);
+#endif /* Testing the next line */
+            g_list_foreach (p_rows, deleteItemFromPlaylist, NULL);
             g_list_free (p_rows);
         }
 
@@ -866,7 +921,7 @@ void onClearPlaylist(GtkButton *button, gpointer user_data)
 
     for(item = p_playlist->i_size - 1; item >= 0 ;item-- )
     {
-        playlist_Delete( p_playlist, item);
+        msg_Err( p_playlist "fix pda delete");
     }
     vlc_object_release( p_playlist );
 
@@ -979,6 +1034,11 @@ void onAddTranscodeToPlaylist(GtkButton *button, gpointer user_data)
         }
     }
 
+    /* Update the playlist */
+    playlist_t *p_playlist = (playlist_t *)vlc_object_find( p_intf, VLC_OBJECT_PLAYLIST, FIND_ANYWHERE );
+    if( p_playlist == NULL ) return;
+
+    /* Get all the options. */
     i_pos = snprintf( &mrl[0], VLC_MAX_MRL, "sout");
     mrl[6] = '\0';
     /* option 1 */
@@ -989,12 +1049,12 @@ void onAddTranscodeToPlaylist(GtkButton *button, gpointer user_data)
     p_entryVideoBitrate = (GtkSpinButton*) lookup_widget( GTK_WIDGET(button), "entryVideoBitrate" );
     p_entryVideoBitrateTolerance = (GtkSpinButton*) lookup_widget( GTK_WIDGET(button), "entryVideoBitrateTolerance" );
     p_entryVideoKeyFrameInterval = (GtkSpinButton*) lookup_widget( GTK_WIDGET(button), "entryVideoKeyFrameInterval" );
-    
     p_video_codec = gtk_entry_get_text(GTK_ENTRY(p_entryVideoCodec));
     i_video_bitrate = gtk_spin_button_get_value_as_int(p_entryVideoBitrate);
     i_video_bitrate_tolerance = gtk_spin_button_get_value_as_int(p_entryVideoBitrateTolerance);
     i_video_keyframe_interval = gtk_spin_button_get_value_as_int(p_entryVideoKeyFrameInterval);
-    
     i_pos += snprintf( &ppsz_options[i_options][i_pos], VLC_MAX_MRL - i_pos, "vcodec=%s,", (char*)p_video_codec );
     if (i_pos>=VLC_MAX_MRL) ppsz_options[i_options][VLC_MAX_MRL-1] = '\0';
     i_pos += snprintf( &ppsz_options[i_options][i_pos], VLC_MAX_MRL - i_pos, "vb=%d,", (int)i_video_bitrate );
@@ -1026,7 +1086,7 @@ void onAddTranscodeToPlaylist(GtkButton *button, gpointer user_data)
 
     /* option 2 */
     i_pos = 0;
-    i_pos = snprintf( &ppsz_options[i_options++][i_pos], VLC_MAX_MRL - i_pos, "dst=" );
+    i_pos = snprintf( &ppsz_options[i_options++][i_pos], VLC_MAX_MRL - i_pos, "#" );
     if (i_pos>=VLC_MAX_MRL) ppsz_options[i_options][VLC_MAX_MRL-1] = '\0';
 
     p_entryStdAccess = (GtkEntry*) lookup_widget( GTK_WIDGET(button), "entryStdAccess" );
@@ -1042,46 +1102,42 @@ void onAddTranscodeToPlaylist(GtkButton *button, gpointer user_data)
     b_sap_announce = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(p_checkSAP));
     b_slp_announce = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(p_checkSLP));
 
-    if ( strncasecmp( (const char*)p_std_access, "display", 7 ) == 0)
-    {
-        i_pos += snprintf( &ppsz_options[i_options][i_pos], VLC_MAX_MRL - i_pos, "%s,", (char*)p_std_access);
-        if (i_pos>=VLC_MAX_MRL) ppsz_options[i_options][VLC_MAX_MRL-1] = '\0';
-    }
-    else
-    {
-        i_pos += snprintf( &ppsz_options[i_options][i_pos], VLC_MAX_MRL - i_pos, "std{access=%s,", (char*)p_std_access);
-        if (i_pos>=VLC_MAX_MRL) ppsz_options[i_options][VLC_MAX_MRL-1] = '\0';
-        i_pos += snprintf( &ppsz_options[i_options][i_pos], VLC_MAX_MRL - i_pos, "mux=%s,", (char*)p_std_muxer);
-        if (i_pos>=VLC_MAX_MRL) ppsz_options[i_options][VLC_MAX_MRL-1] = '\0';
-        i_pos += snprintf( &ppsz_options[i_options][i_pos], VLC_MAX_MRL - i_pos, "url=%s", (char*)p_std_url);
-        if (i_pos>=VLC_MAX_MRL) ppsz_options[i_options][VLC_MAX_MRL-1] = '\0';
+    i_pos += snprintf( &ppsz_options[i_options][i_pos], VLC_MAX_MRL - i_pos, "std{access=%s,", (char*)p_std_access);
+    if (i_pos>=VLC_MAX_MRL) ppsz_options[i_options][VLC_MAX_MRL-1] = '\0';
+    i_pos += snprintf( &ppsz_options[i_options][i_pos], VLC_MAX_MRL - i_pos, "mux=%s,", (char*)p_std_muxer);
+    if (i_pos>=VLC_MAX_MRL) ppsz_options[i_options][VLC_MAX_MRL-1] = '\0';
+    i_pos += snprintf( &ppsz_options[i_options][i_pos], VLC_MAX_MRL - i_pos, "dst=%s", (char*)p_std_url);
+    if (i_pos>=VLC_MAX_MRL) ppsz_options[i_options][VLC_MAX_MRL-1] = '\0';
 
-        if (strncasecmp( (const char*)p_std_access, "udp", 3)==0)
+    if (strncasecmp( (const char*)p_std_access, "udp", 3)==0)
+    {
+        if (b_sap_announce)
         {
-            if (b_sap_announce)
-            {
-                i_pos += snprintf( &ppsz_options[i_options][i_pos], VLC_MAX_MRL - i_pos, "sap=%s", (char*)p_std_announce);
-                if (i_pos>=VLC_MAX_MRL) ppsz_options[i_options][VLC_MAX_MRL-1] = '\0';
-            }
-            if (b_slp_announce)
-            {
-                i_pos += snprintf( &ppsz_options[i_options][i_pos], VLC_MAX_MRL - i_pos, "slp=%s", (char*)p_std_announce);
-                if (i_pos>=VLC_MAX_MRL) ppsz_options[i_options][VLC_MAX_MRL-1] = '\0';
-            }
+            i_pos += snprintf( &ppsz_options[i_options][i_pos], VLC_MAX_MRL - i_pos, "sap=%s", (char*)p_std_announce);
+            if (i_pos>=VLC_MAX_MRL) ppsz_options[i_options][VLC_MAX_MRL-1] = '\0';
+        }
+        if (b_slp_announce)
+        {
+            i_pos += snprintf( &ppsz_options[i_options][i_pos], VLC_MAX_MRL - i_pos, "slp=%s", (char*)p_std_announce);
+            if (i_pos>=VLC_MAX_MRL) ppsz_options[i_options][VLC_MAX_MRL-1] = '\0';
         }
-        i_pos += snprintf( &ppsz_options[i_options][i_pos], VLC_MAX_MRL - i_pos, "}");
-        if (i_pos>=VLC_MAX_MRL) ppsz_options[i_options][VLC_MAX_MRL-1] = '\0';
-
-        i_std_ttl = gtk_spin_button_get_value_as_int(p_entryStdTTL);
-
-        i_pos = snprintf( &ppsz_options[i_options++][0], VLC_MAX_MRL, "ttl=%d", (int)i_std_ttl);
-        if (i_pos>=VLC_MAX_MRL) ppsz_options[i_options][VLC_MAX_MRL-1] = '\0';
     }
 
-    PlaylistAddItem(GTK_WIDGET(button), (gchar*) &mrl, ppsz_options, i_options);
-}
+    i_std_ttl = gtk_spin_button_get_value_as_int(p_entryStdTTL);
 
+    i_pos += snprintf( &ppsz_options[i_options++][i_pos], VLC_MAX_MRL - i_pos, "ttl=%d}", (int)i_std_ttl);
+    if (i_pos>=VLC_MAX_MRL) ppsz_options[i_options][VLC_MAX_MRL-1] = '\0';
 
+    if (user_data != NULL)
+    {
+      msg_Dbg(p_intf, "Adding transcoding options to playlist item." );
+    }
+    else
+    {
+      msg_Dbg(p_intf, "Adding --sout to playlist." );
+      PlaylistAddItem(GTK_WIDGET(button), (gchar*) &mrl, ppsz_options, i_options);
+    }
+}
 
 void onEntryStdAccessChanged(GtkEditable *editable, gpointer user_data)
 {
@@ -1090,7 +1146,7 @@ void onEntryStdAccessChanged(GtkEditable *editable, gpointer user_data)
     GtkCheckButton *p_checkSAP = NULL;
     GtkCheckButton *p_checkSLP = NULL;
     GtkEntry       *p_entryStdAccess = NULL;
-    const gchar    *p_std_access = NULL;    
+    const gchar    *p_std_access = NULL;
     gboolean        b_announce = FALSE;
 
     p_entryStdAccess = (GtkEntry*) lookup_widget( GTK_WIDGET(editable), "entryStdAccess" );