changeset 1103:7aabbbaae829

[gaim-migrate @ 1113] lalala committer: Tailor Script <tailor@pidgin.im>
author Eric Warmenhoven <eric@warmenhoven.org>
date Fri, 17 Nov 2000 22:45:31 +0000
parents d7944415b1cc
children 46c10fa4e557
files PRPL doc/CREDITS src/buddy.c src/conversation.c
diffstat 4 files changed, 48 insertions(+), 10 deletions(-) [+]
line wrap: on
line diff
--- a/PRPL	Thu Nov 16 23:51:49 2000 +0000
+++ b/PRPL	Fri Nov 17 22:45:31 2000 +0000
@@ -5,7 +5,7 @@
 is still 1. The protocol_init function is expected to set the struct's protocol member to the
 appropriate value. If you want to write a new PRPL for gaim, please email one of the maintainers
 with the name of the protocol. We'll then reserve a number for it. Please do not use a number
-that has not been assigned to your protocol, not even for testing purposes.
+that has not been assigned to your protocol.
 
 The addition of PRPL to gaim means that gaim now supports multiple connections and multiple (and
 dynamically loadable) protocols.
--- a/doc/CREDITS	Thu Nov 16 23:51:49 2000 +0000
+++ b/doc/CREDITS	Fri Nov 17 22:45:31 2000 +0000
@@ -13,8 +13,8 @@
 Other Contributors:
 
 Adam Fritzler (mid)
-	Wrote libfaim, and added stuff to oscar.c to let people use
-	a proxy with libfaim.
+	Wrote libfaim, fixed the proxy code, and added the stuff to let
+	Oscar go through a proxy.
 
 Thanks to Torrey Searle for the spell checking code that
 accompanies the gtk_text box :)
@@ -44,6 +44,8 @@
 BMiller
 	A good collection of stuff. %n for away messages, import winaim
 	lists, pic/text/pic+text for buttons, among others
+Lance Rocker
+	Improved HTML formatting in logs, plus lots of debugging on *BSD.
 
 ergofobe:
 	GNOME Url handler patch
--- a/src/buddy.c	Thu Nov 16 23:51:49 2000 +0000
+++ b/src/buddy.c	Fri Nov 17 22:45:31 2000 +0000
@@ -292,8 +292,10 @@
 				g_free(b->show);
 				g_free(b);
 			} else if (g_slist_find(b->connlist, gc)) {
-				if (g_slist_find(b->connlist, gc))
+				if (g_slist_find(b->connlist, gc)) {
 					b->connlist = g_slist_remove(b->connlist, gc);
+					update_num_group(g);
+				}
 				m = g_slist_next(m);
 			} else
 				m = g_slist_next(m);
--- a/src/conversation.c	Thu Nov 16 23:51:49 2000 +0000
+++ b/src/conversation.c	Fri Nov 17 22:45:31 2000 +0000
@@ -802,6 +802,42 @@
 	g_free(s);
 }
 
+static char* add_br(char* p) {
+
+    char* temp_p = p;
+    char* buffer_p;
+    char* buffer_start;
+    int   num_cr = 0;
+    int   char_len = 0;
+
+    while( *temp_p != '\0' ) {
+	char_len++;
+	if( *temp_p == '\n' )
+	    num_cr++;
+	++temp_p;
+    }
+
+    temp_p = p;
+    buffer_p = g_malloc(char_len + ( 4 * num_cr ) + 1);
+    buffer_start = buffer_p;
+
+    while( *temp_p != '\0' ) {
+	*buffer_p = *temp_p;
+	if( *temp_p == '\n' ) {
+	    *buffer_p++ = '<';
+	    *buffer_p++ = 'B';
+	    *buffer_p++ = 'R';
+	    *buffer_p++ = '>';
+	    *buffer_p = '\n';
+	}
+	++buffer_p;
+	++temp_p;
+    }
+    *buffer_p = '\0';
+
+    return buffer_start;
+}
+
 void surround(GtkWidget *entry, char *pre, char *post)
 {
 	int temp, pos = GTK_EDITABLE(entry)->current_pos;
@@ -1314,8 +1350,8 @@
                                 t1 = strip_html(buf);
                                 t2 = strip_html(what);
                         } else {
-                                t1 = buf;
-                                t2 = what;
+                                t1 = add_br(buf);
+                                t2 = add_br(what);
                         }
                         fd = open_log_file(nm);
 			if (fd > 0) {
@@ -1326,10 +1362,8 @@
 				}
 				fclose(fd);
 			}
-                        if (general_options & OPT_GEN_STRIP_HTML) {
-                                g_free(t1);
-                                g_free(t2);
-                        }
+                        g_free(t1);
+                        g_free(t2);
 			g_free(nm);
                 }
         }