Migrate icon filename stored in toolbar XML files
[claws.git] / src / toolbar.c
index 32b76cc396a0cdfac3d6a8dd006460b7e2a2fd2f..15db00eaf376056ea6cb320c8dc4e413d47acadb 100644 (file)
@@ -446,6 +446,12 @@ static void toolbar_parse_item(XMLFile *file, ToolbarType source, gboolean *rewr
                        item->text = g_strdup(C_("Toolbar", "Trash"));
                        *rewrite = TRUE;
                }
+               if (!strcmp(item->file, "mail") && !strcmp(value, "A_DRAFT")) {
+                       /* switch icon file */
+                       g_free(item->file);
+                       item->file = g_strdup("mail_draft");
+                       *rewrite = TRUE;
+               }
                if (item->index == -1) {
                        /* item not found in table: try migrating old action names to current ones */
                        gint i;