Update of /cvsroot/gaim/gaim/src
In directory sc8-pr-cvs1:/tmp/cvs-serv12907/src
Modified Files:
account.c blist.c connection.c dialogs.c gtkaccount.c
gtkblist.c gtkconv.c gtkutils.c gtkutils.h log.c main.c
plugin.c prpl.c prpl.h server.c themes.c ui.h util.c
Log Message:
This is the death of protocol numbers. There are probably now a few
functions that should now go away, but i'll let our crack team of crazy
patch writers figure out which ones they are.
out-of-tree and unofficial prpl-writers, rejoice!
Index: account.c
===================================================================
RCS file: /cvsroot/gaim/gaim/src/account.c,v
retrieving revision 1.74
retrieving revision 1.75
diff -u -d -p -r1.74 -r1.75
--- account.c 5 Dec 2003 04:03:31 -0000 1.74
+++ account.c 29 Dec 2003 09:03:43 -0000 1.75
@@ -137,10 +137,7 @@ gaim_account_new(const char *username, c
gaim_account_set_username(account, username);
- if(protocol_id)
- gaim_account_set_protocol_id(account, protocol_id);
- else
- gaim_account_set_protocol(account, GAIM_PROTO_DEFAULT);
+ gaim_account_set_protocol_id(account, protocol_id ? protocol_id : GAIM_PROTO_DEFAULT);
account->settings = g_hash_table_new_full(g_str_hash, g_str_equal,
g_free, delete_setting);
Index: blist.c
===================================================================
RCS file: /cvsroot/gaim/gaim/src/blist.c,v
retrieving revision 1.122
retrieving revision 1.123
diff -u -d -p -r1.122 -r1.123
--- blist.c 29 Dec 2003 06:13:36 -0000 1.122
+++ blist.c 29 Dec 2003 09:03:43 -0000 1.123
@@ -500,7 +500,7 @@ char *gaim_chat_get_display_name(GaimCha
GaimPluginProtocolInfo *prpl_info;
struct proto_chat_entry *pce;
- prpl = gaim_find_prpl(gaim_account_get_protocol(chat->account));
+ prpl = gaim_find_prpl(gaim_account_get_protocol_id(chat->account));
prpl_info = GAIM_PLUGIN_PROTOCOL_INFO(prpl);
parts = prpl_info->chat_info(chat->account->gc);
@@ -1349,7 +1349,7 @@ gaim_blist_find_chat(GaimAccount *accoun
chat = (GaimChat*)node;
- prpl = gaim_find_prpl(gaim_account_get_protocol(chat->account));
+ prpl = gaim_find_prpl(gaim_account_get_protocol_id(chat->account));
prpl_info = GAIM_PLUGIN_PROTOCOL_INFO(prpl);
parts = prpl_info->chat_info(
Index: connection.c
===================================================================
RCS file: /cvsroot/gaim/gaim/src/connection.c,v
retrieving revision 1.52
retrieving revision 1.53
diff -u -d -p -r1.52 -r1.53
--- connection.c 5 Nov 2003 06:15:49 -0000 1.52
+++ connection.c 29 Dec 2003 09:03:43 -0000 1.53
@@ -48,7 +48,7 @@ gaim_connection_new(GaimAccount *account
gc = g_new0(GaimConnection, 1);
- gc->prpl = gaim_find_prpl(gaim_account_get_protocol(account));
+ gc->prpl = gaim_find_prpl(gaim_account_get_protocol_id(account));
gaim_connection_set_account(gc, account);
gaim_account_set_connection(account, gc);
Index: dialogs.c
===================================================================
RCS file: /cvsroot/gaim/gaim/src/dialogs.c,v
retrieving revision 1.575
retrieving revision 1.576
diff -u -d -p -r1.575 -r1.576
--- dialogs.c 29 Dec 2003 05:14:15 -0000 1.575
+++ dialogs.c 29 Dec 2003 09:03:43 -0000 1.576
@@ -1339,13 +1339,12 @@ void insert_smiley_text(GtkWidget *widge
{
GaimGtkConversation *gtkconv;
char *smiley_text = g_object_get_data(G_OBJECT(widget), "smiley_text");
- GaimProtocol protocol = gaim_account_get_protocol(gaim_conversation_get_account(c));
- GaimPlugin *proto = gaim_find_prpl(protocol);
-
+ GaimPlugin *proto = gaim_find_prpl(gaim_account_get_protocol_id(gaim_conversation_get_account(c)));
+
gtkconv = GAIM_GTK_CONVERSATION(c);
-
+
gtk_imhtml_insert_smiley(GTK_IMHTML(gtkconv->entry), proto->info->name, smiley_text);
-
+
close_smiley_dialog(NULL, c);
}
@@ -1397,7 +1396,7 @@ void show_smiley_dialog(GaimConversation
if(c->account)
smileys = get_proto_smileys(
- gaim_account_get_protocol(gaim_conversation_get_account(c)));
+ gaim_account_get_protocol_id(gaim_conversation_get_account(c)));
else
smileys = get_proto_smileys(GAIM_PROTO_DEFAULT);
Index: gtkaccount.c
===================================================================
RCS file: /cvsroot/gaim/gaim/src/gtkaccount.c,v
retrieving revision 1.109
retrieving revision 1.110
diff -u -d -p -r1.109 -r1.110
--- gtkaccount.c 14 Dec 2003 11:03:54 -0000 1.109
+++ gtkaccount.c 29 Dec 2003 09:03:43 -0000 1.110
@@ -81,7 +81,6 @@ typedef struct
GaimGtkAccountDialogType type;
GaimAccount *account;
- GaimProtocol protocol;
char *protocol_id;
GaimPlugin *plugin;
GaimPluginProtocolInfo *prpl_info;
@@ -152,9 +151,9 @@ static void set_account(GtkListStore *st
GaimAccount *account);
static char *
-proto_name(int proto)
+proto_name(const char *id)
{
- GaimPlugin *p = gaim_find_prpl(proto);
+ GaimPlugin *p = gaim_find_prpl(id);
return ((p && p->info->name) ? _(p->info->name) : _("Unknown"));
}
@@ -192,12 +191,11 @@ add_pref_box(AccountPrefsDialog *dialog,
}
static void
-set_account_protocol_cb(GtkWidget *item, GaimProtocol protocol,
+set_account_protocol_cb(GtkWidget *item, const char *id,
AccountPrefsDialog *dialog)
{
- if ((dialog->plugin = gaim_find_prpl(protocol)) != NULL) {
+ if ((dialog->plugin = gaim_find_prpl(id)) != NULL) {
dialog->prpl_info = GAIM_PLUGIN_PROTOCOL_INFO(dialog->plugin);
- dialog->protocol = dialog->prpl_info->protocol;
if (dialog->protocol_id != NULL)
g_free(dialog->protocol_id);
@@ -381,7 +379,7 @@ add_login_options(AccountPrefsDialog *di
/* Protocol */
dialog->protocol_menu = gaim_gtk_protocol_option_menu_new(
- dialog->protocol, G_CALLBACK(set_account_protocol_cb), dialog);
+ dialog->protocol_id, G_CALLBACK(set_account_protocol_cb), dialog);
add_pref_box(dialog, vbox, _("Protocol:"), dialog->protocol_menu);
@@ -647,15 +645,13 @@ add_protocol_options(AccountPrefsDialog
switch (gaim_account_option_get_type(option)) {
case GAIM_PREF_BOOLEAN:
- if (account == NULL ||
- gaim_account_get_protocol(account) != dialog->protocol) {
-
+ if (account == NULL || !strcmp(gaim_account_get_protocol_id(account), dialog->protocol_id)) {
bool_value = gaim_account_option_get_default_bool(option);
- }
- else
+ } else {
bool_value = gaim_account_get_bool(account,
gaim_account_option_get_setting(option),
gaim_account_option_get_default_bool(option));
+ }
check = gtk_check_button_new_with_label(
gaim_account_option_get_text(option));
@@ -672,15 +668,13 @@ add_protocol_options(AccountPrefsDialog
break;
case GAIM_PREF_INT:
- if (account == NULL ||
- gaim_account_get_protocol(account) != dialog->protocol) {
-
+ if (account == NULL || !strcmp(gaim_account_get_protocol_id(account), dialog->protocol_id)) {
int_value = gaim_account_option_get_default_int(option);
- }
- else
+ } else {
int_value = gaim_account_get_int(account,
gaim_account_option_get_setting(option),
gaim_account_option_get_default_int(option));
+ }
g_snprintf(buf, sizeof(buf), "%d", int_value);
@@ -700,15 +694,13 @@ add_protocol_options(AccountPrefsDialog
break;
case GAIM_PREF_STRING:
- if (account == NULL ||
- gaim_account_get_protocol(account) != dialog->protocol) {
-
+ if (account == NULL || !strcmp(gaim_account_get_protocol_id(account), dialog->protocol_id)) {
str_value = gaim_account_option_get_default_string(option);
- }
- else
+ } else {
str_value = gaim_account_get_string(account,
gaim_account_option_get_setting(option),
gaim_account_option_get_default_string(option));
+ }
entry = gtk_entry_new();
@@ -1198,16 +1190,14 @@ gaim_gtk_account_dialog_show(GaimGtkAcco
dialog->sg = gtk_size_group_new(GTK_SIZE_GROUP_HORIZONTAL);
if (dialog->account == NULL) {
- dialog->protocol_id = g_strdup("prpl-oscar");
- dialog->protocol = GAIM_PROTO_OSCAR;
+ dialog->protocol_id = g_strdup(GAIM_PROTO_DEFAULT);
}
else {
dialog->protocol_id =
g_strdup(gaim_account_get_protocol_id(dialog->account));
- dialog->protocol = gaim_account_get_protocol(dialog->account);
}
- if ((dialog->plugin = gaim_find_prpl(dialog->protocol)) != NULL)
+ if ((dialog->plugin = gaim_find_prpl(dialog->protocol_id)) != NULL)
dialog->prpl_info = GAIM_PLUGIN_PROTOCOL_INFO(dialog->plugin);
@@ -1805,7 +1795,7 @@ set_account(GtkListStore *store, GtkTree
COLUMN_SCREENNAME, gaim_account_get_username(account),
COLUMN_ONLINE, gaim_account_is_connected(account),
COLUMN_AUTOLOGIN, gaim_account_get_auto_login(account, GAIM_GTK_UI),
- COLUMN_PROTOCOL, proto_name(gaim_account_get_protocol(account)),
+ COLUMN_PROTOCOL, proto_name(gaim_account_get_protocol_id(account)),
COLUMN_DATA, account,
-1);
Index: gtkblist.c
===================================================================
RCS file: /cvsroot/gaim/gaim/src/gtkblist.c,v
retrieving revision 1.61
retrieving revision 1.62
diff -u -d -p -r1.61 -r1.62
--- gtkblist.c 29 Dec 2003 06:13:36 -0000 1.61
+++ gtkblist.c 29 Dec 2003 09:03:43 -0000 1.62
@@ -964,7 +964,7 @@ static gboolean gtk_blist_button_press_c
b = (GaimBuddy *)node;
/* Protocol specific options */
- prpl = gaim_find_prpl(gaim_account_get_protocol(b->account));
+ prpl = gaim_find_prpl(gaim_account_get_protocol_id(b->account));
if (prpl != NULL)
prpl_info = GAIM_PLUGIN_PROTOCOL_INFO(prpl);
@@ -1022,7 +1022,7 @@ static gboolean gtk_blist_button_press_c
gtk_menu_item_set_submenu(GTK_MENU_ITEM(menuitem), submenu);
gtk_widget_show(submenu);
- prpl = gaim_find_prpl(gaim_account_get_protocol(buddy->account));
+ prpl = gaim_find_prpl(gaim_account_get_protocol_id(buddy->account));
prpl_info = prpl ? GAIM_PLUGIN_PROTOCOL_INFO(prpl) : NULL;
make_buddy_menu(submenu, prpl_info, buddy);
@@ -1744,7 +1744,7 @@ static char *gaim_get_tooltip_text(GaimB
GaimPlugin *prpl;
GaimPluginProtocolInfo *prpl_info = NULL;
char *text = NULL;
-
+
if(GAIM_BLIST_NODE_IS_CHAT(node)) {
GaimChat *chat = (GaimChat *)node;
char *name = NULL;
@@ -1752,7 +1752,7 @@ static char *gaim_get_tooltip_text(GaimB
GList *parts, *tmp;
GString *parts_text = g_string_new("");
- prpl = gaim_find_prpl(gaim_account_get_protocol(chat->account));
+ prpl = gaim_find_prpl(gaim_account_get_protocol_id(chat->account));
prpl_info = GAIM_PLUGIN_PROTOCOL_INFO(prpl);
parts = prpl_info->chat_info(chat->account->gc);
@@ -1809,7 +1809,7 @@ static char *gaim_get_tooltip_text(GaimB
b = (GaimBuddy *)node;
}
- prpl = gaim_find_prpl(gaim_account_get_protocol(b->account));
+ prpl = gaim_find_prpl(gaim_account_get_protocol_id(b->account));
prpl_info = GAIM_PLUGIN_PROTOCOL_INFO(prpl);
if (prpl_info && prpl_info->tooltip_text) {
@@ -1927,7 +1927,7 @@ GdkPixbuf *gaim_gtk_blist_get_status_ico
else
account = chat->account;
- prpl = gaim_find_prpl(gaim_account_get_protocol(account));
+ prpl = gaim_find_prpl(gaim_account_get_protocol_id(account));
if(!prpl)
return NULL;
@@ -2065,7 +2065,7 @@ static gchar *gaim_gtk_blist_get_name_ma
name = gaim_get_buddy_alias(b);
esc = g_markup_escape_text(name, strlen(name));
- prpl = gaim_find_prpl(gaim_account_get_protocol(b->account));
+ prpl = gaim_find_prpl(gaim_account_get_protocol_id(b->account));
if (prpl != NULL)
prpl_info = GAIM_PLUGIN_PROTOCOL_INFO(prpl);
@@ -3849,7 +3849,7 @@ create_prpl_icon(GaimAccount *account)
const char *protoname = NULL;
char buf[256];
- prpl = gaim_find_prpl(gaim_account_get_protocol(account));
+ prpl = gaim_find_prpl(gaim_account_get_protocol_id(account));
if (prpl != NULL) {
prpl_info = GAIM_PLUGIN_PROTOCOL_INFO(prpl);
Index: gtkconv.c
===================================================================
RCS file: /cvsroot/gaim/gaim/src/gtkconv.c,v
retrieving revision 1.277
retrieving revision 1.278
diff -u -d -p -r1.277 -r1.278
--- gtkconv.c 29 Dec 2003 07:19:55 -0000 1.277
+++ gtkconv.c 29 Dec 2003 09:03:43 -0000 1.278
@@ -4544,7 +4544,8 @@ gaim_gtkconv_write_conv(GaimConversation
if (gaim_prefs_get_bool("/gaim/gtk/conversations/ignore_font_sizes"))
gtk_font_options ^= GTK_IMHTML_NO_SIZES;
- if (GAIM_PLUGIN_PROTOCOL_INFO(gaim_find_prpl(gaim_account_get_protocol(conv->account)))->options &
+ /* this is gonna crash one day, I can feel it. */
+ if (GAIM_PLUGIN_PROTOCOL_INFO(gaim_find_prpl(gaim_account_get_protocol_id(conv->account)))->options &
OPT_PROTO_USE_POINTSIZE) {
gtk_font_options ^= GTK_IMHTML_USE_POINTSIZE;
}
Index: gtkutils.c
===================================================================
RCS file: /cvsroot/gaim/gaim/src/gtkutils.c,v
retrieving revision 1.56
retrieving revision 1.57
diff -u -d -p -r1.56 -r1.57
--- gtkutils.c 28 Dec 2003 02:41:52 -0000 1.56
+++ gtkutils.c 29 Dec 2003 09:03:43 -0000 1.57
@@ -619,22 +619,22 @@ protocol_menu_cb(GtkWidget *optmenu, GCa
{
GtkWidget *menu;
GtkWidget *item;
- GaimProtocol protocol;
+ const char *protocol;
gpointer user_data;
menu = gtk_option_menu_get_menu(GTK_OPTION_MENU(optmenu));
item = gtk_menu_get_active(GTK_MENU(menu));
- protocol = GPOINTER_TO_INT(g_object_get_data(G_OBJECT(item), "protocol"));
+ protocol = g_object_get_data(G_OBJECT(item), "protocol");
user_data = (g_object_get_data(G_OBJECT(optmenu), "user_data"));
if (cb != NULL)
- ((void (*)(GtkWidget *, GaimProtocol, gpointer))cb)(item, protocol,
+ ((void (*)(GtkWidget *, const char *, gpointer))cb)(item, protocol,
user_data);
}
GtkWidget *
-gaim_gtk_protocol_option_menu_new(GaimProtocol protocol, GCallback cb,
+gaim_gtk_protocol_option_menu_new(const char *id, GCallback cb,
gpointer user_data)
{
GaimPluginProtocolInfo *prpl_info;
@@ -712,13 +712,12 @@ gaim_gtk_protocol_option_menu_new(GaimPr
gtk_box_pack_start(GTK_BOX(hbox), label, TRUE, TRUE, 0);
gtk_widget_show(label);
- g_object_set_data(G_OBJECT(item), "protocol",
- GINT_TO_POINTER(prpl_info->protocol));
+ g_object_set_data(G_OBJECT(item), "protocol", plugin->info->id);
gtk_menu_shell_append(GTK_MENU_SHELL(menu), item);
gtk_widget_show(item);
- if (prpl_info->protocol == protocol)
+ if (!strcmp(plugin->info->id, id))
selected_index = i;
}
@@ -799,7 +798,7 @@ create_account_menu(GtkWidget *optmenu,
if (check_account_func && !check_account_func(account))
continue;
- plugin = gaim_find_prpl(gaim_account_get_protocol(account));
+ plugin = gaim_find_prpl(gaim_account_get_protocol_id(account));
if (plugin != NULL)
prpl_info = GAIM_PLUGIN_PROTOCOL_INFO(plugin);
Index: gtkutils.h
===================================================================
RCS file: /cvsroot/gaim/gaim/src/gtkutils.h,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -d -p -r1.23 -r1.24
--- gtkutils.h 4 Dec 2003 22:09:58 -0000 1.23
+++ gtkutils.h 29 Dec 2003 09:03:43 -0000 1.24
@@ -231,13 +231,13 @@ GtkWidget *gaim_gtk_make_frame(GtkWidget
/**
* Creates a drop-down option menu filled with protocols.
*
- * @param protocol The protocol to select by default.
+ * @param id The protocol to select by default.
* @param cb The callback to call when a protocol is selected.
* @param user_data Data to pass to the callback function.
*
* @return The drop-down option menu.
*/
-GtkWidget *gaim_gtk_protocol_option_menu_new(GaimProtocol protocol,
+GtkWidget *gaim_gtk_protocol_option_menu_new(const char *id,
GCallback cb,
gpointer user_data);
Index: log.c
===================================================================
RCS file: /cvsroot/gaim/gaim/src/log.c,v
retrieving revision 1.76
retrieving revision 1.77
diff -u -d -p -r1.76 -r1.77
--- log.c 15 Dec 2003 01:04:51 -0000 1.76
+++ log.c 29 Dec 2003 09:03:43 -0000 1.77
@@ -249,8 +249,9 @@ static GList *log_lister_common(const ch
const char *filename;
char *me = g_strdup(gaim_normalize(account, gaim_account_get_username(account)));
+ /* does this seem like a bad way to get this component of the path to anyone else? --Nathan */
const char *prpl = GAIM_PLUGIN_PROTOCOL_INFO
- (gaim_find_prpl(gaim_account_get_protocol(account)))->list_icon(account, NULL);
+ (gaim_find_prpl(gaim_account_get_protocol_id(account)))->list_icon(account, NULL);
char *path = g_build_filename(gaim_user_dir(), "logs", prpl, me, gaim_normalize(account, screenname), NULL);
g_free(me);
@@ -430,7 +431,7 @@ static void html_logger_write(GaimLog *l
char *guy = g_strdup(gaim_normalize(log->account, gaim_account_get_username(log->account)));
char *chat;
const char *prpl = GAIM_PLUGIN_PROTOCOL_INFO
- (gaim_find_prpl(gaim_account_get_protocol(log->account)))->list_icon(log->account, NULL);
+ (gaim_find_prpl(gaim_account_get_protocol_id(log->account)))->list_icon(log->account, NULL);
char *dir;
char *filename;
@@ -577,7 +578,7 @@ static void txt_logger_write(GaimLog *lo
char *guy = g_strdup(gaim_normalize(log->account, gaim_account_get_username(log->account)));
char *chat;
const char *prpl = GAIM_PLUGIN_PROTOCOL_INFO
- (gaim_find_prpl(gaim_account_get_protocol(log->account)))->list_icon(log->account, NULL);
+ (gaim_find_prpl(gaim_account_get_protocol_id(log->account)))->list_icon(log->account, NULL);
char *dir;
if (log->type == GAIM_LOG_CHAT) {
Index: main.c
===================================================================
RCS file: /cvsroot/gaim/gaim/src/main.c,v
retrieving revision 1.105
retrieving revision 1.106
diff -u -d -p -r1.105 -r1.106
--- main.c 8 Dec 2003 22:54:30 -0000 1.105
+++ main.c 29 Dec 2003 09:03:44 -0000 1.106
@@ -155,7 +155,7 @@ static void dologin(GtkWidget *widget, G
account = gaim_accounts_find(username, NULL);
if (!account) {
- account = gaim_account_new(username, "prpl-oscar");
+ account = gaim_account_new(username, GAIM_PROTO_DEFAULT);
gaim_account_set_remember_password(account, FALSE);
gaim_accounts_add(account);
}
@@ -470,7 +470,7 @@ static void set_first_user(char *name)
account = gaim_accounts_find(name, NULL);
if (account == NULL) { /* new user */
- account = gaim_account_new(name, "prpl-oscar");
+ account = gaim_account_new(name, GAIM_PROTO_DEFAULT);
gaim_accounts_add(account);
}
Index: plugin.c
===================================================================
RCS file: /cvsroot/gaim/gaim/src/plugin.c,v
retrieving revision 1.35
retrieving revision 1.36
diff -u -d -p -r1.35 -r1.36
--- plugin.c 16 Oct 2003 03:58:50 -0000 1.35
+++ plugin.c 29 Dec 2003 09:03:44 -0000 1.36
@@ -133,10 +133,17 @@ static gint
compare_prpl(GaimPlugin *a, GaimPlugin *b)
{
/* neg if a before b, 0 if equal, pos if a after b */
- return ((GAIM_IS_PROTOCOL_PLUGIN(a)
- ? GAIM_PLUGIN_PROTOCOL_INFO(a)->protocol : -1) -
- ((GAIM_IS_PROTOCOL_PLUGIN(b)
- ? GAIM_PLUGIN_PROTOCOL_INFO(b)->protocol : -1)));
+ if(GAIM_IS_PROTOCOL_PLUGIN(a)) {
+ if(GAIM_IS_PROTOCOL_PLUGIN(b))
+ return strcmp(a->info->name, b->info->name);
+ else
+ return -1;
+ } else {
+ if(GAIM_IS_PROTOCOL_PLUGIN(b))
+ return 1;
+ else
+ return 0;
+ }
}
GaimPlugin *
@@ -870,8 +877,7 @@ gaim_plugins_probe(const char *ext)
continue;
}
- if (GAIM_PLUGIN_PROTOCOL_INFO(plugin)->protocol == GAIM_PROTO_ICQ ||
- gaim_find_prpl(GAIM_PLUGIN_PROTOCOL_INFO(plugin)->protocol))
+ if (gaim_find_prpl(plugin->info->id))
{
/* Nothing to see here--move along, move along */
gaim_plugin_destroy(plugin);
Index: prpl.c
===================================================================
RCS file: /cvsroot/gaim/gaim/src/prpl.c,v
retrieving revision 1.134
retrieving revision 1.135
diff -u -d -p -r1.134 -r1.135
--- prpl.c 28 Nov 2003 19:30:44 -0000 1.134
+++ prpl.c 29 Dec 2003 09:03:44 -0000 1.135
@@ -78,7 +78,7 @@ gaim_prpl_id_to_num(const char *id)
}
GaimPlugin *
-gaim_find_prpl(GaimProtocol type)
+gaim_find_prpl(const char *id)
{
GList *l;
GaimPlugin *plugin;
@@ -89,7 +89,7 @@ gaim_find_prpl(GaimProtocol type)
/* Just In Case (TM) */
if (GAIM_IS_PROTOCOL_PLUGIN(plugin)) {
- if (GAIM_PLUGIN_PROTOCOL_INFO(plugin)->protocol == type)
+ if (!strcmp(plugin->info->id, id))
return plugin;
}
}
Index: prpl.h
===================================================================
RCS file: /cvsroot/gaim/gaim/src/prpl.h,v
retrieving revision 1.143
retrieving revision 1.144
diff -u -d -p -r1.143 -r1.144
--- prpl.h 28 Nov 2003 19:30:44 -0000 1.143
+++ prpl.h 29 Dec 2003 09:03:44 -0000 1.144
@@ -83,7 +83,7 @@ typedef enum
"in the \"Tools\" menu in the buddy list window."
/** Default protocol */
-#define GAIM_PROTO_DEFAULT GAIM_PROTO_OSCAR
+#define GAIM_PROTO_DEFAULT "prpl-oscar"
/*@}*/
@@ -194,7 +194,6 @@ typedef enum
*/
struct _GaimPluginProtocolInfo
{
- GaimProtocol protocol; /**< The protocol type. */
GaimProtocolOptions options; /**< Protocol options. */
GList *user_splits; /* A GList of GaimAccountUserSplit */
@@ -349,7 +348,7 @@ GaimProtocol gaim_prpl_id_to_num(const c
*
* @param type The protocol plugin;
*/
-GaimPlugin *gaim_find_prpl(GaimProtocol type);
+GaimPlugin *gaim_find_prpl(const char *id);
#ifdef __cplusplus
}
Index: server.c
===================================================================
RCS file: /cvsroot/gaim/gaim/src/server.c,v
retrieving revision 1.385
retrieving revision 1.386
diff -u -d -p -r1.385 -r1.386
--- server.c 29 Dec 2003 06:13:36 -0000 1.385
+++ server.c 29 Dec 2003 09:03:44 -0000 1.386
@@ -40,7 +40,7 @@
void serv_login(GaimAccount *account)
{
- GaimPlugin *p = gaim_find_prpl(gaim_account_get_protocol(account));
+ GaimPlugin *p = gaim_find_prpl(gaim_account_get_protocol_id(account));
GaimPluginProtocolInfo *prpl_info = NULL;
if (account->gc == NULL || p == NULL)
Index: themes.c
===================================================================
RCS file: /cvsroot/gaim/gaim/src/themes.c,v
retrieving revision 1.26
retrieving revision 1.27
diff -u -d -p -r1.26 -r1.27
--- themes.c 4 Dec 2003 05:23:19 -0000 1.26
+++ themes.c 29 Dec 2003 09:03:44 -0000 1.27
@@ -236,8 +236,8 @@ void smiley_theme_probe()
}
}
-GSList *get_proto_smileys(int protocol) {
- GaimPlugin *proto = gaim_find_prpl(protocol);
+GSList *get_proto_smileys(const char *id) {
+ GaimPlugin *proto = gaim_find_prpl(id);
struct smiley_list *list, *def;
if(!current_smiley_theme)
Index: ui.h
===================================================================
RCS file: /cvsroot/gaim/gaim/src/ui.h,v
retrieving revision 1.147
retrieving revision 1.148
diff -u -d -p -r1.147 -r1.148
--- ui.h 27 Dec 2003 20:55:55 -0000 1.147
+++ ui.h 29 Dec 2003 09:03:44 -0000 1.148
@@ -157,6 +157,6 @@ extern void session_end();
extern void smiley_themeize(GtkWidget *);
extern void smiley_theme_probe();
extern void load_smiley_theme(const char *file, gboolean load);
-extern GSList *get_proto_smileys(int protocol);
+extern GSList *get_proto_smileys(const char *id);
#endif /* _UI_H_ */
Index: util.c
===================================================================
RCS file: /cvsroot/gaim/gaim/src/util.c,v
retrieving revision 1.256
retrieving revision 1.257
diff -u -d -p -r1.256 -r1.257
--- util.c 17 Dec 2003 09:33:05 -0000 1.256
+++ util.c 29 Dec 2003 09:03:44 -0000 1.257
@@ -1586,7 +1586,7 @@ gaim_normalize(const GaimAccount *accoun
const char *ret = NULL;
if(account)
- prpl = gaim_find_prpl(gaim_account_get_protocol(account));
+ prpl = gaim_find_prpl(gaim_account_get_protocol_id(account));
if(prpl)
prpl_info = GAIM_PLUGIN_PROTOCOL_INFO(prpl);
|