Tue, 15 Sep 2020 21:54:10 -0500
Separate the AccountChooser from its model and move options to filters
Create a store for accounts and a filter to only show connected accounts
Update everything to use the new PidginAccountStore and PidginAccountFilterConnected filter
Add a GtkTreeModelFilter for protocols by id
Testing Done:
Compiled and opened most of the dialogs to make sure they're still working the same. Was unable to test gevolution.
Reviewed at https://reviews.imfreedom.org/r/95/
|
40526
c8cc1a4c4a02
Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
1 | /* |
|
c8cc1a4c4a02
Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
2 | * pidgin |
|
c8cc1a4c4a02
Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
3 | * |
|
c8cc1a4c4a02
Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
4 | * Pidgin is the legal property of its developers, whose names are too numerous |
|
c8cc1a4c4a02
Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
5 | * to list here. Please refer to the COPYRIGHT file distributed with this |
|
c8cc1a4c4a02
Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
6 | * source distribution. |
|
c8cc1a4c4a02
Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
7 | * |
|
c8cc1a4c4a02
Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
8 | * This program is free software; you can redistribute it and/or modify |
|
c8cc1a4c4a02
Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
9 | * it under the terms of the GNU General Public License as published by |
|
c8cc1a4c4a02
Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
10 | * the Free Software Foundation; either version 2 of the License, or |
|
c8cc1a4c4a02
Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
11 | * (at your option) any later version. |
|
c8cc1a4c4a02
Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
12 | * |
|
c8cc1a4c4a02
Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
13 | * This program is distributed in the hope that it will be useful, |
|
c8cc1a4c4a02
Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
c8cc1a4c4a02
Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
c8cc1a4c4a02
Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
16 | * GNU General Public License for more details. |
|
c8cc1a4c4a02
Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
17 | * |
|
c8cc1a4c4a02
Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
18 | * You should have received a copy of the GNU General Public License |
|
c8cc1a4c4a02
Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
19 | * along with this program; if not, see <https://www.gnu.org/licenses/>. |
|
c8cc1a4c4a02
Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
20 | */ |
|
c8cc1a4c4a02
Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
21 | |
|
c8cc1a4c4a02
Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
22 | #if !defined(PIDGIN_GLOBAL_HEADER_INSIDE) && !defined(PIDGIN_COMPILATION) |
|
c8cc1a4c4a02
Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
23 | # error "only <pidgin.h> may be included directly" |
|
c8cc1a4c4a02
Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
24 | #endif |
|
c8cc1a4c4a02
Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
25 | |
|
c8cc1a4c4a02
Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
26 | #ifndef PIDGIN_ATTACHMENT_H |
|
c8cc1a4c4a02
Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
27 | #define PIDGIN_ATTACHMENT_H |
|
c8cc1a4c4a02
Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
28 | |
|
c8cc1a4c4a02
Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
29 | /** |
|
c8cc1a4c4a02
Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
30 | * SECTION:pidginattachment |
|
c8cc1a4c4a02
Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
31 | * @section_id: pidgin-pidginattachment |
|
c8cc1a4c4a02
Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
32 | * @short_description: <filename>pidginattachment.h</filename> |
|
c8cc1a4c4a02
Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
33 | * @title: Pidgin Attachment API |
|
c8cc1a4c4a02
Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
34 | */ |
|
c8cc1a4c4a02
Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
35 | |
|
c8cc1a4c4a02
Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
36 | #include <purple.h> |
|
c8cc1a4c4a02
Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
37 | |
|
c8cc1a4c4a02
Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
38 | #include <talkatu.h> |
|
c8cc1a4c4a02
Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
39 | |
|
c8cc1a4c4a02
Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
40 | G_BEGIN_DECLS |
|
c8cc1a4c4a02
Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
41 | |
|
c8cc1a4c4a02
Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
42 | #define PIDGIN_TYPE_ATTACHMENT (pidgin_attachment_get_type()) |
|
c8cc1a4c4a02
Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
43 | G_DECLARE_FINAL_TYPE(PidginAttachment, pidgin_attachment, PIDGIN, ATTACHMENT, GObject) |
|
c8cc1a4c4a02
Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
44 | |
|
c8cc1a4c4a02
Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
45 | /** |
|
c8cc1a4c4a02
Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
46 | * pidgin_attachment_new: |
|
c8cc1a4c4a02
Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
47 | * @attachment: The #PurpleAttachment to wrap. |
|
c8cc1a4c4a02
Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
48 | * |
|
c8cc1a4c4a02
Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
49 | * Wraps @attachment so that it can be used as a #TalkatuAttachment. |
|
c8cc1a4c4a02
Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
50 | * |
|
c8cc1a4c4a02
Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
51 | * Returns: (transfer full): The new #PidginAttachment instance. |
|
c8cc1a4c4a02
Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
52 | */ |
|
c8cc1a4c4a02
Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
53 | PidginAttachment *pidgin_attachment_new(PurpleAttachment *attachment); |
|
c8cc1a4c4a02
Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
54 | |
|
c8cc1a4c4a02
Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
55 | /** |
|
c8cc1a4c4a02
Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
56 | * pidgin_attachment_get_attachment: |
|
c8cc1a4c4a02
Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
57 | * @attachment: The #PidginAttachment instance. |
|
c8cc1a4c4a02
Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
58 | * |
|
c8cc1a4c4a02
Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
59 | * Gets the #PurpleAttachment that @attachment is wrapping. |
|
c8cc1a4c4a02
Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
60 | * |
|
c8cc1a4c4a02
Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
61 | * Returns: (transfer none): The #PurpleAttachment that @attachment is wrapping. |
|
c8cc1a4c4a02
Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
62 | */ |
|
c8cc1a4c4a02
Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
63 | PurpleAttachment *pidgin_attachment_get_attachment(PidginAttachment *attachment); |
|
c8cc1a4c4a02
Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
64 | |
|
c8cc1a4c4a02
Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
65 | G_END_DECLS |
|
c8cc1a4c4a02
Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
66 | |
|
c8cc1a4c4a02
Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
67 | #endif /* PIDGIN_ATTACHMENT_H */ |