mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
[gnc-plugin-page-register] call invoice editor with parent window
This commit is contained in:
parent
8bfcc982dd
commit
cb4d9529dc
@ -4733,6 +4733,7 @@ gnc_plugin_page_register_cmd_jump_linked_invoice (GtkAction* action,
|
||||
SplitRegister* reg;
|
||||
GncInvoice* invoice;
|
||||
Transaction *txn;
|
||||
GtkWidget *window;
|
||||
|
||||
ENTER ("(action %p, plugin_page %p)", action, plugin_page);
|
||||
|
||||
@ -4741,6 +4742,7 @@ gnc_plugin_page_register_cmd_jump_linked_invoice (GtkAction* action,
|
||||
reg = gnc_ledger_display_get_split_register (priv->gsr->ledger);
|
||||
txn = gnc_split_register_get_current_trans (reg);
|
||||
invoice = invoice_from_split (gnc_split_register_get_current_split (reg));
|
||||
window = GNC_PLUGIN_PAGE(plugin_page)->window;
|
||||
|
||||
if (!invoice)
|
||||
{
|
||||
@ -4775,7 +4777,7 @@ gnc_plugin_page_register_cmd_jump_linked_invoice (GtkAction* action,
|
||||
}
|
||||
details = g_list_reverse (details);
|
||||
choice = gnc_choose_radio_option_dialog
|
||||
(GNC_PLUGIN_PAGE (plugin_page)->window, _("Select document"),
|
||||
(window, _("Select document"),
|
||||
_("Several documents are linked with this transaction. \
|
||||
Please choose one:"), _("Select"), 0, details);
|
||||
if (choice >= 0)
|
||||
@ -4786,7 +4788,10 @@ Please choose one:"), _("Select"), 0, details);
|
||||
}
|
||||
|
||||
if (invoice)
|
||||
gnc_ui_invoice_edit (NULL, invoice);
|
||||
{
|
||||
GtkWindow *gtk_window = gnc_window_get_gtk_window (GNC_WINDOW (window));
|
||||
gnc_ui_invoice_edit (gtk_window, invoice);
|
||||
}
|
||||
|
||||
LEAVE (" ");
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user