Mercurial > geeqie
comparison src/editors.c @ 731:fa8f7d7396cf
Introduce an helper function that returns the name of an editor.
It helps to reduce code redundancy.
author | zas_ |
---|---|
date | Thu, 22 May 2008 09:12:36 +0000 |
parents | 2d8a8e892b5e |
children | 8a8873e7a552 |
comparison
equal
deleted
inserted
replaced
730:2d8a8e892b5e | 731:fa8f7d7396cf |
---|---|
864 if (flags & EDITOR_ERROR_CANT_EXEC) return _("Can't execute external editor."); | 864 if (flags & EDITOR_ERROR_CANT_EXEC) return _("Can't execute external editor."); |
865 if (flags & EDITOR_ERROR_STATUS) return _("External editor returned error status."); | 865 if (flags & EDITOR_ERROR_STATUS) return _("External editor returned error status."); |
866 if (flags & EDITOR_ERROR_SKIPPED) return _("File was skipped."); | 866 if (flags & EDITOR_ERROR_SKIPPED) return _("File was skipped."); |
867 return _("Unknown error."); | 867 return _("Unknown error."); |
868 } | 868 } |
869 | |
870 const gchar *editor_get_name(gint n) | |
871 { | |
872 if (!is_valid_editor_command(n)) return NULL; | |
873 | |
874 if (options->editor[n].name && strlen(options->editor[n].name) > 0) | |
875 return options->editor[n].name; | |
876 | |
877 return _("(unknown)"); | |
878 } |