Revert the translatable filetype name of filetype All, add a workaround in ui_update_statusbar() instead.

git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2472 ea778897-0a13-0410-b9d1-a72fbfd435f5
This commit is contained in:
Enrico Tröger 2008-04-11 15:39:44 +00:00
parent f4e0652922
commit 02ea9a08d8
3 changed files with 12 additions and 4 deletions

View File

@ -3,6 +3,9 @@
* THANKS, doc/geany.txt, doc/geany.html:
Add documentation for several options in the preferences dialog
(patch from Robert McGinley, thanks).
* src/filetypes.c, src/ui_utils.c:
Revert the translatable filetype name of filetype All, add a
workaround in ui_update_statusbar() instead.
2008-04-10 Frank Lanitz <frank(at)frank(dot)uvena(dot)de>

View File

@ -476,7 +476,7 @@ void filetypes_init_types()
#define ALL
filetypes[GEANY_FILETYPES_ALL]->id = GEANY_FILETYPES_ALL;
filetypes[GEANY_FILETYPES_ALL]->name = g_strdup(_("None"));
filetypes[GEANY_FILETYPES_ALL]->name = g_strdup("None");
filetypes[GEANY_FILETYPES_ALL]->uid = FILETYPE_UID_ALL;
filetypes[GEANY_FILETYPES_ALL]->lang = -2;
filetypes[GEANY_FILETYPES_ALL]->title = g_strdup(_("All files"));

View File

@ -128,6 +128,13 @@ void ui_update_statusbar(gint idx, gint pos)
const gchar sp[] = " ";
guint line, col;
const gchar *cur_tag;
gchar *filetype_name;
/* workaround to make the name of filetype GEANY_FILETYPES_ALL translatable */
if (doc_list[idx].file_type == NULL || doc_list[idx].file_type->id == GEANY_FILETYPES_ALL)
filetype_name = _("None");
else
filetype_name = doc_list[idx].file_type->name;
if (stats_str == NULL)
stats_str = g_string_sized_new(120);
@ -166,9 +173,7 @@ void ui_update_statusbar(gint idx, gint pos)
/* BOM = byte order mark */
((doc_list[idx].has_bom) ? _("(with BOM)") : "") : "");
g_string_append(stats_str, sp);
g_string_append_printf(stats_str, _("filetype: %s"),
(doc_list[idx].file_type) ? doc_list[idx].file_type->name :
filetypes[GEANY_FILETYPES_ALL]->name);
g_string_append_printf(stats_str, _("filetype: %s"), filetype_name);
g_string_append(stats_str, sp);
if (doc_list[idx].changed)
{