Mon, 29 Aug 2022 22:06:07 -0500
Move network preferences to Adwaita preference widgets
This does make the TURN server settings longer vertically, but that seems more consistent with everything.
Also fix the `leave` event on the TURN server setting.
Testing Done:
Toggled all the options and checked that stuff happened in the Debug Window.
Also, I'm not sure why the `GtkSpinButton` and `GtkEntry` expand to different sizes; they both have `hexpand=1`, and the spin button is next to text that's _shorter_ than the entry, but somehow ends up farther right. Seems like a bug in GTK.
PS, be careful of this page; it tries to get your public IP address and displays it when it succeeds.
Reviewed at https://reviews.imfreedom.org/r/1680/
|
40873
68c7ef6c5320
Convert credentials page to use HdyPreferencesGroup and a list box.
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff
changeset
|
1 | /* |
|
68c7ef6c5320
Convert credentials page to use HdyPreferencesGroup and a list box.
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff
changeset
|
2 | * Pidgin - Internet Messenger |
|
68c7ef6c5320
Convert credentials page to use HdyPreferencesGroup and a list box.
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff
changeset
|
3 | * Copyright (C) Pidgin Developers <devel@pidgin.im> |
|
68c7ef6c5320
Convert credentials page to use HdyPreferencesGroup and a list box.
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff
changeset
|
4 | * |
|
68c7ef6c5320
Convert credentials page to use HdyPreferencesGroup and a list box.
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 |
|
68c7ef6c5320
Convert credentials page to use HdyPreferencesGroup and a list box.
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff
changeset
|
6 | * to list here. Please refer to the COPYRIGHT file distributed with this |
|
68c7ef6c5320
Convert credentials page to use HdyPreferencesGroup and a list box.
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff
changeset
|
7 | * source distribution. |
|
68c7ef6c5320
Convert credentials page to use HdyPreferencesGroup and a list box.
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff
changeset
|
8 | * |
|
68c7ef6c5320
Convert credentials page to use HdyPreferencesGroup and a list box.
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff
changeset
|
9 | * This program is free software; you can redistribute it and/or modify |
|
68c7ef6c5320
Convert credentials page to use HdyPreferencesGroup and a list box.
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 |
|
68c7ef6c5320
Convert credentials page to use HdyPreferencesGroup and a list box.
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff
changeset
|
11 | * the Free Software Foundation; either version 2 of the License, or |
|
68c7ef6c5320
Convert credentials page to use HdyPreferencesGroup and a list box.
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff
changeset
|
12 | * (at your option) any later version. |
|
68c7ef6c5320
Convert credentials page to use HdyPreferencesGroup and a list box.
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff
changeset
|
13 | * |
|
68c7ef6c5320
Convert credentials page to use HdyPreferencesGroup and a list box.
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff
changeset
|
14 | * This program is distributed in the hope that it will be useful, |
|
68c7ef6c5320
Convert credentials page to use HdyPreferencesGroup and a list box.
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff
changeset
|
15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
68c7ef6c5320
Convert credentials page to use HdyPreferencesGroup and a list box.
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff
changeset
|
16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
68c7ef6c5320
Convert credentials page to use HdyPreferencesGroup and a list box.
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff
changeset
|
17 | * GNU General Public License for more details. |
|
68c7ef6c5320
Convert credentials page to use HdyPreferencesGroup and a list box.
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff
changeset
|
18 | * |
|
68c7ef6c5320
Convert credentials page to use HdyPreferencesGroup and a list box.
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff
changeset
|
19 | * You should have received a copy of the GNU General Public License |
|
68c7ef6c5320
Convert credentials page to use HdyPreferencesGroup and a list box.
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff
changeset
|
20 | * along with this program; if not, see <https://www.gnu.org/licenses/>. |
|
68c7ef6c5320
Convert credentials page to use HdyPreferencesGroup and a list box.
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff
changeset
|
21 | */ |
|
68c7ef6c5320
Convert credentials page to use HdyPreferencesGroup and a list box.
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff
changeset
|
22 | |
|
68c7ef6c5320
Convert credentials page to use HdyPreferencesGroup and a list box.
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff
changeset
|
23 | #include <purple.h> |
|
68c7ef6c5320
Convert credentials page to use HdyPreferencesGroup and a list box.
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff
changeset
|
24 | |
|
41520
a5dd595361b4
Replace libhandy with libadwaita
Gary Kramlich <grim@reaperworld.com>
parents:
41479
diff
changeset
|
25 | #include <adwaita.h> |
|
40873
68c7ef6c5320
Convert credentials page to use HdyPreferencesGroup and a list box.
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff
changeset
|
26 | |
|
68c7ef6c5320
Convert credentials page to use HdyPreferencesGroup and a list box.
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff
changeset
|
27 | #include "pidgincredentialproviderrow.h" |
|
68c7ef6c5320
Convert credentials page to use HdyPreferencesGroup and a list box.
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff
changeset
|
28 | |
|
68c7ef6c5320
Convert credentials page to use HdyPreferencesGroup and a list box.
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff
changeset
|
29 | struct _PidginCredentialProviderRow { |
|
41520
a5dd595361b4
Replace libhandy with libadwaita
Gary Kramlich <grim@reaperworld.com>
parents:
41479
diff
changeset
|
30 | AdwActionRow parent; |
|
40873
68c7ef6c5320
Convert credentials page to use HdyPreferencesGroup and a list box.
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff
changeset
|
31 | |
|
68c7ef6c5320
Convert credentials page to use HdyPreferencesGroup and a list box.
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff
changeset
|
32 | PurpleCredentialProvider *provider; |
|
68c7ef6c5320
Convert credentials page to use HdyPreferencesGroup and a list box.
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff
changeset
|
33 | |
|
68c7ef6c5320
Convert credentials page to use HdyPreferencesGroup and a list box.
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff
changeset
|
34 | GtkWidget *active; |
|
68c7ef6c5320
Convert credentials page to use HdyPreferencesGroup and a list box.
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff
changeset
|
35 | GtkWidget *configure; |
|
68c7ef6c5320
Convert credentials page to use HdyPreferencesGroup and a list box.
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff
changeset
|
36 | }; |
|
68c7ef6c5320
Convert credentials page to use HdyPreferencesGroup and a list box.
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff
changeset
|
37 | |
|
68c7ef6c5320
Convert credentials page to use HdyPreferencesGroup and a list box.
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff
changeset
|
38 | enum { |
|
68c7ef6c5320
Convert credentials page to use HdyPreferencesGroup and a list box.
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff
changeset
|
39 | PROP_0, |
|
68c7ef6c5320
Convert credentials page to use HdyPreferencesGroup and a list box.
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff
changeset
|
40 | PROP_PROVIDER, |
|
68c7ef6c5320
Convert credentials page to use HdyPreferencesGroup and a list box.
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff
changeset
|
41 | PROP_ACTIVE, |
|
68c7ef6c5320
Convert credentials page to use HdyPreferencesGroup and a list box.
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff
changeset
|
42 | N_PROPERTIES, |
|
68c7ef6c5320
Convert credentials page to use HdyPreferencesGroup and a list box.
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff
changeset
|
43 | }; |
|
68c7ef6c5320
Convert credentials page to use HdyPreferencesGroup and a list box.
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff
changeset
|
44 | static GParamSpec *properties[N_PROPERTIES] = {NULL, }; |
|
68c7ef6c5320
Convert credentials page to use HdyPreferencesGroup and a list box.
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff
changeset
|
45 | |
|
68c7ef6c5320
Convert credentials page to use HdyPreferencesGroup and a list box.
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff
changeset
|
46 | G_DEFINE_TYPE(PidginCredentialProviderRow, pidgin_credential_provider_row, |
|
41520
a5dd595361b4
Replace libhandy with libadwaita
Gary Kramlich <grim@reaperworld.com>
parents:
41479
diff
changeset
|
47 | ADW_TYPE_ACTION_ROW) |
|
40873
68c7ef6c5320
Convert credentials page to use HdyPreferencesGroup and a list box.
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff
changeset
|
48 | |
|
68c7ef6c5320
Convert credentials page to use HdyPreferencesGroup and a list box.
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff
changeset
|
49 | /****************************************************************************** |
|
68c7ef6c5320
Convert credentials page to use HdyPreferencesGroup and a list box.
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff
changeset
|
50 | * Helpers |
|
68c7ef6c5320
Convert credentials page to use HdyPreferencesGroup and a list box.
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff
changeset
|
51 | *****************************************************************************/ |
|
68c7ef6c5320
Convert credentials page to use HdyPreferencesGroup and a list box.
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff
changeset
|
52 | static void |
|
68c7ef6c5320
Convert credentials page to use HdyPreferencesGroup and a list box.
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff
changeset
|
53 | pidgin_credential_provider_row_set_provider(PidginCredentialProviderRow *row, |
|
68c7ef6c5320
Convert credentials page to use HdyPreferencesGroup and a list box.
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff
changeset
|
54 | PurpleCredentialProvider *provider) |
|
68c7ef6c5320
Convert credentials page to use HdyPreferencesGroup and a list box.
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff
changeset
|
55 | { |
|
68c7ef6c5320
Convert credentials page to use HdyPreferencesGroup and a list box.
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff
changeset
|
56 | if(!g_set_object(&row->provider, provider)) { |
|
68c7ef6c5320
Convert credentials page to use HdyPreferencesGroup and a list box.
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff
changeset
|
57 | return; |
|
68c7ef6c5320
Convert credentials page to use HdyPreferencesGroup and a list box.
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff
changeset
|
58 | } |
|
68c7ef6c5320
Convert credentials page to use HdyPreferencesGroup and a list box.
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff
changeset
|
59 | |
|
68c7ef6c5320
Convert credentials page to use HdyPreferencesGroup and a list box.
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff
changeset
|
60 | if(PURPLE_IS_CREDENTIAL_PROVIDER(provider)) { |
|
41520
a5dd595361b4
Replace libhandy with libadwaita
Gary Kramlich <grim@reaperworld.com>
parents:
41479
diff
changeset
|
61 | adw_preferences_row_set_title( |
|
a5dd595361b4
Replace libhandy with libadwaita
Gary Kramlich <grim@reaperworld.com>
parents:
41479
diff
changeset
|
62 | ADW_PREFERENCES_ROW(row), |
|
40873
68c7ef6c5320
Convert credentials page to use HdyPreferencesGroup and a list box.
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff
changeset
|
63 | purple_credential_provider_get_name(provider)); |
|
41520
a5dd595361b4
Replace libhandy with libadwaita
Gary Kramlich <grim@reaperworld.com>
parents:
41479
diff
changeset
|
64 | adw_action_row_set_subtitle( |
|
a5dd595361b4
Replace libhandy with libadwaita
Gary Kramlich <grim@reaperworld.com>
parents:
41479
diff
changeset
|
65 | ADW_ACTION_ROW(row), |
|
40873
68c7ef6c5320
Convert credentials page to use HdyPreferencesGroup and a list box.
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff
changeset
|
66 | purple_credential_provider_get_description(provider)); |
|
68c7ef6c5320
Convert credentials page to use HdyPreferencesGroup and a list box.
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff
changeset
|
67 | /* Not implemented yet, so always hide the configure button. */ |
|
68c7ef6c5320
Convert credentials page to use HdyPreferencesGroup and a list box.
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff
changeset
|
68 | gtk_widget_set_visible(row->configure, FALSE); |
|
68c7ef6c5320
Convert credentials page to use HdyPreferencesGroup and a list box.
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff
changeset
|
69 | } |
|
68c7ef6c5320
Convert credentials page to use HdyPreferencesGroup and a list box.
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff
changeset
|
70 | |
|
68c7ef6c5320
Convert credentials page to use HdyPreferencesGroup and a list box.
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff
changeset
|
71 | /* Notify that we changed. */ |
|
68c7ef6c5320
Convert credentials page to use HdyPreferencesGroup and a list box.
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff
changeset
|
72 | g_object_notify_by_pspec(G_OBJECT(row), properties[PROP_PROVIDER]); |
|
68c7ef6c5320
Convert credentials page to use HdyPreferencesGroup and a list box.
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff
changeset
|
73 | } |
|
68c7ef6c5320
Convert credentials page to use HdyPreferencesGroup and a list box.
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff
changeset
|
74 | |
|
68c7ef6c5320
Convert credentials page to use HdyPreferencesGroup and a list box.
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff
changeset
|
75 | |
|
68c7ef6c5320
Convert credentials page to use HdyPreferencesGroup and a list box.
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff
changeset
|
76 | /****************************************************************************** |
|
68c7ef6c5320
Convert credentials page to use HdyPreferencesGroup and a list box.
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff
changeset
|
77 | * GObject Implementation |
|
68c7ef6c5320
Convert credentials page to use HdyPreferencesGroup and a list box.
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff
changeset
|
78 | *****************************************************************************/ |
|
68c7ef6c5320
Convert credentials page to use HdyPreferencesGroup and a list box.
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff
changeset
|
79 | static void |
|
68c7ef6c5320
Convert credentials page to use HdyPreferencesGroup and a list box.
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff
changeset
|
80 | pidgin_credential_provider_row_get_property(GObject *obj, guint param_id, |
|
68c7ef6c5320
Convert credentials page to use HdyPreferencesGroup and a list box.
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff
changeset
|
81 | GValue *value, GParamSpec *pspec) |
|
68c7ef6c5320
Convert credentials page to use HdyPreferencesGroup and a list box.
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff
changeset
|
82 | { |
|
68c7ef6c5320
Convert credentials page to use HdyPreferencesGroup and a list box.
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff
changeset
|
83 | PidginCredentialProviderRow *row = PIDGIN_CREDENTIAL_PROVIDER_ROW(obj); |
|
68c7ef6c5320
Convert credentials page to use HdyPreferencesGroup and a list box.
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff
changeset
|
84 | |
|
68c7ef6c5320
Convert credentials page to use HdyPreferencesGroup and a list box.
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff
changeset
|
85 | switch(param_id) { |
|
68c7ef6c5320
Convert credentials page to use HdyPreferencesGroup and a list box.
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff
changeset
|
86 | case PROP_PROVIDER: |
|
68c7ef6c5320
Convert credentials page to use HdyPreferencesGroup and a list box.
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff
changeset
|
87 | g_value_set_object(value, |
|
68c7ef6c5320
Convert credentials page to use HdyPreferencesGroup and a list box.
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff
changeset
|
88 | pidgin_credential_provider_row_get_provider(row)); |
|
68c7ef6c5320
Convert credentials page to use HdyPreferencesGroup and a list box.
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff
changeset
|
89 | break; |
|
68c7ef6c5320
Convert credentials page to use HdyPreferencesGroup and a list box.
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff
changeset
|
90 | case PROP_ACTIVE: |
|
68c7ef6c5320
Convert credentials page to use HdyPreferencesGroup and a list box.
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff
changeset
|
91 | g_value_set_boolean(value, |
|
68c7ef6c5320
Convert credentials page to use HdyPreferencesGroup and a list box.
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff
changeset
|
92 | pidgin_credential_provider_row_get_active(row)); |
|
68c7ef6c5320
Convert credentials page to use HdyPreferencesGroup and a list box.
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff
changeset
|
93 | break; |
|
68c7ef6c5320
Convert credentials page to use HdyPreferencesGroup and a list box.
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff
changeset
|
94 | default: |
|
68c7ef6c5320
Convert credentials page to use HdyPreferencesGroup and a list box.
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff
changeset
|
95 | G_OBJECT_WARN_INVALID_PROPERTY_ID(obj, param_id, pspec); |
|
68c7ef6c5320
Convert credentials page to use HdyPreferencesGroup and a list box.
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff
changeset
|
96 | break; |
|
68c7ef6c5320
Convert credentials page to use HdyPreferencesGroup and a list box.
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff
changeset
|
97 | } |
|
68c7ef6c5320
Convert credentials page to use HdyPreferencesGroup and a list box.
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff
changeset
|
98 | } |
|
68c7ef6c5320
Convert credentials page to use HdyPreferencesGroup and a list box.
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff
changeset
|
99 | |
|
68c7ef6c5320
Convert credentials page to use HdyPreferencesGroup and a list box.
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff
changeset
|
100 | static void |
|
68c7ef6c5320
Convert credentials page to use HdyPreferencesGroup and a list box.
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff
changeset
|
101 | pidgin_credential_provider_row_set_property(GObject *obj, guint param_id, |
|
68c7ef6c5320
Convert credentials page to use HdyPreferencesGroup and a list box.
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff
changeset
|
102 | const GValue *value, |
|
68c7ef6c5320
Convert credentials page to use HdyPreferencesGroup and a list box.
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff
changeset
|
103 | GParamSpec *pspec) |
|
68c7ef6c5320
Convert credentials page to use HdyPreferencesGroup and a list box.
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff
changeset
|
104 | { |
|
68c7ef6c5320
Convert credentials page to use HdyPreferencesGroup and a list box.
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff
changeset
|
105 | PidginCredentialProviderRow *row = PIDGIN_CREDENTIAL_PROVIDER_ROW(obj); |
|
68c7ef6c5320
Convert credentials page to use HdyPreferencesGroup and a list box.
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff
changeset
|
106 | |
|
68c7ef6c5320
Convert credentials page to use HdyPreferencesGroup and a list box.
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff
changeset
|
107 | switch(param_id) { |
|
68c7ef6c5320
Convert credentials page to use HdyPreferencesGroup and a list box.
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff
changeset
|
108 | case PROP_PROVIDER: |
|
68c7ef6c5320
Convert credentials page to use HdyPreferencesGroup and a list box.
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff
changeset
|
109 | pidgin_credential_provider_row_set_provider(row, |
|
68c7ef6c5320
Convert credentials page to use HdyPreferencesGroup and a list box.
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff
changeset
|
110 | g_value_get_object(value)); |
|
68c7ef6c5320
Convert credentials page to use HdyPreferencesGroup and a list box.
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff
changeset
|
111 | break; |
|
68c7ef6c5320
Convert credentials page to use HdyPreferencesGroup and a list box.
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff
changeset
|
112 | case PROP_ACTIVE: |
|
68c7ef6c5320
Convert credentials page to use HdyPreferencesGroup and a list box.
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff
changeset
|
113 | pidgin_credential_provider_row_set_active(row, |
|
68c7ef6c5320
Convert credentials page to use HdyPreferencesGroup and a list box.
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff
changeset
|
114 | g_value_get_boolean(value)); |
|
68c7ef6c5320
Convert credentials page to use HdyPreferencesGroup and a list box.
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff
changeset
|
115 | break; |
|
68c7ef6c5320
Convert credentials page to use HdyPreferencesGroup and a list box.
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff
changeset
|
116 | default: |
|
68c7ef6c5320
Convert credentials page to use HdyPreferencesGroup and a list box.
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff
changeset
|
117 | G_OBJECT_WARN_INVALID_PROPERTY_ID(obj, param_id, pspec); |
|
68c7ef6c5320
Convert credentials page to use HdyPreferencesGroup and a list box.
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff
changeset
|
118 | break; |
|
68c7ef6c5320
Convert credentials page to use HdyPreferencesGroup and a list box.
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff
changeset
|
119 | } |
|
68c7ef6c5320
Convert credentials page to use HdyPreferencesGroup and a list box.
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff
changeset
|
120 | } |
|
68c7ef6c5320
Convert credentials page to use HdyPreferencesGroup and a list box.
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff
changeset
|
121 | |
|
68c7ef6c5320
Convert credentials page to use HdyPreferencesGroup and a list box.
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff
changeset
|
122 | static void |
|
68c7ef6c5320
Convert credentials page to use HdyPreferencesGroup and a list box.
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff
changeset
|
123 | pidgin_credential_provider_row_finalize(GObject *obj) |
|
68c7ef6c5320
Convert credentials page to use HdyPreferencesGroup and a list box.
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff
changeset
|
124 | { |
|
68c7ef6c5320
Convert credentials page to use HdyPreferencesGroup and a list box.
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff
changeset
|
125 | PidginCredentialProviderRow *row = PIDGIN_CREDENTIAL_PROVIDER_ROW(obj); |
|
68c7ef6c5320
Convert credentials page to use HdyPreferencesGroup and a list box.
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff
changeset
|
126 | |
|
68c7ef6c5320
Convert credentials page to use HdyPreferencesGroup and a list box.
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff
changeset
|
127 | g_clear_object(&row->provider); |
|
68c7ef6c5320
Convert credentials page to use HdyPreferencesGroup and a list box.
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff
changeset
|
128 | } |
|
68c7ef6c5320
Convert credentials page to use HdyPreferencesGroup and a list box.
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff
changeset
|
129 | |
|
68c7ef6c5320
Convert credentials page to use HdyPreferencesGroup and a list box.
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff
changeset
|
130 | static void |
|
68c7ef6c5320
Convert credentials page to use HdyPreferencesGroup and a list box.
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff
changeset
|
131 | pidgin_credential_provider_row_init(PidginCredentialProviderRow *row) |
|
68c7ef6c5320
Convert credentials page to use HdyPreferencesGroup and a list box.
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff
changeset
|
132 | { |
|
68c7ef6c5320
Convert credentials page to use HdyPreferencesGroup and a list box.
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff
changeset
|
133 | gtk_widget_init_template(GTK_WIDGET(row)); |
|
68c7ef6c5320
Convert credentials page to use HdyPreferencesGroup and a list box.
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff
changeset
|
134 | |
|
68c7ef6c5320
Convert credentials page to use HdyPreferencesGroup and a list box.
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff
changeset
|
135 | /* If this row is active, then enable the provider properties button (which |
|
68c7ef6c5320
Convert credentials page to use HdyPreferencesGroup and a list box.
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff
changeset
|
136 | * may or may not be visible). */ |
|
68c7ef6c5320
Convert credentials page to use HdyPreferencesGroup and a list box.
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff
changeset
|
137 | g_object_bind_property(G_OBJECT(row), "active", |
|
68c7ef6c5320
Convert credentials page to use HdyPreferencesGroup and a list box.
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff
changeset
|
138 | G_OBJECT(row->configure), "sensitive", |
|
68c7ef6c5320
Convert credentials page to use HdyPreferencesGroup and a list box.
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff
changeset
|
139 | G_BINDING_DEFAULT); |
|
68c7ef6c5320
Convert credentials page to use HdyPreferencesGroup and a list box.
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff
changeset
|
140 | } |
|
68c7ef6c5320
Convert credentials page to use HdyPreferencesGroup and a list box.
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff
changeset
|
141 | |
|
68c7ef6c5320
Convert credentials page to use HdyPreferencesGroup and a list box.
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff
changeset
|
142 | static void |
|
68c7ef6c5320
Convert credentials page to use HdyPreferencesGroup and a list box.
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff
changeset
|
143 | pidgin_credential_provider_row_class_init(PidginCredentialProviderRowClass *klass) |
|
68c7ef6c5320
Convert credentials page to use HdyPreferencesGroup and a list box.
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff
changeset
|
144 | { |
|
68c7ef6c5320
Convert credentials page to use HdyPreferencesGroup and a list box.
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff
changeset
|
145 | GObjectClass *obj_class = G_OBJECT_CLASS(klass); |
|
68c7ef6c5320
Convert credentials page to use HdyPreferencesGroup and a list box.
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff
changeset
|
146 | GtkWidgetClass *widget_class = GTK_WIDGET_CLASS(klass); |
|
68c7ef6c5320
Convert credentials page to use HdyPreferencesGroup and a list box.
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff
changeset
|
147 | |
|
68c7ef6c5320
Convert credentials page to use HdyPreferencesGroup and a list box.
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff
changeset
|
148 | obj_class->get_property = pidgin_credential_provider_row_get_property; |
|
68c7ef6c5320
Convert credentials page to use HdyPreferencesGroup and a list box.
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff
changeset
|
149 | obj_class->set_property = pidgin_credential_provider_row_set_property; |
|
68c7ef6c5320
Convert credentials page to use HdyPreferencesGroup and a list box.
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff
changeset
|
150 | obj_class->finalize = pidgin_credential_provider_row_finalize; |
|
68c7ef6c5320
Convert credentials page to use HdyPreferencesGroup and a list box.
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff
changeset
|
151 | |
|
68c7ef6c5320
Convert credentials page to use HdyPreferencesGroup and a list box.
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff
changeset
|
152 | /** |
|
41479
3d2e114380f6
Add source files to GObject introspection
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
41030
diff
changeset
|
153 | * PidginCredentialProviderRow:provider |
|
40873
68c7ef6c5320
Convert credentials page to use HdyPreferencesGroup and a list box.
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff
changeset
|
154 | * |
|
68c7ef6c5320
Convert credentials page to use HdyPreferencesGroup and a list box.
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff
changeset
|
155 | * The #PurpleCredentialProvider whose information will be displayed. |
|
68c7ef6c5320
Convert credentials page to use HdyPreferencesGroup and a list box.
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff
changeset
|
156 | */ |
|
68c7ef6c5320
Convert credentials page to use HdyPreferencesGroup and a list box.
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff
changeset
|
157 | properties[PROP_PROVIDER] = g_param_spec_object( |
|
68c7ef6c5320
Convert credentials page to use HdyPreferencesGroup and a list box.
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff
changeset
|
158 | "provider", "provider", |
|
68c7ef6c5320
Convert credentials page to use HdyPreferencesGroup and a list box.
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff
changeset
|
159 | "The PurpleCredentialProvider instance", |
|
68c7ef6c5320
Convert credentials page to use HdyPreferencesGroup and a list box.
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff
changeset
|
160 | PURPLE_TYPE_CREDENTIAL_PROVIDER, |
|
68c7ef6c5320
Convert credentials page to use HdyPreferencesGroup and a list box.
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff
changeset
|
161 | G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY | G_PARAM_STATIC_STRINGS); |
|
68c7ef6c5320
Convert credentials page to use HdyPreferencesGroup and a list box.
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff
changeset
|
162 | |
|
68c7ef6c5320
Convert credentials page to use HdyPreferencesGroup and a list box.
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff
changeset
|
163 | /** |
|
41479
3d2e114380f6
Add source files to GObject introspection
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
41030
diff
changeset
|
164 | * PidginCredentialProviderRow:active |
|
40873
68c7ef6c5320
Convert credentials page to use HdyPreferencesGroup and a list box.
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff
changeset
|
165 | * |
|
68c7ef6c5320
Convert credentials page to use HdyPreferencesGroup and a list box.
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff
changeset
|
166 | * Whether the #PurpleCredentialProvider is currently active. |
|
68c7ef6c5320
Convert credentials page to use HdyPreferencesGroup and a list box.
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff
changeset
|
167 | */ |
|
68c7ef6c5320
Convert credentials page to use HdyPreferencesGroup and a list box.
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff
changeset
|
168 | properties[PROP_ACTIVE] = g_param_spec_boolean( |
|
68c7ef6c5320
Convert credentials page to use HdyPreferencesGroup and a list box.
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff
changeset
|
169 | "active", "active", |
|
68c7ef6c5320
Convert credentials page to use HdyPreferencesGroup and a list box.
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff
changeset
|
170 | "Whether the PurpleCredentialProvider is active", |
|
68c7ef6c5320
Convert credentials page to use HdyPreferencesGroup and a list box.
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff
changeset
|
171 | FALSE, |
|
68c7ef6c5320
Convert credentials page to use HdyPreferencesGroup and a list box.
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff
changeset
|
172 | G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS); |
|
68c7ef6c5320
Convert credentials page to use HdyPreferencesGroup and a list box.
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff
changeset
|
173 | |
|
68c7ef6c5320
Convert credentials page to use HdyPreferencesGroup and a list box.
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff
changeset
|
174 | g_object_class_install_properties(obj_class, N_PROPERTIES, properties); |
|
68c7ef6c5320
Convert credentials page to use HdyPreferencesGroup and a list box.
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff
changeset
|
175 | |
|
68c7ef6c5320
Convert credentials page to use HdyPreferencesGroup and a list box.
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff
changeset
|
176 | gtk_widget_class_set_template_from_resource( |
|
68c7ef6c5320
Convert credentials page to use HdyPreferencesGroup and a list box.
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff
changeset
|
177 | widget_class, |
|
41030
ec8b76f3bf0a
Fix the resource path so we can use the automatic stuff that GtkApplication supports
Gary Kramlich <grim@reaperworld.com>
parents:
40886
diff
changeset
|
178 | "/im/pidgin/Pidgin3/Prefs/credentialprovider.ui" |
|
40873
68c7ef6c5320
Convert credentials page to use HdyPreferencesGroup and a list box.
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff
changeset
|
179 | ); |
|
68c7ef6c5320
Convert credentials page to use HdyPreferencesGroup and a list box.
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff
changeset
|
180 | |
|
68c7ef6c5320
Convert credentials page to use HdyPreferencesGroup and a list box.
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff
changeset
|
181 | gtk_widget_class_bind_template_child(widget_class, |
|
68c7ef6c5320
Convert credentials page to use HdyPreferencesGroup and a list box.
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff
changeset
|
182 | PidginCredentialProviderRow, |
|
68c7ef6c5320
Convert credentials page to use HdyPreferencesGroup and a list box.
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff
changeset
|
183 | active); |
|
68c7ef6c5320
Convert credentials page to use HdyPreferencesGroup and a list box.
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff
changeset
|
184 | gtk_widget_class_bind_template_child(widget_class, |
|
68c7ef6c5320
Convert credentials page to use HdyPreferencesGroup and a list box.
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff
changeset
|
185 | PidginCredentialProviderRow, |
|
68c7ef6c5320
Convert credentials page to use HdyPreferencesGroup and a list box.
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff
changeset
|
186 | configure); |
|
68c7ef6c5320
Convert credentials page to use HdyPreferencesGroup and a list box.
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff
changeset
|
187 | } |
|
68c7ef6c5320
Convert credentials page to use HdyPreferencesGroup and a list box.
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff
changeset
|
188 | |
|
68c7ef6c5320
Convert credentials page to use HdyPreferencesGroup and a list box.
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff
changeset
|
189 | /****************************************************************************** |
|
68c7ef6c5320
Convert credentials page to use HdyPreferencesGroup and a list box.
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff
changeset
|
190 | * API |
|
68c7ef6c5320
Convert credentials page to use HdyPreferencesGroup and a list box.
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff
changeset
|
191 | *****************************************************************************/ |
|
68c7ef6c5320
Convert credentials page to use HdyPreferencesGroup and a list box.
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff
changeset
|
192 | GtkWidget * |
|
68c7ef6c5320
Convert credentials page to use HdyPreferencesGroup and a list box.
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff
changeset
|
193 | pidgin_credential_provider_row_new(PurpleCredentialProvider *provider) { |
|
68c7ef6c5320
Convert credentials page to use HdyPreferencesGroup and a list box.
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff
changeset
|
194 | g_return_val_if_fail(PURPLE_IS_CREDENTIAL_PROVIDER(provider), NULL); |
|
68c7ef6c5320
Convert credentials page to use HdyPreferencesGroup and a list box.
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff
changeset
|
195 | |
|
68c7ef6c5320
Convert credentials page to use HdyPreferencesGroup and a list box.
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff
changeset
|
196 | return GTK_WIDGET(g_object_new(PIDGIN_TYPE_CREDENTIAL_PROVIDER_ROW, |
|
68c7ef6c5320
Convert credentials page to use HdyPreferencesGroup and a list box.
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff
changeset
|
197 | "provider", provider, |
|
68c7ef6c5320
Convert credentials page to use HdyPreferencesGroup and a list box.
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff
changeset
|
198 | NULL)); |
|
68c7ef6c5320
Convert credentials page to use HdyPreferencesGroup and a list box.
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff
changeset
|
199 | } |
|
68c7ef6c5320
Convert credentials page to use HdyPreferencesGroup and a list box.
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff
changeset
|
200 | |
|
68c7ef6c5320
Convert credentials page to use HdyPreferencesGroup and a list box.
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff
changeset
|
201 | PurpleCredentialProvider * |
|
68c7ef6c5320
Convert credentials page to use HdyPreferencesGroup and a list box.
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff
changeset
|
202 | pidgin_credential_provider_row_get_provider(PidginCredentialProviderRow *row) { |
|
68c7ef6c5320
Convert credentials page to use HdyPreferencesGroup and a list box.
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff
changeset
|
203 | g_return_val_if_fail(PIDGIN_IS_CREDENTIAL_PROVIDER_ROW(row), NULL); |
|
68c7ef6c5320
Convert credentials page to use HdyPreferencesGroup and a list box.
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff
changeset
|
204 | |
|
68c7ef6c5320
Convert credentials page to use HdyPreferencesGroup and a list box.
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff
changeset
|
205 | return row->provider; |
|
68c7ef6c5320
Convert credentials page to use HdyPreferencesGroup and a list box.
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff
changeset
|
206 | } |
|
68c7ef6c5320
Convert credentials page to use HdyPreferencesGroup and a list box.
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff
changeset
|
207 | |
|
68c7ef6c5320
Convert credentials page to use HdyPreferencesGroup and a list box.
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff
changeset
|
208 | gboolean |
|
68c7ef6c5320
Convert credentials page to use HdyPreferencesGroup and a list box.
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff
changeset
|
209 | pidgin_credential_provider_row_get_active(PidginCredentialProviderRow *row) { |
|
68c7ef6c5320
Convert credentials page to use HdyPreferencesGroup and a list box.
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff
changeset
|
210 | g_return_val_if_fail(PIDGIN_IS_CREDENTIAL_PROVIDER_ROW(row), FALSE); |
|
68c7ef6c5320
Convert credentials page to use HdyPreferencesGroup and a list box.
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff
changeset
|
211 | |
|
68c7ef6c5320
Convert credentials page to use HdyPreferencesGroup and a list box.
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff
changeset
|
212 | return gtk_widget_get_visible(row->active); |
|
68c7ef6c5320
Convert credentials page to use HdyPreferencesGroup and a list box.
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff
changeset
|
213 | } |
|
68c7ef6c5320
Convert credentials page to use HdyPreferencesGroup and a list box.
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff
changeset
|
214 | |
|
68c7ef6c5320
Convert credentials page to use HdyPreferencesGroup and a list box.
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff
changeset
|
215 | void |
|
68c7ef6c5320
Convert credentials page to use HdyPreferencesGroup and a list box.
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff
changeset
|
216 | pidgin_credential_provider_row_set_active(PidginCredentialProviderRow *row, |
|
68c7ef6c5320
Convert credentials page to use HdyPreferencesGroup and a list box.
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff
changeset
|
217 | gboolean active) |
|
68c7ef6c5320
Convert credentials page to use HdyPreferencesGroup and a list box.
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff
changeset
|
218 | { |
|
68c7ef6c5320
Convert credentials page to use HdyPreferencesGroup and a list box.
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff
changeset
|
219 | g_return_if_fail(PIDGIN_IS_CREDENTIAL_PROVIDER_ROW(row)); |
|
68c7ef6c5320
Convert credentials page to use HdyPreferencesGroup and a list box.
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff
changeset
|
220 | |
|
68c7ef6c5320
Convert credentials page to use HdyPreferencesGroup and a list box.
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff
changeset
|
221 | gtk_widget_set_visible(row->active, active); |
|
68c7ef6c5320
Convert credentials page to use HdyPreferencesGroup and a list box.
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff
changeset
|
222 | |
|
68c7ef6c5320
Convert credentials page to use HdyPreferencesGroup and a list box.
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff
changeset
|
223 | g_object_notify_by_pspec(G_OBJECT(row), properties[PROP_ACTIVE]); |
|
68c7ef6c5320
Convert credentials page to use HdyPreferencesGroup and a list box.
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff
changeset
|
224 | } |