Patch: Elm ME+ 2.5 PLalpha50 -> Elm ME+ 2.5 PLalpha51 [4/6] (2/4)
From
Kari Hurtta@21:1/5 to
All on Tue Feb 11 20:05:51 2020
[continued from previous message]
+ for (idx = 0 ; idx < mbxcount; idx++) {
+ struct current_storage * storage = get_storage(mailbox, idx);
+ struct mail_quota * mquota = NULL;
+
+ if (!storage ||
+ !storage->current_folder)
+ continue;
+
+
+ mquota = have_folder_quota(storage->current_folder);
+ if (mquota) {
+
+ if (!quotad)
+ quotad = new_quota_display(mquota,page,cd);
+ else
+ quota_display_add_quota(quotad,mquota,cd);
+
+ free_mail_quota(&mquota);
+
+ if (is_canceled(cd)) {
+ DPRINT(Debug,9, (&Debug,
+ "h_mail_quota: Cancel on quota_display_add_quota or new_quota_display\n"));
+ goto cleanup;
+ }
+ }
+
+ if (quotad) {
+ struct mail_quotaroot_list * quota_list =
+ give_folder_quotaroot_l(storage->current_folder,cd);
+
+ if (quota_list) {
+ quota_display_add_qlist(quotad,quota_list,
+ storage->current_folder->
+ cur_folder_disp,cd);
+
+ free_mail_quotaroot_list("a_list);
+ }
+
+ if (is_canceled(cd)) {
+ DPRINT(Debug,10,(&Debug,
+ "h_mail_quota: give_folder_quotaroot_l() canceled\n"));
+ goto cleanup;
+ }
+ }
+ }
+
+ if (quotad)
+ retch = quota_display_show(quotad,NULL);
+
+ cleanup:
+ if (cd)
+ free_cancel(&cd);
+
+ if (quotad)
+ free_quota_display("ad,page);
+ else
+ lib_error(CATGETS(elm_msg_cat, MeSet,
+ MeNoMailQuota,
+ "Mail quota not supported."));
+
+ return retch;
+ }
+
+ S_(run_command_post h_mail_quota_post)
+ static void h_mail_quota_post P_((struct MailboxView *mailbox,
+ struct AliasView *aview,
+ struct menu_context *page,
+ struct screen_parts *LOC));
+ static void h_mail_quota_post(mailbox,aview,page,LOC)
+ struct MailboxView *mailbox;
+ struct AliasView *aview;
+ struct menu_context *page;
+ struct screen_parts *LOC;
+ {
+ menu_trigger_redraw(LOC->header_page);
+ menu_trigger_redraw(LOC->title_page);
+ }
S_(run_command h_open_mailbox)
! static int h_open_mailbox P_((struct MailboxView *mailbox,
! struct AliasView *aview,
! struct menu_context *page,
! struct menu_context *prompt,
! int is_main_message_loop));
! static int h_open_mailbox(mailbox,aview,page,prompt,
! is_main_message_loop)
struct MailboxView *mailbox;
struct AliasView *aview;
struct menu_context *page;
struct menu_context *prompt;
int is_main_message_loop;
{
+ int retch = '\0';
+
menu_Write_to_screen(prompt,
CATGETS(elm_msg_cat, MeSet,
MeExtendedOpenMailbox,
***************
*** 122,142 ****
FlushBuffer();
if (query_mailbox_flag(mailbox,qf_can_add_storage))
! OpenMailbox(mailbox,aview,page);
else
lib_error(CATGETS(elm_msg_cat, MeSet,
MeNoOpenMailbox,
"Open mailbox not supported."));
! return 0;
}
S_(run_command_post h_open_mailbox_post)
! static void h_open_mailbox_post P_((struct MailboxView *mailbox,
! struct AliasView *aview,
! struct menu_context *page,
! struct screen_parts *LOC));
! static void h_open_mailbox_post(mailbox,aview,page,LOC)
struct MailboxView *mailbox;
struct AliasView *aview;
struct menu_context *page;
--- 230,250 ----
FlushBuffer();
if (query_mailbox_flag(mailbox,qf_can_add_storage))
! retch = OpenMailbox(mailbox,aview,page);
else
lib_error(CATGETS(elm_msg_cat, MeSet,
MeNoOpenMailbox,
"Open mailbox not supported."));
! return retch;
}
S_(run_command_post h_open_mailbox_post)
! static void h_open_mailbox_post P_((struct MailboxView *mailbox,
! struct AliasView *aview,
! struct menu_context *page,
! struct screen_parts *LOC));
! static void h_open_mailbox_post(mailbox,aview,page,LOC)
struct MailboxView *mailbox;
struct AliasView *aview;
struct menu_context *page;
***************
*** 152,164 ****
S_(run_command h_view_threads)
! static int h_view_threads P_((struct MailboxView *mailbox,
! struct AliasView *aview,
! struct menu_context *page,
! struct menu_context *prompt,
! int is_main_message_loop));
! static int h_view_threads(mai