~ubuntu-dev/ubuntu/lucid/mutt/lucid-201002110857

« back to all changes in this revision

Viewing changes to curs_main.c

  • Committer: Bazaar Package Importer
  • Author(s): Bhavani Shankar
  • Date: 2009-06-07 17:30:03 UTC
  • mto: (16.2.1 experimental) (2.3.1 squeeze)
  • mto: This revision was merged to the branch mainline in revision 21.
  • Revision ID: james.westby@ubuntu.com-20090607173003-rg37ui3h2bbv7wl0
Tags: upstream-1.5.19
ImportĀ upstreamĀ versionĀ 1.5.19

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/*
2
 
 * Copyright (C) 1996-2000 Michael R. Elkins <me@mutt.org>
 
2
 * Copyright (C) 1996-2000,2002 Michael R. Elkins <me@mutt.org>
3
3
 * 
4
4
 *     This program is free software; you can redistribute it and/or modify
5
5
 *     it under the terms of the GNU General Public License as published by
23
23
#include "mutt.h"
24
24
#include "mutt_curses.h"
25
25
#include "mutt_menu.h"
26
 
#include "attach.h"
27
26
#include "mailbox.h"
28
27
#include "mapping.h"
29
28
#include "sort.h"
30
 
#include "buffy.h"
31
29
#include "mx.h"
32
30
 
33
31
#ifdef USE_POP
403
401
  menu->redraw = REDRAW_INDEX | REDRAW_STATUS;
404
402
}
405
403
 
406
 
struct mapping_t IndexHelp[] = {
 
404
static struct mapping_t IndexHelp[] = {
407
405
  { N_("Quit"),  OP_QUIT },
408
406
  { N_("Del"),   OP_DELETE },
409
407
  { N_("Undel"), OP_UNDELETE },
435
433
  int close = 0; /* did we OP_QUIT or OP_EXIT out of this menu? */
436
434
  int attach_msg = option(OPTATTACHMSG);
437
435
  
438
 
  menu = mutt_new_menu ();
439
 
  menu->menu = MENU_MAIN;
 
436
  menu = mutt_new_menu (MENU_MAIN);
440
437
  menu->offset = 1;
441
438
  menu->pagelen = LINES - 3;
442
439
  menu->make_entry = index_make_entry;
451
448
  {
452
449
    tag = 0; /* clear the tag-prefix */
453
450
 
454
 
    menu->max = Context ? Context->vcount : 0;
455
 
    oldcount = Context ? Context->msgcount : 0;
456
 
 
457
451
    /* check if we need to resort the index because just about
458
452
     * any 'op' below could do mutt_enter_command(), either here or
459
453
     * from any new menu launched, and change $sort/$sort_aux
460
454
     */
461
455
    if (option (OPTNEEDRESORT) && Context && Context->msgcount)
462
456
      resort_index (menu);
463
 
    
 
457
 
 
458
    menu->max = Context ? Context->vcount : 0;
 
459
    oldcount = Context ? Context->msgcount : 0;
 
460
 
464
461
    if (option (OPTREDRAWTREE) && Context && Context->msgcount && (Sort & SORT_MASK) == SORT_THREADS)
465
462
    {
466
463
      mutt_draw_tree (Context);
518
515
      }
519
516
    }
520
517
 
521
 
#ifdef USE_IMAP
522
 
    imap_keepalive ();
523
 
    imap_disallow_reopen (Context);
524
 
#endif
525
 
 
526
518
    if (!attach_msg)
527
519
    {
528
520
     /* check for new mail in the incoming folders */
694
686
      mutt_curs_set (1);        /* fallback from the pager */
695
687
    }
696
688
 
 
689
#ifdef USE_IMAP
 
690
    imap_disallow_reopen (Context);
 
691
#endif
 
692
 
697
693
    switch (op)
698
694
    {
699
695
 
1071
1067
        if ((op == OP_MAIN_NEXT_UNREAD_MAILBOX) && Context && Context->path)
1072
1068
        {
1073
1069
          strfcpy (buf, Context->path, sizeof (buf));
1074
 
          mutt_pretty_mailbox (buf);
 
1070
          mutt_pretty_mailbox (buf, sizeof (buf));
1075
1071
          mutt_buffy (buf, sizeof (buf));
1076
1072
          if (!buf[0])
1077
1073
          {