# HG changeset patch # User Eric Warmenhoven # Date 979156599 0 # Node ID 476b24cdfa3212377a959b0adb765d66d03056fe # Parent 51620cc6ec4bb76f9b899d8a6463a38f49ff6d88 [gaim-migrate @ 1410] README now has docs on how to use Yahoo/IRC/etc, so people aren't so lost. Yahoo can now receive messages and linkify them properly doesn't say "quit" in applet login window committer: Tailor Script diff -r 51620cc6ec4b -r 476b24cdfa32 README --- a/README Wed Jan 10 02:54:05 2001 +0000 +++ b/README Wed Jan 10 19:56:39 2001 +0000 @@ -22,6 +22,15 @@ type "./gaim" +To use the other services (such as Yahoo and IRC) which are available as +plugins: +They are installed in $libdir/gaim, which usually is either /usr/lib/gaim +or /usr/local/lib/gaim, and should have a somewhat descriptive name (e.g. +libyahoo.so or irc.so). Load those plugins using the normal plugin dialog. +Then in the account editor, add a new account; the Protocol option menu +should now have another option for the protocol that you loaded. Then you +can sign that account on. + If you want to build as a GNOME applet: ./configure --enable-panel ; make then su to root and run "make install". diff -r 51620cc6ec4b -r 476b24cdfa32 plugins/yay/yay.c --- a/plugins/yay/yay.c Wed Jan 10 02:54:05 2001 +0000 +++ b/plugins/yay/yay.c Wed Jan 10 19:56:39 2001 +0000 @@ -77,7 +77,6 @@ } for (i = 0; i < pkt->idstatus_count; i++) { - struct group *g; struct buddy *b; struct yahoo_idstatus *rec = pkt->idstatus[i]; gboolean online = rec->in_pager || rec->in_chat || rec->in_game; @@ -89,11 +88,11 @@ if (!online) serv_got_update(gc, b->name, 0, 0, 0, 0, 0, 0); else { - if (rec->status == YAHOO_STATUS_IDLE) + if (rec->status == YAHOO_STATUS_AVAILABLE) + serv_got_update(gc, b->name, 1, 0, b->signon, 0, UC_NORMAL, 0); + else if (rec->status == YAHOO_STATUS_IDLE) serv_got_update(gc, b->name, 1, 0, b->signon, tmptime - 600, (rec->status << 5) | UC_NORMAL, 0); - else if (rec->status == YAHOO_STATUS_AVAILABLE) - serv_got_update(gc, b->name, 1, 0, b->signon, 0, UC_NORMAL, 0); else serv_got_update(gc, b->name, 1, 0, b->signon, 0, (rec->status << 5) | UC_UNAVAILABLE, 0); @@ -110,12 +109,15 @@ static void process_packet_message(struct gaim_connection *gc, struct yahoo_packet *pkt) { struct yahoo_data *yd = (struct yahoo_data *)gc->proto_data; + char buf[BUF_LEN * 4]; if (pkt->msg) { if (pkt->msgtype == YAHOO_MSGTYPE_BOUNCE) do_error_dialog("Your message did not get received.", "Error"); - else - serv_got_im(gc, pkt->msg_id, pkt->msg, pkt->msg_timestamp ? 1 : 0); + else { + g_snprintf(buf, sizeof(buf), "%s", pkt->msg); + serv_got_im(gc, pkt->msg_id, buf, pkt->msg_timestamp ? 1 : 0); + } } } @@ -139,9 +141,6 @@ static void process_packet_conference(struct gaim_connection *gc, struct yahoo_packet *pkt) { } -static void process_packet_ping(struct gaim_connection *gc, struct yahoo_packet *pkt) { -} - static void yahoo_callback(gpointer data, gint source, GdkInputCondition condition) { struct gaim_connection *gc = (struct gaim_connection *)data; struct yahoo_data *yd = (struct yahoo_data *)gc->proto_data; @@ -182,7 +181,8 @@ g_snprintf(buf, sizeof buf, "%s on Yahoo has made you " "their friend", pkt->msg_id); do_error_dialog(buf, "Yahoo"); - show_add_buddy(gc, pkt->msg_id, NULL); + if (!find_buddy(gc, pkt->msg_id)) + show_add_buddy(gc, pkt->msg_id, NULL); } break; case YAHOO_SERVICE_NEWMAIL: @@ -197,9 +197,6 @@ case YAHOO_SERVICE_CONFMSG: process_packet_conference(gc, pkt); break; - case YAHOO_SERVICE_PING: - process_packet_ping(gc, pkt); - break; case YAHOO_SERVICE_FILETRANSFER: case YAHOO_SERVICE_CALENDAR: case YAHOO_SERVICE_CHATINVITE: @@ -216,7 +213,6 @@ static void yahoo_login(struct aim_user *user) { struct gaim_connection *gc = new_gaim_conn(user); struct yahoo_data *yd = gc->proto_data = g_new0(struct yahoo_data, 1); - int i; struct yahoo_options opt; struct yahoo_context *ctxt; @@ -269,11 +265,9 @@ for (buddies = ctxt->buddies; *buddies; buddies++) { struct yahoo_buddy *bud = *buddies; - struct buddy *b; - struct group *g; - b = find_buddy(gc, bud->id); - if (!b) add_buddy(gc, bud->group, bud->id, bud->id); + if (!find_buddy(gc, bud->id)) + add_buddy(gc, bud->group, bud->id, bud->id); } } @@ -398,7 +392,8 @@ if ((b->uc >> 5) != YAHOO_STATUS_CUSTOM) g_snprintf(buf, sizeof buf, "Status: %s", yahoo_get_status_string(b->uc >> 5)); else - g_snprintf(buf, sizeof buf, "Custom Status: %s", g_hash_table_lookup(yd->hash, b->name)); + g_snprintf(buf, sizeof buf, "Custom Status: %s", + (char *)g_hash_table_lookup(yd->hash, b->name)); button = gtk_menu_item_new_with_label(buf); gtk_menu_append(GTK_MENU(menu), button); gtk_widget_show(button); diff -r 51620cc6ec4b -r 476b24cdfa32 src/aim.c --- a/src/aim.c Wed Jan 10 02:54:05 2001 +0000 +++ b/src/aim.c Wed Jan 10 19:56:39 2001 +0000 @@ -294,7 +294,11 @@ gtk_box_pack_start(GTK_BOX(sbox), bbox, TRUE, TRUE, 0); gtk_widget_show(bbox); +#ifndef USE_APPLET cancel = gtk_button_new_with_label(_("Quit")); +#else + cancel = gtk_button_new_with_label(_("Close")); +#endif #ifndef NO_MULTI accts = gtk_button_new_with_label(_("Accounts")); #endif