Mercurial > pidgin.yaz
changeset 13122:d33a225fcb80
[gaim-migrate @ 15484]
Remove the gtkstatusbox code for displaying connection errors, since
we're using the error buttons in the buddy list, now.
I really think showing connection errors in the status box is a bad idea.
Users need a way to acknowledge that they've seen an error. Plus there
wasn't any way to tell which account it was for. Or view the full text
of the error message.
committer: Tailor Script <tailor@pidgin.im>
author | Mark Doliner <mark@kingant.net> |
---|---|
date | Sat, 04 Feb 2006 21:54:55 +0000 |
parents | e2a94ab60a7e |
children | a9f6d9a68a04 |
files | src/gtkconn.c src/gtkstatusbox.c src/gtkstatusbox.h |
diffstat | 3 files changed, 7 insertions(+), 54 deletions(-) [+] |
line wrap: on
line diff
--- a/src/gtkconn.c Sat Feb 04 21:42:02 2006 +0000 +++ b/src/gtkconn.c Sat Feb 04 21:54:55 2006 +0000 @@ -85,8 +85,6 @@ { g_hash_table_remove(errored_accounts, account); gaim_gtk_blist_update_account_error_state(account, NULL); - if (g_hash_table_size(errored_accounts) == 0) - gtk_gaim_status_box_set_error(GTK_GAIM_STATUS_BOX(gtkblist->statusbox), NULL); } } @@ -146,7 +144,6 @@ static void gaim_gtk_connection_report_disconnect(GaimConnection *gc, const char *text) { - GaimGtkBuddyList *gtkblist = gaim_gtk_blist_get_default_gtk_blist(); GaimAccount *account = NULL; GaimAutoRecon *info; GSList* errored_account; @@ -157,9 +154,6 @@ gaim_gtk_blist_update_account_error_state(account, text); if (!gc->wants_to_die) { - if (gtkblist != NULL) - gtk_gaim_status_box_set_error(GTK_GAIM_STATUS_BOX(gtkblist->statusbox), text); - if (info == NULL) { info = g_new0(GaimAutoRecon, 1); g_hash_table_insert(hash, account, info); @@ -235,14 +229,6 @@ { g_hash_table_remove(errored_accounts, account); gaim_gtk_blist_update_account_error_state(account, NULL); - if (g_hash_table_size(errored_accounts) == 0) - { - GaimGtkBuddyList *gtkblist; - - gtkblist = gaim_gtk_blist_get_default_gtk_blist(); - if (gtkblist != NULL) - gtk_gaim_status_box_set_error(GTK_GAIM_STATUS_BOX(gtkblist->statusbox), NULL); - } } }
--- a/src/gtkstatusbox.c Sat Feb 04 21:42:02 2006 +0000 +++ b/src/gtkstatusbox.c Sat Feb 04 21:54:55 2006 +0000 @@ -328,28 +328,17 @@ title = g_markup_escape_text(gaim_savedstatus_get_title(saved_status), -1); - if (status_box->error) { - gchar *tmp = g_markup_escape_text(status_box->error, -1); - text = g_strdup_printf("<span size=\"smaller\" weight=\"bold\" color=\"red\">%s</span>", - tmp); - g_free(tmp); - } else if (status_box->typing) { - text = g_strdup_printf("<span size=\"smaller\" color=\"%s\">%s</span>", - aa_color, _("Typing")); + if (status_box->typing) { + text = g_strdup(_("Typing")); } else if (status_box->connecting) { - text = g_strdup_printf("<span size=\"smaller\" color=\"%s\">%s</span>", - aa_color, _("Connecting")); + text = g_strdup(_("Connecting")); } else if (!gaim_savedstatus_is_transient(saved_status)) { const gchar *message; message = gaim_savedstatus_get_message(saved_status); if (message != NULL) { - gchar *stripped; - stripped = gaim_markup_strip_html(message); - gaim_util_chrreplace(stripped, '\n', ' '); - text = g_strdup_printf("<span size=\"smaller\" color=\"%s\">%s</span>", - aa_color, stripped); - g_free(stripped); + text = gaim_markup_strip_html(message); + gaim_util_chrreplace(text, '\n', ' '); } } @@ -363,7 +352,8 @@ char *separator; char *tmp; separator = show_buddy_icons ? "\n" : " - "; - tmp = g_strdup_printf("%s%s%s", title, separator, text); + tmp = g_strdup_printf("%s%s<span size=\"smaller\" color=\"%s\">%s</span>", + title, separator, aa_color, text); g_free(text); text = tmp; } else { @@ -374,8 +364,6 @@ /* Figure out what pixbuf to use */ if (status_box->connecting) pixbuf = status_box->connecting_pixbufs[status_box->connecting_index]; - else if (status_box->error) - pixbuf = status_box->error_pixbuf; else if (status_box->typing) pixbuf = status_box->typing_pixbufs[status_box->typing_index]; else @@ -714,11 +702,6 @@ icon_size = gtk_icon_size_from_name(GAIM_ICON_SIZE_STATUS_SMALL_TWO_LINE); } - if (status_box->error_pixbuf != NULL) - gdk_pixbuf_unref(status_box->error_pixbuf); - - status_box->error_pixbuf = gtk_widget_render_icon (GTK_WIDGET(status_box->vbox), GAIM_STOCK_STATUS_OFFLINE, - icon_size, "GtkGaimStatusBox"); if (status_box->connecting_pixbufs[0] != NULL) gdk_pixbuf_unref(status_box->connecting_pixbufs[0]); if (status_box->connecting_pixbufs[1] != NULL) @@ -1095,19 +1078,6 @@ } void -gtk_gaim_status_box_set_error(GtkGaimStatusBox *status_box, const gchar *error) -{ - if (status_box->error) - g_free(status_box->error); - status_box->error = NULL; -#if 0 - if (error != NULL) - status_box->error = g_strdup(error); -#endif - gtk_gaim_status_box_refresh(status_box); -} - -void gtk_gaim_status_box_set_connecting(GtkGaimStatusBox *status_box, gboolean connecting) { if (!status_box)
--- a/src/gtkstatusbox.h Sat Feb 04 21:42:02 2006 +0000 +++ b/src/gtkstatusbox.h Sat Feb 04 21:54:55 2006 +0000 @@ -143,9 +143,6 @@ gtk_gaim_status_box_add_separator(GtkGaimStatusBox *status_box); void -gtk_gaim_status_box_set_error(GtkGaimStatusBox *status_box, const gchar *error); - -void gtk_gaim_status_box_set_connecting(GtkGaimStatusBox *status_box, gboolean connecting); void