Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 368519 | Differences between
and this patch

Collapse All | Expand All

(-)mutt-1.5.20.orig/sidebar.c (-3 / +12 lines)
Lines 255-268 Link Here
255
			int i;
255
			int i;
256
			tmp_folder_name = tmp->path + strlen(Maildir);
256
			tmp_folder_name = tmp->path + strlen(Maildir);
257
			for (i = 0; i < strlen(tmp->path) - strlen(Maildir); i++) {
257
			for (i = 0; i < strlen(tmp->path) - strlen(Maildir); i++) {
258
				if (tmp_folder_name[i] == '/') sidebar_folder_depth++;
258
				if (tmp_folder_name[i] == '/' || tmp_folder_name[i] == '.') sidebar_folder_depth++;
259
			}
259
			}
260
			if (sidebar_folder_depth > 0) {
260
			if (sidebar_folder_depth > 0) {
261
				sidebar_folder_name = malloc(strlen(basename(tmp->path)) + sidebar_folder_depth + 1);
261
				if (option(OPTSIDEBARSHORTPATH)) {
262
					tmp_folder_name = strrchr(tmp->path, '.');
263
					if (tmp_folder_name == NULL)
264
						tmp_folder_name = tmp->path;
265
					else
266
						tmp_folder_name++;
267
				}
268
				else
269
					tmp_folder_name = tmp->path;
270
				sidebar_folder_name = malloc(strlen(basename(tmp_folder_name)) + sidebar_folder_depth + 1);
262
				for (i=0; i < sidebar_folder_depth; i++)
271
				for (i=0; i < sidebar_folder_depth; i++)
263
					sidebar_folder_name[i]=' ';
272
					sidebar_folder_name[i]=' ';
264
				sidebar_folder_name[i]=0;
273
				sidebar_folder_name[i]=0;
265
				strncat(sidebar_folder_name, basename(tmp->path), strlen(basename(tmp->path)) + sidebar_folder_depth);
274
				strncat(sidebar_folder_name, basename(tmp_folder_name), strlen(basename(tmp_folder_name)) + sidebar_folder_depth);
266
			}
275
			}
267
		}
276
		}
268
		printw( "%.*s", SidebarWidth - delim_len + 1,
277
		printw( "%.*s", SidebarWidth - delim_len + 1,
(-)mutt-1.5.20.orig/mutt.h (+1 lines)
Lines 427-432 Link Here
427
  OPTSAVENAME,
427
  OPTSAVENAME,
428
  OPTSCORE,
428
  OPTSCORE,
429
  OPTSIDEBAR,
429
  OPTSIDEBAR,
430
  OPTSIDEBARSHORTPATH,
430
  OPTSIGDASHES,
431
  OPTSIGDASHES,
431
  OPTSIGONTOP,
432
  OPTSIGONTOP,
432
  OPTSORTRE,
433
  OPTSORTRE,
(-)mutt-1.5.20.orig/init.h (+5 lines)
Lines 1979-1984 Link Here
1979
  ** .pp
1979
  ** .pp
1980
  ** The width of the sidebar.
1980
  ** The width of the sidebar.
1981
  */
1981
  */
1982
  { "sidebar_shortpath", DT_BOOL, R_BOTH, OPTSIDEBARSHORTPATH, 0 },
1983
  /*
1984
  ** .pp
1985
  ** Should the sidebar shorten the path showed.
1986
  */
1982
  { "pgp_use_gpg_agent", DT_BOOL, R_NONE, OPTUSEGPGAGENT, 0},
1987
  { "pgp_use_gpg_agent", DT_BOOL, R_NONE, OPTUSEGPGAGENT, 0},
1983
  /*
1988
  /*
1984
  ** .pp
1989
  ** .pp

Return to bug 368519