Update of /cvsroot/gaim/gaim/src
In directory usw-pr-cvs1:/tmp/cvs-serv6413
Modified Files:
conversation.c buddy_chat.c
Log Message:
bah. this is better.
Index: conversation.c
===================================================================
RCS file: /cvsroot/gaim/gaim/src/conversation.c,v
retrieving revision 1.287
retrieving revision 1.288
diff -u -d -r1.287 -r1.288
--- conversation.c 2001/10/27 00:12:14 1.287
+++ conversation.c 2001/10/27 23:46:12 1.288
@@ -723,8 +723,11 @@
gtk_signal_emit_stop_by_name(GTK_OBJECT(entry), "key_press_event");
}
}
- if (event->keyval == 'l')
+ if (event->keyval == 'l') {
gtk_imhtml_clear(GTK_IMHTML(c->text));
+ g_string_free(c->history, TRUE);
+ c->history = g_string_new("");
+ }
if ((!c->is_chat && (im_options & OPT_IM_ONE_WINDOW)) ||
(c->is_chat && (chat_options & OPT_CHAT_ONE_WINDOW))) {
GtkWidget *notebook = (c->is_chat ? chat_notebook : convo_notebook);
Index: buddy_chat.c
===================================================================
RCS file: /cvsroot/gaim/gaim/src/buddy_chat.c,v
retrieving revision 1.125
retrieving revision 1.126
diff -u -d -r1.125 -r1.126
--- buddy_chat.c 2001/10/27 21:45:17 1.125
+++ buddy_chat.c 2001/10/27 23:46:12 1.126
@@ -898,15 +898,6 @@
char tmp[BUF_LONG];
- /* we need to check to see if they're ignored before we remove them from the list,
- * because otherwise the name is free'd (ignored and in_room point to the same char*'s)
- * and we can't search through ignored reliably anymore */
- while (ignored) {
- if (!g_strcasecmp(old, ignored->data))
- break;
- ignored = ignored->next;
- }
-
while (names) {
if (!g_strcasecmp((char *)names->data, old)) {
char *tmp2 = names->data;
@@ -933,9 +924,16 @@
b->in_room = g_list_insert_sorted(b->in_room, name, insertname);
pos = g_list_index(b->in_room, name);
+ while (ignored) {
+ if (!g_strcasecmp(old, ignored->data))
+ break;
+ ignored = ignored->next;
+ }
+
if (ignored) {
+ g_free(ignored->data);
b->ignored = g_list_remove(b->ignored, ignored->data);
- b->ignored = g_list_append(b->ignored, name);
+ b->ignored = g_list_append(b->ignored, g_strdup(name));
g_snprintf(tmp, sizeof(tmp), "X %s", name);
list_item = gtk_list_item_new_with_label(tmp);
} else
@@ -984,6 +982,8 @@
if (!names)
return;
+ /* don't remove them from ignored in case they re-enter */
+
g_snprintf(tmp, sizeof(tmp), _("%d %s in room"), g_list_length(b->in_room),
g_list_length(b->in_room) == 1 ? "person" : "people");
gtk_label_set_text(GTK_LABEL(b->count), tmp);
@@ -1047,6 +1047,7 @@
}
if (ignored) {
+ g_free(ignored->data);
b->ignored = g_list_remove(b->ignored, ignored->data);
g_snprintf(tmp, sizeof tmp, "%s", name);
} else {
|