From 8585a33c31f8085b479763dec46c361564ef2eb0 Mon Sep 17 00:00:00 2001 From: Geert Janssens Date: Sun, 19 Jun 2011 22:06:13 +0000 Subject: [PATCH] Owner overview: use consistent action names git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@20776 57a11ea4-9604-0410-9ed3-97b8803252fd --- .../gnc-plugin-page-owner-tree.c | 85 +++++++++++++------ .../ui/gnc-plugin-page-owner-tree-ui.xml | 46 ++++++---- 2 files changed, 86 insertions(+), 45 deletions(-) diff --git a/src/business/business-gnome/gnc-plugin-page-owner-tree.c b/src/business/business-gnome/gnc-plugin-page-owner-tree.c index 450bde3347..8ad40759b4 100644 --- a/src/business/business-gnome/gnc-plugin-page-owner-tree.c +++ b/src/business/business-gnome/gnc-plugin-page-owner-tree.c @@ -135,19 +135,38 @@ static GtkActionEntry gnc_plugin_page_owner_tree_actions [] = /* Toplevel */ { "FakeToplevel", NULL, "", NULL, NULL, NULL }, - /* File menu */ + /* Edit menu */ { - "BusinessNewOwnerAction", GNC_STOCK_NEW_ACCOUNT, N_("New _Owner..."), NULL, - N_("Create a new Owner"), + "OTEditVendorAction", GNC_STOCK_EDIT_ACCOUNT, N_("E_dit Vendor"), "e", + N_("Edit the selected vendor"), + G_CALLBACK (gnc_plugin_page_owner_tree_cmd_edit_owner) + }, + { + "OTEditCustomerAction", GNC_STOCK_EDIT_ACCOUNT, N_("E_dit Customer"), "e", + N_("Edit the selected customer"), + G_CALLBACK (gnc_plugin_page_owner_tree_cmd_edit_owner) + }, + { + "OTEditEmployeeAction", GNC_STOCK_EDIT_ACCOUNT, N_("E_dit Employee"), "e", + N_("Edit the selected employee"), + G_CALLBACK (gnc_plugin_page_owner_tree_cmd_edit_owner) + }, + { + "OTNewVendorAction", GNC_STOCK_NEW_ACCOUNT, N_("_New Vendor..."), NULL, + N_("Create a new vendor"), + G_CALLBACK (gnc_plugin_page_owner_tree_cmd_new_owner) + }, + { + "OTNewCustomerAction", GNC_STOCK_NEW_ACCOUNT, N_("_New Customer..."), NULL, + N_("Create a new customer"), + G_CALLBACK (gnc_plugin_page_owner_tree_cmd_new_owner) + }, + { + "OTNewEmployeeAction", GNC_STOCK_NEW_ACCOUNT, N_("_New Employee..."), NULL, + N_("Create a new employee"), G_CALLBACK (gnc_plugin_page_owner_tree_cmd_new_owner) }, - /* Edit menu */ - { - "EditEditOwnerAction", GNC_STOCK_EDIT_ACCOUNT, N_("Edit _Owner"), "e", - N_("Edit the selected owner"), - G_CALLBACK (gnc_plugin_page_owner_tree_cmd_edit_owner) - }, /* FIXME disabled due to crash { "EditDeleteOwnerAction", GNC_STOCK_DELETE_ACCOUNT, N_("_Delete Owner..."), "Delete", N_("Delete selected owner"), @@ -162,27 +181,27 @@ static GtkActionEntry gnc_plugin_page_owner_tree_actions [] = /* Business menu */ { - "BusinessNewBillAction", GNC_STOCK_INVOICE_NEW, N_("New _Bill..."), NULL, + "OTNewBillAction", GNC_STOCK_INVOICE_NEW, N_("New _Bill..."), NULL, N_("Create a new bill"), G_CALLBACK (gnc_plugin_page_owner_tree_cmd_new_invoice) }, { - "BusinessNewInvoiceAction", GNC_STOCK_INVOICE_NEW, N_("New _Invoice..."), NULL, + "OTNewInvoiceAction", GNC_STOCK_INVOICE_NEW, N_("New _Invoice..."), NULL, N_("Create a new invoice"), G_CALLBACK (gnc_plugin_page_owner_tree_cmd_new_invoice) }, { - "BusinessNewVoucherAction", GNC_STOCK_INVOICE_NEW, N_("New _Voucher..."), NULL, + "OTNewVoucherAction", GNC_STOCK_INVOICE_NEW, N_("New _Voucher..."), NULL, N_("Create a new voucher"), G_CALLBACK (gnc_plugin_page_owner_tree_cmd_new_invoice) }, { - "VendorListingReportAction", GTK_STOCK_PRINT_PREVIEW, N_("Vendor Listing"), NULL, + "OTVendorListingReportAction", GTK_STOCK_PRINT_PREVIEW, N_("Vendor Listing"), NULL, N_("Show vendor aging overview for all vendors"), G_CALLBACK (gnc_plugin_page_owner_tree_cmd_owners_report) }, { - "CustomerListingReportAction", GTK_STOCK_PRINT_PREVIEW, N_("Customer Listing"), NULL, + "OTCustomerListingReportAction", GTK_STOCK_PRINT_PREVIEW, N_("Customer Listing"), NULL, N_("Show customer aging overview for all customers"), G_CALLBACK (gnc_plugin_page_owner_tree_cmd_owners_report) }, @@ -210,7 +229,9 @@ static guint gnc_plugin_page_owner_tree_n_actions = G_N_ELEMENTS (gnc_plugin_pag * enabled. */ static const gchar *actions_requiring_owner[] = { - "EditEditOwnerAction", + "OTEditVendorAction", + "OTEditCustomerAction", + "OTEditEmployeeAction", "OTVendorReportAction", "OTCustomerReportAction", "OTEmployeeReportAction", @@ -222,13 +243,17 @@ static const gchar *actions_requiring_owner[] = /** Short labels for use on the toolbar buttons. */ static action_toolbar_labels toolbar_labels[] = { - { "EditEditOwnerAction", N_("Edit") }, - { "BusinessNewOwnerAction", N_("New") }, - { "BusinessNewBillAction", N_("New Bill") }, - { "BusinessNewInvoiceAction", N_("New Invoice") }, - { "BusinessNewVoucherAction", N_("New Voucher") }, - { "VendorListingReportAction", N_("Vendor Listing") }, - { "CustomerListingReportAction", N_("Customer Listing") }, + { "OTEditVendorAction", N_("Edit") }, + { "OTEditCustomerAction", N_("Edit") }, + { "OTEditEmployeeAction", N_("Edit") }, + { "OTNewVendorAction", N_("New") }, + { "OTNewCustomerAction", N_("New") }, + { "OTNewEmployeeAction", N_("New") }, + { "OTNewBillAction", N_("New Bill") }, + { "OTNewInvoiceAction", N_("New Invoice") }, + { "OTNewVoucherAction", N_("New Voucher") }, + { "OTVendorListingReportAction", N_("Vendor Listing") }, + { "OTCustomerListingReportAction", N_("Customer Listing") }, /* FIXME disable due to crash { "EditDeleteOwnerAction", N_("Delete") },*/ { NULL, NULL }, }; @@ -246,11 +271,17 @@ typedef struct static action_owners_struct action_owners[] = { - { "BusinessNewBillAction", GNC_OWNER_VENDOR }, - { "BusinessNewInvoiceAction", GNC_OWNER_CUSTOMER }, - { "BusinessNewVoucherAction", GNC_OWNER_EMPLOYEE }, - { "VendorListingReportAction", GNC_OWNER_VENDOR }, - { "CustomerListingReportAction", GNC_OWNER_CUSTOMER }, + { "OTEditVendorAction", GNC_OWNER_VENDOR }, + { "OTEditCustomerAction", GNC_OWNER_CUSTOMER }, + { "OTEditEmployeeAction", GNC_OWNER_EMPLOYEE }, + { "OTNewVendorAction", GNC_OWNER_VENDOR }, + { "OTNewCustomerAction", GNC_OWNER_CUSTOMER }, + { "OTNewEmployeeAction", GNC_OWNER_EMPLOYEE }, + { "OTNewBillAction", GNC_OWNER_VENDOR }, + { "OTNewInvoiceAction", GNC_OWNER_CUSTOMER }, + { "OTNewVoucherAction", GNC_OWNER_EMPLOYEE }, + { "OTVendorListingReportAction", GNC_OWNER_VENDOR }, + { "OTCustomerListingReportAction", GNC_OWNER_CUSTOMER }, { "OTVendorReportAction", GNC_OWNER_VENDOR }, { "OTCustomerReportAction", GNC_OWNER_CUSTOMER }, { "OTEmployeeReportAction", GNC_OWNER_EMPLOYEE }, diff --git a/src/business/business-gnome/ui/gnc-plugin-page-owner-tree-ui.xml b/src/business/business-gnome/ui/gnc-plugin-page-owner-tree-ui.xml index b030e827af..64d08d90c0 100644 --- a/src/business/business-gnome/ui/gnc-plugin-page-owner-tree-ui.xml +++ b/src/business/business-gnome/ui/gnc-plugin-page-owner-tree-ui.xml @@ -2,16 +2,20 @@ - - - + + + + + + + - - + + @@ -21,26 +25,32 @@ - - - + + + + + + + - - - - - + + + + + - - + + + + - - - + + +