[geany/geany] 888d3d: Use the short name for EOL mode in the statusbar
Colomban Wendling
git-noreply at xxxxx
Wed Mar 4 14:57:26 UTC 2015
Branch: refs/heads/master
Author: Colomban Wendling <ban at herbesfolles.org>
Committer: Colomban Wendling <ban at herbesfolles.org>
Date: Wed, 04 Mar 2015 14:57:26 UTC
Commit: 888d3dc9dc06b5c6ac5211460dead1b06b1721be
https://github.com/geany/geany/commit/888d3dc9dc06b5c6ac5211460dead1b06b1721be
Log Message:
-----------
Use the short name for EOL mode in the statusbar
See discussion in https://github.com/geany/geany/pull/418
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).
More information about the Commits
mailing list