Commit cce80668b0c21c021e950d45beb6b0cd577907fa
1 parent
69f76c9c
Exists in
master
and in
5 other branches
Implementando cores para relatorios
Showing
6 changed files
with
39 additions
and
8 deletions
Show diff stats
colors.conf
... | ... | @@ -40,3 +40,31 @@ BaseAttributes=green,green,green,green |
40 | 40 | SelectedText=dimGrey,green,dimGrey |
41 | 41 | Cursor=green,green |
42 | 42 | OIA=black,green,green,green,green |
43 | + | |
44 | +[BW] | |
45 | +Label=Black & White | |
46 | +Label[pt_BR]=Branco e preto | |
47 | +Terminal=black,white,white,white,white,white,white,white,white,white,white,white,white,white,white,white | |
48 | +BaseAttributes=white,white,white,white | |
49 | +SelectedText=dimGrey,white,dimGrey | |
50 | +Cursor=white,white | |
51 | +OIA=black,green,white,white | |
52 | + | |
53 | +[WB] | |
54 | +Label=White on Black | |
55 | +Label[pt_BR]=Branco com fundo preto | |
56 | +Terminal=black,white,white,white,white,white,white,white,white,white,white,white,white,white,white,white | |
57 | +BaseAttributes=white,white,white,white | |
58 | +SelectedText=white,black,white | |
59 | +Cursor=white,white | |
60 | +OIA=black,white,white,white,white | |
61 | + | |
62 | +[BW] | |
63 | +Label=Black on White | |
64 | +Label[pt_BR]=Preto com fundo branco | |
65 | +Terminal=white,black,black,black,black,black,black,black,black,black,black,black,black,black,black,black | |
66 | +BaseAttributes=black,black,black,black | |
67 | +SelectedText=black,white,black | |
68 | +Cursor=black,black | |
69 | +OIA=white,black,black,black,black | |
70 | + | ... | ... |
src/gtk/Makefile.in
... | ... | @@ -50,7 +50,7 @@ include uiparser/sources.mak |
50 | 50 | |
51 | 51 | #---[ Targets ]---------------------------------------------------------------- |
52 | 52 | |
53 | -SOURCES=main.c mainwindow.c actions.c fonts.c dialog.c print.c \ | |
53 | +SOURCES=main.c mainwindow.c actions.c fonts.c dialog.c print.c colors.c \ | |
54 | 54 | $(foreach SRC, $(V3270_SRC), v3270/$(SRC)) \ |
55 | 55 | $(foreach SRC, $(COMMON_SRC), common/$(SRC)) \ |
56 | 56 | $(foreach SRC, $(UI_PARSER_SRC), uiparser/$(SRC)) | ... | ... |
src/gtk/colors.c
... | ... | @@ -32,7 +32,7 @@ |
32 | 32 | |
33 | 33 | /*--[ Implement ]------------------------------------------------------------------------------------*/ |
34 | 34 | |
35 | - void load_color_schemes(GtkWidget *widget, gchar **target) | |
35 | + void load_color_schemes(GtkWidget *widget, gchar *active) | |
36 | 36 | { |
37 | 37 | gchar *filename = build_data_filename("colors.conf",NULL); |
38 | 38 | |
... | ... | @@ -88,7 +88,7 @@ |
88 | 88 | 1, str, |
89 | 89 | -1); |
90 | 90 | |
91 | - if(*target && !g_strcasecmp(*target,str)) | |
91 | + if(active && !g_strcasecmp(active,str)) | |
92 | 92 | { |
93 | 93 | found = TRUE; |
94 | 94 | gtk_combo_box_set_active_iter(GTK_COMBO_BOX(widget),&iter); |
... | ... | @@ -102,13 +102,13 @@ |
102 | 102 | g_strfreev(group); |
103 | 103 | g_key_file_free(conf); |
104 | 104 | |
105 | - if(!found) | |
105 | + if(active && !found) | |
106 | 106 | { |
107 | 107 | #if GTK_CHECK_VERSION(3,0,0) |
108 | 108 | |
109 | 109 | gtk_combo_box_text_insert( GTK_COMBO_BOX_TEXT(widget), |
110 | 110 | 0, |
111 | - *target, | |
111 | + active, | |
112 | 112 | _( "Custom colors") ); |
113 | 113 | |
114 | 114 | #else |
... | ... | @@ -116,7 +116,7 @@ |
116 | 116 | gtk_list_store_append((GtkListStore *) model,&iter); |
117 | 117 | gtk_list_store_set((GtkListStore *) model, &iter, |
118 | 118 | 0, _( "Custom colors" ), |
119 | - 1, *target, | |
119 | + 1, active, | |
120 | 120 | -1); |
121 | 121 | |
122 | 122 | gtk_combo_box_set_active_iter(GTK_COMBO_BOX(widget),&iter); | ... | ... |
src/gtk/globals.h
... | ... | @@ -55,7 +55,7 @@ |
55 | 55 | |
56 | 56 | GtkWidget * create_main_window(void); |
57 | 57 | void setup_font_list(GtkWidget *widget, GtkWidget *obj); |
58 | - void load_color_schemes(GtkWidget *widget, gchar **target); | |
58 | + void load_color_schemes(GtkWidget *widget, gchar *active); | |
59 | 59 | |
60 | 60 | // actions |
61 | 61 | void paste_file_action(GtkAction *action, GtkWidget *widget); | ... | ... |
src/gtk/print.c
... | ... | @@ -147,7 +147,7 @@ |
147 | 147 | widget = gtk_combo_box_new(); |
148 | 148 | #endif // GTK(3,0,0) |
149 | 149 | |
150 | - load_color_schemes(widget,&info->colorname); | |
150 | + load_color_schemes(widget,info->colorname); | |
151 | 151 | gtk_table_attach(GTK_TABLE(container),widget,1,2,1,2,GTK_EXPAND|GTK_FILL,GTK_FILL,5,0); |
152 | 152 | |
153 | 153 | // Show and return | ... | ... |
src/gtk/pw3270-GTK.cbp
... | ... | @@ -41,6 +41,9 @@ |
41 | 41 | <Unit filename="actions.c"> |
42 | 42 | <Option compilerVar="CC" /> |
43 | 43 | </Unit> |
44 | + <Unit filename="colors.c"> | |
45 | + <Option compilerVar="CC" /> | |
46 | + </Unit> | |
44 | 47 | <Unit filename="common/common.h" /> |
45 | 48 | <Unit filename="common/config.c"> |
46 | 49 | <Option compilerVar="CC" /> | ... | ... |