[gthumb] better readability of the code
- From: Paolo Bacchilega <paobac src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gthumb] better readability of the code
- Date: Sun, 24 Nov 2019 12:31:57 +0000 (UTC)
commit af13a2ea51f075c1ba3bc75bdba495d23f487f51
Author: Paolo Bacchilega <paobac src gnome org>
Date: Wed Nov 13 17:14:42 2019 +0100
better readability of the code
gthumb/gth-shortcuts-window.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
---
diff --git a/gthumb/gth-shortcuts-window.c b/gthumb/gth-shortcuts-window.c
index 6198507c..7e8942cf 100644
--- a/gthumb/gth-shortcuts-window.c
+++ b/gthumb/gth-shortcuts-window.c
@@ -84,12 +84,18 @@ gth_shortcuts_window_new (GthWindow *app_window)
if (g_strcmp0 (shortcut_info->category, last_category) != 0) {
GthShortcutCategory *category_info;
+ char *title;
last_category = shortcut_info->category;
+
category_info = gth_main_get_shortcut_category (shortcut_info->category);
+ if ((category_info != NULL) && (category_info->display_name != NULL))
+ title = _(category_info->display_name);
+ else
+ title = _("Other");
group = g_object_new (GTK_TYPE_SHORTCUTS_GROUP,
- "title", ((category_info != NULL) &&
(category_info->display_name != NULL)) ? _(category_info->display_name) : _("Other"),
+ "title", title,
NULL);
gtk_widget_show (group);
gtk_container_add (GTK_CONTAINER (section), group);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]