From bce30eb166ef17b5ca44c40808ee67666e9cd168 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Felix=20Paul=20K=C3=BChne?= Date: Sun, 31 Dec 2006 11:44:13 +0000 Subject: [PATCH] * don't add an 'empty folder' if the user hit cancel when asked to enter a name for it --- modules/gui/macosx/playlist.m | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/modules/gui/macosx/playlist.m b/modules/gui/macosx/playlist.m index 97957634c5..517d2889d6 100644 --- a/modules/gui/macosx/playlist.m +++ b/modules/gui/macosx/playlist.m @@ -1341,15 +1341,19 @@ NSLog( @"expandable" ); playlist_item_t * p_item; ret_v = intf_UserStringInput( p_playlist, _("New Node"), _("Please enter a name for the new node."), &psz_name ); + if( psz_name != NULL && psz_name != "" ) p_item = playlist_NodeCreate( p_playlist, psz_name, p_playlist->p_local_category, 0 ); - else + else if(! config_GetInt( p_playlist, "interact" ) ) + { + /* in case that the interaction is disabled, just give it a bogus name */ p_item = playlist_NodeCreate( p_playlist, _("Empty Folder"), p_playlist->p_local_category, 0 ); + } if(! p_item ) - msg_Warn( VLCIntf, "node creation failed" ); + msg_Warn( VLCIntf, "node creation failed or cancelled by user" ); vlc_object_release( p_playlist ); [ourPool release]; -- 2.39.5