2005-12-20 [paul] 1.9.100cvs96

* src/account.c
	* src/account.h
	* src/mainwindow.c
	* src/mainwindow.h
	* src/toolbar.c
	* src/toolbar.h
		add a combo to the Get All button, allowing
		quick retrieval from any account
		Patch by Fabien Vantard, slightly modified
		by Colin
	* src/gtk/about.c
		i18n fix. Patch by Fabien Vantard
This commit is contained in:
Paul Mangan 2005-12-20 11:19:18 +00:00
parent a2d35fdf62
commit 919459f49a
10 changed files with 91 additions and 4 deletions

View File

@ -1,3 +1,18 @@
2005-12-20 [paul] 1.9.100cvs96
* src/account.c
* src/account.h
* src/mainwindow.c
* src/mainwindow.h
* src/toolbar.c
* src/toolbar.h
add a combo to the Get All button, allowing
quick retrieval from any account
Patch by Fabien Vantard, slightly modified
by Colin
* src/gtk/about.c
i18n fix. Patch by Fabien Vantard
2005-12-19 [cleroy] 1.9.100cvs95
* src/compose.c

View File

@ -1079,3 +1079,4 @@
( cvs diff -u -r 1.13.2.11 -r 1.13.2.12 src/common/plugin.c; cvs diff -u -r 1.5.2.2 -r 1.5.2.3 src/common/plugin.h; cvs diff -u -r 1.5.2.21 -r 1.5.2.22 src/gtk/pluginwindow.c; cvs diff -u -r 1.13.2.18 -r 1.13.2.19 src/plugins/clamav/clamav_plugin.c; cvs diff -u -r 1.13.2.4 -r 1.13.2.5 src/plugins/demo/demo.c; cvs diff -u -r 1.12.2.9 -r 1.12.2.10 src/plugins/dillo_viewer/dillo_viewer.c; cvs diff -u -r 1.1.2.4 -r 1.1.2.5 src/plugins/pgpcore/plugin.c; cvs diff -u -r 1.1.2.5 -r 1.1.2.6 src/plugins/pgpinline/plugin.c; cvs diff -u -r 1.1.2.14 -r 1.1.2.15 src/plugins/pgpmime/plugin.c; cvs diff -u -r 1.18.2.15 -r 1.18.2.16 src/plugins/spamassassin/spamassassin.c; cvs diff -u -r 1.14.2.29 -r 1.14.2.30 src/plugins/trayicon/trayicon.c; ) > 1.9.100cvs93.patchset
( cvs diff -u -r 1.5.2.22 -r 1.5.2.23 src/gtk/pluginwindow.c; ) > 1.9.100cvs94.patchset
( cvs diff -u -r 1.382.2.207 -r 1.382.2.208 src/compose.c; cvs diff -u -r 1.50.2.17 -r 1.50.2.18 src/compose.h; ) > 1.9.100cvs95.patchset
( cvs diff -u -r 1.61.2.39 -r 1.61.2.40 src/account.c; cvs diff -u -r 1.11.2.2 -r 1.11.2.3 src/account.h; cvs diff -u -r 1.274.2.81 -r 1.274.2.82 src/mainwindow.c; cvs diff -u -r 1.39.2.9 -r 1.39.2.10 src/mainwindow.h; cvs diff -u -r 1.43.2.33 -r 1.43.2.34 src/toolbar.c; cvs diff -u -r 1.19.2.6 -r 1.19.2.7 src/toolbar.h; cvs diff -u -r 1.4.2.26 -r 1.4.2.27 src/gtk/about.c; ) > 1.9.100cvs96.patchset

View File

@ -11,7 +11,7 @@ MINOR_VERSION=9
MICRO_VERSION=100
INTERFACE_AGE=0
BINARY_AGE=0
EXTRA_VERSION=95
EXTRA_VERSION=96
EXTRA_RELEASE=
EXTRA_GTK2_VERSION=

View File

@ -349,6 +349,11 @@ void account_set_menu(void)
main_window_set_account_menu(account_list);
}
void account_set_menu_only_toolbar(void)
{
main_window_set_account_menu_only_toolbar(account_list);
}
void account_foreach(AccountFunc func, gpointer user_data)
{
GList *cur;

View File

@ -43,6 +43,7 @@ PrefsAccount *account_find_from_id (gint id);
PrefsAccount *account_find_from_item (FolderItem *item);
void account_set_menu (void);
void account_set_menu_only_toolbar (void);
void account_foreach (AccountFunc func,
gpointer user_data);

View File

@ -252,8 +252,8 @@ static void about_create(void)
gtk_box_pack_start(GTK_BOX(vbox1), table2, FALSE, FALSE, 0);
label = gtk_label_new
("Copyright (C) 1999-2005 Hiroyuki Yamamoto <hiro-y@kcn.ne.jp>\n"
"and the Sylpheed-Claws team");
(_("Copyright (C) 1999-2005 Hiroyuki Yamamoto <hiro-y@kcn.ne.jp>\n"
"and the Sylpheed-Claws team"));
gtk_label_set_selectable(GTK_LABEL(label), TRUE);
gtk_label_set_justify(GTK_LABEL(label), GTK_JUSTIFY_CENTER);
gtk_table_attach(GTK_TABLE(table2), label, 0, 1, 0, 1,

View File

@ -1381,6 +1381,42 @@ static void main_window_set_account_receive_menu(MainWindow *mainwin,
}
}
static void main_window_set_toolbar_combo_receive_menu(MainWindow *mainwin,
GList *account_list)
{
GList *cur_ac, *cur_item;
GtkWidget *menuitem;
PrefsAccount *ac_prefs;
GtkWidget *menu = NULL;
if (mainwin->toolbar->getall_btn == NULL
|| mainwin->toolbar->getall_combo == NULL) /* button doesn't exist */
return;
menu = mainwin->toolbar->getall_combo->menu;
/* destroy all previous menu item */
cur_item = GTK_MENU_SHELL(menu)->children;
while (cur_item != NULL) {
GList *next = cur_item->next;
gtk_widget_destroy(GTK_WIDGET(cur_item->data));
cur_item = next;
}
for (cur_ac = account_list; cur_ac != NULL; cur_ac = cur_ac->next) {
ac_prefs = (PrefsAccount *)cur_ac->data;
menuitem = gtk_menu_item_new_with_label
(ac_prefs->account_name
? ac_prefs->account_name : _("Untitled"));
gtk_widget_show(menuitem);
gtk_menu_append(GTK_MENU(menu), menuitem);
g_signal_connect(G_OBJECT(menuitem), "activate",
G_CALLBACK(account_receive_menu_cb),
ac_prefs);
}
}
void main_window_set_account_menu(GList *account_list)
{
GList *cur;
@ -1390,6 +1426,18 @@ void main_window_set_account_menu(GList *account_list)
mainwin = (MainWindow *)cur->data;
main_window_set_account_selector_menu(mainwin, account_list);
main_window_set_account_receive_menu(mainwin, account_list);
main_window_set_toolbar_combo_receive_menu(mainwin, account_list);
}
}
void main_window_set_account_menu_only_toolbar(GList *account_list)
{
GList *cur;
MainWindow *mainwin;
for (cur = mainwin_list; cur != NULL; cur = cur->next) {
mainwin = (MainWindow *)cur->data;
main_window_set_toolbar_combo_receive_menu(mainwin, account_list);
}
}

View File

@ -152,6 +152,7 @@ void main_window_reflect_prefs_all (void);
void main_window_set_summary_column (void);
void main_window_set_folder_column (void);
void main_window_set_account_menu (GList *account_list);
void main_window_set_account_menu_only_toolbar (GList *account_list);
GtkWidget *main_window_get_folder_window (MainWindow *mainwin);
GtkWidget *main_window_get_message_window (MainWindow *mainwin);

View File

@ -1345,6 +1345,7 @@ Toolbar *toolbar_create(ToolbarType type,
GtkWidget *item_news;
guint n_menu_entries;
ComboButton *getall_combo;
ComboButton *reply_combo;
ComboButton *replyall_combo;
ComboButton *replylist_combo;
@ -1405,6 +1406,14 @@ Toolbar *toolbar_create(ToolbarType type,
gtk_tooltips_set_tip(GTK_TOOLTIPS(toolbar_tips),
toolbar_data->getall_btn,
_("Receive Mail on all Accounts"), NULL);
getall_combo = gtkut_combo_button_create(toolbar_data->getall_btn, NULL, 0,
"<GetAll>", (gpointer)toolbar_item);
gtk_button_set_relief(GTK_BUTTON(getall_combo->arrow),
GTK_RELIEF_NONE);
gtk_toolbar_append_widget(GTK_TOOLBAR(toolbar),
GTK_WIDGET_PTR(getall_combo),
_("Receive Mail on selected Account"), "Reply");
toolbar_data->getall_combo = getall_combo;
break;
case A_RECEIVE_CUR:
toolbar_data->get_btn = item;
@ -1713,8 +1722,10 @@ void toolbar_update(ToolbarType type, gpointer data)
toolbar_style(type, prefs_common.toolbar_style, data);
if (type == TOOLBAR_MAIN)
if (type == TOOLBAR_MAIN) {
toolbar_main_set_sensitive((MainWindow*)data);
account_set_menu_only_toolbar();
}
}
void toolbar_main_set_sensitive(gpointer data)
@ -1743,6 +1754,9 @@ void toolbar_main_set_sensitive(gpointer data)
SET_WIDGET_COND(toolbar->get_btn, M_HAVE_ACCOUNT|M_UNLOCKED);
SET_WIDGET_COND(toolbar->getall_btn, M_HAVE_ACCOUNT|M_UNLOCKED);
if (toolbar->getall_btn)
SET_WIDGET_COND(GTK_WIDGET_PTR(toolbar->getall_combo),
M_HAVE_ACCOUNT|M_UNLOCKED);
SET_WIDGET_COND(toolbar->compose_news_btn, M_HAVE_ACCOUNT);
SET_WIDGET_COND(toolbar->reply_btn,
M_HAVE_ACCOUNT|M_SINGLE_TARGET_EXIST);
@ -1862,6 +1876,7 @@ void toolbar_init(Toolbar * toolbar) {
toolbar->toolbar = NULL;
toolbar->get_btn = NULL;
toolbar->getall_btn = NULL;
toolbar->getall_combo = NULL;
toolbar->send_btn = NULL;
toolbar->compose_mail_btn = NULL;
toolbar->compose_news_btn = NULL;

View File

@ -45,6 +45,7 @@ struct _Toolbar {
GtkWidget *get_btn;
GtkWidget *getall_btn;
ComboButton *getall_combo;
GtkWidget *send_btn;
GtkWidget *compose_mail_btn;