From 07caf51b881e2f8e93fbcf529ea1a9b14a40f82e Mon Sep 17 00:00:00 2001 From: Andre Noll Date: Tue, 23 Oct 2007 22:20:36 +0200 Subject: [PATCH] Replace status item STATUS_BAR to BASENAME. as this is what it actually contains. --- audiod.c | 8 ++++---- command.c | 8 ++++---- gui.c | 4 ++-- gui_theme.c | 32 ++++++++++++++++---------------- para.h | 2 +- stat.c | 2 +- 6 files changed, 28 insertions(+), 28 deletions(-) diff --git a/audiod.c b/audiod.c index 2a78332f..58d65275 100644 --- a/audiod.c +++ b/audiod.c @@ -957,11 +957,11 @@ static void close_stat_pipe(void) stat_task->offset_seconds = 0; audiod_status_dump(); stat_task->playing = 0; - stat_task->stat_item_values[SI_STATUS_BAR] = make_message( + stat_task->stat_item_values[SI_BASENAME] = make_message( "%s:no connection to para_server\n", - status_item_list[SI_STATUS_BAR]); - stat_client_write(stat_task->stat_item_values[SI_STATUS_BAR], - SI_STATUS_BAR); + status_item_list[SI_BASENAME]); + stat_client_write(stat_task->stat_item_values[SI_BASENAME], + SI_BASENAME); if (stat_task->clock_diff_count) { stat_task->clock_diff_barrier.tv_sec = now->tv_sec + 1; stat_task->clock_diff_barrier.tv_usec = now->tv_usec; diff --git a/command.c b/command.c index 74141b9e..57d3917e 100644 --- a/command.c +++ b/command.c @@ -97,7 +97,7 @@ static char *vss_get_status_flags(unsigned int flags) static char *get_status(struct misc_meta_data *nmmd) { - char *bar, *ret, mtime[30] = ""; + char *basename, *ret, mtime[30] = ""; char *status, *flags; /* vss status info */ char *ut = uptime_str(); long offset = (nmmd->offset + 500) / 1000; @@ -109,7 +109,7 @@ static char *get_status(struct misc_meta_data *nmmd) /* report real status */ status = vss_status_tohuman(nmmd->vss_status_flags); flags = vss_get_status_flags(nmmd->vss_status_flags); - bar = para_basename(nmmd->filename); + basename = para_basename(nmmd->filename); gettimeofday(&now, NULL); ret = make_message( "%s:%zu\n" "%s:%s\n" "%s:%lu\n" "%s:%u\n" @@ -121,7 +121,7 @@ static char *get_status(struct misc_meta_data *nmmd) status_item_list[SI_LENGTH], nmmd->afd.afhi.seconds_total, status_item_list[SI_NUM_PLAYED], nmmd->num_played, - status_item_list[SI_STATUS_BAR], bar ? bar : "(none)", + status_item_list[SI_BASENAME], basename ? basename : "(none)", status_item_list[SI_STATUS], status, status_item_list[SI_STATUS_FLAGS], flags, status_item_list[SI_SELECTOR], "FIXME", @@ -141,7 +141,7 @@ static char *get_status(struct misc_meta_data *nmmd) status_item_list[SI_ATTRIBUTES], mmd->afd.attributes_string ); - free(bar); + free(basename); free(flags); free(status); free(ut); diff --git a/gui.c b/gui.c index a71a2a7c..7dab4466 100644 --- a/gui.c +++ b/gui.c @@ -918,8 +918,8 @@ repeat: close(audiod_pipe); audiod_pipe = -1; clear_all_items(); - free(stat_content[SI_STATUS_BAR]); - stat_content[SI_STATUS_BAR] = + free(stat_content[SI_BASENAME]); + stat_content[SI_BASENAME] = para_strdup("audiod not running!?"); print_all_items(); } diff --git a/gui_theme.c b/gui_theme.c index 483b21fe..f3009082 100644 --- a/gui_theme.c +++ b/gui_theme.c @@ -40,14 +40,14 @@ static void init_theme_simple(struct gui_theme *t) t->default_bg = COLOR_BLUE; t->sep_str = "*"; - d[SI_STATUS_BAR].prefix = ""; - d[SI_STATUS_BAR].postfix = ""; - d[SI_STATUS_BAR].fg = COLOR_WHITE; - d[SI_STATUS_BAR].bg = COLOR_BLUE; - d[SI_STATUS_BAR].align = CENTER; - d[SI_STATUS_BAR].x = 0; - d[SI_STATUS_BAR].y = 7; - d[SI_STATUS_BAR].len = 100; + d[SI_BASENAME].prefix = ""; + d[SI_BASENAME].postfix = ""; + d[SI_BASENAME].fg = COLOR_WHITE; + d[SI_BASENAME].bg = COLOR_BLUE; + d[SI_BASENAME].align = CENTER; + d[SI_BASENAME].x = 0; + d[SI_BASENAME].y = 7; + d[SI_BASENAME].len = 100; d[SI_STATUS].prefix = "para_server: "; d[SI_STATUS].postfix = ""; @@ -110,14 +110,14 @@ static void init_theme_colorful_blackness(struct gui_theme *t) d[SI_PLAY_TIME].y = 7; d[SI_PLAY_TIME].len = 35; - d[SI_STATUS_BAR].prefix = ""; - d[SI_STATUS_BAR].postfix = ""; - d[SI_STATUS_BAR].fg = COLOR_CYAN; - d[SI_STATUS_BAR].bg = COLOR_BLACK; - d[SI_STATUS_BAR].align = LEFT; - d[SI_STATUS_BAR].x = 35; - d[SI_STATUS_BAR].y = 7; - d[SI_STATUS_BAR].len = 65; + d[SI_BASENAME].prefix = ""; + d[SI_BASENAME].postfix = ""; + d[SI_BASENAME].fg = COLOR_CYAN; + d[SI_BASENAME].bg = COLOR_BLACK; + d[SI_BASENAME].align = LEFT; + d[SI_BASENAME].x = 35; + d[SI_BASENAME].y = 7; + d[SI_BASENAME].len = 65; d[SI_STATUS].prefix = ""; d[SI_STATUS].postfix = " "; diff --git a/para.h b/para.h index c41ed9dd..17c6a821 100644 --- a/para.h +++ b/para.h @@ -160,7 +160,7 @@ void ms2tv(const long unsigned n, struct timeval *tv); /* stat */ enum { - SI_STATUS_BAR, SI_STATUS, SI_NUM_PLAYED, + SI_BASENAME, SI_STATUS, SI_NUM_PLAYED, SI_MTIME, SI_LENGTH_MIN, SI_LENGTH_SEC, SI_FILE_SIZE, SI_STATUS_FLAGS, SI_FORMAT, SI_SCORE, SI_AUDIO_INFO1, SI_AUDIO_INFO2, diff --git a/stat.c b/stat.c index 93607df7..8a2f8df4 100644 --- a/stat.c +++ b/stat.c @@ -48,7 +48,7 @@ static int num_clients; * the list of all status items sent by para_server/para_audiod */ const char *status_item_list[NUM_STAT_ITEMS] = { - [SI_STATUS_BAR] = "status_bar", + [SI_BASENAME] = "basnemae", [SI_STATUS] = "status", [SI_NUM_PLAYED] = "num_played", -- 2.39.5