# HG changeset patch # User Elliott Sales de Andrade # Date 1239081768 0 # Node ID 0c796a1950b7c0f3ea1bf144482313a56a1faf6c # Parent fb44acfae44144284e0ca41932ad3e1d8ac2e6c6 Updates for GTK+ 3.0. Remove some deprecated functions (someone should check those strcasecmp's for me!). Fix all #include for GLib, GTK+, etc. in libpurple and finch. Now, libpurple and finch should compile with: -DG_DISABLE_DEPRECATED -DG_DISABLE_SINGLE_INCLUDES -DGDK_DISABLE_DEPRECATED -DGTK_DISABLE_DEPRECATED -DGDK_DISABLE_SINGLE_INCLUDES -DGTK_DISABLE_SINGLE_INCLUDES diff -r fb44acfae441 -r 0c796a1950b7 libpurple/ft.c --- a/libpurple/ft.c Mon Apr 06 23:05:02 2009 +0000 +++ b/libpurple/ft.c Tue Apr 07 05:22:48 2009 +0000 @@ -458,7 +458,7 @@ { PurpleXferType type; struct stat st; - char *msg, *utf8; + char *msg, *utf8, *base; PurpleAccount *account; PurpleBuddy *buddy; @@ -505,7 +505,9 @@ purple_xfer_set_local_filename(xfer, filename); purple_xfer_set_size(xfer, st.st_size); - utf8 = g_filename_to_utf8(g_basename(filename), -1, NULL, NULL, NULL); + base = g_path_get_basename(filename); + utf8 = g_filename_to_utf8(base, -1, NULL, NULL, NULL); + g_free(base); purple_xfer_set_filename(xfer, utf8); msg = g_strdup_printf(_("Offering to send %s to %s"), diff -r fb44acfae441 -r 0c796a1950b7 libpurple/internal.h --- a/libpurple/internal.h Mon Apr 06 23:05:02 2009 +0000 +++ b/libpurple/internal.h Tue Apr 07 05:22:48 2009 +0000 @@ -222,7 +222,6 @@ # endif #endif -#include #include #ifndef G_DEFINE_TYPE diff -r fb44acfae441 -r 0c796a1950b7 libpurple/mime.c --- a/libpurple/mime.c Mon Apr 06 23:05:02 2009 +0000 +++ b/libpurple/mime.c Tue Apr 07 05:22:48 2009 +0000 @@ -25,9 +25,6 @@ #include #include -#include -#include -#include #include "internal.h" diff -r fb44acfae441 -r 0c796a1950b7 libpurple/mime.h --- a/libpurple/mime.h Mon Apr 06 23:05:02 2009 +0000 +++ b/libpurple/mime.h Tue Apr 07 05:22:48 2009 +0000 @@ -25,7 +25,6 @@ #define _PURPLE_MIME_H #include -#include #ifdef __cplusplus extern "C" { diff -r fb44acfae441 -r 0c796a1950b7 libpurple/plugin.h --- a/libpurple/plugin.h Mon Apr 06 23:05:02 2009 +0000 +++ b/libpurple/plugin.h Tue Apr 07 05:22:48 2009 +0000 @@ -29,7 +29,7 @@ #ifndef _PURPLE_PLUGIN_H_ #define _PURPLE_PLUGIN_H_ -#include +#include #include #include "signals.h" #include "value.h" diff -r fb44acfae441 -r 0c796a1950b7 libpurple/protocols/msn/session.c --- a/libpurple/protocols/msn/session.c Mon Apr 06 23:05:02 2009 +0000 +++ b/libpurple/protocols/msn/session.c Tue Apr 07 05:22:48 2009 +0000 @@ -303,7 +303,7 @@ for (l = remote_user->group_ids; l != NULL; l = l->next) { const char *name = msn_userlist_find_group_name(remote_user->userlist, l->data); - if (name && !g_strcasecmp(group_name, name)) + if (name && !g_ascii_strcasecmp(group_name, name)) { found = TRUE; break; diff -r fb44acfae441 -r 0c796a1950b7 libpurple/protocols/msn/slplink.c --- a/libpurple/protocols/msn/slplink.c Mon Apr 06 23:05:02 2009 +0000 +++ b/libpurple/protocols/msn/slplink.c Tue Apr 07 05:22:48 2009 +0000 @@ -46,7 +46,7 @@ pload = msn_message_gen_payload(msg, &pload_size); if (!purple_util_write_data_to_file_absolute(tmp, pload, pload_size)) { - purple_debug_error("msn", "could not save debug file"); + purple_debug_error("msn", "could not save debug file\n"); } g_free(tmp); } @@ -682,7 +682,9 @@ size = st.st_size; if(!file_name) { - u8 = purple_utf8_try_convert(g_basename(file_path)); + base = g_path_get_basename(file_path); + u8 = purple_utf8_try_convert(base); + g_free(base); file_name = u8; } diff -r fb44acfae441 -r 0c796a1950b7 libpurple/protocols/msn/userlist.c --- a/libpurple/protocols/msn/userlist.c Mon Apr 06 23:05:02 2009 +0000 +++ b/libpurple/protocols/msn/userlist.c Tue Apr 07 05:22:48 2009 +0000 @@ -448,7 +448,7 @@ g_return_val_if_fail(user->passport != NULL, NULL); - if (!g_strcasecmp(passport, user->passport)){ + if (!g_ascii_strcasecmp(passport, user->passport)){ return user; } } @@ -470,7 +470,7 @@ continue; } - if ( !g_strcasecmp(uid, user->uid) ) { + if ( !g_ascii_strcasecmp(uid, user->uid) ) { return user; } } @@ -492,7 +492,7 @@ continue; } - if (!g_strcasecmp(number, user->phone.mobile)) { + if (!g_ascii_strcasecmp(number, user->phone.mobile)) { return user; } } @@ -524,7 +524,7 @@ { MsnGroup *group = l->data; - if (!g_strcasecmp(group->id,id)) + if (!g_ascii_strcasecmp(group->id,id)) return group; } @@ -543,7 +543,7 @@ { MsnGroup *group = l->data; - if ((group->name != NULL) && !g_strcasecmp(name, group->name)) + if ((group->name != NULL) && !g_ascii_strcasecmp(name, group->name)) return group; } @@ -784,7 +784,7 @@ { user = (MsnUser *)l->data; - if (!g_strcasecmp(who, user->passport)) { + if (!g_ascii_strcasecmp(who, user->passport)) { userlist->pending = g_list_delete_link(userlist->pending, l); break; } diff -r fb44acfae441 -r 0c796a1950b7 libpurple/protocols/sametime/sametime.c --- a/libpurple/protocols/sametime/sametime.c Mon Apr 06 23:05:02 2009 +0000 +++ b/libpurple/protocols/sametime/sametime.c Tue Apr 07 05:22:48 2009 +0000 @@ -28,8 +28,6 @@ /* glib includes */ #include -#include -#include /* purple includes */ #include "internal.h" diff -r fb44acfae441 -r 0c796a1950b7 libpurple/protocols/zephyr/ZVariables.c --- a/libpurple/protocols/zephyr/ZVariables.c Mon Apr 06 23:05:02 2009 +0000 +++ b/libpurple/protocols/zephyr/ZVariables.c Tue Apr 07 05:22:48 2009 +0000 @@ -186,7 +186,7 @@ #define max(a,b) ((a > b) ? (a) : (b)) #endif - if (g_strncasecmp(bfr, var, max(strlen(var), cp - bfr))) + if (g_ascii_strncasecmp(bfr, var, max(strlen(var), cp - bfr))) return(0); /* var is not the var in bfr ==> no match */ diff -r fb44acfae441 -r 0c796a1950b7 libpurple/protocols/zephyr/zephyr.c --- a/libpurple/protocols/zephyr/zephyr.c Mon Apr 06 23:05:02 2009 +0000 +++ b/libpurple/protocols/zephyr/zephyr.c Tue Apr 07 05:22:48 2009 +0000 @@ -960,7 +960,7 @@ tc = tree_child(ptree,0)->contents; /* g_strcasecmp() is deprecated. What is the encoding here??? */ - if (ptree->num_children > 0 && tc && !g_strcasecmp(tc, key)) { + if (ptree->num_children > 0 && tc && !g_ascii_strcasecmp(tc, key)) { return ptree; } else { parse_tree *result = &null_parse_tree;