diff src/protocols/yahoo/yahoo.c @ 5638:0bdfa28c678e

[gaim-migrate @ 6047] We're slowly killing off multi.h. The proto_user_split and proto_user_opt have been replaced with GaimAccountOption and GaimAccountUserSplit structures, which of course have an API. The account dialog is being rewritten as well, and will soon allow you to add and modify accounts again. committer: Tailor Script <tailor@pidgin.im>
author Christian Hammond <chipx86@chipx86.com>
date Sun, 01 Jun 2003 17:40:20 +0000
parents 011a0a975060
children 46d7ad0dfa26
line wrap: on
line diff
--- a/src/protocols/yahoo/yahoo.c	Sun Jun 01 16:17:15 2003 +0000
+++ b/src/protocols/yahoo/yahoo.c	Sun Jun 01 17:40:20 2003 +0000
@@ -42,6 +42,7 @@
 #include <sys/stat.h>
 #include <ctype.h>
 #include "gaim.h"
+#include "accountopt.h"
 #include "multi.h"
 #include "prpl.h"
 #include "proxy.h"
@@ -57,9 +58,7 @@
 
 #define USEROPT_MAIL 0
 
-#define USEROPT_PAGERHOST 3
 #define YAHOO_PAGER_HOST "scs.yahoo.com"
-#define USEROPT_PAGERPORT 4
 #define YAHOO_PAGER_PORT 5050
 
 #define YAHOO_PROTO_VER 0x0900
@@ -1430,13 +1429,13 @@
 	puo->label = g_strdup(_("Pager Host:"));
 	puo->def = g_strdup(YAHOO_PAGER_HOST);
 	puo->pos = USEROPT_PAGERHOST;
-	ret->user_opts = g_list_append(ret->user_opts, puo);
+	ret->protocol_options = g_list_append(ret->protocol_options, puo);
 
 	puo = g_new0(struct proto_user_opt, 1);
 	puo->label = g_strdup(_("Pager Port:"));
 	puo->def = g_strdup("5050");
 	puo->pos = USEROPT_PAGERPORT;
-	ret->user_opts = g_list_append(ret->user_opts, puo);
+	ret->protocol_options = g_list_append(ret->protocol_options, puo);
 
 	my_protocol = ret;
 }
@@ -1536,19 +1535,17 @@
 static void
 __init_plugin(GaimPlugin *plugin)
 {
-	struct proto_user_opt *puo;
+	GaimAccountOption *option;
 
-	puo = g_new0(struct proto_user_opt, 1);
-	puo->label = g_strdup("Pager Host:");
-	puo->def   = g_strdup(YAHOO_PAGER_HOST);
-	puo->pos   = USEROPT_PAGERHOST;
-	prpl_info.user_opts = g_list_append(prpl_info.user_opts, puo);
+	option = gaim_account_option_string_new(_("Pager Host"), "server",
+											YAHOO_PAGER_HOST);
+	prpl_info.protocol_options = g_list_append(prpl_info.protocol_options,
+											   option);
 
-	puo = g_new0(struct proto_user_opt, 1);
-	puo->label = g_strdup("Pager Port:");
-	puo->def   = g_strdup("5050");
-	puo->pos   = USEROPT_PAGERPORT;
-	prpl_info.user_opts = g_list_append(prpl_info.user_opts, puo);
+	option = gaim_account_option_int_new(_("Pager Port"), "port",
+										 YAHOO_PAGER_PORT);
+	prpl_info.protocol_options = g_list_append(prpl_info.protocol_options,
+											   option);
 
 	my_protocol = plugin;
 }