Commit 25b60ce796167232a60eae5b76654d92ba7e9ab0
1 parent
a7dc4168
Exists in
master
and in
4 other branches
Fixing application preferences dialog warning.
Showing
1 changed file
with
7 additions
and
1 deletions
Show diff stats
src/objects/application/actions/preferences.c
| @@ -37,11 +37,16 @@ | @@ -37,11 +37,16 @@ | ||
| 37 | 37 | ||
| 38 | // gtk_window_set_title(GTK_WINDOW(dialog),action->label); | 38 | // gtk_window_set_title(GTK_WINDOW(dialog),action->label); |
| 39 | 39 | ||
| 40 | - static GtkWidget * factory(PW3270Action * action, GtkApplication G_GNUC_UNUSED(*application)) { | 40 | + static GtkWidget * factory(PW3270Action * action, GtkApplication *application) { |
| 41 | 41 | ||
| 42 | size_t ix; | 42 | size_t ix; |
| 43 | + GtkWindow * window = gtk_application_get_active_window(application); | ||
| 43 | GtkWidget * dialog = pw3270_settings_dialog_new(G_ACTION(action)); | 44 | GtkWidget * dialog = pw3270_settings_dialog_new(G_ACTION(action)); |
| 44 | 45 | ||
| 46 | + gtk_window_set_modal(GTK_WINDOW(dialog), TRUE); | ||
| 47 | + gtk_window_set_attached_to(GTK_WINDOW(dialog), GTK_WIDGET(window)); | ||
| 48 | + gtk_window_set_transient_for(GTK_WINDOW(dialog),window); | ||
| 49 | + | ||
| 45 | GtkWidget * pages[] = { | 50 | GtkWidget * pages[] = { |
| 46 | pw3270_toolbar_settings_new() | 51 | pw3270_toolbar_settings_new() |
| 47 | }; | 52 | }; |
| @@ -51,6 +56,7 @@ | @@ -51,6 +56,7 @@ | ||
| 51 | } | 56 | } |
| 52 | 57 | ||
| 53 | gtk_widget_show_all(dialog); | 58 | gtk_widget_show_all(dialog); |
| 59 | + | ||
| 54 | return dialog; | 60 | return dialog; |
| 55 | 61 | ||
| 56 | } | 62 | } |