mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-03-16 12:03:03 -05:00
Collapse tree view branches deeper than level 2, bringing the GTK2
tree code into line with the GTK1. [originally from svn r7165]
This commit is contained in:
parent
65f9735b95
commit
6d81ee9cc0
@ -38,13 +38,6 @@ Items from Colin's original mail:
|
|||||||
- Uses of GtkList should be replaced with the non-deprecated
|
- Uses of GtkList should be replaced with the non-deprecated
|
||||||
GtkTreeView.
|
GtkTreeView.
|
||||||
|
|
||||||
Other items:
|
|
||||||
|
|
||||||
- Since Colin's patch was originally prepared I committed r7117
|
|
||||||
(fold up treeview branches at depth 2 or greater), and this is
|
|
||||||
not currently replicated in the GTK2 version of the treeview
|
|
||||||
code. It should be.
|
|
||||||
|
|
||||||
At point of merge:
|
At point of merge:
|
||||||
|
|
||||||
- Mention Colin in the website's licence page.
|
- Mention Colin in the website's licence page.
|
||||||
|
@ -2362,6 +2362,22 @@ int do_config_box(const char *title, Config *cfg, int midsession,
|
|||||||
TREESTORE_PARAMS, nselparams,
|
TREESTORE_PARAMS, nselparams,
|
||||||
-1);
|
-1);
|
||||||
treeiterlevels[j] = treeiter;
|
treeiterlevels[j] = treeiter;
|
||||||
|
|
||||||
|
treeindices[j]++;
|
||||||
|
treeindices[j+1] = -1;
|
||||||
|
|
||||||
|
if (j > 0) {
|
||||||
|
GtkTreePath *path;
|
||||||
|
|
||||||
|
path = gtk_tree_model_get_path(GTK_TREE_MODEL(treestore),
|
||||||
|
&treeiterlevels[j-1]);
|
||||||
|
if (j < 2)
|
||||||
|
gtk_tree_view_expand_row(GTK_TREE_VIEW(tree), path,
|
||||||
|
FALSE);
|
||||||
|
else
|
||||||
|
gtk_tree_view_collapse_row(GTK_TREE_VIEW(tree), path);
|
||||||
|
gtk_tree_path_free(path);
|
||||||
|
}
|
||||||
#else
|
#else
|
||||||
treeitem = gtk_tree_item_new_with_label(c);
|
treeitem = gtk_tree_item_new_with_label(c);
|
||||||
if (j > 0) {
|
if (j > 0) {
|
||||||
@ -2407,7 +2423,6 @@ int do_config_box(const char *title, Config *cfg, int midsession,
|
|||||||
}
|
}
|
||||||
|
|
||||||
#if GTK_CHECK_VERSION(2,0,0)
|
#if GTK_CHECK_VERSION(2,0,0)
|
||||||
gtk_tree_view_expand_all(GTK_TREE_VIEW(tree));
|
|
||||||
g_signal_connect(G_OBJECT(treeselection), "changed",
|
g_signal_connect(G_OBJECT(treeselection), "changed",
|
||||||
G_CALLBACK(treeselection_changed), selparams);
|
G_CALLBACK(treeselection_changed), selparams);
|
||||||
#else
|
#else
|
||||||
|
Loading…
x
Reference in New Issue
Block a user