[grisbi-cvs] [SCM] grisbi branch, master, updated. upstream_version_0_9_5-117-g40679f1

Pierre Biava nobody at users.sourceforge.net
Sun Aug 26 18:46:54 CEST 2012


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  40679f1f5a23c0a47fb5fa4d892c1680c77b78fc (commit)
       via  f9b842dcf291bb37c9856f7479672e09a25ff0c8 (commit)
       via  6f24570bd70a0c9e4996798d7f58535b563f77f8 (commit)
       via  c027803ffa6e93a87fd66af682414fc2cbbb1262 (commit)
       via  e42003a7d450c1d169b78acb6974e0392d97466e (commit)
      from  910541bb755550dd69d4467a89bf2524d0a7a0ab (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 40679f1f5a23c0a47fb5fa4d892c1680c77b78fc
Author: pbiava <pierre.biava at nerim.net>
Date:   Sun Aug 26 18:38:06 2012 +0200

    adding various functions for the scheduled transactions

commit f9b842dcf291bb37c9856f7479672e09a25ff0c8
Author: pbiava <pierre.biava at nerim.net>
Date:   Sun Aug 26 17:58:24 2012 +0200

    Fixes various bugs management of menu and rename functions

commit 6f24570bd70a0c9e4996798d7f58535b563f77f8
Author: pbiava <pierre.biava at nerim.net>
Date:   Sun Aug 26 12:28:57 2012 +0200

    add gsb_data_mix_edit_current_transaction () function

commit c027803ffa6e93a87fd66af682414fc2cbbb1262
Author: pbiava <pierre.biava at nerim.net>
Date:   Sun Aug 26 12:20:28 2012 +0200

    Use the icon "grisbi.svg" for Grisbi

commit e42003a7d450c1d169b78acb6974e0392d97466e
Author: pbiava <pierre.biava at nerim.net>
Date:   Tue Aug 21 07:33:47 2012 +0200

    gsb_data_mix.c: Code formatting

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

Changes:
diff --git a/pixmaps/Makefile.am b/pixmaps/Makefile.am
index 8526d82..5ded7b3 100644
--- a/pixmaps/Makefile.am
+++ b/pixmaps/Makefile.am
@@ -69,8 +69,8 @@ grisbi_pixmaps_DATA = \
 	warnings.png \
 	delete.png
 
-grisbi_iconsdir = $(datadir)/icons/hicolor/48x48/apps
-grisbi_icons_DATA = grisbi.png
+grisbi_iconsdir = $(datadir)/icons/hicolor/scalable/apps
+grisbi_icons_DATA = grisbi.svg
 
 EXTRA_DIST = $(grisbi_pixmaps_DATA) $(grisbi_icons_DATA)
 
diff --git a/src/fenetre_principale.c b/src/fenetre_principale.c
index 684470b..1dcc7f3 100644
--- a/src/fenetre_principale.c
+++ b/src/fenetre_principale.c
@@ -334,7 +334,7 @@ gboolean gsb_gui_on_account_switch_page ( GtkNotebook *notebook,
 
     if ( page_number != GSB_TRANSACTIONS_PAGE )
     {
-        menus_view_sensitifs ( FALSE );
+        gsb_menu_set_menus_view_account_sensitive ( FALSE );
         gsb_gui_sensitive_menu_item ( "/menubar/EditMenu/NewTransaction", FALSE );
     }
 
@@ -342,7 +342,7 @@ gboolean gsb_gui_on_account_switch_page ( GtkNotebook *notebook,
     {
     case GSB_TRANSACTIONS_PAGE:
         gsb_form_set_expander_visible ( TRUE, TRUE );
-        menus_view_sensitifs ( TRUE );
+        gsb_menu_set_menus_view_account_sensitive ( TRUE );
         gsb_gui_sensitive_menu_item ( "/menubar/EditMenu/NewTransaction", TRUE );
         break;
     case GSB_ESTIMATE_PAGE:
diff --git a/src/gsb_data_mix.c b/src/gsb_data_mix.c
index 82c7841..b80761a 100644
--- a/src/gsb_data_mix.c
+++ b/src/gsb_data_mix.c
@@ -1,8 +1,8 @@
 /* ************************************************************************** */
 /*                                                                            */
-/*     Copyright (C)	2000-2007 Cédric Auger (cedric at grisbi.org)	      */
-/*			2003-2007 Benjamin Drieu (bdrieu at april.org)	      */
-/* 			http://www.grisbi.org				      */
+/*     Copyright (C)    2000-2007 Cédric Auger (cedric at grisbi.org)            */
+/*          2003-2007 Benjamin Drieu (bdrieu at april.org)                       */
+/*          http://www.grisbi.org                                             */
 /*                                                                            */
 /*  This program is free software; you can redistribute it and/or modify      */
 /*  it under the terms of the GNU General Public License as published by      */
@@ -26,7 +26,7 @@
  * and scheduled transactions in mixed calls
  * example :
  * if a function wants to set the account number :
- * for a transaction : gsb_data_mix_set_account_number
+ * for a transaction : gsb_data_transaction_set_account_number
  * for a scheduled : gsb_data_scheduled_set_account_number
  *
  * but if the function can work with transactions and scheduled (usually a
@@ -57,9 +57,13 @@
 
 /*START_INCLUDE*/
 #include "gsb_data_mix.h"
+#include "fenetre_principale.h"
 #include "gsb_data_scheduled.h"
 #include "gsb_data_transaction.h"
 #include "gsb_real.h"
+#include "gsb_scheduler_list.h"
+#include "gsb_transactions_list.h"
+#include "navigation.h"
 /*END_INCLUDE*/
 
 /*START_STATIC*/
@@ -71,418 +75,496 @@
 
 
 gint gsb_data_mix_new_transaction ( gint account_number,
-				    gboolean is_transaction )
+                        gboolean is_transaction )
 {
-    if (is_transaction)
-	return (gsb_data_transaction_new_transaction (account_number));
+    if ( is_transaction )
+        return ( gsb_data_transaction_new_transaction ( account_number ) );
     else
     {
-	/* need to set the account number after because doesn't get in param */
-	gint number;
+        /* need to set the account number after because doesn't get in param */
+        gint number;
 
-	number = gsb_data_scheduled_new_scheduled ();
-	gsb_data_scheduled_set_account_number ( number, account_number);
-	return (number);
+        number = gsb_data_scheduled_new_scheduled ();
+        gsb_data_scheduled_set_account_number ( number, account_number );
+        return ( number );
     }
 }
 
 
 gint gsb_data_mix_get_account_number ( gint transaction_number,
-				       gboolean is_transaction )
+                        gboolean is_transaction )
 {
-    if (is_transaction)
-	return (gsb_data_transaction_get_account_number ( transaction_number));
+    if ( is_transaction )
+        return ( gsb_data_transaction_get_account_number ( transaction_number ) );
     else
-	return (gsb_data_scheduled_get_account_number ( transaction_number));
+        return (gsb_data_scheduled_get_account_number ( transaction_number ) );
 }
 
 const GDate *gsb_data_mix_get_date ( gint transaction_number,
-				     gboolean is_transaction )
+                        gboolean is_transaction )
 {
-    if (is_transaction)
-	return (gsb_data_transaction_get_date ( transaction_number));
+    if ( is_transaction )
+        return ( gsb_data_transaction_get_date ( transaction_number ) );
     else
-	return (gsb_data_scheduled_get_date ( transaction_number));
+        return ( gsb_data_scheduled_get_date ( transaction_number ) );
 }
 
 gboolean gsb_data_mix_set_date ( gint transaction_number,
-				 GDate *date,
-				 gboolean is_transaction )
+                        GDate *date,
+                        gboolean is_transaction )
 {
-    if (is_transaction)
-	return (gsb_data_transaction_set_date ( transaction_number,
-						date));
+    if ( is_transaction )
+        return ( gsb_data_transaction_set_date ( transaction_number, date ) );
     else
-	return (gsb_data_scheduled_set_date ( transaction_number,
-					      date));
+        return ( gsb_data_scheduled_set_date ( transaction_number, date ) );
 }
 
 gboolean gsb_data_mix_set_value_date ( gint transaction_number,
-				       GDate *date,
-				       gboolean is_transaction )
+                        GDate *date,
+                        gboolean is_transaction )
 {
-    if (is_transaction)
-	return (gsb_data_transaction_set_value_date ( transaction_number,
-						      date));
+    if ( is_transaction )
+        return (gsb_data_transaction_set_value_date ( transaction_number, date ) );
+
     return FALSE;
 }
 
 gsb_real gsb_data_mix_get_amount ( gint transaction_number,
-				   gboolean is_transaction )
+                        gboolean is_transaction )
 {
-    if (is_transaction)
-	return (gsb_data_transaction_get_amount ( transaction_number));
+    if ( is_transaction )
+        return ( gsb_data_transaction_get_amount ( transaction_number ) );
     else
-	return (gsb_data_scheduled_get_amount ( transaction_number));
+        return ( gsb_data_scheduled_get_amount ( transaction_number ) );
 }
 
 gboolean gsb_data_mix_set_amount ( gint transaction_number,
-				   gsb_real amount,
-				   gboolean is_transaction )
+                        gsb_real amount,
+                        gboolean is_transaction )
 {
-    if (is_transaction)
-	return (gsb_data_transaction_set_amount ( transaction_number,
-						  amount));
+    if ( is_transaction )
+        return ( gsb_data_transaction_set_amount ( transaction_number, amount ) );
     else
-	return (gsb_data_scheduled_set_amount ( transaction_number,
-						amount));
+        return ( gsb_data_scheduled_set_amount ( transaction_number, amount ) );
 }
 
 gint gsb_data_mix_get_currency_number ( gint transaction_number,
-					gboolean is_transaction )
+                        gboolean is_transaction )
 {
-    if (is_transaction)
-	return (gsb_data_transaction_get_currency_number ( transaction_number));
+    if ( is_transaction )
+        return ( gsb_data_transaction_get_currency_number ( transaction_number ) );
     else
-	return (gsb_data_scheduled_get_currency_number ( transaction_number));
+        return ( gsb_data_scheduled_get_currency_number ( transaction_number ) );
 }
 
 gboolean gsb_data_mix_set_currency_number ( gint transaction_number,
-					    gint no_currency,
-					    gboolean is_transaction )
+                        gint no_currency,
+                        gboolean is_transaction )
 {
-    if (is_transaction)
-	return (gsb_data_transaction_set_currency_number ( transaction_number,
-							   no_currency));
+    if ( is_transaction )
+        return ( gsb_data_transaction_set_currency_number ( transaction_number, no_currency ) );
     else
-	return (gsb_data_scheduled_set_currency_number ( transaction_number,
-							 no_currency));
+        return (gsb_data_scheduled_set_currency_number ( transaction_number, no_currency ) );
 }
 
 
 gint gsb_data_mix_get_party_number ( gint transaction_number,
-				     gboolean is_transaction )
+                        gboolean is_transaction )
 {
-    if (is_transaction)
-	return (gsb_data_transaction_get_party_number ( transaction_number));
+    if ( is_transaction )
+        return ( gsb_data_transaction_get_party_number ( transaction_number ) );
     else
-	return (gsb_data_scheduled_get_party_number ( transaction_number));
+        return ( gsb_data_scheduled_get_party_number ( transaction_number ) );
 }
 
 gboolean gsb_data_mix_set_party_number ( gint transaction_number,
-					 gint no_party,
-					 gboolean is_transaction )
+                        gint no_party,
+                        gboolean is_transaction )
 {
-    if (is_transaction)
-	return (gsb_data_transaction_set_party_number ( transaction_number,
-							no_party));
+    if ( is_transaction )
+        return ( gsb_data_transaction_set_party_number ( transaction_number, no_party ) );
     else
-	return (gsb_data_scheduled_set_party_number ( transaction_number,
-						      no_party));
+        return ( gsb_data_scheduled_set_party_number ( transaction_number, no_party ) );
 }
 
 gint gsb_data_mix_get_category_number ( gint transaction_number,
-					gboolean is_transaction )
+                        gboolean is_transaction )
 {
-    if (is_transaction)
-	return (gsb_data_transaction_get_category_number ( transaction_number));
+    if ( is_transaction )
+        return ( gsb_data_transaction_get_category_number ( transaction_number ) );
     else
-	return (gsb_data_scheduled_get_category_number ( transaction_number));
+        return ( gsb_data_scheduled_get_category_number ( transaction_number ) );
 }
 
 gboolean gsb_data_mix_set_category_number ( gint transaction_number,
-					    gint no_category,
-					    gboolean is_transaction )
+                        gint no_category,
+                        gboolean is_transaction )
 {
-    if (is_transaction)
-	return (gsb_data_transaction_set_category_number ( transaction_number,
-							   no_category));
+    if ( is_transaction )
+        return ( gsb_data_transaction_set_category_number ( transaction_number, no_category ) );
     else
-	return (gsb_data_scheduled_set_category_number ( transaction_number,
-							 no_category));
+        return ( gsb_data_scheduled_set_category_number ( transaction_number, no_category ) );
 }
 
 gint gsb_data_mix_get_sub_category_number ( gint transaction_number,
-					    gboolean is_transaction )
+                        gboolean is_transaction )
 {
-    if (is_transaction)
-	return (gsb_data_transaction_get_sub_category_number ( transaction_number));
+    if ( is_transaction )
+        return ( gsb_data_transaction_get_sub_category_number ( transaction_number ) );
     else
-	return (gsb_data_scheduled_get_sub_category_number ( transaction_number));
+        return (gsb_data_scheduled_get_sub_category_number ( transaction_number ) );
 }
 
 gboolean gsb_data_mix_set_sub_category_number ( gint transaction_number,
-						gint no_sub_category,
-						gboolean is_transaction )
+                        gint no_sub_category,
+                        gboolean is_transaction )
 {
-    if (is_transaction)
-	return (gsb_data_transaction_set_sub_category_number ( transaction_number,
-							       no_sub_category));
+    if ( is_transaction )
+        return (gsb_data_transaction_set_sub_category_number ( transaction_number,
+                        no_sub_category ) );
     else
-	return (gsb_data_scheduled_set_sub_category_number ( transaction_number,
-							     no_sub_category));
+        return (gsb_data_scheduled_set_sub_category_number ( transaction_number,
+                        no_sub_category ) );
 }
 
 gint gsb_data_mix_get_split_of_transaction ( gint transaction_number,
-						 gboolean is_transaction )
+                        gboolean is_transaction )
 {
-    if (is_transaction)
-	return (gsb_data_transaction_get_split_of_transaction ( transaction_number));
+    if ( is_transaction )
+        return ( gsb_data_transaction_get_split_of_transaction ( transaction_number ) );
     else
-	return (gsb_data_scheduled_get_split_of_scheduled ( transaction_number));
+        return ( gsb_data_scheduled_get_split_of_scheduled ( transaction_number ) );
 }
 
 gboolean gsb_data_mix_set_split_of_transaction ( gint transaction_number,
-						     gint is_split,
-						     gboolean is_transaction )
+                        gint is_split,
+                        gboolean is_transaction )
 {
-    if (is_transaction)
-	return (gsb_data_transaction_set_split_of_transaction ( transaction_number,
-								    is_split));
+    if ( is_transaction )
+        return ( gsb_data_transaction_set_split_of_transaction ( transaction_number, is_split ) );
     else
-	return (gsb_data_scheduled_set_split_of_scheduled ( transaction_number,
-								is_split));
+        return ( gsb_data_scheduled_set_split_of_scheduled ( transaction_number, is_split ) );
 }
 
 const gchar *gsb_data_mix_get_notes ( gint transaction_number,
-				      gboolean is_transaction )
+                        gboolean is_transaction )
 {
-    if (is_transaction)
-	return (gsb_data_transaction_get_notes ( transaction_number));
+    if ( is_transaction )
+        return ( gsb_data_transaction_get_notes ( transaction_number ) );
     else
-	return (gsb_data_scheduled_get_notes ( transaction_number));
+        return ( gsb_data_scheduled_get_notes ( transaction_number ) );
 }
 
 gboolean gsb_data_mix_set_notes ( gint transaction_number,
-				  const gchar *notes,
-				  gboolean is_transaction )
+                        const gchar *notes,
+                        gboolean is_transaction )
 {
-    if (is_transaction)
-	return (gsb_data_transaction_set_notes ( transaction_number,
-						 notes));
+    if ( is_transaction )
+        return ( gsb_data_transaction_set_notes ( transaction_number, notes ) );
     else
-	return (gsb_data_scheduled_set_notes ( transaction_number,
-					       notes));
+        return ( gsb_data_scheduled_set_notes ( transaction_number, notes ) );
 }
 
 gint gsb_data_mix_get_method_of_payment_number ( gint transaction_number,
-						 gboolean is_transaction )
+                        gboolean is_transaction )
 {
-    if (is_transaction)
-	return (gsb_data_transaction_get_method_of_payment_number ( transaction_number));
+    if ( is_transaction )
+        return ( gsb_data_transaction_get_method_of_payment_number ( transaction_number ) );
     else
-	return (gsb_data_scheduled_get_method_of_payment_number ( transaction_number));
+        return ( gsb_data_scheduled_get_method_of_payment_number ( transaction_number ) );
 }
 
 gboolean gsb_data_mix_set_method_of_payment_number ( gint transaction_number,
-						     gint number,
-						     gboolean is_transaction )
+                        int number,
+                        gboolean is_transaction )
 {
-    if (is_transaction)
-	return (gsb_data_transaction_set_method_of_payment_number ( transaction_number,
-								    number));
+    if ( is_transaction )
+        return ( gsb_data_transaction_set_method_of_payment_number ( transaction_number, number ) );
     else
-	return (gsb_data_scheduled_set_method_of_payment_number ( transaction_number,
-								  number));
+        return (gsb_data_scheduled_set_method_of_payment_number ( transaction_number, number ) );
 }
 
 gboolean gsb_data_mix_set_method_of_payment_content ( gint transaction_number,
-						      const gchar *method_of_payment_content,
-						      gboolean is_transaction )
+                        const gchar *method_of_payment_content,
+                        gboolean is_transaction )
 {
-    if (is_transaction)
-	return (gsb_data_transaction_set_method_of_payment_content ( transaction_number,
-								     method_of_payment_content));
+    if ( is_transaction )
+        return ( gsb_data_transaction_set_method_of_payment_content ( transaction_number,
+                        method_of_payment_content ) );
     else
-	return (gsb_data_scheduled_set_method_of_payment_content ( transaction_number,
-								   method_of_payment_content));
+        return ( gsb_data_scheduled_set_method_of_payment_content ( transaction_number,
+                        method_of_payment_content ) );
 }
 
 gint gsb_data_mix_get_automatic_transaction ( gint transaction_number,
-					      gboolean is_transaction )
+                        gboolean is_transaction )
 {
-    if (is_transaction)
-	return (gsb_data_transaction_get_automatic_transaction ( transaction_number));
+    if ( is_transaction )
+        return ( gsb_data_transaction_get_automatic_transaction ( transaction_number ) );
+
     return 0;
 }
 
 gint gsb_data_mix_get_financial_year_number ( gint transaction_number,
-					      gboolean is_transaction )
+                        gboolean is_transaction )
 {
-    if (is_transaction)
-	return (gsb_data_transaction_get_financial_year_number ( transaction_number));
+    if ( is_transaction )
+        return ( gsb_data_transaction_get_financial_year_number ( transaction_number ) );
     else
-	return (gsb_data_scheduled_get_financial_year_number ( transaction_number));
+        return ( gsb_data_scheduled_get_financial_year_number ( transaction_number ) );
 }
 
 gboolean gsb_data_mix_set_financial_year_number ( gint transaction_number,
-						  gint financial_year_number,
-						  gboolean is_transaction )
+                        gint financial_year_number,
+                        gboolean is_transaction )
 {
-    if (is_transaction)
-	return (gsb_data_transaction_set_financial_year_number ( transaction_number,
-								 financial_year_number));
+    if ( is_transaction )
+        return (gsb_data_transaction_set_financial_year_number ( transaction_number,
+                        financial_year_number ) );
     else
-	return (gsb_data_scheduled_set_financial_year_number ( transaction_number,
-							       financial_year_number));
+        return (gsb_data_scheduled_set_financial_year_number ( transaction_number,
+                        financial_year_number ) );
 }
 
 gint gsb_data_mix_get_budgetary_number ( gint transaction_number,
-					 gboolean is_transaction )
+                        gboolean is_transaction )
 {
-    if (is_transaction)
-	return (gsb_data_transaction_get_budgetary_number ( transaction_number));
+    if ( is_transaction )
+        return ( gsb_data_transaction_get_budgetary_number ( transaction_number ) );
     else
-	return (gsb_data_scheduled_get_budgetary_number ( transaction_number));
+        return ( gsb_data_scheduled_get_budgetary_number ( transaction_number ) );
 }
 
 gboolean gsb_data_mix_set_budgetary_number ( gint transaction_number,
-					     gint budgetary_number,
-					     gboolean is_transaction )
+                        gint budgetary_number,
+                        gboolean is_transaction )
 {
-    if (is_transaction)
-	return (gsb_data_transaction_set_budgetary_number ( transaction_number,
-							    budgetary_number));
+    if ( is_transaction )
+        return ( gsb_data_transaction_set_budgetary_number ( transaction_number,
+                        budgetary_number ) );
     else
-	return (gsb_data_scheduled_set_budgetary_number ( transaction_number,
-							  budgetary_number));
+        return ( gsb_data_scheduled_set_budgetary_number ( transaction_number,
+                        budgetary_number ) );
 }
 
 gint gsb_data_mix_get_sub_budgetary_number ( gint transaction_number,
-					     gboolean is_transaction )
+                        gboolean is_transaction )
 {
-    if (is_transaction)
-	return (gsb_data_transaction_get_sub_budgetary_number ( transaction_number));
+    if ( is_transaction )
+        return ( gsb_data_transaction_get_sub_budgetary_number ( transaction_number ) );
     else
-	return (gsb_data_scheduled_get_sub_budgetary_number ( transaction_number));
+        return ( gsb_data_scheduled_get_sub_budgetary_number ( transaction_number ) );
 }
 
 gboolean gsb_data_mix_set_sub_budgetary_number ( gint transaction_number,
-						 gint sub_budgetary_number,
-						 gboolean is_transaction )
+                        gint sub_budgetary_number,
+                        gboolean is_transaction )
 {
-    if (is_transaction)
-	return (gsb_data_transaction_set_sub_budgetary_number ( transaction_number,
-								sub_budgetary_number));
+    if ( is_transaction )
+        return (gsb_data_transaction_set_sub_budgetary_number ( transaction_number,
+                        sub_budgetary_number ) );
     else
-	return (gsb_data_scheduled_set_sub_budgetary_number ( transaction_number,
-							      sub_budgetary_number));
+        return (gsb_data_scheduled_set_sub_budgetary_number ( transaction_number,
+                        sub_budgetary_number ) );
 }
 
 const gchar *gsb_data_mix_get_voucher ( gint transaction_number,
-					gboolean is_transaction )
+                        gboolean is_transaction )
 {
-    if (is_transaction)
-	return (gsb_data_transaction_get_voucher ( transaction_number));
+    if ( is_transaction )
+        return (gsb_data_transaction_get_voucher ( transaction_number ) );
+
     return NULL;
 }
 
 gboolean gsb_data_mix_set_voucher ( gint transaction_number,
-				    const gchar *voucher,
-				    gboolean is_transaction )
+                        const gchar *voucher,
+                        gboolean is_transaction )
 {
-    if (is_transaction)
-	return (gsb_data_transaction_set_voucher ( transaction_number,
-						   voucher));
+    if ( is_transaction )
+        return (gsb_data_transaction_set_voucher ( transaction_number, voucher ) );
+
     return FALSE;
 }
 
 const gchar *gsb_data_mix_get_bank_references ( gint transaction_number,
-						gboolean is_transaction )
+                        gboolean is_transaction )
 {
-    if (is_transaction)
-	return (gsb_data_transaction_get_bank_references ( transaction_number));
+    if ( is_transaction )
+        return ( gsb_data_transaction_get_bank_references ( transaction_number ) );
+
     return NULL;
 }
 
 gboolean gsb_data_mix_set_bank_references ( gint transaction_number,
-					    const gchar *bank_references,
-					    gboolean is_transaction )
+                        const gchar *bank_references,
+                        gboolean is_transaction )
 {
-    if (is_transaction)
-	return (gsb_data_transaction_set_bank_references ( transaction_number,
-							   bank_references));
+    if ( is_transaction )
+        return ( gsb_data_transaction_set_bank_references ( transaction_number,
+                        bank_references ) );
     return FALSE;
 }
 
 gint gsb_data_mix_get_transaction_number_transfer ( gint transaction_number,
-						    gboolean is_transaction )
+                        gboolean is_transaction )
 {
-    if (is_transaction)
-	return (gsb_data_transaction_get_contra_transaction_number ( transaction_number));
+    if ( is_transaction )
+        return ( gsb_data_transaction_get_contra_transaction_number ( transaction_number ) );
     else
-	/* if we come here for a scheduled transaction, usually it's to know if it's a transfer or not
-	 * because it's like that we test for normal transactions */
-	return gsb_data_scheduled_is_transfer (transaction_number);
+        /* if we come here for a scheduled transaction, usually it's to know if it's a transfer or not
+         * because it's like that we test for normal transactions */
+        return ( gsb_data_scheduled_is_transfer ( transaction_number ) );
 }
 
 gboolean gsb_data_mix_set_transaction_number_transfer ( gint transaction_number,
-							gint transaction_number_transfer,
-							gboolean is_transaction )
+                        gint transaction_number_transfer,
+                        gboolean is_transaction )
 {
-    if (is_transaction)
-	return (gsb_data_transaction_set_contra_transaction_number ( transaction_number,
-								       transaction_number_transfer));
+    if ( is_transaction )
+        return ( gsb_data_transaction_set_contra_transaction_number ( transaction_number,
+                        transaction_number_transfer ) );
     return FALSE;
 }
 
 gint gsb_data_mix_get_account_number_transfer ( gint transaction_number,
-						gboolean is_transaction )
+                        gboolean is_transaction )
 {
-    if (is_transaction)
-	return (gsb_data_transaction_get_contra_transaction_account ( transaction_number));
+    if ( is_transaction )
+        return ( gsb_data_transaction_get_contra_transaction_account ( transaction_number ) );
     else
-	return (gsb_data_scheduled_get_account_number_transfer ( transaction_number));
+        return ( gsb_data_scheduled_get_account_number_transfer ( transaction_number ) );
 }
 
 
 gint gsb_data_mix_get_mother_transaction_number ( gint transaction_number,
-						  gboolean is_transaction )
+                        gboolean is_transaction )
 {
-    if (is_transaction)
-	return (gsb_data_transaction_get_mother_transaction_number ( transaction_number));
+    if ( is_transaction )
+        return ( gsb_data_transaction_get_mother_transaction_number ( transaction_number ) );
     else
-	return (gsb_data_scheduled_get_mother_scheduled_number ( transaction_number));
+        return ( gsb_data_scheduled_get_mother_scheduled_number ( transaction_number ) );
 }
 
 gboolean gsb_data_mix_set_mother_transaction_number ( gint transaction_number,
-						      gint mother_transaction_number,
-						      gboolean is_transaction )
+                        gint mother_transaction_number,
+                        gboolean is_transaction )
 {
-    if (is_transaction)
-	return (gsb_data_transaction_set_mother_transaction_number ( transaction_number,
-								     mother_transaction_number));
+    if ( is_transaction )
+        return ( gsb_data_transaction_set_mother_transaction_number ( transaction_number,
+                        mother_transaction_number ) );
     else
-	return (gsb_data_scheduled_set_mother_scheduled_number ( transaction_number,
-								   mother_transaction_number));
+        return ( gsb_data_scheduled_set_mother_scheduled_number ( transaction_number,
+                        mother_transaction_number ) );
 }
 
 gint gsb_data_mix_get_white_line ( gint transaction_number,
-				   gboolean is_transaction )
+                        gboolean is_transaction )
 {
-    if (is_transaction)
-	return (gsb_data_transaction_get_white_line (transaction_number));
+    if ( is_transaction )
+        return ( gsb_data_transaction_get_white_line ( transaction_number ) );
     else
-	return (gsb_data_scheduled_get_white_line (transaction_number));
+        return ( gsb_data_scheduled_get_white_line ( transaction_number ) );
 }
 
 GSList *gsb_data_mix_get_children ( gint transaction_number,
-				    gboolean return_number,
-				    gboolean is_transaction )
+                        gboolean return_number,
+                        gboolean is_transaction )
 {
-    if (is_transaction)
-	return (gsb_data_transaction_get_children (transaction_number, return_number));
+    if ( is_transaction )
+        return ( gsb_data_transaction_get_children ( transaction_number, return_number ) );
     else
-	return (gsb_data_scheduled_get_children (transaction_number, return_number));
+        return ( gsb_data_scheduled_get_children ( transaction_number, return_number ) );
+}
+
+
+/**
+ * Edit l'opération courante, teste le type de page pour choisir.
+ *
+ * \param
+ *
+ * \return
+ * */
+void gsb_data_mix_edit_current_transaction ( void )
+{
+    gint current_page;
+
+    current_page = gsb_gui_navigation_get_current_page ( );
+
+    if ( current_page == GSB_ACCOUNT_PAGE )
+        gsb_transactions_list_edit_current_transaction ();
+    else if ( current_page == GSB_SCHEDULER_PAGE )
+        gsb_scheduler_list_edit_transaction ( 0 );
+}
+
+
+/**
+ * Delete l'opération courante, teste le type de page pour choisir.
+ *
+ * \param
+ *
+ * \return
+ * */
+void gsb_data_mix_delete_current_transaction ( void )
+{
+    gint current_page;
+
+    current_page = gsb_gui_navigation_get_current_page ( );
+
+    if ( current_page == GSB_ACCOUNT_PAGE )
+        remove_transaction ();
+    else if ( current_page == GSB_SCHEDULER_PAGE )
+        gsb_scheduler_list_delete_scheduled_transaction ( 0, TRUE );
 }
 
+
+/**
+ * Clone l'opération courante, teste le type de page pour choisir.
+ *
+ * \param
+ *
+ * \return
+ * */
+void gsb_data_mix_clone_current_transaction ( void )
+{
+    gint current_page;
+
+    current_page = gsb_gui_navigation_get_current_page ( );
+
+    if ( current_page == GSB_ACCOUNT_PAGE )
+        clone_selected_transaction ( NULL, NULL );
+    else if ( current_page == GSB_SCHEDULER_PAGE )
+        gsb_scheduler_list_clone_selected_scheduled ( NULL, NULL );
+}
+
+
+/**
+ * selectionne une nouvelle transaction, teste le type de page pour choisir.
+ *
+ * \param
+ *
+ * \return
+ * */
+void gsb_data_mix_new_transaction_by_menu ( void )
+{
+    gint current_page;
+
+    current_page = gsb_gui_navigation_get_current_page ( );
+
+    if ( current_page == GSB_ACCOUNT_PAGE )
+        new_transaction ();
+    else if ( current_page == GSB_SCHEDULER_PAGE )
+        gsb_scheduler_list_edit_transaction ( -1 );
+}
+
+
+/**
+ *
+ *
+ * \param
+ *
+ * \return
+ * */
+/* Local Variables: */
+/* c-basic-offset: 4 */
+/* End: */
diff --git a/src/gsb_data_mix.h b/src/gsb_data_mix.h
index 6ac0cc6..7698f81 100644
--- a/src/gsb_data_mix.h
+++ b/src/gsb_data_mix.h
@@ -7,104 +7,108 @@
 /* END_INCLUDE_H */
 
 /* START_DECLARATION */
+void gsb_data_mix_clone_current_transaction ( void );
+void gsb_data_mix_delete_current_transaction ( void );
+void gsb_data_mix_edit_current_transaction ( void );
 gint gsb_data_mix_get_account_number ( gint transaction_number,
-				       gboolean is_transaction );
+                        gboolean is_transaction );
 gint gsb_data_mix_get_account_number_transfer ( gint transaction_number,
-						gboolean is_transaction );
+                        gboolean is_transaction );
 gsb_real gsb_data_mix_get_amount ( gint transaction_number,
-				   gboolean is_transaction );
+                        gboolean is_transaction );
 gint gsb_data_mix_get_automatic_transaction ( gint transaction_number,
-					      gboolean is_transaction );
+                        gboolean is_transaction );
 const gchar *gsb_data_mix_get_bank_references ( gint transaction_number,
-						gboolean is_transaction );
+                        gboolean is_transaction );
 gint gsb_data_mix_get_budgetary_number ( gint transaction_number,
-					 gboolean is_transaction );
+                        gboolean is_transaction );
 gint gsb_data_mix_get_category_number ( gint transaction_number,
-					gboolean is_transaction );
+                        gboolean is_transaction );
 GSList *gsb_data_mix_get_children ( gint transaction_number,
-				    gboolean return_number,
-				    gboolean is_transaction );
+                        gboolean return_number,
+                        gboolean is_transaction );
 gint gsb_data_mix_get_currency_number ( gint transaction_number,
-					gboolean is_transaction );
+                        gboolean is_transaction );
 const GDate *gsb_data_mix_get_date ( gint transaction_number,
-				     gboolean is_transaction );
+                        gboolean is_transaction );
 gint gsb_data_mix_get_financial_year_number ( gint transaction_number,
-					      gboolean is_transaction );
+                        gboolean is_transaction );
 gint gsb_data_mix_get_method_of_payment_number ( gint transaction_number,
-						 gboolean is_transaction );
+                        gboolean is_transaction );
 gint gsb_data_mix_get_mother_transaction_number ( gint transaction_number,
-						  gboolean is_transaction );
+                        gboolean is_transaction );
 const gchar *gsb_data_mix_get_notes ( gint transaction_number,
-				      gboolean is_transaction );
+                        gboolean is_transaction );
 gint gsb_data_mix_get_party_number ( gint transaction_number,
-				     gboolean is_transaction );
+                        gboolean is_transaction );
 gint gsb_data_mix_get_split_of_transaction ( gint transaction_number,
-						 gboolean is_transaction );
+                        gboolean is_transaction );
 gint gsb_data_mix_get_sub_budgetary_number ( gint transaction_number,
-					     gboolean is_transaction );
+                        gboolean is_transaction );
 gint gsb_data_mix_get_sub_category_number ( gint transaction_number,
-					    gboolean is_transaction );
+                        gboolean is_transaction );
 gint gsb_data_mix_get_transaction_number_transfer ( gint transaction_number,
-						    gboolean is_transaction );
+                        gboolean is_transaction );
 const gchar *gsb_data_mix_get_voucher ( gint transaction_number,
-					gboolean is_transaction );
+                        gboolean is_transaction );
 gint gsb_data_mix_get_white_line ( gint transaction_number,
-				   gboolean is_transaction );
+                        gboolean is_transaction );
 gint gsb_data_mix_new_transaction ( gint account_number,
-				    gboolean is_transaction );
+                        gboolean is_transaction );
+void gsb_data_mix_new_transaction_by_menu ( void );
 gboolean gsb_data_mix_set_amount ( gint transaction_number,
-				   gsb_real amount,
-				   gboolean is_transaction );
+                        gsb_real amount,
+                        gboolean is_transaction );
 gboolean gsb_data_mix_set_bank_references ( gint transaction_number,
-					    const gchar *bank_references,
-					    gboolean is_transaction );
+                        const gchar *bank_references,
+                        gboolean is_transaction );
 gboolean gsb_data_mix_set_budgetary_number ( gint transaction_number,
-					     gint budgetary_number,
-					     gboolean is_transaction );
+                        gint budgetary_number,
+                        gboolean is_transaction );
 gboolean gsb_data_mix_set_category_number ( gint transaction_number,
-					    gint no_category,
-					    gboolean is_transaction );
+                        gint no_category,
+                        gboolean is_transaction );
 gboolean gsb_data_mix_set_currency_number ( gint transaction_number,
-					    gint no_currency,
-					    gboolean is_transaction );
+                        gint no_currency,
+                        gboolean is_transaction );
 gboolean gsb_data_mix_set_date ( gint transaction_number,
-				 GDate *date,
-				 gboolean is_transaction );
+                        GDate *date,
+                        gboolean is_transaction );
 gboolean gsb_data_mix_set_financial_year_number ( gint transaction_number,
-						  gint financial_year_number,
-						  gboolean is_transaction );
+                        gint financial_year_number,
+                        gboolean is_transaction );
 gboolean gsb_data_mix_set_method_of_payment_content ( gint transaction_number,
-						      const gchar *method_of_payment_content,
-						      gboolean is_transaction );
+                        const gchar *method_of_payment_content,
+                        gboolean is_transaction );
 gboolean gsb_data_mix_set_method_of_payment_number ( gint transaction_number,
-						     gint number,
-						     gboolean is_transaction );
+                        gint number,
+                        gboolean is_transaction );
 gboolean gsb_data_mix_set_mother_transaction_number ( gint transaction_number,
-						      gint mother_transaction_number,
-						      gboolean is_transaction );
+                        gint mother_transaction_number,
+                        gboolean is_transaction );
 gboolean gsb_data_mix_set_notes ( gint transaction_number,
-				  const gchar *notes,
-				  gboolean is_transaction );
+                        const gchar *notes,
+                        gboolean is_transaction );
 gboolean gsb_data_mix_set_party_number ( gint transaction_number,
-					 gint no_party,
-					 gboolean is_transaction );
+                        gint no_party,
+                        gboolean is_transaction );
 gboolean gsb_data_mix_set_split_of_transaction ( gint transaction_number,
-						     gint is_split,
-						     gboolean is_transaction );
+                        gint is_split,
+                        gboolean is_transaction );
 gboolean gsb_data_mix_set_sub_budgetary_number ( gint transaction_number,
-						 gint sub_budgetary_number,
-						 gboolean is_transaction );
+                        gint sub_budgetary_number,
+                        gboolean is_transaction );
 gboolean gsb_data_mix_set_sub_category_number ( gint transaction_number,
-						gint no_sub_category,
-						gboolean is_transaction );
+                        gint no_sub_category,
+                        gboolean is_transaction );
 gboolean gsb_data_mix_set_transaction_number_transfer ( gint transaction_number,
-							gint transaction_number_transfer,
-							gboolean is_transaction );
+                        gint transaction_number_transfer,
+                        gboolean is_transaction );
 gboolean gsb_data_mix_set_value_date ( gint transaction_number,
-				       GDate *date,
-				       gboolean is_transaction );
+                        GDate *date,
+                        gboolean is_transaction );
 gboolean gsb_data_mix_set_voucher ( gint transaction_number,
-				    const gchar *voucher,
-				    gboolean is_transaction );
+                        const gchar *voucher,
+                        gboolean is_transaction );
 /* END_DECLARATION */
 #endif
diff --git a/src/gsb_file.c b/src/gsb_file.c
index b81b080..a7ff1da 100644
--- a/src/gsb_file.c
+++ b/src/gsb_file.c
@@ -42,11 +42,10 @@
 
 /*START_INCLUDE*/
 #include "gsb_file.h"
-#include "menu.h"
-#include "utils.h"
-#include "fenetre_principale.h"
+#include "accueil.h"
+#include "affichage_liste.h"
 #include "dialog.h"
-#include "utils_file_selection.h"
+#include "fenetre_principale.h"
 #include "gsb_account_property.h"
 #include "gsb_assistant_account.h"
 #include "gsb_assistant_file.h"
@@ -56,19 +55,20 @@
 #include "gsb_file_load.h"
 #include "gsb_file_save.h"
 #include "gsb_file_util.h"
-#include "navigation.h"
-#include "accueil.h"
 #include "gsb_real.h"
 #include "gsb_status.h"
 #include "gsb_transactions_list.h"
-#include "traitement_variables.h"
 #include "main.h"
-#include "utils_str.h"
+#include "menu.h"
+#include "navigation.h"
 #include "parametres.h"
-#include "affichage_liste.h"
+#include "structures.h"
+#include "traitement_variables.h"
 #include "transaction_list.h"
+#include "utils.h"
+#include "utils_file_selection.h"
 #include "utils_files.h"
-#include "structures.h"
+#include "utils_str.h"
 #include "erreur.h"
 /*END_INCLUDE*/
 
@@ -166,7 +166,7 @@ void gsb_file_new_gui ( void )
     GtkWidget *notebook_general;
 
     /* dégrise les menus nécessaire */
-    menus_sensitifs ( TRUE );
+    gsb_menu_set_menus_with_file_sensitive ( TRUE );
 
     /*     récupère l'organisation des colonnes  */
     recuperation_noms_colonnes_et_tips ();
@@ -975,7 +975,8 @@ gboolean gsb_file_close ( void )
 
         gsb_main_set_grisbi_title ( -1 );
 
-	    menus_sensitifs ( FALSE );
+        /* unsensitive the necessaries menus */
+        gsb_menu_set_menus_with_file_sensitive ( FALSE );
 
         table_etat = NULL;
 
diff --git a/src/gsb_scheduler_list.c b/src/gsb_scheduler_list.c
index 4da0b6b..3a58e3f 100644
--- a/src/gsb_scheduler_list.c
+++ b/src/gsb_scheduler_list.c
@@ -56,6 +56,7 @@
 #include "gsb_real.h"
 #include "gsb_scheduler.h"
 #include "gsb_transactions_list.h"
+#include "menu.h"
 #include "mouse.h"
 #include "navigation.h"
 #include "structures.h"
@@ -71,8 +72,6 @@
 static GtkWidget *creation_barre_outils_echeancier ( void );
 static gboolean gsb_scheduler_list_button_press ( GtkWidget *tree_view,
                         GdkEventButton *ev );
-static gboolean gsb_scheduler_list_clone_selected_scheduled ( GtkWidget *menu_item,
-                        gint *scheduled_number );
 static void gsb_scheduler_list_create_list_columns ( GtkWidget *tree_view );
 static GtkTreeModel *gsb_scheduler_list_create_model ( void );
 static GtkWidget *gsb_scheduler_list_create_tree_view (void);
@@ -1727,13 +1726,13 @@ gboolean gsb_scheduler_list_selection_changed ( GtkTreeSelection *selection,
                         !gsb_data_scheduled_get_mother_scheduled_number (tmp_number));
 
     /* sensitive/unsensitive the button edit */
-
     gtk_widget_set_sensitive ( scheduler_button_edit, ( tmp_number > 0 ) );
 
     /* sensitive/unsensitive the button delete */
-
     gtk_widget_set_sensitive ( scheduler_button_delete, ( tmp_number > 0 ) );
 
+    gsb_menu_set_menus_select_scheduled_sensitive ( tmp_number > 0 );
+
     return FALSE;
 }
 
@@ -1865,10 +1864,9 @@ gboolean gsb_scheduler_list_edit_transaction ( gint scheduled_number )
     devel_debug_int (scheduled_number);
     if ( scheduled_number == 0 )
         gsb_form_fill_by_transaction ( gsb_scheduler_list_get_current_scheduled_number ( ), FALSE, TRUE );
-    else if ( scheduled_number < 0 )
-        gsb_form_fill_by_transaction ( scheduled_number, FALSE, FALSE );
     else
         gsb_form_fill_by_transaction ( scheduled_number, FALSE, TRUE );
+
     return FALSE;
 }
 
@@ -2375,7 +2373,11 @@ gboolean gsb_scheduler_list_clone_selected_scheduled ( GtkWidget *menu_item,
     gint new_scheduled_number;
     gint tmp_scheduled_number;
 
-    tmp_scheduled_number = GPOINTER_TO_INT ( scheduled_number );
+    if ( scheduled_number == NULL )
+        tmp_scheduled_number = gsb_scheduler_list_get_current_scheduled_number ( );
+    else
+        tmp_scheduled_number = GPOINTER_TO_INT ( scheduled_number );
+
     new_scheduled_number = gsb_data_scheduled_new_scheduled ( );
 
     gsb_data_scheduled_copy_scheduled ( tmp_scheduled_number, new_scheduled_number );
diff --git a/src/gsb_scheduler_list.h b/src/gsb_scheduler_list.h
index e8bf0e6..493ae36 100644
--- a/src/gsb_scheduler_list.h
+++ b/src/gsb_scheduler_list.h
@@ -63,6 +63,8 @@ gboolean gsb_scheduler_list_append_new_scheduled ( gint scheduled_number,
                         GDate *end_date );
 gboolean gsb_scheduler_list_change_scheduler_view ( enum scheduler_periodicity periodicity,
                         gpointer item );
+gboolean gsb_scheduler_list_clone_selected_scheduled ( GtkWidget *menu_item,
+                        gint *scheduled_number );
 GtkWidget *gsb_scheduler_list_create_list ( void );
 gboolean gsb_scheduler_list_delete_scheduled_transaction ( gint scheduled_number,
                         gboolean show_warning );
diff --git a/src/gsb_transactions_list.c b/src/gsb_transactions_list.c
index fb9a6cc..db17d29 100644
--- a/src/gsb_transactions_list.c
+++ b/src/gsb_transactions_list.c
@@ -1639,13 +1639,13 @@ void gsb_transactions_list_selection_changed ( gint new_selected_transaction )
     /* the white number has no account number, so we take the current account */
     if ( new_selected_transaction != -1 )
     {
-    account_number = gsb_data_transaction_get_account_number (new_selected_transaction);
-    gsb_menu_transaction_operations_set_sensitive ( TRUE );
+        account_number = gsb_data_transaction_get_account_number (new_selected_transaction);
+        gsb_menu_set_menus_select_transaction_sensitive ( TRUE );
     }
     else
     {
-    account_number = gsb_gui_navigation_get_current_account ();
-    gsb_menu_transaction_operations_set_sensitive ( FALSE );
+        account_number = gsb_gui_navigation_get_current_account ();
+        gsb_menu_set_menus_select_transaction_sensitive ( FALSE );
     }
 
     /* save the new current transaction */
diff --git a/src/main.c b/src/main.c
index a77f18e..653e84b 100644
--- a/src/main.c
+++ b/src/main.c
@@ -592,7 +592,7 @@ GtkWidget *gsb_grisbi_create_main_menu ( GtkWidget *vbox )
     menu_bar = init_menus ( vbox );
 
     /* unsensitive the necessaries menus */
-    menus_sensitifs ( FALSE );
+    gsb_menu_set_menus_with_file_sensitive ( FALSE );
 
     /* charge les raccourcis claviers */
     gtk_accel_map_load ( C_PATH_CONFIG_ACCELS ( ) );
diff --git a/src/menu.c b/src/menu.c
index 0d9ec0d..a90c1d4 100644
--- a/src/menu.c
+++ b/src/menu.c
@@ -42,6 +42,7 @@
 #include "gsb_assistant_archive.h"
 #include "gsb_assistant_archive_export.h"
 #include "gsb_data_account.h"
+#include "gsb_data_mix.h"
 #include "gsb_debug.h"
 #include "gsb_file.h"
 #include "gsb_form.h"
@@ -213,15 +214,15 @@ GtkWidget *init_menus ( GtkWidget *vbox )
         /* Editmenu */
         {"EditMenuAction", NULL, _("_Edit"), NULL, NULL, NULL },
         {"EditTransactionAction", GTK_STOCK_EDIT, _("_Edit transaction"), "", NULL,
-         G_CALLBACK ( gsb_transactions_list_edit_current_transaction ) },
+         G_CALLBACK ( gsb_data_mix_edit_current_transaction ) },
         {"NewTransactionAction", GTK_STOCK_NEW, _("_New transaction"), "", NULL,
-         G_CALLBACK ( new_transaction ) },
+         G_CALLBACK ( gsb_data_mix_new_transaction_by_menu ) },
         {"RemoveTransactionAction", GTK_STOCK_DELETE, _("_Remove transaction"), "", NULL,
-         G_CALLBACK ( remove_transaction ) },
+         G_CALLBACK ( gsb_data_mix_delete_current_transaction ) },
         {"TemplateTransactionAction", GTK_STOCK_COPY, _("Use selected transaction as a template"), "", NULL,
          G_CALLBACK ( gsb_transactions_list_clone_template ) },
         {"CloneTransactionAction", GTK_STOCK_COPY, _("_Clone transaction"), "", NULL,
-         G_CALLBACK ( clone_selected_transaction ) },
+         G_CALLBACK ( gsb_data_mix_clone_current_transaction ) },
         {"ConvertToScheduledAction", GTK_STOCK_CONVERT, _("Convert to _scheduled transaction"), NULL, NULL,
          G_CALLBACK ( schedule_selected_transaction ) },
         {"MoveToAnotherAccountAction", NULL, _("_Move transaction to another account"), NULL, NULL, NULL },
@@ -327,9 +328,7 @@ GtkWidget *init_menus ( GtkWidget *vbox )
     menubar = gtk_ui_manager_get_widget ( ui_manager, "/menubar" );
     gtk_box_pack_start ( GTK_BOX ( vbox ),  menubar, FALSE, TRUE, 0 );
 
-    gsb_gui_sensitive_menu_item ( "/menubar/EditMenu/NewTransaction", FALSE );
-    gsb_menu_transaction_operations_set_sensitive ( FALSE );
-
+    /* return */
     return menubar;
 }
 
@@ -803,14 +802,14 @@ gboolean gsb_menu_update_accounts_in_menus ( void )
  * 
  * \return		FALSE
  */
-gboolean gsb_menu_transaction_operations_set_sensitive ( gboolean sensitive )
+gboolean gsb_menu_set_menus_select_transaction_sensitive ( gboolean sensitive )
 {
     devel_debug ( sensitive ? "item sensitive" : "item unsensitive" );
 
+    gsb_gui_sensitive_menu_item ( "/menubar/EditMenu/EditTransaction", sensitive );
     gsb_gui_sensitive_menu_item ( "/menubar/EditMenu/RemoveTransaction", sensitive );
     gsb_gui_sensitive_menu_item ( "/menubar/EditMenu/TemplateTransaction", sensitive );
     gsb_gui_sensitive_menu_item ( "/menubar/EditMenu/CloneTransaction", sensitive );
-    gsb_gui_sensitive_menu_item ( "/menubar/EditMenu/EditTransaction", sensitive );
     gsb_gui_sensitive_menu_item ( "/menubar/EditMenu/ConvertToScheduled", sensitive );
     gsb_gui_sensitive_menu_item ( "/menubar/EditMenu/MoveToAnotherAccount", sensitive );
 
@@ -819,6 +818,26 @@ gboolean gsb_menu_transaction_operations_set_sensitive ( gboolean sensitive )
 
 
 /**
+ * Set sensitiveness of all menu items that work on the selected scheduled.
+
+ * \param sensitive	Sensitiveness (FALSE for unsensitive, TRUE for
+ *			sensitive).
+ *
+ * \return		FALSE
+ */
+gboolean gsb_menu_set_menus_select_scheduled_sensitive ( gboolean sensitive )
+{
+    devel_debug ( sensitive ? "item sensitive" : "item unsensitive" );
+
+    gsb_gui_sensitive_menu_item ( "/menubar/EditMenu/EditTransaction", sensitive );
+    gsb_gui_sensitive_menu_item ( "/menubar/EditMenu/RemoveTransaction", sensitive );
+    gsb_gui_sensitive_menu_item ( "/menubar/EditMenu/CloneTransaction", sensitive );
+
+    return FALSE;
+}
+
+
+/**
  *
  *
  *
@@ -873,6 +892,102 @@ gboolean gsb_menu_set_block_menu_cb ( gboolean etat )
 }
 
 
+/**
+ * Initialise la barre de menus en fonction de la présence ou non d'un fichier de comptes
+ *
+ * \param sensitif
+ *
+ * \return
+ * */
+void gsb_menu_set_menus_with_file_sensitive ( gboolean sensitive )
+{
+    gchar * items[] = {
+        "/menubar/FileMenu/Save",
+        "/menubar/FileMenu/SaveAs",
+        "/menubar/FileMenu/DebugFile",
+        "/menubar/FileMenu/Obfuscate",
+        "/menubar/FileMenu/DebugMode",
+        "/menubar/FileMenu/ExportFile",
+        "/menubar/FileMenu/CreateArchive",
+        "/menubar/FileMenu/ExportArchive",
+        "/menubar/FileMenu/Close",
+        "/menubar/EditMenu/NewTransaction",
+        "/menubar/EditMenu/RemoveTransaction",
+        "/menubar/EditMenu/TemplateTransaction",
+        "/menubar/EditMenu/CloneTransaction",
+        "/menubar/EditMenu/EditTransaction",
+        "/menubar/EditMenu/ConvertToScheduled",
+        "/menubar/EditMenu/MoveToAnotherAccount",
+        "/menubar/EditMenu/Preferences",
+        "/menubar/EditMenu/RemoveAccount",
+        "/menubar/EditMenu/NewAccount",
+        "/menubar/ViewMenu/ShowTransactionForm",
+        "/menubar/ViewMenu/ShowReconciled",
+        "/menubar/ViewMenu/ShowArchived",
+        "/menubar/ViewMenu/ShowClosed",
+        "/menubar/ViewMenu/ShowOneLine",
+        "/menubar/ViewMenu/ShowTwoLines",
+        "/menubar/ViewMenu/ShowThreeLines",
+        "/menubar/ViewMenu/ShowFourLines",
+        "/menubar/ViewMenu/InitwidthCol",
+        NULL
+    };
+    gchar ** tmp = items;
+
+    devel_debug_int (sensitive);
+
+    while ( *tmp )
+    {
+        gsb_gui_sensitive_menu_item ( *tmp, sensitive );
+        tmp++;
+    }
+
+    /* As this function may only be called when a new account is
+     * created and the like, it is unlikely that we want to sensitive
+     * transaction-related menus. */
+    gsb_gui_sensitive_menu_item ( "/menubar/EditMenu/NewTransaction", FALSE );
+    gsb_menu_set_menus_select_transaction_sensitive ( FALSE );
+}
+
+/**
+ * Initialise la barre de menus si un compte est sélectionné
+ *
+ * \param sensitif
+ *
+ * \return
+ * */
+void gsb_menu_set_menus_view_account_sensitive ( gboolean sensitive )
+{
+    gchar * items[] = {
+        "/menubar/ViewMenu/ShowTransactionForm",
+        "/menubar/ViewMenu/ShowReconciled",
+        "/menubar/ViewMenu/ShowArchived",
+        "/menubar/ViewMenu/ShowOneLine",
+        "/menubar/ViewMenu/ShowTwoLines",
+        "/menubar/ViewMenu/ShowThreeLines",
+        "/menubar/ViewMenu/ShowFourLines",
+        "/menubar/ViewMenu/InitwidthCol",
+        NULL
+    };
+    gchar **tmp = items;
+
+    devel_debug_int (sensitive);
+
+    while ( *tmp )
+    {
+        gsb_gui_sensitive_menu_item ( *tmp, sensitive );
+        tmp++;
+    }
+}
+
+
+/**
+ *
+ *
+ * \param
+ *
+ * \return
+ * */
 /* Local Variables: */
 /* c-basic-offset: 4 */
 /* End: */
diff --git a/src/menu.h b/src/menu.h
index 765bf75..56ad194 100644
--- a/src/menu.h
+++ b/src/menu.h
@@ -29,7 +29,10 @@ gboolean gsb_gui_toggle_show_archived ( void );
 gboolean gsb_gui_toggle_show_reconciled ( void );
 GtkUIManager *gsb_menu_get_ui_manager ( void );
 gboolean gsb_menu_set_block_menu_cb ( gboolean etat );
-gboolean gsb_menu_transaction_operations_set_sensitive ( gboolean sensitive );
+gboolean gsb_menu_set_menus_select_scheduled_sensitive ( gboolean sensitive );
+gboolean gsb_menu_set_menus_select_transaction_sensitive ( gboolean sensitive );
+void gsb_menu_set_menus_view_account_sensitive ( gboolean sensitive );
+void gsb_menu_set_menus_with_file_sensitive ( gboolean sensitive );
 gboolean gsb_menu_update_accounts_in_menus ( void );
 gboolean gsb_menu_update_view_menu ( gint account_number );
 GtkWidget *init_menus ( GtkWidget *vbox );
diff --git a/src/navigation.c b/src/navigation.c
index f4ec76c..121b231 100644
--- a/src/navigation.c
+++ b/src/navigation.c
@@ -980,9 +980,9 @@ gboolean navigation_change_account ( gint new_account )
 
     /* Sensitive menu items if something is selected. */
     if ( gsb_data_account_get_current_transaction_number ( new_account ) == -1 )
-        gsb_menu_transaction_operations_set_sensitive ( FALSE );
+        gsb_menu_set_menus_select_transaction_sensitive ( FALSE );
     else
-        gsb_menu_transaction_operations_set_sensitive ( TRUE );
+        gsb_menu_set_menus_select_transaction_sensitive ( TRUE );
 
     /* show or hide the rules button in toolbar */
     if ( gsb_data_import_rule_account_has_rule ( new_account ) )
@@ -1121,7 +1121,8 @@ gboolean gsb_gui_navigation_select_line ( GtkTreeSelection *selection,
     {
         gsb_gui_sensitive_menu_item ( "/menubar/EditMenu/NewTransaction", FALSE );
         gsb_gui_sensitive_menu_item ( "/menubar/EditMenu/RemoveAccount", FALSE );
-        menus_view_sensitifs ( FALSE );
+        gsb_menu_set_menus_view_account_sensitive ( FALSE );
+        gsb_menu_set_menus_select_transaction_sensitive ( FALSE );
     }
 
     if ( page_number != GSB_SCHEDULER_PAGE ) 
@@ -1146,7 +1147,7 @@ gboolean gsb_gui_navigation_select_line ( GtkTreeSelection *selection,
 	case GSB_ACCOUNT_PAGE:
 	    notice_debug ("Account page selected");
 
-        menus_view_sensitifs ( TRUE );
+        gsb_menu_set_menus_view_account_sensitive ( TRUE );
 	    gsb_gui_sensitive_menu_item ( "/menubar/EditMenu/RemoveAccount", TRUE );
 
 	    account_number = gsb_gui_navigation_get_current_account ();
@@ -1200,6 +1201,9 @@ gboolean gsb_gui_navigation_select_line ( GtkTreeSelection *selection,
 	    gsb_calendar_update ();
 	    gtk_widget_show_all ( scheduler_calendar );
 
+        /* show menu NewTransaction */
+        gsb_gui_sensitive_menu_item ( "/menubar/EditMenu/NewTransaction", TRUE );
+
         /* show menu InitwidthCol */
         gsb_gui_sensitive_menu_item ( "/menubar/ViewMenu/InitwidthCol", TRUE );
 	    break;
diff --git a/src/traitement_variables.c b/src/traitement_variables.c
index 2a839a2..7363a83 100644
--- a/src/traitement_variables.c
+++ b/src/traitement_variables.c
@@ -334,88 +334,6 @@ void free_variables ( void )
 }
 
 
-/*****************************************************************************************************/
-/* si grise = 1 ; grise tous les menus qui doivent l'être quand aucun fichier n'est en mémoire */
-/* si grise = 0 ; dégrise les même menus */
-/*****************************************************************************************************/
-
-void menus_sensitifs ( gboolean sensitif )
-{
-    gchar * items[] = {
-        "/menubar/FileMenu/Save",
-        "/menubar/FileMenu/SaveAs",
-        "/menubar/FileMenu/DebugFile",
-        "/menubar/FileMenu/Obfuscate",
-        "/menubar/FileMenu/DebugMode",
-        "/menubar/FileMenu/ExportFile",
-        "/menubar/FileMenu/CreateArchive",
-        "/menubar/FileMenu/ExportArchive",
-        "/menubar/FileMenu/Close",
-        "/menubar/EditMenu/NewTransaction",
-        "/menubar/EditMenu/RemoveTransaction",
-        "/menubar/EditMenu/TemplateTransaction",
-        "/menubar/EditMenu/CloneTransaction",
-        "/menubar/EditMenu/EditTransaction",
-        "/menubar/EditMenu/ConvertToScheduled",
-        "/menubar/EditMenu/MoveToAnotherAccount",
-        "/menubar/EditMenu/Preferences",
-        "/menubar/EditMenu/RemoveAccount",
-        "/menubar/EditMenu/NewAccount",
-        "/menubar/ViewMenu/ShowTransactionForm",
-        "/menubar/ViewMenu/ShowGrid",
-        "/menubar/ViewMenu/ShowReconciled",
-        "/menubar/ViewMenu/ShowArchived",
-        "/menubar/ViewMenu/ShowClosed",
-        "/menubar/ViewMenu/ShowOneLine",
-        "/menubar/ViewMenu/ShowTwoLines",
-        "/menubar/ViewMenu/ShowThreeLines",
-        "/menubar/ViewMenu/ShowFourLines",
-        "/menubar/ViewMenu/InitwidthCol",
-        NULL
-    };
-    gchar ** tmp = items;
-
-    devel_debug_int (sensitif);
-
-    while ( *tmp )
-    {
-        gsb_gui_sensitive_menu_item ( *tmp, sensitif );
-        tmp++;
-    }
-
-    /* As this function may only be called when a new account is
-     * created and the like, it is unlikely that we want to sensitive
-     * transaction-related menus. */
-    gsb_gui_sensitive_menu_item ( "/menubar/EditMenu/NewTransaction", FALSE );
-    gsb_menu_transaction_operations_set_sensitive ( FALSE );
-}
-
-void menus_view_sensitifs ( gboolean sensitif )
-{
-    gchar * items[] = {
-        "/menubar/ViewMenu/ShowTransactionForm",
-        "/menubar/ViewMenu/ShowGrid",
-        "/menubar/ViewMenu/ShowReconciled",
-        "/menubar/ViewMenu/ShowArchived",
-        "/menubar/ViewMenu/ShowOneLine",
-        "/menubar/ViewMenu/ShowTwoLines",
-        "/menubar/ViewMenu/ShowThreeLines",
-        "/menubar/ViewMenu/ShowFourLines",
-        "/menubar/ViewMenu/InitwidthCol",
-        NULL
-    };
-    gchar **tmp = items;
-
-    devel_debug_int (sensitif);
-
-    while ( *tmp )
-    {
-        gsb_gui_sensitive_menu_item ( *tmp, sensitif );
-        tmp++;
-    }
-}
-
-
 /**
  * initialise la largeur des colonnes du tableau d'affichage des opérations.
  * ou des opérations planifiées.
@@ -527,6 +445,13 @@ void initialise_number_separators ( void )
 }
 
 
+/**
+ *
+ *
+ * \param
+ *
+ * \return
+ * */
 /* Local Variables: */
 /* c-basic-offset: 4 */
 /* End: */
diff --git a/src/traitement_variables.h b/src/traitement_variables.h
index 5f223c3..a2bae25 100644
--- a/src/traitement_variables.h
+++ b/src/traitement_variables.h
@@ -11,8 +11,6 @@
 void free_variables ( void );
 void init_variables ( void );
 void initialise_largeur_colonnes_tab_affichage_ope ( gint type_operation, const gchar *description );
-void menus_sensitifs ( gboolean sensitif );
-void menus_view_sensitifs ( gboolean sensitif );
 /*END_DECLARATION*/
 
 


hooks/post-receive
-- 
grisbi


More information about the cvs mailing list