summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 2cf7354)
raw | patch | inline | side by side (parent: 2cf7354)
author | Max Kellermann <max@duempel.org> | |
Sun, 11 Oct 2009 12:55:53 +0000 (14:55 +0200) | ||
committer | Max Kellermann <max@duempel.org> | |
Sun, 11 Oct 2009 12:55:53 +0000 (14:55 +0200) |
Since the browser_lw_callback() isn't used for rendering anymore (only
for searching), we can remove the page breaks.
for searching), we can remove the page breaks.
src/list_window.c | patch | blob | history | |
src/screen_browser.c | patch | blob | history |
diff --git a/src/list_window.c b/src/list_window.c
index f8ab8e9a708ccd0d996c26443d7a7f126f64ecdc..d1a6ce3ff2ca9f4d18b9046921317dbeb641037c 100644 (file)
--- a/src/list_window.c
+++ b/src/list_window.c
label = callback(i, &h, NULL, callback_data);
assert(label != NULL);
- if (label[0] == '[')
- label++;
-
if (jump_match(label, str)) {
list_window_move_cursor(lw, i);
return true;
diff --git a/src/screen_browser.c b/src/screen_browser.c
index 16a2f5e7045c48233741e19aada820c76b1cdf02..edcd2d93bbbc9c820eac4701be8e1fcfb7fd46ef 100644 (file)
--- a/src/screen_browser.c
+++ b/src/screen_browser.c
@@ -96,15 +96,13 @@ browser_lw_callback(unsigned idx, bool *highlight, G_GNUC_UNUSED char **second_c
#endif
if( entity == NULL )
- return "[..]";
+ return "..";
if (mpd_entity_get_type(entity) == MPD_ENTITY_TYPE_DIRECTORY) {
const struct mpd_directory *dir =
mpd_entity_get_directory(entity);
char *directory = utf8_to_locale(g_basename(mpd_directory_get_path(dir)));
-
- g_snprintf(buf, BUFSIZE, "[%s]", directory);
- g_free(directory);
+ g_strlcpy(buf, directory, sizeof(buf));
return buf;
} else if (mpd_entity_get_type(entity) == MPD_ENTITY_TYPE_SONG) {
const struct mpd_song *song = mpd_entity_get_song(entity);