mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
Merge Bob Fewell's 'gtk3-update12' into unstable.
This commit is contained in:
commit
0c6e2ebf80
@ -1197,7 +1197,7 @@ gnc_prefs_connect_one (const gchar *name,
|
||||
* @return A pointer to the newly created dialog.
|
||||
*/
|
||||
static GtkWidget *
|
||||
gnc_preferences_dialog_create(void)
|
||||
gnc_preferences_dialog_create(GtkWindow *parent)
|
||||
{
|
||||
GtkBuilder *builder;
|
||||
GtkWidget *dialog, *notebook, *label, *image;
|
||||
@ -1236,6 +1236,9 @@ gnc_preferences_dialog_create(void)
|
||||
// Set the style context for this dialog so it can be easily manipulated with css
|
||||
gnc_widget_set_style_context (GTK_WIDGET(dialog), "GncPreferenceDialog");
|
||||
|
||||
/* parent */
|
||||
gtk_window_set_transient_for (GTK_WINDOW(dialog), GTK_WINDOW(parent));
|
||||
|
||||
#ifndef REGISTER2_ENABLED
|
||||
/* Hide preferences that are related to register2 */
|
||||
box = GTK_WIDGET (gtk_builder_get_object (builder, "label14"));
|
||||
@ -1273,8 +1276,8 @@ gnc_preferences_dialog_create(void)
|
||||
book = gnc_get_current_book();
|
||||
g_date_clear (&fy_end, 1);
|
||||
qof_instance_get (QOF_INSTANCE (book),
|
||||
"fy-end", &fy_end,
|
||||
NULL);
|
||||
"fy-end", &fy_end,
|
||||
NULL);
|
||||
box = GTK_WIDGET(gtk_builder_get_object (builder,
|
||||
"pref/" GNC_PREFS_GROUP_ACCT_SUMMARY "/" GNC_PREF_START_PERIOD));
|
||||
period = gnc_period_select_new(TRUE);
|
||||
@ -1425,7 +1428,7 @@ close_handler (gpointer user_data)
|
||||
* preferences dialog already exists it will be raised to the top of
|
||||
* the window stack instead of creating a new dialog. */
|
||||
void
|
||||
gnc_preferences_dialog (void)
|
||||
gnc_preferences_dialog (GtkWindow *parent)
|
||||
{
|
||||
GtkWidget *dialog;
|
||||
|
||||
@ -1437,7 +1440,7 @@ gnc_preferences_dialog (void)
|
||||
return;
|
||||
}
|
||||
|
||||
dialog = gnc_preferences_dialog_create();
|
||||
dialog = gnc_preferences_dialog_create(parent);
|
||||
|
||||
gnc_restore_window_size(GNC_PREFS_GROUP, GTK_WINDOW(dialog));
|
||||
gtk_widget_show(dialog);
|
||||
|
@ -60,6 +60,8 @@
|
||||
#ifndef GNC_DIALOG_PREFERENCES_H
|
||||
#define GNC_DIALOG_PREFERENCES_H
|
||||
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
/** This function adds a full page of preferences to the preferences
|
||||
* dialog. When the dialog is created, the specified widget will be
|
||||
* pulled from the specified glade file and added to the preferences
|
||||
@ -100,7 +102,7 @@ void gnc_preferences_add_to_page (const gchar *filename,
|
||||
* the user. The preferences dialog is a singleton, so if a
|
||||
* preferences dialog already exists it will be raised to the top of
|
||||
* the window stack instead of creating a new dialog. */
|
||||
void gnc_preferences_dialog (void);
|
||||
void gnc_preferences_dialog (GtkWindow *parent);
|
||||
|
||||
#endif
|
||||
/** @} */
|
||||
|
@ -49,7 +49,7 @@ G_BEGIN_DECLS
|
||||
#define GNC_ICON_PDF_EXPORT "gnc-gnome-pdf"
|
||||
|
||||
//FIXME: use own budget icons?
|
||||
#define GNC_ICON_BUDGET "gnc-budget"
|
||||
#define GNC_ICON_BUDGET "gnc-account"
|
||||
#define GNC_ICON_NEW_BUDGET "gnc-account"
|
||||
#define GNC_ICON_OPEN_BUDGET "gnc-account-open"
|
||||
//#define GNC_ICON_CLOSE_BUDGET "gnc-close-account"
|
||||
|
@ -4199,7 +4199,7 @@ gnc_main_window_cmd_edit_paste (GtkAction *action, GncMainWindow *window)
|
||||
static void
|
||||
gnc_main_window_cmd_edit_preferences (GtkAction *action, GncMainWindow *window)
|
||||
{
|
||||
gnc_preferences_dialog ();
|
||||
gnc_preferences_dialog (GTK_WINDOW(window));
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -2837,6 +2837,7 @@ many months before the current month:</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="tooltip_text" translatable="yes">On high resolution screens reports tend to be hard to read. This option allows you to scale reports up by the set factor. For example setting this to 2.0 will display reports at twice their typical size.</property>
|
||||
<property name="halign">start</property>
|
||||
<property name="margin_left">12</property>
|
||||
<property name="adjustment">default_zoom_adj</property>
|
||||
</object>
|
||||
<packing>
|
||||
|
@ -549,7 +549,7 @@ fincalc_init_commodity_gae (GNCAmountEdit *edit)
|
||||
}
|
||||
|
||||
void
|
||||
gnc_ui_fincalc_dialog_create(void)
|
||||
gnc_ui_fincalc_dialog_create(GtkWindow *parent)
|
||||
{
|
||||
FinCalcDialog *fcd;
|
||||
GtkWidget *button;
|
||||
@ -575,6 +575,10 @@ gnc_ui_fincalc_dialog_create(void)
|
||||
// Set the style context for this dialog so it can be easily manipulated with css
|
||||
gnc_widget_set_style_context (GTK_WIDGET(fcd->dialog), "GncFinCalcDialog");
|
||||
|
||||
/* parent */
|
||||
if (parent != NULL)
|
||||
gtk_window_set_transient_for (GTK_WINDOW(fcd->dialog), GTK_WINDOW(parent));
|
||||
|
||||
gnc_register_gui_component (DIALOG_FINCALC_CM_CLASS,
|
||||
NULL, close_handler, fcd);
|
||||
|
||||
|
@ -25,7 +25,7 @@
|
||||
|
||||
typedef struct _FinCalcDialog FinCalcDialog;
|
||||
|
||||
void gnc_ui_fincalc_dialog_create(void);
|
||||
void gnc_ui_fincalc_dialog_create(GtkWindow *parent);
|
||||
void gnc_ui_fincalc_dialog_destroy(FinCalcDialog *fcd);
|
||||
|
||||
#endif
|
||||
|
@ -1114,8 +1114,8 @@ sxed_delete_event( GtkWidget *widget, GdkEvent *event, gpointer ud )
|
||||
* Create the Schedule Editor Dialog *
|
||||
************************************/
|
||||
GncSxEditorDialog *
|
||||
gnc_ui_scheduled_xaction_editor_dialog_create (SchedXaction *sx,
|
||||
gboolean newSX)
|
||||
gnc_ui_scheduled_xaction_editor_dialog_create (GtkWindow *parent,
|
||||
SchedXaction *sx, gboolean newSX)
|
||||
{
|
||||
GncSxEditorDialog *sxed;
|
||||
GtkBuilder *builder;
|
||||
@ -1192,12 +1192,13 @@ gnc_ui_scheduled_xaction_editor_dialog_create (SchedXaction *sx,
|
||||
|
||||
// Set the style context for this dialog so it can be easily manipulated with css
|
||||
gnc_widget_set_style_context (GTK_WIDGET(sxed->dialog), "GncSxEditorDialog");
|
||||
|
||||
gtk_window_set_transient_for (GTK_WINDOW (sxed->dialog), parent);
|
||||
|
||||
/* Setup the end-date GNC widget */
|
||||
{
|
||||
GtkWidget *endDateBox = GTK_WIDGET(gtk_builder_get_object (builder, "editor_end_date_box"));
|
||||
sxed->endDateEntry = GNC_DATE_EDIT(gnc_date_edit_new (gnc_time (NULL),
|
||||
FALSE, FALSE));
|
||||
sxed->endDateEntry = GNC_DATE_EDIT(gnc_date_edit_new (gnc_time (NULL), FALSE, FALSE));
|
||||
gtk_widget_show(GTK_WIDGET(sxed->endDateEntry));
|
||||
g_signal_connect( sxed->endDateEntry, "date-changed",
|
||||
G_CALLBACK( sxed_excal_update_adapt_cb ), sxed );
|
||||
@ -1714,6 +1715,7 @@ typedef struct _acct_deletion_handler_data
|
||||
{
|
||||
GList *affected_sxes;
|
||||
GtkWidget *dialog;
|
||||
GtkWindow *parent;
|
||||
} acct_deletion_handler_data;
|
||||
|
||||
|
||||
@ -1726,8 +1728,8 @@ _open_editors(GtkDialog *dialog, gint response_code, gpointer data)
|
||||
GList *sx_iter;
|
||||
for (sx_iter = adhd->affected_sxes; sx_iter; sx_iter = sx_iter->next)
|
||||
{
|
||||
gnc_ui_scheduled_xaction_editor_dialog_create((SchedXaction*)sx_iter->data,
|
||||
FALSE);
|
||||
gnc_ui_scheduled_xaction_editor_dialog_create(GTK_WINDOW(adhd->parent),
|
||||
(SchedXaction*)sx_iter->data, FALSE);
|
||||
}
|
||||
}
|
||||
g_list_free(adhd->affected_sxes);
|
||||
@ -1759,6 +1761,7 @@ _sx_engine_event_handler(QofInstance *ent, QofEventId event_type, gpointer user_
|
||||
acct_deletion_handler_data *data;
|
||||
GtkBuilder *builder;
|
||||
GtkWidget *dialog;
|
||||
GtkWindow *parent;
|
||||
GtkListStore *name_list;
|
||||
GtkTreeView *list;
|
||||
GtkTreeViewColumn *name_column;
|
||||
@ -1768,6 +1771,9 @@ _sx_engine_event_handler(QofInstance *ent, QofEventId event_type, gpointer user_
|
||||
gnc_builder_add_from_file (builder, "dialog-sx.glade", "account_deletion_dialog");
|
||||
|
||||
dialog = GTK_WIDGET(gtk_builder_get_object (builder, "account_deletion_dialog"));
|
||||
parent = gnc_ui_get_main_window (NULL);
|
||||
|
||||
gtk_window_set_transient_for (GTK_WINDOW (dialog), parent);
|
||||
|
||||
list = GTK_TREE_VIEW(gtk_builder_get_object (builder, "sx_list"));
|
||||
|
||||
@ -1776,6 +1782,7 @@ _sx_engine_event_handler(QofInstance *ent, QofEventId event_type, gpointer user_
|
||||
|
||||
data = (acct_deletion_handler_data*)g_new0(acct_deletion_handler_data, 1);
|
||||
data->dialog = dialog;
|
||||
data->parent = parent;
|
||||
data->affected_sxes = affected_sxes;
|
||||
name_list = gtk_list_store_new(1, G_TYPE_STRING);
|
||||
for (sx_iter = affected_sxes; sx_iter != NULL; sx_iter = sx_iter->next)
|
||||
|
@ -24,6 +24,7 @@
|
||||
#define DIALOG_SX_EDITOR_H
|
||||
|
||||
#include "SchedXaction.h"
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
#define DIALOG_SCHEDXACTION_CM_CLASS "dialog-scheduledtransactions"
|
||||
#define DIALOG_SCHEDXACTION_EDITOR_CM_CLASS "dialog-scheduledtransaction-editor"
|
||||
@ -36,8 +37,8 @@
|
||||
|
||||
typedef struct _GncSxEditorDialog GncSxEditorDialog;
|
||||
|
||||
GncSxEditorDialog* gnc_ui_scheduled_xaction_editor_dialog_create(SchedXaction *sx,
|
||||
gboolean newSX);
|
||||
GncSxEditorDialog* gnc_ui_scheduled_xaction_editor_dialog_create(GtkWindow *parent,
|
||||
SchedXaction *sx, gboolean newSX);
|
||||
|
||||
void gnc_ui_scheduled_xaction_editor_dialog_destroy(GncSxEditorDialog *sxd);
|
||||
|
||||
|
@ -1087,8 +1087,8 @@ sxed_delete_event (GtkWidget *widget, GdkEvent *event, gpointer ud)
|
||||
* Create the Schedule Editor Dialog *
|
||||
************************************/
|
||||
GncSxEditorDialog2 *
|
||||
gnc_ui_scheduled_xaction_editor_dialog_create2 (SchedXaction *sx,
|
||||
gboolean newSX)
|
||||
gnc_ui_scheduled_xaction_editor_dialog_create2 (GtkWindow *parent,
|
||||
SchedXaction *sx, gboolean newSX)
|
||||
{
|
||||
GncSxEditorDialog2 *sxed;
|
||||
GtkBuilder *builder;
|
||||
@ -1166,11 +1166,12 @@ gnc_ui_scheduled_xaction_editor_dialog_create2 (SchedXaction *sx,
|
||||
// Set the style context for this dialog so it can be easily manipulated with css
|
||||
gnc_widget_set_style_context (GTK_WIDGET(sxed->dialog), "GncSxEditorDialog");
|
||||
|
||||
gtk_window_set_transient_for (GTK_WINDOW (sxed->dialog), parent);
|
||||
|
||||
/* Setup the end-date GNC widget */
|
||||
{
|
||||
GtkWidget *endDateBox = GTK_WIDGET(gtk_builder_get_object (builder, "editor_end_date_box"));
|
||||
sxed->endDateEntry = GNC_DATE_EDIT (gnc_date_edit_new (gnc_time (NULL),
|
||||
FALSE, FALSE));
|
||||
sxed->endDateEntry = GNC_DATE_EDIT (gnc_date_edit_new (gnc_time (NULL), FALSE, FALSE));
|
||||
gtk_widget_show (GTK_WIDGET (sxed->endDateEntry));
|
||||
g_signal_connect (sxed->endDateEntry, "date-changed",
|
||||
G_CALLBACK (sxed_excal_update_adapt_cb), sxed);
|
||||
@ -1665,6 +1666,7 @@ typedef struct _acct_deletion_handler_data
|
||||
{
|
||||
GList *affected_sxes;
|
||||
GtkWidget *dialog;
|
||||
GtkWindow *parent;
|
||||
} acct_deletion_handler_data;
|
||||
|
||||
|
||||
@ -1677,8 +1679,8 @@ _open_editors (GtkDialog *dialog, gint response_code, gpointer data)
|
||||
GList *sx_iter;
|
||||
for (sx_iter = adhd->affected_sxes; sx_iter; sx_iter = sx_iter->next)
|
||||
{
|
||||
gnc_ui_scheduled_xaction_editor_dialog_create2 ((SchedXaction*)sx_iter->data,
|
||||
FALSE);
|
||||
gnc_ui_scheduled_xaction_editor_dialog_create2 (GTK_WINDOW(adhd->parent),
|
||||
(SchedXaction*)sx_iter->data, FALSE);
|
||||
}
|
||||
}
|
||||
g_list_free (adhd->affected_sxes);
|
||||
@ -1710,6 +1712,7 @@ _sx_engine_event_handler (QofInstance *ent, QofEventId event_type, gpointer user
|
||||
acct_deletion_handler_data *data;
|
||||
GtkBuilder *builder;
|
||||
GtkWidget *dialog;
|
||||
GtkWindow *parent;
|
||||
GtkListStore *name_list;
|
||||
GtkTreeView *list;
|
||||
GtkTreeViewColumn *name_column;
|
||||
@ -1719,6 +1722,9 @@ _sx_engine_event_handler (QofInstance *ent, QofEventId event_type, gpointer user
|
||||
gnc_builder_add_from_file (builder, "dialog-sx.glade", "account_deletion_dialog");
|
||||
|
||||
dialog = GTK_WIDGET (gtk_builder_get_object (builder, "account_deletion_dialog"));
|
||||
parent = gnc_ui_get_main_window (NULL);
|
||||
|
||||
gtk_window_set_transient_for (GTK_WINDOW (dialog), parent);
|
||||
|
||||
list = GTK_TREE_VIEW (gtk_builder_get_object (builder, "sx_list"));
|
||||
|
||||
@ -1727,6 +1733,7 @@ _sx_engine_event_handler (QofInstance *ent, QofEventId event_type, gpointer user
|
||||
|
||||
data = (acct_deletion_handler_data*)g_new0 (acct_deletion_handler_data, 1);
|
||||
data->dialog = dialog;
|
||||
data->parent = parent;
|
||||
data->affected_sxes = affected_sxes;
|
||||
name_list = gtk_list_store_new (1, G_TYPE_STRING);
|
||||
for (sx_iter = affected_sxes; sx_iter != NULL; sx_iter = sx_iter->next)
|
||||
|
@ -36,8 +36,8 @@
|
||||
|
||||
typedef struct _GncSxEditorDialog2 GncSxEditorDialog2;
|
||||
|
||||
GncSxEditorDialog2* gnc_ui_scheduled_xaction_editor_dialog_create2 (SchedXaction *sx,
|
||||
gboolean newSX);
|
||||
GncSxEditorDialog2* gnc_ui_scheduled_xaction_editor_dialog_create2 (GtkWindow *parent,
|
||||
SchedXaction *sx, gboolean newSX);
|
||||
|
||||
void gnc_ui_scheduled_xaction_editor_dialog_destroy2 (GncSxEditorDialog2 *sxd);
|
||||
|
||||
|
@ -612,7 +612,8 @@ sxftd_advanced_clicked(SXFromTransInfo *sxfti)
|
||||
context = g_main_context_default();
|
||||
while (g_main_context_iteration(context, FALSE));
|
||||
|
||||
gnc_ui_scheduled_xaction_editor_dialog_create(sxfti->sx, TRUE /* newSX */);
|
||||
gnc_ui_scheduled_xaction_editor_dialog_create(gnc_ui_get_main_window (sxfti->dialog),
|
||||
sxfti->sx, TRUE /* newSX */);
|
||||
/* close ourself, since advanced editing entails us, and there are sync
|
||||
* issues otherwise. */
|
||||
sxftd_close(sxfti, FALSE);
|
||||
@ -752,7 +753,7 @@ sxftd_update_excal_adapt( GObject *o, gpointer ud )
|
||||
* Create the dialog *
|
||||
********************/
|
||||
void
|
||||
gnc_sx_create_from_trans( Transaction *trans )
|
||||
gnc_sx_create_from_trans( GtkWindow *parent, Transaction *trans )
|
||||
{
|
||||
#ifndef __MINGW32__
|
||||
int errno;
|
||||
@ -771,6 +772,8 @@ gnc_sx_create_from_trans( Transaction *trans )
|
||||
// Set the style context for this dialog so it can be easily manipulated with css
|
||||
gnc_widget_set_style_context (GTK_WIDGET(dialog), "GncSxFromTransDialog");
|
||||
|
||||
gtk_window_set_transient_for (GTK_WINDOW (dialog), parent);
|
||||
|
||||
sxfti->builder = builder;
|
||||
sxfti->dialog = dialog;
|
||||
sxfti->trans = trans;
|
||||
|
@ -27,6 +27,6 @@
|
||||
|
||||
#include "Transaction.h"
|
||||
|
||||
void gnc_sx_create_from_trans(Transaction *trans);
|
||||
void gnc_sx_create_from_trans(GtkWindow *parent, Transaction *trans);
|
||||
|
||||
#endif
|
||||
|
@ -375,7 +375,7 @@ get_trans_info (AssocDialog *assoc_dialog)
|
||||
}
|
||||
|
||||
static void
|
||||
gnc_assoc_dialog_create (AssocDialog *assoc_dialog)
|
||||
gnc_assoc_dialog_create (GtkWindow *parent, AssocDialog *assoc_dialog)
|
||||
{
|
||||
GtkWidget *dialog;
|
||||
GtkBuilder *builder;
|
||||
@ -396,6 +396,10 @@ gnc_assoc_dialog_create (AssocDialog *assoc_dialog)
|
||||
// Set the style context for this dialog so it can be easily manipulated with css
|
||||
gnc_widget_set_style_context (GTK_WIDGET(dialog), "GncTransAssocDialog");
|
||||
|
||||
/* parent */
|
||||
if (parent != NULL)
|
||||
gtk_window_set_transient_for (GTK_WINDOW(dialog), GTK_WINDOW(parent));
|
||||
|
||||
assoc_dialog->view = GTK_WIDGET(gtk_builder_get_object (builder, "treeview"));
|
||||
path_head = GTK_WIDGET(gtk_builder_get_object (builder, "path-head"));
|
||||
|
||||
@ -500,7 +504,7 @@ show_handler (const char *klass, gint component_id,
|
||||
* Return: nothing *
|
||||
\********************************************************************/
|
||||
void
|
||||
gnc_trans_assoc_dialog ()
|
||||
gnc_trans_assoc_dialog (GtkWindow *parent)
|
||||
{
|
||||
AssocDialog *assoc_dialog;
|
||||
|
||||
@ -512,7 +516,7 @@ gnc_trans_assoc_dialog ()
|
||||
}
|
||||
assoc_dialog = g_new0 (AssocDialog, 1);
|
||||
|
||||
gnc_assoc_dialog_create (assoc_dialog);
|
||||
gnc_assoc_dialog_create (parent, assoc_dialog);
|
||||
|
||||
gnc_register_gui_component (DIALOG_ASSOC_CM_CLASS,
|
||||
refresh_handler, close_handler,
|
||||
|
@ -23,6 +23,6 @@
|
||||
#ifndef DIALOG_TRANS_ASSOC_H
|
||||
#define DIALOG_TRANS_ASSOC_H
|
||||
|
||||
void gnc_trans_assoc_dialog (void);
|
||||
void gnc_trans_assoc_dialog (GtkWindow *parent);
|
||||
|
||||
#endif
|
||||
|
@ -616,7 +616,7 @@ static void
|
||||
gnc_main_window_cmd_tools_imap_editor (GtkAction *action, GncMainWindowActionData *data)
|
||||
{
|
||||
gnc_set_busy_cursor(NULL, TRUE);
|
||||
gnc_imap_dialog (NULL);
|
||||
gnc_imap_dialog (GTK_WIDGET (data->window));
|
||||
gnc_unset_busy_cursor(NULL);
|
||||
}
|
||||
|
||||
@ -624,7 +624,7 @@ static void
|
||||
gnc_main_window_cmd_tools_trans_assoc (GtkAction *action, GncMainWindowActionData *data)
|
||||
{
|
||||
gnc_set_busy_cursor (NULL, TRUE);
|
||||
gnc_trans_assoc_dialog ();
|
||||
gnc_trans_assoc_dialog (GTK_WINDOW (data->window));
|
||||
gnc_unset_busy_cursor (NULL);
|
||||
}
|
||||
|
||||
@ -632,7 +632,7 @@ static void
|
||||
gnc_main_window_cmd_tools_price_editor (GtkAction *action, GncMainWindowActionData *data)
|
||||
{
|
||||
gnc_set_busy_cursor(NULL, TRUE);
|
||||
gnc_prices_dialog (NULL);
|
||||
gnc_prices_dialog (GTK_WIDGET (data->window));
|
||||
gnc_unset_busy_cursor(NULL);
|
||||
}
|
||||
|
||||
@ -640,14 +640,14 @@ static void
|
||||
gnc_main_window_cmd_tools_commodity_editor (GtkAction *action, GncMainWindowActionData *data)
|
||||
{
|
||||
gnc_set_busy_cursor(NULL, TRUE);
|
||||
gnc_commodities_dialog (NULL);
|
||||
gnc_commodities_dialog (GTK_WIDGET (data->window));
|
||||
gnc_unset_busy_cursor(NULL);
|
||||
}
|
||||
|
||||
static void
|
||||
gnc_main_window_cmd_tools_financial_calculator (GtkAction *action, GncMainWindowActionData *data)
|
||||
{
|
||||
gnc_ui_fincalc_dialog_create();
|
||||
gnc_ui_fincalc_dialog_create(GTK_WINDOW (data->window));
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -242,7 +242,7 @@ gnc_plugin_budget_cmd_open_budget (GtkAction *action,
|
||||
}
|
||||
else
|
||||
{
|
||||
bgt = gnc_budget_gui_select_budget(book);
|
||||
bgt = gnc_budget_gui_select_budget(GTK_WINDOW(data->window), book);
|
||||
}
|
||||
|
||||
if (bgt) gnc_main_window_open_page(
|
||||
@ -276,7 +276,7 @@ gnc_plugin_budget_cmd_copy_budget (GtkAction *action,
|
||||
}
|
||||
else
|
||||
{
|
||||
bgt = gnc_budget_gui_select_budget(book);
|
||||
bgt = gnc_budget_gui_select_budget(GTK_WINDOW(data->window), book);
|
||||
}
|
||||
|
||||
if (bgt)
|
||||
@ -311,7 +311,7 @@ row_activated_cb(GtkTreeView *tv, GtkTreePath *path, GtkTreeViewColumn *column,
|
||||
}
|
||||
|
||||
GncBudget *
|
||||
gnc_budget_gui_select_budget(QofBook *book)
|
||||
gnc_budget_gui_select_budget(GtkWindow *parent, QofBook *book)
|
||||
{
|
||||
GncBudget *bgt;
|
||||
GtkDialog *dlg;
|
||||
@ -323,7 +323,7 @@ gnc_budget_gui_select_budget(QofBook *book)
|
||||
gboolean ok;
|
||||
|
||||
dlg = GTK_DIALOG(gtk_dialog_new_with_buttons(
|
||||
_("Select a Budget"), NULL, GTK_DIALOG_MODAL,
|
||||
_("Select a Budget"), parent, GTK_DIALOG_MODAL,
|
||||
_("_OK"), GTK_RESPONSE_OK,
|
||||
_("_Cancel"), GTK_RESPONSE_CANCEL, NULL));
|
||||
|
||||
|
@ -59,7 +59,7 @@ GType gnc_plugin_budget_get_type(void);
|
||||
GncPlugin *gnc_plugin_budget_new(void);
|
||||
|
||||
/* Launch the budget list dialog.*/
|
||||
GncBudget * gnc_budget_gui_select_budget(QofBook *book);
|
||||
GncBudget * gnc_budget_gui_select_budget(GtkWindow *parent, QofBook *book);
|
||||
|
||||
|
||||
G_END_DECLS
|
||||
|
@ -910,6 +910,10 @@ gnc_plugin_business_update_menus (GncPluginPage *plugin_page)
|
||||
if (!plugin_page || !GNC_IS_PLUGIN_PAGE(plugin_page))
|
||||
return;
|
||||
|
||||
// Check that this is a main window and not embedded sx
|
||||
if (!GNC_IS_MAIN_WINDOW(plugin_page->window))
|
||||
return;
|
||||
|
||||
is_txn_register = GNC_IS_PLUGIN_PAGE_REGISTER(plugin_page);
|
||||
window = GNC_MAIN_WINDOW(plugin_page->window);
|
||||
g_return_if_fail(GNC_IS_MAIN_WINDOW(window));
|
||||
@ -1055,6 +1059,10 @@ static void update_inactive_actions(GncPluginPage *plugin_page)
|
||||
if (!plugin_page || !GNC_IS_PLUGIN_PAGE(plugin_page))
|
||||
return;
|
||||
|
||||
// Check that this is a main window and not embedded sx
|
||||
if (!GNC_IS_MAIN_WINDOW(plugin_page->window))
|
||||
return;
|
||||
|
||||
window = GNC_MAIN_WINDOW(plugin_page->window);
|
||||
g_return_if_fail(GNC_IS_MAIN_WINDOW(window));
|
||||
action_group = gnc_main_window_get_action_group(window, PLUGIN_ACTIONS_NAME);
|
||||
|
@ -163,7 +163,7 @@ static GtkActionEntry gnc_plugin_page_budget_actions [] =
|
||||
static guint gnc_plugin_page_budget_n_actions =
|
||||
G_N_ELEMENTS (gnc_plugin_page_budget_actions);
|
||||
|
||||
#if 0
|
||||
#if 0
|
||||
static const gchar *actions_requiring_account[] =
|
||||
{
|
||||
"OpenAccountAction",
|
||||
@ -785,8 +785,7 @@ gnc_plugin_page_budget_cmd_view_options (GtkAction *action,
|
||||
|
||||
priv->dialog = GTK_WIDGET(gtk_builder_get_object (builder, "budget_options_container_dialog"));
|
||||
|
||||
gtk_window_set_transient_for(
|
||||
GTK_WINDOW(priv->dialog),
|
||||
gtk_window_set_transient_for(GTK_WINDOW(priv->dialog),
|
||||
GTK_WINDOW(gnc_plugin_page_get_window(GNC_PLUGIN_PAGE(page))));
|
||||
|
||||
gbname = GTK_WIDGET(gtk_builder_get_object (builder, "BudgetName"));
|
||||
@ -939,8 +938,7 @@ gnc_plugin_page_budget_cmd_estimate_budget(GtkAction *action,
|
||||
|
||||
dialog = GTK_WIDGET(gtk_builder_get_object (builder, "budget_estimate_dialog"));
|
||||
|
||||
gtk_window_set_transient_for(
|
||||
GTK_WINDOW(dialog),
|
||||
gtk_window_set_transient_for(GTK_WINDOW(dialog),
|
||||
GTK_WINDOW(gnc_plugin_page_get_window(GNC_PLUGIN_PAGE(page))));
|
||||
|
||||
hb = GTK_WIDGET(gtk_builder_get_object (builder, "StartDate_hbox"));
|
||||
|
@ -3799,13 +3799,15 @@ gnc_plugin_page_register_cmd_schedule (GtkAction *action,
|
||||
GncPluginPageRegister *plugin_page)
|
||||
{
|
||||
GncPluginPageRegisterPrivate *priv;
|
||||
GtkWindow *window;
|
||||
|
||||
ENTER("(action %p, plugin_page %p)", action, plugin_page);
|
||||
|
||||
g_return_if_fail(GNC_IS_PLUGIN_PAGE_REGISTER(plugin_page));
|
||||
|
||||
window = GTK_WINDOW (gnc_plugin_page_get_window (GNC_PLUGIN_PAGE (plugin_page)));
|
||||
priv = GNC_PLUGIN_PAGE_REGISTER_GET_PRIVATE(plugin_page);
|
||||
gsr_default_schedule_handler(priv->gsr, NULL);
|
||||
gsr_default_schedule_handler(priv->gsr, window);
|
||||
LEAVE(" ");
|
||||
}
|
||||
|
||||
|
@ -3622,6 +3622,7 @@ gnc_plugin_page_register2_cmd_schedule (GtkAction *action,
|
||||
GncPluginPageRegister2Private *priv;
|
||||
GncTreeViewSplitReg *view;
|
||||
Transaction *trans;
|
||||
GtkWindow *window;
|
||||
|
||||
ENTER("(action %p, plugin_page %p)", action, plugin_page);
|
||||
|
||||
@ -3629,6 +3630,7 @@ gnc_plugin_page_register2_cmd_schedule (GtkAction *action,
|
||||
|
||||
priv = GNC_PLUGIN_PAGE_REGISTER2_GET_PRIVATE(plugin_page);
|
||||
view = gnc_ledger_display2_get_split_view_register (priv->ledger);
|
||||
window = GTK_WINDOW (gnc_plugin_page_get_window (GNC_PLUGIN_PAGE (plugin_page)));
|
||||
|
||||
trans = gnc_tree_view_split_reg_get_current_trans (view);
|
||||
|
||||
@ -3682,12 +3684,12 @@ gnc_plugin_page_register2_cmd_schedule (GtkAction *action,
|
||||
|
||||
if (theSX)
|
||||
{
|
||||
gnc_ui_scheduled_xaction_editor_dialog_create2 (theSX, FALSE);
|
||||
gnc_ui_scheduled_xaction_editor_dialog_create2 (window, theSX, FALSE);
|
||||
LEAVE(" ");
|
||||
return;
|
||||
}
|
||||
}
|
||||
gnc_sx_create_from_trans (trans);
|
||||
gnc_sx_create_from_trans (window, trans);
|
||||
LEAVE(" ");
|
||||
}
|
||||
|
||||
|
@ -639,6 +639,7 @@ gnc_plugin_page_sx_list_recreate_page (GtkWidget *window,
|
||||
static void
|
||||
gnc_plugin_page_sx_list_cmd_new(GtkAction *action, GncPluginPageSxList *page)
|
||||
{
|
||||
GtkWindow *window = GTK_WINDOW (gnc_plugin_page_get_window (GNC_PLUGIN_PAGE (page)));
|
||||
SchedXaction *new_sx;
|
||||
gboolean new_sx_flag = TRUE;
|
||||
|
||||
@ -655,7 +656,7 @@ gnc_plugin_page_sx_list_cmd_new(GtkAction *action, GncPluginPageSxList *page)
|
||||
schedule = g_list_append(schedule, r);
|
||||
gnc_sx_set_schedule(new_sx, schedule);
|
||||
}
|
||||
gnc_ui_scheduled_xaction_editor_dialog_create(new_sx, new_sx_flag);
|
||||
gnc_ui_scheduled_xaction_editor_dialog_create(window, new_sx, new_sx_flag);
|
||||
}
|
||||
|
||||
#ifdef REGISTER2_ENABLED
|
||||
@ -663,6 +664,7 @@ gnc_plugin_page_sx_list_cmd_new(GtkAction *action, GncPluginPageSxList *page)
|
||||
static void
|
||||
gnc_plugin_page_sx_list_cmd_new2 (GtkAction *action, GncPluginPageSxList *page)
|
||||
{
|
||||
GtkWindow *window = GTK_WINDOW (gnc_plugin_page_get_window (GNC_PLUGIN_PAGE (page)));
|
||||
SchedXaction *new_sx;
|
||||
gboolean new_sx_flag = TRUE;
|
||||
|
||||
@ -679,7 +681,7 @@ gnc_plugin_page_sx_list_cmd_new2 (GtkAction *action, GncPluginPageSxList *page)
|
||||
schedule = g_list_append (schedule, r);
|
||||
gnc_sx_set_schedule (new_sx, schedule);
|
||||
}
|
||||
gnc_ui_scheduled_xaction_editor_dialog_create2 (new_sx, new_sx_flag);
|
||||
gnc_ui_scheduled_xaction_editor_dialog_create2 (window, new_sx, new_sx_flag);
|
||||
}
|
||||
/*################## Added for Reg2 #################*/
|
||||
#endif
|
||||
@ -687,7 +689,8 @@ gnc_plugin_page_sx_list_cmd_new2 (GtkAction *action, GncPluginPageSxList *page)
|
||||
static void
|
||||
_edit_sx(gpointer data, gpointer user_data)
|
||||
{
|
||||
gnc_ui_scheduled_xaction_editor_dialog_create((SchedXaction*)data, FALSE);
|
||||
gnc_ui_scheduled_xaction_editor_dialog_create(GTK_WINDOW(user_data),
|
||||
(SchedXaction*)data, FALSE);
|
||||
}
|
||||
|
||||
#ifdef REGISTER2_ENABLED
|
||||
@ -695,7 +698,8 @@ _edit_sx(gpointer data, gpointer user_data)
|
||||
static void
|
||||
_edit_sx2 (gpointer data, gpointer user_data)
|
||||
{
|
||||
gnc_ui_scheduled_xaction_editor_dialog_create2 ((SchedXaction*)data, FALSE);
|
||||
gnc_ui_scheduled_xaction_editor_dialog_create2 (GTK_WINDOW(user_data),
|
||||
(SchedXaction*)data, FALSE);
|
||||
}
|
||||
/*################## Added for Reg2 #################*/
|
||||
#endif
|
||||
@ -711,6 +715,7 @@ static void
|
||||
gnc_plugin_page_sx_list_cmd_edit(GtkAction *action, GncPluginPageSxList *page)
|
||||
{
|
||||
GncPluginPageSxListPrivate *priv = GNC_PLUGIN_PAGE_SX_LIST_GET_PRIVATE(page);
|
||||
GtkWindow *window = GTK_WINDOW (gnc_plugin_page_get_window (GNC_PLUGIN_PAGE (page)));
|
||||
GtkTreeSelection *selection;
|
||||
GList *selected_paths, *to_edit;
|
||||
GtkTreeModel *model;
|
||||
@ -726,7 +731,7 @@ gnc_plugin_page_sx_list_cmd_edit(GtkAction *action, GncPluginPageSxList *page)
|
||||
to_edit = gnc_g_list_map(selected_paths,
|
||||
(GncGMapFunc)_argument_reorder_fn,
|
||||
priv->tree_view);
|
||||
g_list_foreach(to_edit, (GFunc)_edit_sx, NULL);
|
||||
g_list_foreach(to_edit, (GFunc)_edit_sx, window);
|
||||
g_list_free(to_edit);
|
||||
g_list_foreach(selected_paths, (GFunc)gtk_tree_path_free, NULL);
|
||||
g_list_free(selected_paths);
|
||||
@ -738,6 +743,7 @@ static void
|
||||
gnc_plugin_page_sx_list_cmd_edit2 (GtkAction *action, GncPluginPageSxList *page)
|
||||
{
|
||||
GncPluginPageSxListPrivate *priv = GNC_PLUGIN_PAGE_SX_LIST_GET_PRIVATE (page);
|
||||
GtkWindow *window = GTK_WINDOW (gnc_plugin_page_get_window (GNC_PLUGIN_PAGE (page)));
|
||||
GtkTreeSelection *selection;
|
||||
GList *selected_paths, *to_edit;
|
||||
GtkTreeModel *model;
|
||||
@ -753,7 +759,7 @@ gnc_plugin_page_sx_list_cmd_edit2 (GtkAction *action, GncPluginPageSxList *page)
|
||||
to_edit = gnc_g_list_map (selected_paths,
|
||||
(GncGMapFunc)_argument_reorder_fn,
|
||||
priv->tree_view);
|
||||
g_list_foreach(to_edit, (GFunc)_edit_sx2, NULL);
|
||||
g_list_foreach(to_edit, (GFunc)_edit_sx2, window);
|
||||
g_list_free (to_edit);
|
||||
g_list_foreach (selected_paths, (GFunc)gtk_tree_path_free, NULL);
|
||||
g_list_free (selected_paths);
|
||||
@ -769,9 +775,10 @@ gppsl_row_activated_cb(GtkTreeView *tree_view,
|
||||
{
|
||||
GncPluginPageSxList *page = GNC_PLUGIN_PAGE_SX_LIST(user_data);
|
||||
GncPluginPageSxListPrivate *priv = GNC_PLUGIN_PAGE_SX_LIST_GET_PRIVATE(page);
|
||||
GtkWindow *window = GTK_WINDOW (gnc_plugin_page_get_window (GNC_PLUGIN_PAGE (page)));
|
||||
|
||||
SchedXaction *sx = gnc_tree_view_sx_list_get_sx_from_path(GNC_TREE_VIEW_SX_LIST(priv->tree_view), path);
|
||||
gnc_ui_scheduled_xaction_editor_dialog_create(sx, FALSE);
|
||||
gnc_ui_scheduled_xaction_editor_dialog_create(window, sx, FALSE);
|
||||
}
|
||||
|
||||
|
||||
|
@ -1363,10 +1363,10 @@ gsr_default_schedule_handler( GNCSplitReg *gsr, gpointer data )
|
||||
|
||||
if ( theSX )
|
||||
{
|
||||
gnc_ui_scheduled_xaction_editor_dialog_create(theSX, FALSE);
|
||||
gnc_ui_scheduled_xaction_editor_dialog_create(GTK_WINDOW(data), theSX, FALSE);
|
||||
return;
|
||||
}
|
||||
gnc_sx_create_from_trans(pending_trans);
|
||||
gnc_sx_create_from_trans(GTK_WINDOW(data), pending_trans);
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -361,7 +361,6 @@
|
||||
</columns>
|
||||
</object>
|
||||
<object class="GtkDialog" id="deletion_date_dialog">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="border_width">6</property>
|
||||
<property name="title" translatable="yes">Remove Old Prices</property>
|
||||
|
@ -3,7 +3,6 @@
|
||||
<interface>
|
||||
<requires lib="gtk+" version="3.10"/>
|
||||
<object class="GtkDialog" id="account_deletion_dialog">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="border_width">6</property>
|
||||
<property name="title" translatable="yes">Account Deletion</property>
|
||||
|
@ -21,7 +21,6 @@
|
||||
</columns>
|
||||
</object>
|
||||
<object class="GtkDialog" id="transaction_association_dialog">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="has_focus">True</property>
|
||||
<property name="can_default">True</property>
|
||||
|
@ -10,7 +10,6 @@
|
||||
<property name="page_increment">1</property>
|
||||
</object>
|
||||
<object class="GtkDialog" id="budget_estimate_dialog">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="border_width">5</property>
|
||||
<property name="title" translatable="yes">Estimate Budget Values</property>
|
||||
@ -174,7 +173,6 @@
|
||||
<property name="page_increment">12</property>
|
||||
</object>
|
||||
<object class="GtkDialog" id="budget_options_container_dialog">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="title" translatable="yes">Budget Options</property>
|
||||
<property name="modal">True</property>
|
||||
@ -393,7 +391,6 @@
|
||||
</action-widgets>
|
||||
</object>
|
||||
<object class="GtkDialog" id="budget_list_dialog - Not Used">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="border_width">6</property>
|
||||
<property name="title" translatable="yes">Budget List</property>
|
||||
|
@ -1123,7 +1123,7 @@ impl_webkit_print (GncHtml* self)
|
||||
|
||||
priv = GNC_HTML_WEBKIT_GET_PRIVATE (self);
|
||||
op = webkit_print_operation_new (priv->web_view);
|
||||
top = GTK_WINDOW (gtk_widget_get_toplevel (GTK_WIDGET (self)));
|
||||
top = GTK_WINDOW(priv->base.parent);
|
||||
webkit_print_operation_run_dialog (op, top);
|
||||
g_object_unref (op);
|
||||
}
|
||||
|
@ -49,22 +49,6 @@ enum
|
||||
PROP_CURSOR_NAME, /* the name of the current cursor */
|
||||
};
|
||||
|
||||
static gboolean
|
||||
gnc_header_draw (GtkWidget *header, cairo_t *cr)
|
||||
{
|
||||
GnucashSheet *sheet = GNC_HEADER(header)->sheet;
|
||||
GdkWindow *sheet_layout_win = gtk_layout_get_bin_window (GTK_LAYOUT(sheet));
|
||||
gint x, y;
|
||||
|
||||
// use this to get the scroll x value to align the header
|
||||
gdk_window_get_position (sheet_layout_win, &x, &y);
|
||||
|
||||
cairo_set_source_surface (cr, GNC_HEADER(header)->surface, x, 0);
|
||||
cairo_paint (cr);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static void
|
||||
gnc_header_draw_offscreen (GncHeader *header)
|
||||
{
|
||||
@ -202,6 +186,28 @@ gnc_header_draw_offscreen (GncHeader *header)
|
||||
}
|
||||
|
||||
|
||||
static gboolean
|
||||
gnc_header_draw (GtkWidget *header, cairo_t *cr)
|
||||
{
|
||||
GnucashSheet *sheet = GNC_HEADER(header)->sheet;
|
||||
GdkWindow *sheet_layout_win = gtk_layout_get_bin_window (GTK_LAYOUT(sheet));
|
||||
gint x, y;
|
||||
|
||||
// use this to get the scroll x value to align the header
|
||||
gdk_window_get_position (sheet_layout_win, &x, &y);
|
||||
|
||||
// if the register page is moved to another window, the surface is
|
||||
// not created so test for a surface and create one if null
|
||||
if (GNC_HEADER(header)->surface == NULL)
|
||||
gnc_header_draw_offscreen (GNC_HEADER(header));
|
||||
|
||||
cairo_set_source_surface (cr, GNC_HEADER(header)->surface, x, 0);
|
||||
cairo_paint (cr);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
gnc_header_request_redraw (GncHeader *header)
|
||||
{
|
||||
|
@ -1809,9 +1809,13 @@ gnucash_sheet_key_press_event_internal (GtkWidget *widget, GdkEventKey *event)
|
||||
/* Forward the keystroke to the input line */
|
||||
if (pass_on)
|
||||
{
|
||||
gboolean result;
|
||||
gboolean result = FALSE;
|
||||
gtk_editable_set_editable(GTK_EDITABLE(sheet->entry), TRUE);
|
||||
result = gtk_widget_event (sheet->entry, (GdkEvent *) event);
|
||||
|
||||
// If sheet is readonly, entry is not realized
|
||||
if (gtk_widget_get_realized (GTK_WIDGET(sheet->entry)))
|
||||
result = gtk_widget_event (sheet->entry, (GdkEvent *) event);
|
||||
|
||||
gtk_editable_set_editable(GTK_EDITABLE(sheet->entry), FALSE);
|
||||
return result;
|
||||
}
|
||||
|
@ -209,8 +209,8 @@ set_dimensions_pass_one (GnucashSheet *sheet, CellBlock *cursor,
|
||||
cd->pixel_height = gnc_item_edit_get_margin (item_edit, top_bottom) +
|
||||
gnc_item_edit_get_padding_border (item_edit, top_bottom);
|
||||
}
|
||||
|
||||
max_height = MAX(max_height, cd->pixel_height);
|
||||
// add 1 to cd->pixel_height to allow for a cell border
|
||||
max_height = MAX(max_height, cd->pixel_height + 1);
|
||||
|
||||
if (cd->pixel_width > 0)
|
||||
continue;
|
||||
|
@ -1537,10 +1537,12 @@ gnc_get_export_filename (SCM choice)
|
||||
filepath = gnc_file_dialog (gnc_ui_get_main_window (NULL),
|
||||
title, NULL, default_dir, GNC_FILE_DIALOG_EXPORT);
|
||||
|
||||
/* Try to test for extension on file name, add if missing */
|
||||
if (g_strrstr(filepath, ".") == NULL)
|
||||
filepath = g_strconcat(filepath, ".", g_ascii_strdown(type, strlen(type)), NULL);
|
||||
|
||||
if (filepath != NULL) // test for cancel pressed
|
||||
{
|
||||
/* Try to test for extension on file name, add if missing */
|
||||
if (g_strrstr(filepath, ".") == NULL)
|
||||
filepath = g_strconcat(filepath, ".", g_ascii_strdown(type, strlen(type)), NULL);
|
||||
}
|
||||
g_free (type);
|
||||
g_free (title);
|
||||
g_free (default_dir);
|
||||
|
Loading…
Reference in New Issue
Block a user