Sat, 25 Nov 2017 21:42:28 +0800
jabber.c: fix #17270, ignore STARTTLS when using BOSH.
Pidgin wants to establish a TLS connection with a STARTTLS request, but
it doesn't make any sense, since the XMPP stream is proxied by the BOSH
connection, which is already encrypted by HTTPS. It is impossible to
STARTTLS with BOSH.
According to XEP-0206: The client SHOULD ignore any Transport Layer Security
(TLS) feature since BOSH channel encryption SHOULD be negotiated at the HTTP
layer.
Failing to do it causes Pidgin fails to create any connection with BOSH to any
XMPP server with STARTTLS enabled.
https://developer.pidgin.im/ticket/17270
|
13945
a13c6e122e1b
[gaim-migrate @ 16363]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
1 | #include "gntbutton.h" |
|
a13c6e122e1b
[gaim-migrate @ 16363]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
2 | #include "gnt.h" |
|
a13c6e122e1b
[gaim-migrate @ 16363]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
3 | #include "gntkeys.h" |
|
a13c6e122e1b
[gaim-migrate @ 16363]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
4 | #include "gnttree.h" |
|
a13c6e122e1b
[gaim-migrate @ 16363]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
5 | #include "gntbox.h" |
|
a13c6e122e1b
[gaim-migrate @ 16363]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
6 | #include "gntentry.h" |
|
a13c6e122e1b
[gaim-migrate @ 16363]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
7 | #include "gnttextview.h" |
|
19456
a37d7ba493d4
Add support to parse and add XHTML in a textview. This we can use for logs,
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
18762
diff
changeset
|
8 | #include "gntutils.h" |
|
13945
a13c6e122e1b
[gaim-migrate @ 16363]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
9 | |
|
a13c6e122e1b
[gaim-migrate @ 16363]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
10 | static gboolean |
|
a13c6e122e1b
[gaim-migrate @ 16363]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
11 | key_pressed(GntWidget *w, const char *key, GntWidget *view) |
|
a13c6e122e1b
[gaim-migrate @ 16363]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
12 | { |
|
a13c6e122e1b
[gaim-migrate @ 16363]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
13 | if (key[0] == '\r' && key[1] == 0) |
|
a13c6e122e1b
[gaim-migrate @ 16363]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
14 | { |
|
a13c6e122e1b
[gaim-migrate @ 16363]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
15 | gnt_text_view_append_text_with_flags(GNT_TEXT_VIEW(view), |
|
a13c6e122e1b
[gaim-migrate @ 16363]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
16 | gnt_entry_get_text(GNT_ENTRY(w)), |
|
14855
84c869823944
[gaim-migrate @ 17558]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
14459
diff
changeset
|
17 | GNT_TEXT_FLAG_UNDERLINE | GNT_TEXT_FLAG_HIGHLIGHT); |
|
14153
9da98052a4e1
[gaim-migrate @ 16715]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
14103
diff
changeset
|
18 | gnt_entry_add_to_history(GNT_ENTRY(w), gnt_entry_get_text(GNT_ENTRY(w))); |
|
13958
bd1c3bb3f33d
[gaim-migrate @ 16381]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
13945
diff
changeset
|
19 | gnt_text_view_next_line(GNT_TEXT_VIEW(view)); |
|
13945
a13c6e122e1b
[gaim-migrate @ 16363]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
20 | gnt_entry_clear(GNT_ENTRY(w)); |
|
14103
bcac61d40461
[gaim-migrate @ 16647]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
14022
diff
changeset
|
21 | if (gnt_text_view_get_lines_below(GNT_TEXT_VIEW(view)) <= 1) |
|
bcac61d40461
[gaim-migrate @ 16647]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
14022
diff
changeset
|
22 | gnt_text_view_scroll(GNT_TEXT_VIEW(view), 0); |
|
14153
9da98052a4e1
[gaim-migrate @ 16715]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
14103
diff
changeset
|
23 | gnt_entry_remove_suggest(GNT_ENTRY(w), "acb"); |
|
13945
a13c6e122e1b
[gaim-migrate @ 16363]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
24 | |
|
a13c6e122e1b
[gaim-migrate @ 16363]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
25 | return TRUE; |
|
a13c6e122e1b
[gaim-migrate @ 16363]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
26 | } |
|
18762
1d4a091693f5
Changes to the test apps.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
15886
diff
changeset
|
27 | else if (strcmp(key, "\033" "e") == 0) |
|
1d4a091693f5
Changes to the test apps.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
15886
diff
changeset
|
28 | { |
|
1d4a091693f5
Changes to the test apps.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
15886
diff
changeset
|
29 | if (fork() == 0) { |
|
1d4a091693f5
Changes to the test apps.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
15886
diff
changeset
|
30 | endwin(); |
|
1d4a091693f5
Changes to the test apps.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
15886
diff
changeset
|
31 | printf("%s\n", GNT_TEXT_VIEW(view)->string->str); |
|
1d4a091693f5
Changes to the test apps.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
15886
diff
changeset
|
32 | fflush(stdout); |
|
1d4a091693f5
Changes to the test apps.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
15886
diff
changeset
|
33 | getch(); |
|
1d4a091693f5
Changes to the test apps.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
15886
diff
changeset
|
34 | refresh(); |
|
1d4a091693f5
Changes to the test apps.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
15886
diff
changeset
|
35 | exit(0); |
|
1d4a091693f5
Changes to the test apps.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
15886
diff
changeset
|
36 | } |
|
1d4a091693f5
Changes to the test apps.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
15886
diff
changeset
|
37 | } |
|
13945
a13c6e122e1b
[gaim-migrate @ 16363]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
38 | else if (key[0] == 27) |
|
a13c6e122e1b
[gaim-migrate @ 16363]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
39 | { |
|
14962
abfaa2e03ac7
[gaim-migrate @ 17672]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
14855
diff
changeset
|
40 | if (strcmp(key, GNT_KEY_UP) == 0) |
|
14153
9da98052a4e1
[gaim-migrate @ 16715]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
14103
diff
changeset
|
41 | gnt_text_view_scroll(GNT_TEXT_VIEW(view), -1); |
|
14962
abfaa2e03ac7
[gaim-migrate @ 17672]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
14855
diff
changeset
|
42 | else if (strcmp(key, GNT_KEY_DOWN) == 0) |
|
13945
a13c6e122e1b
[gaim-migrate @ 16363]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
43 | gnt_text_view_scroll(GNT_TEXT_VIEW(view), 1); |
|
14153
9da98052a4e1
[gaim-migrate @ 16715]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
14103
diff
changeset
|
44 | else |
|
9da98052a4e1
[gaim-migrate @ 16715]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
14103
diff
changeset
|
45 | return FALSE; |
|
9da98052a4e1
[gaim-migrate @ 16715]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
14103
diff
changeset
|
46 | return TRUE; |
|
13945
a13c6e122e1b
[gaim-migrate @ 16363]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
47 | } |
|
31294
73607ab89c6f
Remove trailing whitespace
Richard Laager <rlaager@pidgin.im>
parents:
21725
diff
changeset
|
48 | |
|
13945
a13c6e122e1b
[gaim-migrate @ 16363]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
49 | return FALSE; |
|
a13c6e122e1b
[gaim-migrate @ 16363]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
50 | } |
|
a13c6e122e1b
[gaim-migrate @ 16363]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
51 | |
|
18762
1d4a091693f5
Changes to the test apps.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
15886
diff
changeset
|
52 | static void |
|
1d4a091693f5
Changes to the test apps.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
15886
diff
changeset
|
53 | completion_cb(GntEntry *entry, const char *start, const char *end) |
|
1d4a091693f5
Changes to the test apps.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
15886
diff
changeset
|
54 | { |
|
1d4a091693f5
Changes to the test apps.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
15886
diff
changeset
|
55 | if (start == entry->start) |
|
1d4a091693f5
Changes to the test apps.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
15886
diff
changeset
|
56 | gnt_widget_key_pressed(GNT_WIDGET(entry), ": "); |
|
1d4a091693f5
Changes to the test apps.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
15886
diff
changeset
|
57 | } |
|
1d4a091693f5
Changes to the test apps.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
15886
diff
changeset
|
58 | |
|
13945
a13c6e122e1b
[gaim-migrate @ 16363]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
59 | int main() |
|
a13c6e122e1b
[gaim-migrate @ 16363]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
60 | { |
|
a13c6e122e1b
[gaim-migrate @ 16363]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
61 | GntWidget *hbox, *entry, *view; |
|
a13c6e122e1b
[gaim-migrate @ 16363]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
62 | |
|
14022
51776fed1be2
[gaim-migrate @ 16513]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
14015
diff
changeset
|
63 | #ifdef STANDALONE |
|
13945
a13c6e122e1b
[gaim-migrate @ 16363]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
64 | freopen(".error", "w", stderr); |
|
a13c6e122e1b
[gaim-migrate @ 16363]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
65 | |
|
a13c6e122e1b
[gaim-migrate @ 16363]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
66 | gnt_init(); |
|
14022
51776fed1be2
[gaim-migrate @ 16513]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
14015
diff
changeset
|
67 | #endif |
|
13945
a13c6e122e1b
[gaim-migrate @ 16363]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
68 | |
|
a13c6e122e1b
[gaim-migrate @ 16363]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
69 | hbox = gnt_box_new(FALSE, TRUE); |
|
a13c6e122e1b
[gaim-migrate @ 16363]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
70 | gnt_widget_set_name(hbox, "hbox"); |
|
a13c6e122e1b
[gaim-migrate @ 16363]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
71 | gnt_box_set_toplevel(GNT_BOX(hbox), TRUE); |
|
14015
e543d2109729
[gaim-migrate @ 16501]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
14014
diff
changeset
|
72 | gnt_box_set_fill(GNT_BOX(hbox), FALSE); |
|
13945
a13c6e122e1b
[gaim-migrate @ 16363]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
73 | gnt_box_set_title(GNT_BOX(hbox), "Textview test"); |
|
14015
e543d2109729
[gaim-migrate @ 16501]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
14014
diff
changeset
|
74 | gnt_box_set_alignment(GNT_BOX(hbox), GNT_ALIGN_MID); |
|
13945
a13c6e122e1b
[gaim-migrate @ 16363]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
75 | |
|
a13c6e122e1b
[gaim-migrate @ 16363]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
76 | entry = gnt_entry_new(NULL); |
|
a13c6e122e1b
[gaim-migrate @ 16363]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
77 | gnt_widget_set_name(entry, "entry"); |
|
a13c6e122e1b
[gaim-migrate @ 16363]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
78 | GNT_WIDGET_SET_FLAGS(entry, GNT_WIDGET_CAN_TAKE_FOCUS); |
|
a13c6e122e1b
[gaim-migrate @ 16363]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
79 | |
|
18762
1d4a091693f5
Changes to the test apps.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
15886
diff
changeset
|
80 | g_signal_connect(G_OBJECT(entry), "completion", G_CALLBACK(completion_cb), NULL); |
|
1d4a091693f5
Changes to the test apps.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
15886
diff
changeset
|
81 | |
|
14153
9da98052a4e1
[gaim-migrate @ 16715]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
14103
diff
changeset
|
82 | gnt_entry_set_word_suggest(GNT_ENTRY(entry), TRUE); |
|
9da98052a4e1
[gaim-migrate @ 16715]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
14103
diff
changeset
|
83 | gnt_entry_set_always_suggest(GNT_ENTRY(entry), FALSE); |
|
9da98052a4e1
[gaim-migrate @ 16715]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
14103
diff
changeset
|
84 | gnt_entry_add_suggest(GNT_ENTRY(entry), "a"); |
|
9da98052a4e1
[gaim-migrate @ 16715]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
14103
diff
changeset
|
85 | gnt_entry_add_suggest(GNT_ENTRY(entry), "ab"); |
|
14167
ca6027c33d2c
[gaim-migrate @ 16739]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
14153
diff
changeset
|
86 | gnt_entry_add_suggest(GNT_ENTRY(entry), "abe"); |
|
14153
9da98052a4e1
[gaim-migrate @ 16715]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
14103
diff
changeset
|
87 | gnt_entry_add_suggest(GNT_ENTRY(entry), "abc"); |
|
14167
ca6027c33d2c
[gaim-migrate @ 16739]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
14153
diff
changeset
|
88 | gnt_entry_add_suggest(GNT_ENTRY(entry), "abcde"); |
|
14153
9da98052a4e1
[gaim-migrate @ 16715]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
14103
diff
changeset
|
89 | gnt_entry_add_suggest(GNT_ENTRY(entry), "abcd"); |
|
9da98052a4e1
[gaim-migrate @ 16715]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
14103
diff
changeset
|
90 | gnt_entry_add_suggest(GNT_ENTRY(entry), "acb"); |
|
9da98052a4e1
[gaim-migrate @ 16715]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
14103
diff
changeset
|
91 | |
|
13945
a13c6e122e1b
[gaim-migrate @ 16363]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
92 | view = gnt_text_view_new(); |
|
a13c6e122e1b
[gaim-migrate @ 16363]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
93 | gnt_widget_set_name(view, "view"); |
|
a13c6e122e1b
[gaim-migrate @ 16363]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
94 | |
|
13958
bd1c3bb3f33d
[gaim-migrate @ 16381]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
13945
diff
changeset
|
95 | gnt_widget_set_size(view, 20, 15); |
|
bd1c3bb3f33d
[gaim-migrate @ 16381]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
13945
diff
changeset
|
96 | gnt_widget_set_size(entry, 20, 1); |
|
13945
a13c6e122e1b
[gaim-migrate @ 16363]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
97 | |
|
a13c6e122e1b
[gaim-migrate @ 16363]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
98 | gnt_box_add_widget(GNT_BOX(hbox), view); |
|
a13c6e122e1b
[gaim-migrate @ 16363]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
99 | gnt_box_add_widget(GNT_BOX(hbox), entry); |
|
14014
223d99ce2f06
[gaim-migrate @ 16500]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
13969
diff
changeset
|
100 | gnt_box_add_widget(GNT_BOX(hbox), gnt_button_new("OK")); |
|
13945
a13c6e122e1b
[gaim-migrate @ 16363]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
101 | |
|
a13c6e122e1b
[gaim-migrate @ 16363]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
102 | gnt_widget_show(hbox); |
|
a13c6e122e1b
[gaim-migrate @ 16363]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
103 | |
|
14153
9da98052a4e1
[gaim-migrate @ 16715]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
14103
diff
changeset
|
104 | gnt_entry_set_history_length(GNT_ENTRY(entry), -1); |
|
18762
1d4a091693f5
Changes to the test apps.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
15886
diff
changeset
|
105 | gnt_text_view_attach_pager_widget(GNT_TEXT_VIEW(view), entry); |
|
14153
9da98052a4e1
[gaim-migrate @ 16715]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
14103
diff
changeset
|
106 | g_signal_connect_after(G_OBJECT(entry), "key_pressed", G_CALLBACK(key_pressed), view); |
|
13945
a13c6e122e1b
[gaim-migrate @ 16363]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
107 | |
|
15826
273b7247786b
Fix a crash when selecting text in an empty TV.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
14962
diff
changeset
|
108 | gnt_text_view_append_text_with_flags(GNT_TEXT_VIEW(view), "\n", GNT_TEXT_FLAG_NORMAL); |
|
14459
d2e639b92d79
[gaim-migrate @ 17105]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
14167
diff
changeset
|
109 | gnt_text_view_append_text_with_flags(GNT_TEXT_VIEW(view), "plugins: ", GNT_TEXT_FLAG_BOLD); |
|
d2e639b92d79
[gaim-migrate @ 17105]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
14167
diff
changeset
|
110 | gnt_text_view_append_text_with_flags(GNT_TEXT_VIEW(view), "this is the 1st line\n", GNT_TEXT_FLAG_NORMAL); |
|
d2e639b92d79
[gaim-migrate @ 17105]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
14167
diff
changeset
|
111 | |
|
d2e639b92d79
[gaim-migrate @ 17105]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
14167
diff
changeset
|
112 | gnt_text_view_append_text_with_flags(GNT_TEXT_VIEW(view), "plugins: ", GNT_TEXT_FLAG_BOLD); |
|
d2e639b92d79
[gaim-migrate @ 17105]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
14167
diff
changeset
|
113 | gnt_text_view_append_text_with_flags(GNT_TEXT_VIEW(view), "this is the 2nd line\n", GNT_TEXT_FLAG_NORMAL); |
|
d2e639b92d79
[gaim-migrate @ 17105]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
14167
diff
changeset
|
114 | |
|
21725
68ec08d05ff4
Pluck some bug-fixes for finch/gnt for the bug-fix release.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
19456
diff
changeset
|
115 | gnt_text_view_append_text_with_flags(GNT_TEXT_VIEW(view), "plugins: ", GNT_TEXT_FLAG_BOLD | gnt_color_pair(GNT_COLOR_HIGHLIGHT)); |
|
68ec08d05ff4
Pluck some bug-fixes for finch/gnt for the bug-fix release.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
19456
diff
changeset
|
116 | gnt_text_view_append_text_with_flags(GNT_TEXT_VIEW(view), "this is the 3rd line\n", GNT_TEXT_FLAG_NORMAL | gnt_color_pair(GNT_COLOR_HIGHLIGHT)); |
|
14459
d2e639b92d79
[gaim-migrate @ 17105]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
14167
diff
changeset
|
117 | |
|
d2e639b92d79
[gaim-migrate @ 17105]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
14167
diff
changeset
|
118 | gnt_text_view_append_text_with_flags(GNT_TEXT_VIEW(view), "plugins: ", GNT_TEXT_FLAG_BOLD); |
|
d2e639b92d79
[gaim-migrate @ 17105]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
14167
diff
changeset
|
119 | gnt_text_view_append_text_with_flags(GNT_TEXT_VIEW(view), "this is the 4th line\n", GNT_TEXT_FLAG_NORMAL); |
|
d2e639b92d79
[gaim-migrate @ 17105]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
14167
diff
changeset
|
120 | |
|
19456
a37d7ba493d4
Add support to parse and add XHTML in a textview. This we can use for logs,
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
18762
diff
changeset
|
121 | gnt_util_parse_xhtml_to_textview("<p><b>Ohoy hoy!!</b><br/><p>I think this is going to</p> <u> WORK!!! </u><a href='www.google.com'>check this out!!</a></p>", GNT_TEXT_VIEW(view)); |
|
a37d7ba493d4
Add support to parse and add XHTML in a textview. This we can use for logs,
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
18762
diff
changeset
|
122 | |
|
14022
51776fed1be2
[gaim-migrate @ 16513]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
14015
diff
changeset
|
123 | #ifdef STANDALONE |
|
13945
a13c6e122e1b
[gaim-migrate @ 16363]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
124 | gnt_main(); |
|
a13c6e122e1b
[gaim-migrate @ 16363]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
125 | |
|
13969
0541f389442e
[gaim-migrate @ 16402]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
13958
diff
changeset
|
126 | gnt_quit(); |
|
14022
51776fed1be2
[gaim-migrate @ 16513]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
14015
diff
changeset
|
127 | #endif |
|
13969
0541f389442e
[gaim-migrate @ 16402]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
13958
diff
changeset
|
128 | |
|
13945
a13c6e122e1b
[gaim-migrate @ 16363]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
129 | return 0; |
|
a13c6e122e1b
[gaim-migrate @ 16363]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
130 | } |
|
a13c6e122e1b
[gaim-migrate @ 16363]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
131 |