Implementing the "Send/Receive" button
This commit is contained in:
parent
ba2585ebb9
commit
7dec1c44c6
|
@ -368,6 +368,13 @@ int account_quit(Account * account)
|
|||
}
|
||||
|
||||
|
||||
/* account_refresh */
|
||||
void account_refresh(Account * account)
|
||||
{
|
||||
/* FIXME really implement */
|
||||
}
|
||||
|
||||
|
||||
/* account_select */
|
||||
GtkTextBuffer * account_select(Account * account, Folder * folder,
|
||||
Message * message)
|
||||
|
|
|
@ -48,6 +48,7 @@ int account_config_save(Account * account, Config * config);
|
|||
int account_init(Account * account);
|
||||
int account_quit(Account * account);
|
||||
|
||||
void account_refresh(Account * account);
|
||||
int account_start(Account * account);
|
||||
void account_stop(Account * account);
|
||||
|
||||
|
|
|
@ -84,6 +84,15 @@ void on_file_new_mail(gpointer data)
|
|||
}
|
||||
|
||||
|
||||
/* on_file_send_receive */
|
||||
void on_file_send_receive(gpointer data)
|
||||
{
|
||||
Mailer * mailer = data;
|
||||
|
||||
mailer_refresh_all(mailer);
|
||||
}
|
||||
|
||||
|
||||
void on_file_quit(gpointer data)
|
||||
{
|
||||
on_closex(data);
|
||||
|
|
|
@ -26,6 +26,7 @@ gboolean on_closex(gpointer data);
|
|||
|
||||
/* file menu */
|
||||
void on_file_new_mail(gpointer data);
|
||||
void on_file_send_receive(gpointer data);
|
||||
void on_file_quit(gpointer data);
|
||||
|
||||
/* edit menu */
|
||||
|
|
14
src/mailer.c
14
src/mailer.c
|
@ -158,8 +158,8 @@ static const DesktopMenu _menu_file[] =
|
|||
{ N_("_New mail"), G_CALLBACK(on_file_new_mail), "stock_mail-compose",
|
||||
GDK_CONTROL_MASK, GDK_KEY_N },
|
||||
{ "", NULL, NULL, 0, 0 },
|
||||
{ N_("Send / Receive"), NULL, "stock_mail-send-receive",
|
||||
GDK_CONTROL_MASK, GDK_KEY_R },
|
||||
{ N_("Send / Receive"), G_CALLBACK(on_file_send_receive),
|
||||
"stock_mail-send-receive", GDK_CONTROL_MASK, GDK_KEY_R },
|
||||
{ "", NULL, NULL, 0, 0 },
|
||||
{ N_("_Print"), NULL, GTK_STOCK_PRINT, GDK_CONTROL_MASK, GDK_KEY_P },
|
||||
{ N_("Print pre_view"), NULL, GTK_STOCK_PRINT_PREVIEW, GDK_CONTROL_MASK,
|
||||
|
@ -1058,6 +1058,16 @@ int mailer_error(Mailer * mailer, char const * message, int ret)
|
|||
}
|
||||
|
||||
|
||||
/* mailer_refresh_all */
|
||||
void mailer_refresh_all(Mailer * mailer)
|
||||
{
|
||||
size_t i;
|
||||
|
||||
for(i = 0; i < mailer->account_cnt; i++)
|
||||
account_refresh(mailer->account[i]);
|
||||
}
|
||||
|
||||
|
||||
/* mailer_account_add */
|
||||
int mailer_account_add(Mailer * mailer, Account * account)
|
||||
{
|
||||
|
|
|
@ -43,6 +43,8 @@ void mailer_set_status(Mailer * mailer, char const * status);
|
|||
/* useful */
|
||||
int mailer_error(Mailer * mailer, char const * message, int ret);
|
||||
|
||||
void mailer_refresh_all(Mailer * mailer);
|
||||
|
||||
/* accounts */
|
||||
int mailer_account_add(Mailer * mailer, Account * account);
|
||||
#if 0 /* FIXME deprecate? */
|
||||
|
|
Loading…
Reference in New Issue
Block a user