Fix missing transient parent warnings for several business dialogs

This commit is contained in:
Geert Janssens 2017-12-03 23:45:40 +01:00
parent 8986795251
commit 0c254c36a0
36 changed files with 252 additions and 226 deletions

View File

@ -95,7 +95,7 @@ customerCB (const char *location, const char *label,
/* href="...:customer=<guid>" */
HANDLE_TYPE ("customer=", GNC_ID_CUSTOMER);
customer = (GncCustomer *) entity;
gnc_ui_customer_edit (customer);
gnc_ui_customer_edit (result->parent, customer);
return TRUE;
}
@ -110,7 +110,7 @@ vendorCB (const char *location, const char *label,
/* href="...:vendor=<guid>" */
HANDLE_TYPE ("vendor=", GNC_ID_VENDOR);
vendor = (GncVendor *) entity;
gnc_ui_vendor_edit (vendor);
gnc_ui_vendor_edit (result->parent, vendor);
return TRUE;
}
@ -126,7 +126,7 @@ employeeCB (const char *location, const char *label,
HANDLE_TYPE ("employee=", GNC_ID_EMPLOYEE);
employee = (GncEmployee *) entity;
gnc_ui_employee_edit (employee);
gnc_ui_employee_edit (result->parent, employee);
return TRUE;
}
@ -141,7 +141,7 @@ invoiceCB (const char *location, const char *label,
/* href="...:invoice=<guid>" */
HANDLE_TYPE ("invoice=", GNC_ID_INVOICE);
invoice = (GncInvoice *) entity;
gnc_ui_invoice_edit (invoice);
gnc_ui_invoice_edit (result->parent, invoice);
return TRUE;
}
@ -156,7 +156,7 @@ jobCB (const char *location, const char *label,
/* href="...:job=<guid>" */
HANDLE_TYPE ("job=", GNC_ID_JOB);
job = (GncJob *) entity;
gnc_ui_job_edit (job);
gnc_ui_job_edit (result->parent, job);
return TRUE;
}
@ -306,7 +306,7 @@ ownerreportCB (const char *location, const char *label,
}
/* Ok, let's run this report */
gnc_business_call_owner_report (&owner, acc);
gnc_business_call_owner_report (result->parent, &owner, acc);
return TRUE;
}

View File

@ -528,7 +528,7 @@ find_handler (gpointer find_data, gpointer user_data)
}
static CustomerWindow *
gnc_customer_new_window (QofBook *bookp, GncCustomer *cust)
gnc_customer_new_window (GtkWindow *parent, QofBook *bookp, GncCustomer *cust)
{
CustomerWindow *cw;
GtkBuilder *builder;
@ -549,6 +549,7 @@ gnc_customer_new_window (QofBook *bookp, GncCustomer *cust)
find_handler, &customer_guid);
if (cw)
{
gtk_window_set_transient_for (GTK_WINDOW(cw->dialog), parent);
gtk_window_present (GTK_WINDOW(cw->dialog));
return(cw);
}
@ -574,6 +575,7 @@ gnc_customer_new_window (QofBook *bookp, GncCustomer *cust)
gnc_builder_add_from_file (builder, "dialog-customer.glade", "taxtable_store");
gnc_builder_add_from_file (builder, "dialog-customer.glade", "customer_dialog");
cw->dialog = GTK_WIDGET (gtk_builder_get_object (builder, "customer_dialog"));
gtk_window_set_transient_for (GTK_WINDOW(cw->dialog), parent);
// Set the style context for this dialog so it can be easily manipulated with css
gnc_widget_set_style_context (GTK_WIDGET(cw->dialog), "GncCustomerDialog");
@ -752,26 +754,26 @@ gnc_customer_new_window (QofBook *bookp, GncCustomer *cust)
}
CustomerWindow *
gnc_ui_customer_edit (GncCustomer *cust)
gnc_ui_customer_edit (GtkWindow *parent, GncCustomer *cust)
{
CustomerWindow *cw;
if (!cust) return NULL;
cw = gnc_customer_new_window (gncCustomerGetBook(cust), cust);
cw = gnc_customer_new_window (parent, gncCustomerGetBook(cust), cust);
return cw;
}
CustomerWindow *
gnc_ui_customer_new (QofBook *bookp)
gnc_ui_customer_new (GtkWindow *parent, QofBook *bookp)
{
CustomerWindow *cw;
/* Make sure required options exist */
if (!bookp) return NULL;
cw = gnc_customer_new_window (bookp, NULL);
cw = gnc_customer_new_window (parent, bookp, NULL);
return cw;
}
@ -850,7 +852,7 @@ payment_customer_cb (gpointer *cust_p, gpointer user_data)
return;
gncOwnerInitCustomer (&owner, cust);
gnc_ui_payment_new (&owner, sw->book);
gnc_ui_payment_new (NULL, &owner, sw->book);
return;
}
@ -865,7 +867,7 @@ edit_customer_cb (gpointer *cust_p, gpointer user_data)
if (!cust)
return;
gnc_ui_customer_edit (cust);
gnc_ui_customer_edit (NULL, cust);
return;
}
@ -878,7 +880,7 @@ new_customer_cb (gpointer user_data)
g_return_val_if_fail (sw, NULL);
cw = gnc_ui_customer_new (sw->book);
cw = gnc_ui_customer_new (NULL, sw->book);
return cw_get_customer (cw);
}
@ -976,7 +978,7 @@ GNCSearchWindow *
gnc_customer_search_edit (gpointer start, gpointer book)
{
if (start)
gnc_ui_customer_edit (start);
gnc_ui_customer_edit (NULL, start);
return NULL;
}

View File

@ -31,8 +31,8 @@ typedef struct _customer_window CustomerWindow;
#include "dialog-search.h"
/* Functions to create and edit a customer */
CustomerWindow * gnc_ui_customer_edit (GncCustomer *cust);
CustomerWindow * gnc_ui_customer_new (QofBook *book);
CustomerWindow * gnc_ui_customer_edit (GtkWindow *parent, GncCustomer *cust);
CustomerWindow * gnc_ui_customer_new (GtkWindow *parent, QofBook *book);
/* Search for customers */
GNCSearchWindow *gnc_customer_search (GncCustomer *start, QofBook *book);

View File

@ -46,6 +46,7 @@
#include "dialog-employee.h"
#include "dialog-invoice.h"
#include "dialog-payment.h"
#include "business-gnome-utils.h"
#define DIALOG_NEW_EMPLOYEE_CM_CLASS "dialog-new-employee"
#define DIALOG_EDIT_EMPLOYEE_CM_CLASS "dialog-edit-employee"
@ -364,7 +365,8 @@ find_handler (gpointer find_data, gpointer user_data)
}
static EmployeeWindow *
gnc_employee_new_window (QofBook *bookp,
gnc_employee_new_window (GtkWindow *parent,
QofBook *bookp,
GncEmployee *employee)
{
EmployeeWindow *ew;
@ -388,6 +390,7 @@ gnc_employee_new_window (QofBook *bookp,
find_handler, &employee_guid);
if (ew)
{
gtk_window_set_transient_for (GTK_WINDOW(ew->dialog), parent);
gtk_window_present (GTK_WINDOW(ew->dialog));
return(ew);
}
@ -410,6 +413,7 @@ gnc_employee_new_window (QofBook *bookp,
builder = gtk_builder_new();
gnc_builder_add_from_file (builder, "dialog-employee.glade", "employee_dialog");
ew->dialog = GTK_WIDGET(gtk_builder_get_object (builder, "employee_dialog"));
gtk_window_set_transient_for (GTK_WINDOW(ew->dialog), parent);
// Set the style context for this dialog so it can be easily manipulated with css
gnc_widget_set_style_context (GTK_WIDGET(ew->dialog), "GncEmployeeDialog");
@ -570,26 +574,26 @@ gnc_employee_new_window (QofBook *bookp,
}
EmployeeWindow *
gnc_ui_employee_new (QofBook *bookp)
gnc_ui_employee_new (GtkWindow *parent, QofBook *bookp)
{
EmployeeWindow *ew;
/* Make sure required options exist */
if (!bookp) return NULL;
ew = gnc_employee_new_window (bookp, NULL);
ew = gnc_employee_new_window (parent, bookp, NULL);
return ew;
}
EmployeeWindow *
gnc_ui_employee_edit (GncEmployee *employee)
gnc_ui_employee_edit (GtkWindow *parent, GncEmployee *employee)
{
EmployeeWindow *ew;
if (!employee) return NULL;
ew = gnc_employee_new_window (gncEmployeeGetBook(employee), employee);
ew = gnc_employee_new_window (parent, gncEmployeeGetBook(employee), employee);
return ew;
}
@ -630,7 +634,7 @@ payment_employee_cb (gpointer *employee_p, gpointer user_data)
return;
gncOwnerInitEmployee (&owner, employee);
gnc_ui_payment_new (&owner, sw->book);
gnc_ui_payment_new (NULL, &owner, sw->book);
return;
}
@ -646,7 +650,7 @@ edit_employee_cb (gpointer *employee_p, gpointer user_data)
if (!employee)
return;
gnc_ui_employee_edit (employee);
gnc_ui_employee_edit (NULL, employee);
return;
}
@ -658,7 +662,7 @@ new_employee_cb (gpointer user_data)
g_return_val_if_fail (user_data, NULL);
ew = gnc_ui_employee_new (sw->book);
ew = gnc_ui_employee_new (NULL, sw->book);
return ew_get_employee (ew);
}
@ -751,7 +755,7 @@ GNCSearchWindow *
gnc_employee_search_edit (gpointer start, gpointer book)
{
if (start)
gnc_ui_employee_edit (start);
gnc_ui_employee_edit (NULL, start);
return NULL;
}

View File

@ -31,8 +31,8 @@ typedef struct _employee_window EmployeeWindow;
#include "dialog-search.h"
/* Functions to edit and create employees */
EmployeeWindow * gnc_ui_employee_edit (GncEmployee *employee);
EmployeeWindow * gnc_ui_employee_new (QofBook *book);
EmployeeWindow * gnc_ui_employee_edit (GtkWindow *parent, GncEmployee *employee);
EmployeeWindow * gnc_ui_employee_new (GtkWindow *parent, QofBook *book);
/* Search for an employee */
GNCSearchWindow * gnc_employee_search (GncEmployee *start, QofBook *book);

View File

@ -207,7 +207,6 @@ struct _invoice_window
};
/* Forward definitions for CB functions */
void gnc_invoice_window_closeCB (GtkWidget *widget, gpointer data);
void gnc_invoice_window_active_toggled_cb (GtkWidget *widget, gpointer data);
gboolean gnc_invoice_window_leave_notes_cb (GtkWidget *widget, GdkEventFocus *event, gpointer data);
DialogQueryView *gnc_invoice_show_docs_due (GtkWindow *parent, QofBook *book, double days_in_advance, GncWhichDueType duetype);
@ -217,7 +216,7 @@ DialogQueryView *gnc_invoice_show_docs_due (GtkWindow *parent, QofBook *book, do
#define VOUCHER_WIDTH_PREFIX "voucher_reg"
static void gnc_invoice_update_window (InvoiceWindow *iw, GtkWidget *widget);
static InvoiceWindow * gnc_ui_invoice_modify (GncInvoice *invoice);
static InvoiceWindow * gnc_ui_invoice_modify (GtkWindow *parent, GncInvoice *invoice);
/*******************************************************************************/
/* FUNCTIONS FOR ACCESSING DATA STRUCTURE FIELDS */
@ -450,7 +449,7 @@ gnc_invoice_window_ok_cb (GtkWidget *widget, gpointer data)
*/
if ((iw->dialog_type == NEW_INVOICE || iw->dialog_type == DUP_INVOICE)
&& iw->created_invoice)
gnc_ui_invoice_edit (iw->created_invoice);
gnc_ui_invoice_edit (gnc_ui_get_main_window (iw->dialog), iw->created_invoice);
gnc_close_gui_component (iw->component_id);
}
@ -495,29 +494,23 @@ gnc_invoice_window_destroy_cb (GtkWidget *widget, gpointer data)
}
void
gnc_invoice_window_closeCB (GtkWidget *widget, gpointer data)
{
gnc_invoice_window_ok_cb (widget, data);
}
void
gnc_invoice_window_editCB (GtkWidget *widget, gpointer data)
gnc_invoice_window_editCB (GtkWindow *parent, gpointer data)
{
InvoiceWindow *iw = data;
GncInvoice *invoice = iw_get_invoice (iw);
if (invoice)
gnc_ui_invoice_modify (invoice);
gnc_ui_invoice_modify (parent, invoice);
}
void
gnc_invoice_window_duplicateInvoiceCB (GtkWidget *widget, gpointer data)
gnc_invoice_window_duplicateInvoiceCB (GtkWindow *parent, gpointer data)
{
InvoiceWindow *iw = data;
GncInvoice *invoice = iw_get_invoice (iw);
if (invoice)
gnc_ui_invoice_duplicate (invoice, TRUE, NULL);
gnc_ui_invoice_duplicate (parent, invoice, TRUE, NULL);
}
void gnc_invoice_window_entryUpCB (GtkWidget *widget, gpointer data)
@ -648,7 +641,7 @@ gnc_invoice_window_blankCB (GtkWidget *widget, gpointer data)
}
static void
gnc_invoice_window_print_invoice(GncInvoice *invoice)
gnc_invoice_window_print_invoice(GtkWindow *parent, GncInvoice *invoice)
{
SCM func, arg, arg2;
SCM args = SCM_EOL;
@ -674,13 +667,13 @@ gnc_invoice_window_print_invoice(GncInvoice *invoice)
/* scm_gc_unprotect_object(func); */
if (report_id >= 0)
reportWindow (report_id);
reportWindow (report_id, parent);
}
void
gnc_invoice_window_printCB (GtkWidget *unused_widget, gpointer data)
gnc_invoice_window_printCB (GtkWindow* parent, gpointer data)
{
InvoiceWindow *iw = data;
gnc_invoice_window_print_invoice(iw_get_invoice (iw));
gnc_invoice_window_print_invoice (parent, iw_get_invoice (iw));
}
static gboolean
@ -1028,20 +1021,20 @@ void gnc_invoice_window_paste_cb (GtkWidget *widget, gpointer data)
gnucash_register_paste_clipboard (iw->reg);
}
void gnc_invoice_window_new_invoice_cb (GtkWidget *widget, gpointer data)
void gnc_invoice_window_new_invoice_cb (GtkWindow *parent, gpointer data)
{
InvoiceWindow *iw = data;
if (gncOwnerGetJob (&iw->job))
{
gnc_ui_invoice_new (&iw->job, iw->book);
gnc_ui_invoice_new (parent, &iw->job, iw->book);
}
else
{
gnc_ui_invoice_new (&iw->owner, iw->book);
gnc_ui_invoice_new (parent, &iw->owner, iw->book);
}
}
void gnc_business_call_owner_report (GncOwner *owner, Account *acc)
void gnc_business_call_owner_report (GtkWindow *parent, GncOwner *owner, Account *acc)
{
int id;
SCM args;
@ -1079,24 +1072,24 @@ void gnc_business_call_owner_report (GncOwner *owner, Account *acc)
id = scm_to_int (arg);
if (id >= 0)
reportWindow (id);
reportWindow (id, parent);
}
void gnc_invoice_window_report_owner_cb (GtkWidget *widget, gpointer data)
void gnc_invoice_window_report_owner_cb (GtkWindow *parent, gpointer data)
{
InvoiceWindow *iw = data;
gnc_business_call_owner_report (&iw->owner, NULL);
gnc_business_call_owner_report (parent, &iw->owner, NULL);
}
void gnc_invoice_window_payment_cb (GtkWidget *widget, gpointer data)
void gnc_invoice_window_payment_cb (GtkWindow *parent, gpointer data)
{
InvoiceWindow *iw = data;
GncInvoice *invoice = iw_get_invoice(iw);
if (gncOwnerGetJob (&iw->job))
gnc_ui_payment_new_with_invoice (&iw->job, iw->book, invoice);
gnc_ui_payment_new_with_invoice (parent, &iw->job, iw->book, invoice);
else
gnc_ui_payment_new_with_invoice (&iw->owner, iw->book, invoice);
gnc_ui_payment_new_with_invoice (parent, &iw->owner, iw->book, invoice);
}
/* Sorting callbacks */
@ -2456,7 +2449,7 @@ gnc_invoice_create_page (InvoiceWindow *iw, gpointer page)
}
static InvoiceWindow *
gnc_invoice_window_new_invoice (InvoiceDialogType dialog_type, QofBook *bookp,
gnc_invoice_window_new_invoice (GtkWindow *parent, InvoiceDialogType dialog_type, QofBook *bookp,
const GncOwner *owner, GncInvoice *invoice)
{
InvoiceWindow *iw;
@ -2483,6 +2476,7 @@ gnc_invoice_window_new_invoice (InvoiceDialogType dialog_type, QofBook *bookp,
find_handler, &invoice_guid);
if (iw)
{
gtk_window_set_transient_for (GTK_WINDOW(iw->dialog), parent);
gtk_window_present (GTK_WINDOW(iw->dialog));
return(iw);
}
@ -2542,6 +2536,7 @@ gnc_invoice_window_new_invoice (InvoiceDialogType dialog_type, QofBook *bookp,
gnc_builder_add_from_file (builder, "dialog-invoice.glade", "terms_store");
gnc_builder_add_from_file (builder, "dialog-invoice.glade", "new_invoice_dialog");
iw->dialog = GTK_WIDGET (gtk_builder_get_object (builder, "new_invoice_dialog"));
gtk_window_set_transient_for (GTK_WINDOW(iw->dialog), parent);
// Set the style context for this dialog so it can be easily manipulated with css
gnc_widget_set_style_context (GTK_WIDGET(iw->dialog), "GncInvoiceDialog");
@ -2672,7 +2667,7 @@ gnc_invoice_window_new_invoice (InvoiceDialogType dialog_type, QofBook *bookp,
}
InvoiceWindow *
gnc_ui_invoice_edit (GncInvoice *invoice)
gnc_ui_invoice_edit (GtkWindow *parent, GncInvoice *invoice)
{
InvoiceWindow *iw;
InvoiceDialogType type;
@ -2686,18 +2681,18 @@ gnc_ui_invoice_edit (GncInvoice *invoice)
type = EDIT_INVOICE;
iw = gnc_invoice_new_page (gncInvoiceGetBook(invoice), type,
invoice, gncInvoiceGetOwner (invoice), NULL);
invoice, gncInvoiceGetOwner (invoice), GNC_MAIN_WINDOW(parent));
return iw;
}
static InvoiceWindow *
gnc_ui_invoice_modify (GncInvoice *invoice)
gnc_ui_invoice_modify (GtkWindow *parent, GncInvoice *invoice)
{
InvoiceWindow *iw;
if (!invoice) return NULL;
iw = gnc_invoice_window_new_invoice (MOD_INVOICE, NULL, NULL, invoice);
iw = gnc_invoice_window_new_invoice (parent, MOD_INVOICE, NULL, NULL, invoice);
return iw;
}
@ -2715,7 +2710,7 @@ set_gncEntry_date(gpointer data, gpointer user_data)
}
InvoiceWindow * gnc_ui_invoice_duplicate (GncInvoice *old_invoice, gboolean open_properties, const GDate *new_date)
InvoiceWindow * gnc_ui_invoice_duplicate (GtkWindow *parent, GncInvoice *old_invoice, gboolean open_properties, const GDate *new_date)
{
InvoiceWindow *iw = NULL;
GncInvoice *new_invoice = NULL;
@ -2764,12 +2759,12 @@ InvoiceWindow * gnc_ui_invoice_duplicate (GncInvoice *old_invoice, gboolean open
if (open_properties)
{
// Open the "properties" pop-up for the invoice...
iw = gnc_invoice_window_new_invoice (DUP_INVOICE, NULL, NULL, new_invoice);
iw = gnc_invoice_window_new_invoice (parent, DUP_INVOICE, NULL, NULL, new_invoice);
}
else
{
// Open the newly created invoice in the "edit" window
iw = gnc_ui_invoice_edit (new_invoice);
iw = gnc_ui_invoice_edit (parent, new_invoice);
// Check the ID; set one if necessary
if (g_strcmp0 (gtk_entry_get_text (GTK_ENTRY (iw->id_entry)), "") == 0)
{
@ -2780,22 +2775,22 @@ InvoiceWindow * gnc_ui_invoice_duplicate (GncInvoice *old_invoice, gboolean open
}
InvoiceWindow *
gnc_ui_invoice_new (GncOwner *ownerp, QofBook *bookp)
gnc_ui_invoice_new (GtkWindow *parent, GncOwner *owner, QofBook *book)
{
InvoiceWindow *iw;
GncOwner owner;
GncOwner inv_owner;
if (ownerp)
if (owner)
{
gncOwnerCopy (ownerp, &owner);
gncOwnerCopy (owner, &inv_owner);
}
else
gncOwnerInitCustomer (&owner, NULL); /* XXX: pass in the owner type? */
gncOwnerInitCustomer (&inv_owner, NULL); /* XXX: pass in the owner type? */
/* Make sure required options exist */
if (!bookp) return NULL;
if (!book) return NULL;
iw = gnc_invoice_window_new_invoice (NEW_INVOICE, bookp, &owner, NULL);
iw = gnc_invoice_window_new_invoice (parent, NEW_INVOICE, book, &inv_owner, NULL);
return iw;
}
@ -2806,7 +2801,7 @@ static void
edit_invoice_direct (gpointer invoice, gpointer user_data)
{
g_return_if_fail (invoice);
gnc_ui_invoice_edit (invoice);
gnc_ui_invoice_edit (NULL, invoice);
}
static void
@ -2829,7 +2824,7 @@ pay_invoice_direct (gpointer inv, gpointer user_data)
GncInvoice *invoice = inv;
g_return_if_fail (invoice);
gnc_ui_payment_new_with_invoice (gncInvoiceGetOwner (invoice),
gnc_ui_payment_new_with_invoice (NULL, gncInvoiceGetOwner (invoice),
gncInvoiceGetBook (invoice), invoice);
}
@ -2858,7 +2853,7 @@ static void multi_duplicate_invoice_one(gpointer data, gpointer user_data)
// In this simplest form, we just use the existing duplication
// algorithm, only without opening the "edit invoice" window for editing
// the number etc. for each of the invoices.
InvoiceWindow *iw = gnc_ui_invoice_duplicate(old_invoice, FALSE, &dup_user_data->date);
InvoiceWindow *iw = gnc_ui_invoice_duplicate(NULL, old_invoice, FALSE, &dup_user_data->date);
// FIXME: Now we could use this invoice and manipulate further data.
g_assert(iw);
new_invoice = iw_get_invoice(iw);
@ -2878,7 +2873,7 @@ multi_duplicate_invoice_cb (GList *invoice_list, gpointer user_data)
{
// Duplicate exactly one invoice
GncInvoice *old_invoice = invoice_list->data;
gnc_ui_invoice_duplicate(old_invoice, TRUE, NULL);
gnc_ui_invoice_duplicate(NULL, old_invoice, TRUE, NULL);
return;
}
default:
@ -2909,7 +2904,7 @@ static void post_one_invoice_cb(gpointer data, gpointer user_data)
{
GncInvoice *invoice = data;
struct post_invoice_params *post_params = user_data;
InvoiceWindow *iw = gnc_ui_invoice_edit(invoice);
InvoiceWindow *iw = gnc_ui_invoice_edit(NULL, invoice);
gnc_invoice_post(iw, post_params);
}
@ -2917,7 +2912,7 @@ static void gnc_invoice_is_posted(gpointer inv, gpointer test_value)
{
GncInvoice *invoice = inv;
gboolean *test = (gboolean*)test_value;
if (gncInvoiceIsPosted (invoice))
{
*test = TRUE;
@ -2935,7 +2930,7 @@ multi_post_invoice_cb (GList *invoice_list, gpointer user_data)
if (g_list_length(invoice_list) == 0)
return;
// Get the posting parameters for these invoices
iw = gnc_ui_invoice_edit(invoice_list->data);
iw = gnc_ui_invoice_edit(NULL, invoice_list->data);
test = FALSE;
gnc_suspend_gui_refresh (); // Turn off GUI refresh for the duration.
// Check if any of the selected invoices have already been posted.
@ -2947,7 +2942,7 @@ multi_post_invoice_cb (GList *invoice_list, gpointer user_data)
_("One or more selected invoices have already been posted.\nRe-check your selection."));
return;
}
if (!gnc_dialog_post_invoice(iw, _("Do you really want to post these invoices?"),
&post_params.ddue, &post_params.postdate,
&post_params.memo, &post_params.acc,
@ -2966,7 +2961,7 @@ multi_post_invoice_cb (GList *invoice_list, gpointer user_data)
static void print_one_invoice_cb(gpointer data, gpointer user_data)
{
GncInvoice *invoice = data;
gnc_invoice_window_print_invoice(invoice); // that's all!
gnc_invoice_window_print_invoice(NULL, invoice); // that's all!
}
static void
@ -2986,7 +2981,7 @@ new_invoice_cb (gpointer user_data)
g_return_val_if_fail (user_data, NULL);
iw = gnc_ui_invoice_new (sw->owner, sw->book);
iw = gnc_ui_invoice_new (NULL, sw->owner, sw->book);
return iw_get_invoice (iw);
}

View File

@ -47,12 +47,12 @@ typedef enum
/* Create and edit an invoice */
InvoiceWindow * gnc_ui_invoice_edit (GncInvoice *invoice);
InvoiceWindow * gnc_ui_invoice_new (GncOwner *owner, QofBook *book);
InvoiceWindow * gnc_ui_invoice_edit (GtkWindow *parent, GncInvoice *invoice);
InvoiceWindow * gnc_ui_invoice_new (GtkWindow *parent, GncOwner *owner, QofBook *book);
/** Create a new invoice as a duplicate of the given existing invoice.
*
* \param invoice The invoice which is being duplicated
* \param old_invoice The invoice which is being duplicated
* \param open_properties If TRUE, open the "invoice properties" dialog window after creating the new invoice
* \param new_date If non-NULL, use this date as the date for the "opening date" and also as date for all invoice entries.
*
@ -60,12 +60,12 @@ InvoiceWindow * gnc_ui_invoice_new (GncOwner *owner, QofBook *book);
* among others the "created_invoice" as a GncInvoice* pointer on the newly
* created invoice.
*/
InvoiceWindow * gnc_ui_invoice_duplicate (GncInvoice *invoice, gboolean open_properties, const GDate *new_date);
InvoiceWindow* gnc_ui_invoice_duplicate (GtkWindow* parent, GncInvoice* old_invoice, gboolean open_properties, const GDate* new_date);
/* Search for invoices */
GNCSearchWindow * gnc_invoice_search (GncInvoice *start, GncOwner *owner, QofBook *book);
void gnc_business_call_owner_report (GncOwner *owner, Account *acc);
void gnc_business_call_owner_report (GtkWindow* parent, GncOwner *owner, Account *acc);
void gnc_invoice_window_sort (InvoiceWindow *iw, invoice_sort_type_t sort_code);
@ -90,13 +90,13 @@ GtkWidget *gnc_invoice_get_register(InvoiceWindow *iw);
/* definitions for CB functions */
void gnc_invoice_window_destroy_cb (GtkWidget *widget, gpointer data);
void gnc_invoice_window_new_invoice_cb (GtkWidget *widget, gpointer data);
void gnc_invoice_window_printCB (GtkWidget *widget, gpointer data);
void gnc_invoice_window_new_invoice_cb (GtkWindow* parent, gpointer data);
void gnc_invoice_window_printCB (GtkWindow* parent, gpointer data);
void gnc_invoice_window_cut_cb (GtkWidget *widget, gpointer data);
void gnc_invoice_window_copy_cb (GtkWidget *widget, gpointer data);
void gnc_invoice_window_paste_cb (GtkWidget *widget, gpointer data);
void gnc_invoice_window_editCB (GtkWidget *widget, gpointer data);
void gnc_invoice_window_duplicateInvoiceCB (GtkWidget *widget, gpointer data);
void gnc_invoice_window_editCB (GtkWindow* parent, gpointer data);
void gnc_invoice_window_duplicateInvoiceCB (GtkWindow* parent, gpointer data);
void gnc_invoice_window_postCB (GtkWidget *widget, gpointer data);
void gnc_invoice_window_unpostCB (GtkWidget *widget, gpointer data);
void gnc_invoice_window_recordCB (GtkWidget *widget, gpointer data);
@ -104,8 +104,8 @@ void gnc_invoice_window_cancelCB (GtkWidget *widget, gpointer data);
void gnc_invoice_window_deleteCB (GtkWidget *widget, gpointer data);
void gnc_invoice_window_blankCB (GtkWidget *widget, gpointer data);
void gnc_invoice_window_duplicateCB (GtkWidget *widget, gpointer data);
void gnc_invoice_window_payment_cb (GtkWidget *widget, gpointer data);
void gnc_invoice_window_report_owner_cb (GtkWidget *widget, gpointer data);
void gnc_invoice_window_payment_cb (GtkWindow *parent, gpointer data);
void gnc_invoice_window_report_owner_cb (GtkWindow *parent, gpointer data);
void gnc_invoice_window_entryUpCB (GtkWidget *widget, gpointer data);
void gnc_invoice_window_entryDownCB (GtkWidget *widget, gpointer data);

View File

@ -302,7 +302,7 @@ find_handler (gpointer find_data, gpointer user_data)
}
static JobWindow *
gnc_job_new_window (QofBook *bookp, GncOwner *owner, GncJob *job)
gnc_job_new_window (GtkWindow *parent, QofBook *bookp, GncOwner *owner, GncJob *job)
{
JobWindow *jw;
GtkBuilder *builder;
@ -321,6 +321,7 @@ gnc_job_new_window (QofBook *bookp, GncOwner *owner, GncJob *job)
find_handler, &job_guid);
if (jw)
{
gtk_window_set_transient_for (GTK_WINDOW(jw->dialog), parent);
gtk_window_present (GTK_WINDOW(jw->dialog));
return(jw);
}
@ -339,6 +340,7 @@ gnc_job_new_window (QofBook *bookp, GncOwner *owner, GncJob *job)
/* Find the dialog */
jw->dialog = GTK_WIDGET(gtk_builder_get_object (builder, "job_dialog"));
gtk_window_set_transient_for (GTK_WINDOW(jw->dialog), parent);
// Set the style context for this dialog so it can be easily manipulated with css
gnc_widget_set_style_context (GTK_WIDGET(jw->dialog), "GncJobDialog");
@ -433,17 +435,8 @@ gnc_job_new_window (QofBook *bookp, GncOwner *owner, GncJob *job)
return jw;
}
GncJob *
gnc_ui_job_new_return_handle (GncOwner *owner, QofBook *book)
{
JobWindow *jw;
if (!book) return NULL;
jw = gnc_ui_job_new (owner, book);
return jw_get_job (jw);
}
JobWindow *
gnc_ui_job_new (GncOwner *ownerp, QofBook *bookp)
gnc_ui_job_new (GtkWindow *parent, GncOwner *ownerp, QofBook *bookp)
{
JobWindow *jw;
GncOwner owner;
@ -461,18 +454,18 @@ gnc_ui_job_new (GncOwner *ownerp, QofBook *bookp)
else
gncOwnerInitCustomer (&owner, NULL); /* XXX */
jw = gnc_job_new_window (bookp, &owner, NULL);
jw = gnc_job_new_window (parent, bookp, &owner, NULL);
return jw;
}
JobWindow *
gnc_ui_job_edit (GncJob *job)
gnc_ui_job_edit (GtkWindow *parent, GncJob *job)
{
JobWindow *jw;
if (!job) return NULL;
jw = gnc_job_new_window (gncJobGetBook(job), gncJobGetOwner(job), job);
jw = gnc_job_new_window (parent, gncJobGetBook(job), gncJobGetOwner(job), job);
return jw;
}
@ -490,7 +483,7 @@ edit_job_cb (gpointer *job_p, gpointer user_data)
if (!job)
return;
gnc_ui_job_edit (job);
gnc_ui_job_edit (NULL, job);
}
static void
@ -525,7 +518,7 @@ payment_job_cb (gpointer *job_p, gpointer user_data)
return;
gncOwnerInitJob (&owner, job);
gnc_ui_payment_new (&owner, sw->book);
gnc_ui_payment_new (NULL, &owner, sw->book);
return;
}
@ -537,7 +530,7 @@ new_job_cb (gpointer user_data)
g_return_val_if_fail (user_data, NULL);
jw = gnc_ui_job_new (sw->owner, sw->book);
jw = gnc_ui_job_new (NULL, sw->owner, sw->book);
return jw_get_job (jw);
}
@ -679,7 +672,7 @@ GNCSearchWindow *
gnc_job_search_edit (gpointer start, gpointer book)
{
if (start)
gnc_ui_job_edit (start);
gnc_ui_job_edit (NULL, start);
return NULL;
}

View File

@ -32,9 +32,8 @@ typedef struct _job_window JobWindow;
#include "dialog-search.h"
/* Create or Edit a job */
GncJob * gnc_ui_job_new_return_handle (GncOwner *owner, QofBook *book);
JobWindow * gnc_ui_job_edit (GncJob *job);
JobWindow * gnc_ui_job_new (GncOwner *owner, QofBook *book);
JobWindow * gnc_ui_job_edit (GtkWindow *parent, GncJob *job);
JobWindow * gnc_ui_job_new (GtkWindow *parent, GncOwner *owner, QofBook *book);
/* Search for Jobs */
GNCSearchWindow * gnc_job_search (GncJob *start, GncOwner *owner,

View File

@ -539,7 +539,7 @@ find_handler (gpointer find_data, gpointer user_data)
}
static OrderWindow *
gnc_order_new_window (QofBook *bookp, OrderDialogType type,
gnc_order_new_window (GtkWindow *parent, QofBook *bookp, OrderDialogType type,
GncOrder *order, GncOwner *owner)
{
OrderWindow *ow;
@ -573,6 +573,7 @@ gnc_order_new_window (QofBook *bookp, OrderDialogType type,
if (ow)
{
gtk_window_present (GTK_WINDOW(ow->dialog));
gtk_window_set_transient_for (GTK_WINDOW(ow->dialog), parent);
return(ow);
}
}
@ -591,6 +592,7 @@ gnc_order_new_window (QofBook *bookp, OrderDialogType type,
builder = gtk_builder_new();
gnc_builder_add_from_file (builder, "dialog-order.glade", "order_entry_dialog");
ow->dialog = GTK_WIDGET(gtk_builder_get_object (builder, "order_entry_dialog"));
gtk_window_set_transient_for (GTK_WINDOW(ow->dialog), parent);
// Set the style context for this dialog so it can be easily manipulated with css
gnc_widget_set_style_context (GTK_WIDGET(ow->dialog), "GncOrderDialog");
@ -683,7 +685,7 @@ gnc_order_new_window (QofBook *bookp, OrderDialogType type,
}
static OrderWindow *
gnc_order_window_new_order (QofBook *bookp, GncOwner *owner)
gnc_order_window_new_order (GtkWindow *parent, QofBook *bookp, GncOwner *owner)
{
OrderWindow *ow;
GtkBuilder *builder;
@ -706,6 +708,7 @@ gnc_order_window_new_order (QofBook *bookp, GncOwner *owner)
gnc_builder_add_from_file (builder, "dialog-order.glade", "new_order_dialog");
ow->dialog = GTK_WIDGET(gtk_builder_get_object (builder, "new_order_dialog"));
gtk_window_set_transient_for (GTK_WINDOW(ow->dialog), parent);
// Set the style context for this dialog so it can be easily manipulated with css
gnc_widget_set_style_context (GTK_WIDGET(ow->dialog), "GncOrderDialog");
@ -759,7 +762,7 @@ gnc_order_window_new_order (QofBook *bookp, GncOwner *owner)
}
OrderWindow *
gnc_ui_order_edit (GncOrder *order)
gnc_ui_order_edit (GtkWindow *parent, GncOrder *order)
{
OrderWindow *ow;
OrderDialogType type;
@ -773,14 +776,14 @@ gnc_ui_order_edit (GncOrder *order)
type = VIEW_ORDER;
}
ow = gnc_order_new_window (gncOrderGetBook(order), type, order,
ow = gnc_order_new_window (parent, gncOrderGetBook(order), type, order,
gncOrderGetOwner (order));
return ow;
}
OrderWindow *
gnc_ui_order_new (GncOwner *ownerp, QofBook *bookp)
gnc_ui_order_new (GtkWindow *parent, GncOwner *ownerp, QofBook *bookp)
{
OrderWindow *ow;
GncOwner owner;
@ -806,7 +809,7 @@ gnc_ui_order_new (GncOwner *ownerp, QofBook *bookp)
/* Make sure required options exist */
if (!bookp) return NULL;
ow = gnc_order_window_new_order (bookp, &owner);
ow = gnc_order_window_new_order (parent, bookp, &owner);
return ow;
}
@ -823,7 +826,7 @@ edit_order_cb (gpointer *order_p, gpointer user_data)
order = *order_p;
if (order)
gnc_ui_order_edit (order);
gnc_ui_order_edit (NULL, order);
return;
}
@ -836,7 +839,7 @@ new_order_cb (gpointer user_data)
g_return_val_if_fail (user_data, NULL);
ow = gnc_ui_order_new (sw->owner, sw->book);
ow = gnc_ui_order_new (NULL, sw->owner, sw->book);
return ow_get_order (ow);
}
@ -980,7 +983,7 @@ GNCSearchWindow *
gnc_order_search_edit (gpointer start, gpointer book)
{
if (start)
gnc_ui_order_edit (start);
gnc_ui_order_edit (NULL, start);
return NULL;
}

View File

@ -32,8 +32,8 @@ typedef struct _order_window OrderWindow;
#include "dialog-search.h"
/* Create and edit an order */
OrderWindow * gnc_ui_order_edit (GncOrder *order);
OrderWindow * gnc_ui_order_new (GncOwner *owner, QofBook *book);
OrderWindow * gnc_ui_order_edit (GtkWindow *parent, GncOrder *order);
OrderWindow * gnc_ui_order_new (GtkWindow *parent, GncOwner *owner, QofBook *book);
/* Search for orders */
GNCSearchWindow * gnc_order_search (GncOrder *start, GncOwner *owner,

View File

@ -1117,7 +1117,7 @@ static void print_date (G_GNUC_UNUSED GtkTreeViewColumn *tree_column,
}
static PaymentWindow *
new_payment_window (GtkWidget *parent, QofBook *book, InitialPaymentInfo *tx_info)
new_payment_window (GtkWindow *parent, QofBook *book, InitialPaymentInfo *tx_info)
{
PaymentWindow *pw;
GtkBuilder *builder;
@ -1154,6 +1154,7 @@ new_payment_window (GtkWidget *parent, QofBook *book, InitialPaymentInfo *tx_inf
gncOwnerCopy (&pw->tx_info->owner, &(pw->owner));
gnc_payment_set_owner_type (pw, gncOwnerGetType(&pw->tx_info->owner));
gtk_window_set_transient_for (GTK_WINDOW(pw->dialog), parent);
gtk_window_present (GTK_WINDOW(pw->dialog));
return(pw);
}
@ -1173,6 +1174,7 @@ new_payment_window (GtkWidget *parent, QofBook *book, InitialPaymentInfo *tx_inf
gnc_builder_add_from_file (builder, "dialog-payment.glade", "owner_type_combo_model");
gnc_builder_add_from_file (builder, "dialog-payment.glade", "payment_dialog");
pw->dialog = GTK_WIDGET (gtk_builder_get_object (builder, "payment_dialog"));
gtk_window_set_transient_for (GTK_WINDOW(pw->dialog), parent);
// Set the style context for this dialog so it can be easily manipulated with css
gnc_widget_set_style_context (GTK_WIDGET(pw->dialog), "GncPaymentDialog");
@ -1364,8 +1366,8 @@ gnc_ui_payment_window_destroy (PaymentWindow *pw)
}
PaymentWindow *
gnc_ui_payment_new_with_invoice (const GncOwner *owner, QofBook *book,
GncInvoice *invoice)
gnc_ui_payment_new_with_invoice (GtkWindow *parent, const GncOwner *owner,
QofBook *book, GncInvoice *invoice)
{
GNCLot *postlot;
InitialPaymentInfo *tx_info;
@ -1395,13 +1397,13 @@ gnc_ui_payment_new_with_invoice (const GncOwner *owner, QofBook *book,
lot_info->amount = gnc_numeric_zero ();
tx_info->lots = g_list_prepend (tx_info->lots, lot_info);
}
return new_payment_window (NULL, book, tx_info);
return new_payment_window (parent, book, tx_info);
}
PaymentWindow *
gnc_ui_payment_new (GncOwner *owner, QofBook *book)
gnc_ui_payment_new (GtkWindow *parent, GncOwner *owner, QofBook *book)
{
return gnc_ui_payment_new_with_invoice (owner, book, NULL);
return gnc_ui_payment_new_with_invoice (parent, owner, book, NULL);
}
// ///////////////
@ -1477,7 +1479,7 @@ static char *gen_split_desc (Transaction *txn, Split *split)
return split_str;
}
static Split *select_payment_split (GtkWidget *parent, Transaction *txn)
static Split *select_payment_split (GtkWindow *parent, Transaction *txn)
{
/* We require the txn to have one split in an Asset account.
* The only exception would be a lot link transaction
@ -1490,7 +1492,7 @@ static Split *select_payment_split (GtkWidget *parent, Transaction *txn)
if (xaccTransGetTxnType(txn) == TXN_TYPE_LINK)
return NULL;
dialog = gtk_message_dialog_new (GTK_WINDOW(parent),
dialog = gtk_message_dialog_new (parent,
GTK_DIALOG_DESTROY_WITH_PARENT,
GTK_MESSAGE_INFO,
GTK_BUTTONS_CLOSE,
@ -1513,7 +1515,7 @@ static Split *select_payment_split (GtkWidget *parent, Transaction *txn)
"Please select one, the others will be ignored.\n\n");
GtkDialog *dialog = GTK_DIALOG(
gtk_dialog_new_with_buttons (_("Warning"),
GTK_WINDOW(parent),
parent,
GTK_DIALOG_DESTROY_WITH_PARENT,
_("Continue"), GTK_BUTTONS_OK,
_("Cancel"), GTK_BUTTONS_CANCEL,
@ -1569,7 +1571,7 @@ static Split *select_payment_split (GtkWidget *parent, Transaction *txn)
return payment_splits->data;
}
static GList *select_txn_lots (GtkWidget *parent, Transaction *txn, Account **post_acct, gboolean *abort)
static GList *select_txn_lots (GtkWindow *parent, Transaction *txn, Account **post_acct, gboolean *abort)
{
gboolean has_no_lot_apar_splits = FALSE;
SplitList *post_splits = NULL, *no_lot_post_splits = NULL;
@ -1624,7 +1626,7 @@ static GList *select_txn_lots (GtkWidget *parent, Transaction *txn, Account **po
split_str = tmp_str2;
}
dialog = gtk_message_dialog_new (GTK_WINDOW(parent),
dialog = gtk_message_dialog_new (parent,
GTK_DIALOG_DESTROY_WITH_PARENT,
GTK_MESSAGE_WARNING,
GTK_BUTTONS_CANCEL,
@ -1648,7 +1650,7 @@ static GList *select_txn_lots (GtkWidget *parent, Transaction *txn, Account **po
return txn_lots;
}
PaymentWindow * gnc_ui_payment_new_with_txn (GtkWidget* parent, GncOwner *owner, Transaction *txn)
PaymentWindow * gnc_ui_payment_new_with_txn (GtkWindow* parent, GncOwner *owner, Transaction *txn)
{
Split *payment_split = NULL;
Account *post_acct = NULL;
@ -1682,7 +1684,7 @@ PaymentWindow * gnc_ui_payment_new_with_txn (GtkWidget* parent, GncOwner *owner,
tx_info->lots = txn_lots;
gncOwnerCopy (owner, &tx_info->owner);
pw = new_payment_window (NULL,
pw = new_payment_window (parent,
qof_instance_get_book(QOF_INSTANCE(txn)),
tx_info);

View File

@ -30,11 +30,12 @@ typedef struct _payment_window PaymentWindow;
#include "gncInvoice.h"
/* Create a payment window */
PaymentWindow * gnc_ui_payment_new (GncOwner *owner, QofBook *book);
PaymentWindow * gnc_ui_payment_new_with_invoice (const GncOwner *owner,
QofBook *book,
GncInvoice *invoice);
PaymentWindow * gnc_ui_payment_new_with_txn (GtkWidget *parent, GncOwner *owner, Transaction *txn);
PaymentWindow * gnc_ui_payment_new (GtkWindow *parent, GncOwner *owner, QofBook *book);
PaymentWindow * gnc_ui_payment_new_with_invoice (GtkWindow *parent,
const GncOwner *owner,
QofBook *book,
GncInvoice *invoice);
PaymentWindow * gnc_ui_payment_new_with_txn (GtkWindow *parent, GncOwner *owner, Transaction *txn);
/** Returns TRUE if the given transaction (to be used with gnc_ui_payment_new_with_txn() )
* is for a customer, or FALSE if it's from a vendor or employee voucher. */

View File

@ -395,7 +395,7 @@ find_handler (gpointer find_data, gpointer user_data)
}
static VendorWindow *
gnc_vendor_new_window (QofBook *bookp, GncVendor *vendor)
gnc_vendor_new_window (GtkWindow *parent, QofBook *bookp, GncVendor *vendor)
{
VendorWindow *vw;
GtkBuilder *builder;
@ -415,6 +415,7 @@ gnc_vendor_new_window (QofBook *bookp, GncVendor *vendor)
find_handler, &vendor_guid);
if (vw)
{
gtk_window_set_transient_for (GTK_WINDOW(vw->dialog), parent);
gtk_window_present (GTK_WINDOW(vw->dialog));
return(vw);
}
@ -440,6 +441,7 @@ gnc_vendor_new_window (QofBook *bookp, GncVendor *vendor)
gnc_builder_add_from_file (builder, "dialog-vendor.glade", "taxtable_store");
gnc_builder_add_from_file (builder, "dialog-vendor.glade", "vendor_dialog");
vw->dialog = GTK_WIDGET (gtk_builder_get_object (builder, "vendor_dialog"));
gtk_window_set_transient_for (GTK_WINDOW(vw->dialog), parent);
// Set the style context for this dialog so it can be easily manipulated with css
gnc_widget_set_style_context (GTK_WIDGET(vw->dialog), "GncVendorDialog");
@ -559,25 +561,25 @@ gnc_vendor_new_window (QofBook *bookp, GncVendor *vendor)
}
VendorWindow *
gnc_ui_vendor_new (QofBook *bookp)
gnc_ui_vendor_new (GtkWindow *parent, QofBook *bookp)
{
VendorWindow *vw;
/* Make sure required options exist */
if (!bookp) return NULL;
vw = gnc_vendor_new_window (bookp, NULL);
vw = gnc_vendor_new_window (parent, bookp, NULL);
return vw;
}
VendorWindow *
gnc_ui_vendor_edit (GncVendor *vendor)
gnc_ui_vendor_edit (GtkWindow *parent, GncVendor *vendor)
{
VendorWindow *vw;
if (!vendor) return NULL;
vw = gnc_vendor_new_window (gncVendorGetBook(vendor), vendor);
vw = gnc_vendor_new_window (parent, gncVendorGetBook(vendor), vendor);
return vw;
}
@ -656,7 +658,7 @@ payment_vendor_cb (gpointer *vendor_p, gpointer user_data)
return;
gncOwnerInitVendor (&owner, vendor);
gnc_ui_payment_new (&owner, sw->book);
gnc_ui_payment_new (NULL, &owner, sw->book);
return;
}
@ -672,7 +674,7 @@ edit_vendor_cb (gpointer *vendor_p, gpointer user_data)
if (!vendor)
return;
gnc_ui_vendor_edit (vendor);
gnc_ui_vendor_edit (NULL, vendor);
return;
}
@ -684,7 +686,7 @@ new_vendor_cb (gpointer user_data)
g_return_val_if_fail (user_data, NULL);
vw = gnc_ui_vendor_new (sw->book);
vw = gnc_ui_vendor_new (NULL, sw->book);
return vw_get_vendor (vw);
}
@ -778,7 +780,7 @@ GNCSearchWindow *
gnc_vendor_search_edit (gpointer start, gpointer book)
{
if (start)
gnc_ui_vendor_edit (start);
gnc_ui_vendor_edit (NULL, start);
return NULL;
}

View File

@ -31,8 +31,8 @@ typedef struct _vendor_window VendorWindow;
#include "dialog-search.h"
/* Create or Edit Vendors */
VendorWindow * gnc_ui_vendor_edit (GncVendor *vendor);
VendorWindow * gnc_ui_vendor_new (QofBook *book);
VendorWindow * gnc_ui_vendor_edit (GtkWindow *parent, GncVendor *vendor);
VendorWindow * gnc_ui_vendor_new (GtkWindow *parent, QofBook *book);
/* Search for vendors */
GNCSearchWindow * gnc_vendor_search (GncVendor *start, QofBook *book);

View File

@ -471,7 +471,7 @@ gnc_plugin_business_cmd_customer_new_customer (GtkAction *action,
g_return_if_fail (mw != NULL);
g_return_if_fail (GNC_IS_PLUGIN_BUSINESS (mw->data));
gnc_ui_customer_new (gnc_get_current_book());
gnc_ui_customer_new (GTK_WINDOW (mw->window), gnc_get_current_book ());
}
static void
@ -504,7 +504,7 @@ gnc_plugin_business_cmd_customer_new_invoice (GtkAction *action,
plugin = GNC_PLUGIN_BUSINESS (mw->data);
priv = GNC_PLUGIN_BUSINESS_GET_PRIVATE (plugin);
last_window = mw->window;
gnc_ui_invoice_new (priv->last_customer, gnc_get_current_book());
gnc_ui_invoice_new (GTK_WINDOW (mw->window), priv->last_customer, gnc_get_current_book ());
}
static void
@ -535,7 +535,7 @@ gnc_plugin_business_cmd_customer_new_job (GtkAction *action,
plugin = GNC_PLUGIN_BUSINESS (mw->data);
priv = GNC_PLUGIN_BUSINESS_GET_PRIVATE (plugin);
gnc_ui_job_new (priv->last_customer, gnc_get_current_book());
gnc_ui_job_new (GTK_WINDOW (mw->window), priv->last_customer, gnc_get_current_book ());
}
static void
@ -565,7 +565,7 @@ gnc_plugin_business_cmd_customer_process_payment (GtkAction *action,
plugin = GNC_PLUGIN_BUSINESS (mw->data);
priv = GNC_PLUGIN_BUSINESS_GET_PRIVATE (plugin);
gnc_ui_payment_new (priv->last_customer, gnc_get_current_book());
gnc_ui_payment_new (GTK_WINDOW (mw->window), priv->last_customer, gnc_get_current_book ());
}
static void
@ -588,7 +588,7 @@ gnc_plugin_business_cmd_vendor_new_vendor (GtkAction *action,
g_return_if_fail (mw != NULL);
g_return_if_fail (GNC_IS_PLUGIN_BUSINESS (mw->data));
gnc_ui_vendor_new (gnc_get_current_book());
gnc_ui_vendor_new (GTK_WINDOW (mw->window), gnc_get_current_book ());
}
static void
@ -621,7 +621,7 @@ gnc_plugin_business_cmd_vendor_new_bill (GtkAction *action,
plugin = GNC_PLUGIN_BUSINESS (mw->data);
priv = GNC_PLUGIN_BUSINESS_GET_PRIVATE (plugin);
last_window = mw->window;
gnc_ui_invoice_new (priv->last_vendor, gnc_get_current_book());
gnc_ui_invoice_new (GTK_WINDOW (mw->window), priv->last_vendor, gnc_get_current_book ());
}
static void
@ -652,7 +652,7 @@ gnc_plugin_business_cmd_vendor_new_job (GtkAction *action,
plugin = GNC_PLUGIN_BUSINESS (mw->data);
priv = GNC_PLUGIN_BUSINESS_GET_PRIVATE (plugin);
gnc_ui_job_new (priv->last_vendor, gnc_get_current_book());
gnc_ui_job_new (GTK_WINDOW (mw->window), priv->last_vendor, gnc_get_current_book ());
}
static void
@ -682,7 +682,7 @@ gnc_plugin_business_cmd_vendor_process_payment (GtkAction *action,
plugin = GNC_PLUGIN_BUSINESS (mw->data);
priv = GNC_PLUGIN_BUSINESS_GET_PRIVATE (plugin);
gnc_ui_payment_new (priv->last_vendor, gnc_get_current_book());
gnc_ui_payment_new (GTK_WINDOW (mw->window), priv->last_vendor, gnc_get_current_book ());
}
static void
@ -705,7 +705,7 @@ gnc_plugin_business_cmd_employee_new_employee (GtkAction *action,
g_return_if_fail (mw != NULL);
g_return_if_fail (GNC_IS_PLUGIN_BUSINESS (mw->data));
gnc_ui_employee_new (gnc_get_current_book());
gnc_ui_employee_new (GTK_WINDOW (mw->window), gnc_get_current_book ());
}
static void
@ -738,7 +738,7 @@ gnc_plugin_business_cmd_employee_new_expense_voucher (GtkAction *action,
plugin = GNC_PLUGIN_BUSINESS (mw->data);
priv = GNC_PLUGIN_BUSINESS_GET_PRIVATE (plugin);
last_window = mw->window;
gnc_ui_invoice_new (priv->last_employee, gnc_get_current_book());
gnc_ui_invoice_new (GTK_WINDOW (mw->window), priv->last_employee, gnc_get_current_book ());
}
static void
@ -769,7 +769,7 @@ gnc_plugin_business_cmd_employee_process_payment (GtkAction *action,
plugin = GNC_PLUGIN_BUSINESS (mw->data);
priv = GNC_PLUGIN_BUSINESS_GET_PRIVATE (plugin);
gnc_ui_payment_new (priv->last_employee, gnc_get_current_book());
gnc_ui_payment_new (GTK_WINDOW (mw->window), priv->last_employee, gnc_get_current_book ());
}
static void
@ -821,7 +821,7 @@ gnc_plugin_business_cmd_test_search (GtkAction *action,
gnc_search_dialog_test();
}
static void gnc_business_assign_payment (GtkWidget *parent,
static void gnc_business_assign_payment (GtkWindow *parent,
Transaction *trans,
GncOwner *owner)
{
@ -883,7 +883,7 @@ static void gnc_plugin_business_cmd_assign_payment (GtkAction *action,
else
owner_p = plugin_business_priv->last_vendor;
gnc_business_assign_payment (gnc_plugin_page_get_window(plugin_page),
gnc_business_assign_payment (GTK_WINDOW (mw->window),
trans, owner_p);
}
@ -1019,7 +1019,7 @@ gnc_plugin_business_cmd_test_init_data (GtkAction *action,
gnc_account_append_child(root, tax_acct);
// Launch the invoice editor
gnc_ui_invoice_edit(invoice);
gnc_ui_invoice_edit (GTK_WINDOW (data->window), invoice);
}
/* This is the list of actions which are switched inactive in a read-only book. */

View File

@ -648,12 +648,14 @@ gnc_plugin_page_invoice_cmd_new_invoice (GtkAction *action,
GncPluginPageInvoice *plugin_page)
{
GncPluginPageInvoicePrivate *priv;
GtkWindow *parent;
g_return_if_fail(GNC_IS_PLUGIN_PAGE_INVOICE(plugin_page));
ENTER("(action %p, plugin_page %p)", action, plugin_page);
priv = GNC_PLUGIN_PAGE_INVOICE_GET_PRIVATE(plugin_page);
gnc_invoice_window_new_invoice_cb(NULL, priv->iw);
parent = GTK_WINDOW (gnc_plugin_page_get_window (GNC_PLUGIN_PAGE (plugin_page)));
gnc_invoice_window_new_invoice_cb(parent, priv->iw);
LEAVE(" ");
}
@ -673,12 +675,14 @@ gnc_plugin_page_invoice_cmd_print (GtkAction *action,
GncPluginPageInvoice *plugin_page)
{
GncPluginPageInvoicePrivate *priv;
GtkWindow *parent;
g_return_if_fail(GNC_IS_PLUGIN_PAGE_INVOICE(plugin_page));
ENTER("(action %p, plugin_page %p)", action, plugin_page);
priv = GNC_PLUGIN_PAGE_INVOICE_GET_PRIVATE(plugin_page);
gnc_invoice_window_printCB(NULL, priv->iw);
parent = GTK_WINDOW (gnc_plugin_page_get_window (GNC_PLUGIN_PAGE (plugin_page)));
gnc_invoice_window_printCB (parent, priv->iw);
LEAVE(" ");
}
@ -729,12 +733,14 @@ gnc_plugin_page_invoice_cmd_edit (GtkAction *action,
GncPluginPageInvoice *plugin_page)
{
GncPluginPageInvoicePrivate *priv;
GtkWindow *parent;
g_return_if_fail(GNC_IS_PLUGIN_PAGE_INVOICE(plugin_page));
ENTER("(action %p, plugin_page %p)", action, plugin_page);
priv = GNC_PLUGIN_PAGE_INVOICE_GET_PRIVATE(plugin_page);
gnc_invoice_window_editCB(NULL, priv->iw);
parent = GTK_WINDOW (gnc_plugin_page_get_window (GNC_PLUGIN_PAGE (plugin_page)));
gnc_invoice_window_editCB (parent, priv->iw);
LEAVE(" ");
}
@ -743,12 +749,14 @@ gnc_plugin_page_invoice_cmd_duplicateInvoice (GtkAction *action,
GncPluginPageInvoice *plugin_page)
{
GncPluginPageInvoicePrivate *priv;
GtkWindow *parent;
g_return_if_fail(GNC_IS_PLUGIN_PAGE_INVOICE(plugin_page));
ENTER("(action %p, plugin_page %p)", action, plugin_page);
priv = GNC_PLUGIN_PAGE_INVOICE_GET_PRIVATE(plugin_page);
gnc_invoice_window_duplicateInvoiceCB(NULL, priv->iw);
parent = GTK_WINDOW (gnc_plugin_page_get_window (GNC_PLUGIN_PAGE (plugin_page)));
gnc_invoice_window_duplicateInvoiceCB(parent, priv->iw);
LEAVE(" ");
}
@ -906,12 +914,14 @@ gnc_plugin_page_invoice_cmd_pay_invoice (GtkAction *action,
GncPluginPageInvoice *plugin_page)
{
GncPluginPageInvoicePrivate *priv;
GtkWindow *parent;
g_return_if_fail(GNC_IS_PLUGIN_PAGE_INVOICE(plugin_page));
ENTER("(action %p, plugin_page %p)", action, plugin_page);
priv = GNC_PLUGIN_PAGE_INVOICE_GET_PRIVATE(plugin_page);
gnc_invoice_window_payment_cb(NULL, priv->iw);
parent = GTK_WINDOW (gnc_plugin_page_get_window (GNC_PLUGIN_PAGE (plugin_page)));
gnc_invoice_window_payment_cb (parent, priv->iw);
LEAVE(" ");
}
@ -920,12 +930,14 @@ gnc_plugin_page_invoice_cmd_company_report (GtkAction *action,
GncPluginPageInvoice *plugin_page)
{
GncPluginPageInvoicePrivate *priv;
GtkWindow *parent;
g_return_if_fail(GNC_IS_PLUGIN_PAGE_INVOICE(plugin_page));
ENTER("(action %p, plugin_page %p)", action, plugin_page);
priv = GNC_PLUGIN_PAGE_INVOICE_GET_PRIVATE(plugin_page);
gnc_invoice_window_report_owner_cb(NULL, priv->iw);
parent = GTK_WINDOW (gnc_plugin_page_get_window (GNC_PLUGIN_PAGE (plugin_page)));
gnc_invoice_window_report_owner_cb (parent, priv->iw);
LEAVE(" ");
}

View File

@ -775,7 +775,7 @@ gnc_plugin_page_owner_tree_recreate_page (GtkWidget *window,
}
/* Wrapper function to open the proper edit dialog, depending on the owner type */
static void gnc_ui_owner_edit (GncOwner *owner)
static void gnc_ui_owner_edit (GtkWindow *parent, GncOwner *owner)
{
if (NULL == owner) return;
@ -786,22 +786,22 @@ static void gnc_ui_owner_edit (GncOwner *owner)
break;
case GNC_OWNER_CUSTOMER :
{
gnc_ui_customer_edit (owner->owner.customer);
gnc_ui_customer_edit (parent, owner->owner.customer);
break;
}
case GNC_OWNER_JOB :
{
gnc_ui_job_edit (owner->owner.job);
gnc_ui_job_edit (parent, owner->owner.job);
break;
}
case GNC_OWNER_VENDOR :
{
gnc_ui_vendor_edit (owner->owner.vendor);
gnc_ui_vendor_edit (parent, owner->owner.vendor);
break;
}
case GNC_OWNER_EMPLOYEE :
{
gnc_ui_employee_edit (owner->owner.employee);
gnc_ui_employee_edit (parent, owner->owner.employee);
break;
}
}
@ -842,10 +842,12 @@ gnc_plugin_page_owner_tree_double_click_cb (GtkTreeView *treeview,
GncPluginPageOwnerTree *page)
{
GncOwner *owner;
GtkWindow *parent;
g_return_if_fail (GNC_IS_PLUGIN_PAGE_OWNER_TREE (page));
owner = gnc_tree_view_owner_get_owner_from_path (GNC_TREE_VIEW_OWNER(treeview), path);
gnc_ui_owner_edit (owner);
parent = GTK_WINDOW (gnc_plugin_page_get_window (GNC_PLUGIN_PAGE (page)));
gnc_ui_owner_edit (parent, owner);
}
static void
@ -993,10 +995,12 @@ static void
gnc_plugin_page_owner_tree_cmd_new_owner (GtkAction *action, GncPluginPageOwnerTree *page)
{
GncPluginPageOwnerTreePrivate *priv;
GtkWindow *parent;
g_return_if_fail(GNC_IS_PLUGIN_PAGE_OWNER_TREE(page));
priv = GNC_PLUGIN_PAGE_OWNER_TREE_GET_PRIVATE (page);
parent = GTK_WINDOW (gnc_plugin_page_get_window (GNC_PLUGIN_PAGE (page)));
switch (priv->owner_type)
{
@ -1005,7 +1009,7 @@ gnc_plugin_page_owner_tree_cmd_new_owner (GtkAction *action, GncPluginPageOwnerT
break;
case GNC_OWNER_CUSTOMER :
{
gnc_ui_customer_new (gnc_get_current_book ());
gnc_ui_customer_new (parent, gnc_get_current_book ());
break;
}
case GNC_OWNER_JOB :
@ -1016,12 +1020,12 @@ gnc_plugin_page_owner_tree_cmd_new_owner (GtkAction *action, GncPluginPageOwnerT
}
case GNC_OWNER_VENDOR :
{
gnc_ui_vendor_new (gnc_get_current_book ());
gnc_ui_vendor_new (parent, gnc_get_current_book ());
break;
}
case GNC_OWNER_EMPLOYEE :
{
gnc_ui_employee_new (gnc_get_current_book ());
gnc_ui_employee_new (parent, gnc_get_current_book ());
break;
}
}
@ -1030,12 +1034,14 @@ gnc_plugin_page_owner_tree_cmd_new_owner (GtkAction *action, GncPluginPageOwnerT
static void
gnc_plugin_page_owner_tree_cmd_edit_owner (GtkAction *action, GncPluginPageOwnerTree *page)
{
GtkWindow *parent;
GncOwner *owner = gnc_plugin_page_owner_tree_get_current_owner (page);
if (NULL == owner) return;
ENTER("action %p, page %p", action, page);
gnc_ui_owner_edit (owner);
parent = GTK_WINDOW (gnc_plugin_page_get_window (GNC_PLUGIN_PAGE (page)));
gnc_ui_owner_edit (parent, owner);
LEAVE(" ");
}
@ -1132,6 +1138,7 @@ gnc_plugin_page_owner_tree_cmd_new_invoice (GtkAction *action,
{
GncPluginPageOwnerTreePrivate *priv;
GncOwner current_owner;
GtkWindow *parent;
ENTER("action %p, page %p", action, page);
@ -1168,8 +1175,9 @@ gnc_plugin_page_owner_tree_cmd_new_invoice (GtkAction *action,
}
}
parent = GTK_WINDOW (gnc_plugin_page_get_window (GNC_PLUGIN_PAGE (page)));
if (gncOwnerGetType(&current_owner) != GNC_OWNER_UNDEFINED)
gnc_ui_invoice_new (&current_owner, gnc_get_current_book());
gnc_ui_invoice_new (parent, &current_owner, gnc_get_current_book ());
LEAVE(" ");
}

View File

@ -27,7 +27,6 @@
</columns>
</object>
<object class="GtkDialog" id="customer_dialog">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="title" translatable="yes">New Customer</property>
<property name="type_hint">dialog</property>

View File

@ -3,7 +3,6 @@
<interface>
<requires lib="gtk+" version="3.10"/>
<object class="GtkDialog" id="employee_dialog">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="title" translatable="yes">New Employee</property>
<property name="type_hint">dialog</property>

View File

@ -677,7 +677,6 @@
</columns>
</object>
<object class="GtkDialog" id="new_invoice_dialog">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="title" translatable="yes">New Invoice</property>
<property name="type_hint">dialog</property>
@ -1282,7 +1281,6 @@
</action-widgets>
</object>
<object class="GtkDialog" id="unpost_message_dialog">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="resizable">False</property>
<property name="modal">True</property>

View File

@ -3,7 +3,6 @@
<interface>
<requires lib="gtk+" version="3.10"/>
<object class="GtkDialog" id="job_dialog">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="title" translatable="yes">Job Dialog</property>
<property name="resizable">False</property>
@ -232,11 +231,11 @@
</packing>
</child>
<child>
<object class="GtkLabel" id="labelrate">
<object class="GtkLabel" id="label4">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="halign">end</property>
<property name="label" translatable="yes">Rate</property>
<property name="label" translatable="yes">Billing ID</property>
<property name="justify">right</property>
</object>
<packing>
@ -246,11 +245,11 @@
</packing>
</child>
<child>
<object class="GtkLabel" id="label4">
<object class="GtkLabel" id="labelrate">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="halign">end</property>
<property name="label" translatable="yes">Billing ID</property>
<property name="label" translatable="yes">Rate</property>
<property name="justify">right</property>
</object>
<packing>
@ -287,20 +286,6 @@
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkBox" id="rate_entry">
<property name="visible">True</property>
<property name="can_focus">False</property>
<child>
<placeholder/>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
<child>
<object class="GtkEntry" id="desc_entry">
<property name="visible">True</property>
@ -315,6 +300,20 @@
<property name="position">1</property>
</packing>
</child>
<child>
<object class="GtkBox" id="rate_entry">
<property name="visible">True</property>
<property name="can_focus">False</property>
<child>
<placeholder/>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
</object>
<packing>
<property name="expand">True</property>

View File

@ -4,7 +4,6 @@
<requires lib="gtk+" version="3.10"/>
<object class="GtkTextBuffer" id="notes_buffer"/>
<object class="GtkDialog" id="order_entry_dialog">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="title" translatable="yes">Order Entry</property>
<property name="default_width">950</property>
@ -526,7 +525,6 @@
</object>
<object class="GtkTextBuffer" id="text_buffer"/>
<object class="GtkDialog" id="new_order_dialog">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="title" translatable="yes">New Order</property>
<property name="type_hint">dialog</property>

View File

@ -57,7 +57,6 @@
</columns>
</object>
<object class="GtkDialog" id="payment_dialog">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="title" translatable="yes">Process Payment</property>
<property name="default_height">560</property>

View File

@ -27,7 +27,6 @@
</columns>
</object>
<object class="GtkDialog" id="vendor_dialog">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="title" translatable="yes">New Vendor</property>
<property name="type_hint">dialog</property>

View File

@ -183,7 +183,7 @@ gnc_html_register_url_cb (const char *location, const char *label,
}
page = gnc_plugin_page_register_new (account, FALSE);
gnc_main_window_open_page (NULL, page);
gnc_main_window_open_page (GNC_MAIN_WINDOW (result->parent), page);
if (split)
{
gsr = gnc_plugin_page_register_get_gsr(page);
@ -213,7 +213,7 @@ gnc_html_price_url_cb (const char *location, const char *label,
if (!validate_type("price-guid=", location, GNC_ID_PRICE, result, &guid, &entity))
return FALSE;
if (!gnc_price_edit_by_guid (NULL, &guid))
if (!gnc_price_edit_by_guid (GTK_WIDGET (result->parent), &guid))
{
result->error_message = g_strdup_printf (_("No such price: %s"),
location);

View File

@ -881,6 +881,7 @@ impl_webkit_show_url( GncHtml* self, URLType type,
result.base_type = URL_TYPE_FILE;
result.base_location = NULL;
result.error_message = NULL;
result.parent = GTK_WINDOW (priv->base.parent);
ok = url_handler( location, label, new_window, &result );
if ( !ok )

View File

@ -853,6 +853,7 @@ impl_webkit_show_url( GncHtml* self, URLType type,
result.base_type = URL_TYPE_FILE;
result.base_location = NULL;
result.error_message = NULL;
result.parent = GTK_WINDOW (priv->base.parent);
ok = url_handler( location, label, new_window, &result );
if ( !ok )

View File

@ -67,6 +67,9 @@ typedef struct
URLType base_type;
gchar* base_location;
/* The window that triggered this URL request */
GtkWindow *parent;
/* The following members are used if the handler fails (returns FALSE). */
gchar* error_message;
} GNCURLResult;

View File

@ -44,6 +44,7 @@
struct _bi_import_gui
{
GtkWindow *parent;
GtkWidget *dialog;
GtkWidget *tree_view;
GtkWidget *entryFilename;
@ -81,7 +82,7 @@ static void gnc_info2_dialog (GtkWidget *parent, const gchar *title, const gchar
static QofLogModule UNUSED_VAR log_module = G_LOG_DOMAIN; //G_LOG_BUSINESS;
BillImportGui *
gnc_plugin_bi_import_showGUI(void)
gnc_plugin_bi_import_showGUI (GtkWindow *parent)
{
BillImportGui *gui;
GtkBuilder *builder;
@ -96,6 +97,9 @@ gnc_plugin_bi_import_showGUI(void)
// window found
gui = g_list_nth_data (glist, 0);
g_list_free (glist);
gtk_window_set_transient_for(GTK_WINDOW(gui->dialog), GTK_WINDOW(parent));
gui->parent = parent;
gtk_window_present (GTK_WINDOW(gui->dialog));
return gui;
}
@ -108,6 +112,8 @@ gnc_plugin_bi_import_showGUI(void)
builder = gtk_builder_new();
gnc_builder_add_from_file (builder, "dialog-bi-import-gui.glade", "bi_import_dialog");
gui->dialog = GTK_WIDGET(gtk_builder_get_object (builder, "bi_import_dialog"));
gtk_window_set_transient_for(GTK_WINDOW(gui->dialog), GTK_WINDOW(parent));
gui->parent = parent;
gui->tree_view = GTK_WIDGET(gtk_builder_get_object (builder, "treeview1"));
gui->entryFilename = GTK_WIDGET(gtk_builder_get_object (builder, "entryFilename"));
@ -208,7 +214,8 @@ gnc_bi_import_gui_ok_cb (GtkWidget *widget, gpointer data)
if (res == RESULT_OK)
{
gnc_bi_import_fix_bis (gui->store, &n_fixed, &n_deleted, info, gui->type);
gnc_bi_import_create_bis (gui->store, gui->book, &n_invoices_created, &n_invoices_updated, gui->type, gui->open_mode, info);
gnc_bi_import_create_bis (gui->store, gui->book, &n_invoices_created, &n_invoices_updated,
gui->type, gui->open_mode, info, gui->parent);
if (info->len > 0)
gnc_info_dialog (GTK_WINDOW (gui->dialog), "%s", info->str);
g_string_free( info, TRUE );

View File

@ -39,7 +39,7 @@ typedef struct _bi_import_gui BillImportGui;
/**
* File chooser
*/
BillImportGui *gnc_plugin_bi_import_showGUI(void);
BillImportGui *gnc_plugin_bi_import_showGUI(GtkWindow *parent);
G_END_DECLS

View File

@ -504,7 +504,8 @@ void
gnc_bi_import_create_bis (GtkListStore * store, QofBook * book,
guint * n_invoices_created,
guint * n_invoices_updated,
gchar * type, gchar * open_mode, GString * info)
gchar * type, gchar * open_mode, GString * info,
GtkWindow *parent)
{
gboolean valid;
GtkTreeIter iter;
@ -628,7 +629,6 @@ gnc_bi_import_create_bis (GtkListStore * store, QofBook * book,
(*n_invoices_created)++;
update = YES;
gncInvoiceCommitEdit (invoice);
}
// I want to warn the user that an existing billvoice exists, but not every
@ -645,7 +645,7 @@ gnc_bi_import_create_bis (GtkListStore * store, QofBook * book,
}
if (update != YES) // Pop up a dialog to ask if updates are the expected action
{
dialog = gtk_message_dialog_new (NULL,
dialog = gtk_message_dialog_new (parent,
GTK_DIALOG_MODAL,
GTK_MESSAGE_ERROR,
GTK_BUTTONS_YES_NO,
@ -840,7 +840,7 @@ gnc_bi_import_create_bis (GtkListStore * store, QofBook * book,
|| (g_ascii_strcasecmp(open_mode, "NOT_POSTED") == 0
&& strlen(date_posted) == 0))
{
iw = gnc_ui_invoice_edit (invoice);
iw = gnc_ui_invoice_edit (parent, invoice);
gnc_plugin_page_invoice_new (iw);
}

View File

@ -68,7 +68,9 @@ void
gnc_bi_import_fix_bis (GtkListStore *store, guint *fixed, guint *deleted, GString *info, gchar *type);
void
gnc_bi_import_create_bis (GtkListStore *store, QofBook *book, guint *n_invoices_created, guint *n_invoices_updated, gchar *type, gchar *open_mode, GString * info);
gnc_bi_import_create_bis (GtkListStore *store, QofBook *book, guint *n_invoices_created,
guint *n_invoices_updated, gchar *type, gchar *open_mode, GString * info,
GtkWindow *parent);
G_END_DECLS

View File

@ -109,7 +109,7 @@ gnc_plugin_bi_import_cmd_test (GtkAction *action, GncMainWindowActionData *data)
ENTER ("action %p, main window data %p", action, data);
g_message ("bi_import");
gnc_plugin_bi_import_showGUI();
gnc_plugin_bi_import_showGUI(GTK_WINDOW(data->window));
LEAVE (" ");
}

View File

@ -56,10 +56,10 @@
********************************************************************/
void
reportWindow(int report_id)
reportWindow(int report_id, GtkWindow *parent)
{
gnc_set_busy_cursor (NULL, TRUE);
gnc_main_window_open_report(report_id, NULL);
gnc_main_window_open_report(report_id, GNC_MAIN_WINDOW(parent));
gnc_unset_busy_cursor (NULL);
}
@ -324,7 +324,7 @@ gnc_html_options_url_cb (const char *location, const char *label,
return FALSE;
}
gnc_report_edit_options (report, NULL);
gnc_report_edit_options (report, GTK_WINDOW(result->parent));
return TRUE;
}
@ -350,7 +350,7 @@ gnc_html_report_url_cb (const char *location, const char *label,
char *url;
url = gnc_build_url (URL_TYPE_REPORT, location, label);
gnc_main_window_open_report_url (url, NULL);
gnc_main_window_open_report_url (url, GNC_MAIN_WINDOW(result->parent));
g_free (url);
result->load_to_stream = FALSE;

View File

@ -38,7 +38,7 @@ GtkWidget * gnc_report_window_default_params_editor(SCM options, SCM report, Gtk
// called from multiple places
// [gnome-business/dialog-invoice.c;gnome/window-register.c]; and
// scm-exposed; 3-liner which calls gnc_main_window_open_report after handling busy-cursor.
void reportWindow(int id);
void reportWindow(int id, GtkWindow *parent);
gboolean gnc_report_edit_options(SCM report, GtkWindow *parent);
// module[/plugin]-init
void gnc_report_init (void);