[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
gEDA-cvs: gaf.git: branch: master updated (1.5.0-20080706-42-g6802a78)
The branch, master has been updated
via 6802a78d5a19069919e4524530b91c34c1d099fe (commit)
from b02d9540d1bc0cdcfd5935f84bf8ee2f52dde2bd (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
=========
Summary
=========
gschem/src/x_compselect.c | 39 +++++++++++++++++++++++++++++++++++++++
1 files changed, 39 insertions(+), 0 deletions(-)
=================
Commit Messages
=================
commit 6802a78d5a19069919e4524530b91c34c1d099fe
Author: Peter Clifton <pcjc2@xxxxxxxxx>
Date: Sun Jul 27 02:22:22 2008 +0100
gschem: Activating component selector rows expands / contracts groups
Observation of a user working with gschem showed that opening the groups
of components from varous libraries was not particularly discoverable to
a user not familiar with GTK. The user was noticed to be double-clicking
the library sub-groups, rather than identifying the expander arrow.
Fix this usibility issue by making double click, and other row-activation
methods expand / contract the library groups. Keyboard navigation
(where space / return activate given rows) is also easier now.
:100644 100644 0151e94... f7ff80b... M gschem/src/x_compselect.c
=========
Changes
=========
commit 6802a78d5a19069919e4524530b91c34c1d099fe
Author: Peter Clifton <pcjc2@xxxxxxxxx>
Date: Sun Jul 27 02:22:22 2008 +0100
gschem: Activating component selector rows expands / contracts groups
Observation of a user working with gschem showed that opening the groups
of components from varous libraries was not particularly discoverable to
a user not familiar with GTK. The user was noticed to be double-clicking
the library sub-groups, rather than identifying the expander arrow.
Fix this usibility issue by making double click, and other row-activation
methods expand / contract the library groups. Keyboard navigation
(where space / return activate given rows) is also easier now.
diff --git a/gschem/src/x_compselect.c b/gschem/src/x_compselect.c
index 0151e94..f7ff80b 100644
--- a/gschem/src/x_compselect.c
+++ b/gschem/src/x_compselect.c
@@ -437,6 +437,39 @@ lib_model_filter_visible_func (GtkTreeModel *model,
return ret;
}
+
+/*! \brief Handles activation (e.g. double-clicking) of a component row
+ * \par Function Description
+ * Component row activated handler:
+ * As a convenince to the user, expand / contract any node with children.
+ *
+ * \param [in] tree_view The component treeview.
+ * \param [in] path The GtkTreePath to the activated row.
+ * \param [in] column The GtkTreeViewColumn in which the activation occurred.
+ * \param [in] user_data The component selection dialog.
+ */
+static void
+tree_row_activated (GtkTreeView *tree_view,
+ GtkTreePath *path,
+ GtkTreeViewColumn *column,
+ gpointer user_data)
+{
+ GtkTreeModel *model;
+ GtkTreeIter iter;
+
+ model = gtk_tree_view_get_model (tree_view);
+ gtk_tree_model_get_iter (model, &iter, path);
+
+ if (!gtk_tree_model_iter_has_child (model, &iter))
+ return;
+
+ if (gtk_tree_view_row_expanded (tree_view, path))
+ gtk_tree_view_collapse_row (tree_view, path);
+ else
+ gtk_tree_view_expand_row (tree_view, path, FALSE);
+}
+
+
/*! \brief Handles changes in the treeview selection.
* \par Function Description
* This is the callback function that is called every time the user
@@ -866,6 +899,12 @@ create_lib_treeview (Compselect *compselect)
"rules-hint", TRUE,
"headers-visible", FALSE,
NULL));
+
+ g_signal_connect (libtreeview,
+ "row-activated",
+ G_CALLBACK (tree_row_activated),
+ compselect);
+
/* connect callback to selection */
selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (libtreeview));
gtk_tree_selection_set_mode (selection, GTK_SELECTION_SINGLE);
_______________________________________________
geda-cvs mailing list
geda-cvs@xxxxxxxxxxxxxx
http://www.seul.org/cgi-bin/mailman/listinfo/geda-cvs