X-Git-Url: http://git.claws-mail.org/?p=claws.git;a=blobdiff_plain;f=src%2Fmainwindow.c;h=efe554b2043578e570f59ad32e37b15287355496;hp=9b1576ef47811e7d97536854756badcb0d612e94;hb=19a2a24a8495e14d55cffe0b5737a9b808103963;hpb=ace99a523b710c93cd6f1b26994e416dc64d604f diff --git a/src/mainwindow.c b/src/mainwindow.c index 9b1576ef4..efe554b20 100644 --- a/src/mainwindow.c +++ b/src/mainwindow.c @@ -2777,7 +2777,9 @@ static void activate_compose_button (MainWindow *mainwin, if (style == TOOLBAR_NONE) return; - if (style == TOOLBAR_BOTH) { + if (style == TOOLBAR_BOTH) { + debug_print("preferring %s\n", + type == COMPOSEBUTTON_NEWS ? "news" : "mail"); gtk_widget_hide(mainwin->compose_mail_btn_plain); gtk_widget_hide(mainwin->compose_news_btn_plain); gtk_widget_hide(type == COMPOSEBUTTON_NEWS ? mainwin->compose_mail_btn @@ -2797,6 +2799,14 @@ static void activate_compose_button (MainWindow *mainwin, } } +void main_window_toolbar_set_compose_button(MainWindow *mainwin, ComposeButtonType compose_btn_type) +{ + if (mainwin->compose_btn_type != compose_btn_type) + activate_compose_button(mainwin, + prefs_common.toolbar_style, + compose_btn_type); +} + static void prefs_templates_open_cb(MainWindow *mainwin, guint action, GtkWidget *widget) {