Owner overview: use consistent action names

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@20776 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
Geert Janssens 2011-06-19 22:06:13 +00:00
parent 08e171dc25
commit 8585a33c31
2 changed files with 86 additions and 45 deletions

View File

@ -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"), "<control>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"), "<control>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"), "<control>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"), "<control>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 },

View File

@ -2,16 +2,20 @@
<menubar>
<menu name="Edit" action="EditAction">
<placeholder name="EditSelectedPlaceholder">
<menuitem name="EditEditOwner" action="EditEditOwnerAction"/>
<!-- <menuitem name="EditDeleteOwner" action="EditDeleteOwnerAction"/> -->
<menuitem name="EditNewOwner" action="BusinessNewOwnerAction"/>
<menuitem name="EditEditVendor" action="OTEditVendorAction"/>
<menuitem name="EditEditCustomer" action="OTEditCustomerAction"/>
<menuitem name="EditEditEmployee" action="OTEditEmployeeAction"/>
<!-- <menuitem name="EditDeleteOwner" action="OTDeleteOwnerAction"/> -->
<menuitem name="EditNewVendor" action="OTNewVendorAction"/>
<menuitem name="EditNewCustomer" action="OTNewCustomerAction"/>
<menuitem name="EditNewEmployee" action="OTNewEmployeeAction"/>
</placeholder>
</menu>
<menu name="Reports" action="ReportsAction">
<placeholder name="OtherReports">
<menuitem name="ReportVendorListingReport" action="VendorListingReportAction"/>
<menuitem name="ReportCustomerListingReport" action="CustomerListingReportAction"/>
<menuitem name="ReportVendorListingReport" action="OTVendorListingReportAction"/>
<menuitem name="ReportCustomerListingReport" action="OTCustomerListingReportAction"/>
<menuitem name="ReportOTVendorReport" action="OTVendorReportAction"/>
<menuitem name="ReportOTCustomerReport" action="OTCustomerReportAction"/>
<menuitem name="ReportOTEmployeeReport" action="OTEmployeeReportAction"/>
@ -21,26 +25,32 @@
<toolbar name="DefaultToolbar">
<placeholder name="DefaultToolbarPlaceholder">
<toolitem name="ToolbarNewOwner" action="BusinessNewOwnerAction"/>
<toolitem name="ToolbarEditOwner" action="EditEditOwnerAction"/>
<!-- <toolitem name="ToolbarDeleteOwner" action="EditDeleteOwnerAction"/> -->
<toolitem name="ToolbarNewVendor" action="OTNewVendorAction"/>
<toolitem name="ToolbarNewCustomer" action="OTNewCustomerAction"/>
<toolitem name="ToolbarNewEmployee" action="OTNewEmployeeAction"/>
<toolitem name="ToolbarEditVendor" action="OTEditVendorAction"/>
<toolitem name="ToolbarEditCustomer" action="OTEditCustomerAction"/>
<toolitem name="ToolbarEditEmployee" action="OTEditEmployeeAction"/>
<!-- <toolitem name="ToolbarDeleteOwner" action="OTDeleteOwnerAction"/> -->
<separator name="ToolbarSep168"/>
<toolitem name="ToolbarNewBill" action="BusinessNewBillAction"/>
<toolitem name="ToolbarNewInvoice" action="BusinessNewInvoiceAction"/>
<toolitem name="ToolbarNewVoucher" action="BusinessNewVoucherAction"/>
<toolitem name="ToolbarVendorListing" action="VendorListingReportAction"/>
<toolitem name="ToolbarCustomerListing" action="CustomerListingReportAction"/>
<toolitem name="ToolbarNewBill" action="OTNewBillAction"/>
<toolitem name="ToolbarNewInvoice" action="OTNewInvoiceAction"/>
<toolitem name="ToolbarNewVoucher" action="OTNewVoucherAction"/>
<toolitem name="ToolbarVendorListing" action="OTVendorListingReportAction"/>
<toolitem name="ToolbarCustomerListing" action="OTCustomerListingReportAction"/>
</placeholder>
</toolbar>
<popup name="MainPopup" action="FakeToplevel">
<placeholder name="PopupPlaceholder2">
<menuitem name="EditOwner" action="EditEditOwnerAction"/>
<!-- <menuitem name="DeleteOwner" action="EditDeleteOwnerAction"/> -->
<menuitem name="EditVendor" action="OTEditVendorAction"/>
<menuitem name="EditCustomer" action="OTEditCustomerAction"/>
<menuitem name="EditEmployee" action="OTEditEmployeeAction"/>
<!-- <menuitem name="DeleteOwner" action="OTDeleteOwnerAction"/> -->
<separator name="ToolbarSep169"/>
<menuitem name="NewBill" action="BusinessNewBillAction"/>
<menuitem name="NewInvoice" action="BusinessNewInvoiceAction"/>
<menuitem name="NewVoucher" action="BusinessNewVoucherAction"/>
<menuitem name="NewBill" action="OTNewBillAction"/>
<menuitem name="NewInvoice" action="OTNewInvoiceAction"/>
<menuitem name="NewVoucher" action="OTNewVoucherAction"/>
<menuitem name="OTVendorReport" action="OTVendorReportAction"/>
<menuitem name="OTCustomerReport" action="OTCustomerReportAction"/>
<menuitem name="OTEmployeeReport" action="OTEmployeeReportAction"/>