mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
Set transient parents for all query views and dialogs
This commit is contained in:
parent
d8cc165e28
commit
995c3cf4c3
@ -177,7 +177,7 @@ gnc_dialog_query_view_close (GtkButton *button, DialogQueryView *dqv)
|
||||
/* PUBLIC INTERFACES */
|
||||
|
||||
DialogQueryView *
|
||||
gnc_dialog_query_view_new (GList *param_list, Query *q)
|
||||
gnc_dialog_query_view_new (GtkWindow *parent, GList *param_list, Query *q)
|
||||
{
|
||||
GtkBuilder *builder;
|
||||
DialogQueryView *dqv;
|
||||
@ -191,6 +191,7 @@ gnc_dialog_query_view_new (GList *param_list, Query *q)
|
||||
/* Grab the dialog, save the dialog info */
|
||||
dqv->dialog = GTK_WIDGET(gtk_builder_get_object (builder, "query_view_dialog"));
|
||||
g_object_set_data (G_OBJECT (dqv->dialog), "dialog-info", dqv);
|
||||
gtk_window_set_transient_for(GTK_WINDOW(dqv->dialog), parent);
|
||||
|
||||
// Set the style context for this dialog so it can be easily manipulated with css
|
||||
gnc_widget_set_style_context (GTK_WIDGET(dqv->dialog), "GncQueryViewDialog");
|
||||
@ -313,7 +314,7 @@ void gnc_dialog_query_view_destroy (DialogQueryView *dqv)
|
||||
}
|
||||
|
||||
DialogQueryView *
|
||||
gnc_dialog_query_view_create (GList *param_list, Query *q,
|
||||
gnc_dialog_query_view_create (GtkWindow *parent, GList *param_list, Query *q,
|
||||
const char *title, const char *label,
|
||||
gboolean abs, gboolean inv_sort,
|
||||
gint sort_column, GtkSortType order,
|
||||
@ -324,7 +325,7 @@ gnc_dialog_query_view_create (GList *param_list, Query *q,
|
||||
if (!param_list || !q)
|
||||
return NULL;
|
||||
|
||||
dqv = gnc_dialog_query_view_new (param_list, q);
|
||||
dqv = gnc_dialog_query_view_new (parent, param_list, q);
|
||||
if (!dqv)
|
||||
return NULL;
|
||||
|
||||
|
@ -39,7 +39,7 @@ typedef struct
|
||||
} GNCDisplayViewButton;
|
||||
|
||||
DialogQueryView *
|
||||
gnc_dialog_query_view_new (GList *param_list, Query *q);
|
||||
gnc_dialog_query_view_new (GtkWindow *parent, GList *param_list, Query *q);
|
||||
|
||||
void gnc_dialog_query_view_set_title (DialogQueryView *dqv, const char *title);
|
||||
void gnc_dialog_query_view_set_label (DialogQueryView *dqv, const char *label);
|
||||
@ -53,7 +53,7 @@ void gnc_dialog_query_view_refresh (DialogQueryView *dqv);
|
||||
void gnc_dialog_query_view_destroy (DialogQueryView *dqv);
|
||||
|
||||
DialogQueryView *
|
||||
gnc_dialog_query_view_create (GList *param_list, Query *q,
|
||||
gnc_dialog_query_view_create (GtkWindow *parent, GList *param_list, Query *q,
|
||||
const char *title, const char *label,
|
||||
gboolean abs, gboolean inv_sort,
|
||||
gint sort_column, GtkSortType order,
|
||||
|
@ -210,7 +210,7 @@ struct _invoice_window
|
||||
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_bills_due (QofBook *book, double days_in_advance, GncWhichDueType duetype);
|
||||
DialogQueryView *gnc_invoice_show_docs_due (GtkWindow *parent, QofBook *book, double days_in_advance, GncWhichDueType duetype);
|
||||
|
||||
#define INV_WIDTH_PREFIX "invoice_reg"
|
||||
#define BILL_WIDTH_PREFIX "bill_reg"
|
||||
@ -3276,7 +3276,7 @@ gnc_invoice_search (GncInvoice *start, GncOwner *owner, QofBook *book)
|
||||
}
|
||||
|
||||
DialogQueryView *
|
||||
gnc_invoice_show_bills_due (QofBook *book, double days_in_advance, GncWhichDueType duetype)
|
||||
gnc_invoice_show_docs_due (GtkWindow *parent, QofBook *book, double days_in_advance, GncWhichDueType duetype)
|
||||
{
|
||||
QofIdType type = GNC_INVOICE_MODULE_NAME;
|
||||
Query *q;
|
||||
@ -3411,7 +3411,7 @@ gnc_invoice_show_bills_due (QofBook *book, double days_in_advance, GncWhichDueTy
|
||||
len);
|
||||
title = _("Due Invoices Reminder");
|
||||
}
|
||||
dialog = gnc_dialog_query_view_create(param_list, q,
|
||||
dialog = gnc_dialog_query_view_create(parent, param_list, q,
|
||||
title,
|
||||
message,
|
||||
TRUE, FALSE,
|
||||
@ -3426,7 +3426,7 @@ gnc_invoice_show_bills_due (QofBook *book, double days_in_advance, GncWhichDueTy
|
||||
}
|
||||
|
||||
void
|
||||
gnc_invoice_remind_bills_due (void)
|
||||
gnc_invoice_remind_bills_due (GtkWindow *parent)
|
||||
{
|
||||
QofBook *book;
|
||||
gint days;
|
||||
@ -3435,11 +3435,11 @@ gnc_invoice_remind_bills_due (void)
|
||||
book = qof_session_get_book(gnc_get_current_session());
|
||||
days = gnc_prefs_get_float(GNC_PREFS_GROUP_BILL, GNC_PREF_DAYS_IN_ADVANCE);
|
||||
|
||||
gnc_invoice_show_bills_due(book, days, DUE_FOR_VENDOR);
|
||||
gnc_invoice_show_docs_due (parent, book, days, DUE_FOR_VENDOR);
|
||||
}
|
||||
|
||||
void
|
||||
gnc_invoice_remind_invoices_due (void)
|
||||
gnc_invoice_remind_invoices_due (GtkWindow *parent)
|
||||
{
|
||||
QofBook *book;
|
||||
gint days;
|
||||
@ -3448,7 +3448,7 @@ gnc_invoice_remind_invoices_due (void)
|
||||
book = qof_session_get_book(gnc_get_current_session());
|
||||
days = gnc_prefs_get_float(GNC_PREFS_GROUP_INVOICE, GNC_PREF_DAYS_IN_ADVANCE);
|
||||
|
||||
gnc_invoice_show_bills_due(book, days, DUE_FOR_CUSTOMER);
|
||||
gnc_invoice_show_docs_due (parent, book, days, DUE_FOR_CUSTOMER);
|
||||
}
|
||||
|
||||
void
|
||||
@ -3457,7 +3457,7 @@ gnc_invoice_remind_bills_due_cb (void)
|
||||
if (!gnc_prefs_get_bool(GNC_PREFS_GROUP_BILL, GNC_PREF_NOTIFY_WHEN_DUE))
|
||||
return;
|
||||
|
||||
gnc_invoice_remind_bills_due();
|
||||
gnc_invoice_remind_bills_due (GTK_WINDOW(gnc_ui_get_main_window (NULL)));
|
||||
}
|
||||
|
||||
void
|
||||
@ -3466,5 +3466,5 @@ gnc_invoice_remind_invoices_due_cb (void)
|
||||
if (!gnc_prefs_get_bool(GNC_PREFS_GROUP_INVOICE, GNC_PREF_NOTIFY_WHEN_DUE))
|
||||
return;
|
||||
|
||||
gnc_invoice_remind_invoices_due();
|
||||
gnc_invoice_remind_invoices_due (GTK_WINDOW(gnc_ui_get_main_window (NULL)));
|
||||
}
|
||||
|
@ -800,7 +800,7 @@ gnc_plugin_business_cmd_bills_due_reminder (GtkAction *action,
|
||||
g_return_if_fail (mw != NULL);
|
||||
g_return_if_fail (GNC_IS_PLUGIN_BUSINESS (mw->data));
|
||||
|
||||
gnc_invoice_remind_bills_due();
|
||||
gnc_invoice_remind_bills_due (GTK_WINDOW (mw->window));
|
||||
}
|
||||
|
||||
|
||||
@ -811,7 +811,7 @@ gnc_plugin_business_cmd_invoices_due_reminder (GtkAction *action,
|
||||
g_return_if_fail (mw != NULL);
|
||||
g_return_if_fail (GNC_IS_PLUGIN_BUSINESS (mw->data));
|
||||
|
||||
gnc_invoice_remind_invoices_due();
|
||||
gnc_invoice_remind_invoices_due (GTK_WINDOW (mw->window));
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -60,8 +60,8 @@ GncPlugin *gnc_plugin_business_new (void);
|
||||
G_END_DECLS
|
||||
|
||||
GncMainWindow *gnc_plugin_business_get_window (void);
|
||||
void gnc_invoice_remind_bills_due (void);
|
||||
void gnc_invoice_remind_invoices_due (void);
|
||||
void gnc_invoice_remind_bills_due (GtkWindow *parent);
|
||||
void gnc_invoice_remind_invoices_due (GtkWindow *parent);
|
||||
void gnc_invoice_remind_bills_due_cb (void);
|
||||
void gnc_invoice_remind_invoices_due_cb (void);
|
||||
const char *gnc_plugin_business_get_invoice_printreport(void);
|
||||
|
Loading…
Reference in New Issue
Block a user