# HG changeset patch # User Eric Warmenhoven # Date 997300512 0 # Node ID 18722ae5b88202c322b0709954dbdf4a862e765a # Parent 73253b36c3cb88ffdd4d11873dcebd9d43be28fd [gaim-migrate @ 2147] i guess. committer: Tailor Script diff -r 73253b36c3cb -r 18722ae5b882 src/dialogs.c --- 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), "
", 0); gtk_adjustment_set_value(gtk_scrolled_window_get_vadjustment(GTK_SCROLLED_WINDOW(sw)), 0); diff -r 73253b36c3cb -r 18722ae5b882 src/gaim.h --- 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); diff -r 73253b36c3cb -r 18722ae5b882 src/protocols/icq/gaim_icq.c --- 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, diff -r 73253b36c3cb -r 18722ae5b882 src/protocols/irc/irc.c --- 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 @@ "Host: %s@%s
" "Name: %s
", res[3], res[4], res[5], res[7] + 1); - g_show_info_text(buf); + g_show_info_text(buf, NULL); } g_strfreev(res); diff -r 73253b36c3cb -r 18722ae5b882 src/protocols/jabber/jabber.c --- 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, "
%s
\n", desc); - g_show_info_text(buf); + g_show_info_text(buf, NULL); g_free(buddy); } diff -r 73253b36c3cb -r 18722ae5b882 src/protocols/oscar/oscar.c --- 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 : %d %%
\n" "Online Since : %s
\n" - "Idle Minutes : %d\n
\n

\n" - "%s" - "

Legend:

" - " : Normal AIM User
" - " : AOL User
" - " : Trial AIM User
" - " : Administrator"), + "Idle Minutes : %d\n
\n

\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, + _("

Legend:

" + " : Normal AIM User
" + " : AOL User
" + " : Trial AIM User
" + " : Administrator")); + g_show_info_text(buf, + (prof && strlen(prof)) ? + away_subs(prof, gc->username) : (infotype == AIM_GETINFO_GENERALINFO ? _("No Information Provided") : - _("User has no away message"))); - - g_show_info_text(away_subs(buf, gc->username)); + _("User has no away message")), + legend, + NULL); g_free(asc); @@ -2398,7 +2398,7 @@ at += g_snprintf(buf + at, len - at, "%s has the following screen names:
", address); for (i = 0; i < num; i++) at += g_snprintf(buf + at, len - at, "%s
", &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; diff -r 73253b36c3cb -r 18722ae5b882 src/protocols/toc/toc.c --- 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) diff -r 73253b36c3cb -r 18722ae5b882 src/protocols/zephyr/zephyr.c --- 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, "
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);