From: Andre Noll Date: Tue, 23 Oct 2007 20:37:59 +0000 (+0200) Subject: Replace status item DBINFO3 by DIRECTORY. X-Git-Tag: v0.3.0~230 X-Git-Url: http://git.tue.mpg.de/?a=commitdiff_plain;h=e63886e85c55c99e9732e5715b7ce641eff09914;p=paraslash.git Replace status item DBINFO3 by DIRECTORY. --- diff --git a/command.c b/command.c index 57d3917e..f1a0bd18 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 *basename, *ret, mtime[30] = ""; + char *basename, *dirname, *ret, mtime[30] = ""; char *status, *flags; /* vss status info */ char *ut = uptime_str(); long offset = (nmmd->offset + 500) / 1000; @@ -110,12 +110,14 @@ static char *get_status(struct misc_meta_data *nmmd) status = vss_status_tohuman(nmmd->vss_status_flags); flags = vss_get_status_flags(nmmd->vss_status_flags); basename = para_basename(nmmd->filename); + dirname = para_dirname(nmmd->filename); gettimeofday(&now, NULL); ret = make_message( "%s:%zu\n" "%s:%s\n" "%s:%lu\n" "%s:%u\n" "%s:%s\n" "%s:%s\n" "%s:%s\n" "%s:%s\n" "%s:%li\n" "%s:%s\n" "%s:%s\n" "%s" - "%s:%s\n" "%s:%lu.%lu\n" "%s:%lu.%lu\n" "%s:%s\n", + "%s:%s\n" "%s:%lu.%lu\n" "%s:%lu.%lu\n" "%s:%s\n" + "%s:%s\n", status_item_list[SI_FILE_SIZE], nmmd->size / 1024, status_item_list[SI_MTIME], mtime, status_item_list[SI_LENGTH], nmmd->afd.afhi.seconds_total, @@ -138,10 +140,13 @@ static char *get_status(struct misc_meta_data *nmmd) status_item_list[SI_CURRENT_TIME], (long unsigned)now.tv_sec, (long unsigned)now.tv_usec, - status_item_list[SI_ATTRIBUTES], mmd->afd.attributes_string + status_item_list[SI_ATTRIBUTES], mmd->afd.attributes_string, + + status_item_list[SI_DIRECTORY], dirname ); free(basename); + free(dirname); free(flags); free(status); free(ut); diff --git a/gui_theme.c b/gui_theme.c index f3009082..e7112b3f 100644 --- a/gui_theme.c +++ b/gui_theme.c @@ -265,14 +265,14 @@ static void init_theme_colorful_blackness(struct gui_theme *t) d[SI_ATTRIBUTES].y = 87; d[SI_ATTRIBUTES].len = 100; - d[SI_DBINFO3].prefix = ""; - d[SI_DBINFO3].postfix = ""; - d[SI_DBINFO3].fg = COLOR_YELLOW; - d[SI_DBINFO3].bg = COLOR_BLACK; - d[SI_DBINFO3].align = CENTER; - d[SI_DBINFO3].x = 0; - d[SI_DBINFO3].y = 97; - d[SI_DBINFO3].len = 100; + d[SI_DIRECTORY].prefix = "dir:"; + d[SI_DIRECTORY].postfix = ""; + d[SI_DIRECTORY].fg = COLOR_YELLOW; + d[SI_DIRECTORY].bg = COLOR_BLACK; + d[SI_DIRECTORY].align = CENTER; + d[SI_DIRECTORY].x = 0; + d[SI_DIRECTORY].y = 97; + d[SI_DIRECTORY].len = 100; } void init_theme(int num, struct gui_theme *t) diff --git a/para.h b/para.h index 17c6a821..258f8b8d 100644 --- a/para.h +++ b/para.h @@ -165,7 +165,7 @@ enum { SI_FILE_SIZE, SI_STATUS_FLAGS, SI_FORMAT, SI_SCORE, SI_AUDIO_INFO1, SI_AUDIO_INFO2, SI_AUDIO_INFO3, SI_AFS_MODE, SI_ATTRIBUTES, - SI_DBINFO3, SI_DECODER_FLAGS, SI_AUDIOD_STATUS, + SI_DIRECTORY, SI_DECODER_FLAGS, SI_AUDIOD_STATUS, SI_PLAY_TIME, SI_UPTIME, SI_OFFSET, SI_LENGTH, SI_STREAM_START, SI_CURRENT_TIME, SI_AUDIOD_UPTIME, SI_SELECTOR, NUM_STAT_ITEMS diff --git a/stat.c b/stat.c index ed63ec36..3ba13b7e 100644 --- a/stat.c +++ b/stat.c @@ -66,7 +66,7 @@ const char *status_item_list[NUM_STAT_ITEMS] = { [SI_AFS_MODE] = "afs_mode", [SI_ATTRIBUTES] = "attributes", - [SI_DBINFO3] = "dbinfo3", + [SI_DIRECTORY] = "dir", [SI_DECODER_FLAGS] = "decoder_flags", [SI_AUDIOD_STATUS] = "audiod_status",