<link linkend="GuideOptionsMetadata" endterm="titleGuideOptionsMetadata" />\r
.\r
</para>\r
+ <para>\r
+ If the right-click menu item\r
+ <guimenu>Revert</guimenu>\r
+ is executed at any time after a\r
+ <guimenu>Show all</guimenu>\r
+ or\r
+ <guimenu>Collapse all</guimenu>\r
+ , the keyword layout will be restored to the state prior to the\r
+ <guimenu>Show all</guimenu>\r
+ or\r
+ <guimenu>Collapse all</guimenu>\r
+ .\r
+ <para />\r
+ If the right-click menu item\r
+ <guimenu>Revert</guimenu>\r
+ is executed at any time before a\r
+ <guimenu>Show all</guimenu>\r
+ or\r
+ <guimenu>Collapse all</guimenu>\r
+ , the keyword layout will be restored to the state existing at start-up.\r
+ </para>\r
+ <note>\r
+ <para>\r
+ The selections in the sub-menu\r
+ <guimenu>On any change</guimenu>\r
+ will affect the operation of the\r
+ <guimenu>Revert</guimenu>\r
+ option.\r
+ </para>\r
+ </note>\r
<para />\r
</section>\r
<section id="Listpanes-ExifFileinfoCopyrightLocationandGPS">\r
FileData *fd;
gchar *key;
gint height;
+
+ GList *expanded_rows;
};
typedef struct _ConfDialogData ConfDialogData;
GtkTreeModel *keyword_tree;
+ string_list_free(pkd->expanded_rows);
+ pkd->expanded_rows = NULL;
+ gtk_tree_view_map_expanded_rows(GTK_TREE_VIEW(pkd->keyword_treeview),
+ (bar_keyword_tree_get_expanded_cb), &pkd->expanded_rows);
+
pkd->hide_unchecked = FALSE;
model = gtk_tree_view_get_model(GTK_TREE_VIEW(pkd->keyword_treeview));
bar_keyword_tree_sync(pkd);
}
+static void bar_pane_keywords_revert_cb(GtkWidget *menu_widget, gpointer data)
+{
+ PaneKeywordsData *pkd = data;
+ GList *work;
+ GtkTreePath *tree_path;
+ gchar *path;
+
+ gtk_tree_view_collapse_all(GTK_TREE_VIEW(pkd->keyword_treeview));
+
+ work = pkd->expanded_rows;
+ while (work)
+ {
+ path = work->data;
+ tree_path = gtk_tree_path_new_from_string(path);
+ gtk_tree_view_expand_to_path(GTK_TREE_VIEW(pkd->keyword_treeview), tree_path);
+ work = work->next;
+ gtk_tree_path_free(tree_path);
+ }
+
+ bar_keyword_tree_sync(pkd);
+}
+
static void bar_pane_keywords_expand_checked_cb(GtkWidget *menu_widget, gpointer data)
{
PaneKeywordsData *pkd = data;
gtk_tree_model_foreach(model, bar_keyword_tree_expand_if_set_cb, pkd);
}
+static void bar_pane_keywords_collapse_all_cb(GtkWidget *menu_widget, gpointer data)
+{
+ PaneKeywordsData *pkd = data;
+
+ string_list_free(pkd->expanded_rows);
+ pkd->expanded_rows = NULL;
+ gtk_tree_view_map_expanded_rows(GTK_TREE_VIEW(pkd->keyword_treeview),
+ (bar_keyword_tree_get_expanded_cb), &pkd->expanded_rows);
+
+ gtk_tree_view_collapse_all(GTK_TREE_VIEW(pkd->keyword_treeview));
+
+ bar_keyword_tree_sync(pkd);
+}
+
+static void bar_pane_keywords_revert_hidden_cb(GtkWidget *menu_widget, gpointer data)
+{
+ PaneKeywordsData *pkd = data;
+ GtkTreeModel *model;
+ GtkTreeModel *keyword_tree;
+
+ model = gtk_tree_view_get_model(GTK_TREE_VIEW(pkd->keyword_treeview));
+ keyword_tree = gtk_tree_model_filter_get_model(GTK_TREE_MODEL_FILTER(model));
+
+ keyword_revert_hidden_in(GTK_TREE_STORE(keyword_tree), model);
+
+ bar_keyword_tree_sync(pkd);
+}
+
static void bar_pane_keywords_collapse_unchecked_cb(GtkWidget *menu_widget, gpointer data)
{
PaneKeywordsData *pkd = data;
menu_item_add(menu, _("Expand checked"), G_CALLBACK(bar_pane_keywords_expand_checked_cb), pkd);
menu_item_add(menu, _("Collapse unchecked"), G_CALLBACK(bar_pane_keywords_collapse_unchecked_cb), pkd);
menu_item_add(menu, _("Hide unchecked"), G_CALLBACK(bar_pane_keywords_hide_unchecked_cb), pkd);
+ menu_item_add(menu, _("Revert all hidden"), G_CALLBACK(bar_pane_keywords_revert_hidden_cb), pkd);
+ menu_item_add_divider(menu);
menu_item_add(menu, _("Show all"), G_CALLBACK(bar_pane_keywords_show_all_cb), pkd);
+ menu_item_add(menu, _("Collapse all"), G_CALLBACK(bar_pane_keywords_collapse_all_cb), pkd);
+ menu_item_add(menu, _("Revert"), G_CALLBACK(bar_pane_keywords_revert_cb), pkd);
+ menu_item_add_divider(menu);
submenu = gtk_menu_new();
item = menu_item_add(menu, _("On any change"), NULL, NULL);
{
PaneKeywordsData *pkd = data;
- if (pkd->click_tpath) gtk_tree_path_free(pkd->click_tpath);
+ string_list_free(pkd->expanded_rows);
+ if (pkd->click_tpath) gtk_tree_path_free(pkd->click_tpath);
if (pkd->idle_id) g_source_remove(pkd->idle_id);
file_data_unregister_notify_func(bar_pane_keywords_notify_cb, pkd);
pkd->key = g_strdup(key);
pkd->expand_checked = TRUE;
+ pkd->expanded_rows = NULL;
hbox = gtk_hbox_new(FALSE, PREF_PAD_GAP);
{
tree_path = gtk_tree_path_new_from_string(path);
gtk_tree_view_expand_to_path(GTK_TREE_VIEW(pkd->keyword_treeview), tree_path);
+ gtk_tree_path_free(tree_path);
+ pkd->expanded_rows = g_list_append(pkd->expanded_rows, g_strdup(path));
continue;
}
log_printf("unknown attribute %s = %s\n", option, value);