Fri, 04 Nov 2022 23:41:10 -0500
Take advantage of f-strings in Meson
They were added in 0.58, which is our minimum version
https://mesonbuild.com/Syntax.html#format-strings
Testing Done:
Reconfigured, ran tests, and checked a few generated files to be sure they looked okay.
Reviewed at https://reviews.imfreedom.org/r/2033/
|
20147
66f05a854eee
applied changes from 8a731bbd0197fbcc91a705c2d8f528154216defa
Richard Laager <rlaager@pidgin.im>
parents:
19859
diff
changeset
|
1 | /* pidgin |
| 4359 | 2 | * |
| 15572 | 3 | * Pidgin is the legal property of its developers, whose names are too numerous |
| 8046 | 4 | * to list here. Please refer to the COPYRIGHT file distributed with this |
| 5 | * source distribution. | |
|
7326
599c9e8c9da4
[gaim-migrate @ 7912]
Nathan Fredrickson <nathan@silverorange.com>
parents:
7295
diff
changeset
|
6 | * |
| 4359 | 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. | |
| 11 | * | |
| 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. | |
| 16 | * | |
| 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 | |
|
19859
71d37b57eff2
The FSF changed its address a while ago; our files were out of date.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
19721
diff
changeset
|
19 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA |
| 4359 | 20 | */ |
|
35487
494f09f7f331
Move section blocks inside inclusion guards -- otherwise g-ir-scanner yells
Ankit Vani <a@nevitus.org>
parents:
35486
diff
changeset
|
21 | |
|
40502
875489636847
pidgin.h phase3: create pidgin.h and force its usage
Gary Kramlich <grim@reaperworld.com>
parents:
40496
diff
changeset
|
22 | #if !defined(PIDGIN_GLOBAL_HEADER_INSIDE) && !defined(PIDGIN_COMPILATION) |
|
875489636847
pidgin.h phase3: create pidgin.h and force its usage
Gary Kramlich <grim@reaperworld.com>
parents:
40496
diff
changeset
|
23 | # error "only <pidgin.h> may be included directly" |
|
875489636847
pidgin.h phase3: create pidgin.h and force its usage
Gary Kramlich <grim@reaperworld.com>
parents:
40496
diff
changeset
|
24 | #endif |
|
875489636847
pidgin.h phase3: create pidgin.h and force its usage
Gary Kramlich <grim@reaperworld.com>
parents:
40496
diff
changeset
|
25 | |
|
35487
494f09f7f331
Move section blocks inside inclusion guards -- otherwise g-ir-scanner yells
Ankit Vani <a@nevitus.org>
parents:
35486
diff
changeset
|
26 | #ifndef _PIDGIN_CONVERSATION_H_ |
|
494f09f7f331
Move section blocks inside inclusion guards -- otherwise g-ir-scanner yells
Ankit Vani <a@nevitus.org>
parents:
35486
diff
changeset
|
27 | #define _PIDGIN_CONVERSATION_H_ |
|
35451
206524351826
Add sections for finch and re-arrange its doc index
Ankit Vani <a@nevitus.org>
parents:
35415
diff
changeset
|
28 | |
|
41867
5375c1d58c50
Create PurpleUi that merges PurpleCoreUiOps and PurpleUiInfo
Gary Kramlich <grim@reaperworld.com>
parents:
41611
diff
changeset
|
29 | #include <gtk/gtk.h> |
|
5375c1d58c50
Create PurpleUi that merges PurpleCoreUiOps and PurpleUiInfo
Gary Kramlich <grim@reaperworld.com>
parents:
41611
diff
changeset
|
30 | |
|
15562
8c8249fe5e3c
gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents:
15435
diff
changeset
|
31 | typedef struct _PidginConversation PidginConversation; |
|
9709
2e73f176cc80
[gaim-migrate @ 10570]
Mark Doliner <markdoliner@pidgin.im>
parents:
9687
diff
changeset
|
32 | |
|
9498
432fc90c7e22
[gaim-migrate @ 10324]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9497
diff
changeset
|
33 | enum { |
|
432fc90c7e22
[gaim-migrate @ 10324]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9497
diff
changeset
|
34 | CHAT_USERS_ICON_COLUMN, |
|
11454
a604c2097a6e
[gaim-migrate @ 13693]
Richard Laager <rlaager@pidgin.im>
parents:
11280
diff
changeset
|
35 | CHAT_USERS_ALIAS_COLUMN, |
|
14027
708c2047424f
[gaim-migrate @ 16521]
Aaron Sheldon <aaronsheldon@users.sourceforge.net>
parents:
13840
diff
changeset
|
36 | CHAT_USERS_ALIAS_KEY_COLUMN, |
|
9498
432fc90c7e22
[gaim-migrate @ 10324]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9497
diff
changeset
|
37 | CHAT_USERS_NAME_COLUMN, |
|
9554
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9508
diff
changeset
|
38 | CHAT_USERS_FLAGS_COLUMN, |
|
11454
a604c2097a6e
[gaim-migrate @ 13693]
Richard Laager <rlaager@pidgin.im>
parents:
11280
diff
changeset
|
39 | CHAT_USERS_COLOR_COLUMN, |
|
14645
71ccf40ee43b
[gaim-migrate @ 17307]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
14510
diff
changeset
|
40 | CHAT_USERS_WEIGHT_COLUMN, |
|
41093
13d97dcd0e67
Use icon names for chat emblems
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
41088
diff
changeset
|
41 | CHAT_USERS_ICON_NAME_COLUMN, |
|
9498
432fc90c7e22
[gaim-migrate @ 10324]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9497
diff
changeset
|
42 | CHAT_USERS_COLUMNS |
|
432fc90c7e22
[gaim-migrate @ 10324]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9497
diff
changeset
|
43 | }; |
|
432fc90c7e22
[gaim-migrate @ 10324]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9497
diff
changeset
|
44 | |
|
15562
8c8249fe5e3c
gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents:
15435
diff
changeset
|
45 | #define PIDGIN_CONVERSATION(conv) \ |
|
40744
271b8dac2b0d
Remove ui_data from PurpleConversation and move finch and pidgin to g_object_[gs]et_data.
Gary Kramlich <grim@reaperworld.com>
parents:
40713
diff
changeset
|
46 | ((PidginConversation *)g_object_get_data(G_OBJECT(conv), "pidgin")) |
|
10008
1de3454a0dca
[gaim-migrate @ 10925]
Mark Doliner <markdoliner@pidgin.im>
parents:
9885
diff
changeset
|
47 | |
|
15692
ecda27df58b9
Some more pidgininfication
Daniel Atallah <datallah@pidgin.im>
parents:
15578
diff
changeset
|
48 | #define PIDGIN_IS_PIDGIN_CONVERSATION(conv) \ |
| 15884 | 49 | (purple_conversation_get_ui_ops(conv) == \ |
|
15562
8c8249fe5e3c
gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents:
15435
diff
changeset
|
50 | pidgin_conversations_get_conv_ui_ops()) |
|
10008
1de3454a0dca
[gaim-migrate @ 10925]
Mark Doliner <markdoliner@pidgin.im>
parents:
9885
diff
changeset
|
51 | |
|
40360
e21f3bbcc2a5
Update all of the pidgin code to include purple.h
Gary Kramlich <grim@reaperworld.com>
parents:
39705
diff
changeset
|
52 | #include <purple.h> |
|
e21f3bbcc2a5
Update all of the pidgin code to include purple.h
Gary Kramlich <grim@reaperworld.com>
parents:
39705
diff
changeset
|
53 | |
| 4359 | 54 | /************************************************************************** |
| 35472 | 55 | * Structures |
| 4359 | 56 | **************************************************************************/ |
| 57 | ||
| 58 | /** | |
|
35415
ba28be1a7611
Convert docs from doxygen to gtk-doc format for gtkaccount to gtkconvwin
Ankit Vani <a@nevitus.org>
parents:
35393
diff
changeset
|
59 | * PidginConversation: |
|
ba28be1a7611
Convert docs from doxygen to gtk-doc format for gtkaccount to gtkconvwin
Ankit Vani <a@nevitus.org>
parents:
35393
diff
changeset
|
60 | * |
|
41087
4fc5b0ddf55e
Remove the + from GTK
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
41086
diff
changeset
|
61 | * A GTK conversation pane. |
| 4359 | 62 | */ |
|
15562
8c8249fe5e3c
gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents:
15435
diff
changeset
|
63 | struct _PidginConversation |
| 4359 | 64 | { |
| 15884 | 65 | PurpleConversation *active_conv; |
| 10810 | 66 | GList *convs; |
|
13840
8ea0f9070d3a
[gaim-migrate @ 16287]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
12832
diff
changeset
|
67 | GList *send_history; |
| 11581 | 68 | |
| 4359 | 69 | GtkWidget *tab_cont; |
| 70 | ||
|
32575
eb4fc932fae9
Apply conversation theme when opening the GTK conversation. All the
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
32507
diff
changeset
|
71 | PurpleMessageFlags last_flags; |
|
41611
518ed33dc53a
Use the new TalkatuAutoScroller adjustment on the converation history.
Gary Kramlich <grim@reaperworld.com>
parents:
41378
diff
changeset
|
72 | GtkAdjustment *vadjustment; |
|
39702
8102041c0288
Replace gtkconv->webview with a TalkatuHistory
Gary Kramlich <grim@reaperworld.com>
parents:
39688
diff
changeset
|
73 | GtkWidget *history; |
|
39681
f4ebcc715447
Basic message sending works with talkatu now
Gary Kramlich <grim@reaperworld.com>
parents:
39679
diff
changeset
|
74 | |
|
f4ebcc715447
Basic message sending works with talkatu now
Gary Kramlich <grim@reaperworld.com>
parents:
39679
diff
changeset
|
75 | GtkWidget *editor; |
| 4359 | 76 | GtkWidget *entry; |
|
15692
ecda27df58b9
Some more pidgininfication
Daniel Atallah <datallah@pidgin.im>
parents:
15578
diff
changeset
|
77 | |
|
41378
14cda54c3fbf
Bust the union in PidginConversation like a good capitalist
Gary Kramlich <grim@reaperworld.com>
parents:
41323
diff
changeset
|
78 | guint32 typing_timer; |
|
14cda54c3fbf
Bust the union in PidginConversation like a good capitalist
Gary Kramlich <grim@reaperworld.com>
parents:
41323
diff
changeset
|
79 | GtkWidget *count; |
|
14cda54c3fbf
Bust the union in PidginConversation like a good capitalist
Gary Kramlich <grim@reaperworld.com>
parents:
41323
diff
changeset
|
80 | GtkWidget *list; |
|
14cda54c3fbf
Bust the union in PidginConversation like a good capitalist
Gary Kramlich <grim@reaperworld.com>
parents:
41323
diff
changeset
|
81 | GtkWidget *topic_text; |
|
15575
bd1e13b63e4b
In Pidgin, display a full date on the timestamp of the first message to
Richard Laager <rlaager@pidgin.im>
parents:
15572
diff
changeset
|
82 | |
|
bd1e13b63e4b
In Pidgin, display a full date on the timestamp of the first message to
Richard Laager <rlaager@pidgin.im>
parents:
15572
diff
changeset
|
83 | time_t newday; |
|
18253
e25dd002e0be
Start work on blist pane in conversation. Looks like: http://pidgin.im/~seanegan/infopane.png Certainly much to be done yet.
Sean Egan <seanegan@pidgin.im>
parents:
16254
diff
changeset
|
84 | GtkWidget *infopane; |
|
19598
86dfc5613674
Adding all the message from history in GtkIMHtml takes a bit long causing
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
19594
diff
changeset
|
85 | |
|
86dfc5613674
Adding all the message from history in GtkIMHtml takes a bit long causing
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
19594
diff
changeset
|
86 | /* Used when attaching a PidginConversation to a PurpleConversation |
|
86dfc5613674
Adding all the message from history in GtkIMHtml takes a bit long causing
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
19594
diff
changeset
|
87 | * with message history */ |
|
34973
389cabbfe56a
Removed nested structs in pidgin - this caused an error in g-ir-compiler
Ankit Vani <a@nevitus.org>
parents:
34874
diff
changeset
|
88 | int attach_timer; |
|
389cabbfe56a
Removed nested structs in pidgin - this caused an error in g-ir-compiler
Ankit Vani <a@nevitus.org>
parents:
34874
diff
changeset
|
89 | GList *attach_current; |
| 4359 | 90 | }; |
| 91 | ||
|
32790
b95c7c504118
Add G_BEGIN/END_DECLS to Pidgin public headers, most of which did
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
32604
diff
changeset
|
92 | G_BEGIN_DECLS |
|
b95c7c504118
Add G_BEGIN/END_DECLS to Pidgin public headers, most of which did
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
32604
diff
changeset
|
93 | |
| 4359 | 94 | /************************************************************************** |
|
41087
4fc5b0ddf55e
Remove the + from GTK
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
41086
diff
changeset
|
95 | * GTK Conversation API |
| 4359 | 96 | **************************************************************************/ |
|
5673
47f654fb5134
[gaim-migrate @ 6091]
Christian Hammond <chipx86@chipx86.com>
parents:
5167
diff
changeset
|
97 | |
|
47f654fb5134
[gaim-migrate @ 6091]
Christian Hammond <chipx86@chipx86.com>
parents:
5167
diff
changeset
|
98 | /** |
|
35415
ba28be1a7611
Convert docs from doxygen to gtk-doc format for gtkaccount to gtkconvwin
Ankit Vani <a@nevitus.org>
parents:
35393
diff
changeset
|
99 | * pidgin_conversations_get_conv_ui_ops: |
|
ba28be1a7611
Convert docs from doxygen to gtk-doc format for gtkaccount to gtkconvwin
Ankit Vani <a@nevitus.org>
parents:
35393
diff
changeset
|
100 | * |
|
41087
4fc5b0ddf55e
Remove the + from GTK
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
41086
diff
changeset
|
101 | * Returns the UI operations structure for GTK conversations. |
| 4359 | 102 | * |
|
41087
4fc5b0ddf55e
Remove the + from GTK
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
41086
diff
changeset
|
103 | * Returns: The GTK conversation operations structure. |
| 4359 | 104 | */ |
| 15884 | 105 | PurpleConversationUiOps *pidgin_conversations_get_conv_ui_ops(void); |
| 4359 | 106 | |
| 107 | /** | |
|
35415
ba28be1a7611
Convert docs from doxygen to gtk-doc format for gtkaccount to gtkconvwin
Ankit Vani <a@nevitus.org>
parents:
35393
diff
changeset
|
108 | * pidgin_conv_switch_active_conversation: |
|
ba28be1a7611
Convert docs from doxygen to gtk-doc format for gtkaccount to gtkconvwin
Ankit Vani <a@nevitus.org>
parents:
35393
diff
changeset
|
109 | * @conv: The conversation |
|
11911
797cf405943c
[gaim-migrate @ 14202]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
11690
diff
changeset
|
110 | * |
|
35415
ba28be1a7611
Convert docs from doxygen to gtk-doc format for gtkaccount to gtkconvwin
Ankit Vani <a@nevitus.org>
parents:
35393
diff
changeset
|
111 | * Sets the active conversation within a GTK-conversation. |
|
11911
797cf405943c
[gaim-migrate @ 14202]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
11690
diff
changeset
|
112 | */ |
| 15884 | 113 | void pidgin_conv_switch_active_conversation(PurpleConversation *conv); |
|
11911
797cf405943c
[gaim-migrate @ 14202]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
11690
diff
changeset
|
114 | |
|
797cf405943c
[gaim-migrate @ 14202]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
11690
diff
changeset
|
115 | /** |
|
35415
ba28be1a7611
Convert docs from doxygen to gtk-doc format for gtkaccount to gtkconvwin
Ankit Vani <a@nevitus.org>
parents:
35393
diff
changeset
|
116 | * pidgin_conv_attach_to_conversation: |
|
ba28be1a7611
Convert docs from doxygen to gtk-doc format for gtkaccount to gtkconvwin
Ankit Vani <a@nevitus.org>
parents:
35393
diff
changeset
|
117 | * @conv: The conversation. |
|
19721
4aea7d4bd205
Document the function to reattach conv-ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
19598
diff
changeset
|
118 | * |
|
35415
ba28be1a7611
Convert docs from doxygen to gtk-doc format for gtkaccount to gtkconvwin
Ankit Vani <a@nevitus.org>
parents:
35393
diff
changeset
|
119 | * Reattach Pidgin UI to a conversation. |
|
19721
4aea7d4bd205
Document the function to reattach conv-ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
19598
diff
changeset
|
120 | * |
|
41086
631e6cba8635
Fix typos in Pidgin
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
40958
diff
changeset
|
121 | * Returns: Whether Pidgin UI was successfully attached. |
|
19721
4aea7d4bd205
Document the function to reattach conv-ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
19598
diff
changeset
|
122 | */ |
|
19594
339d370c27f0
API to reattach a conversation to gtk UI. Use the new
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
18277
diff
changeset
|
123 | gboolean pidgin_conv_attach_to_conversation(PurpleConversation *conv); |
|
339d370c27f0
API to reattach a conversation to gtk UI. Use the new
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
18277
diff
changeset
|
124 | |
| 8582 | 125 | /**************************************************************************/ |
|
41087
4fc5b0ddf55e
Remove the + from GTK
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
41086
diff
changeset
|
126 | /* GTK Conversations Subsystem */ |
| 8582 | 127 | /**************************************************************************/ |
| 128 | ||
| 129 | /** | |
|
35415
ba28be1a7611
Convert docs from doxygen to gtk-doc format for gtkaccount to gtkconvwin
Ankit Vani <a@nevitus.org>
parents:
35393
diff
changeset
|
130 | * pidgin_conversations_get_handle: |
|
ba28be1a7611
Convert docs from doxygen to gtk-doc format for gtkaccount to gtkconvwin
Ankit Vani <a@nevitus.org>
parents:
35393
diff
changeset
|
131 | * |
| 8582 | 132 | * Returns the gtk conversations subsystem handle. |
| 133 | * | |
|
35393
00f876b129bc
Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents:
35117
diff
changeset
|
134 | * Returns: The conversations subsystem handle. |
| 8582 | 135 | */ |
|
15562
8c8249fe5e3c
gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents:
15435
diff
changeset
|
136 | void *pidgin_conversations_get_handle(void); |
| 8582 | 137 | |
| 138 | /** | |
|
35415
ba28be1a7611
Convert docs from doxygen to gtk-doc format for gtkaccount to gtkconvwin
Ankit Vani <a@nevitus.org>
parents:
35393
diff
changeset
|
139 | * pidgin_conversations_init: |
|
ba28be1a7611
Convert docs from doxygen to gtk-doc format for gtkaccount to gtkconvwin
Ankit Vani <a@nevitus.org>
parents:
35393
diff
changeset
|
140 | * |
|
41087
4fc5b0ddf55e
Remove the + from GTK
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
41086
diff
changeset
|
141 | * Initializes the GTK conversations subsystem. |
| 8582 | 142 | */ |
|
15562
8c8249fe5e3c
gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents:
15435
diff
changeset
|
143 | void pidgin_conversations_init(void); |
| 8582 | 144 | |
| 145 | /** | |
|
35415
ba28be1a7611
Convert docs from doxygen to gtk-doc format for gtkaccount to gtkconvwin
Ankit Vani <a@nevitus.org>
parents:
35393
diff
changeset
|
146 | * pidgin_conversations_uninit: |
|
ba28be1a7611
Convert docs from doxygen to gtk-doc format for gtkaccount to gtkconvwin
Ankit Vani <a@nevitus.org>
parents:
35393
diff
changeset
|
147 | * |
|
41087
4fc5b0ddf55e
Remove the + from GTK
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
41086
diff
changeset
|
148 | * Uninitialized the GTK conversation subsystem. |
| 8582 | 149 | */ |
|
15562
8c8249fe5e3c
gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents:
15435
diff
changeset
|
150 | void pidgin_conversations_uninit(void); |
| 8582 | 151 | |
|
41184
05b5c210352b
Move conversation management from gtkconv.c to PidginConversationWindow.
Gary Kramlich <grim@reaperworld.com>
parents:
41124
diff
changeset
|
152 | void pidgin_conversation_detach(PurpleConversation *conv); |
|
05b5c210352b
Move conversation management from gtkconv.c to PidginConversationWindow.
Gary Kramlich <grim@reaperworld.com>
parents:
41124
diff
changeset
|
153 | |
|
32790
b95c7c504118
Add G_BEGIN/END_DECLS to Pidgin public headers, most of which did
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
32604
diff
changeset
|
154 | G_END_DECLS |
|
b95c7c504118
Add G_BEGIN/END_DECLS to Pidgin public headers, most of which did
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
32604
diff
changeset
|
155 | |
| 15563 | 156 | #endif /* _PIDGIN_CONVERSATION_H_ */ |