Mon, 04 Apr 2022 23:15:13 -0500
Overhaul the status box
* Subclass GtkBox instead of GtkContainer
* Remove message editing
* Use a GtkComboBox instead of our fake GtkComboBox
* Move to item id's rather than indexes
* Moved new status, and saved status to GActions
* Removed the account and token_account properties. we now show primitives and
saved status
* Removed the ability to delete saved status from the widget
* Use a widget template to construct the ui elements
* Removed the connection detection stuff
Testing Done:
Verified status were updated when used in the saved status manager.
Verified that the new status and saved status actions work.
Verified that the primitive status work.
Verified that the saved statuses work.
Bugs closed: PIDGIN-17591
Reviewed at https://reviews.imfreedom.org/r/1312/
|
39579
34e0b0e7df81
Finish up the invite dialog with contact completion and documentation for all.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
1 | /* pidgin |
|
34e0b0e7df81
Finish up the invite dialog with contact completion and documentation for all.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
2 | * |
|
34e0b0e7df81
Finish up the invite dialog with contact completion and documentation for all.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
3 | * Pidgin is the legal property of its developers, whose names are too numerous |
|
34e0b0e7df81
Finish up the invite dialog with contact completion and documentation for all.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
4 | * to list here. Please refer to the COPYRIGHT file distributed with this |
|
34e0b0e7df81
Finish up the invite dialog with contact completion and documentation for all.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
5 | * source distribution. |
|
34e0b0e7df81
Finish up the invite dialog with contact completion and documentation for all.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
6 | * |
|
34e0b0e7df81
Finish up the invite dialog with contact completion and documentation for all.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
7 | * This program is free software; you can redistribute it and/or modify |
|
34e0b0e7df81
Finish up the invite dialog with contact completion and documentation for all.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
8 | * it under the terms of the GNU General Public License as published by |
|
34e0b0e7df81
Finish up the invite dialog with contact completion and documentation for all.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
9 | * the Free Software Foundation; either version 2 of the License, or |
|
34e0b0e7df81
Finish up the invite dialog with contact completion and documentation for all.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
10 | * (at your option) any later version. |
|
34e0b0e7df81
Finish up the invite dialog with contact completion and documentation for all.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
11 | * |
|
34e0b0e7df81
Finish up the invite dialog with contact completion and documentation for all.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
12 | * This program is distributed in the hope that it will be useful, |
|
34e0b0e7df81
Finish up the invite dialog with contact completion and documentation for all.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
34e0b0e7df81
Finish up the invite dialog with contact completion and documentation for all.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
34e0b0e7df81
Finish up the invite dialog with contact completion and documentation for all.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
15 | * GNU General Public License for more details. |
|
34e0b0e7df81
Finish up the invite dialog with contact completion and documentation for all.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
16 | * |
|
34e0b0e7df81
Finish up the invite dialog with contact completion and documentation for all.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
17 | * You should have received a copy of the GNU General Public License |
|
34e0b0e7df81
Finish up the invite dialog with contact completion and documentation for all.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
18 | * along with this program; if not, write to the Free Software |
|
34e0b0e7df81
Finish up the invite dialog with contact completion and documentation for all.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
19 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA |
|
34e0b0e7df81
Finish up the invite dialog with contact completion and documentation for all.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
20 | */ |
|
34e0b0e7df81
Finish up the invite dialog with contact completion and documentation for all.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
21 | |
|
40502
875489636847
pidgin.h phase3: create pidgin.h and force its usage
Gary Kramlich <grim@reaperworld.com>
parents:
39581
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:
39581
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:
39581
diff
changeset
|
24 | #endif |
|
875489636847
pidgin.h phase3: create pidgin.h and force its usage
Gary Kramlich <grim@reaperworld.com>
parents:
39581
diff
changeset
|
25 | |
|
39579
34e0b0e7df81
Finish up the invite dialog with contact completion and documentation for all.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
26 | #ifndef PIDGIN_CONTACT_COMPLETION_H |
|
34e0b0e7df81
Finish up the invite dialog with contact completion and documentation for all.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
27 | #define PIDGIN_CONTACT_COMPLETION_H |
|
34e0b0e7df81
Finish up the invite dialog with contact completion and documentation for all.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
28 | |
|
41124
95555046173e
Convert pidgin from gtk-doc to gi-docgen
Gary Kramlich <grim@reaperworld.com>
parents:
40502
diff
changeset
|
29 | #include <gtk/gtk.h> |
|
95555046173e
Convert pidgin from gtk-doc to gi-docgen
Gary Kramlich <grim@reaperworld.com>
parents:
40502
diff
changeset
|
30 | |
|
95555046173e
Convert pidgin from gtk-doc to gi-docgen
Gary Kramlich <grim@reaperworld.com>
parents:
40502
diff
changeset
|
31 | #include <purple.h> |
|
95555046173e
Convert pidgin from gtk-doc to gi-docgen
Gary Kramlich <grim@reaperworld.com>
parents:
40502
diff
changeset
|
32 | |
|
95555046173e
Convert pidgin from gtk-doc to gi-docgen
Gary Kramlich <grim@reaperworld.com>
parents:
40502
diff
changeset
|
33 | G_BEGIN_DECLS |
|
95555046173e
Convert pidgin from gtk-doc to gi-docgen
Gary Kramlich <grim@reaperworld.com>
parents:
40502
diff
changeset
|
34 | |
|
39579
34e0b0e7df81
Finish up the invite dialog with contact completion and documentation for all.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
35 | /** |
|
41124
95555046173e
Convert pidgin from gtk-doc to gi-docgen
Gary Kramlich <grim@reaperworld.com>
parents:
40502
diff
changeset
|
36 | * PidginContactCompletion: |
|
39579
34e0b0e7df81
Finish up the invite dialog with contact completion and documentation for all.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
37 | * |
|
34e0b0e7df81
Finish up the invite dialog with contact completion and documentation for all.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
38 | * #PidginContactCompletion should be treated like a normal |
|
34e0b0e7df81
Finish up the invite dialog with contact completion and documentation for all.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
39 | * #GtkEntryCompletion, except it already does all of the setup for the |
|
34e0b0e7df81
Finish up the invite dialog with contact completion and documentation for all.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
40 | * completion. You can also filter by a #PurpleAccount to limit what's shown. |
|
34e0b0e7df81
Finish up the invite dialog with contact completion and documentation for all.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
41 | * |
|
34e0b0e7df81
Finish up the invite dialog with contact completion and documentation for all.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
42 | * |[<!-- language="C" --> |
|
34e0b0e7df81
Finish up the invite dialog with contact completion and documentation for all.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
43 | * GtkWidget *entry = gtk_entry_new(); |
|
34e0b0e7df81
Finish up the invite dialog with contact completion and documentation for all.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
44 | * GtkEntryCompletion *completion = pidgin_contact_completion_new(); |
|
34e0b0e7df81
Finish up the invite dialog with contact completion and documentation for all.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
45 | * |
|
34e0b0e7df81
Finish up the invite dialog with contact completion and documentation for all.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
46 | * gtk_entry_set_completion(GTK_ENTRY(entry), completion); |
|
34e0b0e7df81
Finish up the invite dialog with contact completion and documentation for all.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
47 | * pidgin_contact_completion_set_account(PIDGIN_CONTACT_COMPLETION(completion), account); |
|
34e0b0e7df81
Finish up the invite dialog with contact completion and documentation for all.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
48 | * g_object_unref(completion); |
|
34e0b0e7df81
Finish up the invite dialog with contact completion and documentation for all.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
49 | * ]| |
|
34e0b0e7df81
Finish up the invite dialog with contact completion and documentation for all.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
50 | */ |
|
34e0b0e7df81
Finish up the invite dialog with contact completion and documentation for all.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
51 | |
|
34e0b0e7df81
Finish up the invite dialog with contact completion and documentation for all.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
52 | #define PIDGIN_TYPE_CONTACT_COMPLETION pidgin_contact_completion_get_type() |
|
34e0b0e7df81
Finish up the invite dialog with contact completion and documentation for all.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
53 | |
|
34e0b0e7df81
Finish up the invite dialog with contact completion and documentation for all.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
54 | G_DECLARE_FINAL_TYPE(PidginContactCompletion, pidgin_contact_completion, PIDGIN, |
|
34e0b0e7df81
Finish up the invite dialog with contact completion and documentation for all.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
55 | CONTACT_COMPLETION, GtkEntryCompletion) |
|
34e0b0e7df81
Finish up the invite dialog with contact completion and documentation for all.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
56 | |
|
34e0b0e7df81
Finish up the invite dialog with contact completion and documentation for all.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
57 | /** |
|
34e0b0e7df81
Finish up the invite dialog with contact completion and documentation for all.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
58 | * pidgin_contact_completion_new: |
|
34e0b0e7df81
Finish up the invite dialog with contact completion and documentation for all.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
59 | * |
|
34e0b0e7df81
Finish up the invite dialog with contact completion and documentation for all.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
60 | * Creates a new #GtkEntryCompletion for looking up contacts. |
|
34e0b0e7df81
Finish up the invite dialog with contact completion and documentation for all.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
61 | * |
|
34e0b0e7df81
Finish up the invite dialog with contact completion and documentation for all.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
62 | * Returns: (transfer full): The new #GtkEntryCompletion instance. |
|
39581
28b38c0602d6
Replace ChangeLog.API entries with Since tags from PidginContactCompletion
Gary Kramlich <grim@reaperworld.com>
parents:
39579
diff
changeset
|
63 | * |
|
28b38c0602d6
Replace ChangeLog.API entries with Since tags from PidginContactCompletion
Gary Kramlich <grim@reaperworld.com>
parents:
39579
diff
changeset
|
64 | * Since: 3.0.0 |
|
39579
34e0b0e7df81
Finish up the invite dialog with contact completion and documentation for all.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
65 | */ |
|
34e0b0e7df81
Finish up the invite dialog with contact completion and documentation for all.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
66 | GtkEntryCompletion *pidgin_contact_completion_new(void); |
|
34e0b0e7df81
Finish up the invite dialog with contact completion and documentation for all.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
67 | |
|
34e0b0e7df81
Finish up the invite dialog with contact completion and documentation for all.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
68 | /** |
|
34e0b0e7df81
Finish up the invite dialog with contact completion and documentation for all.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
69 | * pidgin_contact_completion_get_account: |
|
34e0b0e7df81
Finish up the invite dialog with contact completion and documentation for all.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
70 | * @completion: The #PidginContactCompletion instance. |
|
34e0b0e7df81
Finish up the invite dialog with contact completion and documentation for all.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
71 | * |
|
34e0b0e7df81
Finish up the invite dialog with contact completion and documentation for all.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
72 | * Gets the account that @completion is filtering for. If no filtering is set |
|
34e0b0e7df81
Finish up the invite dialog with contact completion and documentation for all.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
73 | * %NULL will be returned. |
|
34e0b0e7df81
Finish up the invite dialog with contact completion and documentation for all.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
74 | * |
|
34e0b0e7df81
Finish up the invite dialog with contact completion and documentation for all.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
75 | * Returns: (transfer full) (nullable): The #PurpleAccount that's being |
|
34e0b0e7df81
Finish up the invite dialog with contact completion and documentation for all.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
76 | * filtered for. |
|
39581
28b38c0602d6
Replace ChangeLog.API entries with Since tags from PidginContactCompletion
Gary Kramlich <grim@reaperworld.com>
parents:
39579
diff
changeset
|
77 | * |
|
28b38c0602d6
Replace ChangeLog.API entries with Since tags from PidginContactCompletion
Gary Kramlich <grim@reaperworld.com>
parents:
39579
diff
changeset
|
78 | * Since: 3.0.0 |
|
39579
34e0b0e7df81
Finish up the invite dialog with contact completion and documentation for all.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
79 | */ |
|
34e0b0e7df81
Finish up the invite dialog with contact completion and documentation for all.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
80 | PurpleAccount *pidgin_contact_completion_get_account(PidginContactCompletion *completion); |
|
34e0b0e7df81
Finish up the invite dialog with contact completion and documentation for all.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
81 | |
|
34e0b0e7df81
Finish up the invite dialog with contact completion and documentation for all.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
82 | /** |
|
34e0b0e7df81
Finish up the invite dialog with contact completion and documentation for all.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
83 | * pidgin_contact_completion_set_account: |
|
34e0b0e7df81
Finish up the invite dialog with contact completion and documentation for all.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
84 | * @completion: The #PidginContactCompletion instance. |
|
34e0b0e7df81
Finish up the invite dialog with contact completion and documentation for all.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
85 | * @account: (nullable): The #PurpleAccount to filter for or %NULL. |
|
34e0b0e7df81
Finish up the invite dialog with contact completion and documentation for all.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
86 | * |
|
34e0b0e7df81
Finish up the invite dialog with contact completion and documentation for all.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
87 | * Set the #PurpleAccount that @completion should filter for. If @account is |
|
34e0b0e7df81
Finish up the invite dialog with contact completion and documentation for all.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
88 | * %NULL, all filtering will be disabled. |
|
39581
28b38c0602d6
Replace ChangeLog.API entries with Since tags from PidginContactCompletion
Gary Kramlich <grim@reaperworld.com>
parents:
39579
diff
changeset
|
89 | * |
|
28b38c0602d6
Replace ChangeLog.API entries with Since tags from PidginContactCompletion
Gary Kramlich <grim@reaperworld.com>
parents:
39579
diff
changeset
|
90 | * Since: 3.0.0 |
|
39579
34e0b0e7df81
Finish up the invite dialog with contact completion and documentation for all.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
91 | */ |
|
34e0b0e7df81
Finish up the invite dialog with contact completion and documentation for all.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
92 | void pidgin_contact_completion_set_account(PidginContactCompletion *completion, PurpleAccount *account); |
|
34e0b0e7df81
Finish up the invite dialog with contact completion and documentation for all.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
93 | |
|
34e0b0e7df81
Finish up the invite dialog with contact completion and documentation for all.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
94 | G_END_DECLS |
|
34e0b0e7df81
Finish up the invite dialog with contact completion and documentation for all.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
95 | |
|
34e0b0e7df81
Finish up the invite dialog with contact completion and documentation for all.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
96 | #endif /* PIDGIN_CONTACT_COMPLETION_H */ |