3 * Pidgin is the legal property of its developers, whose names are too numerous
4 * to list here. Please refer to the COPYRIGHT file distributed with this
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2 of the License, or
10 * (at your option) any later version.
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA
23 #include <pidgin/pidgintalkatu.h>
26 pidgin_talkatu_editor_new_for_connection(PurpleConnection
*pc
) {
27 GtkWidget
*editor
= NULL
;
28 GtkWidget
*view
= NULL
;
30 g_return_val_if_fail(pc
!= NULL
, NULL
);
32 editor
= talkatu_editor_new();
33 view
= talkatu_editor_get_view(TALKATU_EDITOR(editor
));
35 gtk_text_view_set_buffer(
37 pidgin_talkatu_buffer_new_for_connection(pc
)
44 pidgin_talkatu_buffer_new_for_connection(PurpleConnection
*pc
) {
45 PurpleConnectionFlags flags
= 0;
46 GtkTextBuffer
*buffer
= NULL
;
48 g_return_val_if_fail(pc
!= NULL
, NULL
);
50 flags
= purple_connection_get_flags(pc
);
52 if(flags
& PURPLE_CONNECTION_FLAG_HTML
) {
53 buffer
= talkatu_html_buffer_new();
54 } else if(flags
& PURPLE_CONNECTION_FLAG_FORMATTING_WBFO
) {
55 buffer
= talkatu_whole_buffer_new();
57 buffer
= talkatu_buffer_new(NULL
);