]> granicus.if.org Git - mutt/commitdiff
Style fixes
authorBrendan Cully <brendan@kublai.com>
Mon, 5 Jan 2009 23:37:17 +0000 (15:37 -0800)
committerBrendan Cully <brendan@kublai.com>
Mon, 5 Jan 2009 23:37:17 +0000 (15:37 -0800)
browser.c

index 7026f5f75eaf982ad7d12ac588bac0c74ba58483..e9c6390ae3f024c2b83951f90f99da217fc40686 100644 (file)
--- a/browser.c
+++ b/browser.c
@@ -860,38 +860,36 @@ void _mutt_select_file (char *f, size_t flen, int flags, char ***files, int *num
 
       case OP_BROWSER_TOGGLE_LSUB:
        if (option (OPTIMAPLSUB))
-       {
          unset_option (OPTIMAPLSUB);
-       }
        else
-       {
          set_option (OPTIMAPLSUB);
-       }
+
        mutt_ungetch (0, OP_CHECK_NEW);
        break;
 
       case OP_CREATE_MAILBOX:
        if (!state.imap_browse)
+       {
          mutt_error (_("Create is only supported for IMAP mailboxes"));
-       else
+         break;
+       }
+
+       if (!imap_mailbox_create (LastDir))
        {
-         if (!imap_mailbox_create (LastDir))
-         {
-           /* TODO: find a way to detect if the new folder would appear in
-            *   this window, and insert it without starting over. */
-           destroy_state (&state);
-           init_state (&state, NULL);
-           state.imap_browse = 1;
-           imap_browse (LastDir, &state);
-           browser_sort (&state);
-           menu->data = state.entry;
-           menu->current = 0; 
-           menu->top = 0; 
-           init_menu (&state, menu, title, sizeof (title), buffy);
-           MAYBE_REDRAW (menu->redraw);
-         }
-         /* else leave error on screen */
+         /* TODO: find a way to detect if the new folder would appear in
+          *   this window, and insert it without starting over. */
+         destroy_state (&state);
+         init_state (&state, NULL);
+         state.imap_browse = 1;
+         imap_browse (LastDir, &state);
+         browser_sort (&state);
+         menu->data = state.entry;
+         menu->current = 0; 
+         menu->top = 0; 
+         init_menu (&state, menu, title, sizeof (title), buffy);
+         MAYBE_REDRAW (menu->redraw);
        }
+       /* else leave error on screen */
        break;
 
       case OP_RENAME_MAILBOX:
@@ -901,7 +899,8 @@ void _mutt_select_file (char *f, size_t flen, int flags, char ***files, int *num
        {
          int nentry = menu->current;
 
-         if (imap_mailbox_rename (state.entry[nentry].name) >= 0) {
+         if (imap_mailbox_rename (state.entry[nentry].name) >= 0)
+         {
            destroy_state (&state);
            init_state (&state, NULL);
            state.imap_browse = 1;