[grisbi-cvs] [SCM] grisbi branch, master, updated. upstream_version_0_9_1-21-g3651453
Philippe Delorme
nobody at users.sourceforge.net
Sun May 1 19:40:35 CEST 2011
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "grisbi".
The branch, master has been updated
via 3651453fd595878b919ef085d16ed578eec342d5 (commit)
from 95c642263de65e61c92b2dbaee22912b6c688e4c (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.
- Log -----------------------------------------------------------------
commit 3651453fd595878b919ef085d16ed578eec342d5
Author: Philippe Delorme <philippedelorme at users.sourceforge.net>
Date: Sun May 1 19:37:47 2011 +0200
Left panel: added mapping for left/right keys to collapse/expand subtrees
-----------------------------------------------------------------------
Changes:
diff --git a/src/navigation.c b/src/navigation.c
index 1c15686..04c5f39 100644
--- a/src/navigation.c
+++ b/src/navigation.c
@@ -1457,6 +1457,7 @@ gboolean gsb_gui_navigation_check_key_press ( GtkWidget *tree_view,
{
gint page;
GtkTreeIter iter;
+ GtkTreePath *path;
if (! gtk_tree_selection_get_selected ( gtk_tree_view_get_selection (GTK_TREE_VIEW (tree_view)),
NULL,
@@ -1464,11 +1465,17 @@ gboolean gsb_gui_navigation_check_key_press ( GtkWidget *tree_view,
return FALSE;
gtk_tree_model_get (model, &iter, NAVIGATION_PAGE, &page, -1 );
+ path = gtk_tree_model_get_path ( GTK_TREE_MODEL ( model ), &iter );
switch ( page )
{
case GSB_HOME_PAGE:
- /* nothing to do here for now */
+ case GSB_REPORTS_PAGE:
+ /* expand or collapse subtree */
+ if (ev -> keyval == GDK_Right)
+ gtk_tree_view_expand_row ( GTK_TREE_VIEW ( tree_view ), path, FALSE );
+ if (ev -> keyval == GDK_Left)
+ gtk_tree_view_collapse_row ( GTK_TREE_VIEW ( tree_view ), path );
break;
case GSB_ACCOUNT_PAGE:
@@ -1494,12 +1501,10 @@ gboolean gsb_gui_navigation_check_key_press ( GtkWidget *tree_view,
if (ev -> keyval == GDK_Right)
gtk_widget_grab_focus (gsb_scheduler_list_get_tree_view ());
break;
-
- case GSB_REPORTS_PAGE:
- /* nothing to do here for now */
- break;
}
+ gtk_tree_path_free ( path );
+
return FALSE;
}
hooks/post-receive
--
grisbi
More information about the cvs
mailing list