Commit 496f55eea6aa46e5d0a537c8e334575645bacdb1
1 parent
2ed158e6
Exists in
master
and in
1 other branch
Removendo warnings
Showing
4 changed files
with
16 additions
and
7 deletions
Show diff stats
accessible.c
@@ -42,6 +42,10 @@ | @@ -42,6 +42,10 @@ | ||
42 | #include "private.h" | 42 | #include "private.h" |
43 | #include "accessible.h" | 43 | #include "accessible.h" |
44 | 44 | ||
45 | + #ifdef GDK_WINDOWING_X11 | ||
46 | + #include <gdk/gdkx.h> | ||
47 | + #endif // GDK_WINDOWING_X11 | ||
48 | + | ||
45 | // References: | 49 | // References: |
46 | // | 50 | // |
47 | // http://git.gnome.org/browse/gtk+/tree/gtk/a11y/gtkwidgetaccessible.c | 51 | // http://git.gnome.org/browse/gtk+/tree/gtk/a11y/gtkwidgetaccessible.c |
@@ -226,7 +230,7 @@ static gint v3270_accessible_get_caret_offset(AtkText *text) | @@ -226,7 +230,7 @@ static gint v3270_accessible_get_caret_offset(AtkText *text) | ||
226 | 230 | ||
227 | static gint v3270_accessible_get_character_count(AtkText *text) | 231 | static gint v3270_accessible_get_character_count(AtkText *text) |
228 | { | 232 | { |
229 | - int rows,cols; | 233 | +// int rows,cols; |
230 | GtkWidget *widget = gtk_accessible_get_widget(GTK_ACCESSIBLE(text)); | 234 | GtkWidget *widget = gtk_accessible_get_widget(GTK_ACCESSIBLE(text)); |
231 | 235 | ||
232 | if(!widget) | 236 | if(!widget) |
@@ -328,7 +332,7 @@ static gchar * v3270_accessible_get_text_at_offset(AtkText *atk_text, gint offse | @@ -328,7 +332,7 @@ static gchar * v3270_accessible_get_text_at_offset(AtkText *atk_text, gint offse | ||
328 | { | 332 | { |
329 | GtkWidget * widget = gtk_accessible_get_widget(GTK_ACCESSIBLE (atk_text)); | 333 | GtkWidget * widget = gtk_accessible_get_widget(GTK_ACCESSIBLE (atk_text)); |
330 | H3270 * host; | 334 | H3270 * host; |
331 | - char * text; | 335 | + char * text = NULL; |
332 | int rows,cols,pos; | 336 | int rows,cols,pos; |
333 | 337 | ||
334 | if(!widget) | 338 | if(!widget) |
@@ -520,7 +524,7 @@ static gboolean v3270_accessible_add_selection(AtkText *text, gint start_pos, gi | @@ -520,7 +524,7 @@ static gboolean v3270_accessible_add_selection(AtkText *text, gint start_pos, gi | ||
520 | static gboolean v3270_accessible_set_selection(AtkText *text, gint selection_num, gint start_pos, gint end_pos) | 524 | static gboolean v3270_accessible_set_selection(AtkText *text, gint selection_num, gint start_pos, gint end_pos) |
521 | { | 525 | { |
522 | GtkWidget *widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (text)); | 526 | GtkWidget *widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (text)); |
523 | - gint start, end; | 527 | +// gint start, end; |
524 | 528 | ||
525 | if(widget == NULL || selection_num != 0) | 529 | if(widget == NULL || selection_num != 0) |
526 | return FALSE; | 530 | return FALSE; |
@@ -846,6 +850,7 @@ void v3270_acessible_set_state(GtkAccessible *obj, LIB3270_MESSAGE id) | @@ -846,6 +850,7 @@ void v3270_acessible_set_state(GtkAccessible *obj, LIB3270_MESSAGE id) | ||
846 | case LIB3270_MESSAGE_MINUS: | 850 | case LIB3270_MESSAGE_MINUS: |
847 | case LIB3270_MESSAGE_INHIBIT: | 851 | case LIB3270_MESSAGE_INHIBIT: |
848 | case LIB3270_MESSAGE_X: | 852 | case LIB3270_MESSAGE_X: |
853 | + case LIB3270_MESSAGE_USER: | ||
849 | break; | 854 | break; |
850 | 855 | ||
851 | case LIB3270_MESSAGE_PROTECTED: | 856 | case LIB3270_MESSAGE_PROTECTED: |
@@ -41,6 +41,7 @@ | @@ -41,6 +41,7 @@ | ||
41 | 41 | ||
42 | #include <lib3270/v3270.h> | 42 | #include <lib3270/v3270.h> |
43 | #include "private.h" | 43 | #include "private.h" |
44 | + #include "accessible.h" | ||
44 | 45 | ||
45 | /*--[ Prototipes ]-----------------------------------------------------------------------------------*/ | 46 | /*--[ Prototipes ]-----------------------------------------------------------------------------------*/ |
46 | 47 | ||
@@ -307,7 +308,7 @@ void v3270_draw_ssl_status(cairo_t *cr, H3270 *host, struct v3270_metrics *metri | @@ -307,7 +308,7 @@ void v3270_draw_ssl_status(cairo_t *cr, H3270 *host, struct v3270_metrics *metri | ||
307 | { | 308 | { |
308 | cairo_surface_t * icon; | 309 | cairo_surface_t * icon; |
309 | double sz = rect->width < rect->height ? rect->width : rect->height; | 310 | double sz = rect->width < rect->height ? rect->width : rect->height; |
310 | - int idx = 0; // lib3270_get_ssl_state(host) ? 1 : 0; | 311 | +// int idx = 0; // lib3270_get_ssl_state(host) ? 1 : 0; |
311 | unsigned short width; | 312 | unsigned short width; |
312 | unsigned short height; | 313 | unsigned short height; |
313 | unsigned char * bits; | 314 | unsigned char * bits; |
selection.c
@@ -33,6 +33,7 @@ | @@ -33,6 +33,7 @@ | ||
33 | #include "private.h" | 33 | #include "private.h" |
34 | #include <lib3270/selection.h> | 34 | #include <lib3270/selection.h> |
35 | #include <lib3270/log.h> | 35 | #include <lib3270/log.h> |
36 | + #include <lib3270/actions.h> | ||
36 | 37 | ||
37 | /*--[ Globals ]--------------------------------------------------------------------------------------*/ | 38 | /*--[ Globals ]--------------------------------------------------------------------------------------*/ |
38 | 39 | ||
@@ -155,7 +156,7 @@ const gchar * v3270_get_selected_text(GtkWidget *widget) | @@ -155,7 +156,7 @@ const gchar * v3270_get_selected_text(GtkWidget *widget) | ||
155 | { | 156 | { |
156 | int c; | 157 | int c; |
157 | gchar * ptr = ln[l]; | 158 | gchar * ptr = ln[l]; |
158 | - GString * buffer; | 159 | +// GString * buffer; |
159 | 160 | ||
160 | for(c=0;c<width && *ptr;c++) | 161 | for(c=0;c<width && *ptr;c++) |
161 | { | 162 | { |
@@ -310,7 +311,7 @@ void v3270_paste_string(GtkWidget *widget, const gchar *text, const gchar *encod | @@ -310,7 +311,7 @@ void v3270_paste_string(GtkWidget *widget, const gchar *text, const gchar *encod | ||
310 | 311 | ||
311 | if(!text) | 312 | if(!text) |
312 | return; | 313 | return; |
313 | - else if(g_strcasecmp(encoding,charset)) | 314 | + else if(g_ascii_strcasecmp(encoding,charset)) |
314 | buffer = g_convert(text, -1, charset, encoding, NULL, NULL, NULL); | 315 | buffer = g_convert(text, -1, charset, encoding, NULL, NULL, NULL); |
315 | else | 316 | else |
316 | buffer = g_strdup(text); | 317 | buffer = g_strdup(text); |
widget.c
@@ -163,6 +163,7 @@ static gboolean v3270_popup_menu(GtkWidget * widget) | @@ -163,6 +163,7 @@ static gboolean v3270_popup_menu(GtkWidget * widget) | ||
163 | 163 | ||
164 | #if GTK_CHECK_VERSION(3,0,0) | 164 | #if GTK_CHECK_VERSION(3,0,0) |
165 | 165 | ||
166 | +/* | ||
166 | static GtkSizeRequestMode get_request_mode(GtkWidget *widget) | 167 | static GtkSizeRequestMode get_request_mode(GtkWidget *widget) |
167 | { | 168 | { |
168 | int rows, cols; | 169 | int rows, cols; |
@@ -172,6 +173,7 @@ static GtkSizeRequestMode get_request_mode(GtkWidget *widget) | @@ -172,6 +173,7 @@ static GtkSizeRequestMode get_request_mode(GtkWidget *widget) | ||
172 | return rows > cols ? GTK_SIZE_REQUEST_WIDTH_FOR_HEIGHT : GTK_SIZE_REQUEST_HEIGHT_FOR_WIDTH; | 173 | return rows > cols ? GTK_SIZE_REQUEST_WIDTH_FOR_HEIGHT : GTK_SIZE_REQUEST_HEIGHT_FOR_WIDTH; |
173 | 174 | ||
174 | } | 175 | } |
176 | +*/ | ||
175 | 177 | ||
176 | void get_preferred_height(GtkWidget *widget, gint *minimum_height, gint *natural_height) | 178 | void get_preferred_height(GtkWidget *widget, gint *minimum_height, gint *natural_height) |
177 | { | 179 | { |
@@ -1239,7 +1241,7 @@ void v3270_set_font_family(GtkWidget *widget, const gchar *name) | @@ -1239,7 +1241,7 @@ void v3270_set_font_family(GtkWidget *widget, const gchar *name) | ||
1239 | 1241 | ||
1240 | if(terminal->font_family) | 1242 | if(terminal->font_family) |
1241 | { | 1243 | { |
1242 | - if(!g_strcasecmp(terminal->font_family,name)) | 1244 | + if(!g_ascii_strcasecmp(terminal->font_family,name)) |
1243 | return; | 1245 | return; |
1244 | g_free(terminal->font_family); | 1246 | g_free(terminal->font_family); |
1245 | terminal->font_family = NULL; | 1247 | terminal->font_family = NULL; |