* mu-msg-str.[ch]: remove functionality which is now in mu-msg-prio.[ch]
This commit is contained in:
@ -58,7 +58,7 @@ const char*
|
|||||||
mu_msg_str_display_date_s (time_t t)
|
mu_msg_str_display_date_s (time_t t)
|
||||||
{
|
{
|
||||||
time_t now;
|
time_t now;
|
||||||
static const guint SECS_IN_DAY = 24 * 60 * 60;
|
static const time_t SECS_IN_DAY = 24 * 60 * 60;
|
||||||
|
|
||||||
now = time (NULL);
|
now = time (NULL);
|
||||||
|
|
||||||
@ -83,7 +83,8 @@ mu_msg_str_size_s (size_t s)
|
|||||||
|
|
||||||
#else
|
#else
|
||||||
if (s >= 1000 * 1000)
|
if (s >= 1000 * 1000)
|
||||||
g_snprintf(buf, sizeof(buf), "%.1f MB", (double)s/(1000*1000));
|
g_snprintf(buf, sizeof(buf), "%.1f MB",
|
||||||
|
(double)s/(1000*1000));
|
||||||
else
|
else
|
||||||
g_snprintf(buf, sizeof(buf), "%.1f kB", (double)s/(1000));
|
g_snprintf(buf, sizeof(buf), "%.1f kB", (double)s/(1000));
|
||||||
#endif /*HAVE_GLIB216*/
|
#endif /*HAVE_GLIB216*/
|
||||||
@ -110,28 +111,6 @@ mu_msg_str_flags (MuMsgFlags flags)
|
|||||||
return g_strdup (mu_msg_str_flags_s(flags));
|
return g_strdup (mu_msg_str_flags_s(flags));
|
||||||
}
|
}
|
||||||
|
|
||||||
const char*
|
|
||||||
mu_msg_str_prio (MuMsgPrio prio)
|
|
||||||
{
|
|
||||||
switch (prio) {
|
|
||||||
|
|
||||||
case MU_MSG_PRIO_LOW:
|
|
||||||
return "low";
|
|
||||||
|
|
||||||
case MU_MSG_PRIO_NONE:
|
|
||||||
case MU_MSG_PRIO_NORMAL:
|
|
||||||
return "normal";
|
|
||||||
|
|
||||||
case MU_MSG_PRIO_HIGH:
|
|
||||||
return "high";
|
|
||||||
|
|
||||||
default:
|
|
||||||
g_warning ("%s: invalid priority %d", __FUNCTION__, prio);
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
char*
|
char*
|
||||||
mu_msg_str_summarize (const char* str, size_t max_lines)
|
mu_msg_str_summarize (const char* str, size_t max_lines)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -118,18 +118,6 @@ const char* mu_msg_str_flags_s (MuMsgFlags flags) G_GNUC_CONST;
|
|||||||
char* mu_msg_str_flags (MuMsgFlags flags) G_GNUC_WARN_UNUSED_RESULT;
|
char* mu_msg_str_flags (MuMsgFlags flags) G_GNUC_WARN_UNUSED_RESULT;
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* get a display string for a message priority; either
|
|
||||||
* high, low or normal
|
|
||||||
*
|
|
||||||
* @param flags file flags
|
|
||||||
*
|
|
||||||
* @return a string representation of the priority; see above
|
|
||||||
* for what to do with it, or NULL in case of error
|
|
||||||
*/
|
|
||||||
const char* mu_msg_str_prio (MuMsgPrio prio) G_GNUC_CONST;
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* get a 'summary' of the string, ie. the first /n/ lines of the
|
* get a 'summary' of the string, ie. the first /n/ lines of the
|
||||||
* strings, with all newlines removed, replaced by single spaces
|
* strings, with all newlines removed, replaced by single spaces
|
||||||
|
|||||||
Reference in New Issue
Block a user