Mercurial > pidgin.yaz
changeset 1400:476b24cdfa32
[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 <tailor@pidgin.im>
author | Eric Warmenhoven <eric@warmenhoven.org> |
---|---|
date | Wed, 10 Jan 2001 19:56:39 +0000 |
parents | 51620cc6ec4b |
children | bf041349b11e |
files | README plugins/yay/yay.c src/aim.c |
diffstat | 3 files changed, 27 insertions(+), 19 deletions(-) [+] |
line wrap: on
line diff
--- 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".
--- 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);
--- 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