summaryrefslogtreecommitdiff
path: root/apps
diff options
context:
space:
mode:
authorAlexander Levin <al.le@rockbox.org>2010-07-06 16:53:52 +0000
committerAlexander Levin <al.le@rockbox.org>2010-07-06 16:53:52 +0000
commit7d4c0c5e7ed2ef0a87008db2250d4ae5aff8609a (patch)
treec1d546a4ba3f1bdcf35381e689f2d0fe2293bd3d /apps
parent76f2b9c6056d3b5dd29503fa77323aac5088e1e6 (diff)
downloadrockbox-7d4c0c5e7ed2ef0a87008db2250d4ae5aff8609a.zip
rockbox-7d4c0c5e7ed2ef0a87008db2250d4ae5aff8609a.tar.gz
rockbox-7d4c0c5e7ed2ef0a87008db2250d4ae5aff8609a.tar.bz2
rockbox-7d4c0c5e7ed2ef0a87008db2250d4ae5aff8609a.tar.xz
Rename functions so that the code is easier to read
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27313 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps')
-rw-r--r--apps/bookmark.c16
-rw-r--r--apps/bookmark.h2
-rw-r--r--apps/onplay.c2
3 files changed, 10 insertions, 10 deletions
diff --git a/apps/bookmark.c b/apps/bookmark.c
index b8d41c7..b2ff1aa 100644
--- a/apps/bookmark.c
+++ b/apps/bookmark.c
@@ -94,7 +94,7 @@ static const char* get_bookmark_info(int list_index,
char *buffer,
size_t buffer_len);
static char* select_bookmark(const char* bookmark_file_name, bool show_dont_resume);
-static bool system_check(void);
+static bool is_bookmarkable_state(void);
static bool write_bookmark(bool create_bookmark_file, const char *bookmark);
static int get_bookmark_count(const char* bookmark_file_name);
@@ -125,7 +125,7 @@ bool bookmark_create_menu(void)
/* ----------------------------------------------------------------------- */
bool bookmark_load_menu(void)
{
- if (system_check())
+ if (is_bookmarkable_state())
{
char* name = playlist_get_name(NULL, global_temp_buffer,
sizeof(global_temp_buffer));
@@ -167,11 +167,11 @@ bool bookmark_autobookmark(bool prompt_ok)
{
char* bookmark;
bool update = false;
- if (!system_check())
+ if (!is_bookmarkable_state())
return false;
audio_pause(); /* first pause playback */
- if (global_settings.autoupdatebookmark && bookmark_exist())
+ if (global_settings.autoupdatebookmark && bookmark_exists())
update = true;
bookmark = create_bookmark();
/* Workaround for inability to speak when paused: all callers will
@@ -324,7 +324,7 @@ static char* create_bookmark()
int resume_index = 0;
char *file;
- if (!system_check())
+ if (!is_bookmarkable_state())
return NULL; /* something didn't happen correctly, do nothing */
/* grab the currently playing track */
@@ -1063,11 +1063,11 @@ static bool generate_bookmark_file_name(const char *in)
/* ----------------------------------------------------------------------- */
/* Returns true if a bookmark file exists for the current playlist */
/* ----------------------------------------------------------------------- */
-bool bookmark_exist(void)
+bool bookmark_exists(void)
{
bool exist=false;
- if(system_check())
+ if(is_bookmarkable_state())
{
char* name = playlist_get_name(NULL, global_temp_buffer,
sizeof(global_temp_buffer));
@@ -1084,7 +1084,7 @@ bool bookmark_exist(void)
/* Checks the current state of the system and returns true if it is in a */
/* bookmarkable state. */
/* ----------------------------------------------------------------------- */
-static bool system_check(void)
+static bool is_bookmarkable_state(void)
{
int resume_index = 0;
diff --git a/apps/bookmark.h b/apps/bookmark.h
index bde8e84..4b61edb 100644
--- a/apps/bookmark.h
+++ b/apps/bookmark.h
@@ -29,7 +29,7 @@ bool bookmark_create_menu(void);
bool bookmark_mrb_load(void);
bool bookmark_autoload(const char* file);
bool bookmark_load(const char* file, bool autoload);
-bool bookmark_exist(void);
+bool bookmark_exists(void);
#endif /* __BOOKMARK_H__ */
diff --git a/apps/onplay.c b/apps/onplay.c
index 915f48e..7291257 100644
--- a/apps/onplay.c
+++ b/apps/onplay.c
@@ -106,7 +106,7 @@ static int bookmark_menu_callback(int action,
case ACTION_REQUEST_MENUITEM:
if (this_item == &bookmark_load_menu_item)
{
- if (bookmark_exist() == 0)
+ if (!bookmark_exists())
return ACTION_EXIT_MENUITEM;
}
/* hide the bookmark menu if there is no playback */