Changes for register plugin pages

This commit is contained in:
Robert Fewell 2022-10-28 16:25:44 +01:00
parent 846dddaf24
commit 5bcb73a6a0
3 changed files with 884 additions and 73 deletions

View File

@ -87,6 +87,7 @@
#include "window-report.h" #include "window-report.h"
#include "engine-helpers.h" #include "engine-helpers.h"
#include "qofbookslots.h" #include "qofbookslots.h"
#include "gnc-gtk-utils.h"
/* This static indicates the debugging module that this .o belongs to. */ /* This static indicates the debugging module that this .o belongs to. */
static QofLogModule log_module = GNC_MOD_GUI; static QofLogModule log_module = GNC_MOD_GUI;
@ -244,7 +245,7 @@ static GncInvoice* invoice_from_split (Split* split);
static GList* invoices_from_transaction (Transaction* trans); static GList* invoices_from_transaction (Transaction* trans);
static void static void
change_toggle_state (GSimpleAction *simple, toggle_change_state (GSimpleAction *simple,
GVariant *state, GVariant *state,
gpointer user_data) gpointer user_data)
{ {
@ -252,7 +253,7 @@ change_toggle_state (GSimpleAction *simple,
} }
static void static void
change_radio_state (GSimpleAction *simple, radio_change_state (GSimpleAction *simple,
GVariant *state, GVariant *state,
gpointer user_data) gpointer user_data)
{ {
@ -341,9 +342,9 @@ static GActionEntry gnc_plugin_page_register_actions [] =
{ "ReportsAccountReportAction", gnc_plugin_page_register_cmd_account_report, NULL, NULL, NULL }, { "ReportsAccountReportAction", gnc_plugin_page_register_cmd_account_report, NULL, NULL, NULL },
{ "ReportsAcctTransReportAction", gnc_plugin_page_register_cmd_transaction_report, NULL, NULL, NULL }, { "ReportsAcctTransReportAction", gnc_plugin_page_register_cmd_transaction_report, NULL, NULL, NULL },
{ "ViewStyleDoubleLineAction", gnc_plugin_page_register_cmd_style_double_line, NULL, "FALSE", change_toggle_state }, { "ViewStyleDoubleLineAction", gnc_plugin_page_register_cmd_style_double_line, NULL, "false", toggle_change_state },
{ "SplitTransactionAction", gnc_plugin_page_register_cmd_expand_transaction, NULL, "FALSE", change_toggle_state }, { "SplitTransactionAction", gnc_plugin_page_register_cmd_expand_transaction, NULL, "false", toggle_change_state },
{ "ViewStyleRadioAction", gnc_plugin_page_register_cmd_style_changed, "n", 0, change_radio_state }, { "ViewStyleRadioAction", gnc_plugin_page_register_cmd_style_changed, "i", "@i 0", radio_change_state },
}; };
static guint gnc_plugin_page_register_n_actions = G_N_ELEMENTS(gnc_plugin_page_register_actions); static guint gnc_plugin_page_register_n_actions = G_N_ELEMENTS(gnc_plugin_page_register_actions);
@ -519,10 +520,57 @@ static GncDisplayItem gnc_plugin_page_register_display_items [] =
"ReportsAcctTransReportAction", NULL, N_ ("Account Report - Single Transaction"), NULL, "ReportsAcctTransReportAction", NULL, N_ ("Account Report - Single Transaction"), NULL,
N_ ("Open a register report for the selected Transaction") N_ ("Open a register report for the selected Transaction")
}, },
/* Toggles and radio */
{
"ViewStyleDoubleLineAction", NULL, N_ ("_Double Line"), NULL,
N_ ("Show a second line with \"Action\", \"Notes\", and \"Linked Document\" for each transaction.")
},
{
"SplitTransactionAction", GNC_ICON_SPLIT_TRANS, N_ ("S_plit Transaction"), NULL,
N_ ("Show all splits in the current transaction")
},
/* Translators: This is a menu item in the View menu */
{
"ViewStyleBasicAction", NULL, N_ ("_Basic Ledger"), NULL,
N_ ("Show transactions on one or two lines")
},
/* Translators: This is a menu item in the View menu */
{
"ViewStyleAutoSplitAction", NULL, N_ ("_Auto-Split Ledger"), NULL,
N_ ("Show transactions on one or two lines and expand the current transaction")
},
/* Translators: This is a menu item in the View menu */
{
"ViewStyleJournalAction", NULL, N_ ("Transaction _Journal"), NULL,
N_ ("Show expanded transactions with all splits")
}
}; };
/** The number of display items provided by this plugin. */ /** The number of display items provided by this plugin. */
static guint gnc_plugin_page_register_n_display_items = G_N_ELEMENTS(gnc_plugin_page_register_display_items); static guint gnc_plugin_page_register_n_display_items = G_N_ELEMENTS(gnc_plugin_page_register_display_items);
/** The default menu items that need to be add to the menu */
static const gchar *gnc_plugin_load_ui_items [] =
{
"EditPlaceholder1",
"EditPlaceholder2",
"EditPlaceholder3",
"EditPlaceholder5",
"ViewPlaceholder1",
"ViewPlaceholder2",
"ViewPlaceholder3",
"ViewPlaceholder4",
"TransPlaceholder0",
"TransPlaceholder1",
"TransPlaceholder2",
"TransPlaceholder3",
"TransPlaceholder4",
"ActionsPlaceholder4",
"ActionsPlaceholder5",
"ActionsPlaceholder6",
"ReportsPlaceholder1",
NULL,
};
/** These are the "important" actions provided by the register page. /** These are the "important" actions provided by the register page.
* Their labels will appear when the toolbar is set to "Icons and * Their labels will appear when the toolbar is set to "Icons and
* important text" (e.g. GTK_TOOLBAR_BOTH_HORIZ) mode. */ * important text" (e.g. GTK_TOOLBAR_BOTH_HORIZ) mode. */
@ -549,6 +597,7 @@ static const gchar* view_style_actions[] =
"ViewStyleBasicAction", "ViewStyleBasicAction",
"ViewStyleAutoSplitAction", "ViewStyleAutoSplitAction",
"ViewStyleJournalAction", "ViewStyleJournalAction",
"ViewStyleRadioAction",
NULL NULL
}; };
@ -835,15 +884,6 @@ gnc_plugin_page_register_init (GncPluginPageRegister* plugin_page)
gnc_plugin_page_register_n_actions, gnc_plugin_page_register_n_actions,
plugin_page); plugin_page);
//FIXMEb gtk_action_group_add_toggle_actions (action_group,
// toggle_entries, n_toggle_entries,
// plugin_page);
//FIXMEb gtk_action_group_add_radio_actions (action_group,
// radio_entries_2, n_radio_entries_2,
// REG_STYLE_LEDGER,
// G_CALLBACK (gnc_plugin_page_register_cmd_style_changed),
// plugin_page);
//FIXMEb gnc_plugin_init_short_names (action_group, toolbar_labels); //FIXMEb gnc_plugin_init_short_names (action_group, toolbar_labels);
//FIXMEb gnc_plugin_set_important_actions (action_group, important_actions); //FIXMEb gnc_plugin_set_important_actions (action_group, important_actions);
@ -905,6 +945,16 @@ gnc_plugin_page_register_focus_widget (GncPluginPage* register_plugin_page)
{ {
GNCSplitReg *gsr = gnc_plugin_page_register_get_gsr (GNC_PLUGIN_PAGE(register_plugin_page)); GNCSplitReg *gsr = gnc_plugin_page_register_get_gsr (GNC_PLUGIN_PAGE(register_plugin_page));
/* Enable the Transaction menu */
GAction *action = gnc_main_window_find_action (GNC_MAIN_WINDOW(register_plugin_page->window), "TransactionAction");
g_simple_action_set_enabled (G_SIMPLE_ACTION(action), TRUE);
/* Disable the Schedule menu */
action = gnc_main_window_find_action (GNC_MAIN_WINDOW(register_plugin_page->window), "ScheduledAction");
g_simple_action_set_enabled (G_SIMPLE_ACTION(action), FALSE);
gnc_main_window_update_menu (GNC_MAIN_WINDOW(register_plugin_page->window), register_plugin_page,
gnc_plugin_load_ui_items);
gnc_plugin_page_register_ui_update (NULL, GNC_PLUGIN_PAGE_REGISTER(register_plugin_page)); gnc_plugin_page_register_ui_update (NULL, GNC_PLUGIN_PAGE_REGISTER(register_plugin_page));
gnc_split_reg_focus_on_sheet (gsr); gnc_split_reg_focus_on_sheet (gsr);
@ -1006,30 +1056,62 @@ gnc_plugin_page_register_ui_update (gpointer various,
GncPluginPageRegisterPrivate* priv; GncPluginPageRegisterPrivate* priv;
SplitRegister* reg; SplitRegister* reg;
GAction* action; GAction* action;
GNCLedgerDisplayType ledger_type;
gboolean expanded, voided, read_only = FALSE, read_only_reg = FALSE; gboolean expanded, voided, read_only = FALSE, read_only_reg = FALSE;
Transaction* trans; Transaction* trans;
GList* invoices; GList* invoices;
CursorClass cursor_class; CursorClass cursor_class;
const char* uri; const char* uri;
Account *account;
/* Set 'Split Transaction' */ /* Set 'Split Transaction' */
priv = GNC_PLUGIN_PAGE_REGISTER_GET_PRIVATE (page); priv = GNC_PLUGIN_PAGE_REGISTER_GET_PRIVATE (page);
reg = gnc_ledger_display_get_split_register (priv->ledger); reg = gnc_ledger_display_get_split_register (priv->ledger);
cursor_class = gnc_split_register_get_current_cursor_class (reg); cursor_class = gnc_split_register_get_current_cursor_class (reg);
expanded = gnc_split_register_current_trans_expanded (reg); expanded = gnc_split_register_current_trans_expanded (reg);
action = gnc_plugin_page_get_action (GNC_PLUGIN_PAGE (page),
"SplitTransactionAction"); action = gnc_plugin_page_get_action (GNC_PLUGIN_PAGE(page), "SplitTransactionAction");
g_simple_action_set_enabled (G_SIMPLE_ACTION(action), reg->style == REG_STYLE_LEDGER); g_simple_action_set_enabled (G_SIMPLE_ACTION(action), reg->style == REG_STYLE_LEDGER);
/* Set "style" radio button */
ledger_type = gnc_ledger_display_type (priv->ledger);
action = gnc_plugin_page_get_action (GNC_PLUGIN_PAGE(page), "ViewStyleRadioAction");
g_simple_action_set_enabled (G_SIMPLE_ACTION(action), ledger_type != LD_GL);
g_action_change_state (G_ACTION(action), g_variant_new_int32 (reg->style));
/* Set double line */
action = gnc_plugin_page_get_action (GNC_PLUGIN_PAGE(page), "ViewStyleDoubleLineAction");
g_action_change_state (G_ACTION(action), g_variant_new_boolean (reg->use_double_line));
/* Split Expand */
action = gnc_plugin_page_get_action (GNC_PLUGIN_PAGE(page), "SplitTransactionAction");
g_simple_action_set_enabled (G_SIMPLE_ACTION(action), reg->style == REG_STYLE_LEDGER);
g_signal_handlers_block_by_func (action, gnc_plugin_page_register_cmd_expand_transaction, page); g_signal_handlers_block_by_func (action, gnc_plugin_page_register_cmd_expand_transaction, page);
//FIXMEb gtk_toggle_action_set_active (GTK_TOGGLE_ACTION (action), expanded); g_action_change_state (G_ACTION(action), g_variant_new_boolean (expanded));
g_signal_handlers_unblock_by_func (action, gnc_plugin_page_register_cmd_expand_transaction, page); g_signal_handlers_unblock_by_func (action, gnc_plugin_page_register_cmd_expand_transaction, page);
/* Enable the FilePrintAction */
action = gnc_main_window_find_action (GNC_MAIN_WINDOW(GNC_PLUGIN_PAGE(page)->window), "FilePrintAction");
g_simple_action_set_enabled (G_SIMPLE_ACTION(action), TRUE);
/* If we are in a readonly book, or possibly a place holder /* If we are in a readonly book, or possibly a place holder
* account register make any modifying action inactive */ * account register make any modifying action inactive */
if (qof_book_is_readonly (gnc_get_current_book()) || if (qof_book_is_readonly (gnc_get_current_book()) ||
gnc_split_reg_get_read_only (priv->gsr)) gnc_split_reg_get_read_only (priv->gsr))
read_only_reg = TRUE; read_only_reg = TRUE;
account = gnc_plugin_page_register_get_account (page);
gnc_plugin_update_actionsb (gnc_plugin_page_get_action_groupb (GNC_PLUGIN_PAGE(page)),
actions_requiring_account, "sensitive",
!read_only_reg && account != NULL);
gnc_plugin_update_actionsb (gnc_plugin_page_get_action_groupb (GNC_PLUGIN_PAGE(page)),
actions_requiring_priced_account, "sensitive",
account && xaccAccountIsPriced (account));
/* Set available actions based on read only */ /* Set available actions based on read only */
trans = gnc_split_register_get_current_trans (reg); trans = gnc_split_register_get_current_trans (reg);
@ -1041,7 +1123,7 @@ gnc_plugin_page_register_ui_update (gpointer various,
for (iter = readonly_inactive_actions; *iter; ++iter) for (iter = readonly_inactive_actions; *iter; ++iter)
{ {
/* Set the action's sensitivity */ /* Set the action's sensitivity */
GAction* action = gnc_plugin_page_get_action (GNC_PLUGIN_PAGE (page), *iter); GAction* action = gnc_plugin_page_get_action (GNC_PLUGIN_PAGE(page), *iter);
g_simple_action_set_enabled (G_SIMPLE_ACTION(action), TRUE); g_simple_action_set_enabled (G_SIMPLE_ACTION(action), TRUE);
} }
main_window_update_page_set_read_only_icon (GNC_PLUGIN_PAGE(page), FALSE); main_window_update_page_set_read_only_icon (GNC_PLUGIN_PAGE(page), FALSE);
@ -1051,26 +1133,26 @@ gnc_plugin_page_register_ui_update (gpointer various,
voided = xaccTransHasSplitsInState (trans, VREC); voided = xaccTransHasSplitsInState (trans, VREC);
action = gnc_plugin_page_get_action (GNC_PLUGIN_PAGE (page), action = gnc_plugin_page_get_action (GNC_PLUGIN_PAGE(page),
"CutTransactionAction"); "CutTransactionAction");
g_simple_action_set_enabled (G_SIMPLE_ACTION(action), !read_only & !voided); g_simple_action_set_enabled (G_SIMPLE_ACTION(action), !read_only & !voided);
action = gnc_plugin_page_get_action (GNC_PLUGIN_PAGE (page), action = gnc_plugin_page_get_action (GNC_PLUGIN_PAGE(page),
"PasteTransactionAction"); "PasteTransactionAction");
g_simple_action_set_enabled (G_SIMPLE_ACTION(action), !read_only & !voided); g_simple_action_set_enabled (G_SIMPLE_ACTION(action), !read_only & !voided);
action = gnc_plugin_page_get_action (GNC_PLUGIN_PAGE (page), action = gnc_plugin_page_get_action (GNC_PLUGIN_PAGE(page),
"DeleteTransactionAction"); "DeleteTransactionAction");
g_simple_action_set_enabled (G_SIMPLE_ACTION(action), !read_only & !voided); g_simple_action_set_enabled (G_SIMPLE_ACTION(action), !read_only & !voided);
if (cursor_class == CURSOR_CLASS_SPLIT) if (cursor_class == CURSOR_CLASS_SPLIT)
{ {
action = gnc_plugin_page_get_action (GNC_PLUGIN_PAGE (page), action = gnc_plugin_page_get_action (GNC_PLUGIN_PAGE(page),
"DuplicateTransactionAction"); "DuplicateTransactionAction");
g_simple_action_set_enabled (G_SIMPLE_ACTION(action), !read_only & !voided); g_simple_action_set_enabled (G_SIMPLE_ACTION(action), !read_only & !voided);
} }
action = gnc_plugin_page_get_action (GNC_PLUGIN_PAGE (page), action = gnc_plugin_page_get_action (GNC_PLUGIN_PAGE(page),
"RemoveTransactionSplitsAction"); "RemoveTransactionSplitsAction");
g_simple_action_set_enabled (G_SIMPLE_ACTION(action), !read_only & !voided); g_simple_action_set_enabled (G_SIMPLE_ACTION(action), !read_only & !voided);
@ -1078,14 +1160,14 @@ gnc_plugin_page_register_ui_update (gpointer various,
if (read_only) if (read_only)
voided = TRUE; voided = TRUE;
action = gnc_plugin_page_get_action (GNC_PLUGIN_PAGE (page), action = gnc_plugin_page_get_action (GNC_PLUGIN_PAGE(page),
"VoidTransactionAction"); "VoidTransactionAction");
g_simple_action_set_enabled (G_SIMPLE_ACTION(action), !voided); g_simple_action_set_enabled (G_SIMPLE_ACTION(action), !voided);
if (read_only) if (read_only)
voided = FALSE; voided = FALSE;
action = gnc_plugin_page_get_action (GNC_PLUGIN_PAGE (page), action = gnc_plugin_page_get_action (GNC_PLUGIN_PAGE(page),
"UnvoidTransactionAction"); "UnvoidTransactionAction");
g_simple_action_set_enabled (G_SIMPLE_ACTION(action), voided); g_simple_action_set_enabled (G_SIMPLE_ACTION(action), voided);
} }
@ -1103,7 +1185,7 @@ gnc_plugin_page_register_ui_update (gpointer various,
- it is an invoice transaction - it is an invoice transaction
- it has splits with an invoice associated with it - it has splits with an invoice associated with it
*/ */
action = gnc_plugin_page_get_action (GNC_PLUGIN_PAGE (page), action = gnc_plugin_page_get_action (GNC_PLUGIN_PAGE(page),
"JumpLinkedInvoiceAction"); "JumpLinkedInvoiceAction");
if (trans) if (trans)
{ {
@ -1112,7 +1194,7 @@ gnc_plugin_page_register_ui_update (gpointer various,
g_list_free (invoices); g_list_free (invoices);
} }
gnc_plugin_business_split_reg_ui_update (GNC_PLUGIN_PAGE (page)); gnc_plugin_business_split_reg_ui_update (GNC_PLUGIN_PAGE(page));
/* If we are read only, make any modifying action inactive */ /* If we are read only, make any modifying action inactive */
if (read_only_reg) if (read_only_reg)
@ -1121,7 +1203,7 @@ gnc_plugin_page_register_ui_update (gpointer various,
for (iter = readonly_inactive_actions; *iter; ++iter) for (iter = readonly_inactive_actions; *iter; ++iter)
{ {
/* Set the action's sensitivity */ /* Set the action's sensitivity */
GAction* action = gnc_plugin_page_get_action (GNC_PLUGIN_PAGE (page), *iter); GAction* action = gnc_plugin_page_get_action (GNC_PLUGIN_PAGE(page), *iter);
g_simple_action_set_enabled (G_SIMPLE_ACTION(action), FALSE); g_simple_action_set_enabled (G_SIMPLE_ACTION(action), FALSE);
} }
main_window_update_page_set_read_only_icon (GNC_PLUGIN_PAGE(page), TRUE); main_window_update_page_set_read_only_icon (GNC_PLUGIN_PAGE(page), TRUE);
@ -1129,22 +1211,39 @@ gnc_plugin_page_register_ui_update (gpointer various,
/* Modifying action descriptions based on cursor class */ /* Modifying action descriptions based on cursor class */
{ {
GtkWidget *menu_item;
const char** iter, **label_iter, **tooltip_iter; const char** iter, **label_iter, **tooltip_iter;
gboolean curr_label_trans = FALSE; gboolean curr_label_trans = FALSE;
iter = tran_vs_split_actions; iter = tran_vs_split_actions;
action = gnc_plugin_page_get_action (GNC_PLUGIN_PAGE (page), *iter); action = gnc_plugin_page_get_action (GNC_PLUGIN_PAGE(page), *iter);
label_iter = tran_action_labels; label_iter = tran_action_labels;
//FIXMEb if (g_strcmp0 (gtk_action_get_label (action), _ (*label_iter)) == 0)
// curr_label_trans = TRUE; menu_item = gnc_main_window_menu_find_menu_item (GNC_MAIN_WINDOW(GNC_PLUGIN_PAGE(page)->window),
*iter);
if (menu_item == NULL)
return;
PINFO("menu_item %p label is '%s', iter label is '%s'", menu_item,
gtk_menu_item_get_label (GTK_MENU_ITEM(menu_item)), _(*label_iter));
if (g_strcmp0 (gtk_menu_item_get_label (GTK_MENU_ITEM(menu_item)), _ (*label_iter)) == 0)
curr_label_trans = TRUE;
if ((cursor_class == CURSOR_CLASS_SPLIT) && curr_label_trans) if ((cursor_class == CURSOR_CLASS_SPLIT) && curr_label_trans)
{ {
label_iter = split_action_labels; label_iter = split_action_labels;
tooltip_iter = split_action_tips; tooltip_iter = split_action_tips;
for (iter = tran_vs_split_actions; *iter; ++iter) for (iter = tran_vs_split_actions; *iter; ++iter)
{ {
GtkWidget *menu_item = gnc_main_window_menu_find_menu_item (GNC_MAIN_WINDOW(GNC_PLUGIN_PAGE(page)->window),
*iter);
PINFO("split menu_item %p label is '%s', iter label is '%s'", menu_item,
gtk_menu_item_get_label (GTK_MENU_ITEM(menu_item)), *iter);
/* Adjust the action's label and tooltip */ /* Adjust the action's label and tooltip */
action = gnc_plugin_page_get_action (GNC_PLUGIN_PAGE (page), *iter); action = gnc_plugin_page_get_action (GNC_PLUGIN_PAGE (page), *iter);
//FIXMEb gtk_action_set_label (action, _ (*label_iter)); gtk_menu_item_set_label (GTK_MENU_ITEM(menu_item), _ (*label_iter));
//FIXMEb gtk_action_set_tooltip (action, _ (*tooltip_iter)); //FIXMEb gtk_action_set_tooltip (action, _ (*tooltip_iter));
++label_iter; ++label_iter;
++tooltip_iter; ++tooltip_iter;
@ -1156,9 +1255,15 @@ gnc_plugin_page_register_ui_update (gpointer various,
tooltip_iter = tran_action_tips; tooltip_iter = tran_action_tips;
for (iter = tran_vs_split_actions; *iter; ++iter) for (iter = tran_vs_split_actions; *iter; ++iter)
{ {
GtkWidget *menu_item = gnc_main_window_menu_find_menu_item (GNC_MAIN_WINDOW(GNC_PLUGIN_PAGE(page)->window),
*iter);
PINFO("trans menu_item %p label is '%s', iter label is '%s'", menu_item,
gtk_menu_item_get_label (GTK_MENU_ITEM(menu_item)), *iter);
/* Adjust the action's label and tooltip */ /* Adjust the action's label and tooltip */
action = gnc_plugin_page_get_action (GNC_PLUGIN_PAGE (page), *iter); action = gnc_plugin_page_get_action (GNC_PLUGIN_PAGE (page), *iter);
//FIXMEb gtk_action_set_label (action, _ (*label_iter)); gtk_menu_item_set_label (GTK_MENU_ITEM(menu_item), _ (*label_iter));
//FIXMEb gtk_action_set_tooltip (action, _ (*tooltip_iter)); //FIXMEb gtk_action_set_tooltip (action, _ (*tooltip_iter));
++label_iter; ++label_iter;
++tooltip_iter; ++tooltip_iter;
@ -1181,7 +1286,11 @@ gnc_plugin_page_register_ui_initial_state (GncPluginPageRegister* page)
priv = GNC_PLUGIN_PAGE_REGISTER_GET_PRIVATE (page); priv = GNC_PLUGIN_PAGE_REGISTER_GET_PRIVATE (page);
account = gnc_plugin_page_register_get_account (page); account = gnc_plugin_page_register_get_account (page);
simple_action_group = gnc_plugin_page_get_action_groupb (GNC_PLUGIN_PAGE (page));
/* Get the action group */
simple_action_group = gnc_plugin_page_get_action_groupb (GNC_PLUGIN_PAGE(page));
g_return_if_fail (G_IS_SIMPLE_ACTION_GROUP(simple_action_group));
gnc_plugin_update_actionsb (simple_action_group, actions_requiring_account, gnc_plugin_update_actionsb (simple_action_group, actions_requiring_account,
"sensitive", is_readwrite && account != NULL); "sensitive", is_readwrite && account != NULL);
@ -1192,35 +1301,22 @@ gnc_plugin_page_register_ui_initial_state (GncPluginPageRegister* page)
/* Set "style" radio button */ /* Set "style" radio button */
ledger_type = gnc_ledger_display_type (priv->ledger); ledger_type = gnc_ledger_display_type (priv->ledger);
gnc_plugin_update_actionsb (simple_action_group, view_style_actions, action = gnc_plugin_page_get_action (GNC_PLUGIN_PAGE(page), "ViewStyleRadioAction");
"sensitive", ledger_type == LD_SINGLE); g_simple_action_set_enabled (G_SIMPLE_ACTION(action), ledger_type == LD_SINGLE);
reg = gnc_ledger_display_get_split_register (priv->ledger); reg = gnc_ledger_display_get_split_register (priv->ledger);
//FIXMEb for (i = n_radio_entries_2 - 1; i > 0; i--)
// {
// DEBUG (" index %d: comparing %x to %x", i, radio_entries_2[i].value,
// reg->style);
// if (radio_entries_2[i].value == reg->style)
// {
// DEBUG ("match");
// break;
// }
// }
/* Either a match was found, or fell out with i = 0 */ g_signal_handlers_block_by_func (action,
//FIXMEb action = g_action_map_lookup_action (G_ACTION_MAP(simple_action_group), radio_entries_2[i].name); gnc_plugin_page_register_cmd_style_changed, page);
// g_signal_handlers_block_by_func (action, g_action_change_state (G_ACTION(action), g_variant_new_int32 (reg->style));
// gnc_plugin_page_register_cmd_style_changed, page); g_signal_handlers_unblock_by_func (action,
//FIXMEb gtk_toggle_action_set_active (GTK_TOGGLE_ACTION (action), TRUE); gnc_plugin_page_register_cmd_style_changed, page);
// g_signal_handlers_unblock_by_func (action,
// gnc_plugin_page_register_cmd_style_changed, page);
/* Set "double line" toggle button */ /* Set "double line" toggle button */
action = g_action_map_lookup_action (G_ACTION_MAP(simple_action_group), "ViewStyleDoubleLineAction"); action = gnc_plugin_page_get_action (GNC_PLUGIN_PAGE(page), "ViewStyleDoubleLineAction");
g_signal_handlers_block_by_func (action, g_signal_handlers_block_by_func (action,
gnc_plugin_page_register_cmd_style_double_line, page); gnc_plugin_page_register_cmd_style_double_line, page);
//FIXMEb gtk_toggle_action_set_active (GTK_TOGGLE_ACTION (action), g_action_change_state (G_ACTION(action), g_variant_new_boolean (reg->use_double_line));
// reg->use_double_line);
g_signal_handlers_unblock_by_func (action, g_signal_handlers_unblock_by_func (action,
gnc_plugin_page_register_cmd_style_double_line, page); gnc_plugin_page_register_cmd_style_double_line, page);
} }
@ -1698,6 +1794,7 @@ gnc_plugin_page_register_restore_edit_menu (GncPluginPage* page,
const gchar* group_name) const gchar* group_name)
{ {
GAction* action; GAction* action;
GVariant *state;
GError* error = NULL; GError* error = NULL;
gchar* style_name; gchar* style_name;
gint i; gint i;
@ -1722,16 +1819,22 @@ gnc_plugin_page_register_restore_edit_menu (GncPluginPage* page,
if (i <= REG_STYLE_JOURNAL) if (i <= REG_STYLE_JOURNAL)
{ {
DEBUG ("Setting style: %d", i); DEBUG ("Setting style: %d", i);
//FIXMEb action = gnc_plugin_page_get_action (page, radio_entries_2[i].name); action = gnc_plugin_page_get_action (page, "ViewStyleRadioAction");
// gtk_toggle_action_set_active (GTK_TOGGLE_ACTION (action), TRUE); g_action_activate (G_ACTION(action), g_variant_new_int32 (i));
} }
/* Update the double line action on this page */ /* Update the double line action on this page */
use_double_line = use_double_line = g_key_file_get_boolean (key_file, group_name,
g_key_file_get_boolean (key_file, group_name, KEY_DOUBLE_LINE, &error); KEY_DOUBLE_LINE, &error);
DEBUG ("Setting double_line_mode: %d", use_double_line); DEBUG ("Setting double_line_mode: %d", use_double_line);
//FIXMEb action = gnc_plugin_page_get_action (page, "ViewStyleDoubleLineAction"); action = gnc_plugin_page_get_action (page, "ViewStyleDoubleLineAction");
// gtk_toggle_action_set_active (GTK_TOGGLE_ACTION (action), use_double_line);
state = g_action_get_state (G_ACTION(action));
if (use_double_line != g_variant_get_boolean (state))
g_action_activate (G_ACTION(action), NULL);
g_variant_unref (state);
LEAVE (" "); LEAVE (" ");
} }
@ -1859,13 +1962,10 @@ gnc_plugin_page_register_update_edit_menu (GncPluginPage* page, gboolean hide)
action = gnc_plugin_page_get_action (page, "EditCopyAction"); action = gnc_plugin_page_get_action (page, "EditCopyAction");
g_simple_action_set_enabled (G_SIMPLE_ACTION(action), can_copy); g_simple_action_set_enabled (G_SIMPLE_ACTION(action), can_copy);
//FIXMEb gtk_action_set_visible (action, !hide || can_copy);
action = gnc_plugin_page_get_action (page, "EditCutAction"); action = gnc_plugin_page_get_action (page, "EditCutAction");
g_simple_action_set_enabled (G_SIMPLE_ACTION(action), can_cut); g_simple_action_set_enabled (G_SIMPLE_ACTION(action), can_cut);
//FIXMEb gtk_action_set_visible (action, !hide || can_cut);
action = gnc_plugin_page_get_action (page, "EditPasteAction"); action = gnc_plugin_page_get_action (page, "EditPasteAction");
g_simple_action_set_enabled (G_SIMPLE_ACTION(action), can_paste); g_simple_action_set_enabled (G_SIMPLE_ACTION(action), can_paste);
//FIXMEb gtk_action_set_visible (action, !hide || can_paste);
} }
static gboolean is_scrubbing = FALSE; static gboolean is_scrubbing = FALSE;
@ -4359,7 +4459,6 @@ gnc_plugin_page_register_cmd_style_changed (GSimpleAction *simple,
GncPluginPageRegister* page = user_data; GncPluginPageRegister* page = user_data;
GncPluginPageRegisterPrivate* priv; GncPluginPageRegisterPrivate* priv;
SplitRegisterStyle value; SplitRegisterStyle value;
gint current;
ENTER ("(action %p, page %p)", simple, page); ENTER ("(action %p, page %p)", simple, page);
@ -4367,10 +4466,11 @@ gnc_plugin_page_register_cmd_style_changed (GSimpleAction *simple,
priv = GNC_PLUGIN_PAGE_REGISTER_GET_PRIVATE (page); priv = GNC_PLUGIN_PAGE_REGISTER_GET_PRIVATE (page);
current = g_variant_get_int16 (parameter); value = (SplitRegisterStyle)g_variant_get_int32 (parameter);
//FIXMEb value = gtk_radio_action_get_current_value (current); g_action_change_state (G_ACTION(simple), parameter);
// gnc_split_reg_change_style (priv->gsr, value, priv->enable_refresh);
gnc_split_reg_change_style (priv->gsr, value, priv->enable_refresh);
gnc_plugin_page_register_ui_update (NULL, page); gnc_plugin_page_register_ui_update (NULL, page);
LEAVE (" "); LEAVE (" ");
@ -4396,10 +4496,10 @@ gnc_plugin_page_register_cmd_style_double_line (GSimpleAction *simple,
state = g_action_get_state (G_ACTION(simple)); state = g_action_get_state (G_ACTION(simple));
use_double_line = g_variant_get_boolean (state);
g_action_change_state (G_ACTION(simple), g_variant_new_boolean (!g_variant_get_boolean (state))); g_action_change_state (G_ACTION(simple), g_variant_new_boolean (!g_variant_get_boolean (state)));
use_double_line = !g_variant_get_boolean (state);
if (use_double_line != reg->use_double_line) if (use_double_line != reg->use_double_line)
{ {
gnc_split_register_config (reg, reg->type, reg->style, use_double_line); gnc_split_register_config (reg, reg->type, reg->style, use_double_line);
@ -4871,7 +4971,7 @@ gnc_plugin_page_register_cmd_expand_transaction (GSimpleAction *simple,
g_action_change_state (G_ACTION(simple), g_variant_new_boolean (!g_variant_get_boolean (state))); g_action_change_state (G_ACTION(simple), g_variant_new_boolean (!g_variant_get_boolean (state)));
expand = g_variant_get_boolean (state); expand = !g_variant_get_boolean (state);
gnc_split_register_expand_current_trans (reg, expand); gnc_split_register_expand_current_trans (reg, expand);
g_variant_unref (state); g_variant_unref (state);
@ -5005,7 +5105,8 @@ gnc_plugin_page_register_cmd_schedule (GSimpleAction *simple,
LEAVE (" "); LEAVE (" ");
} }
static void scrub_split (Split *split) static void
scrub_split (Split *split)
{ {
Account *acct; Account *acct;
Transaction *trans; Transaction *trans;

View File

@ -19,6 +19,7 @@
<file>ui/gnc-plugin-report-system.ui</file> <file>ui/gnc-plugin-report-system.ui</file>
<file>ui/gnc-plugin-page-account-tree.ui</file> <file>ui/gnc-plugin-page-account-tree.ui</file>
<file>ui/gnc-plugin-page-register.ui</file>
<file>ui/gnc-plugin-ofx.ui</file> <file>ui/gnc-plugin-ofx.ui</file>
<file>ui/gnc-plugin-aqbanking.ui</file> <file>ui/gnc-plugin-aqbanking.ui</file>

View File

@ -0,0 +1,709 @@
<?xml version="1.0"?>
<interface>
<menu id="EditPlaceholder1">
<item>
<attribute name="label" translatable="yes">Assign as payment...</attribute>
<attribute name="action">gnc-plugin-business-actions.RegisterAssignPayment</attribute>
<attribute name="tooltip" translatable="yes">Assign the selected transaction as payment</attribute>
<attribute name="temp" translatable="no">yes</attribute>
<attribute name="hidden-when">action-disabled</attribute>
</item>
<item>
<attribute name="label" translatable="yes">Edit payment...</attribute>
<attribute name="action">gnc-plugin-business-actions.RegisterEditPayment</attribute>
<attribute name="tooltip" translatable="yes">Edit the payment this transaction is a part of</attribute>
<attribute name="temp" translatable="no">yes</attribute>
<attribute name="hidden-when">action-disabled</attribute>
</item>
</menu>
<menu id="EditPlaceholder2">
<item>
<attribute name="label" translatable="yes">_Edit Account</attribute>
<attribute name="action">GncPluginPageRegisterActions.EditEditAccountAction</attribute>
<attribute name="accel">&lt;Primary&gt;e</attribute>
<attribute name="tooltip" translatable="yes">Edit the selected account</attribute>
<attribute name="temp" translatable="no">yes</attribute>
</item>
<item>
<attribute name="label" translatable="yes">F_ind Account</attribute>
<attribute name="action">GncPluginPageRegisterActions.EditFindAccountAction</attribute>
<attribute name="accel">&lt;Primary&gt;i</attribute>
<attribute name="tooltip" translatable="yes">Find an account</attribute>
<attribute name="temp" translatable="no">yes</attribute>
</item>
</menu>
<menu id="EditPlaceholder3">
<item>
<attribute name="label" translatable="yes">_Find...</attribute>
<attribute name="action">gnc-plugin-basic-commands-actions.EditFindTransactionsAction</attribute>
<attribute name="accel">&lt;Primary&gt;f</attribute>
<attribute name="tooltip" translatable="yes">Find transactions with a search</attribute>
<attribute name="temp" translatable="no">yes</attribute>
</item>
</menu>
<menu id="EditPlaceholder5">
<item>
<!-- Translators: remember to reuse this translation in dialog-account.glade -->
<attribute name="label" translatable="yes">Ta_x Report Options</attribute>
<attribute name="action">GncPluginPageRegisterActions.EditTaxOptionsAction</attribute>
<!-- Translators: currently implemented are, US: income tax and DE: VAT, So adjust this string -->
<attribute name="tooltip" translatable="yes">Setup relevant accounts for tax reports, e.g. US income tax</attribute>
<attribute name="temp" translatable="no">yes</attribute>
</item>
</menu>
<menu id="ViewPlaceholder1">
<item>
<attribute name="label" translatable="yes">_Basic Ledger</attribute>
<attribute name="action">GncPluginPageRegisterActions.ViewStyleRadioAction</attribute>
<attribute name="target" type="i">0</attribute>
<attribute name="tooltip" translatable="yes">Show transactions on one or two lines</attribute>
<attribute name="temp" translatable="no">yes</attribute>
</item>
<item>
<attribute name="label" translatable="yes">_Auto-Split Ledger</attribute>
<attribute name="action">GncPluginPageRegisterActions.ViewStyleRadioAction</attribute>
<attribute name="target" type="i">1</attribute>
<attribute name="tooltip" translatable="yes">Show transactions on one or two lines and expand the current transaction</attribute>
<attribute name="temp" translatable="no">yes</attribute>
</item>
<item>
<attribute name="label" translatable="yes">Transaction _Journal</attribute>
<attribute name="action">GncPluginPageRegisterActions.ViewStyleRadioAction</attribute>
<attribute name="target" type="i">2</attribute>
<attribute name="tooltip" translatable="yes">Show expanded transactions with all splits</attribute>
<attribute name="temp" translatable="no">yes</attribute>
</item>
</menu>
<menu id="ViewPlaceholder2">
<item>
<attribute name="label" translatable="yes">_Double Line</attribute>
<attribute name="action">GncPluginPageRegisterActions.ViewStyleDoubleLineAction</attribute>
<attribute name="tooltip" translatable="yes">Show a second line with \"Action\", \"Notes\", and \"Linked Document\" for each transaction</attribute>
<attribute name="temp" translatable="no">yes</attribute>
</item>
</menu>
<menu id="ViewPlaceholder3">
<item>
<attribute name="label" translatable="no">_Sort By...</attribute>
<attribute name="action">GncPluginPageRegisterActions.ViewSortByAction</attribute>
<attribute name="temp" translatable="no">yes</attribute>
</item>
<item>
<attribute name="label" translatable="no">_Filter By...</attribute>
<attribute name="action">GncPluginPageRegisterActions.ViewFilterByAction</attribute>
<attribute name="temp" translatable="no">yes</attribute>
</item>
</menu>
<menu id="ViewPlaceholder4">
<item>
<attribute name="label" translatable="yes">_Refresh</attribute>
<attribute name="action">GncPluginPageRegisterActions.ViewRefreshAction</attribute>
<attribute name="accel">&lt;Primary&gt;r</attribute>
<attribute name="tooltip" translatable="yes">Refresh this window</attribute>
<attribute name="temp" translatable="no">yes</attribute>
</item>
</menu>
<menu id="TransPlaceholder0">
<item>
<attribute name="label" translatable="yes">Cu_t Transaction</attribute>
<attribute name="action">GncPluginPageRegisterActions.CutTransactionAction</attribute>
<attribute name="tooltip" translatable="yes">Cut the selected transaction into clipboard</attribute>
<attribute name="temp" translatable="no">yes</attribute>
</item>
<item>
<attribute name="label" translatable="yes">_Copy Transaction</attribute>
<attribute name="action">GncPluginPageRegisterActions.CopyTransactionAction</attribute>
<attribute name="tooltip" translatable="yes">Copy the selected transaction into clipboard</attribute>
<attribute name="temp" translatable="no">yes</attribute>
</item>
<item>
<attribute name="label" translatable="yes">_Paste Transaction</attribute>
<attribute name="action">GncPluginPageRegisterActions.PasteTransactionAction</attribute>
<attribute name="tooltip" translatable="yes">Paste the transaction from the clipboard</attribute>
<attribute name="temp" translatable="no">yes</attribute>
</item>
<item>
<attribute name="label" translatable="yes">Dup_licate Transaction</attribute>
<attribute name="action">GncPluginPageRegisterActions.DuplicateTransactionAction</attribute>
<attribute name="tooltip" translatable="yes">Make a copy of the current transaction</attribute>
<attribute name="temp" translatable="no">yes</attribute>
</item>
<item>
<attribute name="label" translatable="yes">_Delete Transaction</attribute>
<attribute name="action">GncPluginPageRegisterActions.DeleteTransactionAction</attribute>
<attribute name="tooltip" translatable="yes">Delete the current transaction</attribute>
<attribute name="temp" translatable="no">yes</attribute>
</item>
<item>
<attribute name="label" translatable="yes">Remo_ve Other Splits</attribute>
<attribute name="action">GncPluginPageRegisterActions.RemoveTransactionSplitsAction</attribute>
<attribute name="tooltip" translatable="yes">Remove all splits in the current transaction</attribute>
<attribute name="temp" translatable="no">yes</attribute>
</item>
</menu>
<menu id="TransPlaceholder1">
<item>
<attribute name="label" translatable="yes">_Enter Transaction</attribute>
<attribute name="action">GncPluginPageRegisterActions.RecordTransactionAction</attribute>
<attribute name="tooltip" translatable="yes">Record the current transaction</attribute>
<attribute name="temp" translatable="no">yes</attribute>
</item>
<item>
<attribute name="label" translatable="yes">Ca_ncel Transaction</attribute>
<attribute name="action">GncPluginPageRegisterActions.CancelTransactionAction</attribute>
<attribute name="tooltip" translatable="yes">Cancel the current transaction</attribute>
<attribute name="temp" translatable="no">yes</attribute>
</item>
</menu>
<menu id="TransPlaceholder2">
<item>
<attribute name="label" translatable="yes">_Void Transaction</attribute>
<attribute name="action">GncPluginPageRegisterActions.VoidTransactionAction</attribute>
<attribute name="tooltip" translatable="yes">Void the current transaction</attribute>
<attribute name="temp" translatable="no">yes</attribute>
</item>
<item>
<attribute name="label" translatable="yes">_Unvoid Transaction</attribute>
<attribute name="action">GncPluginPageRegisterActions.UnvoidTransactionAction</attribute>
<attribute name="tooltip" translatable="yes">Unvoid the current transaction</attribute>
<attribute name="temp" translatable="no">yes</attribute>
</item>
<item>
<attribute name="label" translatable="yes">Add _Reversing Transaction</attribute>
<attribute name="action">GncPluginPageRegisterActions.ReverseTransactionAction</attribute>
<attribute name="tooltip" translatable="yes">Add a reversing transaction</attribute>
<attribute name="temp" translatable="no">yes</attribute>
</item>
</menu>
<menu id="TransPlaceholder3">
<item>
<attribute name="label" translatable="yes">Manage Document Link...</attribute>
<attribute name="action">GncPluginPageRegisterActions.LinkTransactionAction</attribute>
<attribute name="tooltip" translatable="yes">Add, change, or unlink the document linked with the current transaction</attribute>
<attribute name="temp" translatable="no">yes</attribute>
</item>
<item>
<attribute name="label" translatable="yes">_Open Linked Document</attribute>
<attribute name="action">GncPluginPageRegisterActions.LinkedTransactionOpenAction</attribute>
<attribute name="tooltip" translatable="yes">Open the linked document for the current transaction</attribute>
<attribute name="temp" translatable="no">yes</attribute>
</item>
</menu>
<menu id="TransPlaceholder4">
<item>
<attribute name="label" translatable="yes">Jump to Invoice</attribute>
<attribute name="action">GncPluginPageRegisterActions.JumpLinkedInvoiceAction</attribute>
<attribute name="tooltip" translatable="yes">Jump to the linked bill, invoice, or voucher</attribute>
<attribute name="temp" translatable="no">yes</attribute>
</item>
</menu>
<menu id="ActionsPlaceholder4">
<item>
<attribute name="label" translatable="yes">_Transfer...</attribute>
<attribute name="action">GncPluginPageRegisterActions.ActionsTransferAction</attribute>
<attribute name="accel">&lt;Primary&gt;t</attribute>
<attribute name="tooltip" translatable="yes">Transfer funds from one account to another</attribute>
<attribute name="temp" translatable="no">yes</attribute>
</item>
<item>
<attribute name="label" translatable="yes">_Reconcile...</attribute>
<attribute name="action">GncPluginPageRegisterActions.ActionsReconcileAction</attribute>
<attribute name="tooltip" translatable="yes">Reconcile the selected account</attribute>
<attribute name="temp" translatable="no">yes</attribute>
</item>
<item>
<attribute name="label" translatable="yes">_Auto-clear...</attribute>
<attribute name="action">GncPluginPageRegisterActions.ActionsAutoClearAction</attribute>
<attribute name="tooltip" translatable="yes">Automatically clear individual transactions, so as to reach a certain cleared amount</attribute>
<attribute name="temp" translatable="no">yes</attribute>
</item>
<item>
<attribute name="label" translatable="yes">Stock Ass_istant</attribute>
<attribute name="action">GncPluginPageRegisterActions.ActionsStockAssistantAction</attribute>
<attribute name="tooltip" translatable="yes">Stock Assistant</attribute>
<attribute name="temp" translatable="no">yes</attribute>
</item>
<item>
<attribute name="label" translatable="yes">Stoc_k Split...</attribute>
<attribute name="action">GncPluginPageRegisterActions.ActionsStockSplitAction</attribute>
<attribute name="tooltip" translatable="yes">Record a stock split or a stock merger</attribute>
<attribute name="temp" translatable="no">yes</attribute>
</item>
<item>
<attribute name="label" translatable="yes">View _Lots...</attribute>
<attribute name="action">GncPluginPageRegisterActions.ActionsLotsAction</attribute>
<attribute name="tooltip" translatable="yes">Bring up the lot viewer/editor window</attribute>
<attribute name="temp" translatable="no">yes</attribute>
</item>
</menu>
<menu id="ActionsPlaceholder5">
<item>
<attribute name="label" translatable="yes">_Blank Transaction</attribute>
<attribute name="action">GncPluginPageRegisterActions.BlankTransactionAction</attribute>
<attribute name="accel">&lt;Primary&gt;Page_Down</attribute>
<attribute name="tooltip" translatable="yes">Move to the blank transaction at the bottom of the register</attribute>
<attribute name="temp" translatable="no">yes</attribute>
</item>
<item>
<attribute name="label" translatable="yes">_Got to Date</attribute>
<attribute name="action">GncPluginPageRegisterActions.GotoDateAction</attribute>
<attribute name="accel">&lt;Primary&gt;g</attribute>
<attribute name="tooltip" translatable="yes">Move to the split at the specified date</attribute>
<attribute name="temp" translatable="no">yes</attribute>
</item>
<item>
<attribute name="label" translatable="yes">S_plit Transaction</attribute>
<attribute name="action">GncPluginPageRegisterActions.SplitTransactionAction</attribute>
<attribute name="tooltip" translatable="yes">Show all splits in the current transaction</attribute>
<attribute name="temp" translatable="no">yes</attribute>
</item>
<item>
<attribute name="label" translatable="yes">Edit E_xchange Rate</attribute>
<attribute name="action">GncPluginPageRegisterActions.EditExchangeRateAction</attribute>
<attribute name="tooltip" translatable="yes">Edit the exchange rate for the current transaction</attribute>
<attribute name="temp" translatable="no">yes</attribute>
</item>
<item>
<attribute name="label" translatable="yes">Sche_dule...</attribute>
<attribute name="action">GncPluginPageRegisterActions.ScheduleTransactionAction</attribute>
<attribute name="tooltip" translatable="yes">Create a Scheduled Transaction with the current transaction as a template</attribute>
<attribute name="temp" translatable="no">yes</attribute>
</item>
<item>
<attribute name="label" translatable="yes">_Jump to the other account</attribute>
<attribute name="action">GncPluginPageRegisterActions.JumpTransactionAction</attribute>
<attribute name="tooltip" translatable="yes">Open a new register tab for the other account with focus on this transaction</attribute>
<attribute name="temp" translatable="no">yes</attribute>
</item>
</menu>
<menu id="ActionsPlaceholder6">
<submenu>
<attribute name="label" translatable="yes">_Check &amp; Repair</attribute>
<attribute name="action">mainwin.ScrubMenuAction</attribute>
<attribute name="temp" translatable="no">yes</attribute>
<item>
<attribute name="label" translatable="yes">All Transactions</attribute>
<attribute name="action">GncPluginPageRegisterActions.ScrubAllAction</attribute>
<attribute name="tempx" translatable="no">yes</attribute>
</item>
<item>
<attribute name="label" translatable="yes">This transaction</attribute>
<attribute name="action">GncPluginPageRegisterActions.ScrubCurrentAction</attribute>
<attribute name="tempx" translatable="no">yes</attribute>
</item>
</submenu>
</menu>
<menu id="ReportsPlaceholder1">
<item>
<attribute name="label" translatable="yes">Account Report</attribute>
<attribute name="action">GncPluginPageRegisterActions.ReportsAccountReportAction</attribute>
<attribute name="tooltip" translatable="yes">Open a register report for this Account</attribute>
<attribute name="temp" translatable="no">yes</attribute>
</item>
<item>
<attribute name="label" translatable="yes">Account Report - Single Transaction</attribute>
<attribute name="action">GncPluginPageRegisterActions.ReportsAcctTransReportAction</attribute>
<attribute name="tooltip" translatable="yes">Open a register report for the selected Transaction</attribute>
<attribute name="temp" translatable="no">yes</attribute>
</item>
</menu>
<menu id="mainwin-popup">
<section>
<item>
<attribute name="label" translatable="yes">_Sort By...</attribute>
<attribute name="action">GncPluginPageRegisterActions.ViewSortByAction</attribute>
<attribute name="tooltip" translatable="yes">Filter accounts</attribute>
</item>
<item>
<attribute name="label" translatable="yes">_Filter By...</attribute>
<attribute name="action">GncPluginPageRegisterActions.ViewFilterByAction</attribute>
<attribute name="tooltip" translatable="yes">Filter accounts</attribute>
</item>
<item>
<attribute name="label" translatable="yes">Re_name Page</attribute>
<attribute name="action">mainwin.ActionsRenamePageAction</attribute>
<attribute name="tooltip" translatable="yes">Rename this page</attribute>
</item>
</section>
<section>
<item>
<attribute name="label" translatable="yes">Dup_licate Transaction</attribute>
<attribute name="action">GncPluginPageRegisterActions.DuplicateTransactionAction</attribute>
<attribute name="tooltip" translatable="yes">Make a copy of the current transaction</attribute>
</item>
<item>
<attribute name="label" translatable="yes">_Delete Transaction</attribute>
<attribute name="action">GncPluginPageRegisterActions.DeleteTransactionAction</attribute>
<attribute name="tooltip" translatable="yes">Delete the current transaction</attribute>
</item>
<item>
<attribute name="label" translatable="yes">Remo_ve Other Splits</attribute>
<attribute name="action">GncPluginPageRegisterActions.RemoveTransactionSplitsAction</attribute>
<attribute name="tooltip" translatable="yes">Remove all splits in the current transaction</attribute>
</item>
</section>
<section>
<item>
<attribute name="label" translatable="yes">_Enter Transaction</attribute>
<attribute name="action">GncPluginPageRegisterActions.RecordTransactionAction</attribute>
<attribute name="tooltip" translatable="yes">Record the current transaction</attribute>
</item>
<item>
<attribute name="label" translatable="yes">Ca_ncel Transaction</attribute>
<attribute name="action">GncPluginPageRegisterActions.CancelTransactionAction</attribute>
<attribute name="tooltip" translatable="yes">Cancel the current transaction</attribute>
</item>
</section>
<section>
<item>
<attribute name="label" translatable="yes">_Manage Document Link...</attribute>
<attribute name="action">GncPluginPageRegisterActions.LinkTransactionAction</attribute>
<attribute name="tooltip" translatable="yes">Add, change, or unlink the document linked with the current transaction</attribute>
</item>
<item>
<attribute name="label" translatable="yes">_Open Linked Document</attribute>
<attribute name="action">GncPluginPageRegisterActions.LinkedTransactionOpenAction</attribute>
<attribute name="tooltip" translatable="yes">Open the linked document for the current transaction</attribute>
</item>
</section>
<section>
<item>
<attribute name="label" translatable="yes">Jump to Invoice</attribute>
<attribute name="action">GncPluginPageRegisterActions.JumpLinkedInvoiceAction</attribute>
<attribute name="tooltip" translatable="yes">Jump to the linked bill, invoice, or voucher</attribute>
</item>
</section>
<section>
<item>
<attribute name="label" translatable="yes">_Blank Transaction</attribute>
<attribute name="action">GncPluginPageRegisterActions.BlankTransactionAction</attribute>
<attribute name="tooltip" translatable="yes">Move to the blank transaction at the bottom of the register</attribute>
</item>
<item>
<attribute name="label" translatable="yes">_Go to Date</attribute>
<attribute name="action">GncPluginPageRegisterActions.GotoDateAction</attribute>
<attribute name="tooltip" translatable="yes">Move to the split at the specified date</attribute>
</item>
<item>
<attribute name="label" translatable="yes">S_plit Transaction</attribute>
<attribute name="action">GncPluginPageRegisterActions.SplitTransactionAction</attribute>
<attribute name="tooltip" translatable="yes">Show all splits in the current transaction</attribute>
</item>
<item>
<attribute name="label" translatable="yes">Edit E_xchange Rate</attribute>
<attribute name="action">GncPluginPageRegisterActions.EditExchangeRateAction</attribute>
<attribute name="tooltip" translatable="yes">Edit the exchange rate for the current transaction</attribute>
</item>
<item>
<attribute name="label" translatable="yes">Sche_dule...</attribute>
<attribute name="action">GncPluginPageRegisterActions.ScheduleTransactionAction</attribute>
<attribute name="tooltip" translatable="yes">Create a Scheduled Transaction with the current transaction as a template</attribute>
</item>
<item>
<attribute name="label" translatable="yes">_Jump to the other account</attribute>
<attribute name="action">GncPluginPageRegisterActions.JumpTransactionAction</attribute>
<attribute name="tooltip" translatable="yes">Open a new register tab for the other account with focus on this transaction</attribute>
</item>
</section>
<section>
<item>
<attribute name="label" translatable="yes">Assign as payment...</attribute>
<attribute name="action">gnc-plugin-business-actions.RegisterAssignPayment</attribute>
<attribute name="tooltip" translatable="yes">Assign the selected transaction as payment</attribute>
<attribute name="hidden-when">action-disabled</attribute>
</item>
<item>
<attribute name="label" translatable="yes">Edit payment...</attribute>
<attribute name="action">gnc-plugin-business-actions.RegisterEditPayment</attribute>
<attribute name="tooltip" translatable="yes">Edit the payment this transaction is a part of</attribute>
<attribute name="hidden-when">action-disabled</attribute>
</item>
</section>
</menu>
<object class="GtkToolbar" id="mainwin-toolbar">
<property name="visible">True</property>
<property name="can-focus">False</property>
<child>
<object class="GtkToolButton" id="but1">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">_Save</property>
<property name="action-name">gnc-plugin-basic-commands-actions.FileSaveAction</property>
<property name="tooltip-text" translatable="yes">Save the current file</property>
<property name="use-underline">True</property>
<property name="icon-name">document-save</property>
</object>
<packing>
<property name="expand">False</property>
<property name="homogeneous">True</property>
</packing>
</child>
<child>
<object class="GtkToolButton" id="but2">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">_Close</property>
<property name="action-name">mainwin.FileCloseAction</property>
<property name="tooltip-text" translatable="yes">Close the currently active page</property>
<property name="use-underline">True</property>
<property name="icon-name">window-close</property>
</object>
<packing>
<property name="expand">False</property>
<property name="homogeneous">True</property>
</packing>
</child>
<child>
<object class="GtkSeparatorToolItem">
<property name="visible">True</property>
<property name="can-focus">False</property>
</object>
<packing>
<property name="expand">False</property>
<property name="homogeneous">True</property>
</packing>
</child>
<child>
<object class="GtkToolButton" id="but2a">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">New _Invoice...</property>
<property name="action-name">gnc-plugin-business-actions.ToolbarNewInvoiceAction</property>
<property name="tooltip-text" translatable="yes">Open the New Invoice dialog</property>
<property name="use-underline">True</property>
<property name="icon-name">gnc-invoice-new</property>
</object>
<packing>
<property name="expand">False</property>
<property name="homogeneous">True</property>
</packing>
</child>
<child>
<object class="GtkSeparatorToolItem" id="extra_separator">
<property name="visible">True</property>
<property name="can-focus">False</property>
</object>
<packing>
<property name="expand">False</property>
<property name="homogeneous">True</property>
</packing>
</child>
<child>
<object class="GtkToolButton" id="but3">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Dup_licate Transaction</property>
<property name="action-name">GncPluginPageRegisterActions.DuplicateTransactionAction</property>
<property name="tooltip-text" translatable="yes">Make a copy of the current transaction</property>
<property name="use-underline">True</property>
<property name="icon-name">edit-copy</property>
</object>
<packing>
<property name="expand">False</property>
<property name="homogeneous">True</property>
</packing>
</child>
<child>
<object class="GtkToolButton" id="but4">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">_Delete Transaction</property>
<property name="action-name">GncPluginPageRegisterActions.DeleteTransactionAction</property>
<property name="tooltip-text" translatable="yes">Delete the current transaction</property>
<property name="use-underline">True</property>
<property name="icon-name">edit-delete</property>
</object>
<packing>
<property name="expand">False</property>
<property name="homogeneous">True</property>
</packing>
</child>
<child>
<object class="GtkSeparatorToolItem">
<property name="visible">True</property>
<property name="can-focus">False</property>
</object>
<packing>
<property name="expand">False</property>
<property name="homogeneous">True</property>
</packing>
</child>
<child>
<object class="GtkToolButton" id="but5">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">_Enter Transaction</property>
<property name="action-name">GncPluginPageRegisterActions.RecordTransactionAction</property>
<property name="tooltip-text" translatable="yes">Record the current transaction</property>
<property name="use-underline">True</property>
<property name="icon-name">list-add</property>
</object>
<packing>
<property name="expand">False</property>
<property name="homogeneous">True</property>
</packing>
</child>
<child>
<object class="GtkToolButton" id="but6">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Ca_ncel Transaction</property>
<property name="action-name">GncPluginPageRegisterActions.CancelTransactionAction</property>
<property name="tooltip-text" translatable="yes">Cancel the current transaction</property>
<property name="use-underline">True</property>
<property name="icon-name">process-stop</property>
</object>
<packing>
<property name="expand">False</property>
<property name="homogeneous">True</property>
</packing>
</child>
<child>
<object class="GtkSeparatorToolItem">
<property name="visible">True</property>
<property name="can-focus">False</property>
</object>
<packing>
<property name="expand">False</property>
<property name="homogeneous">True</property>
</packing>
</child>
<child>
<object class="GtkToolButton" id="but7">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">_Blank Transaction</property>
<property name="action-name">GncPluginPageRegisterActions.BlankTransactionAction</property>
<property name="tooltip-text" translatable="yes">Move to the blank transaction at the bottom of the register</property>
<property name="use-underline">True</property>
<property name="icon-name">go-bottom</property>
</object>
<packing>
<property name="expand">False</property>
<property name="homogeneous">True</property>
</packing>
</child>
<child>
<object class="GtkToggleToolButton" id="but8">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">S_plit Transaction</property>
<property name="action-name">GncPluginPageRegisterActions.SplitTransactionAction</property>
<property name="tooltip-text" translatable="yes">Show all splits in the current transaction</property>
<property name="use-underline">True</property>
<property name="icon-name">gnc-split-trans</property>
</object>
<packing>
<property name="expand">False</property>
<property name="homogeneous">True</property>
</packing>
</child>
<child>
<object class="GtkToolButton" id="but9">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">_Jump to the other account</property>
<property name="action-name">GncPluginPageRegisterActions.JumpTransactionAction</property>
<property name="tooltip-text" translatable="yes">Open a new register tab for the other account with focus on this transaction</property>
<property name="use-underline">True</property>
<property name="icon-name">gnc-jumpto</property>
</object>
<packing>
<property name="expand">False</property>
<property name="homogeneous">True</property>
</packing>
</child>
<child>
<object class="GtkToolButton" id="but10">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Sche_dule...</property>
<property name="action-name">GncPluginPageRegisterActions.ScheduleTransactionAction</property>
<property name="tooltip-text" translatable="yes">Create a Scheduled Transaction with the current transaction as a template</property>
<property name="use-underline">True</property>
<property name="icon-name">gnc-sx-new</property>
</object>
<packing>
<property name="expand">False</property>
<property name="homogeneous">True</property>
</packing>
</child>
<child>
<object class="GtkSeparatorToolItem">
<property name="visible">True</property>
<property name="can-focus">False</property>
</object>
<packing>
<property name="expand">False</property>
<property name="homogeneous">True</property>
</packing>
</child>
<child>
<object class="GtkToolButton" id="but11">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">_Transfer...</property>
<property name="action-name">GncPluginPageRegisterActions.ActionsTransferAction</property>
<property name="tooltip-text" translatable="yes">Transfer funds from one account to another</property>
<property name="use-underline">True</property>
<property name="icon-name">gnc-transfer</property>
</object>
<packing>
<property name="expand">False</property>
<property name="homogeneous">True</property>
</packing>
</child>
<child>
<object class="GtkToolButton" id="but12">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">_Reconcile...</property>
<property name="action-name">GncPluginPageRegisterActions.ActionsReconcileAction</property>
<property name="tooltip-text" translatable="yes">Reconcile the selected account</property>
<property name="use-underline">True</property>
<property name="icon-name">edit-select-all</property>
</object>
<packing>
<property name="expand">False</property>
<property name="homogeneous">True</property>
</packing>
</child>
<child>
<object class="GtkToolButton" id="but13">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Stoc_k Split...</property>
<property name="action-name">GncPluginPageRegisterActions.ActionsStockAssistantAction</property>
<property name="tooltip-text" translatable="yes">Stock Assistant</property>
<property name="use-underline">True</property>
<property name="icon-name">applications-utilities</property>
</object>
<packing>
<property name="expand">False</property>
<property name="homogeneous">True</property>
</packing>
</child>
</object>
</interface>