Branch: refs/heads/master Author: Colomban Wendling ban@herbesfolles.org Committer: Colomban Wendling ban@herbesfolles.org Date: Fri, 06 Mar 2015 01:45:39 UTC Commit: c3d7acfe812f2c750d810a746dc3bdf7af1c7865 https://github.com/geany/geany/commit/c3d7acfe812f2c750d810a746dc3bdf7af1c78...
Log Message: ----------- Merge pull request #433 from b4n/statusbar-eol-short-name
Use the short name for EOL mode in the statusbar
Modified Paths: -------------- src/ui_utils.c src/utils.c src/utils.h
Modified: src/ui_utils.c 2 lines changed, 1 insertions(+), 1 deletions(-) =================================================================== @@ -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,
Modified: src/utils.c 11 lines changed, 11 insertions(+), 0 deletions(-) =================================================================== @@ -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)
Modified: src/utils.h 2 lines changed, 2 insertions(+), 0 deletions(-) =================================================================== @@ -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);
-------------- This E-Mail was brought to you by github_commit_mail.py (Source: https://github.com/geany/infrastructure).