commit 9729176e98956eb5b4988c371146424e703d80a0
Author: Daniele Forsi <[email protected]>
Date: Thu Jul 12 12:36:39 2012 +0200
Make it easier for the user to retry entering a valid playlist name
Automatically ask again a name if the one provided by the user was
empty or duplicated.
plugins/playlist_display/playlist_display_spl.c | 8 +++++---
1 files changed, 5 insertions(+), 3 deletions(-)
---
diff --git a/plugins/playlist_display/playlist_display_spl.c
b/plugins/playlist_display/playlist_display_spl.c
index d6ceee1..c131c35 100644
--- a/plugins/playlist_display/playlist_display_spl.c
+++ b/plugins/playlist_display/playlist_display_spl.c
@@ -1504,20 +1504,22 @@ void add_new_pl_or_spl_user_name(iTunesDB *itdb, gchar
*dflt, gint32 position) {
return;
}
+ name = dflt ? dflt : _("New Playlist");
+retry:
name
- = get_user_string(_("New Playlist"), _("Please enter a name for
the new playlist"), dflt ? dflt : _("New Playlist"), _("Smart Playlist"),
&is_spl, GTK_STOCK_ADD);
+ = get_user_string(_("New Playlist"), _("Please enter a name for
the new playlist"), name, _("Smart Playlist"), &is_spl, GTK_STOCK_ADD);
if (!name)
return;
if (strlen(name) == 0) {
gtkpod_warning_simple(_("Playlist name cannot be blank"));
- return;
+ goto retry;
}
Playlist *pl = itdb_playlist_by_name(itdb, name);
if (pl) {
gtkpod_warning_simple(_("A playlist named '%s' already exists"), name);
- return;
+ goto retry;
}
if (!is_spl) { /* add standard playlist */
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
gtkpod-cvs2 mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/gtkpod-cvs2