changeset 26505:0c796a1950b7

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
author Elliott Sales de Andrade <qulogic@pidgin.im>
date Tue, 07 Apr 2009 05:22:48 +0000
parents fb44acfae441
children 1a94a964bddf
files libpurple/ft.c libpurple/internal.h libpurple/mime.c libpurple/mime.h libpurple/plugin.h libpurple/protocols/msn/session.c libpurple/protocols/msn/slplink.c libpurple/protocols/msn/userlist.c libpurple/protocols/sametime/sametime.c libpurple/protocols/zephyr/ZVariables.c libpurple/protocols/zephyr/zephyr.c
diffstat 11 files changed, 18 insertions(+), 21 deletions(-) [+]
line wrap: on
line diff
--- 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"),
--- 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 <glib.h>
 #include <glib-object.h>
 
 #ifndef G_DEFINE_TYPE
--- 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 <string.h>
 
 #include <glib.h>
-#include <glib/ghash.h>
-#include <glib/glist.h>
-#include <glib/gstring.h>
 
 #include "internal.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 <glib.h>
-#include <glib/glist.h>
 
 #ifdef __cplusplus
 extern "C" {
--- 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 <glib/glist.h>
+#include <glib.h>
 #include <gmodule.h>
 #include "signals.h"
 #include "value.h"
--- 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;
--- 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;
 	}
 
--- 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;
 		}
--- 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 <glib.h>
-#include <glib/ghash.h>
-#include <glib/glist.h>
 
 /* purple includes */
 #include "internal.h"
--- 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 */
 
--- 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;