+2001-10-05 [alfons] 0.6.2claws20
+
+ * src/mainwindow.[ch], src/folderview.c
+ make composite tool button switch between "Compose News"
+ and "Compose Mail" depending on selected folder
+ (nifty idea by Kim Schulz <kim@schulz.dk>)
+
2001-10-05 [paul] 0.6.2claws19
* src/mainwindow.c, src/summaryview.c
MICRO_VERSION=2
INTERFACE_AGE=0
BINARY_AGE=0
-EXTRA_VERSION=claws19
+EXTRA_VERSION=claws20
VERSION=$MAJOR_VERSION.$MINOR_VERSION.$MICRO_VERSION$EXTRA_VERSION
dnl
GtkCTreeNode *old_selected = folderview->selected;
if (!item) return;
-
+
node = gtk_ctree_find_by_row_data(ctree, NULL, item);
if (node) folderview_select_node(folderview, node);
can_select = FALSE;
+ /* CLAWS: set compose button type: news folder items
+ * always have a news folder as parent */
+ if (item->folder)
+ main_window_toolbar_set_compose_button
+ (folderview->mainwin,
+ item->folder->type == F_NEWS ?
+ COMPOSEBUTTON_NEWS : COMPOSEBUTTON_MAIL);
+
if (item->path)
debug_print(_("Folder %s is selected\n"), item->path);
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
}
}
+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)
{
void main_window_popup (MainWindow *mainwin);
+void main_window_toolbar_set_compose_button
+ (MainWindow *mainwin,
+ ComposeButtonType compose_btn_type);
+
#endif /* __MAINWINDOW_H__ */