pidgin/pidginaccountmanager.h

Fri, 22 Nov 2024 01:26:06 -0600

author
Elliott Sales de Andrade <quantum.analyst@gmail.com>
date
Fri, 22 Nov 2024 01:26:06 -0600
changeset 43080
dd2d26e6c6f9
parent 43073
b97e5e85b97d
child 43177
595a5f31003a
permissions
-rw-r--r--

Set the application on all windows

In some DEs (like GNOME), this allows grouping them all together.

It also restores the "construction" style in the title bar (for Adwaita stuff at least).

Testing Done:
Opened all the windows, and Alt-Tab now groups things together. Also checked in the inspector that the property was set on the windows.

Reviewed at https://reviews.imfreedom.org/r/3664/

41310
53e4815ef254 Create a new PidginAccountManager that replaces the manually built one.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
1 /*
53e4815ef254 Create a new PidginAccountManager that replaces the manually built one.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
2 * Pidgin - Internet Messenger
53e4815ef254 Create a new PidginAccountManager that replaces the manually built one.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
3 * Copyright (C) Pidgin Developers <devel@pidgin.im>
53e4815ef254 Create a new PidginAccountManager that replaces the manually built one.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
4 *
53e4815ef254 Create a new PidginAccountManager that replaces the manually built one.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
5 * Pidgin is the legal property of its developers, whose names are too numerous
53e4815ef254 Create a new PidginAccountManager that replaces the manually built one.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
6 * to list here. Please refer to the COPYRIGHT file distributed with this
53e4815ef254 Create a new PidginAccountManager that replaces the manually built one.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
7 * source distribution.
53e4815ef254 Create a new PidginAccountManager that replaces the manually built one.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
8 *
53e4815ef254 Create a new PidginAccountManager that replaces the manually built one.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
9 * This program is free software; you can redistribute it and/or modify
53e4815ef254 Create a new PidginAccountManager that replaces the manually built one.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
10 * it under the terms of the GNU General Public License as published by
53e4815ef254 Create a new PidginAccountManager that replaces the manually built one.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
11 * the Free Software Foundation; either version 2 of the License, or
53e4815ef254 Create a new PidginAccountManager that replaces the manually built one.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
12 * (at your option) any later version.
53e4815ef254 Create a new PidginAccountManager that replaces the manually built one.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
13 *
53e4815ef254 Create a new PidginAccountManager that replaces the manually built one.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
14 * This program is distributed in the hope that it will be useful,
53e4815ef254 Create a new PidginAccountManager that replaces the manually built one.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
53e4815ef254 Create a new PidginAccountManager that replaces the manually built one.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
53e4815ef254 Create a new PidginAccountManager that replaces the manually built one.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
17 * GNU General Public License for more details.
53e4815ef254 Create a new PidginAccountManager that replaces the manually built one.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
18 *
53e4815ef254 Create a new PidginAccountManager that replaces the manually built one.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
19 * You should have received a copy of the GNU General Public License
53e4815ef254 Create a new PidginAccountManager that replaces the manually built one.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
20 * along with this program; if not, see <https://www.gnu.org/licenses/>.
53e4815ef254 Create a new PidginAccountManager that replaces the manually built one.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
21 */
53e4815ef254 Create a new PidginAccountManager that replaces the manually built one.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
22
53e4815ef254 Create a new PidginAccountManager that replaces the manually built one.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
23 #if !defined(PIDGIN_GLOBAL_HEADER_INSIDE) && !defined(PIDGIN_COMPILATION)
53e4815ef254 Create a new PidginAccountManager that replaces the manually built one.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
24 # error "only <pidgin.h> may be included directly"
53e4815ef254 Create a new PidginAccountManager that replaces the manually built one.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
25 #endif
53e4815ef254 Create a new PidginAccountManager that replaces the manually built one.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
26
53e4815ef254 Create a new PidginAccountManager that replaces the manually built one.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
27 #ifndef PIDGIN_ACCOUNT_MANAGER_H
53e4815ef254 Create a new PidginAccountManager that replaces the manually built one.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
28 #define PIDGIN_ACCOUNT_MANAGER_H
53e4815ef254 Create a new PidginAccountManager that replaces the manually built one.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
29
53e4815ef254 Create a new PidginAccountManager that replaces the manually built one.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
30 #include <gtk/gtk.h>
53e4815ef254 Create a new PidginAccountManager that replaces the manually built one.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
31
43073
b97e5e85b97d Port account manager to AdwNavigationView
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 42649
diff changeset
32 #include <adwaita.h>
b97e5e85b97d Port account manager to AdwNavigationView
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 42649
diff changeset
33
42465
b7d530551c1b Tag declared Pidgin types with symbol visibility
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 42151
diff changeset
34 #include "pidginversion.h"
b7d530551c1b Tag declared Pidgin types with symbol visibility
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 42151
diff changeset
35
41310
53e4815ef254 Create a new PidginAccountManager that replaces the manually built one.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
36 G_BEGIN_DECLS
53e4815ef254 Create a new PidginAccountManager that replaces the manually built one.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
37
53e4815ef254 Create a new PidginAccountManager that replaces the manually built one.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
38 /**
53e4815ef254 Create a new PidginAccountManager that replaces the manually built one.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
39 * PidginAccountManager:
53e4815ef254 Create a new PidginAccountManager that replaces the manually built one.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
40 *
53e4815ef254 Create a new PidginAccountManager that replaces the manually built one.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
41 * A singleton dialog for managing accounts.
53e4815ef254 Create a new PidginAccountManager that replaces the manually built one.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
42 *
42620
72178a341eb8 Remove minor versions from Since tags in Pidgin
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 42466
diff changeset
43 * Since: 3.0
41310
53e4815ef254 Create a new PidginAccountManager that replaces the manually built one.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
44 */
53e4815ef254 Create a new PidginAccountManager that replaces the manually built one.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
45
53e4815ef254 Create a new PidginAccountManager that replaces the manually built one.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
46 #define PIDGIN_TYPE_ACCOUNT_MANAGER (pidgin_account_manager_get_type())
42465
b7d530551c1b Tag declared Pidgin types with symbol visibility
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 42151
diff changeset
47
b7d530551c1b Tag declared Pidgin types with symbol visibility
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 42151
diff changeset
48 PIDGIN_AVAILABLE_IN_3_0
41310
53e4815ef254 Create a new PidginAccountManager that replaces the manually built one.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
49 G_DECLARE_FINAL_TYPE(PidginAccountManager, pidgin_account_manager, PIDGIN,
43073
b97e5e85b97d Port account manager to AdwNavigationView
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 42649
diff changeset
50 ACCOUNT_MANAGER, AdwWindow)
41310
53e4815ef254 Create a new PidginAccountManager that replaces the manually built one.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
51
53e4815ef254 Create a new PidginAccountManager that replaces the manually built one.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
52 /**
53e4815ef254 Create a new PidginAccountManager that replaces the manually built one.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
53 * pidgin_account_manager_new:
43080
dd2d26e6c6f9 Set the application on all windows
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 43073
diff changeset
54 * @application: (nullable): A #GtkApplication to associate with this window.
41310
53e4815ef254 Create a new PidginAccountManager that replaces the manually built one.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
55 *
53e4815ef254 Create a new PidginAccountManager that replaces the manually built one.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
56 * Creates a new account manager dialog.
53e4815ef254 Create a new PidginAccountManager that replaces the manually built one.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
57 *
53e4815ef254 Create a new PidginAccountManager that replaces the manually built one.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
58 * Returns: (transfer full): The dialog.
53e4815ef254 Create a new PidginAccountManager that replaces the manually built one.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
59 *
42620
72178a341eb8 Remove minor versions from Since tags in Pidgin
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 42466
diff changeset
60 * Since: 3.0
41310
53e4815ef254 Create a new PidginAccountManager that replaces the manually built one.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
61 */
42466
ca3374c1cdba Add visibility to all Pidgin symbols tagged with Since 3.0
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 42465
diff changeset
62 PIDGIN_AVAILABLE_IN_3_0
43080
dd2d26e6c6f9 Set the application on all windows
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 43073
diff changeset
63 GtkWidget *pidgin_account_manager_new(GtkApplication *application);
41310
53e4815ef254 Create a new PidginAccountManager that replaces the manually built one.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
64
42151
41b9c5be8965 Embed PidginAccountEditor into PidginAccountManager
Gary Kramlich <grim@reaperworld.com>
parents: 41310
diff changeset
65 /**
42649
6986f5428d30 Add a doc check unit test to Pidgin and fix the issues it found
Gary Kramlich <grim@reaperworld.com>
parents: 42620
diff changeset
66 * pidgin_account_manager_show_overview:
42151
41b9c5be8965 Embed PidginAccountEditor into PidginAccountManager
Gary Kramlich <grim@reaperworld.com>
parents: 41310
diff changeset
67 * @manager: The instance.
41b9c5be8965 Embed PidginAccountEditor into PidginAccountManager
Gary Kramlich <grim@reaperworld.com>
parents: 41310
diff changeset
68 *
41b9c5be8965 Embed PidginAccountEditor into PidginAccountManager
Gary Kramlich <grim@reaperworld.com>
parents: 41310
diff changeset
69 * Switches @manager to the overview page. This is useful as @manager might
41b9c5be8965 Embed PidginAccountEditor into PidginAccountManager
Gary Kramlich <grim@reaperworld.com>
parents: 41310
diff changeset
70 * already be visible but editing an account.
41b9c5be8965 Embed PidginAccountEditor into PidginAccountManager
Gary Kramlich <grim@reaperworld.com>
parents: 41310
diff changeset
71 *
42620
72178a341eb8 Remove minor versions from Since tags in Pidgin
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 42466
diff changeset
72 * Since: 3.0
42151
41b9c5be8965 Embed PidginAccountEditor into PidginAccountManager
Gary Kramlich <grim@reaperworld.com>
parents: 41310
diff changeset
73 */
42466
ca3374c1cdba Add visibility to all Pidgin symbols tagged with Since 3.0
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 42465
diff changeset
74 PIDGIN_AVAILABLE_IN_3_0
42151
41b9c5be8965 Embed PidginAccountEditor into PidginAccountManager
Gary Kramlich <grim@reaperworld.com>
parents: 41310
diff changeset
75 void pidgin_account_manager_show_overview(PidginAccountManager *manager);
41b9c5be8965 Embed PidginAccountEditor into PidginAccountManager
Gary Kramlich <grim@reaperworld.com>
parents: 41310
diff changeset
76
41b9c5be8965 Embed PidginAccountEditor into PidginAccountManager
Gary Kramlich <grim@reaperworld.com>
parents: 41310
diff changeset
77 /**
41b9c5be8965 Embed PidginAccountEditor into PidginAccountManager
Gary Kramlich <grim@reaperworld.com>
parents: 41310
diff changeset
78 * pidgin_account_manager_edit_account:
41b9c5be8965 Embed PidginAccountEditor into PidginAccountManager
Gary Kramlich <grim@reaperworld.com>
parents: 41310
diff changeset
79 * @manager: The instance.
41b9c5be8965 Embed PidginAccountEditor into PidginAccountManager
Gary Kramlich <grim@reaperworld.com>
parents: 41310
diff changeset
80 * @account: The account to edit.
41b9c5be8965 Embed PidginAccountEditor into PidginAccountManager
Gary Kramlich <grim@reaperworld.com>
parents: 41310
diff changeset
81 *
41b9c5be8965 Embed PidginAccountEditor into PidginAccountManager
Gary Kramlich <grim@reaperworld.com>
parents: 41310
diff changeset
82 * Opens the account editor in @manager for the given account.
41b9c5be8965 Embed PidginAccountEditor into PidginAccountManager
Gary Kramlich <grim@reaperworld.com>
parents: 41310
diff changeset
83 *
42620
72178a341eb8 Remove minor versions from Since tags in Pidgin
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 42466
diff changeset
84 * Since: 3.0
42151
41b9c5be8965 Embed PidginAccountEditor into PidginAccountManager
Gary Kramlich <grim@reaperworld.com>
parents: 41310
diff changeset
85 */
42466
ca3374c1cdba Add visibility to all Pidgin symbols tagged with Since 3.0
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 42465
diff changeset
86 PIDGIN_AVAILABLE_IN_3_0
42151
41b9c5be8965 Embed PidginAccountEditor into PidginAccountManager
Gary Kramlich <grim@reaperworld.com>
parents: 41310
diff changeset
87 void pidgin_account_manager_edit_account(PidginAccountManager *manager, PurpleAccount *account);
41b9c5be8965 Embed PidginAccountEditor into PidginAccountManager
Gary Kramlich <grim@reaperworld.com>
parents: 41310
diff changeset
88
41310
53e4815ef254 Create a new PidginAccountManager that replaces the manually built one.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
89 G_END_DECLS
53e4815ef254 Create a new PidginAccountManager that replaces the manually built one.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
90
53e4815ef254 Create a new PidginAccountManager that replaces the manually built one.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
91 #endif /* PIDGIN_ACCOUNT_MANAGER_H */

mercurial