Mercurial > pidgin.yaz
changeset 2137:18722ae5b882
[gaim-migrate @ 2147]
i guess.
committer: Tailor Script <tailor@pidgin.im>
author | Eric Warmenhoven <eric@warmenhoven.org> |
---|---|
date | Wed, 08 Aug 2001 19:55:12 +0000 |
parents | 73253b36c3cb |
children | cfa83a1b3d49 |
files | src/dialogs.c src/gaim.h src/protocols/icq/gaim_icq.c src/protocols/irc/irc.c src/protocols/jabber/jabber.c src/protocols/oscar/oscar.c src/protocols/toc/toc.c src/protocols/zephyr/zephyr.c |
diffstat | 8 files changed, 35 insertions(+), 27 deletions(-) [+] |
line wrap: on
line diff
--- a/src/dialogs.c Wed Aug 08 19:13:01 2001 +0000 +++ b/src/dialogs.c Wed Aug 08 19:55:12 2001 +0000 @@ -1710,7 +1710,7 @@ return NULL; } -void g_show_info_text(char *info) +void g_show_info_text(char *info, ...) { GtkWidget *ok; GtkWidget *label; @@ -1718,9 +1718,13 @@ GtkWidget *bbox; GtkWidget *sw; gint options = 0; + char *more_info; + va_list ap; struct info_dlg *b = g_new0(struct info_dlg, 1); + va_start(ap, info); + b->window = gtk_window_new(GTK_WINDOW_DIALOG); dialogwindows = g_list_prepend(dialogwindows, b->window); gtk_window_set_title(GTK_WINDOW(b->window), "Gaim"); @@ -1773,6 +1777,9 @@ options ^= GTK_IMHTML_NO_NEWLINE; options ^= GTK_IMHTML_NO_SCROLL; gtk_imhtml_append_text(GTK_IMHTML(b->text), info, options); + while ((more_info = va_arg(ap, char *)) != NULL) + gtk_imhtml_append_text(GTK_IMHTML(b->text), more_info, options); + va_end(ap); gtk_imhtml_append_text(GTK_IMHTML(b->text), "<BR>", 0); gtk_adjustment_set_value(gtk_scrolled_window_get_vadjustment(GTK_SCROLLED_WINDOW(sw)), 0);
--- a/src/gaim.h Wed Aug 08 19:13:01 2001 +0000 +++ b/src/gaim.h Wed Aug 08 19:55:12 2001 +0000 @@ -855,7 +855,7 @@ extern void show_log_dialog(struct conversation *); extern void show_find_email(struct gaim_connection *gc); extern void show_find_info(); -extern void g_show_info_text(char *); +extern void g_show_info_text(char *, ...); extern void show_set_info(struct gaim_connection *); extern void show_set_dir(); extern void show_fgcolor_dialog(struct conversation *c, GtkWidget *color);
--- a/src/protocols/icq/gaim_icq.c Wed Aug 08 19:13:01 2001 +0000 +++ b/src/protocols/icq/gaim_icq.c Wed Aug 08 19:55:12 2001 +0000 @@ -226,7 +226,7 @@ nick, first, last, email); - g_show_info_text(buf); + g_show_info_text(buf, NULL); } static void icq_web_pager(icq_Link *link, unsigned char hour, unsigned char minute,
--- a/src/protocols/irc/irc.c Wed Aug 08 19:13:01 2001 +0000 +++ b/src/protocols/irc/irc.c Wed Aug 08 19:55:12 2001 +0000 @@ -109,8 +109,9 @@ return; } -static gboolean irc_request_buddy_update(struct gaim_connection *gc) +static gboolean irc_request_buddy_update(gpointer data) { + struct gaim_connection *gc = data; struct irc_data *idata = (struct irc_data *)gc->proto_data; GSList *grp = gc->groups; GSList *person; @@ -119,7 +120,7 @@ struct irc_channel *u; if (idata->templist != NULL) - return; + return TRUE; idata->recblocks = 0; idata->totalblocks = 1; @@ -628,7 +629,7 @@ "<b>Host:</b> %s@%s<br>" "<b>Name:</b> %s<br>", res[3], res[4], res[5], res[7] + 1); - g_show_info_text(buf); + g_show_info_text(buf, NULL); } g_strfreev(res);
--- a/src/protocols/jabber/jabber.c Wed Aug 08 19:13:01 2001 +0000 +++ b/src/protocols/jabber/jabber.c Wed Aug 08 19:55:12 2001 +0000 @@ -946,7 +946,7 @@ if (desc) at += g_snprintf(buf + at, sizeof(buf) - at, "<HR>%s<br>\n", desc); - g_show_info_text(buf); + g_show_info_text(buf, NULL); g_free(buddy); }
--- a/src/protocols/oscar/oscar.c Wed Aug 08 19:13:01 2001 +0000 +++ b/src/protocols/oscar/oscar.c Wed Aug 08 19:55:12 2001 +0000 @@ -1695,7 +1695,7 @@ #if USE_PIXBUF if (args->icbmflags & AIM_IMFLAGS_HASICON) { struct oscar_data *od = gc->proto_data; - struct icon_req *ir; + struct icon_req *ir = NULL; GSList *h = od->hasicons; char *who = normalize(userinfo->sn); debug_printf("%s has an icon\n", userinfo->sn); @@ -1999,6 +1999,7 @@ char *prof_enc = NULL, *prof = NULL; unsigned short infotype; char buf[BUF_LONG]; + char legend[BUF_LONG]; struct gaim_connection *gc = sess->aux_data; va_list ap; char *asc; @@ -2021,28 +2022,27 @@ "%s" "Warning Level : <B>%d %%</B><BR>\n" "Online Since : <B>%s</B><BR>\n" - "Idle Minutes : <B>%d</B>\n<BR>\n<HR><BR>\n" - "%s" - "<br><BODY BGCOLOR=WHITE><hr><I>Legend:</I><br><br>" - "<IMG SRC=\"free_icon.gif\"> : Normal AIM User<br>" - "<IMG SRC=\"aol_icon.gif\"> : AOL User <br>" - "<IMG SRC=\"dt_icon.gif\"> : Trial AIM User <br>" - "<IMG SRC=\"admin_icon.gif\"> : Administrator"), + "Idle Minutes : <B>%d</B>\n<BR>\n<HR><BR>\n"), info->sn, images(info->flags), asc, info->warnlevel/10, asctime(localtime(&info->onlinesince)), - info->idletime, - (prof && strlen(prof)) ? - (infotype == AIM_GETINFO_GENERALINFO ? - prof : - away_subs(prof, gc->username)) + info->idletime); + g_snprintf(legend, sizeof legend, + _("<br><BODY BGCOLOR=WHITE><hr><I>Legend:</I><br><br>" + "<IMG SRC=\"free_icon.gif\"> : Normal AIM User<br>" + "<IMG SRC=\"aol_icon.gif\"> : AOL User <br>" + "<IMG SRC=\"dt_icon.gif\"> : Trial AIM User <br>" + "<IMG SRC=\"admin_icon.gif\"> : Administrator")); + g_show_info_text(buf, + (prof && strlen(prof)) ? + away_subs(prof, gc->username) : (infotype == AIM_GETINFO_GENERALINFO ? _("<i>No Information Provided</i>") : - _("<i>User has no away message</i>"))); - - g_show_info_text(away_subs(buf, gc->username)); + _("<i>User has no away message</i>")), + legend, + NULL); g_free(asc); @@ -2398,7 +2398,7 @@ at += g_snprintf(buf + at, len - at, "<B>%s has the following screen names:</B><BR>", address); for (i = 0; i < num; i++) at += g_snprintf(buf + at, len - at, "%s<BR>", &SNs[i * (MAXSNLEN + 1)]); - g_show_info_text(buf); + g_show_info_text(buf, NULL); g_free(buf); return 1; @@ -2491,7 +2491,7 @@ int flags = AIM_IMFLAGS_ACK; #if USE_PIXBUF GSList *h = odata->hasicons; - struct icon_req *ir; + struct icon_req *ir = NULL; char *who = normalize(name); while (h) { ir = h->data;
--- a/src/protocols/toc/toc.c Wed Aug 08 19:13:01 2001 +0000 +++ b/src/protocols/toc/toc.c Wed Aug 08 19:55:12 2001 +0000 @@ -307,7 +307,7 @@ if (!url_text) return; - g_show_info_text(url_text); + g_show_info_text(url_text, NULL); } static void toc_callback(gpointer data, gint source, GaimInputCondition condition)
--- a/src/protocols/zephyr/zephyr.c Wed Aug 08 19:13:01 2001 +0000 +++ b/src/protocols/zephyr/zephyr.c Wed Aug 08 19:55:12 2001 +0000 @@ -352,7 +352,7 @@ g_string_sprintfa(str, "<br>At %s since %s", locs.host, locs.time); } - g_show_info_text(str->str); + g_show_info_text(str->str, NULL); g_string_free(str, TRUE); } else serv_got_update(zgc, b->name, nlocs, 0, 0, 0, 0, 0);