pidgin/prefs/pidginawaypage.h

Fri, 13 May 2022 03:16:36 -0500

author
Elliott Sales de Andrade <quantum.analyst@gmail.com>
date
Fri, 13 May 2022 03:16:36 -0500
changeset 41368
54d7cfc990eb
permissions
-rw-r--r--

Split away/idle prefs into a separate widget

I didn't do any re-designing, but did change `GtkFrame` to `HdyPreferencesGroup`, as that allowed using a `HdyPreferencesPage` like with the credentials page.

Testing Done:
Opened Preferences and didn't see any errors. Also, changed all settings and saw that debug log showed they were changed and prefs were re-saving.

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

41368
54d7cfc990eb Split away/idle prefs into a separate widget
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff changeset
1 /*
54d7cfc990eb Split away/idle prefs into a separate widget
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff changeset
2 * Pidgin - Internet Messenger
54d7cfc990eb Split away/idle prefs into a separate widget
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff changeset
3 * Copyright (C) Pidgin Developers <devel@pidgin.im>
54d7cfc990eb Split away/idle prefs into a separate widget
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff changeset
4 *
54d7cfc990eb Split away/idle prefs into a separate widget
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff changeset
5 * Pidgin is the legal property of its developers, whose names are too numerous
54d7cfc990eb Split away/idle prefs into a separate widget
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff changeset
6 * to list here. Please refer to the COPYRIGHT file distributed with this
54d7cfc990eb Split away/idle prefs into a separate widget
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff changeset
7 * source distribution.
54d7cfc990eb Split away/idle prefs into a separate widget
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff changeset
8 *
54d7cfc990eb Split away/idle prefs into a separate widget
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff changeset
9 * This program is free software; you can redistribute it and/or modify
54d7cfc990eb Split away/idle prefs into a separate widget
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff changeset
10 * it under the terms of the GNU General Public License as published by
54d7cfc990eb Split away/idle prefs into a separate widget
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff changeset
11 * the Free Software Foundation; either version 2 of the License, or
54d7cfc990eb Split away/idle prefs into a separate widget
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff changeset
12 * (at your option) any later version.
54d7cfc990eb Split away/idle prefs into a separate widget
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff changeset
13 *
54d7cfc990eb Split away/idle prefs into a separate widget
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff changeset
14 * This program is distributed in the hope that it will be useful,
54d7cfc990eb Split away/idle prefs into a separate widget
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff changeset
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
54d7cfc990eb Split away/idle prefs into a separate widget
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff changeset
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
54d7cfc990eb Split away/idle prefs into a separate widget
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff changeset
17 * GNU General Public License for more details.
54d7cfc990eb Split away/idle prefs into a separate widget
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff changeset
18 *
54d7cfc990eb Split away/idle prefs into a separate widget
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff changeset
19 * You should have received a copy of the GNU General Public License
54d7cfc990eb Split away/idle prefs into a separate widget
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff changeset
20 * along with this program; if not, see <https://www.gnu.org/licenses/>.
54d7cfc990eb Split away/idle prefs into a separate widget
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff changeset
21 */
54d7cfc990eb Split away/idle prefs into a separate widget
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff changeset
22
54d7cfc990eb Split away/idle prefs into a separate widget
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff changeset
23 #if !defined(PIDGIN_GLOBAL_HEADER_INSIDE) && !defined(PIDGIN_COMPILATION)
54d7cfc990eb Split away/idle prefs into a separate widget
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff changeset
24 # error "only <pidgin.h> may be included directly"
54d7cfc990eb Split away/idle prefs into a separate widget
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff changeset
25 #endif
54d7cfc990eb Split away/idle prefs into a separate widget
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff changeset
26
54d7cfc990eb Split away/idle prefs into a separate widget
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff changeset
27 #ifndef PIDGIN_AWAY_PAGE_H
54d7cfc990eb Split away/idle prefs into a separate widget
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff changeset
28 #define PIDGIN_AWAY_PAGE_H
54d7cfc990eb Split away/idle prefs into a separate widget
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff changeset
29
54d7cfc990eb Split away/idle prefs into a separate widget
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff changeset
30 #include <glib.h>
54d7cfc990eb Split away/idle prefs into a separate widget
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff changeset
31
54d7cfc990eb Split away/idle prefs into a separate widget
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff changeset
32 #include <gtk/gtk.h>
54d7cfc990eb Split away/idle prefs into a separate widget
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff changeset
33 #include <handy.h>
54d7cfc990eb Split away/idle prefs into a separate widget
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff changeset
34
54d7cfc990eb Split away/idle prefs into a separate widget
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff changeset
35 G_BEGIN_DECLS
54d7cfc990eb Split away/idle prefs into a separate widget
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff changeset
36
54d7cfc990eb Split away/idle prefs into a separate widget
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff changeset
37 /**
54d7cfc990eb Split away/idle prefs into a separate widget
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff changeset
38 * PidginAwayPage:
54d7cfc990eb Split away/idle prefs into a separate widget
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff changeset
39 *
54d7cfc990eb Split away/idle prefs into a separate widget
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff changeset
40 * #PidginAwayPage is a widget for the preferences window to let users
54d7cfc990eb Split away/idle prefs into a separate widget
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff changeset
41 * choose and configure their away and idle settings.
54d7cfc990eb Split away/idle prefs into a separate widget
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff changeset
42 *
54d7cfc990eb Split away/idle prefs into a separate widget
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff changeset
43 * Since: 3.0.0
54d7cfc990eb Split away/idle prefs into a separate widget
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff changeset
44 */
54d7cfc990eb Split away/idle prefs into a separate widget
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff changeset
45 #define PIDGIN_TYPE_AWAY_PAGE (pidgin_away_page_get_type())
54d7cfc990eb Split away/idle prefs into a separate widget
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff changeset
46 G_DECLARE_FINAL_TYPE(PidginAwayPage, pidgin_away_page,
54d7cfc990eb Split away/idle prefs into a separate widget
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff changeset
47 PIDGIN, AWAY_PAGE, HdyPreferencesPage)
54d7cfc990eb Split away/idle prefs into a separate widget
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff changeset
48
54d7cfc990eb Split away/idle prefs into a separate widget
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff changeset
49 /**
54d7cfc990eb Split away/idle prefs into a separate widget
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff changeset
50 * pidgin_away_page_new:
54d7cfc990eb Split away/idle prefs into a separate widget
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff changeset
51 *
54d7cfc990eb Split away/idle prefs into a separate widget
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff changeset
52 * Creates a new #PidginAwayPage instance.
54d7cfc990eb Split away/idle prefs into a separate widget
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff changeset
53 *
54d7cfc990eb Split away/idle prefs into a separate widget
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff changeset
54 * Returns: (transfer full): The new #PidginAwayPage instance.
54d7cfc990eb Split away/idle prefs into a separate widget
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff changeset
55 *
54d7cfc990eb Split away/idle prefs into a separate widget
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff changeset
56 * Since: 3.0.0
54d7cfc990eb Split away/idle prefs into a separate widget
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff changeset
57 */
54d7cfc990eb Split away/idle prefs into a separate widget
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff changeset
58 GtkWidget *pidgin_away_page_new(void);
54d7cfc990eb Split away/idle prefs into a separate widget
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff changeset
59
54d7cfc990eb Split away/idle prefs into a separate widget
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff changeset
60 G_END_DECLS
54d7cfc990eb Split away/idle prefs into a separate widget
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff changeset
61
54d7cfc990eb Split away/idle prefs into a separate widget
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff changeset
62 #endif /* PIDGIN_AWAY_PAGE_H */

mercurial