Mercurial > pidgin
diff src/protocols/yahoo/yahoo.c @ 11914:2219f4bf4a57
[gaim-migrate @ 14205]
SF Patch #1342017 from sadrul
"This patch allows a user to change brush color during
the doodle-session.
This patch is mostly a rough one to get an idea whether
the approach is correct. To make things simple, I have
kept brush_size and brush_color in GaimGtkWhiteboard,
although it's there in doodle_session. It could be in
either place, although I would think it's best to be in
GaimGtkWhiteboard because any/most implementations of
doodle-ing would have these attributes. So keeping them
within the prpl may not be the best option?
Anyway, considering the brush-size and color stay at
the prpl for now, I have introduced two functions in
GaimWhiteboardPrplOps to get/set the size and color of
the brush from the prpl.
rekkanoryo (using Y! 7) and I (using gaim) have tested
this, and it seemed to work OK."
Plus, I cleaned up a whole bunch of code.
My apologies for this all being committed together, but it was a case of "Oh, this will be quick." that lead into hours of making intertwined changes.
committer: Tailor Script <tailor@pidgin.im>
author | Richard Laager <rlaager@wiktel.com> |
---|---|
date | Mon, 31 Oct 2005 02:19:51 +0000 |
parents | a1aa681f1448 |
children | 52f27ffe68a5 |
line wrap: on
line diff
--- a/src/protocols/yahoo/yahoo.c Mon Oct 31 01:58:26 2005 +0000 +++ b/src/protocols/yahoo/yahoo.c Mon Oct 31 02:19:51 2005 +0000 @@ -673,7 +673,7 @@ char imv[16]; if (pkt->status <= 1 || pkt->status == 5) { - while (l) { + while (l != NULL) { struct yahoo_pair *pair = l->data; if (pair->key == 4) { im = g_new0(struct _yahoo_im, 1); @@ -697,7 +697,7 @@ /* IMV key */ if (pair->key == 63) { - strcpy( imv, pair->value ); + strcpy(imv, pair->value); } l = l->next; } @@ -707,7 +707,7 @@ } /* Check for the Doodle IMV */ - if( !strcmp( imv, "doodle;11" ) ) + if(!strcmp(imv, "doodle;11")) { GaimWhiteboard *wb; @@ -716,15 +716,15 @@ return; } - wb = gaim_whiteboard_get_session( gc->account, im->from ); + wb = gaim_whiteboard_get_session(gc->account, im->from); /* If a Doodle session doesn't exist between this user */ - if( wb == NULL ) + if(wb == NULL) { - wb = gaim_whiteboard_create( gc->account, im->from, DOODLE_STATE_REQUESTED ); - - yahoo_doodle_command_send_request( gc, im->from ); - yahoo_doodle_command_send_ready( gc, im->from ); + wb = gaim_whiteboard_create(gc->account, im->from, DOODLE_STATE_REQUESTED); + + yahoo_doodle_command_send_request(gc, im->from); + yahoo_doodle_command_send_ready(gc, im->from); } } @@ -2083,7 +2083,7 @@ break; case YAHOO_SERVICE_P2PFILEXFER: /* This case had no break and continued; thus keeping it this way.*/ - yahoo_process_p2pfilexfer( gc, pkt ); + yahoo_process_p2pfilexfer(gc, pkt); case YAHOO_SERVICE_FILETRANSFER: yahoo_process_filetransfer(gc, pkt); break; @@ -3556,6 +3556,8 @@ yahoo_doodle_end, yahoo_doodle_get_dimensions, NULL, + yahoo_doodle_get_brush, + yahoo_doodle_set_brush, yahoo_doodle_send_draw_list, yahoo_doodle_clear };