# HG changeset patch # User nadvornik # Date 1237568520 0 # Node ID e9f9d3da3f43719e3e4b90d431e6bff421ec03c3 # Parent 2b95dbb20a874e3e53e5f6bfb53eb7e46ba0c1f8 added tooltips to external editors on toolbar - patch by Colin Clark diff -r 2b95dbb20a87 -r e9f9d3da3f43 src/editors.c --- a/src/editors.c Fri Mar 20 16:28:43 2009 +0000 +++ b/src/editors.c Fri Mar 20 17:02:00 2009 +0000 @@ -84,6 +84,7 @@ g_free(editor->exec); g_free(editor->menu_path); g_free(editor->hotkey); + g_free(editor->comment); string_list_free(editor->ext_list); g_free(editor->file); g_free(editor); @@ -266,6 +267,8 @@ editor->hotkey = g_key_file_get_string(key_file, DESKTOP_GROUP, "X-Geeqie-Hotkey", NULL); + editor->comment = g_key_file_get_string(key_file, DESKTOP_GROUP, "Comment", NULL); + extensions = g_key_file_get_string(key_file, DESKTOP_GROUP, "X-Geeqie-File-Extensions", NULL); if (extensions) editor->ext_list = filter_to_list(extensions); diff -r 2b95dbb20a87 -r e9f9d3da3f43 src/editors.h --- a/src/editors.h Fri Mar 20 16:28:43 2009 +0000 +++ b/src/editors.h Fri Mar 20 17:02:00 2009 +0000 @@ -45,6 +45,7 @@ gchar *hotkey; GList *ext_list; gchar *file; + gchar *comment; /* .desktop Comment key, used to show a tooltip */ EditorFlags flags; gboolean hidden; }; diff -r 2b95dbb20a87 -r e9f9d3da3f43 src/layout_util.c --- a/src/layout_util.c Fri Mar 20 16:28:43 2009 +0000 +++ b/src/layout_util.c Fri Mar 20 17:02:00 2009 +0000 @@ -1684,7 +1684,7 @@ { GList *path; EditorDescription *editor = work->data; - GtkActionEntry entry = { editor->key, NULL, editor->name, editor->hotkey, NULL, G_CALLBACK(layout_menu_edit_cb) }; + GtkActionEntry entry = { editor->key, NULL, editor->name, editor->hotkey, editor->comment, G_CALLBACK(layout_menu_edit_cb) }; if (editor->icon && register_theme_icon_as_stock(editor->key, editor->icon)) {