diff --git a/src/dialogs/settings/dialog.c b/src/dialogs/settings/dialog.c index eb1f1ea..0a8265a 100644 --- a/src/dialogs/settings/dialog.c +++ b/src/dialogs/settings/dialog.c @@ -53,6 +53,9 @@ static void add(GtkContainer *container, GtkWidget *widget) debug("Added settings dialog %p",widget); + // https://developer.gnome.org/hig/stable/visual-layout.html.en + gtk_container_set_border_width(GTK_CONTAINER(widget),18); + GtkWidget * label = NULL; if(GTK_V3270_SETTINGS(widget)->label) { @@ -158,8 +161,8 @@ static void V3270SettingsDialog_init(V3270SettingsDialog *dialog) GtkWidget * content_area = gtk_dialog_get_content_area(GTK_DIALOG(dialog)); // https://developer.gnome.org/hig/stable/visual-layout.html.en - gtk_box_set_spacing(GTK_BOX(content_area),18); - gtk_container_set_border_width(GTK_CONTAINER(content_area),18); + //gtk_box_set_spacing(GTK_BOX(content_area),18); + //gtk_container_set_border_width(GTK_CONTAINER(content_area),18); gtk_window_set_deletable(GTK_WINDOW(dialog),FALSE); gtk_window_set_destroy_with_parent(GTK_WINDOW(dialog), TRUE); @@ -245,7 +248,7 @@ void v3270_setttings_dialog_response(GtkDialog *dialog, gint response_id, GtkWid g_warning("Unexpected settings dialog response \"%d\"",response_id); } - gtk_widget_destroy(dialog); + gtk_widget_destroy(GTK_WIDGET(dialog)); } diff --git a/src/testprogram/toolbar.c b/src/testprogram/toolbar.c index 54f604a..e4310b6 100644 --- a/src/testprogram/toolbar.c +++ b/src/testprogram/toolbar.c @@ -72,6 +72,26 @@ } + static void preferences_clicked(GtkButton G_GNUC_UNUSED(*button), GtkWidget *terminal) + { + GtkWidget * dialog = v3270_settings_dialog_new(); + + gtk_window_set_title(GTK_WINDOW(dialog),"Session properties"); + gtk_container_add(GTK_CONTAINER(dialog), v3270_host_select_new()); + gtk_container_add(GTK_CONTAINER(dialog), v3270_color_selection_new()); + gtk_container_add(GTK_CONTAINER(dialog), v3270_font_chooser_widget_new()); + + gtk_window_set_transient_for(GTK_WINDOW(dialog),GTK_WINDOW(gtk_widget_get_toplevel(terminal))); + + v3270_settings_dialog_set_terminal_widget(dialog, terminal); + + g_signal_connect(dialog,"close",G_CALLBACK(gtk_widget_destroy),NULL); + g_signal_connect(dialog,"response",G_CALLBACK(v3270_setttings_dialog_response),NULL); + + gtk_widget_show_all(dialog); + + } + static void connect_clicked(GtkButton G_GNUC_UNUSED(*button), GtkWidget *terminal) { lib3270_reconnect(v3270_get_session(terminal),0); @@ -228,8 +248,6 @@ } buttons[] = { { "gtk-connect", G_CALLBACK(connect_clicked), "Connect to host" }, { "gtk-disconnect", G_CALLBACK(disconnect_clicked), "Disconnect from host" }, - { "gtk-select-color", G_CALLBACK(color_clicked), "Edit or change color scheme" }, - { "network-server", G_CALLBACK(host_clicked), "Configure host" }, { "gtk-print", G_CALLBACK(print_clicked), "Print screen contents" }, { "gtk-harddisk", G_CALLBACK(ft_clicked), "Open file transfer dialog" }, { "gtk-copy", G_CALLBACK(copy_clicked), "Copy data" }, @@ -237,7 +255,12 @@ { "document-save", G_CALLBACK(save_all_clicked), "Save screen" }, { "document-open", G_CALLBACK(load_clicked), "Paste file" }, - { "preferences-desktop-font", G_CALLBACK(font_clicked), "Select font" }, + { "applications-system", G_CALLBACK(preferences_clicked), "Session properties" }, + +// { "network-server", G_CALLBACK(host_clicked), "Configure host" }, +// { "preferences-desktop-font", G_CALLBACK(font_clicked), "Select font" }, +// { "gtk-select-color", G_CALLBACK(color_clicked), "Edit or change color scheme" }, + { "zoom-in", G_CALLBACK(zoom_in_clicked), "Zoom in" }, { "zoom-out", G_CALLBACK(zoom_out_clicked), "Zoom out" }, diff --git a/v3270.cbp b/v3270.cbp index f312a50..3eff6c4 100644 --- a/v3270.cbp +++ b/v3270.cbp @@ -99,9 +99,6 @@ - - -- libgit2 0.21.2