Commit 07335315d93d53777faa517dd024e5d81ee99590
1 parent
e51354ff
Exists in
master
and in
1 other branch
Color selection updated.
Showing
4 changed files
with
21 additions
and
0 deletions
Show diff stats
src/dialogs/colors.c
... | ... | @@ -128,6 +128,22 @@ |
128 | 128 | |
129 | 129 | } |
130 | 130 | |
131 | + LIB3270_EXPORT void v3270_color_selection_reset(GtkWidget *widget) | |
132 | + { | |
133 | + V3270ColorSelection * sel = GTK_V3270_COLOR_SELECTION(widget); | |
134 | + | |
135 | + int f; | |
136 | + for(f=0;f<V3270_COLOR_COUNT;f++) | |
137 | + v3270_set_color(sel->terminal,f,sel->saved+f); | |
138 | + | |
139 | + update_color_chooser(sel,sel->selected); | |
140 | + | |
141 | + v3270_reload(sel->terminal); | |
142 | + gtk_widget_queue_draw(sel->terminal); | |
143 | + | |
144 | + } | |
145 | + | |
146 | + | |
131 | 147 | #if USE_GTK_COLOR_CHOOSER |
132 | 148 | static void color_activated(GtkColorChooser *chooser, GdkRGBA *clr, V3270ColorSelection *widget) |
133 | 149 | { | ... | ... |
src/include/v3270/colorscheme.h
... | ... | @@ -65,6 +65,7 @@ |
65 | 65 | LIB3270_EXPORT void v3270_color_scheme_set_text(GtkWidget *widget, const gchar *colors); |
66 | 66 | |
67 | 67 | LIB3270_EXPORT GtkWidget * v3270_color_selection_new(GtkWidget *widget); |
68 | + LIB3270_EXPORT void v3270_color_selection_reset(GtkWidget *widget); | |
68 | 69 | |
69 | 70 | G_END_DECLS |
70 | 71 | ... | ... |
src/testprogram/testprogram.c
v3270.cbp
... | ... | @@ -42,6 +42,9 @@ |
42 | 42 | <Add option="`pkg-config --libs gtk+-3.0 lib3270`" /> |
43 | 43 | <Add option="-fPIC" /> |
44 | 44 | </Linker> |
45 | + <Unit filename="src/dialogs/colors.c"> | |
46 | + <Option compilerVar="CC" /> | |
47 | + </Unit> | |
45 | 48 | <Unit filename="src/dialogs/colorscheme.c"> |
46 | 49 | <Option compilerVar="CC" /> |
47 | 50 | </Unit> | ... | ... |