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 */ /* Toplevel */
{ "FakeToplevel", NULL, "", NULL, NULL, NULL }, { "FakeToplevel", NULL, "", NULL, NULL, NULL },
/* File menu */ /* Edit menu */
{ {
"BusinessNewOwnerAction", GNC_STOCK_NEW_ACCOUNT, N_("New _Owner..."), NULL, "OTEditVendorAction", GNC_STOCK_EDIT_ACCOUNT, N_("E_dit Vendor"), "<control>e",
N_("Create a new Owner"), 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) 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 { /* FIXME disabled due to crash {
"EditDeleteOwnerAction", GNC_STOCK_DELETE_ACCOUNT, N_("_Delete Owner..."), "Delete", "EditDeleteOwnerAction", GNC_STOCK_DELETE_ACCOUNT, N_("_Delete Owner..."), "Delete",
N_("Delete selected owner"), N_("Delete selected owner"),
@ -162,27 +181,27 @@ static GtkActionEntry gnc_plugin_page_owner_tree_actions [] =
/* Business menu */ /* 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"), N_("Create a new bill"),
G_CALLBACK (gnc_plugin_page_owner_tree_cmd_new_invoice) 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"), N_("Create a new invoice"),
G_CALLBACK (gnc_plugin_page_owner_tree_cmd_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"), N_("Create a new voucher"),
G_CALLBACK (gnc_plugin_page_owner_tree_cmd_new_invoice) 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"), N_("Show vendor aging overview for all vendors"),
G_CALLBACK (gnc_plugin_page_owner_tree_cmd_owners_report) 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"), N_("Show customer aging overview for all customers"),
G_CALLBACK (gnc_plugin_page_owner_tree_cmd_owners_report) 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. */ * enabled. */
static const gchar *actions_requiring_owner[] = static const gchar *actions_requiring_owner[] =
{ {
"EditEditOwnerAction", "OTEditVendorAction",
"OTEditCustomerAction",
"OTEditEmployeeAction",
"OTVendorReportAction", "OTVendorReportAction",
"OTCustomerReportAction", "OTCustomerReportAction",
"OTEmployeeReportAction", "OTEmployeeReportAction",
@ -222,13 +243,17 @@ static const gchar *actions_requiring_owner[] =
/** Short labels for use on the toolbar buttons. */ /** Short labels for use on the toolbar buttons. */
static action_toolbar_labels toolbar_labels[] = static action_toolbar_labels toolbar_labels[] =
{ {
{ "EditEditOwnerAction", N_("Edit") }, { "OTEditVendorAction", N_("Edit") },
{ "BusinessNewOwnerAction", N_("New") }, { "OTEditCustomerAction", N_("Edit") },
{ "BusinessNewBillAction", N_("New Bill") }, { "OTEditEmployeeAction", N_("Edit") },
{ "BusinessNewInvoiceAction", N_("New Invoice") }, { "OTNewVendorAction", N_("New") },
{ "BusinessNewVoucherAction", N_("New Voucher") }, { "OTNewCustomerAction", N_("New") },
{ "VendorListingReportAction", N_("Vendor Listing") }, { "OTNewEmployeeAction", N_("New") },
{ "CustomerListingReportAction", N_("Customer Listing") }, { "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") },*/ /* FIXME disable due to crash { "EditDeleteOwnerAction", N_("Delete") },*/
{ NULL, NULL }, { NULL, NULL },
}; };
@ -246,11 +271,17 @@ typedef struct
static action_owners_struct action_owners[] = static action_owners_struct action_owners[] =
{ {
{ "BusinessNewBillAction", GNC_OWNER_VENDOR }, { "OTEditVendorAction", GNC_OWNER_VENDOR },
{ "BusinessNewInvoiceAction", GNC_OWNER_CUSTOMER }, { "OTEditCustomerAction", GNC_OWNER_CUSTOMER },
{ "BusinessNewVoucherAction", GNC_OWNER_EMPLOYEE }, { "OTEditEmployeeAction", GNC_OWNER_EMPLOYEE },
{ "VendorListingReportAction", GNC_OWNER_VENDOR }, { "OTNewVendorAction", GNC_OWNER_VENDOR },
{ "CustomerListingReportAction", GNC_OWNER_CUSTOMER }, { "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 }, { "OTVendorReportAction", GNC_OWNER_VENDOR },
{ "OTCustomerReportAction", GNC_OWNER_CUSTOMER }, { "OTCustomerReportAction", GNC_OWNER_CUSTOMER },
{ "OTEmployeeReportAction", GNC_OWNER_EMPLOYEE }, { "OTEmployeeReportAction", GNC_OWNER_EMPLOYEE },

View File

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