From 5c9512ffa716f2bc8bbf9e2c31ee40624a0ff842 Mon Sep 17 00:00:00 2001 From: Wilmer van der Gaast Date: Fri, 30 Jun 2006 11:17:18 +0200 Subject: Made set.c API more generic so it's not specific to irc_t structures anymore, but can be used for account_t structures too, for example. --- query.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'query.c') diff --git a/query.c b/query.c index 39821f3a..40dbb439 100644 --- a/query.c +++ b/query.c @@ -62,7 +62,7 @@ query_t *query_add( irc_t *irc, struct gaim_connection *gc, char *question, void irc->queries = q; } - if( g_strcasecmp( set_getstr( irc, "query_order" ), "lifo" ) == 0 || irc->queries == q ) + if( g_strcasecmp( set_getstr( &irc->set, "query_order" ), "lifo" ) == 0 || irc->queries == q ) query_display( irc, q ); return( q ); @@ -171,7 +171,7 @@ static query_t *query_default( irc_t *irc ) { query_t *q; - if( g_strcasecmp( set_getstr( irc, "query_order" ), "fifo" ) == 0 ) + if( g_strcasecmp( set_getstr( &irc->set, "query_order" ), "fifo" ) == 0 ) q = irc->queries; else for( q = irc->queries; q && q->next; q = q->next ); -- cgit v1.2.3 From 0da65d5fb37691ed4d31f7ab4058732f1440db6b Mon Sep 17 00:00:00 2001 From: Wilmer van der Gaast Date: Fri, 30 Mar 2007 22:40:45 -0700 Subject: s/gaim_connection/im_connection/ and some other minor API changes. The rest will come tomorrow. It compiles, I'll leave the real testing up to someone else. ;-) --- query.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'query.c') diff --git a/query.c b/query.c index 40dbb439..c95ff4e1 100644 --- a/query.c +++ b/query.c @@ -29,11 +29,11 @@ static void query_display( irc_t *irc, query_t *q ); static query_t *query_default( irc_t *irc ); -query_t *query_add( irc_t *irc, struct gaim_connection *gc, char *question, void *yes, void *no, void *data ) +query_t *query_add( irc_t *irc, struct im_connection *ic, char *question, void *yes, void *no, void *data ) { query_t *q = g_new0( query_t, 1 ); - q->gc = gc; + q->ic = ic; q->question = g_strdup( question ); q->yes = yes; q->no = no; @@ -96,7 +96,7 @@ void query_del( irc_t *irc, query_t *q ) g_free( q ); } -void query_del_by_gc( irc_t *irc, struct gaim_connection *gc ) +void query_del_by_conn( irc_t *irc, struct im_connection *ic ) { query_t *q, *n, *def; int count = 0; @@ -106,7 +106,7 @@ void query_del_by_gc( irc_t *irc, struct gaim_connection *gc ) while( q ) { - if( q->gc == gc ) + if( q->ic == ic ) { n = q->next; query_del( irc, q ); @@ -121,7 +121,7 @@ void query_del_by_gc( irc_t *irc, struct gaim_connection *gc ) } if( count > 0 ) - serv_got_crap( gc, "Flushed %d unanswered question(s) for this connection.", count ); + serv_got_crap( ic, "Flushed %d unanswered question(s) for this connection.", count ); q = query_default( irc ); if( q && q != def ) @@ -139,12 +139,12 @@ void query_answer( irc_t *irc, query_t *q, int ans ) } if( ans ) { - serv_got_crap( q->gc, "Accepted: %s", q->question ); + serv_got_crap( q->ic, "Accepted: %s", q->question ); q->yes( NULL, q->data ); } else { - serv_got_crap( q->gc, "Rejected: %s", q->question ); + serv_got_crap( q->ic, "Rejected: %s", q->question ); q->no( NULL, q->data ); } q->data = NULL; @@ -157,9 +157,9 @@ void query_answer( irc_t *irc, query_t *q, int ans ) static void query_display( irc_t *irc, query_t *q ) { - if( q->gc ) + if( q->ic ) { - serv_got_crap( q->gc, "New request: %s\nYou can use the \2yes\2/\2no\2 commands to accept/reject this request.", q->question ); + serv_got_crap( q->ic, "New request: %s\nYou can use the \2yes\2/\2no\2 commands to accept/reject this request.", q->question ); } else { -- cgit v1.2.3 From aef4828a1dc51de10a43bb7dd5d023de9971295b Mon Sep 17 00:00:00 2001 From: Wilmer van der Gaast Date: Thu, 5 Apr 2007 22:20:31 -0700 Subject: More cleanups, mainly in the callbacks. Replaced things like do_error_dialog() and (set|hide)_login_progress(_error)?() with things that hopefully make more sense. Although it's still not really great... --- query.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'query.c') diff --git a/query.c b/query.c index c95ff4e1..e7a55afd 100644 --- a/query.c +++ b/query.c @@ -121,7 +121,7 @@ void query_del_by_conn( irc_t *irc, struct im_connection *ic ) } if( count > 0 ) - serv_got_crap( ic, "Flushed %d unanswered question(s) for this connection.", count ); + imc_log( ic, "Flushed %d unanswered question(s) for this connection.", count ); q = query_default( irc ); if( q && q != def ) @@ -139,12 +139,12 @@ void query_answer( irc_t *irc, query_t *q, int ans ) } if( ans ) { - serv_got_crap( q->ic, "Accepted: %s", q->question ); + imc_log( q->ic, "Accepted: %s", q->question ); q->yes( NULL, q->data ); } else { - serv_got_crap( q->ic, "Rejected: %s", q->question ); + imc_log( q->ic, "Rejected: %s", q->question ); q->no( NULL, q->data ); } q->data = NULL; @@ -159,7 +159,7 @@ static void query_display( irc_t *irc, query_t *q ) { if( q->ic ) { - serv_got_crap( q->ic, "New request: %s\nYou can use the \2yes\2/\2no\2 commands to accept/reject this request.", q->question ); + imc_log( q->ic, "New request: %s\nYou can use the \2yes\2/\2no\2 commands to accept/reject this request.", q->question ); } else { -- cgit v1.2.3 From 84b045d409f1e8da6d8bf379c6fef7236dcd9bcd Mon Sep 17 00:00:00 2001 From: Wilmer van der Gaast Date: Sun, 15 Apr 2007 18:03:08 -0700 Subject: s/imc/imcb/ for callback functions. Moved things aroundin nogaim.h a little bit, grouping things by category instead of original Gaim 0.58 filename. --- query.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'query.c') diff --git a/query.c b/query.c index e7a55afd..99be2bee 100644 --- a/query.c +++ b/query.c @@ -121,7 +121,7 @@ void query_del_by_conn( irc_t *irc, struct im_connection *ic ) } if( count > 0 ) - imc_log( ic, "Flushed %d unanswered question(s) for this connection.", count ); + imcb_log( ic, "Flushed %d unanswered question(s) for this connection.", count ); q = query_default( irc ); if( q && q != def ) @@ -139,12 +139,12 @@ void query_answer( irc_t *irc, query_t *q, int ans ) } if( ans ) { - imc_log( q->ic, "Accepted: %s", q->question ); + imcb_log( q->ic, "Accepted: %s", q->question ); q->yes( NULL, q->data ); } else { - imc_log( q->ic, "Rejected: %s", q->question ); + imcb_log( q->ic, "Rejected: %s", q->question ); q->no( NULL, q->data ); } q->data = NULL; @@ -159,7 +159,7 @@ static void query_display( irc_t *irc, query_t *q ) { if( q->ic ) { - imc_log( q->ic, "New request: %s\nYou can use the \2yes\2/\2no\2 commands to accept/reject this request.", q->question ); + imcb_log( q->ic, "New request: %s\nYou can use the \2yes\2/\2no\2 commands to accept/reject this request.", q->question ); } else { -- cgit v1.2.3 From 7f421d6b922837857d6aca342da314225023eb46 Mon Sep 17 00:00:00 2001 From: Wilmer van der Gaast Date: Mon, 3 Mar 2008 23:18:36 +0000 Subject: BitlBee <= 1.0 didn't have "account set" and allowed one to delete an account and re-create it with new login settings if necessary, without losing custom nicknames. Now, nicknames are connected to an account instead of just the protocol, and they're flushed together with the account. So I added a warning to make sure nobody accidentally loses any settings while just changing the password. This will probably go after a few releases, since it's slightly annoying. --- query.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'query.c') diff --git a/query.c b/query.c index 99be2bee..6f9eb77f 100644 --- a/query.c +++ b/query.c @@ -139,12 +139,18 @@ void query_answer( irc_t *irc, query_t *q, int ans ) } if( ans ) { - imcb_log( q->ic, "Accepted: %s", q->question ); + if( q->ic ) + imcb_log( q->ic, "Accepted: %s", q->question ); + else + irc_usermsg( irc, "Accepted: %s", q->question ); q->yes( NULL, q->data ); } else { - imcb_log( q->ic, "Rejected: %s", q->question ); + if( q->ic ) + imcb_log( q->ic, "Rejected: %s", q->question ); + else + irc_usermsg( irc, "Rejected: %s", q->question ); q->no( NULL, q->data ); } q->data = NULL; -- cgit v1.2.3