Migrate icon filename stored in toolbar XML files
authorRicardo Mones <ricardo@mones.org>
Mon, 13 Feb 2017 23:58:59 +0000 (00:58 +0100)
committerRicardo Mones <ricardo@mones.org>
Mon, 13 Feb 2017 23:58:59 +0000 (00:58 +0100)
Thanks Paul for the hint.
Completes commit 50bd87f2e13a9dbdb2a1a449823ff16ae87239f8.

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;