summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 49b143d)
raw | patch | inline | side by side (parent: 49b143d)
author | Max Kellermann <max@duempel.org> | |
Sun, 13 Sep 2009 09:05:45 +0000 (11:05 +0200) | ||
committer | Max Kellermann <max@duempel.org> | |
Sun, 13 Sep 2009 09:05:45 +0000 (11:05 +0200) |
Rename browser_get_selected() to browser_get_selected_entry() first.
src/screen_browser.c | patch | blob | history | |
src/screen_browser.h | patch | blob | history |
diff --git a/src/screen_browser.c b/src/screen_browser.c
index 6dbb2f817b1da7e8e89281ab1a4fc6d449f78a88..7af1f2509715fcfdfbd53aaf9f9bddd796bef369 100644 (file)
--- a/src/screen_browser.c
+++ b/src/screen_browser.c
return true;
}
-static struct filelist_entry *
-browser_get_selected(const struct screen_browser *browser)
+struct filelist_entry *
+browser_get_selected_entry(const struct screen_browser *browser)
{
if (browser->filelist == NULL ||
browser->lw->selected_start < browser->lw->selected_end ||
static struct mpd_InfoEntity *
browser_get_selected_entity(const struct screen_browser *browser)
{
- struct filelist_entry *entry = browser_get_selected(browser);
+ struct filelist_entry *entry = browser_get_selected_entry(browser);
return entry != NULL
? entry->entity
static bool
browser_handle_enter(struct screen_browser *browser, mpdclient_t *c)
{
- struct filelist_entry *entry = browser_get_selected(browser);
+ struct filelist_entry *entry = browser_get_selected_entry(browser);
mpd_InfoEntity *entity;
if (entry == NULL)
}
return false;
} else {
- entry = browser_get_selected(browser);
+ entry = browser_get_selected_entry(browser);
if (entry == NULL || entry->entity == NULL)
return false;
}
return false;
} else {
- entry = browser_get_selected(browser);
+ entry = browser_get_selected_entry(browser);
if (entry == NULL || entry->entity == NULL)
return false;
diff --git a/src/screen_browser.h b/src/screen_browser.h
index 3954c8d3f3f52246b5e143782e73bfc77f7670e9..7f619546ca6847f5d481a488c67d48104d6ab5bc 100644 (file)
--- a/src/screen_browser.h
+++ b/src/screen_browser.h
const char *browser_lw_callback(unsigned index, bool *highlight, char** second_column, void *filelist);
+struct filelist_entry *
+browser_get_selected_entry(const struct screen_browser *browser);
+
bool
browser_change_directory(struct screen_browser *browser, mpdclient_t *c,
filelist_entry_t *entry, const char *new_path);