From 1983e4064af5735dd81c621dce41da2faa8f9ef9 Mon Sep 17 00:00:00 2001 From: Colin Clark Date: Sun, 26 Aug 2018 19:32:38 +0100 Subject: [PATCH] Option to hide predefined keyword tree Selected on Preferences/General --- doc/docbook/GuideOptionsGeneral.xml | 8 + src/bar_keywords.c | 15 +- src/options.c | 1 + src/options.h | 1 + src/preferences.c | 7 + src/rcfile.c | 2 + web/help/GuideOptionsGeneral.html | 15 +- web/help/GuideOptionsKeywords.html | 490 ++++++++++++++++++++++++++++ 8 files changed, 531 insertions(+), 8 deletions(-) create mode 100644 web/help/GuideOptionsKeywords.html diff --git a/doc/docbook/GuideOptionsGeneral.xml b/doc/docbook/GuideOptionsGeneral.xml index 5f6288f7..cd53064a 100644 --- a/doc/docbook/GuideOptionsGeneral.xml +++ b/doc/docbook/GuideOptionsGeneral.xml @@ -226,6 +226,14 @@ +
+ Show predefined keyword tree + Deselecting this option will hide the list of predefined keywords on the right-hand side of the keywords pane of the info sidebar. + + Geeqie must be restarted for the change to take effect. + + +
On-line help search diff --git a/src/bar_keywords.c b/src/bar_keywords.c index 601481a5..08db9935 100644 --- a/src/bar_keywords.c +++ b/src/bar_keywords.c @@ -1517,12 +1517,15 @@ static GtkWidget *bar_pane_keywords_new(const gchar *id, const gchar *title, con g_signal_connect(G_OBJECT(buffer), "changed", G_CALLBACK(bar_pane_keywords_changed), pkd); - scrolled = gtk_scrolled_window_new(NULL, NULL); - gtk_scrolled_window_set_shadow_type(GTK_SCROLLED_WINDOW(scrolled), GTK_SHADOW_IN); - gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(scrolled), - GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC); - gtk_box_pack_start(GTK_BOX(hbox), scrolled, TRUE, TRUE, 0); - gtk_widget_show(scrolled); + if (options->show_predefined_keyword_tree) + { + scrolled = gtk_scrolled_window_new(NULL, NULL); + gtk_scrolled_window_set_shadow_type(GTK_SCROLLED_WINDOW(scrolled), GTK_SHADOW_IN); + gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(scrolled), + GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC); + gtk_box_pack_start(GTK_BOX(hbox), scrolled, TRUE, TRUE, 0); + gtk_widget_show(scrolled); + } pkd->autocomplete = gtk_entry_new(); gtk_box_pack_end(GTK_BOX(vbox), pkd->autocomplete, FALSE, FALSE, 0); diff --git a/src/options.c b/src/options.c index ff98542c..eec3b489 100644 --- a/src/options.c +++ b/src/options.c @@ -156,6 +156,7 @@ ConfOptions *init_options(ConfOptions *options) options->show_icon_names = TRUE; options->show_star_rating = FALSE; + options->show_predefined_keyword_tree = TRUE; options->slideshow.delay = 50; options->slideshow.random = FALSE; diff --git a/src/options.h b/src/options.h index 2a94f39c..3b2d62b7 100644 --- a/src/options.h +++ b/src/options.h @@ -37,6 +37,7 @@ struct _ConfOptions gboolean show_star_rating; gboolean show_guidelines; gboolean draw_rectangle; + gboolean show_predefined_keyword_tree; /* various */ gboolean tree_descend_subdirs; diff --git a/src/preferences.c b/src/preferences.c index 2dca52bc..4fd9666c 100644 --- a/src/preferences.c +++ b/src/preferences.c @@ -417,6 +417,8 @@ static void config_window_apply(void) options->info_comment.height = c_options->info_comment.height; options->info_rating.height = c_options->info_rating.height; + options->show_predefined_keyword_tree = c_options->show_predefined_keyword_tree; + options->marks_save = c_options->marks_save; options->with_rename = c_options->with_rename; options->collections_on_top = c_options->collections_on_top; @@ -1887,6 +1889,11 @@ static void config_tab_general(GtkWidget *notebook) 1, 9999, 1, options->info_rating.height, &c_options->info_rating.height); + group = pref_group_new(vbox, FALSE, _("Show predefined keyword tree"), GTK_ORIENTATION_VERTICAL); + + pref_checkbox_new_int(group, _("Show predefined keyword tree (NOTE! Geeqie must be restarted for change to take effect)"), + options->show_predefined_keyword_tree, &c_options->show_predefined_keyword_tree); + group = pref_group_new(vbox, FALSE, _("On-line help search engine"), GTK_ORIENTATION_VERTICAL); help_search_engine_entry = gtk_entry_new(); diff --git a/src/rcfile.c b/src/rcfile.c index 714b3629..c6314e8f 100644 --- a/src/rcfile.c +++ b/src/rcfile.c @@ -308,6 +308,7 @@ static void write_global_attributes(GString *outstr, gint indent) WRITE_NL(); WRITE_BOOL(*options, show_icon_names); WRITE_NL(); WRITE_BOOL(*options, show_star_rating); WRITE_NL(); WRITE_BOOL(*options, show_guidelines); + WRITE_NL(); WRITE_BOOL(*options, show_predefined_keyword_tree); WRITE_SEPARATOR(); WRITE_NL(); WRITE_BOOL(*options, tree_descend_subdirs); @@ -647,6 +648,7 @@ static gboolean load_global_params(const gchar **attribute_names, const gchar ** if (READ_BOOL(*options, show_icon_names)) continue; if (READ_BOOL(*options, show_star_rating)) continue; if (READ_BOOL(*options, show_guidelines)) continue; + if (READ_BOOL(*options, show_predefined_keyword_tree)) continue; if (READ_BOOL(*options, tree_descend_subdirs)) continue; if (READ_BOOL(*options, view_dir_list_single_click_enter)) continue; diff --git a/web/help/GuideOptionsGeneral.html b/web/help/GuideOptionsGeneral.html index da994b7f..c31fedfa 100644 --- a/web/help/GuideOptionsGeneral.html +++ b/web/help/GuideOptionsGeneral.html @@ -475,7 +475,10 @@ dd.answer div.label { float: left; } 11.1.5. Info Sidebar component heights
  • -11.1.6. On-line help search +11.1.6. Show predefined keyword tree +
  • +
  • +11.1.7. On-line help search
  • @@ -669,7 +672,15 @@ dd.answer div.label { float: left; }
    -

    11.1.6. On-line help search

    +

    11.1.6. Show predefined keyword tree

    +

    Deselecting this option will hide the list of predefined keywords on the right-hand side of the keywords pane of the info sidebar.

    +
    +

    Geeqie must be restarted for the change to take effect.

    +
    +
    +
    +
    +

    11.1.7. On-line help search

    An internet search engine may be used to search the help files on Geeqie's website. The string used to conduct the search is defined here. In most cases it will be in one of two formats:

    diff --git a/web/help/GuideOptionsKeywords.html b/web/help/GuideOptionsKeywords.html new file mode 100644 index 00000000..36631d23 --- /dev/null +++ b/web/help/GuideOptionsKeywords.html @@ -0,0 +1,490 @@ + + + + +Keywords + + + + + + + + +
    +

    Keywords

    + +

    This section describes the keywords list used for autocompletion.

    +

    +
    +
    +

    11.7.1. Keyword Search

    +

    +

    Pressing the Search button will open a dialog which permits a recursive search to be made for keywords already attached to images. The result of the search is automatically appended to the existing list.

    +
    +
    +

    11.7.2. Keyword List

    +

    +

    + The list shows all keywords currently used for autocompletion. Text may be copy-pasted into the list or deleted from the list. +

    + When the list is saved, duplicates will autmatically be removed and the list sorted into alphabetical order. +

    +
    +
    + + + -- 2.20.1