From cdf52b6cba6a914a27669b97373a9aeaa952f30d Mon Sep 17 00:00:00 2001 From: Perry Werneck Date: Wed, 22 Jan 2020 12:10:07 -0300 Subject: [PATCH] Implementing cut&paste settings dialog. --- src/dialogs/settings/clipboard.c | 50 ++++++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 46 insertions(+), 4 deletions(-) diff --git a/src/dialogs/settings/clipboard.c b/src/dialogs/settings/clipboard.c index ba6d493..5e66e9f 100644 --- a/src/dialogs/settings/clipboard.c +++ b/src/dialogs/settings/clipboard.c @@ -101,9 +101,10 @@ .label = N_("Color theme"), // .tooltip = - .n_columns = 1, + .n_columns = 2, .types = (const GType []) { - G_TYPE_STRING + G_TYPE_STRING, + G_TYPE_UINT } }, @@ -173,8 +174,8 @@ static void V3270ClipboardSettings_init(V3270ClipboardSettings *widget) { { static const gchar * labels[GRID_COUNT] = { N_("Copy options"), - N_("Common paste options"), - N_("HTML Paste options") + N_("Paste options"), + N_("HTML options") }; for(ix = 0; ix < G_N_ELEMENTS(labels); ix++) { @@ -208,6 +209,46 @@ static void V3270ClipboardSettings_init(V3270ClipboardSettings *widget) { gtk_cell_layout_set_attributes(GTK_CELL_LAYOUT(widget->input.combos[ix]), text_renderer, "text", 0, NULL); } + // HTML Font combo + static const gchar * html_font_options[] = { + N_("None (Don't export font name)"), + N_("Same of the screen") + }; + + model = GTK_LIST_STORE(gtk_combo_box_get_model(widget->input.combos[0])); + for(ix = 0;ix < G_N_ELEMENTS(html_font_options); ix++) { + + gtk_list_store_append(model, &iter); + gtk_list_store_set( + model, + &iter, + 0, g_dgettext(PACKAGE_NAME, html_font_options[ix]), + 1, (guint) ix, + -1 + ); + + } + + // Color scheme combo + static const gchar * html_color_options[] = { + N_("None (Don't export color)"), + N_("Same of the screen") + }; + + model = GTK_LIST_STORE(gtk_combo_box_get_model(widget->input.combos[1])); + for(ix = 0;ix < G_N_ELEMENTS(html_color_options); ix++) { + + gtk_list_store_append(model, &iter); + gtk_list_store_set( + model, + &iter, + 0, g_dgettext(PACKAGE_NAME, html_color_options[ix]), + 1, (guint) ix, + -1 + ); + + } + // Copy format combo static const gchar * copy_formats[] = { N_("Plain text only"), @@ -229,6 +270,7 @@ static void V3270ClipboardSettings_init(V3270ClipboardSettings *widget) { } + } } -- libgit2 0.21.2