comparison src/away.c @ 1292:cb84b5c6d9ab

[gaim-migrate @ 1302] Patches from Decklin and "Falling Thanks guys :) committer: Tailor Script <tailor@pidgin.im>
author Rob Flynn <gaim@robflynn.com>
date Mon, 18 Dec 2000 05:17:58 +0000
parents 83d8b2078f4c
children 868f9c98db13
comparison
equal deleted inserted replaced
1291:ddfb2f68c590 1292:cb84b5c6d9ab
67 insert_applet_away(); 67 insert_applet_away();
68 #endif /* USE_APPLET */ 68 #endif /* USE_APPLET */
69 } 69 }
70 70
71 71
72 /*
73 * rcg10312000 This could be more robust, but it works for my current
74 * goal: to remove those annoying <BR> tags. :)
75 */
76 static void strncpy_nohtml(gchar * dest, const gchar * src, size_t destsize)
77 {
78 gchar *ptr;
79 g_snprintf(dest, destsize, "%s", src);
80
81 while (1) {
82 ptr = strstr(dest, "<BR>");
83 if (ptr == NULL) /* done? */
84 return;
85
86 /* replace <BR> with a newline. */
87 *ptr = '\n';
88 memmove(ptr + 1, ptr + 4, strlen(ptr + 4) + 1);
89 }
90 }
91
92 void do_away_message(GtkWidget *w, struct away_message *a) 72 void do_away_message(GtkWidget *w, struct away_message *a)
93 { 73 {
94 GtkWidget *back; 74 GtkWidget *back;
95 GtkWidget *awaytext; 75 GtkWidget *awaytext;
96 GtkWidget *vscrollbar; 76 GtkWidget *vscrollbar;