Mercurial > pidgin
comparison src/away.c @ 1191:4fd0d35826fe
[gaim-migrate @ 1201]
thanks to decklin for this patch.
for some reason the logic in strcpy_withhtml looks funny to me. i'm sure it's just me though.
committer: Tailor Script <tailor@pidgin.im>
author | Eric Warmenhoven <eric@warmenhoven.org> |
---|---|
date | Sun, 03 Dec 2000 09:50:39 +0000 |
parents | 47cf56b72d4b |
children | b5783215b245 |
comparison
equal
deleted
inserted
replaced
1190:c3ebd5932e32 | 1191:4fd0d35826fe |
---|---|
87 *ptr = '\n'; | 87 *ptr = '\n'; |
88 memmove(ptr + 1, ptr + 4, strlen(ptr + 4) + 1); | 88 memmove(ptr + 1, ptr + 4, strlen(ptr + 4) + 1); |
89 } | 89 } |
90 } | 90 } |
91 | 91 |
92 | |
93 void do_away_message(GtkWidget *w, struct away_message *a) | 92 void do_away_message(GtkWidget *w, struct away_message *a) |
94 { | 93 { |
95 GtkWidget *back; | 94 GtkWidget *back; |
96 GtkWidget *awaytext; | 95 GtkWidget *awaytext; |
97 GtkWidget *vscrollbar; | 96 GtkWidget *vscrollbar; |
176 cnv = cnv->next; | 175 cnv = cnv->next; |
177 } | 176 } |
178 | 177 |
179 | 178 |
180 buf2 = g_malloc(strlen(awaymessage->message)*4 + 1); | 179 buf2 = g_malloc(strlen(awaymessage->message)*4 + 1); |
181 strcpy(buf2, awaymessage->message); | 180 strncpy_withhtml(buf2, awaymessage->message, strlen(awaymessage->message)*4 + 1); |
182 serv_set_away(buf2); | 181 serv_set_away(buf2); |
183 g_free(buf2); | 182 g_free(buf2); |
184 gtk_widget_show(imaway); | 183 gtk_widget_show(imaway); |
185 plugin_event(event_away, 0, 0, 0, 0); | 184 plugin_event(event_away, 0, 0, 0, 0); |
186 } | 185 } |