pidgin: 158fcfd2: Updates for GTK+ 3.0. Remove some deprec...
qulogic at pidgin.im
qulogic at pidgin.im
Tue Apr 7 01:30:44 EDT 2009
-----------------------------------------------------------------
Revision: 158fcfd23559f1fde4f5c77cc3a498e0464a4f03
Ancestor: eed0598058a6e7cc5da7ad99f06bfe136291d2f9
Author: qulogic at pidgin.im
Date: 2009-04-07T05:22:48
Branch: im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/158fcfd23559f1fde4f5c77cc3a498e0464a4f03
Modified 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
ChangeLog:
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
-------------- next part --------------
============================================================
--- libpurple/ft.c 579a141bfbbbbe1c75e5e423254cbfc8c9256af2
+++ libpurple/ft.c 001b040033429f66b53efdd5906b414ff1d4a5ce
@@ -458,7 +458,7 @@ purple_xfer_request_accepted(PurpleXfer
{
PurpleXferType type;
struct stat st;
- char *msg, *utf8;
+ char *msg, *utf8, *base;
PurpleAccount *account;
PurpleBuddy *buddy;
@@ -505,7 +505,9 @@ purple_xfer_request_accepted(PurpleXfer
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"),
============================================================
--- libpurple/internal.h c8d0ce3d62f130b0ff77f864146bbd4fbeab87fc
+++ libpurple/internal.h dbc124585e288c7bdf107fd6594bc5518cda0ee7
@@ -222,7 +222,6 @@
# endif
#endif
-#include <glib.h>
#include <glib-object.h>
#ifndef G_DEFINE_TYPE
============================================================
--- libpurple/mime.c 80943e7f831871a988feadb329f9652308788031
+++ libpurple/mime.c 8d0a515bc926c32234e418ab6289cd30b28f0b5b
@@ -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"
============================================================
--- libpurple/mime.h bdccdb17d1f5bc32195b37b7c5e4d203891aa7b8
+++ libpurple/mime.h f7adbecabf2a66395089be104c1ea7ff359d7e62
@@ -25,7 +25,6 @@
#define _PURPLE_MIME_H
#include <glib.h>
-#include <glib/glist.h>
#ifdef __cplusplus
extern "C" {
============================================================
--- libpurple/plugin.h abe6776b11baef3476fa2115adc0dbdb2087be89
+++ libpurple/plugin.h f9e7eccca6f213e16c7404308fd7d65de075d1af
@@ -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"
============================================================
--- libpurple/protocols/msn/session.c 2546305466dd5615cb67d0fbb75888636ca806e8
+++ libpurple/protocols/msn/session.c c4da27773fb9a470b8b86f801bb6f4572c5b80b2
@@ -303,7 +303,7 @@ msn_session_sync_users(MsnSession *sessi
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;
============================================================
--- libpurple/protocols/msn/slplink.c f6e6ce8f90df7fe17c0c37810e37497a9372a212
+++ libpurple/protocols/msn/slplink.c 3cd565e1ba25d733b996f028939c882f9b98f868
@@ -46,7 +46,7 @@ debug_msg_to_file(MsnMessage *msg, gbool
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 @@ gen_context(const char *file_name, const
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;
}
============================================================
--- libpurple/protocols/msn/userlist.c bb7b959dea22fab413c089d174cf47c8612961c7
+++ libpurple/protocols/msn/userlist.c bdf59cfeec2a62bd1b87a6579ce0d565aa2c826a
@@ -448,7 +448,7 @@ msn_userlist_find_user(MsnUserList *user
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 @@ msn_userlist_find_user_with_id(MsnUserLi
continue;
}
- if ( !g_strcasecmp(uid, user->uid) ) {
+ if ( !g_ascii_strcasecmp(uid, user->uid) ) {
return user;
}
}
@@ -492,7 +492,7 @@ msn_userlist_find_user_with_mobile_phone
continue;
}
- if (!g_strcasecmp(number, user->phone.mobile)) {
+ if (!g_ascii_strcasecmp(number, user->phone.mobile)) {
return user;
}
}
@@ -524,7 +524,7 @@ msn_userlist_find_group_with_id(MsnUserL
{
MsnGroup *group = l->data;
- if (!g_strcasecmp(group->id,id))
+ if (!g_ascii_strcasecmp(group->id,id))
return group;
}
@@ -543,7 +543,7 @@ msn_userlist_find_group_with_name(MsnUse
{
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 @@ msn_userlist_add_pending_buddy(MsnSessio
{
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;
}
============================================================
--- libpurple/protocols/sametime/sametime.c 8db124f2b1d4d7219a0768f192e7802276f4dbae
+++ libpurple/protocols/sametime/sametime.c 9f68a7c9642ad3fa15db782d9c9fab24b9dcdb71
@@ -28,8 +28,6 @@
/* glib includes */
#include <glib.h>
-#include <glib/ghash.h>
-#include <glib/glist.h>
/* purple includes */
#include "internal.h"
============================================================
--- libpurple/protocols/zephyr/ZVariables.c e6d9050766b75dc4ae3990a81e10a2fc4d974f23
+++ libpurple/protocols/zephyr/ZVariables.c 08e254332a5b1b2784e88865a526252e7e83a40e
@@ -186,7 +186,7 @@ static int varline(bfr, var)
#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 */
============================================================
--- libpurple/protocols/zephyr/zephyr.c c0bfd93759436dee7022d1cc93d5517eaf5e932e
+++ libpurple/protocols/zephyr/zephyr.c 42e03c39d34ee66dc0b2f9c072b0fac1e4e94130
@@ -960,7 +960,7 @@ static parse_tree *find_node(parse_tree*
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;
More information about the Commits
mailing list