Mercurial > pidgin
changeset 11257:90be432e8385
[gaim-migrate @ 13432]
Removed warning from core.
I think you should be able to see others' warning levels in the tooltip,
but I haven't managed to warn myself from any client.
Being able to warn others will be dependent on protocol-specific convo
menus.
committer: Tailor Script <tailor@pidgin.im>
author | Sean Egan <seanegan@gmail.com> |
---|---|
date | Sun, 14 Aug 2005 03:50:35 +0000 |
parents | bb0d7b719af2 |
children | 421d91546327 |
files | src/gtkblist.c src/gtkblist.h src/gtkconv.c src/gtkconv.h src/gtkdialogs.c src/gtkdialogs.h src/protocols/gg/gg.c src/protocols/irc/irc.c src/protocols/jabber/jabber.c src/protocols/msn/msn.c src/protocols/napster/napster.c src/protocols/novell/novell.c src/protocols/oscar/oscar.c src/protocols/sametime/sametime.c src/protocols/silc/silc.c src/protocols/simple/simple.c src/protocols/toc/toc.c src/protocols/trepia/trepia.c src/protocols/yahoo/yahoo.c src/protocols/zephyr/zephyr.c src/prpl.c src/prpl.h src/server.c src/server.h src/status.c src/status.h |
diffstat | 26 files changed, 24 insertions(+), 350 deletions(-) [+] |
line wrap: on
line diff
--- a/src/gtkblist.c Sat Aug 13 22:09:34 2005 +0000 +++ b/src/gtkblist.c Sun Aug 14 03:50:35 2005 +0000 @@ -2792,7 +2792,6 @@ char *tmp; gboolean idle; time_t idle_secs, signon; - unsigned int warning_level; if (GAIM_BLIST_NODE_IS_CONTACT(node)) { @@ -2906,14 +2905,6 @@ } } - /* Warning */ - warning_level = gaim_presence_get_warning_level(presence); - if (warning_level > 0) - { - tmp = g_strdup_printf(_("%d%%"), warning_level); - g_string_append_printf(str, _("\n<b>Warned:</b> %s"), tmp); - g_free(tmp); - } /* Offline? */ if (!GAIM_BUDDY_IS_ONLINE(b)) { @@ -3114,8 +3105,7 @@ GaimContact *contact; GaimPresence *presence; struct _gaim_gtk_blist_node *gtkcontactnode = NULL; - char *idletime = NULL, *warning = NULL, *statustext = NULL; - unsigned int warning_level; + char *idletime = NULL, *statustext = NULL; time_t t; /* XXX Clean up this crap */ @@ -3214,50 +3204,35 @@ idletime = g_strdup(_("Idle ")); } - warning_level = gaim_presence_get_warning_level(presence); - - if (warning_level > 0) { - warning = g_strdup_printf(_("Warned (%d%%) "), warning_level); - } - if(!GAIM_BUDDY_IS_ONLINE(b) && !statustext) statustext = g_strdup(_("Offline ")); if (gaim_presence_is_idle(presence) && !selected) { text = g_strdup_printf("<span color='%s'>%s</span>\n" - "<span color='%s' size='smaller'>%s%s%s%s%s</span>", + "<span color='%s' size='smaller'>%s%s%s</span>", dim_grey(), esc, dim_grey(), statustext != NULL ? statustext : "", (idletime != NULL && statustext != NULL) ? " - " : "", - idletime != NULL ? idletime : "", - (warning != NULL && (statustext != NULL || idletime != NULL)) ? " - " : "", - warning != NULL ? warning : ""); - } else if (statustext == NULL && idletime == NULL && warning == NULL && - GAIM_BUDDY_IS_ONLINE(b)) { + idletime != NULL ? idletime : ""); + } else if (statustext == NULL && idletime == NULL && GAIM_BUDDY_IS_ONLINE(b)) { text = g_strdup(esc); } else { if (selected) text = g_strdup_printf("%s\n" - "<span size='smaller'>%s%s%s%s%s</span>", esc, + "<span size='smaller'>%s%s%s</span>", esc, statustext != NULL ? statustext : "", (idletime != NULL && statustext != NULL) ? " - " : "", - idletime != NULL ? idletime : "", - (warning != NULL && (statustext != NULL || idletime != NULL)) ? " - " : "", - warning != NULL ? warning : ""); + idletime != NULL ? idletime : ""); else text = g_strdup_printf("%s\n" - "<span color='%s' size='smaller'>%s%s%s%s%s</span>", esc, + "<span color='%s' size='smaller'>%s%s%s</span>", esc, dim_grey(), statustext != NULL ? statustext : "", (idletime != NULL && statustext != NULL) ? " - " : "", - idletime != NULL ? idletime : "", - (warning != NULL && (statustext != NULL || idletime != NULL)) ? " - " : "", - warning != NULL ? warning : ""); + idletime != NULL ? idletime : ""); } if (idletime) g_free(idletime); - if (warning) - g_free(warning); if (statustext) g_free(statustext); if (esc) @@ -3440,10 +3415,8 @@ if (gaim_prefs_get_bool("/gaim/gtk/blist/show_buddy_icons")) { gtk_tree_view_column_set_visible(gtkblist->buddy_icon_column, TRUE); gtk_tree_view_column_set_visible(gtkblist->idle_column, FALSE); - gtk_tree_view_column_set_visible(gtkblist->warning_column, FALSE); } else { gtk_tree_view_column_set_visible(gtkblist->idle_column, TRUE); - gtk_tree_view_column_set_visible(gtkblist->warning_column, TRUE); gtk_tree_view_column_set_visible(gtkblist->buddy_icon_column, FALSE); } } @@ -3591,8 +3564,8 @@ gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(sw), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC); gtkblist->treemodel = gtk_tree_store_new(BLIST_COLUMNS, - GDK_TYPE_PIXBUF, G_TYPE_BOOLEAN, G_TYPE_STRING, - G_TYPE_STRING, G_TYPE_STRING, GDK_TYPE_PIXBUF, G_TYPE_POINTER); + GDK_TYPE_PIXBUF, G_TYPE_BOOLEAN, + G_TYPE_STRING, G_TYPE_STRING, GDK_TYPE_PIXBUF, G_TYPE_POINTER); gtkblist->treeview = gtk_tree_view_new_with_model(GTK_TREE_MODEL(gtkblist->treemodel)); gtk_widget_show(gtkblist->treeview); @@ -3653,11 +3626,6 @@ gtk_tree_view_append_column(GTK_TREE_VIEW(gtkblist->treeview), gtkblist->idle_column); g_object_set(rend, "xalign", 1.0, "ypad", 0, NULL); - rend = gtk_cell_renderer_text_new(); - gtkblist->warning_column = gtk_tree_view_column_new_with_attributes("Warning", rend, "markup", WARNING_COLUMN, NULL); - gtk_tree_view_append_column(GTK_TREE_VIEW(gtkblist->treeview), gtkblist->warning_column); - g_object_set(rend, "xalign", 1.0, "ypad", 0, NULL); - rend = gtk_cell_renderer_pixbuf_new(); gtkblist->buddy_icon_column = gtk_tree_view_column_new_with_attributes("Buddy Icon", rend, "pixbuf", BUDDY_ICON_COLUMN, NULL); g_object_set(rend, "xalign", 1.0, "ypad", 0, NULL); @@ -3981,8 +3949,7 @@ GaimPresence *presence; GdkPixbuf *status, *avatar; char *mark; - char *warning = NULL, *idle = NULL; - unsigned int warning_level; + char *idle = NULL; gboolean selected = (gtkblist->selected_node == node); presence = gaim_buddy_get_presence(buddy); @@ -4013,20 +3980,8 @@ } } - warning_level = gaim_presence_get_warning_level(presence); - - if (warning_level > 0) - warning = g_strdup_printf("%d%%", warning_level); - if (gaim_presence_is_idle(presence)) { - if (warning && !selected) { - char *w2 = g_strdup_printf("<span color='%s'>%s</span>", - dim_grey(), warning); - g_free(warning); - warning = w2; - } - if (idle && !selected) { char *i2 = g_strdup_printf("<span color='%s'>%s</span>", dim_grey(), idle); @@ -4039,7 +3994,6 @@ STATUS_ICON_COLUMN, status, STATUS_ICON_VISIBLE_COLUMN, TRUE, NAME_COLUMN, mark, - WARNING_COLUMN, warning, IDLE_COLUMN, idle, BUDDY_ICON_COLUMN, avatar, -1); @@ -4047,8 +4001,6 @@ g_free(mark); if(idle) g_free(idle); - if(warning) - g_free(warning); if(status) g_object_unref(status); if(avatar) @@ -4095,7 +4047,6 @@ STATUS_ICON_COLUMN, status, STATUS_ICON_VISIBLE_COLUMN, TRUE, NAME_COLUMN, mark, - WARNING_COLUMN, NULL, IDLE_COLUMN, NULL, BUDDY_ICON_COLUMN, NULL, -1); @@ -4237,7 +4188,7 @@ gtkblist->window = gtkblist->vbox = gtkblist->treeview = NULL; gtkblist->treemodel = NULL; gtkblist->idle_column = NULL; - gtkblist->warning_column = gtkblist->buddy_icon_column = NULL; + gtkblist->buddy_icon_column = NULL; g_object_unref(G_OBJECT(gtkblist->ift)); protomenu = NULL; pluginmenu = NULL;
--- a/src/gtkblist.h Sat Aug 13 22:09:34 2005 +0000 +++ b/src/gtkblist.h Sun Aug 14 03:50:35 2005 +0000 @@ -31,7 +31,6 @@ STATUS_ICON_COLUMN, STATUS_ICON_VISIBLE_COLUMN, NAME_COLUMN, - WARNING_COLUMN, IDLE_COLUMN, BUDDY_ICON_COLUMN, NODE_COLUMN,
--- a/src/gtkconv.c Sat Aug 13 22:09:34 2005 +0000 +++ b/src/gtkconv.c Sun Aug 14 03:50:35 2005 +0000 @@ -1266,21 +1266,6 @@ } static void -menu_warn_cb(gpointer data, guint action, GtkWidget *widget) -{ - GaimConvWindow *win = (GaimConvWindow *)data; - GaimConversation *conv; - GaimConnection *gc; - - conv = gaim_conv_window_get_active_conversation(win); - gc = gaim_conversation_get_gc(conv); - - gaim_gtkdialogs_warn(gc, gaim_conversation_get_name(conv)); - - gtk_widget_grab_focus(GAIM_GTK_CONVERSATION(conv)->entry); -} - -static void menu_block_cb(gpointer data, guint action, GtkWidget *widget) { GaimConvWindow *win = (GaimConvWindow *)data; @@ -2800,7 +2785,6 @@ gtk_widget_show(gtkwin->menu.send_file); gtk_widget_show(gtkwin->menu.add_pounce); gtk_widget_show(gtkwin->menu.get_info); - gtk_widget_show(gtkwin->menu.warn); gtk_widget_hide(gtkwin->menu.invite); gtk_widget_show(gtkwin->menu.alias); gtk_widget_show(gtkwin->menu.block); @@ -2824,7 +2808,6 @@ gtk_widget_hide(gtkwin->menu.send_file); gtk_widget_hide(gtkwin->menu.add_pounce); gtk_widget_hide(gtkwin->menu.get_info); - gtk_widget_hide(gtkwin->menu.warn); gtk_widget_show(gtkwin->menu.invite); gtk_widget_show(gtkwin->menu.alias); gtk_widget_hide(gtkwin->menu.block); @@ -2876,7 +2859,6 @@ gtk_widget_set_sensitive(gtkwin->menu.view_log, TRUE); gtk_widget_set_sensitive(gtkwin->menu.add_pounce, TRUE); gtk_widget_set_sensitive(gtkwin->menu.get_info, (prpl_info->get_info != NULL)); - gtk_widget_set_sensitive(gtkwin->menu.warn, (prpl_info->warn != NULL)); gtk_widget_set_sensitive(gtkwin->menu.invite, (prpl_info->chat_invite != NULL)); gtk_widget_set_sensitive(gtkwin->menu.block, (prpl_info->add_deny != NULL)); gtk_widget_set_sensitive(gtkwin->menu.insert_link, (conv->features & GAIM_CONNECTION_HTML)); @@ -2913,7 +2895,6 @@ gtk_widget_set_sensitive(gtkwin->menu.send_file, FALSE); gtk_widget_set_sensitive(gtkwin->menu.add_pounce, TRUE); gtk_widget_set_sensitive(gtkwin->menu.get_info, FALSE); - gtk_widget_set_sensitive(gtkwin->menu.warn, FALSE); gtk_widget_set_sensitive(gtkwin->menu.invite, FALSE); gtk_widget_set_sensitive(gtkwin->menu.alias, FALSE); gtk_widget_set_sensitive(gtkwin->menu.block, FALSE); @@ -3663,8 +3644,6 @@ 0, NULL }, { N_("/Conversation/_Get Info"), "<CTL>O", menu_get_info_cb, 0, "<StockItem>", GAIM_STOCK_INFO }, - { N_("/Conversation/_Warn..."), NULL, menu_warn_cb, 0, - "<StockItem>", GAIM_STOCK_WARN }, { N_("/Conversation/In_vite..."), NULL, menu_invite_cb, 0, "<StockItem>", GAIM_STOCK_INVITE }, @@ -3759,10 +3738,6 @@ gtk_item_factory_get_widget(gtkwin->menu.item_factory, N_("/Conversation/Get Info")); - gtkwin->menu.warn = - gtk_item_factory_get_widget(gtkwin->menu.item_factory, - N_("/Conversation/Warn...")); - gtkwin->menu.invite = gtk_item_factory_get_widget(gtkwin->menu.item_factory, N_("/Conversation/Invite..."));
--- a/src/gtkconv.h Sat Aug 13 22:09:34 2005 +0000 +++ b/src/gtkconv.h Sun Aug 14 03:50:35 2005 +0000 @@ -77,7 +77,6 @@ GtkWidget *send_file; GtkWidget *add_pounce; GtkWidget *get_info; - GtkWidget *warn; GtkWidget *invite; GtkWidget *alias;
--- a/src/gtkdialogs.c Sat Aug 13 22:09:34 2005 +0000 +++ b/src/gtkdialogs.c Sun Aug 14 03:50:35 2005 +0000 @@ -42,13 +42,6 @@ static GtkWidget *about = NULL; -struct warning { - GtkWidget *window; - GtkWidget *anon; - char *who; - GaimConnection *gc; -}; - struct developer { char *name; char *role; @@ -713,85 +706,6 @@ } static void -gaim_gtkdialogs_warn_cb(GtkWidget *widget, gint resp, struct warning *w) -{ - if (resp == GTK_RESPONSE_OK) - serv_warn(w->gc, w->who, gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(w->anon))); - - dialogwindows = g_list_remove(dialogwindows, w->window); - gtk_widget_destroy(w->window); - - g_free(w->who); - g_free(w); -} - -/* - * TODO - Make this use the request API, if possible. - */ -void -gaim_gtkdialogs_warn(GaimConnection *gc, const char *who) -{ - gchar *labeltext; - GtkWidget *hbox, *vbox; - GtkWidget *label; - GtkWidget *img; - struct warning *w; - - g_return_if_fail(gc != NULL); - g_return_if_fail(who != NULL); - - w = g_new0(struct warning, 1); - w->who = g_strdup(who); - w->gc = gc; - - w->window = gtk_dialog_new_with_buttons(_("Warn User"), NULL, 0, - GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, - GAIM_STOCK_WARN, GTK_RESPONSE_OK, NULL); - gtk_dialog_set_default_response (GTK_DIALOG(w->window), GTK_RESPONSE_OK); - g_signal_connect(G_OBJECT(w->window), "response", G_CALLBACK(gaim_gtkdialogs_warn_cb), w); - - gtk_container_set_border_width (GTK_CONTAINER(w->window), GAIM_HIG_BOX_SPACE); - gtk_window_set_resizable(GTK_WINDOW(w->window), FALSE); - gtk_dialog_set_has_separator(GTK_DIALOG(w->window), FALSE); - gtk_box_set_spacing(GTK_BOX(GTK_DIALOG(w->window)->vbox), GAIM_HIG_BORDER); - gtk_container_set_border_width (GTK_CONTAINER(GTK_DIALOG(w->window)->vbox), GAIM_HIG_BOX_SPACE); - - hbox = gtk_hbox_new(FALSE, GAIM_HIG_BORDER); - gtk_container_add(GTK_CONTAINER(GTK_DIALOG(w->window)->vbox), hbox); - - img = gtk_image_new_from_stock(GAIM_STOCK_DIALOG_WARNING, GTK_ICON_SIZE_DIALOG); - gtk_misc_set_alignment(GTK_MISC(img), 0, 0); - gtk_box_pack_start(GTK_BOX(hbox), img, FALSE, FALSE, 0); - - vbox = gtk_vbox_new(FALSE, 0); - gtk_container_add(GTK_CONTAINER(hbox), vbox); - labeltext = g_strdup_printf(_("<span weight=\"bold\" size=\"larger\">Warn %s?</span>\n\n" - "This will increase %s's warning level and he or she will be subject to harsher rate limiting.\n"), who, who); - label = gtk_label_new(NULL); - gtk_label_set_markup(GTK_LABEL(label), labeltext); - gtk_label_set_line_wrap(GTK_LABEL(label), TRUE); - gtk_misc_set_alignment(GTK_MISC(label), 0, 0); - gtk_box_pack_start(GTK_BOX(vbox), label, FALSE, FALSE, 0); - g_free(labeltext); - - w->anon = gtk_check_button_new_with_mnemonic(_("Warn _anonymously?")); - gtk_box_pack_start(GTK_BOX(vbox), w->anon, FALSE, FALSE, 0); - - hbox = gtk_hbox_new(FALSE, GAIM_HIG_BOX_SPACE); - gtk_container_add(GTK_CONTAINER(vbox), hbox); - img = gtk_image_new_from_stock(GTK_STOCK_DIALOG_INFO, GTK_ICON_SIZE_MENU); - gtk_box_pack_start(GTK_BOX(hbox), img, FALSE, FALSE, 0); - labeltext = _("<b>Anonymous warnings are less severe.</b>"); - label = gtk_label_new(NULL); - gtk_label_set_markup(GTK_LABEL(label), labeltext); - gtk_label_set_line_wrap(GTK_LABEL(label), TRUE); - gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 0); - - dialogwindows = g_list_prepend(dialogwindows, w->window); - gtk_widget_show_all(w->window); -} - -static void gaim_gtkdialogs_alias_contact_cb(GaimContact *contact, const char *new_alias) { gaim_contact_set_alias(contact, new_alias);
--- a/src/gtkdialogs.h Sat Aug 13 22:09:34 2005 +0000 +++ b/src/gtkdialogs.h Sun Aug 14 03:50:35 2005 +0000 @@ -36,7 +36,6 @@ void gaim_gtkdialogs_im_with_user(GaimAccount *, const char *); void gaim_gtkdialogs_info(); void gaim_gtkdialogs_log(); -void gaim_gtkdialogs_warn(GaimConnection *, const char *); void gaim_gtkdialogs_alias_contact(GaimContact *); void gaim_gtkdialogs_alias_buddy(GaimBuddy *); void gaim_gtkdialogs_alias_chat(GaimChat *);
--- a/src/protocols/gg/gg.c Sat Aug 13 22:09:34 2005 +0000 +++ b/src/protocols/gg/gg.c Sun Aug 14 03:50:35 2005 +0000 @@ -1765,7 +1765,6 @@ agg_permit_deny_dummy, /* rem_permit */ agg_permit_deny_dummy, /* rem_deny */ agg_set_permit_deny_dummy, /* set_permit_deny */ - NULL, /* warn */ NULL, /* join_chat */ NULL, /* reject_chat */ NULL, /* get_chat_name */
--- a/src/protocols/irc/irc.c Sat Aug 13 22:09:34 2005 +0000 +++ b/src/protocols/irc/irc.c Sun Aug 14 03:50:35 2005 +0000 @@ -781,7 +781,6 @@ NULL, /* rem_permit */ NULL, /* rem_deny */ NULL, /* set_permit_deny */ - NULL, /* warn */ irc_chat_join, /* join_chat */ NULL, /* reject_chat */ irc_get_chat_name, /* get_chat_name */
--- a/src/protocols/jabber/jabber.c Sat Aug 13 22:09:34 2005 +0000 +++ b/src/protocols/jabber/jabber.c Sun Aug 14 03:50:35 2005 +0000 @@ -1543,7 +1543,6 @@ NULL, /* rem_permit */ NULL, /* rem_deny */ NULL, /* set_permit_deny */ - NULL, /* warn */ jabber_chat_join, /* join_chat */ NULL, /* reject_chat */ jabber_get_chat_name, /* get_chat_name */
--- a/src/protocols/msn/msn.c Sat Aug 13 22:09:34 2005 +0000 +++ b/src/protocols/msn/msn.c Sun Aug 14 03:50:35 2005 +0000 @@ -1852,7 +1852,6 @@ msn_rem_permit, /* rem_permit */ msn_rem_deny, /* rem_deny */ msn_set_permit_deny, /* set_permit_deny */ - NULL, /* warn */ NULL, /* join_chat */ NULL, /* reject chat invite */ NULL, /* get_chat_name */
--- a/src/protocols/napster/napster.c Sat Aug 13 22:09:34 2005 +0000 +++ b/src/protocols/napster/napster.c Sun Aug 14 03:50:35 2005 +0000 @@ -641,7 +641,6 @@ NULL, /* rem_permit */ NULL, /* rem_deny */ NULL, /* set_permit_deny */ - NULL, /* warn */ nap_join_chat, /* join_chat */ NULL, /* reject chat invite */ nap_get_chat_name, /* get_chat_name */
--- a/src/protocols/novell/novell.c Sat Aug 13 22:09:34 2005 +0000 +++ b/src/protocols/novell/novell.c Sun Aug 14 03:50:35 2005 +0000 @@ -3493,7 +3493,6 @@ novell_rem_permit, /* rem_permit */ novell_rem_deny, /* rem_deny */ novell_set_permit_deny, /* set_permit_deny */ - NULL, /* warn */ NULL, /* join_chat */ NULL, /* reject_chat */ NULL, /* get_chat_name */
--- a/src/protocols/oscar/oscar.c Sat Aug 13 22:09:34 2005 +0000 +++ b/src/protocols/oscar/oscar.c Sun Aug 14 03:50:35 2005 +0000 @@ -773,6 +773,13 @@ g_free(tmp); } + + if ((userinfo != NULL) && (userinfo->warnlevel != 0)) { + tmp = g_strdup_printf("%d", userinfo->warnlevel/10.0 + .5); + oscar_string_append(str, newline, _("Warning Level"), tmp); + g_free(tmp); + } + if ((userinfo != NULL) && (userinfo->capabilities != 0)) { tmp = oscar_caps_to_string(userinfo->capabilities); oscar_string_append(str, newline, _("Capabilities"), tmp); @@ -3168,7 +3175,7 @@ else gaim_prpl_got_user_status(account, info->sn, OSCAR_STATUS_ID_AVAILABLE, NULL); gaim_prpl_got_user_login_time(account, info->sn, signon - od->timeoffset); - gaim_prpl_got_user_warning_level(account, info->sn, info->warnlevel/10.0 + 0.5); + // gaim_prpl_got_user_warning_level(account, info->sn, info->warnlevel/10.0 + 0.5); if (time_idle > 0) gaim_prpl_got_user_idle(account, info->sn, TRUE, time_idle); @@ -4940,7 +4947,7 @@ va_end(ap); /* XXX - What's with the + 0.5? */ - gaim_prpl_got_account_warning_level(account, (userinfo && userinfo->sn) ? userinfo->sn : NULL, (newevil/10.0) + 0.5); + //gaim_prpl_got_account_warning_level(account, (userinfo && userinfo->sn) ? userinfo->sn : NULL, (newevil/10.0) + 0.5); return 1; } @@ -4959,7 +4966,7 @@ warning_level = info->warnlevel/10.0 + 0.5; - gaim_presence_set_warning_level(presence, warning_level); + // gaim_presence_set_warning_level(presence, warning_level); return 1; } @@ -7703,7 +7710,6 @@ oscar_rem_permit, /* rem_permit */ oscar_rem_deny, /* rem_deny */ oscar_set_permit_deny, /* set_permit_deny */ - oscar_warn, /* warn */ oscar_join_chat, /* join_chat */ NULL, /* reject_chat */ oscar_get_chat_name, /* get_chat_name */
--- a/src/protocols/sametime/sametime.c Sat Aug 13 22:09:34 2005 +0000 +++ b/src/protocols/sametime/sametime.c Sun Aug 14 03:50:35 2005 +0000 @@ -4402,7 +4402,6 @@ .rem_permit = mw_prpl_rem_permit, .rem_deny = mw_prpl_rem_deny, .set_permit_deny = mw_prpl_set_permit_deny, - .warn = NULL, .join_chat = mw_prpl_join_chat, .reject_chat = mw_prpl_reject_chat, .get_chat_name = mw_prpl_get_chat_name,
--- a/src/protocols/silc/silc.c Sat Aug 13 22:09:34 2005 +0000 +++ b/src/protocols/silc/silc.c Sun Aug 14 03:50:35 2005 +0000 @@ -1526,7 +1526,6 @@ NULL, /* rem_permit */ NULL, /* rem_deny */ NULL, /* set_permit_deny */ - NULL, /* warn */ silcgaim_chat_join, /* join_chat */ NULL, /* reject_chat */ silcgaim_get_chat_name, /* get_chat_name */
--- a/src/protocols/simple/simple.c Sat Aug 13 22:09:34 2005 +0000 +++ b/src/protocols/simple/simple.c Sun Aug 14 03:50:35 2005 +0000 @@ -1244,7 +1244,6 @@ NULL, /* rem_permit */ NULL, /* rem_deny */ NULL, /* set_permit_deny */ - NULL, /* warn */ NULL, /* join_chat */ NULL, /* reject_chat */ NULL, /* get_chat_name */
--- a/src/protocols/toc/toc.c Sat Aug 13 22:09:34 2005 +0000 +++ b/src/protocols/toc/toc.c Sun Aug 14 03:50:35 2005 +0000 @@ -859,7 +859,7 @@ if (!strcmp(tmp, gaim_normalize(account, c))) { gaim_connection_set_display_name(gc, c); /* XXX - What should the second parameter be here? */ - gaim_prpl_got_account_warning_level(account, NULL, evil); + /* gaim_prpl_got_account_warning_level(account, NULL, evil);*/ gaim_prpl_got_account_login_time(account, signon); } g_free(tmp); @@ -879,7 +879,7 @@ sscanf(strtok(NULL, ":"), "%d", &lev); name = strtok(NULL, ":"); - gaim_prpl_got_account_warning_level(account, name, lev); + /* gaim_prpl_got_account_warning_level(account, name, lev); */ } else if (!g_ascii_strcasecmp(c, "CHAT_JOIN")) { char *name; int id; @@ -2269,7 +2269,6 @@ toc_rem_permit, /* rem_permit */ toc_rem_deny, /* rem_deny */ toc_set_permit_deny, /* set_permit_deny */ - toc_warn, /* warn */ toc_join_chat, /* join_chat */ NULL, /* reject_chat */ NULL, /* get_chat_name */
--- a/src/protocols/trepia/trepia.c Sat Aug 13 22:09:34 2005 +0000 +++ b/src/protocols/trepia/trepia.c Sun Aug 14 03:50:35 2005 +0000 @@ -1231,7 +1231,6 @@ NULL, /* rem_permit */ NULL, /* rem_deny */ NULL, /* set_permit_deny */ - NULL, /* warn */ NULL, /* join_chat */ NULL, /* reject_chat */ NULL, /* get_chat_name */
--- a/src/protocols/yahoo/yahoo.c Sat Aug 13 22:09:34 2005 +0000 +++ b/src/protocols/yahoo/yahoo.c Sun Aug 14 03:50:35 2005 +0000 @@ -3541,7 +3541,6 @@ yahoo_rem_permit, yahoo_rem_deny, yahoo_set_permit_deny, - NULL, /* warn */ yahoo_c_join, NULL, /* reject chat invite */ yahoo_get_chat_name,
--- a/src/protocols/zephyr/zephyr.c Sat Aug 13 22:09:34 2005 +0000 +++ b/src/protocols/zephyr/zephyr.c Sun Aug 14 03:50:35 2005 +0000 @@ -2801,7 +2801,6 @@ zephyr_remove_permit, /* remove_permit */ zephyr_remove_deny, /* remove_deny */ zephyr_set_permit_deny, /* set_permit_deny */ - NULL, /* warn -- not supported in zephyr */ zephyr_join_chat, /* join_chat */ NULL, /* reject_chat -- No chat invites*/ zephyr_get_chat_name, /* get_chat_name */
--- a/src/prpl.c Sat Aug 13 22:09:34 2005 +0000 +++ b/src/prpl.c Sun Aug 14 03:50:35 2005 +0000 @@ -185,43 +185,6 @@ } void -gaim_prpl_got_account_warning_level(GaimAccount *account, const char *username, - unsigned int level) -{ - GaimPresence *presence; - unsigned int old_level; - gchar *buf; - - g_return_if_fail(account != NULL); - - presence = gaim_account_get_presence(account); - - gaim_signal_emit(gaim_accounts_get_handle(), "account-warned", - account, username, level); - - old_level = gaim_presence_get_warning_level(presence); - gaim_presence_set_warning_level(presence, level); - - if (old_level >= level) - return; - - if (username == NULL) - buf = g_strdup_printf(_("%s has just been warned by an anonymous " - "person.\nYour new warning level is %d%%"), - gaim_account_get_username(account), - level); - else - buf = g_strdup_printf(_("%s has just been warned by %s.\n" - "Your new warning level is %d%%"), - gaim_account_get_username(account), - username, level); - - gaim_notify_info(NULL, NULL, buf, NULL); - - g_free(buf); -} - -void gaim_prpl_got_user_idle(GaimAccount *account, const char *name, gboolean idle, time_t idle_time) { @@ -316,28 +279,6 @@ } void -gaim_prpl_got_user_warning_level(GaimAccount *account, const char *name, - unsigned int level) -{ - GSList *l; - - g_return_if_fail(account != NULL); - g_return_if_fail(name != NULL); - - for (l = gaim_find_buddies(account, name); l != NULL; l = l->next) - { - GaimBuddy *buddy; - GaimPresence *presence; - - buddy = (GaimBuddy *)l->data; - - presence = gaim_buddy_get_presence(buddy); - - gaim_presence_set_warning_level(presence, level); - } -} - -void gaim_prpl_change_account_status(GaimAccount *account, GaimStatus *old_status, GaimStatus *new_status) {
--- a/src/prpl.h Sat Aug 13 22:09:34 2005 +0000 +++ b/src/prpl.h Sun Aug 14 03:50:35 2005 +0000 @@ -235,7 +235,6 @@ void (*rem_permit)(GaimConnection *, const char *name); void (*rem_deny)(GaimConnection *, const char *name); void (*set_permit_deny)(GaimConnection *); - void (*warn)(GaimConnection *, const char *who, gboolean anonymous); void (*join_chat)(GaimConnection *, GHashTable *components); void (*reject_chat)(GaimConnection *, GHashTable *components); char *(*get_chat_name)(GHashTable *components); @@ -343,21 +342,6 @@ void gaim_prpl_got_account_status(GaimAccount *account, const char *status_id, const char *attr_id, ...); - -/** - * Notifies Gaim that an account's warning level has changed. - * - * This is meant to be called from protocol plugins. - * - * @param account The account the user is on. - * @param username The user that warned the account. - * @param level The new warning level. - */ -void gaim_prpl_got_account_warning_level(GaimAccount *account, - const char *username, - unsigned int level); - - /** * Notifies Gaim that a user's idle state and time have changed. * @@ -399,19 +383,6 @@ */ void gaim_prpl_got_user_status(GaimAccount *account, const char *name, const char *status_id, const char *attr_id, ...); - -/** - * Notifies Gaim that a user's warning level has changed. - * - * This is meant to be called from protocol plugins. - * - * @param account The account the user is on. - * @param name The screen name of the user. - * @param level The new warning level. - */ -void gaim_prpl_got_user_warning_level(GaimAccount *account, const char *name, - unsigned int level); - /** * Informs the server that an account's status changed. *
--- a/src/server.c Sat Aug 13 22:09:34 2005 +0000 +++ b/src/server.c Sun Aug 14 03:50:35 2005 +0000 @@ -454,16 +454,6 @@ prpl_info->set_idle(g, time); } -void serv_warn(GaimConnection *g, const char *name, gboolean anonymous) -{ - GaimPluginProtocolInfo *prpl_info = NULL; - - if (g != NULL && g->prpl != NULL) - prpl_info = GAIM_PLUGIN_PROTOCOL_INFO(g->prpl); - - if (prpl_info && g_list_find(gaim_connections_get_all(), g) && prpl_info->warn) - prpl_info->warn(g, name, anonymous); -} void serv_join_chat(GaimConnection *g, GHashTable *data) {
--- a/src/server.h Sat Aug 13 22:09:34 2005 +0000 +++ b/src/server.h Sun Aug 14 03:50:35 2005 +0000 @@ -51,7 +51,6 @@ void serv_rem_permit(GaimConnection *, const char *); void serv_rem_deny(GaimConnection *, const char *); void serv_set_permit_deny(GaimConnection *); -void serv_warn(GaimConnection *, const char *, gboolean); void serv_join_chat(GaimConnection *, GHashTable *); void serv_reject_chat(GaimConnection *, GHashTable *); void serv_chat_invite(GaimConnection *, int, const char *, const char *);
--- a/src/status.c Sat Aug 13 22:09:34 2005 +0000 +++ b/src/status.c Sun Aug 14 03:50:35 2005 +0000 @@ -71,8 +71,6 @@ time_t idle_time; time_t login_time; - unsigned int warning_level; - GList *statuses; GHashTable *status_table; @@ -1382,35 +1380,6 @@ presence->login_time = login_time; } -void -gaim_presence_set_warning_level(GaimPresence *presence, unsigned int level) -{ - g_return_if_fail(presence != NULL); - g_return_if_fail(level <= 100); - - if (presence->warning_level == level) - return; - - presence->warning_level = level; - - if (gaim_presence_get_context(presence) == GAIM_PRESENCE_CONTEXT_BUDDY) - { - GaimBlistUiOps *ops = gaim_get_blist()->ui_ops; - - if (ops != NULL && ops->update != NULL) - { - const GList *l; - - for (l = gaim_presence_get_buddies(presence); - l != NULL; - l = l->next) - { - ops->update(gaim_get_blist(), (GaimBlistNode *)l->data); - } - } - } -} - GaimPresenceContext gaim_presence_get_context(const GaimPresence *presence) { @@ -1586,14 +1555,6 @@ return presence->idle_time; } -unsigned int -gaim_presence_get_warning_level(const GaimPresence *presence) -{ - g_return_val_if_fail(presence != NULL, 0); - - return presence->warning_level; -} - time_t gaim_presence_get_login_time(const GaimPresence *presence) {
--- a/src/status.h Sat Aug 13 22:09:34 2005 +0000 +++ b/src/status.h Sun Aug 14 03:50:35 2005 +0000 @@ -820,15 +820,6 @@ */ void gaim_presence_set_login_time(GaimPresence *presence, time_t login_time); -/** - * Sets the warning level on a presence. - * - * @param presence The presence. - * @param level The warning level. An integer between 0 and 100 - * (inclusive) representing the percentage warned. - */ -void gaim_presence_set_warning_level(GaimPresence *presence, - unsigned int level); /** * Returns the presence's context. @@ -970,15 +961,6 @@ time_t gaim_presence_get_idle_time(const GaimPresence *presence); /** - * Returns the presence's warning level. - * - * @param presence The presence. - * - * @return The presence's warning level. - */ -unsigned int gaim_presence_get_warning_level(const GaimPresence *presence); - -/** * Returns the presence's login time. * * @param presence The presence.