Tue, 01 Apr 2025 00:28:58 -0500
Convert PidginAccountsEnabledMenu to the list model
Again, not exactly what PIDGIN-18066 requested, but should be a reasonable version of it.
Testing Done:
Opened Pidgin with no accounts enabled, and the menu was empty. Enabled an account and it moved there, disable the account and it was removed.
Also, started Pidgin with an account enabled, and it appeared in the lower menu as expected.
Bugs closed: PIDGIN-18066
Reviewed at https://reviews.imfreedom.org/r/3954/
| 42943 | 1 | /* |
| 2 | * Pidgin - Internet Messenger | |
| 3 | * Copyright (C) Pidgin Developers <devel@pidgin.im> | |
| 4 | * | |
| 5 | * Pidgin 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 program is free software; you can redistribute it and/or modify | |
| 10 | * it under the terms of the GNU General Public License as published by | |
| 11 | * the Free Software Foundation; either version 2 of the License, or | |
| 12 | * (at your option) any later version. | |
| 13 | * | |
| 14 | * This program is distributed in the hope that it will be useful, | |
| 15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
| 16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
| 17 | * GNU General Public License for more details. | |
| 18 | * | |
| 19 | * You should have received a copy of the GNU General Public License | |
| 20 | * along with this program; if not, see <https://www.gnu.org/licenses/>. | |
| 21 | */ | |
| 22 | ||
| 23 | #if !defined(PIDGIN_GLOBAL_HEADER_INSIDE) && !defined(PIDGIN_COMPILATION) | |
| 24 | # error "only <pidgin.h> may be included directly" | |
| 25 | #endif | |
| 26 | ||
| 27 | #ifndef PIDGIN_TYPING_LABEL_H | |
| 28 | #define PIDGIN_TYPING_LABEL_H | |
| 29 | ||
| 30 | #include <glib.h> | |
| 31 | ||
| 32 | #include <gtk/gtk.h> | |
| 33 | ||
| 34 | #include "pidginconversation.h" | |
| 35 | #include "pidginversion.h" | |
| 36 | ||
| 37 | G_BEGIN_DECLS | |
| 38 | ||
| 39 | /** | |
| 40 | * PidginTypingLabel: | |
| 41 | * | |
| 42 | * A [class@Gtk.Widget] for displaying who is typing in a | |
| 43 | * [class@Purple.Conversation]. | |
| 44 | * | |
| 45 | * Since: 3.0 | |
| 46 | */ | |
| 47 | ||
| 48 | #define PIDGIN_TYPE_TYPING_LABEL (pidgin_typing_label_get_type()) | |
| 49 | ||
| 50 | PIDGIN_AVAILABLE_IN_3_0 | |
| 51 | G_DECLARE_FINAL_TYPE(PidginTypingLabel, pidgin_typing_label, PIDGIN, | |
| 52 | TYPING_LABEL, GtkBox) | |
| 53 | ||
| 54 | /** | |
| 55 | * pidgin_typing_label_new: | |
| 56 | * @conversation: A [class@Purple.Conversation] instance. | |
| 57 | * | |
| 58 | * Creates the new typing label for @conversation. | |
| 59 | * | |
|
43177
595a5f31003a
Annotate Pidgin constructors that return base types
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42943
diff
changeset
|
60 | * Returns: (transfer full) (type PidginTypingLabel): The new widget. |
| 42943 | 61 | * |
| 62 | * Since: 3.0 | |
| 63 | */ | |
| 64 | PIDGIN_AVAILABLE_IN_3_0 | |
| 65 | GtkWidget *pidgin_typing_label_new(PurpleConversation *conversation); | |
| 66 | ||
| 67 | /** | |
| 68 | * pidgin_typing_label_get_conversation: | |
| 69 | * @label: The instance. | |
| 70 | * | |
| 71 | * Gets the [class@Purple.Conversation] that @label was created for. | |
| 72 | * | |
| 73 | * Returns: (transfer none): The conversation. | |
| 74 | * | |
| 75 | * Since: 3.0 | |
| 76 | */ | |
| 77 | PIDGIN_AVAILABLE_IN_3_0 | |
| 78 | PurpleConversation *pidgin_typing_label_get_conversation(PidginTypingLabel *label); | |
| 79 | ||
| 80 | G_END_DECLS | |
| 81 | ||
| 82 | #endif /* PIDGIN_TYPING_LABEL_H */ |