Mon, 30 Jun 2025 14:22:13 -0500
Update the flatpak to gnome 48 and to the matching birb version
The birb version was missed here when it was updated.
Testing Done:
Built the flatpak with the instructions in the readme.
Reviewed at https://reviews.imfreedom.org/r/4038/
| 42918 | 1 | /* |
| 2 | * Purple - Internet Messaging Library | |
| 3 | * Copyright (C) Pidgin Developers <devel@pidgin.im> | |
| 4 | * | |
| 5 | * Purple is the legal property of its developers, whose names are too numerous | |
| 6 | * to list here. Please refer to the COPYRIGHT file distributed with this | |
| 7 | * source distribution. | |
| 8 | * | |
| 9 | * This library is free software; you can redistribute it and/or modify it | |
| 10 | * under the terms of the GNU General Public License as published by the Free | |
| 11 | * Software Foundation; either version 2 of the License, or (at your option) | |
| 12 | * any later version. | |
| 13 | * | |
| 14 | * This library is distributed in the hope that it will be useful, but WITHOUT | |
| 15 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | |
| 16 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for | |
| 17 | * more details. | |
| 18 | * | |
| 19 | * You should have received a copy of the GNU General Public License along with | |
| 20 | * this library; if not, see <https://www.gnu.org/licenses/>. | |
| 21 | */ | |
| 22 | ||
| 23 | #if !defined(PURPLE_GLOBAL_HEADER_INSIDE) && !defined(PURPLE_COMPILATION) | |
| 24 | # error "only <purple.h> may be included directly" | |
| 25 | #endif | |
| 26 | ||
| 27 | #ifndef PURPLE_BADGES_H | |
| 28 | #define PURPLE_BADGES_H | |
| 29 | ||
| 30 | #include <glib.h> | |
| 31 | #include <glib-object.h> | |
| 32 | ||
| 33 | #include "purplebadge.h" | |
| 34 | #include "purpleversion.h" | |
| 35 | ||
| 36 | G_BEGIN_DECLS | |
| 37 | ||
| 38 | /** | |
| 39 | * PurpleBadges: | |
| 40 | * | |
| 41 | * #PurpleBadges is a collection of [class@Badge]s sorted by their priority. | |
| 42 | * This is intended to be used on [class@ConversationMembers] and perhaps | |
| 43 | * elsewhere to display information like "moderator", "admin", "broadcaster", | |
| 44 | * etc. Items with the highest priority will be at the start of the collection. | |
| 45 | * | |
| 46 | * Since: 3.0 | |
| 47 | */ | |
| 48 | ||
| 49 | #define PURPLE_TYPE_BADGES (purple_badges_get_type()) | |
| 50 | ||
| 51 | PURPLE_AVAILABLE_IN_3_0 | |
| 52 | G_DECLARE_FINAL_TYPE(PurpleBadges, purple_badges, PURPLE, BADGES, GObject) | |
| 53 | ||
| 54 | /** | |
| 55 | * purple_badges_add_badge: | |
| 56 | * @badges: The instance. | |
| 57 | * @badge: The new badge to add. | |
| 58 | * | |
| 59 | * Adds @badge to @badges. | |
| 60 | * | |
| 61 | * If a badge with the same id of @badge already exists, @badge will not be | |
| 62 | * added and %FALSE will be returned. | |
| 63 | * | |
| 64 | * Returns: %TRUE if @badge was added successfully, otherwise %FALSE if an | |
| 65 | * existing badge has the same id. | |
| 66 | * | |
| 67 | * Since: 3.0 | |
| 68 | */ | |
| 69 | PURPLE_AVAILABLE_IN_3_0 | |
| 70 | gboolean purple_badges_add_badge(PurpleBadges *badges, PurpleBadge *badge); | |
| 71 | ||
| 72 | /** | |
|
43180
cafab5224c86
Implement Purple.Badges.compare
Gary Kramlich <grim@reaperworld.com>
parents:
42918
diff
changeset
|
73 | * purple_badges_compare: |
|
cafab5224c86
Implement Purple.Badges.compare
Gary Kramlich <grim@reaperworld.com>
parents:
42918
diff
changeset
|
74 | * @badges2: (nullable): the instance to compare |
|
cafab5224c86
Implement Purple.Badges.compare
Gary Kramlich <grim@reaperworld.com>
parents:
42918
diff
changeset
|
75 | * |
|
cafab5224c86
Implement Purple.Badges.compare
Gary Kramlich <grim@reaperworld.com>
parents:
42918
diff
changeset
|
76 | * Compares two badges instances for sorting. |
|
cafab5224c86
Implement Purple.Badges.compare
Gary Kramlich <grim@reaperworld.com>
parents:
42918
diff
changeset
|
77 | * |
|
cafab5224c86
Implement Purple.Badges.compare
Gary Kramlich <grim@reaperworld.com>
parents:
42918
diff
changeset
|
78 | * The sort order for badges is based on the priority of the badges they |
|
cafab5224c86
Implement Purple.Badges.compare
Gary Kramlich <grim@reaperworld.com>
parents:
42918
diff
changeset
|
79 | * contain with the highest priority sorting first. If the priorities are equal |
|
cafab5224c86
Implement Purple.Badges.compare
Gary Kramlich <grim@reaperworld.com>
parents:
42918
diff
changeset
|
80 | * then the next badge is tested continuing until a difference is found or all |
|
cafab5224c86
Implement Purple.Badges.compare
Gary Kramlich <grim@reaperworld.com>
parents:
42918
diff
changeset
|
81 | * badges have been exhausted. |
|
cafab5224c86
Implement Purple.Badges.compare
Gary Kramlich <grim@reaperworld.com>
parents:
42918
diff
changeset
|
82 | * |
|
cafab5224c86
Implement Purple.Badges.compare
Gary Kramlich <grim@reaperworld.com>
parents:
42918
diff
changeset
|
83 | * Returns: less than zero if the first badge should be sorted first, 0 if they |
|
cafab5224c86
Implement Purple.Badges.compare
Gary Kramlich <grim@reaperworld.com>
parents:
42918
diff
changeset
|
84 | * are equal, greater than 0 if the second badge should be sorted |
|
cafab5224c86
Implement Purple.Badges.compare
Gary Kramlich <grim@reaperworld.com>
parents:
42918
diff
changeset
|
85 | * first. |
|
cafab5224c86
Implement Purple.Badges.compare
Gary Kramlich <grim@reaperworld.com>
parents:
42918
diff
changeset
|
86 | * |
|
cafab5224c86
Implement Purple.Badges.compare
Gary Kramlich <grim@reaperworld.com>
parents:
42918
diff
changeset
|
87 | * Since: 3.0 |
|
cafab5224c86
Implement Purple.Badges.compare
Gary Kramlich <grim@reaperworld.com>
parents:
42918
diff
changeset
|
88 | */ |
|
cafab5224c86
Implement Purple.Badges.compare
Gary Kramlich <grim@reaperworld.com>
parents:
42918
diff
changeset
|
89 | PURPLE_AVAILABLE_IN_3_0 |
|
cafab5224c86
Implement Purple.Badges.compare
Gary Kramlich <grim@reaperworld.com>
parents:
42918
diff
changeset
|
90 | int purple_badges_compare(PurpleBadges *badges1, PurpleBadges *badges2); |
|
cafab5224c86
Implement Purple.Badges.compare
Gary Kramlich <grim@reaperworld.com>
parents:
42918
diff
changeset
|
91 | |
|
cafab5224c86
Implement Purple.Badges.compare
Gary Kramlich <grim@reaperworld.com>
parents:
42918
diff
changeset
|
92 | /** |
|
cafab5224c86
Implement Purple.Badges.compare
Gary Kramlich <grim@reaperworld.com>
parents:
42918
diff
changeset
|
93 | * purple_badges_new: |
|
cafab5224c86
Implement Purple.Badges.compare
Gary Kramlich <grim@reaperworld.com>
parents:
42918
diff
changeset
|
94 | * |
|
cafab5224c86
Implement Purple.Badges.compare
Gary Kramlich <grim@reaperworld.com>
parents:
42918
diff
changeset
|
95 | * Creates a new badges collection. |
|
cafab5224c86
Implement Purple.Badges.compare
Gary Kramlich <grim@reaperworld.com>
parents:
42918
diff
changeset
|
96 | * |
|
cafab5224c86
Implement Purple.Badges.compare
Gary Kramlich <grim@reaperworld.com>
parents:
42918
diff
changeset
|
97 | * Returns: (transfer full): The new instance. |
|
cafab5224c86
Implement Purple.Badges.compare
Gary Kramlich <grim@reaperworld.com>
parents:
42918
diff
changeset
|
98 | * |
|
cafab5224c86
Implement Purple.Badges.compare
Gary Kramlich <grim@reaperworld.com>
parents:
42918
diff
changeset
|
99 | * Since: 3.0 |
|
cafab5224c86
Implement Purple.Badges.compare
Gary Kramlich <grim@reaperworld.com>
parents:
42918
diff
changeset
|
100 | */ |
|
cafab5224c86
Implement Purple.Badges.compare
Gary Kramlich <grim@reaperworld.com>
parents:
42918
diff
changeset
|
101 | PURPLE_AVAILABLE_IN_3_0 |
|
cafab5224c86
Implement Purple.Badges.compare
Gary Kramlich <grim@reaperworld.com>
parents:
42918
diff
changeset
|
102 | PurpleBadges *purple_badges_new(void); |
|
cafab5224c86
Implement Purple.Badges.compare
Gary Kramlich <grim@reaperworld.com>
parents:
42918
diff
changeset
|
103 | |
|
cafab5224c86
Implement Purple.Badges.compare
Gary Kramlich <grim@reaperworld.com>
parents:
42918
diff
changeset
|
104 | /** |
| 42918 | 105 | * purple_badges_remove_badge: |
| 106 | * @badges: The instance. | |
| 107 | * @id: The id of the badge to remove. | |
| 108 | * | |
| 109 | * Removes the badge with an id of @id. | |
| 110 | * | |
| 111 | * Returns: %TRUE if a badge was found with an id of @id, otherwise %FALSE. | |
| 112 | * | |
| 113 | * Since: 3.0 | |
| 114 | */ | |
| 115 | PURPLE_AVAILABLE_IN_3_0 | |
| 116 | gboolean purple_badges_remove_badge(PurpleBadges *badges, const char *id); | |
| 117 | ||
| 118 | G_END_DECLS | |
| 119 | ||
| 120 | #endif /* PURPLE_BADGES_H */ |