Merge pull request #433 from b4n/statusbar-eol-short-name

Use the short name for EOL mode in the statusbar
This commit is contained in:
Colomban Wendling 2015-03-06 02:45:39 +01:00
commit c3d7acfe81
3 changed files with 14 additions and 1 deletions

View File

@ -280,7 +280,7 @@ static gchar *create_statusbar_statistics(GeanyDocument *doc,
}
break;
case 'M':
g_string_append(stats_str, editor_get_eol_char_name(doc->editor));
g_string_append(stats_str, utils_get_eol_short_name(sci_get_eol_mode(doc->editor->sci)));
break;
case 'e':
g_string_append(stats_str,

View File

@ -381,6 +381,17 @@ const gchar *utils_get_eol_name(gint eol_mode)
}
const gchar *utils_get_eol_short_name(gint eol_mode)
{
switch (eol_mode)
{
case SC_EOL_CRLF: return _("CRLF"); break;
case SC_EOL_CR: return _("CR"); break;
default: return _("LF"); break;
}
}
const gchar *utils_get_eol_char(gint eol_mode)
{
switch (eol_mode)

View File

@ -226,6 +226,8 @@ const gchar *utils_get_eol_char(gint eol_mode);
const gchar *utils_get_eol_name(gint eol_mode);
const gchar *utils_get_eol_short_name(gint eol_mode);
gboolean utils_atob(const gchar *str);
void utils_tidy_path(gchar *filename);