mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
Fix some transient parent warnings
This commit is contained in:
parent
7c52f9ec43
commit
108f7fbd11
@ -1197,7 +1197,7 @@ gnc_prefs_connect_one (const gchar *name,
|
|||||||
* @return A pointer to the newly created dialog.
|
* @return A pointer to the newly created dialog.
|
||||||
*/
|
*/
|
||||||
static GtkWidget *
|
static GtkWidget *
|
||||||
gnc_preferences_dialog_create(void)
|
gnc_preferences_dialog_create(GtkWindow *parent)
|
||||||
{
|
{
|
||||||
GtkBuilder *builder;
|
GtkBuilder *builder;
|
||||||
GtkWidget *dialog, *notebook, *label, *image;
|
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
|
// Set the style context for this dialog so it can be easily manipulated with css
|
||||||
gnc_widget_set_style_context (GTK_WIDGET(dialog), "GncPreferenceDialog");
|
gnc_widget_set_style_context (GTK_WIDGET(dialog), "GncPreferenceDialog");
|
||||||
|
|
||||||
|
/* parent */
|
||||||
|
gtk_window_set_transient_for (GTK_WINDOW(dialog), GTK_WINDOW(parent));
|
||||||
|
|
||||||
#ifndef REGISTER2_ENABLED
|
#ifndef REGISTER2_ENABLED
|
||||||
/* Hide preferences that are related to register2 */
|
/* Hide preferences that are related to register2 */
|
||||||
box = GTK_WIDGET (gtk_builder_get_object (builder, "label14"));
|
box = GTK_WIDGET (gtk_builder_get_object (builder, "label14"));
|
||||||
@ -1273,8 +1276,8 @@ gnc_preferences_dialog_create(void)
|
|||||||
book = gnc_get_current_book();
|
book = gnc_get_current_book();
|
||||||
g_date_clear (&fy_end, 1);
|
g_date_clear (&fy_end, 1);
|
||||||
qof_instance_get (QOF_INSTANCE (book),
|
qof_instance_get (QOF_INSTANCE (book),
|
||||||
"fy-end", &fy_end,
|
"fy-end", &fy_end,
|
||||||
NULL);
|
NULL);
|
||||||
box = GTK_WIDGET(gtk_builder_get_object (builder,
|
box = GTK_WIDGET(gtk_builder_get_object (builder,
|
||||||
"pref/" GNC_PREFS_GROUP_ACCT_SUMMARY "/" GNC_PREF_START_PERIOD));
|
"pref/" GNC_PREFS_GROUP_ACCT_SUMMARY "/" GNC_PREF_START_PERIOD));
|
||||||
period = gnc_period_select_new(TRUE);
|
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
|
* preferences dialog already exists it will be raised to the top of
|
||||||
* the window stack instead of creating a new dialog. */
|
* the window stack instead of creating a new dialog. */
|
||||||
void
|
void
|
||||||
gnc_preferences_dialog (void)
|
gnc_preferences_dialog (GtkWindow *parent)
|
||||||
{
|
{
|
||||||
GtkWidget *dialog;
|
GtkWidget *dialog;
|
||||||
|
|
||||||
@ -1437,7 +1440,7 @@ gnc_preferences_dialog (void)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
dialog = gnc_preferences_dialog_create();
|
dialog = gnc_preferences_dialog_create(parent);
|
||||||
|
|
||||||
gnc_restore_window_size(GNC_PREFS_GROUP, GTK_WINDOW(dialog));
|
gnc_restore_window_size(GNC_PREFS_GROUP, GTK_WINDOW(dialog));
|
||||||
gtk_widget_show(dialog);
|
gtk_widget_show(dialog);
|
||||||
|
@ -60,6 +60,8 @@
|
|||||||
#ifndef GNC_DIALOG_PREFERENCES_H
|
#ifndef GNC_DIALOG_PREFERENCES_H
|
||||||
#define GNC_DIALOG_PREFERENCES_H
|
#define GNC_DIALOG_PREFERENCES_H
|
||||||
|
|
||||||
|
#include <gtk/gtk.h>
|
||||||
|
|
||||||
/** This function adds a full page of preferences to the preferences
|
/** This function adds a full page of preferences to the preferences
|
||||||
* dialog. When the dialog is created, the specified widget will be
|
* dialog. When the dialog is created, the specified widget will be
|
||||||
* pulled from the specified glade file and added to the preferences
|
* 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
|
* the user. The preferences dialog is a singleton, so if a
|
||||||
* preferences dialog already exists it will be raised to the top of
|
* preferences dialog already exists it will be raised to the top of
|
||||||
* the window stack instead of creating a new dialog. */
|
* the window stack instead of creating a new dialog. */
|
||||||
void gnc_preferences_dialog (void);
|
void gnc_preferences_dialog (GtkWindow *parent);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
/** @} */
|
/** @} */
|
||||||
|
@ -4199,7 +4199,7 @@ gnc_main_window_cmd_edit_paste (GtkAction *action, GncMainWindow *window)
|
|||||||
static void
|
static void
|
||||||
gnc_main_window_cmd_edit_preferences (GtkAction *action, GncMainWindow *window)
|
gnc_main_window_cmd_edit_preferences (GtkAction *action, GncMainWindow *window)
|
||||||
{
|
{
|
||||||
gnc_preferences_dialog ();
|
gnc_preferences_dialog (GTK_WINDOW(window));
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -549,7 +549,7 @@ fincalc_init_commodity_gae (GNCAmountEdit *edit)
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
gnc_ui_fincalc_dialog_create(void)
|
gnc_ui_fincalc_dialog_create(GtkWindow *parent)
|
||||||
{
|
{
|
||||||
FinCalcDialog *fcd;
|
FinCalcDialog *fcd;
|
||||||
GtkWidget *button;
|
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
|
// 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");
|
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,
|
gnc_register_gui_component (DIALOG_FINCALC_CM_CLASS,
|
||||||
NULL, close_handler, fcd);
|
NULL, close_handler, fcd);
|
||||||
|
|
||||||
|
@ -25,7 +25,7 @@
|
|||||||
|
|
||||||
typedef struct _FinCalcDialog FinCalcDialog;
|
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);
|
void gnc_ui_fincalc_dialog_destroy(FinCalcDialog *fcd);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -375,7 +375,7 @@ get_trans_info (AssocDialog *assoc_dialog)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
gnc_assoc_dialog_create (AssocDialog *assoc_dialog)
|
gnc_assoc_dialog_create (GtkWindow *parent, AssocDialog *assoc_dialog)
|
||||||
{
|
{
|
||||||
GtkWidget *dialog;
|
GtkWidget *dialog;
|
||||||
GtkBuilder *builder;
|
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
|
// Set the style context for this dialog so it can be easily manipulated with css
|
||||||
gnc_widget_set_style_context (GTK_WIDGET(dialog), "GncTransAssocDialog");
|
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"));
|
assoc_dialog->view = GTK_WIDGET(gtk_builder_get_object (builder, "treeview"));
|
||||||
path_head = GTK_WIDGET(gtk_builder_get_object (builder, "path-head"));
|
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 *
|
* Return: nothing *
|
||||||
\********************************************************************/
|
\********************************************************************/
|
||||||
void
|
void
|
||||||
gnc_trans_assoc_dialog ()
|
gnc_trans_assoc_dialog (GtkWindow *parent)
|
||||||
{
|
{
|
||||||
AssocDialog *assoc_dialog;
|
AssocDialog *assoc_dialog;
|
||||||
|
|
||||||
@ -512,7 +516,7 @@ gnc_trans_assoc_dialog ()
|
|||||||
}
|
}
|
||||||
assoc_dialog = g_new0 (AssocDialog, 1);
|
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,
|
gnc_register_gui_component (DIALOG_ASSOC_CM_CLASS,
|
||||||
refresh_handler, close_handler,
|
refresh_handler, close_handler,
|
||||||
|
@ -23,6 +23,6 @@
|
|||||||
#ifndef DIALOG_TRANS_ASSOC_H
|
#ifndef DIALOG_TRANS_ASSOC_H
|
||||||
#define DIALOG_TRANS_ASSOC_H
|
#define DIALOG_TRANS_ASSOC_H
|
||||||
|
|
||||||
void gnc_trans_assoc_dialog (void);
|
void gnc_trans_assoc_dialog (GtkWindow *parent);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -616,7 +616,7 @@ static void
|
|||||||
gnc_main_window_cmd_tools_imap_editor (GtkAction *action, GncMainWindowActionData *data)
|
gnc_main_window_cmd_tools_imap_editor (GtkAction *action, GncMainWindowActionData *data)
|
||||||
{
|
{
|
||||||
gnc_set_busy_cursor(NULL, TRUE);
|
gnc_set_busy_cursor(NULL, TRUE);
|
||||||
gnc_imap_dialog (NULL);
|
gnc_imap_dialog (GTK_WIDGET (data->window));
|
||||||
gnc_unset_busy_cursor(NULL);
|
gnc_unset_busy_cursor(NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -624,7 +624,7 @@ static void
|
|||||||
gnc_main_window_cmd_tools_trans_assoc (GtkAction *action, GncMainWindowActionData *data)
|
gnc_main_window_cmd_tools_trans_assoc (GtkAction *action, GncMainWindowActionData *data)
|
||||||
{
|
{
|
||||||
gnc_set_busy_cursor (NULL, TRUE);
|
gnc_set_busy_cursor (NULL, TRUE);
|
||||||
gnc_trans_assoc_dialog ();
|
gnc_trans_assoc_dialog (GTK_WINDOW (data->window));
|
||||||
gnc_unset_busy_cursor (NULL);
|
gnc_unset_busy_cursor (NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -632,7 +632,7 @@ static void
|
|||||||
gnc_main_window_cmd_tools_price_editor (GtkAction *action, GncMainWindowActionData *data)
|
gnc_main_window_cmd_tools_price_editor (GtkAction *action, GncMainWindowActionData *data)
|
||||||
{
|
{
|
||||||
gnc_set_busy_cursor(NULL, TRUE);
|
gnc_set_busy_cursor(NULL, TRUE);
|
||||||
gnc_prices_dialog (NULL);
|
gnc_prices_dialog (GTK_WIDGET (data->window));
|
||||||
gnc_unset_busy_cursor(NULL);
|
gnc_unset_busy_cursor(NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -640,14 +640,14 @@ static void
|
|||||||
gnc_main_window_cmd_tools_commodity_editor (GtkAction *action, GncMainWindowActionData *data)
|
gnc_main_window_cmd_tools_commodity_editor (GtkAction *action, GncMainWindowActionData *data)
|
||||||
{
|
{
|
||||||
gnc_set_busy_cursor(NULL, TRUE);
|
gnc_set_busy_cursor(NULL, TRUE);
|
||||||
gnc_commodities_dialog (NULL);
|
gnc_commodities_dialog (GTK_WIDGET (data->window));
|
||||||
gnc_unset_busy_cursor(NULL);
|
gnc_unset_busy_cursor(NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
gnc_main_window_cmd_tools_financial_calculator (GtkAction *action, GncMainWindowActionData *data)
|
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
|
static void
|
||||||
|
@ -361,7 +361,6 @@
|
|||||||
</columns>
|
</columns>
|
||||||
</object>
|
</object>
|
||||||
<object class="GtkDialog" id="deletion_date_dialog">
|
<object class="GtkDialog" id="deletion_date_dialog">
|
||||||
<property name="visible">True</property>
|
|
||||||
<property name="can_focus">False</property>
|
<property name="can_focus">False</property>
|
||||||
<property name="border_width">6</property>
|
<property name="border_width">6</property>
|
||||||
<property name="title" translatable="yes">Remove Old Prices</property>
|
<property name="title" translatable="yes">Remove Old Prices</property>
|
||||||
|
@ -21,7 +21,6 @@
|
|||||||
</columns>
|
</columns>
|
||||||
</object>
|
</object>
|
||||||
<object class="GtkDialog" id="transaction_association_dialog">
|
<object class="GtkDialog" id="transaction_association_dialog">
|
||||||
<property name="visible">True</property>
|
|
||||||
<property name="can_focus">True</property>
|
<property name="can_focus">True</property>
|
||||||
<property name="has_focus">True</property>
|
<property name="has_focus">True</property>
|
||||||
<property name="can_default">True</property>
|
<property name="can_default">True</property>
|
||||||
|
Loading…
Reference in New Issue
Block a user