From: Christian H. <ch...@us...> - 2003-06-01 17:40:21
|
Update of /cvsroot/gaim/gaim/src/protocols/napster In directory sc8-pr-cvs1:/tmp/cvs-serv13129/protocols/napster Modified Files: napster.c Log Message: 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. Index: napster.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/protocols/napster/napster.c,v retrieving revision 1.49 retrieving revision 1.50 diff -u -d -r1.49 -r1.50 --- napster.c 31 May 2003 15:40:32 -0000 1.49 +++ napster.c 1 Jun 2003 17:40:17 -0000 1.50 @@ -39,6 +39,7 @@ #include <time.h> #include <sys/stat.h> #include "gaim.h" +#include "accountopt.h" #include "multi.h" #include "prpl.h" #include "proxy.h" @@ -47,9 +48,7 @@ #include "win32dep.h" #endif -#define USEROPT_NAPSERVER 3 #define NAP_SERVER "64.124.41.187" -#define USEROPT_NAPPORT 4 #define NAP_PORT 8888 #define NAPSTER_CONNECT_STEPS 2 @@ -650,19 +649,16 @@ 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(_("Server:")); - puo->def = g_strdup(NAP_SERVER); - puo->pos = USEROPT_NAPSERVER; - prpl_info.user_opts = g_list_append(prpl_info.user_opts, puo); + option = gaim_account_option_string_new(_("Server"), "server", + NAP_SERVER); + prpl_info.protocol_options = g_list_append(prpl_info.protocol_options, + option); - puo = g_new0(struct proto_user_opt, 1); - puo->label = g_strdup(_("Port:")); - puo->def = g_strdup("8888"); - puo->pos = USEROPT_NAPPORT; - prpl_info.user_opts = g_list_append(prpl_info.user_opts, puo); + option = gaim_account_option_int_new(_("Port"), "port", 8888); + prpl_info.protocol_options = g_list_append(prpl_info.protocol_options, + option); my_protocol = plugin; } |