diff src/gtk/bookmarks.c @ 867:b1cfb42c5be4

2006-11-30 Brian Masney <masneyb@gftp.org> * src/gtk/bookmarks.c (do_make_new) - don't allow creating bookmarks that have an empty description. (closes #367933)
author masneyb
date Sat, 23 Dec 2006 20:10:06 +0000
parents 877282be3a78
children 1808cebed602
line wrap: on
line diff
--- a/src/gtk/bookmarks.c	Sat Dec 23 19:54:08 2006 +0000
+++ b/src/gtk/bookmarks.c	Sat Dec 23 20:10:06 2006 +0000
@@ -414,6 +414,12 @@
   gftp_get_pixmap (tree, "dir.xpm", &closedir_pixmap, &closedir_bitmap);
 
   str = gtk_entry_get_text (GTK_ENTRY (ddata->edit));
+  if (*str == '\0')
+    {
+      ftp_log (gftp_logging_misc, NULL,
+               _("You must specify a name for the bookmark."));
+      return;
+    }
 
   newentry = g_malloc0 (sizeof (*newentry));
 #if GTK_MAJOR_VERSION == 1