[grisbi-cvs] [SCM] grisbi branch, master, updated. upstream_version_0_9.0-113-g00fe097

Rémi Cardona nobody at users.sourceforge.net
Sun Mar 27 22:01:19 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  00fe097df5f9da7a5e8a202b4f116a8ec7f241c7 (commit)
       via  759ffce25e38789022bb8ee24b5c2c9572c83216 (commit)
       via  92b1d19098e514a2d44f5cfaf4838ab43c36124c (commit)
       via  219dacd8cb797f70d213b967569863a30171dbff (commit)
      from  8a98d7563377c19bc4b0bbc6a1a3888d9b44028e (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 00fe097df5f9da7a5e8a202b4f116a8ec7f241c7
Author: Rémi Cardona <remi at gentoo.org>
Date:   Sun Mar 27 21:48:41 2011 +0200

    Improve comment and indentation

commit 759ffce25e38789022bb8ee24b5c2c9572c83216
Author: Rémi Cardona <remi at gentoo.org>
Date:   Sun Mar 27 21:47:37 2011 +0200

    Rename gsb_gui_sensitive_menu_item_from_string() to gsb_gui_sensitive_menu_item()

commit 92b1d19098e514a2d44f5cfaf4838ab43c36124c
Author: Rémi Cardona <remi at gentoo.org>
Date:   Sat Mar 26 23:23:38 2011 +0100

    Remove menu_name()

commit 219dacd8cb797f70d213b967569863a30171dbff
Author: Rémi Cardona <remi at gentoo.org>
Date:   Sat Mar 26 23:21:21 2011 +0100

    Remove gsb_gui_sensitive_menu_item()

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

Changes:
diff --git a/src/barre_outils.c b/src/barre_outils.c
index 2db4255..1635363 100644
--- a/src/barre_outils.c
+++ b/src/barre_outils.c
@@ -330,7 +330,7 @@ gboolean change_aspect_liste ( gint demande )
 	case 1 :
 	    gtk_toggle_action_set_active ( GTK_TOGGLE_ACTION (
                         gtk_ui_manager_get_action ( ui_manager, 
-					    menu_name ( "ViewMenu", "ShowOneLine", NULL ) ) ), 
+					    "/menubar/ViewMenu/ShowOneLine" ) ),
 					    TRUE );
 	    gsb_transactions_list_set_visible_rows_number ( demande );
 	    if ( etat.modification_fichier == 0 )
@@ -339,7 +339,7 @@ gboolean change_aspect_liste ( gint demande )
 	case 2 :
 	    gtk_toggle_action_set_active ( GTK_TOGGLE_ACTION (
                         gtk_ui_manager_get_action ( ui_manager, 
-					    menu_name ( "ViewMenu", "ShowTwoLines", NULL ) ) ), 
+					    "/menubar/ViewMenu/ShowTwoLines" ) ),
 					    TRUE );
 	    gsb_transactions_list_set_visible_rows_number ( demande );
 	    if ( etat.modification_fichier == 0 )
@@ -348,7 +348,7 @@ gboolean change_aspect_liste ( gint demande )
 	case 3 :
 	    gtk_toggle_action_set_active ( GTK_TOGGLE_ACTION (
                         gtk_ui_manager_get_action ( ui_manager, 
-					    menu_name ( "ViewMenu", "ShowThreeLines", NULL ) ) ), 
+					    "/menubar/ViewMenu/ShowThreeLines" ) ),
 					    TRUE );
 	    gsb_transactions_list_set_visible_rows_number ( demande );
 	    if ( etat.modification_fichier == 0 )
@@ -357,7 +357,7 @@ gboolean change_aspect_liste ( gint demande )
 	case 4 :
 	    gtk_toggle_action_set_active ( GTK_TOGGLE_ACTION (
                         gtk_ui_manager_get_action ( ui_manager, 
-					    menu_name ( "ViewMenu", "ShowFourLines", NULL ) ) ), 
+					    "/menubar/ViewMenu/ShowFourLines" ) ),
 					   TRUE );
 	    gsb_transactions_list_set_visible_rows_number ( demande );
 	    if ( etat.modification_fichier == 0 )
@@ -375,7 +375,7 @@ gboolean change_aspect_liste ( gint demande )
 	    block_menu_cb = TRUE;
 	    gtk_toggle_action_set_active ( GTK_TOGGLE_ACTION (
                         gtk_ui_manager_get_action ( ui_manager, 
-					    menu_name ( "ViewMenu", "ShowReconciled", NULL ) ) ), 
+					    "/menubar/ViewMenu/ShowReconciled" ) ),
 					    TRUE );
 	    block_menu_cb = FALSE;
 
@@ -392,7 +392,7 @@ gboolean change_aspect_liste ( gint demande )
 	    block_menu_cb = TRUE;
 	    gtk_toggle_action_set_active ( GTK_TOGGLE_ACTION (
                         gtk_ui_manager_get_action ( ui_manager, 
-					    menu_name ( "ViewMenu", "ShowReconciled", NULL ) ) ), 
+					    "/menubar/ViewMenu/ShowReconciled" ) ),
 					    FALSE );
 	    block_menu_cb = FALSE;
 
@@ -408,7 +408,7 @@ gboolean change_aspect_liste ( gint demande )
 	    block_menu_cb = TRUE;
 	    gtk_toggle_action_set_active ( GTK_TOGGLE_ACTION (
                         gtk_ui_manager_get_action ( ui_manager, 
-						menu_name ( "ViewMenu", "ShowArchived", NULL ) ) ), 
+						"/menubar/ViewMenu/ShowArchived" ) ),
 					    TRUE );
 	    block_menu_cb = FALSE;
 
@@ -425,7 +425,7 @@ gboolean change_aspect_liste ( gint demande )
 	    block_menu_cb = TRUE;
 	    gtk_toggle_action_set_active ( GTK_TOGGLE_ACTION (
                         gtk_ui_manager_get_action ( ui_manager, 
-					    menu_name ( "ViewMenu", "ShowArchived", NULL ) ) ), 
+					    "/menubar/ViewMenu/ShowArchived" ) ),
 					    FALSE );
 	    block_menu_cb = FALSE;
 
diff --git a/src/menu.c b/src/menu.c
index 0e0a588..17f548a 100644
--- a/src/menu.c
+++ b/src/menu.c
@@ -330,7 +330,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 ( "EditMenu", "NewTransaction", NULL, FALSE );
+    gsb_gui_sensitive_menu_item ( "/menubar/EditMenu/NewTransaction", FALSE );
     gsb_menu_transaction_operations_set_sensitive ( FALSE );
 
     return menubar;
@@ -529,39 +529,16 @@ gboolean help_bugreport ( void )
 
 
 /**
- * Concatenate menu entry names to produce a valid menu path, like
- * /menubar/FileMenu/Save
- *
- * \param menu		Name of the root menu.
- * \param submenu	Name of the sub-menu.
- * \param subsubmenu	Name of the sub-sub-menu.
- *
- * \return A newly-created string representing the menu path.
- */
-gchar *menu_name ( gchar *menu, gchar *submenu, gchar *subsubmenu )
-{
-  if ( subsubmenu )
-    return g_strconcat ( "/menubar/", menu, "/", submenu, "/", subsubmenu, NULL );
-  else if ( submenu )
-    return g_strconcat ( "/menubar/", menu, "/", submenu, NULL );
-  else
-    return g_strconcat ( "/menubar/", menu, NULL );
-}
-
-
-
-/**
  * Set sensitiveness of a menu item according to a string
  * representation of its position in the menu.
  * menu.
  *
- * \param root_menu_name	Name of the menu.
- * \param submenu_name		Name of the sub menu.
- * \param subsubmenu_name	Name of the sub sub menu.
+ * \param item_name		Path of the menu item.
+ * \param state			Whether widget should be 'sensitive' or not.
  *
  * \return TRUE on success.
  */
-gboolean gsb_gui_sensitive_menu_item_from_string ( gchar *item_name, gboolean state )
+gboolean gsb_gui_sensitive_menu_item ( gchar *item_name, gboolean state )
 {
     GtkWidget * widget;
 
@@ -577,33 +554,6 @@ gboolean gsb_gui_sensitive_menu_item_from_string ( gchar *item_name, gboolean st
 
 
 
-/**
- * Set sensitiveness of a menu item according to its position in the
- * menu.
- *
- * \param root_menu_name	Name of the menu.
- * \param submenu_name		Name of the sub menu.
- * \param subsubmenu_name	Name of the sub sub menu.
- *
- * \return TRUE on success.
- */
-gboolean gsb_gui_sensitive_menu_item ( gchar *root_menu_name,
-                        gchar *submenu_name,
-                        gchar *subsubmenu_name,
-                        gboolean state )
-{
-    gchar* tmpstr;
-    gboolean result;
-
-    tmpstr = menu_name ( root_menu_name, submenu_name, subsubmenu_name );
-    result = gsb_gui_sensitive_menu_item_from_string ( tmpstr, state );
-
-    g_free ( tmpstr );
-
-    return result;
-}
-
-
 /** 
  * Callback called when an item of the "View/Show ... lines" menu is
  * triggered.
@@ -740,48 +690,43 @@ gboolean gsb_menu_update_view_menu ( gint account_number )
     block_menu_cb = TRUE;
 
     /* update the showing of reconciled transactions */
-    tmpstr = menu_name ( "ViewMenu", "ShowReconciled", NULL );
+    tmpstr = "/menubar/ViewMenu/ShowReconciled";
     gtk_toggle_action_set_active ( GTK_TOGGLE_ACTION (
                         gtk_ui_manager_get_action ( ui_manager, tmpstr) ), 
 				        gsb_data_account_get_r ( account_number ) );
-    g_free ( tmpstr );
 
-    tmpstr = menu_name ( "ViewMenu", "ShowTransactionForm", NULL );
+    tmpstr = "/menubar/ViewMenu/ShowTransactionForm";
     gtk_toggle_action_set_active ( GTK_TOGGLE_ACTION (
                         gtk_ui_manager_get_action ( ui_manager, tmpstr) ), 
 				        gsb_form_is_visible ( ) );
-    g_free ( tmpstr );
 
     /* update the showing of archived transactions */
-    tmpstr = menu_name ( "ViewMenu", "ShowArchived", NULL );
+    tmpstr = "/menubar/ViewMenu/ShowArchived";
     gtk_toggle_action_set_active ( GTK_TOGGLE_ACTION (
                         gtk_ui_manager_get_action ( ui_manager, tmpstr) ), 
 				        gsb_data_account_get_l ( account_number ) );
-    g_free ( tmpstr );
 
     /* update the number of line showed */
     switch ( gsb_data_account_get_nb_rows (account_number))
     {
 	default:
 	case 1 :
-	    item_name = menu_name ( "ViewMenu", "ShowOneLine", NULL );
+	    item_name = "/menubar/ViewMenu/ShowOneLine";
 	    break;
 	case 2 :
-	    item_name = menu_name ( "ViewMenu", "ShowTwoLines", NULL );
+	    item_name = "/menubar/ViewMenu/ShowTwoLines";
 	    break;
 	case 3 :
-	    item_name = menu_name ( "ViewMenu", "ShowThreeLines", NULL );
+	    item_name = "/menubar/ViewMenu/ShowThreeLines";
 	    break;
 	case 4 :
-	    item_name = menu_name ( "ViewMenu", "ShowFourLines", NULL );
+	    item_name = "/menubar/ViewMenu/ShowFourLines";
 	    break;
     }
 
     gtk_toggle_action_set_active ( GTK_TOGGLE_ACTION (
                         gtk_ui_manager_get_action ( ui_manager, item_name ) ),
 				        TRUE );
-    g_free ( item_name );
-
     block_menu_cb = FALSE;
 
     return FALSE;
@@ -865,11 +810,11 @@ gboolean gsb_menu_transaction_operations_set_sensitive ( gboolean sensitive )
 {
     devel_debug ( sensitive ? "item sensitive" : "item unsensitive" );
 
-    gsb_gui_sensitive_menu_item ( "EditMenu", "RemoveTransaction", NULL, sensitive );
-    gsb_gui_sensitive_menu_item ( "EditMenu", "CloneTransaction", NULL, sensitive );
-    gsb_gui_sensitive_menu_item ( "EditMenu", "EditTransaction", NULL, sensitive );
-    gsb_gui_sensitive_menu_item ( "EditMenu", "ConvertToScheduled", NULL, sensitive );
-    gsb_gui_sensitive_menu_item ( "EditMenu", "MoveToAnotherAccount", NULL, sensitive );
+    gsb_gui_sensitive_menu_item ( "/menubar/EditMenu/RemoveTransaction", 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 );
 
     return FALSE;
 }
diff --git a/src/menu.h b/src/menu.h
index 1bbc5f0..3c78bf1 100644
--- a/src/menu.h
+++ b/src/menu.h
@@ -21,11 +21,7 @@ enum view_menu_action {
 /* START_DECLARATION */
 gboolean affiche_derniers_fichiers_ouverts ( void );
 void efface_derniers_fichiers_ouverts ( void );
-gboolean gsb_gui_sensitive_menu_item ( gchar *root_menu_name,
-                        gchar *submenu_name,
-                        gchar *subsubmenu_name,
-                        gboolean state );
-gboolean gsb_gui_sensitive_menu_item_from_string ( gchar *item_name, gboolean state );
+gboolean gsb_gui_sensitive_menu_item ( gchar *item_name, gboolean state );
 void gsb_gui_toggle_line_view_mode ( GtkRadioAction *action,
                         GtkRadioAction *current,
                         gpointer user_data );
@@ -36,6 +32,5 @@ gboolean gsb_menu_transaction_operations_set_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 );
-gchar *menu_name ( gchar *menu, gchar *submenu, gchar *subsubmenu );
 /* END_DECLARATION */
 #endif
diff --git a/src/navigation.c b/src/navigation.c
index 5b52b73..8a2fc2a 100644
--- a/src/navigation.c
+++ b/src/navigation.c
@@ -937,6 +937,7 @@ gboolean navigation_change_account ( gint *no_account )
 {
     gint new_account;
     gint current_account;
+    gchar *tmp_menu_path;
 
     new_account = GPOINTER_TO_INT ( no_account );
     devel_debug_int (new_account);
@@ -949,10 +950,13 @@ gboolean navigation_change_account ( gint *no_account )
     current_account = gsb_gui_navigation_get_last_account ();
 
     /* sensitive the last account in the menu */
-    gsb_gui_sensitive_menu_item ( "EditMenu", "MoveToAnotherAccount", 
-				  gsb_data_account_get_name (current_account),
-				  TRUE );
-    gsb_gui_sensitive_menu_item ( "EditMenu", "NewTransaction", NULL, TRUE );
+    tmp_menu_path = g_strconcat (
+        "/menubar/EditMenu/MoveToAnotherAccount/",
+        gsb_data_account_get_name (current_account),
+        NULL );
+    gsb_gui_sensitive_menu_item ( tmp_menu_path, TRUE );
+    g_free ( tmp_menu_path );
+    gsb_gui_sensitive_menu_item ( "/menubar/EditMenu/NewTransaction", TRUE );
 
     /* save the row_align of the last account */
     gsb_data_account_set_row_align ( current_account,
@@ -968,9 +972,12 @@ gboolean navigation_change_account ( gint *no_account )
     /* mise en place de la date du dernier relevé */
     gsb_navigation_update_statement_label ( new_account );
 
-    gsb_gui_sensitive_menu_item ( "EditMenu", "MoveToAnotherAccount", 
-				  gsb_data_account_get_name ( new_account ),
-				  FALSE );
+    tmp_menu_path = g_strconcat (
+        "/menubar/EditMenu/MoveToAnotherAccount/",
+        gsb_data_account_get_name (new_account),
+        NULL );
+    gsb_gui_sensitive_menu_item ( tmp_menu_path, FALSE );
+    g_free ( tmp_menu_path );
 
     /* Sensitive menu items if something is selected. */
     if ( gsb_data_account_get_current_transaction_number ( new_account ) == -1 )
@@ -1112,8 +1119,8 @@ gboolean gsb_gui_navigation_select_line ( GtkTreeSelection *selection,
 
     if ( page_number != GSB_ACCOUNT_PAGE )
     {
-        gsb_gui_sensitive_menu_item ( "EditMenu", "NewTransaction", NULL, FALSE );
-        gsb_gui_sensitive_menu_item ( "EditMenu", "RemoveAccount", NULL, FALSE );
+        gsb_gui_sensitive_menu_item ( "/menubar/EditMenu/NewTransaction", FALSE );
+        gsb_gui_sensitive_menu_item ( "/menubar/EditMenu/RemoveAccount", FALSE );
         menus_view_sensitifs ( FALSE );
     }
 
@@ -1127,7 +1134,7 @@ gboolean gsb_gui_navigation_select_line ( GtkTreeSelection *selection,
 	case GSB_HOME_PAGE:
 	    notice_debug ("Home page selected");
 
-        gsb_gui_sensitive_menu_item ( "ViewMenu", "ShowClosed", NULL, TRUE );
+        gsb_gui_sensitive_menu_item ( "/menubar/ViewMenu/ShowClosed", TRUE );
 	    /* what to be done if switch to that page */
 	    mise_a_jour_accueil ( FALSE );
 	    gsb_form_set_expander_visible ( FALSE, FALSE );
@@ -1137,7 +1144,7 @@ gboolean gsb_gui_navigation_select_line ( GtkTreeSelection *selection,
 	    notice_debug ("Account page selected");
 
         menus_view_sensitifs ( TRUE );
-	    gsb_gui_sensitive_menu_item ( "EditMenu", "RemoveAccount", NULL, TRUE );
+	    gsb_gui_sensitive_menu_item ( "/menubar/EditMenu/RemoveAccount", TRUE );
 
 	    account_number = gsb_gui_navigation_get_current_account ();
 
@@ -1188,7 +1195,7 @@ gboolean gsb_gui_navigation_select_line ( GtkTreeSelection *selection,
 	    gtk_widget_show_all ( scheduler_calendar );
 
         /* show menu InitwidthCol */
-        gsb_gui_sensitive_menu_item ( "ViewMenu", "InitwidthCol", NULL, TRUE );
+        gsb_gui_sensitive_menu_item ( "/menubar/ViewMenu/InitwidthCol", TRUE );
 	    break;
 
 	case GSB_PAYEES_PAGE:
diff --git a/src/traitement_variables.c b/src/traitement_variables.c
index c542b31..de5c64a 100644
--- a/src/traitement_variables.c
+++ b/src/traitement_variables.c
@@ -265,13 +265,13 @@ void modification_fichier ( gboolean modif )
     if ( ! etat.modification_fichier )
     {
         etat.modification_fichier = time ( NULL );
-        gsb_gui_sensitive_menu_item ( "FileMenu", "Save", NULL, TRUE );
+        gsb_gui_sensitive_menu_item ( "/menubar/FileMenu/Save", TRUE );
     }
     }
     else
     {
         etat.modification_fichier = 0;
-        gsb_gui_sensitive_menu_item ( "FileMenu", "Save", NULL, FALSE );
+        gsb_gui_sensitive_menu_item ( "/menubar/FileMenu/Save", FALSE );
     }
 }
 
@@ -663,35 +663,35 @@ void initialisation_couleurs_listes ( void )
 void menus_sensitifs ( gboolean sensitif )
 {
     gchar * items[] = {
-    menu_name ( "FileMenu",     "Save",                 NULL ),
-    menu_name ( "FileMenu",     "SaveAs",               NULL ),
-    menu_name ( "FileMenu",     "DebugFile",            NULL ),
-    menu_name ( "FileMenu",     "Obfuscate",            NULL ),
-    menu_name ( "FileMenu",     "DebugMode",            NULL ),
-    menu_name ( "FileMenu",     "ExportFile",           NULL ),
-    menu_name ( "FileMenu",     "CreateArchive",        NULL ),
-    menu_name ( "FileMenu",     "ExportArchive",        NULL ),
-    menu_name ( "FileMenu",     "Close",                NULL ),
-    menu_name ( "EditMenu",     "NewTransaction",       NULL ),
-    menu_name ( "EditMenu",     "RemoveTransaction",    NULL ),
-    menu_name ( "EditMenu",     "CloneTransaction",     NULL ),
-    menu_name ( "EditMenu",     "EditTransaction",      NULL ),
-    menu_name ( "EditMenu",     "ConvertToScheduled",   NULL ),
-    menu_name ( "EditMenu",     "MoveToAnotherAccount", NULL ),
-    menu_name ( "EditMenu",     "Preferences",          NULL ),
-    menu_name ( "EditMenu",     "RemoveAccount",        NULL ),
-    menu_name ( "EditMenu",     "NewAccount",           NULL ),
-    menu_name ( "ViewMenu",     "ShowTransactionForm",  NULL ),
-    menu_name ( "ViewMenu",     "ShowGrid",             NULL ),
-    menu_name ( "ViewMenu",     "ShowReconciled",       NULL ),
-    menu_name ( "ViewMenu",     "ShowArchived",         NULL ),
-    menu_name ( "ViewMenu",     "ShowClosed",           NULL ),
-    menu_name ( "ViewMenu",     "ShowOneLine",          NULL ),
-    menu_name ( "ViewMenu",     "ShowTwoLines",         NULL ),
-    menu_name ( "ViewMenu",     "ShowThreeLines",       NULL ),
-    menu_name ( "ViewMenu",     "ShowFourLines",        NULL ),
-    menu_name ( "ViewMenu",     "InitwidthCol",        NULL ),
-    NULL,
+        "/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/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;
 
@@ -699,31 +699,31 @@ void menus_sensitifs ( gboolean sensitif )
 
     while ( *tmp )
     {
-    gsb_gui_sensitive_menu_item_from_string ( *tmp, sensitif );
-    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 ( "EditMenu", "NewTransaction", NULL, FALSE );
+    gsb_gui_sensitive_menu_item ( "/menubar/EditMenu/NewTransaction", FALSE );
     gsb_menu_transaction_operations_set_sensitive ( FALSE );
 }
 
 void menus_view_sensitifs ( gboolean sensitif )
 {
     gchar * items[] = {
-    menu_name ( "ViewMenu",     "ShowTransactionForm",  NULL ),
-    menu_name ( "ViewMenu",     "ShowGrid",             NULL ),
-    menu_name ( "ViewMenu",     "ShowReconciled",       NULL ),
-    menu_name ( "ViewMenu",     "ShowArchived",         NULL ),
-    menu_name ( "ViewMenu",     "ShowClosed",           NULL ),
-    menu_name ( "ViewMenu",     "ShowOneLine",          NULL ),
-    menu_name ( "ViewMenu",     "ShowTwoLines",         NULL ),
-    menu_name ( "ViewMenu",     "ShowThreeLines",       NULL ),
-    menu_name ( "ViewMenu",     "ShowFourLines",        NULL ),
-    menu_name ( "ViewMenu",     "InitwidthCol",         NULL ),
-    NULL,
+        "/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;
 
@@ -731,7 +731,7 @@ void menus_view_sensitifs ( gboolean sensitif )
 
     while ( *tmp )
     {
-        gsb_gui_sensitive_menu_item_from_string ( *tmp, sensitif );
+        gsb_gui_sensitive_menu_item ( *tmp, sensitif );
         tmp++;
     }
 }


hooks/post-receive
-- 
grisbi


More information about the cvs mailing list