Mercurial > geeqie.yaz
changeset 603:e8b28413ffbf
Replace deprecated functions by their counterparts:
g_strcasecmp() -> g_ascii_strcasecmp()
g_strncasecmp() -> g_ascii_strncasecmp()
gtk_input_remove() -> g_source_remove()
g_io_channel_close() -> g_io_channel_shutdown() + g_io_channel_unref()
All these are deprecated either since 2.2 or 2.4.
author | zas_ |
---|---|
date | Wed, 07 May 2008 23:27:26 +0000 |
parents | 02831fd2771b |
children | 0b203af63dbf |
files | src/lirc.c |
diffstat | 1 files changed, 21 insertions(+), 20 deletions(-) [+] |
line wrap: on
line diff
--- a/src/lirc.c Wed May 07 22:54:33 2008 +0000 +++ b/src/lirc.c Wed May 07 23:27:26 2008 +0000 @@ -20,7 +20,7 @@ { if (config) { - gtk_input_remove(input_tag); + g_source_remove(input_tag); lirc_freeconfig(config); config = NULL; } @@ -31,7 +31,8 @@ } if (gio_chan) { - g_io_channel_close(gio_chan); + g_io_channel_shutdown(gio_chan, TRUE, NULL); + g_io_channel_unref(gio_chan); } } @@ -56,7 +57,7 @@ { while ((ret = lirc_code2char(config, code, &cmd)) == 0 && cmd) { - if (g_strncasecmp("LEFT", cmd, 4) == 0) + if (g_ascii_strncasecmp("LEFT", cmd, 4) == 0) { ptr = cmd + 4; while (g_ascii_isspace(*ptr)) ptr++; @@ -65,7 +66,7 @@ if (i_parm <= 0) i_parm = 1; x -= i_parm; } - else if (g_strncasecmp("RIGHT", cmd, 5) == 0) + else if (g_ascii_strncasecmp("RIGHT", cmd, 5) == 0) { ptr = cmd + 5; while (g_ascii_isspace(*ptr)) ptr++; @@ -74,7 +75,7 @@ if (i_parm <= 0) i_parm = 1; x += i_parm; } - else if (g_strncasecmp("UP", cmd, 2) == 0) + else if (g_ascii_strncasecmp("UP", cmd, 2) == 0) { ptr = cmd + 2; while (g_ascii_isspace(*ptr)) ptr++; @@ -83,7 +84,7 @@ if (i_parm <= 0) i_parm = 1; y -= i_parm; } - else if (g_strncasecmp("DOWN", cmd, 4) == 0) + else if (g_ascii_strncasecmp("DOWN", cmd, 4) == 0) { ptr = cmd + 4; while (g_ascii_isspace(*ptr)) ptr++; @@ -92,15 +93,15 @@ if (i_parm <= 0) i_parm = 1; y += i_parm; } - else if (g_strcasecmp("PREV", cmd) == 0) + else if (g_ascii_strcasecmp("PREV", cmd) == 0) { layout_image_prev(lw); } - else if (g_strcasecmp("NEXT", cmd) == 0) + else if (g_ascii_strcasecmp("NEXT", cmd) == 0) { layout_image_next(lw); } - else if (g_strncasecmp("ZOOM_IN", cmd, 7) == 0) + else if (g_ascii_strncasecmp("ZOOM_IN", cmd, 7) == 0) { ptr = cmd + 7; while (g_ascii_isspace(*ptr)) ptr++; @@ -109,7 +110,7 @@ if (fl_parm <= 0.01) fl_parm = get_zoom_increment(); layout_image_zoom_adjust(lw, fl_parm); } - else if (g_strncasecmp("ZOOM_OUT", cmd, 8) == 0) + else if (g_ascii_strncasecmp("ZOOM_OUT", cmd, 8) == 0) { ptr = cmd + 8; while (g_ascii_isspace(*ptr)) ptr++; @@ -118,11 +119,11 @@ if (fl_parm <= 0.01) fl_parm = get_zoom_increment(); layout_image_zoom_adjust(lw, -fl_parm); } - else if (g_strcasecmp("ZOOM_MAX", cmd) == 0) + else if (g_ascii_strcasecmp("ZOOM_MAX", cmd) == 0) { layout_image_zoom_set(lw, 0.0); } - else if (g_strncasecmp("SET_ZOOM", cmd, 8) == 0) + else if (g_ascii_strncasecmp("SET_ZOOM", cmd, 8) == 0) { ptr = cmd + 8; while (g_ascii_isspace(*ptr)) ptr++; @@ -131,7 +132,7 @@ if (i_parm <= 0) i_parm = 1; layout_image_zoom_set(lw, 1.0); } - else if (g_strncasecmp("SET_INV_ZOOM", cmd, 12) == 0) + else if (g_ascii_strncasecmp("SET_INV_ZOOM", cmd, 12) == 0) { ptr = cmd + 12; while (g_ascii_isspace(*ptr)) ptr++; @@ -140,31 +141,31 @@ if (i_parm <= 0) i_parm = 1; layout_image_zoom_set(lw, -i_parm); } - else if (g_strcasecmp("FIRST", cmd) == 0) + else if (g_ascii_strcasecmp("FIRST", cmd) == 0) { layout_image_first(lw); } - else if (g_strcasecmp("LAST", cmd) == 0) + else if (g_ascii_strcasecmp("LAST", cmd) == 0) { layout_image_last(lw); } - else if (g_strcasecmp("PAUSE", cmd) == 0) + else if (g_ascii_strcasecmp("PAUSE", cmd) == 0) { layout_image_slideshow_pause_toggle(lw); } - else if (g_strcasecmp("ROTATE_90", cmd) == 0) + else if (g_ascii_strcasecmp("ROTATE_90", cmd) == 0) { layout_image_alter(lw, ALTER_ROTATE_90); } - else if (g_strcasecmp("ROTATE_90_CC", cmd) == 0) + else if (g_ascii_strcasecmp("ROTATE_90_CC", cmd) == 0) { layout_image_alter(lw, ALTER_ROTATE_90_CC); } - else if (g_strcasecmp("INFO", cmd) == 0) + else if (g_ascii_strcasecmp("INFO", cmd) == 0) { layout_image_overlay_toggle(lw); } - else if (g_strcasecmp("EXIT", cmd) == 0) + else if (g_ascii_strcasecmp("EXIT", cmd) == 0) { exit_program(); }