Commit 5ac566918b55fbfaf541db9011135d31474beb6e

Authored by perry.werneck@gmail.com
1 parent 16fa4bce

Ajustes em windows

src/gtk/actions.c
@@ -427,9 +427,7 @@ GtkAction * ui_get_action(GtkWidget *widget, const gchar *name, GHashTable *hash @@ -427,9 +427,7 @@ GtkAction * ui_get_action(GtkWidget *widget, const gchar *name, GHashTable *hash
427 callback = cbk; 427 callback = cbk;
428 action_type = ACTION_TYPE_TABLE; 428 action_type = ACTION_TYPE_TABLE;
429 429
430 - trace("%s",__FUNCTION__);  
431 id = get_attribute_id(name,"src",&nm,src,names,values,error); 430 id = get_attribute_id(name,"src",&nm,src,names,values,error);
432 - trace("%s",__FUNCTION__);  
433 if(id < 0) 431 if(id < 0)
434 return NULL; 432 return NULL;
435 433
src/gtk/common/config.c
@@ -26,7 +26,6 @@ @@ -26,7 +26,6 @@
26 * erico.mendonca@gmail.com (Erico Mascarenhas Mendonça) 26 * erico.mendonca@gmail.com (Erico Mascarenhas Mendonça)
27 * licinio@bb.com.br (Licínio Luis Branco) 27 * licinio@bb.com.br (Licínio Luis Branco)
28 * kraucer@bb.com.br (Kraucer Fernandes Mazuco) 28 * kraucer@bb.com.br (Kraucer Fernandes Mazuco)
29 - * macmiranda@bb.com.br (Marco Aurélio Caldas Miranda)  
30 * 29 *
31 */ 30 */
32 31
src/gtk/print.c
@@ -147,30 +147,23 @@ @@ -147,30 +147,23 @@
147 147
148 static void font_set(GtkFontButton *widget, PRINT_INFO *info) 148 static void font_set(GtkFontButton *widget, PRINT_INFO *info)
149 { 149 {
150 - const gchar *name = gtk_font_button_get_font_name(widget); 150 + const gchar * name = gtk_font_button_get_font_name(widget);
  151 + PangoFontDescription * descr = pango_font_description_from_string(name);
  152 +
  153 + if(!descr)
  154 + return;
151 155
152 if(info->font) 156 if(info->font)
153 g_free(info->font); 157 g_free(info->font);
154 158
155 -#if GTK_CHECK_VERSION(3,2,0)  
156 -  
157 - info->font = g_strdup(name);  
158 - info->fontsize = gtk_font_chooser_get_font_size((GtkFontChooser *) widget); 159 + info->font = g_strdup(pango_font_description_get_family(descr));
  160 + info->fontsize = pango_font_description_get_size(descr);
  161 + info->fontweight = CAIRO_FONT_WEIGHT_NORMAL;
159 162
160 -#else  
161 - {  
162 - PangoFontDescription *descr = pango_font_description_from_string(name); 163 + if(pango_font_description_get_weight(descr) == PANGO_WEIGHT_BOLD)
  164 + info->fontweight = CAIRO_FONT_WEIGHT_BOLD;
163 165
164 - info->font = g_strdup(pango_font_description_get_family(descr));  
165 - info->fontsize = pango_font_description_get_size(descr);  
166 - info->fontweight = CAIRO_FONT_WEIGHT_NORMAL;  
167 -  
168 - if(pango_font_description_get_weight(descr) == PANGO_WEIGHT_BOLD)  
169 - info->fontweight = CAIRO_FONT_WEIGHT_BOLD;  
170 -  
171 - pango_font_description_free(descr);  
172 - }  
173 -#endif // GTK(3,2,0) 166 + pango_font_description_free(descr);
174 167
175 set_string_to_config("print","font",name); 168 set_string_to_config("print","font",name);
176 trace("Font set to \"%s\" with size %d",info->font,info->fontsize); 169 trace("Font set to \"%s\" with size %d",info->font,info->fontsize);
@@ -256,6 +249,7 @@ @@ -256,6 +249,7 @@
256 249
257 // Font selection button 250 // Font selection button
258 widget = gtk_font_button_new(); 251 widget = gtk_font_button_new();
  252 +
259 #if GTK_CHECK_VERSION(3,2,0) 253 #if GTK_CHECK_VERSION(3,2,0)
260 gtk_font_chooser_set_filter_func((GtkFontChooser *) widget,filter_monospaced,NULL,NULL); 254 gtk_font_chooser_set_filter_func((GtkFontChooser *) widget,filter_monospaced,NULL,NULL);
261 #endif // GTK(3,2,0) 255 #endif // GTK(3,2,0)
src/gtk/pw3270-GTK.cbp
@@ -7,8 +7,8 @@ @@ -7,8 +7,8 @@
7 <Option compiler="gcc" /> 7 <Option compiler="gcc" />
8 <Build> 8 <Build>
9 <Target title="Debug"> 9 <Target title="Debug">
10 - <Option output=".bin/Debug/pw3270-GTK" prefix_auto="1" extension_auto="1" />  
11 - <Option object_output=".obj/Debug/" /> 10 + <Option output=".bin\Debug\pw3270-GTK" prefix_auto="1" extension_auto="1" />
  11 + <Option object_output=".obj\Debug\" />
12 <Option type="1" /> 12 <Option type="1" />
13 <Option compiler="gcc" /> 13 <Option compiler="gcc" />
14 <Compiler> 14 <Compiler>
@@ -17,8 +17,8 @@ @@ -17,8 +17,8 @@
17 </Compiler> 17 </Compiler>
18 </Target> 18 </Target>
19 <Target title="Release"> 19 <Target title="Release">
20 - <Option output=".bin/Release/pw3270-GTK" prefix_auto="1" extension_auto="1" />  
21 - <Option object_output=".obj/Release/" /> 20 + <Option output=".bin\Release\pw3270-GTK" prefix_auto="1" extension_auto="1" />
  21 + <Option object_output=".obj\Release\" />
22 <Option type="0" /> 22 <Option type="0" />
23 <Option compiler="gcc" /> 23 <Option compiler="gcc" />
24 <Compiler> 24 <Compiler>
@@ -32,7 +32,7 @@ @@ -32,7 +32,7 @@
32 <Compiler> 32 <Compiler>
33 <Add option="-Wall" /> 33 <Add option="-Wall" />
34 <Add option="`pkg-config lib3270 gtk+-2.0 lib3270 --cflags`" /> 34 <Add option="`pkg-config lib3270 gtk+-2.0 lib3270 --cflags`" />
35 - <Add directory="../include" /> 35 + <Add directory="..\include" />
36 </Compiler> 36 </Compiler>
37 <Linker> 37 <Linker>
38 <Add option="`pkg-config lib3270 gtk+-2.0 lib3270 --libs`" /> 38 <Add option="`pkg-config lib3270 gtk+-2.0 lib3270 --libs`" />
@@ -44,11 +44,12 @@ @@ -44,11 +44,12 @@
44 <Unit filename="colors.c"> 44 <Unit filename="colors.c">
45 <Option compilerVar="CC" /> 45 <Option compilerVar="CC" />
46 </Unit> 46 </Unit>
47 - <Unit filename="common/common.h" />  
48 - <Unit filename="common/config.c"> 47 + <Unit filename="common\common.h" />
  48 + <Unit filename="common\common.h.in" />
  49 + <Unit filename="common\config.c">
49 <Option compilerVar="CC" /> 50 <Option compilerVar="CC" />
50 </Unit> 51 </Unit>
51 - <Unit filename="common/sources.mak" /> 52 + <Unit filename="common\sources.mak" />
52 <Unit filename="dialog.c"> 53 <Unit filename="dialog.c">
53 <Option compilerVar="CC" /> 54 <Option compilerVar="CC" />
54 </Unit> 55 </Unit>
@@ -65,74 +66,74 @@ @@ -65,74 +66,74 @@
65 <Unit filename="print.c"> 66 <Unit filename="print.c">
66 <Option compilerVar="CC" /> 67 <Option compilerVar="CC" />
67 </Unit> 68 </Unit>
68 - <Unit filename="uiparser/accelerator.c"> 69 + <Unit filename="uiparser\accelerator.c">
69 <Option compilerVar="CC" /> 70 <Option compilerVar="CC" />
70 </Unit> 71 </Unit>
71 - <Unit filename="uiparser/action.c"> 72 + <Unit filename="uiparser\action.c">
72 <Option compilerVar="CC" /> 73 <Option compilerVar="CC" />
73 </Unit> 74 </Unit>
74 - <Unit filename="uiparser/menu.c"> 75 + <Unit filename="uiparser\menu.c">
75 <Option compilerVar="CC" /> 76 <Option compilerVar="CC" />
76 </Unit> 77 </Unit>
77 - <Unit filename="uiparser/menubar.c"> 78 + <Unit filename="uiparser\menubar.c">
78 <Option compilerVar="CC" /> 79 <Option compilerVar="CC" />
79 </Unit> 80 </Unit>
80 - <Unit filename="uiparser/menuitem.c"> 81 + <Unit filename="uiparser\menuitem.c">
81 <Option compilerVar="CC" /> 82 <Option compilerVar="CC" />
82 </Unit> 83 </Unit>
83 - <Unit filename="uiparser/parsefile.c"> 84 + <Unit filename="uiparser\parsefile.c">
84 <Option compilerVar="CC" /> 85 <Option compilerVar="CC" />
85 </Unit> 86 </Unit>
86 - <Unit filename="uiparser/parser.c"> 87 + <Unit filename="uiparser\parser.c">
87 <Option compilerVar="CC" /> 88 <Option compilerVar="CC" />
88 </Unit> 89 </Unit>
89 - <Unit filename="uiparser/parser.h" />  
90 - <Unit filename="uiparser/popup.c"> 90 + <Unit filename="uiparser\parser.h" />
  91 + <Unit filename="uiparser\popup.c">
91 <Option compilerVar="CC" /> 92 <Option compilerVar="CC" />
92 </Unit> 93 </Unit>
93 - <Unit filename="uiparser/private.h" />  
94 - <Unit filename="uiparser/script.c"> 94 + <Unit filename="uiparser\private.h" />
  95 + <Unit filename="uiparser\script.c">
95 <Option compilerVar="CC" /> 96 <Option compilerVar="CC" />
96 </Unit> 97 </Unit>
97 - <Unit filename="uiparser/separator.c"> 98 + <Unit filename="uiparser\separator.c">
98 <Option compilerVar="CC" /> 99 <Option compilerVar="CC" />
99 </Unit> 100 </Unit>
100 - <Unit filename="uiparser/sources.mak" />  
101 - <Unit filename="uiparser/toolbar.c"> 101 + <Unit filename="uiparser\sources.mak" />
  102 + <Unit filename="uiparser\toolbar.c">
102 <Option compilerVar="CC" /> 103 <Option compilerVar="CC" />
103 </Unit> 104 </Unit>
104 - <Unit filename="uiparser/toolitem.c"> 105 + <Unit filename="uiparser\toolitem.c">
105 <Option compilerVar="CC" /> 106 <Option compilerVar="CC" />
106 </Unit> 107 </Unit>
107 - <Unit filename="v3270/clipboard.c"> 108 + <Unit filename="v3270\clipboard.c">
108 <Option compilerVar="CC" /> 109 <Option compilerVar="CC" />
109 </Unit> 110 </Unit>
110 - <Unit filename="v3270/draw.c"> 111 + <Unit filename="v3270\draw.c">
111 <Option compilerVar="CC" /> 112 <Option compilerVar="CC" />
112 </Unit> 113 </Unit>
113 - <Unit filename="v3270/genmarshal" />  
114 - <Unit filename="v3270/iocallback.c"> 114 + <Unit filename="v3270\genmarshal" />
  115 + <Unit filename="v3270\iocallback.c">
115 <Option compilerVar="CC" /> 116 <Option compilerVar="CC" />
116 </Unit> 117 </Unit>
117 - <Unit filename="v3270/keyboard.c"> 118 + <Unit filename="v3270\keyboard.c">
118 <Option compilerVar="CC" /> 119 <Option compilerVar="CC" />
119 </Unit> 120 </Unit>
120 - <Unit filename="v3270/locked.xbm" />  
121 - <Unit filename="v3270/marshal.c"> 121 + <Unit filename="v3270\locked.xbm" />
  122 + <Unit filename="v3270\marshal.c">
122 <Option compilerVar="CC" /> 123 <Option compilerVar="CC" />
123 </Unit> 124 </Unit>
124 - <Unit filename="v3270/marshal.h" />  
125 - <Unit filename="v3270/mouse.c"> 125 + <Unit filename="v3270\marshal.h" />
  126 + <Unit filename="v3270\mouse.c">
126 <Option compilerVar="CC" /> 127 <Option compilerVar="CC" />
127 </Unit> 128 </Unit>
128 - <Unit filename="v3270/oia.c"> 129 + <Unit filename="v3270\oia.c">
129 <Option compilerVar="CC" /> 130 <Option compilerVar="CC" />
130 </Unit> 131 </Unit>
131 - <Unit filename="v3270/private.h" />  
132 - <Unit filename="v3270/sources.mak" />  
133 - <Unit filename="v3270/unlocked.xbm" />  
134 - <Unit filename="v3270/v3270.h" />  
135 - <Unit filename="v3270/widget.c"> 132 + <Unit filename="v3270\private.h" />
  133 + <Unit filename="v3270\sources.mak" />
  134 + <Unit filename="v3270\unlocked.xbm" />
  135 + <Unit filename="v3270\v3270.h" />
  136 + <Unit filename="v3270\widget.c">
136 <Option compilerVar="CC" /> 137 <Option compilerVar="CC" />
137 </Unit> 138 </Unit>
138 <Unit filename="valgrind.suppression" /> 139 <Unit filename="valgrind.suppression" />