Sat, 07 Nov 2020 02:21:44 -0600
Rename a few things in Jabber SI xfer to be clearer.
A small followup to the previous review, which I noticed while working on Bonjour's version.
Testing Done:
compile only.
Reviewed at https://reviews.imfreedom.org/r/205/
|
20147
66f05a854eee
applied changes from 8a731bbd0197fbcc91a705c2d8f528154216defa
Richard Laager <rlaager@pidgin.im>
parents:
19859
diff
changeset
|
1 | /* pidgin |
| 10643 | 2 | * |
| 15572 | 3 | * Pidgin is the legal property of its developers, whose names are too numerous |
| 10643 | 4 | * to list here. Please refer to the COPYRIGHT file distributed with this |
| 5 | * source distribution. | |
| 6 | * | |
| 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:
16538
diff
changeset
|
19 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA |
| 10643 | 20 | */ |
|
35487
494f09f7f331
Move section blocks inside inclusion guards -- otherwise g-ir-scanner yells
Ankit Vani <a@nevitus.org>
parents:
35455
diff
changeset
|
21 | |
|
40502
875489636847
pidgin.h phase3: create pidgin.h and force its usage
Gary Kramlich <grim@reaperworld.com>
parents:
40484
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:
40484
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:
40484
diff
changeset
|
24 | #endif |
|
875489636847
pidgin.h phase3: create pidgin.h and force its usage
Gary Kramlich <grim@reaperworld.com>
parents:
40484
diff
changeset
|
25 | |
|
35487
494f09f7f331
Move section blocks inside inclusion guards -- otherwise g-ir-scanner yells
Ankit Vani <a@nevitus.org>
parents:
35455
diff
changeset
|
26 | #ifndef __PIDGIN_STATUS_BOX_H__ |
|
494f09f7f331
Move section blocks inside inclusion guards -- otherwise g-ir-scanner yells
Ankit Vani <a@nevitus.org>
parents:
35455
diff
changeset
|
27 | #define __PIDGIN_STATUS_BOX_H__ |
|
35451
206524351826
Add sections for finch and re-arrange its doc index
Ankit Vani <a@nevitus.org>
parents:
35417
diff
changeset
|
28 | /** |
|
206524351826
Add sections for finch and re-arrange its doc index
Ankit Vani <a@nevitus.org>
parents:
35417
diff
changeset
|
29 | * SECTION:gtkstatusbox |
|
206524351826
Add sections for finch and re-arrange its doc index
Ankit Vani <a@nevitus.org>
parents:
35417
diff
changeset
|
30 | * @section_id: pidgin-gtkstatusbox |
|
206524351826
Add sections for finch and re-arrange its doc index
Ankit Vani <a@nevitus.org>
parents:
35417
diff
changeset
|
31 | * @short_description: <filename>gtkstatusbox.h</filename> |
|
206524351826
Add sections for finch and re-arrange its doc index
Ankit Vani <a@nevitus.org>
parents:
35417
diff
changeset
|
32 | * @title: Status Selection Widget |
|
206524351826
Add sections for finch and re-arrange its doc index
Ankit Vani <a@nevitus.org>
parents:
35417
diff
changeset
|
33 | */ |
| 10643 | 34 | |
| 35 | #include <gtk/gtk.h> | |
|
39607
58a24064b74a
Replace webkit in the statusbox with a talkatu editor.
Gary Kramlich <grim@reaperworld.com>
parents:
38744
diff
changeset
|
36 | |
|
58a24064b74a
Replace webkit in the statusbox with a talkatu editor.
Gary Kramlich <grim@reaperworld.com>
parents:
38744
diff
changeset
|
37 | #include <talkatu.h> |
|
58a24064b74a
Replace webkit in the statusbox with a talkatu editor.
Gary Kramlich <grim@reaperworld.com>
parents:
38744
diff
changeset
|
38 | |
|
40360
e21f3bbcc2a5
Update all of the pidgin code to include purple.h
Gary Kramlich <grim@reaperworld.com>
parents:
39930
diff
changeset
|
39 | #include <purple.h> |
| 10643 | 40 | |
| 41 | G_BEGIN_DECLS | |
| 42 | ||
| 15577 | 43 | #define PIDGIN_TYPE_STATUS_BOX (pidgin_status_box_get_type ()) |
| 44 | #define PIDGIN_STATUS_BOX(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PIDGIN_TYPE_STATUS_BOX, PidginStatusBox)) | |
| 45 | #define PIDGIN_STATUS_BOX_CLASS(vtable) (G_TYPE_CHECK_CLASS_CAST ((vtable), PIDGIN_TYPE_STATUS_BOX, PidginStatusBoxClass)) | |
| 46 | #define PIDGIN_IS_STATUS_BOX(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PIDGIN_TYPE_STATUS_BOX)) | |
| 47 | #define PIDGIN_IS_STATUS_BOX_CLASS(vtable) (G_TYPE_CHECK_CLASS_TYPE ((vtable), PIDGIN_TYPE_STATUS_BOX)) | |
| 48 | #define PIDGIN_STATUS_BOX_GET_CLASS(inst) (G_TYPE_INSTANCE_GET_CLASS ((inst), PIDGIN_TYPE_STATUS_BOX, PidginStatusBoxClass)) | |
| 10643 | 49 | |
|
11739
cc15987b3937
[gaim-migrate @ 14030]
Mark Doliner <markdoliner@pidgin.im>
parents:
11738
diff
changeset
|
50 | /** |
|
35417
4e34bb5d3681
Convert docs from doxygen to gtk-doc format for gtksound to pidgintooltip
Ankit Vani <a@nevitus.org>
parents:
35024
diff
changeset
|
51 | * PidginStatusBoxItemType: |
|
4e34bb5d3681
Convert docs from doxygen to gtk-doc format for gtksound to pidgintooltip
Ankit Vani <a@nevitus.org>
parents:
35024
diff
changeset
|
52 | * |
|
11739
cc15987b3937
[gaim-migrate @ 14030]
Mark Doliner <markdoliner@pidgin.im>
parents:
11738
diff
changeset
|
53 | * This is a hidden field in the GtkStatusBox that identifies the |
|
cc15987b3937
[gaim-migrate @ 14030]
Mark Doliner <markdoliner@pidgin.im>
parents:
11738
diff
changeset
|
54 | * item in the list store. The item could be a normal |
| 15884 | 55 | * PurpleStatusPrimitive, or it could be something special like the |
|
11739
cc15987b3937
[gaim-migrate @ 14030]
Mark Doliner <markdoliner@pidgin.im>
parents:
11738
diff
changeset
|
56 | * "Custom..." item, or "Saved..." or a GtkSeparator. |
|
cc15987b3937
[gaim-migrate @ 14030]
Mark Doliner <markdoliner@pidgin.im>
parents:
11738
diff
changeset
|
57 | */ |
|
cc15987b3937
[gaim-migrate @ 14030]
Mark Doliner <markdoliner@pidgin.im>
parents:
11738
diff
changeset
|
58 | typedef enum |
|
cc15987b3937
[gaim-migrate @ 14030]
Mark Doliner <markdoliner@pidgin.im>
parents:
11738
diff
changeset
|
59 | { |
| 15577 | 60 | PIDGIN_STATUS_BOX_TYPE_SEPARATOR, |
| 61 | PIDGIN_STATUS_BOX_TYPE_PRIMITIVE, | |
| 62 | PIDGIN_STATUS_BOX_TYPE_POPULAR, | |
|
16376
04b7b529b7b0
Saved icon for saved statuses in statusbox
Sean Egan <seanegan@pidgin.im>
parents:
16254
diff
changeset
|
63 | PIDGIN_STATUS_BOX_TYPE_SAVED_POPULAR, |
| 15577 | 64 | PIDGIN_STATUS_BOX_TYPE_CUSTOM, |
| 65 | PIDGIN_STATUS_BOX_TYPE_SAVED, | |
| 66 | PIDGIN_STATUS_BOX_NUM_TYPES | |
| 67 | } PidginStatusBoxItemType; | |
|
11739
cc15987b3937
[gaim-migrate @ 14030]
Mark Doliner <markdoliner@pidgin.im>
parents:
11738
diff
changeset
|
68 | |
| 15577 | 69 | typedef struct _PidginStatusBox PidginStatusBox; |
| 70 | typedef struct _PidginStatusBoxClass PidginStatusBoxClass; | |
| 10643 | 71 | |
|
35417
4e34bb5d3681
Convert docs from doxygen to gtk-doc format for gtksound to pidgintooltip
Ankit Vani <a@nevitus.org>
parents:
35024
diff
changeset
|
72 | /** |
|
4e34bb5d3681
Convert docs from doxygen to gtk-doc format for gtksound to pidgintooltip
Ankit Vani <a@nevitus.org>
parents:
35024
diff
changeset
|
73 | * PidginStatusBox: |
|
4e34bb5d3681
Convert docs from doxygen to gtk-doc format for gtksound to pidgintooltip
Ankit Vani <a@nevitus.org>
parents:
35024
diff
changeset
|
74 | * @store: This GtkListStore contains only one row--the currently |
|
4e34bb5d3681
Convert docs from doxygen to gtk-doc format for gtksound to pidgintooltip
Ankit Vani <a@nevitus.org>
parents:
35024
diff
changeset
|
75 | * selected status. |
|
4e34bb5d3681
Convert docs from doxygen to gtk-doc format for gtksound to pidgintooltip
Ankit Vani <a@nevitus.org>
parents:
35024
diff
changeset
|
76 | * @dropdown_store: This is the dropdown GtkListStore that contains the |
|
4e34bb5d3681
Convert docs from doxygen to gtk-doc format for gtksound to pidgintooltip
Ankit Vani <a@nevitus.org>
parents:
35024
diff
changeset
|
77 | * available statuses, plus some recently used statuses, plus |
|
4e34bb5d3681
Convert docs from doxygen to gtk-doc format for gtksound to pidgintooltip
Ankit Vani <a@nevitus.org>
parents:
35024
diff
changeset
|
78 | * the "Custom..." and "Saved..." options. |
|
4e34bb5d3681
Convert docs from doxygen to gtk-doc format for gtksound to pidgintooltip
Ankit Vani <a@nevitus.org>
parents:
35024
diff
changeset
|
79 | * @token_status_account: This will be non-NULL and contain a sample account |
|
4e34bb5d3681
Convert docs from doxygen to gtk-doc format for gtksound to pidgintooltip
Ankit Vani <a@nevitus.org>
parents:
35024
diff
changeset
|
80 | * when all enabled accounts use the same statuses |
|
4e34bb5d3681
Convert docs from doxygen to gtk-doc format for gtksound to pidgintooltip
Ankit Vani <a@nevitus.org>
parents:
35024
diff
changeset
|
81 | */ |
| 15577 | 82 | struct _PidginStatusBox |
| 10643 | 83 | { |
| 15141 | 84 | GtkContainer parent_instance; |
| 10643 | 85 | |
|
35455
216a37403c5b
Fix a bunch of gtk-doc warnings in pidgin
Ankit Vani <a@nevitus.org>
parents:
35451
diff
changeset
|
86 | /*< public >*/ |
| 10643 | 87 | GtkListStore *store; |
| 88 | GtkListStore *dropdown_store; | |
| 89 | ||
| 15884 | 90 | PurpleAccount *account; |
| 11499 | 91 | |
| 15884 | 92 | PurpleAccount *token_status_account; |
|
14725
39980ddc0b9a
[gaim-migrate @ 17409]
Daniel Atallah <datallah@pidgin.im>
parents:
14253
diff
changeset
|
93 | |
|
39607
58a24064b74a
Replace webkit in the statusbox with a talkatu editor.
Gary Kramlich <grim@reaperworld.com>
parents:
38744
diff
changeset
|
94 | GtkWidget *vbox; |
|
58a24064b74a
Replace webkit in the statusbox with a talkatu editor.
Gary Kramlich <grim@reaperworld.com>
parents:
38744
diff
changeset
|
95 | gboolean editor_visible; |
|
58a24064b74a
Replace webkit in the statusbox with a talkatu editor.
Gary Kramlich <grim@reaperworld.com>
parents:
38744
diff
changeset
|
96 | GtkWidget *editor; |
|
40484
7df95db772d8
Update a a few things that were changed in talkatu
Gary Kramlich <grim@reaperworld.com>
parents:
40360
diff
changeset
|
97 | GtkWidget *input; |
|
39607
58a24064b74a
Replace webkit in the statusbox with a talkatu editor.
Gary Kramlich <grim@reaperworld.com>
parents:
38744
diff
changeset
|
98 | GtkTextBuffer *buffer; |
| 14195 | 99 | |
|
35815
d6fe2c2ebbbe
imgstore: remove from headers
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
35487
diff
changeset
|
100 | PurpleImage *buddy_icon_img; |
|
14203
f3a50c328ddc
[gaim-migrate @ 16783]
Mark Doliner <markdoliner@pidgin.im>
parents:
14195
diff
changeset
|
101 | GdkPixbuf *buddy_icon; |
|
f3a50c328ddc
[gaim-migrate @ 16783]
Mark Doliner <markdoliner@pidgin.im>
parents:
14195
diff
changeset
|
102 | GdkPixbuf *buddy_icon_hover; |
|
39930
411f3df51bcd
Convert to GtkFileChooserNative.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
39607
diff
changeset
|
103 | GtkFileChooserNative *buddy_icon_sel; |
|
14203
f3a50c328ddc
[gaim-migrate @ 16783]
Mark Doliner <markdoliner@pidgin.im>
parents:
14195
diff
changeset
|
104 | GtkWidget *icon; |
| 14195 | 105 | GtkWidget *icon_box; |
|
15079
835ed45157ce
[gaim-migrate @ 17799]
Daniel Atallah <datallah@pidgin.im>
parents:
14865
diff
changeset
|
106 | GtkWidget *icon_box_menu; |
| 14195 | 107 | GdkCursor *hand_cursor; |
| 108 | GdkCursor *arrow_cursor; | |
|
33026
3c249b1132db
Fix indenting.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
26727
diff
changeset
|
109 | int icon_size; |
|
3c249b1132db
Fix indenting.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
26727
diff
changeset
|
110 | gboolean icon_opaque; |
| 14195 | 111 | |
| 10643 | 112 | |
| 113 | GtkWidget *cell_view; | |
| 114 | GtkCellRenderer *icon_rend; | |
| 115 | GtkCellRenderer *text_rend; | |
| 116 | ||
| 117 | GdkPixbuf *error_pixbuf; | |
| 118 | int connecting_index; | |
| 24434 | 119 | GdkPixbuf *connecting_pixbufs[9]; |
| 10643 | 120 | int typing_index; |
| 15730 | 121 | GdkPixbuf *typing_pixbufs[6]; |
| 10643 | 122 | |
| 14767 | 123 | gboolean network_available; |
| 10643 | 124 | gboolean connecting; |
|
13124
1750c1be8e81
[gaim-migrate @ 15485]
Mark Doliner <markdoliner@pidgin.im>
parents:
13123
diff
changeset
|
125 | guint typing; |
| 10643 | 126 | |
| 127 | GtkTreeIter iter; | |
| 128 | char *error; | |
| 11960 | 129 | |
|
13122
85136c011157
[gaim-migrate @ 15483]
Mark Doliner <markdoliner@pidgin.im>
parents:
12779
diff
changeset
|
130 | /* |
|
85136c011157
[gaim-migrate @ 15483]
Mark Doliner <markdoliner@pidgin.im>
parents:
12779
diff
changeset
|
131 | * These widgets are made for renderin' |
|
85136c011157
[gaim-migrate @ 15483]
Mark Doliner <markdoliner@pidgin.im>
parents:
12779
diff
changeset
|
132 | * That's just what they'll do |
|
85136c011157
[gaim-migrate @ 15483]
Mark Doliner <markdoliner@pidgin.im>
parents:
12779
diff
changeset
|
133 | * One of these days these widgets |
|
85136c011157
[gaim-migrate @ 15483]
Mark Doliner <markdoliner@pidgin.im>
parents:
12779
diff
changeset
|
134 | * Are gonna render all over you |
|
85136c011157
[gaim-migrate @ 15483]
Mark Doliner <markdoliner@pidgin.im>
parents:
12779
diff
changeset
|
135 | */ |
| 12262 | 136 | GtkWidget *hbox; |
| 137 | GtkWidget *toggle_button; | |
| 138 | GtkWidget *vsep; | |
| 139 | GtkWidget *arrow; | |
| 15141 | 140 | |
| 141 | GtkWidget *popup_window; | |
| 142 | GtkWidget *popup_frame; | |
| 143 | GtkWidget *scrolled_window; | |
| 144 | GtkWidget *cell_view_frame; | |
| 145 | GtkTreeViewColumn *column; | |
| 146 | GtkWidget *tree_view; | |
| 147 | gboolean popup_in_progress; | |
| 148 | GtkTreeRowReference *active_row; | |
| 10643 | 149 | }; |
| 150 | ||
| 15577 | 151 | struct _PidginStatusBoxClass |
| 10643 | 152 | { |
| 15141 | 153 | GtkContainerClass parent_class; |
| 10643 | 154 | |
|
14203
f3a50c328ddc
[gaim-migrate @ 16783]
Mark Doliner <markdoliner@pidgin.im>
parents:
14195
diff
changeset
|
155 | /* signals */ |
|
f3a50c328ddc
[gaim-migrate @ 16783]
Mark Doliner <markdoliner@pidgin.im>
parents:
14195
diff
changeset
|
156 | void (* changed) (GtkComboBox *combo_box); |
| 10643 | 157 | |
|
35024
eb3afb7643ce
Added /*< private >*/ for padding members, clean them up and add missing ones
Ankit Vani <a@nevitus.org>
parents:
33257
diff
changeset
|
158 | /*< private >*/ |
|
14203
f3a50c328ddc
[gaim-migrate @ 16783]
Mark Doliner <markdoliner@pidgin.im>
parents:
14195
diff
changeset
|
159 | void (*_gtk_reserved0) (void); |
|
f3a50c328ddc
[gaim-migrate @ 16783]
Mark Doliner <markdoliner@pidgin.im>
parents:
14195
diff
changeset
|
160 | void (*_gtk_reserved1) (void); |
|
f3a50c328ddc
[gaim-migrate @ 16783]
Mark Doliner <markdoliner@pidgin.im>
parents:
14195
diff
changeset
|
161 | void (*_gtk_reserved2) (void); |
|
f3a50c328ddc
[gaim-migrate @ 16783]
Mark Doliner <markdoliner@pidgin.im>
parents:
14195
diff
changeset
|
162 | void (*_gtk_reserved3) (void); |
| 10643 | 163 | }; |
| 164 | ||
| 165 | ||
| 15577 | 166 | GType pidgin_status_box_get_type (void) G_GNUC_CONST; |
| 167 | GtkWidget *pidgin_status_box_new (void); | |
|
38744
48a376346964
Lots of updates for Pidgin-3.0.gir
Gary Kramlich <grim@reaperworld.com>
parents:
35815
diff
changeset
|
168 | GtkWidget *pidgin_status_box_new_with_account (PurpleAccount *account); |
| 10643 | 169 | |
| 170 | void | |
| 15577 | 171 | pidgin_status_box_add(PidginStatusBox *status_box, PidginStatusBoxItemType type, GdkPixbuf *pixbuf, const char *text, const char *sec_text, gpointer data); |
| 10643 | 172 | |
| 173 | void | |
| 15577 | 174 | pidgin_status_box_add_separator(PidginStatusBox *status_box); |
|
11738
207d5519a4d0
[gaim-migrate @ 14029]
Mark Doliner <markdoliner@pidgin.im>
parents:
11732
diff
changeset
|
175 | |
|
207d5519a4d0
[gaim-migrate @ 14029]
Mark Doliner <markdoliner@pidgin.im>
parents:
11732
diff
changeset
|
176 | void |
| 15577 | 177 | pidgin_status_box_set_network_available(PidginStatusBox *status_box, gboolean available); |
| 14767 | 178 | |
| 179 | void | |
| 15577 | 180 | pidgin_status_box_set_connecting(PidginStatusBox *status_box, gboolean connecting); |
| 10643 | 181 | |
| 182 | void | |
| 15577 | 183 | pidgin_status_box_pulse_connecting(PidginStatusBox *status_box); |
| 10643 | 184 | |
| 14195 | 185 | void |
|
35815
d6fe2c2ebbbe
imgstore: remove from headers
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
35487
diff
changeset
|
186 | pidgin_status_box_set_buddy_icon(PidginStatusBox *status_box, PurpleImage *img); |
| 14195 | 187 | |
| 15577 | 188 | char *pidgin_status_box_get_message(PidginStatusBox *status_box); |
| 10649 | 189 | |
| 10643 | 190 | G_END_DECLS |
| 191 | ||
|
15562
8c8249fe5e3c
gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents:
15474
diff
changeset
|
192 | #endif /* __GTK_PIDGIN_STATUS_COMBO_BOX_H__ */ |