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 427 callback = cbk;
428 428 action_type = ACTION_TYPE_TABLE;
429 429  
430   - trace("%s",__FUNCTION__);
431 430 id = get_attribute_id(name,"src",&nm,src,names,values,error);
432   - trace("%s",__FUNCTION__);
433 431 if(id < 0)
434 432 return NULL;
435 433  
... ...
src/gtk/common/config.c
... ... @@ -26,7 +26,6 @@
26 26 * erico.mendonca@gmail.com (Erico Mascarenhas Mendonça)
27 27 * licinio@bb.com.br (Licínio Luis Branco)
28 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 147  
148 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 156 if(info->font)
153 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 168 set_string_to_config("print","font",name);
176 169 trace("Font set to \"%s\" with size %d",info->font,info->fontsize);
... ... @@ -256,6 +249,7 @@
256 249  
257 250 // Font selection button
258 251 widget = gtk_font_button_new();
  252 +
259 253 #if GTK_CHECK_VERSION(3,2,0)
260 254 gtk_font_chooser_set_filter_func((GtkFontChooser *) widget,filter_monospaced,NULL,NULL);
261 255 #endif // GTK(3,2,0)
... ...
src/gtk/pw3270-GTK.cbp
... ... @@ -7,8 +7,8 @@
7 7 <Option compiler="gcc" />
8 8 <Build>
9 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 12 <Option type="1" />
13 13 <Option compiler="gcc" />
14 14 <Compiler>
... ... @@ -17,8 +17,8 @@
17 17 </Compiler>
18 18 </Target>
19 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 22 <Option type="0" />
23 23 <Option compiler="gcc" />
24 24 <Compiler>
... ... @@ -32,7 +32,7 @@
32 32 <Compiler>
33 33 <Add option="-Wall" />
34 34 <Add option="`pkg-config lib3270 gtk+-2.0 lib3270 --cflags`" />
35   - <Add directory="../include" />
  35 + <Add directory="..\include" />
36 36 </Compiler>
37 37 <Linker>
38 38 <Add option="`pkg-config lib3270 gtk+-2.0 lib3270 --libs`" />
... ... @@ -44,11 +44,12 @@
44 44 <Unit filename="colors.c">
45 45 <Option compilerVar="CC" />
46 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 50 <Option compilerVar="CC" />
50 51 </Unit>
51   - <Unit filename="common/sources.mak" />
  52 + <Unit filename="common\sources.mak" />
52 53 <Unit filename="dialog.c">
53 54 <Option compilerVar="CC" />
54 55 </Unit>
... ... @@ -65,74 +66,74 @@
65 66 <Unit filename="print.c">
66 67 <Option compilerVar="CC" />
67 68 </Unit>
68   - <Unit filename="uiparser/accelerator.c">
  69 + <Unit filename="uiparser\accelerator.c">
69 70 <Option compilerVar="CC" />
70 71 </Unit>
71   - <Unit filename="uiparser/action.c">
  72 + <Unit filename="uiparser\action.c">
72 73 <Option compilerVar="CC" />
73 74 </Unit>
74   - <Unit filename="uiparser/menu.c">
  75 + <Unit filename="uiparser\menu.c">
75 76 <Option compilerVar="CC" />
76 77 </Unit>
77   - <Unit filename="uiparser/menubar.c">
  78 + <Unit filename="uiparser\menubar.c">
78 79 <Option compilerVar="CC" />
79 80 </Unit>
80   - <Unit filename="uiparser/menuitem.c">
  81 + <Unit filename="uiparser\menuitem.c">
81 82 <Option compilerVar="CC" />
82 83 </Unit>
83   - <Unit filename="uiparser/parsefile.c">
  84 + <Unit filename="uiparser\parsefile.c">
84 85 <Option compilerVar="CC" />
85 86 </Unit>
86   - <Unit filename="uiparser/parser.c">
  87 + <Unit filename="uiparser\parser.c">
87 88 <Option compilerVar="CC" />
88 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 92 <Option compilerVar="CC" />
92 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 96 <Option compilerVar="CC" />
96 97 </Unit>
97   - <Unit filename="uiparser/separator.c">
  98 + <Unit filename="uiparser\separator.c">
98 99 <Option compilerVar="CC" />
99 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 103 <Option compilerVar="CC" />
103 104 </Unit>
104   - <Unit filename="uiparser/toolitem.c">
  105 + <Unit filename="uiparser\toolitem.c">
105 106 <Option compilerVar="CC" />
106 107 </Unit>
107   - <Unit filename="v3270/clipboard.c">
  108 + <Unit filename="v3270\clipboard.c">
108 109 <Option compilerVar="CC" />
109 110 </Unit>
110   - <Unit filename="v3270/draw.c">
  111 + <Unit filename="v3270\draw.c">
111 112 <Option compilerVar="CC" />
112 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 116 <Option compilerVar="CC" />
116 117 </Unit>
117   - <Unit filename="v3270/keyboard.c">
  118 + <Unit filename="v3270\keyboard.c">
118 119 <Option compilerVar="CC" />
119 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 123 <Option compilerVar="CC" />
123 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 127 <Option compilerVar="CC" />
127 128 </Unit>
128   - <Unit filename="v3270/oia.c">
  129 + <Unit filename="v3270\oia.c">
129 130 <Option compilerVar="CC" />
130 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 137 <Option compilerVar="CC" />
137 138 </Unit>
138 139 <Unit filename="valgrind.suppression" />
... ...