summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 9791d30)
raw | patch | inline | side by side (parent: 9791d30)
author | Max Kellermann <max@duempel.org> | |
Thu, 25 Sep 2008 19:21:27 +0000 (21:21 +0200) | ||
committer | Max Kellermann <max@duempel.org> | |
Thu, 25 Sep 2008 19:21:27 +0000 (21:21 +0200) |
Finally remove all screen ids, they are not used anymore.
src/screen_list.c | patch | blob | history | |
src/screen_list.h | patch | blob | history |
diff --git a/src/screen_list.c b/src/screen_list.c
index 76ae8b155c53978580ac3237364fcbfe18771e19..fddeeb0256fd073ad177cd48e78cc0dd5d389ca1 100644 (file)
--- a/src/screen_list.c
+++ b/src/screen_list.c
static const struct
{
- int id;
const char *name;
const struct screen_functions *functions;
} screens[] = {
- { SCREEN_PLAYLIST_ID, "playlist", &screen_playlist },
- { SCREEN_BROWSE_ID, "browse", &screen_browse },
+ { "playlist", &screen_playlist },
+ { "browse", &screen_browse },
#ifdef ENABLE_ARTIST_SCREEN
- { SCREEN_ARTIST_ID, "artist", &screen_artist },
+ { "artist", &screen_artist },
#endif
- { SCREEN_HELP_ID, "help", &screen_help },
+ { "help", &screen_help },
#ifdef ENABLE_SEARCH_SCREEN
- { SCREEN_SEARCH_ID, "search", &screen_search },
+ { "search", &screen_search },
#endif
#ifdef ENABLE_KEYDEF_SCREEN
- { SCREEN_KEYDEF_ID, "keydef", &screen_keydef },
+ { "keydef", &screen_keydef },
#endif
#ifdef ENABLE_LYRICS_SCREEN
- { SCREEN_LYRICS_ID, "lyrics", &screen_lyrics },
+ { "lyrics", &screen_lyrics },
#endif
};
return NULL;
}
-const struct screen_functions *
-screen_get_functions(unsigned i)
-{
- assert(i < NUM_SCREENS);
-
- return screens[i].functions;
-}
-
int
lookup_mode(const struct screen_functions *sf)
{
diff --git a/src/screen_list.h b/src/screen_list.h
index 763b4ee9be84ce033b26c896b4bedee890709f0f..583c225b0e030b4373c79c4bfd7a3b601a7eb4f6 100644 (file)
--- a/src/screen_list.h
+++ b/src/screen_list.h
#include <ncurses.h>
-#define SCREEN_PLAYLIST_ID 0
-#define SCREEN_BROWSE_ID 1
-#define SCREEN_ARTIST_ID 2
-#define SCREEN_HELP_ID 100
-#define SCREEN_KEYDEF_ID 101
-#define SCREEN_SEARCH_ID 103
-#define SCREEN_LYRICS_ID 104
-
extern const struct screen_functions screen_playlist;
extern const struct screen_functions screen_browse;
#ifdef ENABLE_ARTIST_SCREEN
int
screen_get_id(const char *name);
-const struct screen_functions *
-screen_get_functions(unsigned i);
-
int
lookup_mode(const struct screen_functions *sf);