Commit c578ee99d7b13785441fc9d7d7f8680ed218eaa3
1 parent
d88a03e6
Exists in
master
and in
2 other branches
Adding option for lockdown the host settings dialog.
Showing
1 changed file
with
6 additions
and
1 deletions
Show diff stats
src/objects/window/actions/sessionproperties.c
| @@ -53,18 +53,23 @@ | @@ -53,18 +53,23 @@ | ||
| 53 | 53 | ||
| 54 | size_t ix; | 54 | size_t ix; |
| 55 | 55 | ||
| 56 | + g_autoptr(GSettings) settings = pw3270_application_get_settings(g_application_get_default()); | ||
| 57 | + | ||
| 56 | GtkWidget * dialog = v3270_settings_dialog_new(); | 58 | GtkWidget * dialog = v3270_settings_dialog_new(); |
| 57 | gtk_window_set_title(GTK_WINDOW(dialog), action->label); | 59 | gtk_window_set_title(GTK_WINDOW(dialog), action->label); |
| 58 | 60 | ||
| 59 | // Add settings pages. | 61 | // Add settings pages. |
| 60 | GtkWidget * elements[] = { | 62 | GtkWidget * elements[] = { |
| 61 | - v3270_host_settings_new(), | ||
| 62 | v3270_color_settings_new(), | 63 | v3270_color_settings_new(), |
| 63 | v3270_font_settings_new(), | 64 | v3270_font_settings_new(), |
| 64 | v3270_accelerator_settings_new(), | 65 | v3270_accelerator_settings_new(), |
| 65 | v3270_clipboard_settings_new() | 66 | v3270_clipboard_settings_new() |
| 66 | }; | 67 | }; |
| 67 | 68 | ||
| 69 | + if(g_settings_get_boolean(settings,"allow-host-settings")) { | ||
| 70 | + gtk_container_add(GTK_CONTAINER(dialog), v3270_host_settings_new()); | ||
| 71 | + } | ||
| 72 | + | ||
| 68 | for(ix = 0; ix < G_N_ELEMENTS(elements); ix++) { | 73 | for(ix = 0; ix < G_N_ELEMENTS(elements); ix++) { |
| 69 | gtk_container_add(GTK_CONTAINER(dialog), elements[ix]); | 74 | gtk_container_add(GTK_CONTAINER(dialog), elements[ix]); |
| 70 | } | 75 | } |