[gimp] Bug 417704: font name for missing font is given in the font entry's help message.
- From: Jehan Pagès <jehanp src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] Bug 417704: font name for missing font is given in the font entry's help message.
- Date: Fri, 17 May 2013 12:00:28 +0000 (UTC)
commit 53d2059bd8b1271d02129c4a9ed35a0497c34ab1
Author: Jehan <jehan girinstud io>
Date: Sat Apr 27 11:29:19 2013 +0900
Bug 417704: font name for missing font is given in the font entry's help message.
When a font is missing, the name of the expected font will be displayed in the
help message through the text style editor with an explanatory message.
app/widgets/gimptextstyleeditor.c | 18 ++++++++++++++++++
1 files changed, 18 insertions(+), 0 deletions(-)
---
diff --git a/app/widgets/gimptextstyleeditor.c b/app/widgets/gimptextstyleeditor.c
index 622912f..29c29b2 100644
--- a/app/widgets/gimptextstyleeditor.c
+++ b/app/widgets/gimptextstyleeditor.c
@@ -1297,5 +1297,23 @@ gimp_text_style_editor_update_idle (GimpTextStyleEditor *editor)
g_slist_free (tags_off);
}
+ if (editor->context->font_name &&
+ g_strcmp0 (editor->context->font_name,
+ gimp_object_get_name (gimp_context_get_font (editor->context))))
+ {
+ /* A font is set, but is unavailable; change the help text. */
+ gchar *help_text;
+
+ help_text = g_strdup_printf (_("Font \"%s\" unavailable on this system"),
+ editor->context->font_name);
+ gimp_help_set_help_data (editor->font_entry, help_text, NULL);
+ g_free (help_text);
+ }
+ else
+ {
+ gimp_help_set_help_data (editor->font_entry,
+ _("Change font of selected text"), NULL);
+ }
+
return FALSE;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]