[grisbi-cvs] [SCM] grisbi branch, master, updated. upstream_version_0_9_4-12-g14b9069

Rémi Cardona nobody at users.sourceforge.net
Tue Sep 20 22:52:39 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  14b9069c51e1f1d6dab52c329ed1185907404a03 (commit)
       via  7d45bbefe4fc60dc43842ef1596a5996bf0a40d6 (commit)
       via  fdf9b40ddd900e520bd34ffcf5ff4932c3282a78 (commit)
       via  980b472acfaa685e08f0b4f4ee8c48c25b3e3277 (commit)
      from  8ee9e790263785e05a63af8036bf4e2e0500043e (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 14b9069c51e1f1d6dab52c329ed1185907404a03
Author: Rémi Cardona <remi at gentoo.org>
Date:   Tue Sep 13 11:20:26 2011 +0200

    Simplify gsb_gui_navigation_get_current_account()
    
    The two gtk_tree_model_get() calls can be merged into one.

commit 7d45bbefe4fc60dc43842ef1596a5996bf0a40d6
Author: Rémi Cardona <remi at gentoo.org>
Date:   Tue Sep 13 16:26:33 2011 +0200

    Move navigation model enum from navigation.h to navigation.c

commit fdf9b40ddd900e520bd34ffcf5ff4932c3282a78
Author: Rémi Cardona <remi at gentoo.org>
Date:   Tue Sep 13 08:42:02 2011 +0200

    Remove useless int-to-pointer and pointer-to-int conversions

commit 980b472acfaa685e08f0b4f4ee8c48c25b3e3277
Author: Rémi Cardona <remi at gentoo.org>
Date:   Tue Sep 20 22:36:02 2011 +0200

    configure: fix build with strict linkers
    
    Commit based on a patch sent by Vincent Untz for OpenSUSE.

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

Changes:
diff --git a/configure.in b/configure.in
index a2475f6..8ab64eb 100644
--- a/configure.in
+++ b/configure.in
@@ -54,10 +54,12 @@ dnl ================================================================
 dnl Main Grisbi libraries
 dnl ================================================================
 
+LT_LIB_M
+
 #PKG_CHECK_MODULES(GRISBI, [gtk+-2.0 >= 2.2.0 glib-2.0 >= 2.2 gmodule-2.0 >= 2.2 zlib])
 # Temporary hack until Mandriva ships zlib.pc
 PKG_CHECK_MODULES(GRISBI, [gtk+-2.0 >= 2.12.0 glib-2.0 >= 2.18.0 gmodule-2.0 >= 2.18.0])
-GRISBI_LIBS="$GRISBI_LIBS -lz"
+GRISBI_LIBS="$LIBM $GRISBI_LIBS -lz"
 AC_SUBST(GRISBI_LIBS)
 # </hack>
 
diff --git a/src/gsb_account.c b/src/gsb_account.c
index 178e3a2..f4cb49e 100644
--- a/src/gsb_account.c
+++ b/src/gsb_account.c
@@ -258,7 +258,7 @@ gboolean gsb_account_delete ( void )
     notebook_general = gsb_gui_get_general_notebook ( );
 	page_number = gtk_notebook_get_current_page ( GTK_NOTEBOOK ( notebook_general ) );
 
-	navigation_change_account ( GINT_TO_POINTER ( gsb_data_account_first_number () ));
+	navigation_change_account ( gsb_data_account_first_number () );
 
 	gtk_notebook_set_current_page ( GTK_NOTEBOOK ( notebook_general ), page_number );
     }
diff --git a/src/gsb_file.c b/src/gsb_file.c
index c5615d1..29061f0 100644
--- a/src/gsb_file.c
+++ b/src/gsb_file.c
@@ -193,7 +193,7 @@ void gsb_file_new_gui ( void )
                 0 );
     gtk_widget_show ( tree_view_widget );
 
-    navigation_change_account ( GINT_TO_POINTER ( gsb_gui_navigation_get_current_account () ) );
+    navigation_change_account ( gsb_gui_navigation_get_current_account () );
 
     /* Display accounts in menus */
     gsb_menu_update_accounts_in_menus ();
diff --git a/src/metatree.c b/src/metatree.c
index c89bd8f..2f44ffb 100644
--- a/src/metatree.c
+++ b/src/metatree.c
@@ -1183,7 +1183,7 @@ gboolean division_activated ( GtkTreeView * treeview, GtkTreePath * path,
             mise_a_jour_affichage_r ( TRUE );
 	    }
 
-	    navigation_change_account ( GINT_TO_POINTER ( account_number ) );
+	    navigation_change_account ( account_number );
 	    gsb_account_property_fill_page ();
 	    gsb_gui_notebook_change_page ( GSB_ACCOUNT_PAGE );
 	    gsb_gui_navigation_set_selection ( GSB_ACCOUNT_PAGE,
diff --git a/src/navigation.c b/src/navigation.c
index 8d50222..5fbe5ef 100644
--- a/src/navigation.c
+++ b/src/navigation.c
@@ -146,6 +146,20 @@ extern gint mise_a_jour_liste_comptes_accueil;
 /*END_EXTERN*/
 
 
+/** Holds data for the navigation tree.  */
+enum navigation_cols {
+    NAVIGATION_PIX,
+    NAVIGATION_PIX_VISIBLE,
+    NAVIGATION_TEXT,
+    NAVIGATION_FONT,
+    NAVIGATION_PAGE,
+    NAVIGATION_ACCOUNT,
+    NAVIGATION_REPORT,
+    NAVIGATION_SENSITIVE,
+    NAVIGATION_ORDRE,        /* ordre des pages dans le modèle */
+    NAVIGATION_TOTAL,
+};
+
 /** Navigation tree view. */
 static GtkWidget *navigation_tree_view = NULL;
 
@@ -395,6 +409,7 @@ gint gsb_gui_navigation_get_current_account ( void )
     GtkTreeSelection *selection;
     GtkTreeIter iter;
     gint page;
+    gint account_number;
 
     if ( !navigation_tree_view )
 	return -1;
@@ -407,15 +422,12 @@ gint gsb_gui_navigation_get_current_account ( void )
     gtk_tree_model_get ( GTK_TREE_MODEL (navigation_model),
 			 &iter,
 			 NAVIGATION_PAGE, &page,
+			 NAVIGATION_ACCOUNT, &account_number,
 			 -1);
     
     if ( page == GSB_ACCOUNT_PAGE )
-    {
-	gint account_number;
-	gtk_tree_model_get (GTK_TREE_MODEL(navigation_model), &iter, NAVIGATION_ACCOUNT, &account_number, -1);
-
 	return account_number;
-    }
+
     return -1;
 }
 
@@ -919,13 +931,11 @@ void gsb_gui_navigation_add_account ( gint account_number,
  * 
  * \return FALSE
  * */
-gboolean navigation_change_account ( gint *no_account )
+gboolean navigation_change_account ( gint new_account )
 {
-    gint new_account;
     gint current_account;
     gchar *tmp_menu_path;
 
-    new_account = GPOINTER_TO_INT ( no_account );
     devel_debug_int (new_account);
 
     if ( new_account < 0 )
@@ -1144,7 +1154,7 @@ gboolean gsb_gui_navigation_select_line ( GtkTreeSelection *selection,
 	    /* what to be done if switch to that page */
 	    if (account_number >= 0 )
 	    {
-            navigation_change_account ( GINT_TO_POINTER (account_number) );
+            navigation_change_account ( account_number );
             gsb_account_property_fill_page ();
             clear_suffix = FALSE;
             if ( gsb_data_archive_store_account_have_transactions_visibles ( account_number ) )
diff --git a/src/navigation.h b/src/navigation.h
index 57cb335..4a181d6 100644
--- a/src/navigation.h
+++ b/src/navigation.h
@@ -3,21 +3,6 @@
 
 #include <gtk/gtk.h>
 
-/** Holds data for the navigation tree.  */
-enum navigation_cols { 
-    NAVIGATION_PIX,
-    NAVIGATION_PIX_VISIBLE,
-    NAVIGATION_TEXT,
-    NAVIGATION_FONT,
-    NAVIGATION_PAGE,
-    NAVIGATION_ACCOUNT,
-    NAVIGATION_REPORT,
-    NAVIGATION_SENSITIVE,
-    NAVIGATION_ORDRE,        /* ordre des pages dans le modèle */
-    NAVIGATION_TOTAL,
-};
-
-
 /** \struct describe a page
  * */
 typedef struct
@@ -60,7 +45,7 @@ void gsb_gui_navigation_update_home_page ( void );
 void gsb_gui_navigation_update_report ( gint report_number ) ;
 void gsb_navigation_update_account_label ( gint account_number );
 void gsb_navigation_update_statement_label ( gint account_number );
-gboolean navigation_change_account ( gint *no_account );
+gboolean navigation_change_account ( gint new_account );
 gboolean navigation_drag_data_received ( GtkTreeDragDest *drag_dest,
                         GtkTreePath *dest_path,
                         GtkSelectionData *selection_data );


hooks/post-receive
-- 
grisbi


More information about the cvs mailing list