2011-07-06 [paul] 3.7.9cvs34
[claws.git] / src / edittags.c
index f9535a5d844ae0618c8c909bed34183d1cd84b3e..eef83a73058a1cd1643a979f8715aa7367faa87f 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Claws Mail -- a GTK+ based, lightweight, and fast e-mail client
- * Copyright (C) 2007 The Claws Mail Team
+ * Copyright (C) 2007-2011 The Claws Mail Team
  *
  * 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
@@ -263,7 +263,7 @@ static void apply_popup_delete_all (GtkAction *action, gpointer data)
        APPLYWINDOW_UNLOCK();
 }
 
-static const GtkActionEntry apply_popup_actions[] =
+static GtkActionEntry apply_popup_actions[] =
 {
        { "EditTags", NULL, "EditTags" },
        { "EditTags/Delete", NULL, N_("_Delete"), NULL, "Delete tag", G_CALLBACK(apply_popup_delete) },
@@ -374,6 +374,7 @@ static void apply_window_close(void)
        APPLYWINDOW_UNLOCK();
        apply_window_list_view_clear_tags(applywindow.taglist);
        gtk_widget_hide(applywindow.window);
+       gtk_window_set_modal(GTK_WINDOW(applywindow.window), FALSE);
 }
 
 static void apply_window_close_cb(GtkWidget *widget,
@@ -414,8 +415,14 @@ static void apply_window_add_tag(void)
        gchar *new_tag = gtk_editable_get_chars(GTK_EDITABLE(applywindow.add_entry), 0, -1);
        g_strstrip(new_tag);
        if (new_tag && *new_tag) {
-               gint id = tags_get_id_for_str(new_tag);
+               gint id;
                FindTagInStore fis;
+               if (!(IS_NOT_RESERVED_TAG(new_tag))) {
+                       alertpanel_error(_("You entered a reserved tag name, please choose another instead."));
+                       g_free(new_tag);
+                       return;
+               }
+               id = tags_get_id_for_str(new_tag);
                APPLYWINDOW_LOCK();
                if (id == -1) {
                        id = tags_add_tag(new_tag);