Link Here
|
1 |
*** mutt-1.5.20-orig/buffy.c 2009-06-02 12:16:26.000000000 -0500 |
1 |
--- orig/buffy.c.orig 2010-09-18 14:12:40.000000000 +0200 |
2 |
--- mutt-1.5.20-patched/buffy.c 2009-06-19 22:37:02.000000000 -0500 |
2 |
+++ new/buffy.c 2010-09-18 14:17:36.000000000 +0200 |
3 |
*************** |
3 |
@@ -161,6 +161,49 @@ |
4 |
*** 159,164 **** |
4 |
} |
5 |
--- 159,207 ---- |
5 |
} |
6 |
} |
6 |
|
7 |
} |
7 |
+static int buffy_compare_name(const void *a, const void *b) { |
8 |
|
8 |
+ const BUFFY *b1 = * (BUFFY * const *) a; |
9 |
+ static int buffy_compare_name(const void *a, const void *b) { |
9 |
+ const BUFFY *b2 = * (BUFFY * const *) b; |
10 |
+ const BUFFY *b1 = * (BUFFY * const *) a; |
10 |
+ |
11 |
+ const BUFFY *b2 = * (BUFFY * const *) b; |
11 |
+ return mutt_strcoll(b1->path, b2->path); |
12 |
+ |
12 |
+} |
13 |
+ return mutt_strcoll(b1->path, b2->path); |
13 |
+ |
14 |
+ } |
14 |
+static BUFFY *buffy_sort(BUFFY *b) |
15 |
+ |
15 |
+{ |
16 |
+ static BUFFY *buffy_sort(BUFFY *b) |
16 |
+ BUFFY *tmp = b; |
17 |
+ { |
17 |
+ int buffycount = 0; |
18 |
+ BUFFY *tmp = b; |
18 |
+ BUFFY **ary; |
19 |
+ int buffycount = 0; |
19 |
+ int i; |
20 |
+ BUFFY **ary; |
20 |
+ |
21 |
+ int i; |
21 |
+ if (!option(OPTSIDEBARSORT)) |
22 |
+ |
22 |
+ return b; |
23 |
+ if (!option(OPTSIDEBARSORT)) |
23 |
+ |
24 |
+ return b; |
24 |
+ for (; tmp != NULL; tmp = tmp->next) |
25 |
+ |
25 |
+ buffycount++; |
26 |
+ for (; tmp != NULL; tmp = tmp->next) |
26 |
+ |
27 |
+ buffycount++; |
27 |
+ ary = (BUFFY **) safe_calloc(buffycount, sizeof (*ary)); |
28 |
+ |
28 |
+ |
29 |
+ ary = (BUFFY **) safe_calloc(buffycount, sizeof (*ary)); |
29 |
+ tmp = b; |
30 |
+ |
30 |
+ for (i = 0; tmp != NULL; tmp = tmp->next, i++) { |
31 |
+ tmp = b; |
31 |
+ ary[i] = tmp; |
32 |
+ for (i = 0; tmp != NULL; tmp = tmp->next, i++) { |
32 |
+ } |
33 |
+ ary[i] = tmp; |
33 |
+ |
34 |
+ } |
34 |
+ qsort(ary, buffycount, sizeof(*ary), buffy_compare_name); |
35 |
+ |
35 |
+ |
36 |
+ qsort(ary, buffycount, sizeof(*ary), buffy_compare_name); |
36 |
+ for (i = 0; i < buffycount - 1; i++) { |
37 |
+ |
37 |
+ ary[i]->next = ary[i+1]; |
38 |
+ for (i = 0; i < buffycount - 1; i++) { |
38 |
+ } |
39 |
+ ary[i]->next = ary[i+1]; |
39 |
+ ary[buffycount - 1]->next = NULL; |
40 |
+ } |
40 |
+ for (i = 1; i < buffycount; i++) { |
41 |
+ ary[buffycount - 1]->next = NULL; |
41 |
+ ary[i]->prev = ary[i-1]; |
42 |
+ for (i = 1; i < buffycount; i++) { |
42 |
+ } |
43 |
+ ary[i]->prev = ary[i-1]; |
43 |
+ ary[0]->prev = NULL; |
44 |
+ } |
44 |
+ |
45 |
+ ary[0]->prev = NULL; |
45 |
+ tmp = ary[0]; |
46 |
+ |
46 |
+ free(ary); |
47 |
+ tmp = ary[0]; |
47 |
+ return tmp; |
48 |
+ free(ary); |
48 |
+} |
49 |
+ return tmp; |
49 |
+ |
50 |
+ } |
50 |
BUFFY *mutt_find_mailbox (const char *path) |
51 |
+ |
51 |
{ |
52 |
BUFFY *mutt_find_mailbox (const char *path) |
52 |
BUFFY *tmp = NULL; |
53 |
{ |
53 |
@@ -282,6 +325,7 @@ |
54 |
BUFFY *tmp = NULL; |
54 |
else |
55 |
*************** |
55 |
(*tmp)->size = 0; |
56 |
*** 271,276 **** |
56 |
} |
57 |
--- 314,320 ---- |
57 |
+ Incoming = buffy_sort(Incoming); |
58 |
else |
58 |
return 0; |
59 |
(*tmp)->size = 0; |
59 |
} |
60 |
} |
60 |
|
61 |
+ Incoming = buffy_sort(Incoming); |
61 |
@@ -371,12 +415,17 @@ |
62 |
return 0; |
62 |
return rc; |
63 |
} |
63 |
} |
64 |
|
64 |
|
65 |
*************** |
65 |
+#define STAT_CHECK_SIZE (sb.st_size > tmp->size) |
66 |
*** 290,295 **** |
66 |
+#define STAT_CHECK_TIME (sb.st_mtime > sb.st_atime || (tmp->newly_created && sb.st_ctime == sb.st_mtime && sb.st_ctime == sb.st_atime)) |
67 |
--- 334,340 ---- |
67 |
+#define STAT_CHECK (option(OPTCHECKMBOXSIZE) ? STAT_CHECK_SIZE : STAT_CHECK_TIME) |
68 |
char path[_POSIX_PATH_MAX]; |
68 |
+ |
69 |
struct stat contex_sb; |
69 |
int mutt_buffy_check (int force) |
70 |
time_t t; |
70 |
{ |
71 |
+ CONTEXT *ctx; |
71 |
BUFFY *tmp; |
72 |
|
72 |
struct stat sb; |
73 |
sb.st_size=0; |
73 |
struct stat contex_sb; |
74 |
contex_sb.st_dev=0; |
74 |
time_t t; |
75 |
*************** |
75 |
+ CONTEXT *ctx; |
76 |
*** 329,334 **** |
76 |
|
77 |
--- 374,381 ---- |
77 |
sb.st_size=0; |
78 |
|
78 |
contex_sb.st_dev=0; |
79 |
for (tmp = Incoming; tmp; tmp = tmp->next) |
79 |
@@ -416,6 +465,8 @@ |
80 |
{ |
80 |
|
81 |
+ if ( tmp->new == 1 ) |
81 |
for (tmp = Incoming; tmp; tmp = tmp->next) |
|
|
82 |
{ |
83 |
+ if ( tmp->new == 1 ) |
82 |
+ tmp->has_new = 1; |
84 |
+ tmp->has_new = 1; |
83 |
#ifdef USE_IMAP |
85 |
if (tmp->magic != M_IMAP) |
84 |
if (tmp->magic != M_IMAP) |
86 |
{ |
85 |
#endif |
87 |
tmp->new = 0; |
86 |
*************** |
88 |
@@ -455,18 +506,122 @@ |
87 |
*** 385,394 **** |
89 |
{ |
88 |
case M_MBOX: |
90 |
case M_MBOX: |
89 |
case M_MMDF: |
91 |
case M_MMDF: |
90 |
|
92 |
- if (buffy_mbox_hasnew (tmp, &sb) > 0) |
91 |
! if (STAT_CHECK) |
93 |
- BuffyCount++; |
92 |
{ |
94 |
- break; |
93 |
! BuffyCount++; |
95 |
+ { |
94 |
! tmp->new = 1; |
96 |
+ if (STAT_CHECK || tmp->msgcount == 0) |
95 |
} |
97 |
+ { |
96 |
else if (option(OPTCHECKMBOXSIZE)) |
98 |
+ BUFFY b = *tmp; |
97 |
{ |
99 |
+ int msgcount = 0; |
98 |
--- 432,458 ---- |
100 |
+ int msg_unread = 0; |
99 |
case M_MBOX: |
101 |
+ /* parse the mailbox, to see how much mail there is */ |
100 |
case M_MMDF: |
102 |
+ ctx = mx_open_mailbox( tmp->path, M_READONLY | M_QUIET | M_NOSORT | M_PEEK, NULL); |
101 |
|
103 |
+ if(ctx) |
102 |
! { |
104 |
+ { |
103 |
! if (STAT_CHECK || tmp->msgcount == 0) |
105 |
+ msgcount = ctx->msgcount; |
104 |
{ |
106 |
+ msg_unread = ctx->unread; |
105 |
! BUFFY b = *tmp; |
107 |
+ mx_close_mailbox(ctx, 0); |
106 |
! int msgcount = 0; |
108 |
+ } |
107 |
! int msg_unread = 0; |
109 |
+ *tmp = b; |
108 |
! /* parse the mailbox, to see how much mail there is */ |
110 |
+ tmp->msgcount = msgcount; |
109 |
! ctx = mx_open_mailbox( tmp->path, M_READONLY | M_QUIET | M_NOSORT | M_PEEK, NULL); |
111 |
+ tmp->msg_unread = msg_unread; |
110 |
! if(ctx) |
112 |
+ if(STAT_CHECK) { |
111 |
! { |
113 |
+ tmp->has_new = tmp->new = 1; |
112 |
! msgcount = ctx->msgcount; |
114 |
+ BuffyCount++; |
113 |
! msg_unread = ctx->unread; |
115 |
+ } |
114 |
! mx_close_mailbox(ctx, 0); |
116 |
+ } |
115 |
! } |
117 |
+ else if (option(OPTCHECKMBOXSIZE)) |
116 |
! *tmp = b; |
118 |
+ { |
117 |
! tmp->msgcount = msgcount; |
119 |
+ /* some other program has deleted mail from the folder */ |
118 |
! tmp->msg_unread = msg_unread; |
120 |
+ tmp->size = (off_t) sb.st_size; |
119 |
! if(STAT_CHECK) { |
121 |
+ } |
120 |
! tmp->has_new = tmp->new = 1; |
122 |
+ if (tmp->newly_created && |
121 |
! BuffyCount++; |
123 |
+ (sb.st_ctime != sb.st_mtime || sb.st_ctime != sb.st_atime)) |
122 |
! } |
124 |
+ tmp->newly_created = 0; |
123 |
} |
125 |
+ } |
124 |
else if (option(OPTCHECKMBOXSIZE)) |
126 |
+ break; |
125 |
{ |
127 |
+ |
126 |
*************** |
128 |
|
127 |
*** 398,432 **** |
129 |
case M_MAILDIR: |
128 |
if (tmp->newly_created && |
130 |
- if (buffy_maildir_hasnew (tmp) > 0) |
129 |
(sb.st_ctime != sb.st_mtime || sb.st_ctime != sb.st_atime)) |
131 |
- BuffyCount++; |
130 |
tmp->newly_created = 0; |
132 |
+ { |
131 |
! |
133 |
+ char path[_POSIX_PATH_MAX]; |
132 |
break; |
134 |
+ DIR *dirp; |
133 |
|
135 |
+ struct dirent *de; |
134 |
case M_MAILDIR: |
136 |
+ /* count new message */ |
135 |
|
137 |
+ snprintf (path, sizeof (path), "%s/new", tmp->path); |
136 |
snprintf (path, sizeof (path), "%s/new", tmp->path); |
138 |
+ if ((dirp = opendir (path)) == NULL) |
137 |
if ((dirp = opendir (path)) == NULL) |
139 |
+ { |
138 |
{ |
140 |
+ tmp->magic = 0; |
139 |
tmp->magic = 0; |
141 |
+ break; |
140 |
break; |
142 |
+ } |
141 |
} |
143 |
+ tmp->msgcount = 0; |
142 |
while ((de = readdir (dirp)) != NULL) |
144 |
+ tmp->msg_unread = 0; |
143 |
{ |
145 |
+ tmp->msg_flagged = 0; |
144 |
char *p; |
146 |
+ while ((de = readdir (dirp)) != NULL) |
145 |
if (*de->d_name != '.' && |
147 |
+ { |
146 |
(!(p = strstr (de->d_name, ":2,")) || !strchr (p + 3, 'T'))) |
148 |
+ char *p; |
147 |
{ |
149 |
+ if (*de->d_name != '.' && |
148 |
! /* one new and undeleted message is enough */ |
150 |
+ (!(p = strstr (de->d_name, ":2,")) || !strchr (p + 3, 'T'))) |
149 |
! BuffyCount++; |
151 |
+ { |
150 |
! tmp->new = 1; |
152 |
+ tmp->has_new = tmp->new = 1; |
151 |
! break; |
153 |
+ tmp->msgcount++; |
152 |
} |
154 |
+ tmp->msg_unread++; |
153 |
} |
155 |
+ } |
154 |
closedir (dirp); |
156 |
+ } |
155 |
break; |
157 |
+ if(tmp->msg_unread) |
156 |
|
158 |
+ BuffyCount++; |
157 |
case M_MH: |
159 |
+ |
158 |
if ((tmp->new = mh_buffy (tmp->path)) > 0) |
160 |
+ closedir (dirp); |
159 |
BuffyCount++; |
161 |
+ |
160 |
break; |
162 |
+ /* |
161 |
} |
163 |
+ * count read messages (for folderlist (sidebar) we also need to count |
162 |
} |
164 |
+ * messages in cur so that we the total number of messages |
163 |
--- 462,547 ---- |
165 |
+ */ |
164 |
if (tmp->newly_created && |
166 |
+ snprintf (path, sizeof (path), "%s/cur", tmp->path); |
165 |
(sb.st_ctime != sb.st_mtime || sb.st_ctime != sb.st_atime)) |
167 |
+ if ((dirp = opendir (path)) == NULL) |
166 |
tmp->newly_created = 0; |
168 |
+ { |
167 |
! } |
169 |
+ tmp->magic = 0; |
168 |
break; |
170 |
+ break; |
169 |
|
171 |
+ } |
170 |
case M_MAILDIR: |
172 |
+ while ((de = readdir (dirp)) != NULL) |
171 |
|
173 |
+ { |
172 |
+ /* count new message */ |
174 |
+ char *p; |
173 |
snprintf (path, sizeof (path), "%s/new", tmp->path); |
175 |
+ if (*de->d_name != '.') { |
174 |
if ((dirp = opendir (path)) == NULL) |
176 |
+ if ((p = strstr (de->d_name, ":2,"))) { |
175 |
{ |
177 |
+ if (!strchr (p + 3, 'T')) { |
176 |
tmp->magic = 0; |
178 |
+ tmp->msgcount++; |
177 |
break; |
179 |
+ if ( !strchr (p + 3, 'S')) |
178 |
} |
180 |
+ tmp->msg_unread++; |
179 |
+ tmp->msgcount = 0; |
181 |
+ if (strchr(p + 3, 'F')) |
180 |
+ tmp->msg_unread = 0; |
182 |
+ tmp->msg_flagged++; |
181 |
+ tmp->msg_flagged = 0; |
183 |
+ } |
182 |
while ((de = readdir (dirp)) != NULL) |
184 |
+ } else |
183 |
{ |
185 |
+ tmp->msgcount++; |
184 |
char *p; |
186 |
+ } |
185 |
if (*de->d_name != '.' && |
187 |
+ } |
186 |
(!(p = strstr (de->d_name, ":2,")) || !strchr (p + 3, 'T'))) |
188 |
+ closedir (dirp); |
187 |
{ |
189 |
+ } |
188 |
! tmp->has_new = tmp->new = 1; |
190 |
break; |
189 |
! tmp->msgcount++; |
191 |
|
190 |
! tmp->msg_unread++; |
192 |
case M_MH: |
191 |
! } |
193 |
- if ((tmp->new = mh_buffy (tmp->path)) > 0) |
192 |
! } |
194 |
- BuffyCount++; |
193 |
! if(tmp->msg_unread) |
195 |
+ { |
194 |
! BuffyCount++; |
196 |
+ DIR *dp; |
195 |
! |
197 |
+ char path[_POSIX_PATH_MAX]; |
196 |
! closedir (dirp); |
198 |
+ struct dirent *de; |
197 |
! |
199 |
+ if ((tmp->new = mh_buffy (tmp->path)) > 0) |
198 |
! /* |
200 |
+ BuffyCount++; |
199 |
! * count read messages (for folderlist (sidebar) we also need to count |
201 |
+ |
200 |
! * messages in cur so that we the total number of messages |
202 |
+ if ((dp = opendir (path)) == NULL) |
201 |
! */ |
203 |
+ break; |
202 |
! snprintf (path, sizeof (path), "%s/cur", tmp->path); |
204 |
+ tmp->msgcount = 0; |
203 |
! if ((dirp = opendir (path)) == NULL) |
205 |
+ while ((de = readdir (dp))) |
204 |
! { |
206 |
+ { |
205 |
! tmp->magic = 0; |
207 |
+ if (mh_valid_message (de->d_name)) |
206 |
! break; |
208 |
+ { |
207 |
! } |
209 |
+ tmp->msgcount++; |
208 |
! while ((de = readdir (dirp)) != NULL) |
210 |
+ tmp->has_new = tmp->new = 1; |
209 |
! { |
211 |
+ } |
210 |
! char *p; |
212 |
+ } |
211 |
! if (*de->d_name != '.') { |
213 |
+ closedir (dp); |
212 |
! if ((p = strstr (de->d_name, ":2,"))) { |
214 |
+ } |
213 |
! if (!strchr (p + 3, 'T')) { |
215 |
break; |
214 |
! tmp->msgcount++; |
216 |
} |
215 |
! if ( !strchr (p + 3, 'S')) |
217 |
} |
216 |
! tmp->msg_unread++; |
|
|
217 |
! if (strchr(p + 3, 'F')) |
218 |
! tmp->msg_flagged++; |
219 |
! } |
220 |
! } else |
221 |
! tmp->msgcount++; |
222 |
} |
223 |
} |
224 |
closedir (dirp); |
225 |
break; |
226 |
|
227 |
case M_MH: |
228 |
+ { |
229 |
+ DIR *dp; |
230 |
+ struct dirent *de; |
231 |
if ((tmp->new = mh_buffy (tmp->path)) > 0) |
232 |
BuffyCount++; |
233 |
+ |
234 |
+ if ((dp = opendir (path)) == NULL) |
235 |
+ break; |
236 |
+ tmp->msgcount = 0; |
237 |
+ while ((de = readdir (dp))) |
238 |
+ { |
239 |
+ if (mh_valid_message (de->d_name)) |
240 |
+ { |
241 |
+ tmp->msgcount++; |
242 |
+ tmp->has_new = tmp->new = 1; |
243 |
+ } |
244 |
+ } |
245 |
+ closedir (dp); |
246 |
+ } |
247 |
break; |
248 |
} |
249 |
} |
250 |
*** mutt-1.5.20-orig/buffy.h 2009-04-30 00:36:16.000000000 -0500 |
218 |
*** mutt-1.5.20-orig/buffy.h 2009-04-30 00:36:16.000000000 -0500 |
251 |
--- mutt-1.5.20-patched/buffy.h 2009-06-19 22:07:04.000000000 -0500 |
219 |
--- mutt-1.5.20-patched/buffy.h 2009-06-19 22:07:04.000000000 -0500 |
252 |
*************** |
220 |
*************** |
Link Here
|
277 |
{ NULL, 0 } |
245 |
{ NULL, 0 } |
278 |
}; |
246 |
}; |
279 |
|
247 |
|
280 |
*** mutt-1.5.20-orig/compose.c 2009-03-31 01:52:43.000000000 -0500 |
|
|
281 |
--- mutt-1.5.20-patched/compose.c 2009-06-19 22:07:04.000000000 -0500 |
282 |
*************** |
283 |
*** 72,78 **** |
284 |
|
285 |
#define HDR_XOFFSET 10 |
286 |
#define TITLE_FMT "%10s" /* Used for Prompts, which are ASCII */ |
287 |
! #define W (COLS - HDR_XOFFSET) |
288 |
|
289 |
static char *Prompts[] = |
290 |
{ |
291 |
--- 72,78 ---- |
292 |
|
293 |
#define HDR_XOFFSET 10 |
294 |
#define TITLE_FMT "%10s" /* Used for Prompts, which are ASCII */ |
295 |
! #define W (COLS - HDR_XOFFSET - SidebarWidth) |
296 |
|
297 |
static char *Prompts[] = |
298 |
{ |
299 |
*************** |
300 |
*** 115,130 **** |
301 |
if ((WithCrypto & APPLICATION_PGP) && (WithCrypto & APPLICATION_SMIME)) |
302 |
{ |
303 |
if (!msg->security) |
304 |
! mvaddstr (HDR_CRYPT, 0, "Security: "); |
305 |
else if (msg->security & APPLICATION_SMIME) |
306 |
! mvaddstr (HDR_CRYPT, 0, " S/MIME: "); |
307 |
else if (msg->security & APPLICATION_PGP) |
308 |
! mvaddstr (HDR_CRYPT, 0, " PGP: "); |
309 |
} |
310 |
else if ((WithCrypto & APPLICATION_SMIME)) |
311 |
! mvaddstr (HDR_CRYPT, 0, " S/MIME: "); |
312 |
else if ((WithCrypto & APPLICATION_PGP)) |
313 |
! mvaddstr (HDR_CRYPT, 0, " PGP: "); |
314 |
else |
315 |
return; |
316 |
|
317 |
--- 115,130 ---- |
318 |
if ((WithCrypto & APPLICATION_PGP) && (WithCrypto & APPLICATION_SMIME)) |
319 |
{ |
320 |
if (!msg->security) |
321 |
! mvaddstr (HDR_CRYPT, SidebarWidth, "Security: "); |
322 |
else if (msg->security & APPLICATION_SMIME) |
323 |
! mvaddstr (HDR_CRYPT, SidebarWidth, " S/MIME: "); |
324 |
else if (msg->security & APPLICATION_PGP) |
325 |
! mvaddstr (HDR_CRYPT, SidebarWidth, " PGP: "); |
326 |
} |
327 |
else if ((WithCrypto & APPLICATION_SMIME)) |
328 |
! mvaddstr (HDR_CRYPT, SidebarWidth, " S/MIME: "); |
329 |
else if ((WithCrypto & APPLICATION_PGP)) |
330 |
! mvaddstr (HDR_CRYPT, SidebarWidth, " PGP: "); |
331 |
else |
332 |
return; |
333 |
|
334 |
*************** |
335 |
*** 148,154 **** |
336 |
} |
337 |
clrtoeol (); |
338 |
|
339 |
! move (HDR_CRYPTINFO, 0); |
340 |
clrtoeol (); |
341 |
if ((WithCrypto & APPLICATION_PGP) |
342 |
&& msg->security & APPLICATION_PGP && msg->security & SIGN) |
343 |
--- 148,154 ---- |
344 |
} |
345 |
clrtoeol (); |
346 |
|
347 |
! move (HDR_CRYPTINFO, SidebarWidth); |
348 |
clrtoeol (); |
349 |
if ((WithCrypto & APPLICATION_PGP) |
350 |
&& msg->security & APPLICATION_PGP && msg->security & SIGN) |
351 |
*************** |
352 |
*** 164,170 **** |
353 |
&& (msg->security & ENCRYPT) |
354 |
&& SmimeCryptAlg |
355 |
&& *SmimeCryptAlg) { |
356 |
! mvprintw (HDR_CRYPTINFO, 40, "%s%s", _("Encrypt with: "), |
357 |
NONULL(SmimeCryptAlg)); |
358 |
off = 20; |
359 |
} |
360 |
--- 164,170 ---- |
361 |
&& (msg->security & ENCRYPT) |
362 |
&& SmimeCryptAlg |
363 |
&& *SmimeCryptAlg) { |
364 |
! mvprintw (HDR_CRYPTINFO, SidebarWidth + 40, "%s%s", _("Encrypt with: "), |
365 |
NONULL(SmimeCryptAlg)); |
366 |
off = 20; |
367 |
} |
368 |
*************** |
369 |
*** 178,184 **** |
370 |
int c; |
371 |
char *t; |
372 |
|
373 |
! mvaddstr (HDR_MIX, 0, " Mix: "); |
374 |
|
375 |
if (!chain) |
376 |
{ |
377 |
--- 178,184 ---- |
378 |
int c; |
379 |
char *t; |
380 |
|
381 |
! mvaddstr (HDR_MIX, SidebarWidth, " Mix: "); |
382 |
|
383 |
if (!chain) |
384 |
{ |
385 |
*************** |
386 |
*** 193,199 **** |
387 |
if (t && t[0] == '0' && t[1] == '\0') |
388 |
t = "<random>"; |
389 |
|
390 |
! if (c + mutt_strlen (t) + 2 >= COLS) |
391 |
break; |
392 |
|
393 |
addstr (NONULL(t)); |
394 |
--- 193,199 ---- |
395 |
if (t && t[0] == '0' && t[1] == '\0') |
396 |
t = "<random>"; |
397 |
|
398 |
! if (c + mutt_strlen (t) + 2 >= COLS - SidebarWidth) |
399 |
break; |
400 |
|
401 |
addstr (NONULL(t)); |
402 |
*************** |
403 |
*** 245,251 **** |
404 |
|
405 |
buf[0] = 0; |
406 |
rfc822_write_address (buf, sizeof (buf), addr, 1); |
407 |
! mvprintw (line, 0, TITLE_FMT, Prompts[line - 1]); |
408 |
mutt_paddstr (W, buf); |
409 |
} |
410 |
|
411 |
--- 245,251 ---- |
412 |
|
413 |
buf[0] = 0; |
414 |
rfc822_write_address (buf, sizeof (buf), addr, 1); |
415 |
! mvprintw (line, SidebarWidth, TITLE_FMT, Prompts[line - 1]); |
416 |
mutt_paddstr (W, buf); |
417 |
} |
418 |
|
419 |
*************** |
420 |
*** 255,264 **** |
421 |
draw_envelope_addr (HDR_TO, msg->env->to); |
422 |
draw_envelope_addr (HDR_CC, msg->env->cc); |
423 |
draw_envelope_addr (HDR_BCC, msg->env->bcc); |
424 |
! mvprintw (HDR_SUBJECT, 0, TITLE_FMT, Prompts[HDR_SUBJECT - 1]); |
425 |
mutt_paddstr (W, NONULL (msg->env->subject)); |
426 |
draw_envelope_addr (HDR_REPLYTO, msg->env->reply_to); |
427 |
! mvprintw (HDR_FCC, 0, TITLE_FMT, Prompts[HDR_FCC - 1]); |
428 |
mutt_paddstr (W, fcc); |
429 |
|
430 |
if (WithCrypto) |
431 |
--- 255,264 ---- |
432 |
draw_envelope_addr (HDR_TO, msg->env->to); |
433 |
draw_envelope_addr (HDR_CC, msg->env->cc); |
434 |
draw_envelope_addr (HDR_BCC, msg->env->bcc); |
435 |
! mvprintw (HDR_SUBJECT, SidebarWidth, TITLE_FMT, Prompts[HDR_SUBJECT - 1]); |
436 |
mutt_paddstr (W, NONULL (msg->env->subject)); |
437 |
draw_envelope_addr (HDR_REPLYTO, msg->env->reply_to); |
438 |
! mvprintw (HDR_FCC, SidebarWidth, TITLE_FMT, Prompts[HDR_FCC - 1]); |
439 |
mutt_paddstr (W, fcc); |
440 |
|
441 |
if (WithCrypto) |
442 |
*************** |
443 |
*** 269,275 **** |
444 |
#endif |
445 |
|
446 |
SETCOLOR (MT_COLOR_STATUS); |
447 |
! mvaddstr (HDR_ATTACH - 1, 0, _("-- Attachments")); |
448 |
BKGDSET (MT_COLOR_STATUS); |
449 |
clrtoeol (); |
450 |
|
451 |
--- 269,275 ---- |
452 |
#endif |
453 |
|
454 |
SETCOLOR (MT_COLOR_STATUS); |
455 |
! mvaddstr (HDR_ATTACH - 1, SidebarWidth, _("-- Attachments")); |
456 |
BKGDSET (MT_COLOR_STATUS); |
457 |
clrtoeol (); |
458 |
|
459 |
*************** |
460 |
*** 307,313 **** |
461 |
/* redraw the expanded list so the user can see the result */ |
462 |
buf[0] = 0; |
463 |
rfc822_write_address (buf, sizeof (buf), *addr, 1); |
464 |
! move (line, HDR_XOFFSET); |
465 |
mutt_paddstr (W, buf); |
466 |
|
467 |
return 0; |
468 |
--- 307,313 ---- |
469 |
/* redraw the expanded list so the user can see the result */ |
470 |
buf[0] = 0; |
471 |
rfc822_write_address (buf, sizeof (buf), *addr, 1); |
472 |
! move (line, HDR_XOFFSET+SidebarWidth); |
473 |
mutt_paddstr (W, buf); |
474 |
|
475 |
return 0; |
476 |
*************** |
477 |
*** 552,558 **** |
478 |
if (mutt_get_field ("Subject: ", buf, sizeof (buf), 0) == 0) |
479 |
{ |
480 |
mutt_str_replace (&msg->env->subject, buf); |
481 |
! move (HDR_SUBJECT, HDR_XOFFSET); |
482 |
clrtoeol (); |
483 |
if (msg->env->subject) |
484 |
mutt_paddstr (W, msg->env->subject); |
485 |
--- 552,558 ---- |
486 |
if (mutt_get_field ("Subject: ", buf, sizeof (buf), 0) == 0) |
487 |
{ |
488 |
mutt_str_replace (&msg->env->subject, buf); |
489 |
! move (HDR_SUBJECT, HDR_XOFFSET + SidebarWidth); |
490 |
clrtoeol (); |
491 |
if (msg->env->subject) |
492 |
mutt_paddstr (W, msg->env->subject); |
493 |
*************** |
494 |
*** 569,575 **** |
495 |
{ |
496 |
strfcpy (fcc, buf, fcclen); |
497 |
mutt_pretty_mailbox (fcc, fcclen); |
498 |
! move (HDR_FCC, HDR_XOFFSET); |
499 |
mutt_paddstr (W, fcc); |
500 |
fccSet = 1; |
501 |
} |
502 |
--- 569,575 ---- |
503 |
{ |
504 |
strfcpy (fcc, buf, fcclen); |
505 |
mutt_pretty_mailbox (fcc, fcclen); |
506 |
! move (HDR_FCC, HDR_XOFFSET + SidebarWidth); |
507 |
mutt_paddstr (W, fcc); |
508 |
fccSet = 1; |
509 |
} |
510 |
*** mutt-1.5.20-orig/curs_main.c 2009-06-13 21:48:36.000000000 -0500 |
248 |
*** mutt-1.5.20-orig/curs_main.c 2009-06-13 21:48:36.000000000 -0500 |
511 |
--- mutt-1.5.20-patched/curs_main.c 2009-06-19 22:07:04.000000000 -0500 |
249 |
--- mutt-1.5.20-patched/curs_main.c 2009-06-19 22:07:04.000000000 -0500 |
512 |
*************** |
250 |
*************** |
Link Here
|
766 |
|
504 |
|
767 |
/* mx_open_new_message() */ |
505 |
/* mx_open_new_message() */ |
768 |
#define M_ADD_FROM 1 /* add a From_ line */ |
506 |
#define M_ADD_FROM 1 /* add a From_ line */ |
769 |
*** mutt-1.5.20-orig/Makefile.am 2009-01-04 20:11:29.000000000 -0600 |
507 |
--- orig/Makefile.am.orig 2010-09-18 13:23:19.000000000 +0200 |
770 |
--- mutt-1.5.20-patched/Makefile.am 2009-06-19 22:07:04.000000000 -0500 |
508 |
+++ new/Makefile.am 2010-09-18 13:25:19.000000000 +0200 |
771 |
*************** |
509 |
@@ -34,7 +34,7 @@ |
772 |
*** 29,35 **** |
510 |
score.c send.c sendlib.c signal.c sort.c \ |
773 |
score.c send.c sendlib.c signal.c sort.c \ |
511 |
status.c system.c thread.c charset.c history.c lib.c \ |
774 |
status.c system.c thread.c charset.c history.c lib.c \ |
512 |
muttlib.c editmsg.c mbyte.c \ |
775 |
muttlib.c editmsg.c mbyte.c \ |
513 |
- url.c ascii.c crypt-mod.c crypt-mod.h safe_asprintf.c |
776 |
! url.c ascii.c crypt-mod.c crypt-mod.h |
514 |
+ url.c ascii.c crypt-mod.c crypt-mod.h safe_asprintf.c sidebar.c |
777 |
|
515 |
|
778 |
nodist_mutt_SOURCES = $(BUILT_SOURCES) |
516 |
nodist_mutt_SOURCES = $(BUILT_SOURCES) |
779 |
|
517 |
|
780 |
--- 29,36 ---- |
518 |
--- orig/Makefile.in.orig 2010-09-18 13:23:19.000000000 +0200 |
781 |
score.c send.c sendlib.c signal.c sort.c \ |
519 |
+++ new/Makefile.in 2010-09-18 13:27:19.000000000 +0200 |
782 |
status.c system.c thread.c charset.c history.c lib.c \ |
520 |
@@ -89,7 +89,7 @@ |
783 |
muttlib.c editmsg.c mbyte.c \ |
521 |
system.$(OBJEXT) thread.$(OBJEXT) charset.$(OBJEXT) \ |
784 |
! url.c ascii.c crypt-mod.c crypt-mod.h \ |
522 |
history.$(OBJEXT) lib.$(OBJEXT) muttlib.$(OBJEXT) \ |
785 |
! sidebar.c |
523 |
editmsg.$(OBJEXT) mbyte.$(OBJEXT) url.$(OBJEXT) \ |
786 |
|
524 |
- ascii.$(OBJEXT) crypt-mod.$(OBJEXT) safe_asprintf.$(OBJEXT) |
787 |
nodist_mutt_SOURCES = $(BUILT_SOURCES) |
525 |
+ ascii.$(OBJEXT) crypt-mod.$(OBJEXT) safe_asprintf.$(OBJEXT) sidebar.$(OBJEXT) |
788 |
|
526 |
am__objects_1 = |
789 |
*** mutt-1.5.20-orig/Makefile.in 2009-06-09 01:50:44.000000000 -0500 |
527 |
am__objects_2 = patchlist.$(OBJEXT) $(am__objects_1) |
790 |
--- mutt-1.5.20-patched/Makefile.in 2009-06-19 22:07:04.000000000 -0500 |
528 |
nodist_mutt_OBJECTS = $(am__objects_2) |
791 |
*************** |
529 |
@@ -363,7 +363,7 @@ |
792 |
*** 85,91 **** |
530 |
score.c send.c sendlib.c signal.c sort.c \ |
793 |
system.$(OBJEXT) thread.$(OBJEXT) charset.$(OBJEXT) \ |
531 |
status.c system.c thread.c charset.c history.c lib.c \ |
794 |
history.$(OBJEXT) lib.$(OBJEXT) muttlib.$(OBJEXT) \ |
532 |
muttlib.c editmsg.c mbyte.c \ |
795 |
editmsg.$(OBJEXT) mbyte.$(OBJEXT) url.$(OBJEXT) \ |
533 |
- url.c ascii.c crypt-mod.c crypt-mod.h safe_asprintf.c |
796 |
! ascii.$(OBJEXT) crypt-mod.$(OBJEXT) |
534 |
+ url.c ascii.c crypt-mod.c crypt-mod.h safe_asprintf.c sidebar.c |
797 |
am__objects_1 = patchlist.$(OBJEXT) |
535 |
|
798 |
nodist_mutt_OBJECTS = $(am__objects_1) |
536 |
nodist_mutt_SOURCES = $(BUILT_SOURCES) |
799 |
mutt_OBJECTS = $(am_mutt_OBJECTS) $(nodist_mutt_OBJECTS) |
537 |
mutt_LDADD = @MUTT_LIB_OBJECTS@ @LIBOBJS@ $(LIBIMAP) $(MUTTLIBS) \ |
800 |
--- 85,92 ---- |
538 |
@@ -397,7 +397,7 @@ |
801 |
system.$(OBJEXT) thread.$(OBJEXT) charset.$(OBJEXT) \ |
539 |
README.SSL smime.h group.h \ |
802 |
history.$(OBJEXT) lib.$(OBJEXT) muttlib.$(OBJEXT) \ |
540 |
muttbug pgppacket.h depcomp ascii.h BEWARE PATCHES patchlist.sh \ |
803 |
editmsg.$(OBJEXT) mbyte.$(OBJEXT) url.$(OBJEXT) \ |
541 |
ChangeLog mkchangelog.sh mutt_idna.h \ |
804 |
! ascii.$(OBJEXT) crypt-mod.$(OBJEXT) \ |
542 |
- snprintf.c regex.c crypt-gpgme.h hcachever.sh.in |
805 |
! sidebar.$(OBJEXT) |
543 |
+ snprintf.c regex.c crypt-gpgme.h sidebar.h hcachever.sh.in |
806 |
am__objects_1 = patchlist.$(OBJEXT) |
544 |
|
807 |
nodist_mutt_OBJECTS = $(am__objects_1) |
545 |
EXTRA_SCRIPTS = smime_keys |
808 |
mutt_OBJECTS = $(am_mutt_OBJECTS) $(nodist_mutt_OBJECTS) |
546 |
mutt_dotlock_SOURCES = mutt_dotlock.c |
809 |
*************** |
|
|
810 |
*** 356,362 **** |
811 |
score.c send.c sendlib.c signal.c sort.c \ |
812 |
status.c system.c thread.c charset.c history.c lib.c \ |
813 |
muttlib.c editmsg.c mbyte.c \ |
814 |
! url.c ascii.c crypt-mod.c crypt-mod.h |
815 |
|
816 |
nodist_mutt_SOURCES = $(BUILT_SOURCES) |
817 |
mutt_LDADD = @MUTT_LIB_OBJECTS@ @LIBOBJS@ $(LIBIMAP) $(MUTTLIBS) \ |
818 |
--- 357,364 ---- |
819 |
score.c send.c sendlib.c signal.c sort.c \ |
820 |
status.c system.c thread.c charset.c history.c lib.c \ |
821 |
muttlib.c editmsg.c mbyte.c \ |
822 |
! url.c ascii.c crypt-mod.c crypt-mod.h \ |
823 |
! sidebar.c |
824 |
|
825 |
nodist_mutt_SOURCES = $(BUILT_SOURCES) |
826 |
mutt_LDADD = @MUTT_LIB_OBJECTS@ @LIBOBJS@ $(LIBIMAP) $(MUTTLIBS) \ |
827 |
*************** |
828 |
*** 388,394 **** |
829 |
README.SSL smime.h \ |
830 |
muttbug pgppacket.h depcomp ascii.h BEWARE PATCHES patchlist.sh \ |
831 |
ChangeLog mkchangelog.sh mutt_idna.h \ |
832 |
! snprintf.c regex.c crypt-gpgme.h hcachever.sh.in |
833 |
|
834 |
EXTRA_SCRIPTS = smime_keys |
835 |
mutt_dotlock_SOURCES = mutt_dotlock.c |
836 |
--- 390,396 ---- |
837 |
README.SSL smime.h \ |
838 |
muttbug pgppacket.h depcomp ascii.h BEWARE PATCHES patchlist.sh \ |
839 |
ChangeLog mkchangelog.sh mutt_idna.h \ |
840 |
! snprintf.c regex.c crypt-gpgme.h sidebar.h hcachever.sh.in |
841 |
|
842 |
EXTRA_SCRIPTS = smime_keys |
843 |
mutt_dotlock_SOURCES = mutt_dotlock.c |
844 |
*** mutt-1.5.20-orig/mbox.c 2009-06-10 23:29:41.000000000 -0500 |
547 |
*** mutt-1.5.20-orig/mbox.c 2009-06-10 23:29:41.000000000 -0500 |
845 |
--- mutt-1.5.20-patched/mbox.c 2009-06-19 22:07:04.000000000 -0500 |
548 |
--- mutt-1.5.20-patched/mbox.c 2009-06-19 22:07:04.000000000 -0500 |
846 |
*************** |
549 |
*************** |
Link Here
|
1231 |
+ OP_SIDEBAR_NEXT "go down to next mailbox" |
934 |
+ OP_SIDEBAR_NEXT "go down to next mailbox" |
1232 |
+ OP_SIDEBAR_PREV "go to previous mailbox" |
935 |
+ OP_SIDEBAR_PREV "go to previous mailbox" |
1233 |
+ OP_SIDEBAR_OPEN "open hilighted mailbox" |
936 |
+ OP_SIDEBAR_OPEN "open hilighted mailbox" |
1234 |
*** mutt-1.5.20-orig/pager.c 2009-06-03 15:48:31.000000000 -0500 |
937 |
--- orig/pager.c.orig 2010-09-18 13:23:19.000000000 +0200 |
1235 |
--- mutt-1.5.20-patched/pager.c 2009-06-19 22:19:58.000000000 -0500 |
938 |
+++ new/pager.c 2010-09-18 14:03:08.000000000 +0200 |
1236 |
*************** |
939 |
@@ -29,6 +29,7 @@ |
1237 |
*** 29,34 **** |
940 |
#include "pager.h" |
1238 |
--- 29,35 ---- |
941 |
#include "attach.h" |
1239 |
#include "pager.h" |
942 |
#include "mbyte.h" |
1240 |
#include "attach.h" |
943 |
+#include "sidebar.h" |
1241 |
#include "mbyte.h" |
944 |
|
1242 |
+ #include "sidebar.h" |
945 |
#include "mutt_crypt.h" |
1243 |
|
946 |
|
1244 |
#include "mutt_crypt.h" |
947 |
@@ -1104,6 +1105,7 @@ |
1245 |
|
948 |
if (check_attachment_marker ((char *)buf) == 0) |
1246 |
*************** |
949 |
wrap_cols = COLS; |
1247 |
*** 1071,1076 **** |
950 |
|
1248 |
--- 1072,1079 ---- |
951 |
+ wrap_cols -= SidebarWidth; |
1249 |
mbstate_t mbstate; |
952 |
/* FIXME: this should come from lineInfo */ |
1250 |
|
953 |
memset(&mbstate, 0, sizeof(mbstate)); |
1251 |
int wrap_cols = mutt_term_width ((flags & M_PAGER_NOWRAP) ? 0 : Wrap); |
954 |
|
1252 |
+ |
955 |
@@ -1778,7 +1780,7 @@ |
1253 |
+ wrap_cols -= SidebarWidth; |
956 |
if ((redraw & REDRAW_BODY) || topline != oldtopline) |
1254 |
|
957 |
{ |
1255 |
/* FIXME: this should come from lineInfo */ |
958 |
do { |
1256 |
memset(&mbstate, 0, sizeof(mbstate)); |
959 |
- move (bodyoffset, 0); |
1257 |
*************** |
960 |
+ move (bodyoffset, SidebarWidth); |
1258 |
*** 1717,1723 **** |
961 |
curline = oldtopline = topline; |
1259 |
if ((redraw & REDRAW_BODY) || topline != oldtopline) |
962 |
lines = 0; |
1260 |
{ |
963 |
force_redraw = 0; |
1261 |
do { |
964 |
@@ -1791,6 +1793,7 @@ |
1262 |
! move (bodyoffset, 0); |
965 |
&QuoteList, &q_level, &force_redraw, &SearchRE) > 0) |
1263 |
curline = oldtopline = topline; |
966 |
lines++; |
1264 |
lines = 0; |
967 |
curline++; |
1265 |
force_redraw = 0; |
968 |
+ move(lines + bodyoffset, SidebarWidth); |
1266 |
--- 1720,1726 ---- |
969 |
} |
1267 |
if ((redraw & REDRAW_BODY) || topline != oldtopline) |
970 |
last_offset = lineInfo[curline].offset; |
1268 |
{ |
971 |
} while (force_redraw); |
1269 |
do { |
972 |
@@ -1804,6 +1807,7 @@ |
1270 |
! move (bodyoffset, SidebarWidth); |
973 |
addch ('~'); |
1271 |
curline = oldtopline = topline; |
974 |
addch ('\n'); |
1272 |
lines = 0; |
975 |
lines++; |
1273 |
force_redraw = 0; |
976 |
+ move(lines + bodyoffset, SidebarWidth); |
1274 |
*************** |
977 |
} |
1275 |
*** 1730,1735 **** |
978 |
/* We are going to update the pager status bar, so it isn't |
1276 |
--- 1733,1739 ---- |
979 |
* necessary to reset to normal color now. */ |
1277 |
&QuoteList, &q_level, &force_redraw, &SearchRE) > 0) |
980 |
@@ -1827,21 +1831,21 @@ |
1278 |
lines++; |
981 |
/* print out the pager status bar */ |
1279 |
curline++; |
982 |
SETCOLOR (MT_COLOR_STATUS); |
1280 |
+ move(lines + bodyoffset, SidebarWidth); |
983 |
BKGDSET (MT_COLOR_STATUS); |
1281 |
} |
984 |
- CLEARLINE (statusoffset); |
1282 |
last_offset = lineInfo[curline].offset; |
985 |
+ CLEARLINE_WIN (statusoffset); |
1283 |
} while (force_redraw); |
986 |
|
1284 |
*************** |
987 |
if (IsHeader (extra) || IsMsgAttach (extra)) |
1285 |
*** 1743,1748 **** |
988 |
{ |
1286 |
--- 1747,1753 ---- |
989 |
- size_t l1 = COLS * MB_LEN_MAX; |
1287 |
addch ('~'); |
990 |
+ size_t l1 = (COLS-SidebarWidth) * MB_LEN_MAX; |
1288 |
addch ('\n'); |
991 |
size_t l2 = sizeof (buffer); |
1289 |
lines++; |
992 |
hfi.hdr = (IsHeader (extra)) ? extra->hdr : extra->bdy->hdr; |
1290 |
+ move(lines + bodyoffset, SidebarWidth); |
993 |
mutt_make_string_info (buffer, l1 < l2 ? l1 : l2, NONULL (PagerFmt), &hfi, M_FORMAT_MAKEPRINT); |
1291 |
} |
994 |
- mutt_paddstr (COLS, buffer); |
1292 |
/* We are going to update the pager status bar, so it isn't |
995 |
+ mutt_paddstr (COLS-SidebarWidth, buffer); |
1293 |
* necessary to reset to normal color now. */ |
996 |
} |
1294 |
*************** |
997 |
else |
1295 |
*** 1766,1786 **** |
998 |
{ |
1296 |
/* print out the pager status bar */ |
999 |
char bn[STRING]; |
1297 |
SETCOLOR (MT_COLOR_STATUS); |
1000 |
snprintf (bn, sizeof (bn), "%s (%s)", banner, pager_progress_str); |
1298 |
BKGDSET (MT_COLOR_STATUS); |
1001 |
- mutt_paddstr (COLS, bn); |
1299 |
! CLEARLINE (statusoffset); |
1002 |
+ mutt_paddstr (COLS-SidebarWidth, bn); |
1300 |
|
1003 |
} |
1301 |
if (IsHeader (extra) || IsMsgAttach (extra)) |
1004 |
BKGDSET (MT_COLOR_NORMAL); |
1302 |
{ |
1005 |
SETCOLOR (MT_COLOR_NORMAL); |
1303 |
! size_t l1 = COLS * MB_LEN_MAX; |
1006 |
@@ -1852,18 +1856,23 @@ |
1304 |
size_t l2 = sizeof (buffer); |
1007 |
/* redraw the pager_index indicator, because the |
1305 |
hfi.hdr = (IsHeader (extra)) ? extra->hdr : extra->bdy->hdr; |
1008 |
* flags for this message might have changed. */ |
1306 |
mutt_make_string_info (buffer, l1 < l2 ? l1 : l2, NONULL (PagerFmt), &hfi, M_FORMAT_MAKEPRINT); |
1009 |
menu_redraw_current (index); |
1307 |
! mutt_paddstr (COLS, buffer); |
1010 |
+ draw_sidebar(MENU_PAGER); |
1308 |
} |
1011 |
|
1309 |
else |
1012 |
/* print out the index status bar */ |
1310 |
{ |
1013 |
menu_status_line (buffer, sizeof (buffer), index, NONULL(Status)); |
1311 |
char bn[STRING]; |
1014 |
|
1312 |
snprintf (bn, sizeof (bn), "%s (%s)", banner, pager_progress_str); |
1015 |
- move (indexoffset + (option (OPTSTATUSONTOP) ? 0 : (indexlen - 1)), 0); |
1313 |
! mutt_paddstr (COLS, bn); |
1016 |
+ move (indexoffset + (option (OPTSTATUSONTOP) ? 0 : (indexlen - 1)), SidebarWidth); |
1314 |
} |
1017 |
SETCOLOR (MT_COLOR_STATUS); |
1315 |
BKGDSET (MT_COLOR_NORMAL); |
1018 |
BKGDSET (MT_COLOR_STATUS); |
1316 |
SETCOLOR (MT_COLOR_NORMAL); |
1019 |
- mutt_paddstr (COLS, buffer); |
1317 |
--- 1771,1791 ---- |
1020 |
+ mutt_paddstr (COLS-SidebarWidth, buffer); |
1318 |
/* print out the pager status bar */ |
1021 |
SETCOLOR (MT_COLOR_NORMAL); |
1319 |
SETCOLOR (MT_COLOR_STATUS); |
1022 |
BKGDSET (MT_COLOR_NORMAL); |
1320 |
BKGDSET (MT_COLOR_STATUS); |
1023 |
} |
1321 |
! CLEARLINE_WIN (statusoffset); |
1024 |
|
1322 |
|
1025 |
+ /* if we're not using the index, update every time */ |
1323 |
if (IsHeader (extra) || IsMsgAttach (extra)) |
1026 |
+ if ( index == 0 ) |
1324 |
{ |
1027 |
+ draw_sidebar(MENU_PAGER); |
1325 |
! size_t l1 = (COLS-SidebarWidth) * MB_LEN_MAX; |
1028 |
+ |
1326 |
size_t l2 = sizeof (buffer); |
1029 |
redraw = 0; |
1327 |
hfi.hdr = (IsHeader (extra)) ? extra->hdr : extra->bdy->hdr; |
1030 |
|
1328 |
mutt_make_string_info (buffer, l1 < l2 ? l1 : l2, NONULL (PagerFmt), &hfi, M_FORMAT_MAKEPRINT); |
1031 |
if (option(OPTBRAILLEFRIENDLY)) { |
1329 |
! mutt_paddstr (COLS-SidebarWidth, buffer); |
1032 |
@@ -2852,6 +2861,13 @@ |
1330 |
} |
1033 |
mutt_what_key (); |
1331 |
else |
1034 |
break; |
1332 |
{ |
1035 |
|
1333 |
char bn[STRING]; |
1036 |
+ case OP_SIDEBAR_SCROLL_UP: |
1334 |
snprintf (bn, sizeof (bn), "%s (%s)", banner, pager_progress_str); |
1037 |
+ case OP_SIDEBAR_SCROLL_DOWN: |
1335 |
! mutt_paddstr (COLS-SidebarWidth, bn); |
1038 |
+ case OP_SIDEBAR_NEXT: |
1336 |
} |
1039 |
+ case OP_SIDEBAR_PREV: |
1337 |
BKGDSET (MT_COLOR_NORMAL); |
1040 |
+ scroll_sidebar(ch, MENU_PAGER); |
1338 |
SETCOLOR (MT_COLOR_NORMAL); |
1041 |
+ break; |
1339 |
*************** |
1042 |
+ |
1340 |
*** 1791,1808 **** |
1043 |
default: |
1341 |
/* redraw the pager_index indicator, because the |
1044 |
ch = -1; |
1342 |
* flags for this message might have changed. */ |
1045 |
break; |
1343 |
menu_redraw_current (index); |
|
|
1344 |
|
1345 |
/* print out the index status bar */ |
1346 |
menu_status_line (buffer, sizeof (buffer), index, NONULL(Status)); |
1347 |
|
1348 |
! move (indexoffset + (option (OPTSTATUSONTOP) ? 0 : (indexlen - 1)), 0); |
1349 |
SETCOLOR (MT_COLOR_STATUS); |
1350 |
BKGDSET (MT_COLOR_STATUS); |
1351 |
! mutt_paddstr (COLS, buffer); |
1352 |
SETCOLOR (MT_COLOR_NORMAL); |
1353 |
BKGDSET (MT_COLOR_NORMAL); |
1354 |
} |
1355 |
|
1356 |
redraw = 0; |
1357 |
|
1358 |
if (option(OPTBRAILLEFRIENDLY)) { |
1359 |
--- 1796,1818 ---- |
1360 |
/* redraw the pager_index indicator, because the |
1361 |
* flags for this message might have changed. */ |
1362 |
menu_redraw_current (index); |
1363 |
+ draw_sidebar(MENU_PAGER); |
1364 |
|
1365 |
/* print out the index status bar */ |
1366 |
menu_status_line (buffer, sizeof (buffer), index, NONULL(Status)); |
1367 |
|
1368 |
! move (indexoffset + (option (OPTSTATUSONTOP) ? 0 : (indexlen - 1)), SidebarWidth); |
1369 |
SETCOLOR (MT_COLOR_STATUS); |
1370 |
BKGDSET (MT_COLOR_STATUS); |
1371 |
! mutt_paddstr (COLS-SidebarWidth, buffer); |
1372 |
SETCOLOR (MT_COLOR_NORMAL); |
1373 |
BKGDSET (MT_COLOR_NORMAL); |
1374 |
} |
1375 |
|
1376 |
+ /* if we're not using the index, update every time */ |
1377 |
+ if ( index == 0 ) |
1378 |
+ draw_sidebar(MENU_PAGER); |
1379 |
+ |
1380 |
redraw = 0; |
1381 |
|
1382 |
if (option(OPTBRAILLEFRIENDLY)) { |
1383 |
*************** |
1384 |
*** 2729,2734 **** |
1385 |
--- 2739,2751 ---- |
1386 |
mutt_what_key (); |
1387 |
break; |
1388 |
|
1389 |
+ case OP_SIDEBAR_SCROLL_UP: |
1390 |
+ case OP_SIDEBAR_SCROLL_DOWN: |
1391 |
+ case OP_SIDEBAR_NEXT: |
1392 |
+ case OP_SIDEBAR_PREV: |
1393 |
+ scroll_sidebar(ch, MENU_PAGER); |
1394 |
+ break; |
1395 |
+ |
1396 |
default: |
1397 |
ch = -1; |
1398 |
break; |
1399 |
*** mutt-1.5.20-orig/PATCHES 2008-11-11 13:55:46.000000000 -0600 |
1046 |
*** mutt-1.5.20-orig/PATCHES 2008-11-11 13:55:46.000000000 -0600 |
1400 |
--- mutt-1.5.20-patched/PATCHES 2009-06-19 22:20:31.000000000 -0500 |
1047 |
--- mutt-1.5.20-patched/PATCHES 2009-06-19 22:20:31.000000000 -0500 |
1401 |
*************** |
1048 |
*************** |
Link Here
|
1849 |
FREE (&value); |
1496 |
FREE (&value); |
1850 |
return; |
1497 |
return; |
1851 |
} |
1498 |
} |
|
|
1499 |
--- orig/compose.c.orig 2010-04-14 20:50:19.000000000 +0200 |
1500 |
+++ new/compose.c 2010-09-18 15:29:09.000000000 +0200 |
1501 |
@@ -72,7 +72,7 @@ |
1502 |
|
1503 |
#define HDR_XOFFSET 10 |
1504 |
#define TITLE_FMT "%10s" /* Used for Prompts, which are ASCII */ |
1505 |
-#define W (COLS - HDR_XOFFSET) |
1506 |
+#define W (COLS - HDR_XOFFSET - SidebarWidth) |
1507 |
|
1508 |
static char *Prompts[] = |
1509 |
{ |
1510 |
@@ -112,7 +112,7 @@ |
1511 |
{ |
1512 |
int off = 0; |
1513 |
|
1514 |
- mvaddstr (HDR_CRYPT, 0, "Security: "); |
1515 |
+ mvaddstr (HDR_CRYPT, SidebarWidth, "Security: "); |
1516 |
|
1517 |
if ((WithCrypto & (APPLICATION_PGP | APPLICATION_SMIME)) == 0) |
1518 |
{ |
1519 |
@@ -144,7 +144,7 @@ |
1520 |
} |
1521 |
|
1522 |
clrtoeol (); |
1523 |
- move (HDR_CRYPTINFO, 0); |
1524 |
+ move (HDR_CRYPTINFO, SidebarWidth); |
1525 |
clrtoeol (); |
1526 |
|
1527 |
if ((WithCrypto & APPLICATION_PGP) |
1528 |
@@ -161,7 +161,7 @@ |
1529 |
&& (msg->security & ENCRYPT) |
1530 |
&& SmimeCryptAlg |
1531 |
&& *SmimeCryptAlg) { |
1532 |
- mvprintw (HDR_CRYPTINFO, 40, "%s%s", _("Encrypt with: "), |
1533 |
+ mvprintw (HDR_CRYPTINFO, SidebarWidth + 40, "%s%s", _("Encrypt with: "), |
1534 |
NONULL(SmimeCryptAlg)); |
1535 |
off = 20; |
1536 |
} |
1537 |
@@ -190,7 +190,7 @@ |
1538 |
if (t && t[0] == '0' && t[1] == '\0') |
1539 |
t = "<random>"; |
1540 |
|
1541 |
- if (c + mutt_strlen (t) + 2 >= COLS) |
1542 |
+ if (c + mutt_strlen (t) + 2 >= COLS - SidebarWidth) |
1543 |
break; |
1544 |
|
1545 |
addstr (NONULL(t)); |
1546 |
@@ -242,7 +242,7 @@ |
1547 |
|
1548 |
buf[0] = 0; |
1549 |
rfc822_write_address (buf, sizeof (buf), addr, 1); |
1550 |
- mvprintw (line, 0, TITLE_FMT, Prompts[line - 1]); |
1551 |
+ mvprintw (line, SidebarWidth, TITLE_FMT, Prompts[line - 1]); |
1552 |
mutt_paddstr (W, buf); |
1553 |
} |
1554 |
|
1555 |
@@ -252,10 +252,10 @@ |
1556 |
draw_envelope_addr (HDR_TO, msg->env->to); |
1557 |
draw_envelope_addr (HDR_CC, msg->env->cc); |
1558 |
draw_envelope_addr (HDR_BCC, msg->env->bcc); |
1559 |
- mvprintw (HDR_SUBJECT, 0, TITLE_FMT, Prompts[HDR_SUBJECT - 1]); |
1560 |
+ mvprintw (HDR_SUBJECT, SidebarWidth, TITLE_FMT, Prompts[HDR_SUBJECT - 1]); |
1561 |
mutt_paddstr (W, NONULL (msg->env->subject)); |
1562 |
draw_envelope_addr (HDR_REPLYTO, msg->env->reply_to); |
1563 |
- mvprintw (HDR_FCC, 0, TITLE_FMT, Prompts[HDR_FCC - 1]); |
1564 |
+ mvprintw (HDR_FCC, SidebarWidth, TITLE_FMT, Prompts[HDR_FCC - 1]); |
1565 |
mutt_paddstr (W, fcc); |
1566 |
|
1567 |
if (WithCrypto) |
1568 |
@@ -266,7 +266,7 @@ |
1569 |
#endif |
1570 |
|
1571 |
SETCOLOR (MT_COLOR_STATUS); |
1572 |
- mvaddstr (HDR_ATTACH - 1, 0, _("-- Attachments")); |
1573 |
+ mvaddstr (HDR_ATTACH - 1, SidebarWidth, _("-- Attachments")); |
1574 |
BKGDSET (MT_COLOR_STATUS); |
1575 |
clrtoeol (); |
1576 |
|
1577 |
@@ -304,7 +304,7 @@ |
1578 |
/* redraw the expanded list so the user can see the result */ |
1579 |
buf[0] = 0; |
1580 |
rfc822_write_address (buf, sizeof (buf), *addr, 1); |
1581 |
- move (line, HDR_XOFFSET); |
1582 |
+ move (line, HDR_XOFFSET+SidebarWidth); |
1583 |
mutt_paddstr (W, buf); |
1584 |
|
1585 |
return 0; |
1586 |
@@ -549,7 +549,7 @@ |
1587 |
if (mutt_get_field ("Subject: ", buf, sizeof (buf), 0) == 0) |
1588 |
{ |
1589 |
mutt_str_replace (&msg->env->subject, buf); |
1590 |
- move (HDR_SUBJECT, HDR_XOFFSET); |
1591 |
+ move (HDR_SUBJECT, HDR_XOFFSET + SidebarWidth); |
1592 |
clrtoeol (); |
1593 |
if (msg->env->subject) |
1594 |
mutt_paddstr (W, msg->env->subject); |
1595 |
@@ -566,7 +566,7 @@ |
1596 |
{ |
1597 |
strfcpy (fcc, buf, fcclen); |
1598 |
mutt_pretty_mailbox (fcc, fcclen); |
1599 |
- move (HDR_FCC, HDR_XOFFSET); |
1600 |
+ move (HDR_FCC, HDR_XOFFSET + SidebarWidth); |
1601 |
mutt_paddstr (W, fcc); |
1602 |
fccSet = 1; |
1603 |
} |