[grisbi-cvs] [SCM] grisbi branch, master, updated. upstream_version_0_9_3-17-g796b36b

Philippe Delorme nobody at users.sourceforge.net
Sun Aug 28 19:56:32 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  796b36bfa5b9e50d86de24bbed23620315a14adc (commit)
      from  ceadf4ddfd45154b87866634cfc9254b063ec42a (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 796b36bfa5b9e50d86de24bbed23620315a14adc
Author: Philippe Delorme <philippedelorme at users.sourceforge.net>
Date:   Sun Aug 28 19:54:57 2011 +0200

    Add mouse scrolling support on the navigation tree

-----------------------------------------------------------------------

Changes:
diff --git a/src/navigation.c b/src/navigation.c
index d262f56..8d50222 100644
--- a/src/navigation.c
+++ b/src/navigation.c
@@ -83,6 +83,8 @@ static gboolean gsb_gui_navigation_button_press ( GtkWidget *tree_view,
 static gboolean gsb_gui_navigation_check_key_press ( GtkWidget *tree_view,
                         GdkEventKey *ev,
                         GtkTreeModel *model );
+static gboolean gsb_gui_navigation_check_scroll ( GtkWidget *tree_view,
+                        GdkEventScroll *ev );
 static void gsb_gui_navigation_clear_pages_list ( void );
 static void gsb_gui_navigation_context_menu ( GtkWidget *tree_view,
                         GtkTreePath *path );
@@ -262,7 +264,12 @@ GtkWidget *gsb_gui_navigation_create_navigation_pane ( void )
     g_signal_connect ( navigation_tree_view,
                         "key-press-event",
                         G_CALLBACK ( gsb_gui_navigation_check_key_press ),
-                        navigation_model  );
+                        navigation_model );
+
+    g_signal_connect ( navigation_tree_view,
+                        "scroll-event",
+                        G_CALLBACK ( gsb_gui_navigation_check_scroll ),
+                        NULL );
 
     g_signal_connect_after ( gtk_tree_view_get_selection ( GTK_TREE_VIEW ( navigation_tree_view ) ),
                         "changed",
@@ -1529,6 +1536,36 @@ gboolean gsb_gui_navigation_check_key_press ( GtkWidget *tree_view,
 
 
 
+/** 
+ * Check mouse scrolling on the navigation tree view.
+ *
+ * \param tree_view the navigation tree_view
+ * \param ev the scroll event
+ *
+ * \return FALSE : the signal continue / TRUE : the signal is stopped here
+ * */
+gboolean gsb_gui_navigation_check_scroll ( GtkWidget *tree_view,
+                                           GdkEventScroll *ev )
+{
+    switch ( ev -> direction )
+    {
+        case GDK_SCROLL_UP:
+            gsb_gui_navigation_select_prev ();
+            break;
+
+        case GDK_SCROLL_DOWN:
+            gsb_gui_navigation_select_next ();
+            break;
+
+        default:
+            break;
+    }
+
+    return FALSE;
+}
+
+
+
 /**
  * Fill the drag & drop structure with the path of selected column.
  * This is an interface function called from GTK, much like a callback.


hooks/post-receive
-- 
grisbi


More information about the cvs mailing list