Commit 75ad1476b68f37e12632f720df9fc2b3fd770f34
1 parent
a23e97e7
Exists in
master
and in
1 other branch
Color settings dialog is now an standard action.
Showing
4 changed files
with
22 additions
and
17 deletions
Show diff stats
src/dialogs/settings/colors.c
... | ... | @@ -381,13 +381,3 @@ static void load(GtkWidget G_GNUC_UNUSED(*w), GtkWidget *terminal) |
381 | 381 | |
382 | 382 | return GTK_WIDGET(settings); |
383 | 383 | } |
384 | - | |
385 | - LIB3270_EXPORT void v3270_edit_color_table(GtkWidget *terminal) | |
386 | - { | |
387 | - v3270_settings_popup_dialog( | |
388 | - v3270_color_settings_new(), | |
389 | - terminal, | |
390 | - FALSE | |
391 | - ); | |
392 | - | |
393 | - } | ... | ... |
src/include/v3270/colorscheme.h
... | ... | @@ -66,7 +66,6 @@ |
66 | 66 | LIB3270_EXPORT void v3270_color_scheme_set_text(GtkWidget *widget, const gchar *colors); |
67 | 67 | |
68 | 68 | LIB3270_EXPORT GtkWidget * v3270_color_selection_new() G_GNUC_DEPRECATED; |
69 | - LIB3270_EXPORT void v3270_edit_color_table(GtkWidget *terminal); | |
70 | 69 | |
71 | 70 | G_END_DECLS |
72 | 71 | ... | ... |
src/terminal/actions/table.c
... | ... | @@ -26,8 +26,11 @@ |
26 | 26 | |
27 | 27 | static int fire_copy_as_html(GtkWidget *widget, const struct _v3270_action * action); |
28 | 28 | static int fire_copy_as_pixbuff(GtkWidget *widget, const struct _v3270_action * action); |
29 | + | |
30 | + // Dialogs | |
29 | 31 | static int fire_accelerators_dialog(GtkWidget *widget, const struct _v3270_action * action); |
30 | 32 | static int fire_host_dialog(GtkWidget *widget, const struct _v3270_action * action); |
33 | + static int fire_color_dialog(GtkWidget *widget, const struct _v3270_action * action); | |
31 | 34 | |
32 | 35 | /*--[ Implement ]------------------------------------------------------------------------------------*/ |
33 | 36 | |
... | ... | @@ -333,6 +336,15 @@ |
333 | 336 | .activate = fire_host_dialog |
334 | 337 | }, |
335 | 338 | |
339 | + { | |
340 | + .group = LIB3270_ACTION_GROUP_NONE, | |
341 | + .name = "dialog-colors", | |
342 | + .icon = "gtk-select-color", | |
343 | + .label = N_("Terminal colors"), | |
344 | + .summary = N_("Edit terminal colors"), | |
345 | + .activate = fire_color_dialog | |
346 | + }, | |
347 | + | |
336 | 348 | // |
337 | 349 | // Terminator |
338 | 350 | // |
... | ... | @@ -425,3 +437,12 @@ |
425 | 437 | */ |
426 | 438 | |
427 | 439 | } |
440 | + | |
441 | + static int fire_color_dialog(GtkWidget *widget, const struct _v3270_action G_GNUC_UNUSED(* action)) { | |
442 | + v3270_settings_popup_dialog( | |
443 | + v3270_color_settings_new(), | |
444 | + widget, | |
445 | + FALSE | |
446 | + ); | |
447 | + return 0; | |
448 | + } | ... | ... |
src/testprogram/toolbar.c
... | ... | @@ -198,11 +198,6 @@ |
198 | 198 | v3270_clipboard_set(terminal,V3270_COPY_TEXT,FALSE); |
199 | 199 | } |
200 | 200 | |
201 | - static void color_clicked(GtkButton G_GNUC_UNUSED(*button), GtkWidget *terminal) | |
202 | - { | |
203 | - v3270_edit_color_table(terminal); | |
204 | - } | |
205 | - | |
206 | 201 | static void zoom_in_clicked(GtkButton G_GNUC_UNUSED(*button), GtkWidget *terminal) |
207 | 202 | { |
208 | 203 | v3270_zoom_in(terminal); |
... | ... | @@ -242,7 +237,7 @@ |
242 | 237 | |
243 | 238 | // { "network-server", G_CALLBACK(host_clicked), "Configure host" }, |
244 | 239 | // { "preferences-desktop-font", G_CALLBACK(font_clicked), "Select font" }, |
245 | - { "gtk-select-color", G_CALLBACK(color_clicked), "Edit or change color scheme" }, | |
240 | +// { "gtk-select-color", G_CALLBACK(color_clicked), "Edit or change color scheme" }, | |
246 | 241 | |
247 | 242 | |
248 | 243 | { "zoom-in", G_CALLBACK(zoom_in_clicked), "Zoom in" }, | ... | ... |