Merge lp:~khurshid-alam/unity-control-center/sharing-panel into lp:unity-control-center
- sharing-panel
- Merge into trunk
Status: | Merged |
---|---|
Approved by: | Iain Lane |
Approved revision: | 12914 |
Merged at revision: | 12913 |
Proposed branch: | lp:~khurshid-alam/unity-control-center/sharing-panel |
Merge into: | lp:unity-control-center |
Diff against target: |
12610 lines (+11011/-1278) 47 files modified
configure.ac (+9/-6) debian/libunity-control-center1.symbols (+5/-0) panels/Makefile.am (+2/-2) panels/screen-sharing/Makefile.am (+0/-39) panels/screen-sharing/cc-screen-sharing-panel.c (+0/-315) panels/screen-sharing/cc-screen-sharing-panel.h (+0/-29) panels/screen-sharing/screen-sharing-module.c (+0/-41) panels/screen-sharing/screen-sharing-panel.ui (+0/-400) panels/screen-sharing/unity-screen-sharing-panel.desktop.in.in (+0/-13) panels/screen-sharing/vino-message-box.c (+0/-156) panels/screen-sharing/vino-message-box.h (+0/-59) panels/screen-sharing/vino-radio-button.c (+0/-181) panels/screen-sharing/vino-radio-button.h (+0/-29) panels/sharing/Makefile.am (+88/-0) panels/sharing/cc-media-sharing.c (+153/-0) panels/sharing/cc-media-sharing.h (+30/-0) panels/sharing/cc-remote-login-helper.c (+170/-0) panels/sharing/cc-remote-login.c (+338/-0) panels/sharing/cc-remote-login.h (+33/-0) panels/sharing/cc-sharing-networks.c (+567/-0) panels/sharing/cc-sharing-networks.h (+63/-0) panels/sharing/cc-sharing-panel.c (+1276/-0) panels/sharing/cc-sharing-panel.h (+75/-0) panels/sharing/cc-sharing-resources.c (+3781/-0) panels/sharing/cc-sharing-resources.h (+7/-0) panels/sharing/cc-sharing-switch.c (+135/-0) panels/sharing/cc-sharing-switch.h (+55/-0) panels/sharing/com.canonical.controlcenter.remote-login-helper.policy.in.in (+22/-0) panels/sharing/file-share-properties.c (+60/-0) panels/sharing/file-share-properties.h (+25/-0) panels/sharing/gsd-sharing-enums.h (+34/-0) panels/sharing/networks.ui (+53/-0) panels/sharing/org.gnome.SettingsDaemon.Sharing.c (+2049/-0) panels/sharing/org.gnome.SettingsDaemon.Sharing.h (+264/-0) panels/sharing/org.gnome.SettingsDaemon.Sharing.xml (+19/-0) panels/sharing/sharing-module.c (+33/-0) panels/sharing/sharing.gresource.xml (+7/-0) panels/sharing/sharing.ui (+861/-0) panels/sharing/unity-sharing-panel.desktop.in.in (+17/-0) panels/sharing/vino-preferences.c (+111/-0) panels/sharing/vino-preferences.h (+48/-0) po/POTFILES.in (+0/-4) shell/Makefile.am (+9/-4) shell/cc-hostname-entry.c (+298/-0) shell/cc-hostname-entry.h (+72/-0) shell/hostname-helper.c (+221/-0) shell/hostname-helper.h (+21/-0) |
To merge this branch: | bzr merge lp:~khurshid-alam/unity-control-center/sharing-panel |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Marco Trevisan (Treviño) | Needs Information | ||
Review via email: mp+341306@code.launchpad.net |
Commit message
Import sharing panel from gnome-control-
This commit imports sharing panel from gnome-control-
https:/
Description of the change
PPA: unity7maintaine
Testing: https:/
The related settings daemon branch is https:/
Marco Trevisan (Treviño) (3v1n0) : | # |
Marco Trevisan (Treviño) (3v1n0) wrote : | # |
Khurshid Alam (khurshid-alam) wrote : | # |
Laney also approved this on https:/
so I ask him ?
Khurshid Alam (khurshid-alam) wrote : | # |
Since disco is already out, can it be landed in disco ?
Marco Trevisan (Treviño) (3v1n0) wrote : | # |
Some dep version changed, what was the reason for?
- 12915. By Khurshid Alam
-
Don't downgrade libgnome-desktop dependency
Khurshid Alam (khurshid-alam) wrote : | # |
Right, dependencies shouldn't have changed. I was using old bzr-rewrite package.
Fixed now.
Marco Trevisan (Treviño) (3v1n0) : | # |
- 12916. By Khurshid Alam
-
Drop libgirepository
1.0-dev from build-dep
Khurshid Alam (khurshid-alam) wrote : | # |
I also dropped libgirepository
Preview Diff
1 | === modified file 'configure.ac' | |||
2 | --- configure.ac 2018-02-16 13:07:36 +0000 | |||
3 | +++ configure.ac 2018-11-21 12:36:03 +0000 | |||
4 | @@ -130,10 +130,12 @@ | |||
5 | 130 | gsettings-desktop-schemas >= $SCHEMAS_REQUIRED_VERSION | 130 | gsettings-desktop-schemas >= $SCHEMAS_REQUIRED_VERSION |
6 | 131 | libnotify >= $LIBNOTIFY_REQUIRED_VERSION" | 131 | libnotify >= $LIBNOTIFY_REQUIRED_VERSION" |
7 | 132 | 132 | ||
9 | 133 | PKG_CHECK_MODULES(LIBUNITY_CONTROL_CENTER, $COMMON_MODULES) | 133 | PKG_CHECK_MODULES(LIBUNITY_CONTROL_CENTER, $COMMON_MODULES |
10 | 134 | polkit-gobject-1 >= $POLKIT_REQUIRED_VERSION) | ||
11 | 134 | PKG_CHECK_MODULES(LIBLANGUAGE, $COMMON_MODULES gnome-desktop-3.0 fontconfig) | 135 | PKG_CHECK_MODULES(LIBLANGUAGE, $COMMON_MODULES gnome-desktop-3.0 fontconfig) |
12 | 135 | PKG_CHECK_MODULES(LIBSHORTCUTS, $COMMON_MODULES x11) | 136 | PKG_CHECK_MODULES(LIBSHORTCUTS, $COMMON_MODULES x11) |
14 | 136 | PKG_CHECK_MODULES(SHELL, $COMMON_MODULES libgnome-menu-3.0 gio-unix-2.0 x11) | 137 | PKG_CHECK_MODULES(SHELL, $COMMON_MODULES libgnome-menu-3.0 gio-unix-2.0 x11 |
15 | 138 | polkit-gobject-1 >= $POLKIT_REQUIRED_VERSION) | ||
16 | 137 | PKG_CHECK_MODULES(APPEARANCE_PANEL, $COMMON_MODULES libxml-2.0 gnome-desktop-3.0 | 139 | PKG_CHECK_MODULES(APPEARANCE_PANEL, $COMMON_MODULES libxml-2.0 gnome-desktop-3.0 |
17 | 138 | gdk-pixbuf-2.0 >= $GDKPIXBUF_REQUIRED_VERSION) | 140 | gdk-pixbuf-2.0 >= $GDKPIXBUF_REQUIRED_VERSION) |
18 | 139 | PKG_CHECK_MODULES(DATETIME_PANEL, $COMMON_MODULES timezonemap geonames | 141 | PKG_CHECK_MODULES(DATETIME_PANEL, $COMMON_MODULES timezonemap geonames |
19 | @@ -159,8 +161,9 @@ | |||
20 | 159 | $IBUS_MODULE | 161 | $IBUS_MODULE |
21 | 160 | $FCITX_MODULE | 162 | $FCITX_MODULE |
22 | 161 | x11) | 163 | x11) |
23 | 164 | PKG_CHECK_MODULES(REMOTE_LOGIN_HELPER, glib-2.0 >= $GLIB_REQUIRED_VERSION gio-2.0) | ||
24 | 162 | PKG_CHECK_MODULES(SCREEN_PANEL, $COMMON_MODULES) | 165 | PKG_CHECK_MODULES(SCREEN_PANEL, $COMMON_MODULES) |
26 | 163 | PKG_CHECK_MODULES(SCREEN_SHARING_PANEL, $COMMON_MODULES) | 166 | PKG_CHECK_MODULES(SHARING_PANEL, $COMMON_MODULES) |
27 | 164 | PKG_CHECK_MODULES(SOUND_PANEL, $COMMON_MODULES libxml-2.0 | 167 | PKG_CHECK_MODULES(SOUND_PANEL, $COMMON_MODULES libxml-2.0 |
28 | 165 | libcanberra-gtk3 >= $CANBERRA_REQUIRED_VERSION | 168 | libcanberra-gtk3 >= $CANBERRA_REQUIRED_VERSION |
29 | 166 | libpulse >= $PA_REQUIRED_VERSION | 169 | libpulse >= $PA_REQUIRED_VERSION |
30 | @@ -183,7 +186,7 @@ | |||
31 | 183 | PKG_CHECK_MODULES(NETWORK_MANAGER, NetworkManager >= $NETWORK_MANAGER_REQUIRED_VERSION | 186 | PKG_CHECK_MODULES(NETWORK_MANAGER, NetworkManager >= $NETWORK_MANAGER_REQUIRED_VERSION |
32 | 184 | libnm-glib >= $NETWORK_MANAGER_REQUIRED_VERSION | 187 | libnm-glib >= $NETWORK_MANAGER_REQUIRED_VERSION |
33 | 185 | libnm-util >= $NETWORK_MANAGER_REQUIRED_VERSION | 188 | libnm-util >= $NETWORK_MANAGER_REQUIRED_VERSION |
35 | 186 | libnm-gtk >= $NETWORK_MANAGER_REQUIRED_VERSION, | 189 | libnm-gtk >= $NETWORK_MANAGER_REQUIRED_VERSION, |
36 | 187 | [have_networkmanager=yes], have_networkmanager=no) | 190 | [have_networkmanager=yes], have_networkmanager=no) |
37 | 188 | if test "x$have_networkmanager" = xno ; then | 191 | if test "x$have_networkmanager" = xno ; then |
38 | 189 | AC_MSG_WARN(*** Network panel will not be built (NetworkManager ~0.9 or newer not found) ***) | 192 | AC_MSG_WARN(*** Network panel will not be built (NetworkManager ~0.9 or newer not found) ***) |
39 | @@ -490,8 +493,8 @@ | |||
40 | 490 | panels/sound/data/icons/scalable/devices/Makefile | 493 | panels/sound/data/icons/scalable/devices/Makefile |
41 | 491 | panels/screen/Makefile | 494 | panels/screen/Makefile |
42 | 492 | panels/screen/unity-screen-panel.desktop.in | 495 | panels/screen/unity-screen-panel.desktop.in |
45 | 493 | panels/screen-sharing/Makefile | 496 | panels/sharing/Makefile |
46 | 494 | panels/screen-sharing/unity-screen-sharing-panel.desktop.in | 497 | panels/sharing/unity-sharing-panel.desktop.in |
47 | 495 | panels/info/Makefile | 498 | panels/info/Makefile |
48 | 496 | panels/info/unity-info-panel.desktop.in | 499 | panels/info/unity-info-panel.desktop.in |
49 | 497 | panels/power/Makefile | 500 | panels/power/Makefile |
50 | 498 | 501 | ||
51 | === modified file 'debian/libunity-control-center1.symbols' | |||
52 | --- debian/libunity-control-center1.symbols 2018-02-07 13:07:13 +0000 | |||
53 | +++ debian/libunity-control-center1.symbols 2018-11-21 12:36:03 +0000 | |||
54 | @@ -18,6 +18,9 @@ | |||
55 | 18 | cc_editable_entry_set_text@Base 14.04.0 | 18 | cc_editable_entry_set_text@Base 14.04.0 |
56 | 19 | cc_editable_entry_set_weight@Base 14.04.0 | 19 | cc_editable_entry_set_weight@Base 14.04.0 |
57 | 20 | cc_editable_entry_set_width_chars@Base 14.04.3+14.04.20140225 | 20 | cc_editable_entry_set_width_chars@Base 14.04.3+14.04.20140225 |
58 | 21 | cc_hostname_entry_get_hostname@Base 15.04.0+17.10.20171225 | ||
59 | 22 | cc_hostname_entry_get_type@Base 15.04.0+17.10.20171225 | ||
60 | 23 | cc_hostname_entry_new@Base 15.04.0+17.10.20171225 | ||
61 | 21 | cc_list_box_adjust_scrolling@Base 15.04.0+17.10.20171225 | 24 | cc_list_box_adjust_scrolling@Base 15.04.0+17.10.20171225 |
62 | 22 | cc_list_box_setup_scrolling@Base 15.04.0+17.10.20171225 | 25 | cc_list_box_setup_scrolling@Base 15.04.0+17.10.20171225 |
63 | 23 | cc_list_box_update_header_func@Base 15.04.0+17.10.20171225 | 26 | cc_list_box_update_header_func@Base 15.04.0+17.10.20171225 |
64 | @@ -32,3 +35,5 @@ | |||
65 | 32 | cc_shell_get_type@Base 14.04.0 | 35 | cc_shell_get_type@Base 14.04.0 |
66 | 33 | cc_shell_set_active_panel@Base 14.04.0 | 36 | cc_shell_set_active_panel@Base 14.04.0 |
67 | 34 | cc_shell_set_active_panel_from_id@Base 14.04.0 | 37 | cc_shell_set_active_panel_from_id@Base 14.04.0 |
68 | 38 | pretty_hostname_to_ssid@Base 15.04.0+17.10.20171225 | ||
69 | 39 | pretty_hostname_to_static@Base 15.04.0+17.10.20171225 | ||
70 | 35 | 40 | ||
71 | === modified file 'panels/Makefile.am' | |||
72 | --- panels/Makefile.am 2018-02-07 13:01:46 +0000 | |||
73 | +++ panels/Makefile.am 2018-11-21 12:36:03 +0000 | |||
74 | @@ -10,11 +10,11 @@ | |||
75 | 10 | region \ | 10 | region \ |
76 | 11 | info \ | 11 | info \ |
77 | 12 | sound \ | 12 | sound \ |
78 | 13 | sharing \ | ||
79 | 13 | keyboard \ | 14 | keyboard \ |
80 | 14 | universal-access \ | 15 | universal-access \ |
81 | 15 | user-accounts \ | 16 | user-accounts \ |
84 | 16 | bluetooth \ | 17 | bluetooth |
83 | 17 | screen-sharing | ||
85 | 18 | 18 | ||
86 | 19 | if BUILD_WACOM | 19 | if BUILD_WACOM |
87 | 20 | SUBDIRS += wacom | 20 | SUBDIRS += wacom |
88 | 21 | 21 | ||
89 | === removed directory 'panels/screen-sharing' | |||
90 | === removed file 'panels/screen-sharing/Makefile.am' | |||
91 | --- panels/screen-sharing/Makefile.am 2017-12-07 05:41:33 +0000 | |||
92 | +++ panels/screen-sharing/Makefile.am 1970-01-01 00:00:00 +0000 | |||
93 | @@ -1,39 +0,0 @@ | |||
94 | 1 | # This is used in PANEL_CFLAGS | ||
95 | 2 | cappletname = screen-sharing | ||
96 | 3 | |||
97 | 4 | uidir = $(pkgdatadir)/ui/screen-sharing | ||
98 | 5 | dist_ui_DATA = \ | ||
99 | 6 | screen-sharing-panel.ui | ||
100 | 7 | |||
101 | 8 | INCLUDES = \ | ||
102 | 9 | $(PANEL_CFLAGS) \ | ||
103 | 10 | $(SCREEN_SHARING_PANEL_CFLAGS) \ | ||
104 | 11 | -DG_LOG_DOMAIN="\"$(PACKAGE)\"" \ | ||
105 | 12 | -DGNOMECC_UI_DIR="\"$(uidir)\"" \ | ||
106 | 13 | -DGNOMELOCALEDIR="\"$(datadir)/locale\"" \ | ||
107 | 14 | $(NULL) | ||
108 | 15 | |||
109 | 16 | ccpanelsdir = $(PANELS_DIR) | ||
110 | 17 | ccpanels_LTLIBRARIES = libscreen-sharing.la | ||
111 | 18 | |||
112 | 19 | libscreen_sharing_la_SOURCES = \ | ||
113 | 20 | screen-sharing-module.c \ | ||
114 | 21 | vino-message-box.c \ | ||
115 | 22 | vino-message-box.h \ | ||
116 | 23 | cc-screen-sharing-panel.c \ | ||
117 | 24 | cc-screen-sharing-panel.h \ | ||
118 | 25 | vino-radio-button.c \ | ||
119 | 26 | vino-radio-button.h | ||
120 | 27 | |||
121 | 28 | libscreen_sharing_la_LIBADD = $(PANEL_LIBS) $(SCREEN_SHARING_PANEL_LIBS) | ||
122 | 29 | libscreen_sharing_la_LDFLAGS = $(PANEL_LDFLAGS) | ||
123 | 30 | |||
124 | 31 | @INTLTOOL_DESKTOP_RULE@ | ||
125 | 32 | |||
126 | 33 | desktopdir = $(datadir)/applications | ||
127 | 34 | desktop_in_files = unity-screen-sharing-panel.desktop.in | ||
128 | 35 | desktop_DATA = $(desktop_in_files:.desktop.in=.desktop) | ||
129 | 36 | |||
130 | 37 | CLEANFILES = $(desktop_in_files) $(desktop_DATA) | ||
131 | 38 | |||
132 | 39 | -include $(top_srcdir)/git.mk | ||
133 | 40 | 0 | ||
134 | === removed file 'panels/screen-sharing/cc-screen-sharing-panel.c' | |||
135 | --- panels/screen-sharing/cc-screen-sharing-panel.c 2017-12-07 05:41:33 +0000 | |||
136 | +++ panels/screen-sharing/cc-screen-sharing-panel.c 1970-01-01 00:00:00 +0000 | |||
137 | @@ -1,315 +0,0 @@ | |||
138 | 1 | /* | ||
139 | 2 | * Copyright (C) 2003 Sun Microsystems, Inc. | ||
140 | 3 | * Copyright (C) 2006 Jonh Wendell <wendell@bani.com.br> | ||
141 | 4 | * Copyright © 2010 Codethink Limited | ||
142 | 5 | * | ||
143 | 6 | * This program is free software; you can redistribute it and/or | ||
144 | 7 | * modify it under the terms of the GNU General Public License as | ||
145 | 8 | * published by the Free Software Foundation; either version 2 of the | ||
146 | 9 | * License, or (at your option) any later version. | ||
147 | 10 | * | ||
148 | 11 | * This program is distributed in the hope that it will be useful, but | ||
149 | 12 | * WITHOUT ANY WARRANTY; without even the implied warranty of | ||
150 | 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
151 | 14 | * General Public License for more details. | ||
152 | 15 | * | ||
153 | 16 | * You should have received a copy of the GNU General Public License | ||
154 | 17 | * along with this program; if not, write to the Free Software | ||
155 | 18 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA | ||
156 | 19 | * 02111-1307, USA. | ||
157 | 20 | * | ||
158 | 21 | * Authors: | ||
159 | 22 | * Mark McLoughlin <mark@skynet.ie> | ||
160 | 23 | * Jonh Wendell <wendell@bani.com.br> | ||
161 | 24 | * Ryan Lortie <desrt@desrt.ca> | ||
162 | 25 | */ | ||
163 | 26 | |||
164 | 27 | #include "config.h" | ||
165 | 28 | |||
166 | 29 | #include "cc-screen-sharing-panel.h" | ||
167 | 30 | #include "vino-radio-button.h" | ||
168 | 31 | #include "vino-message-box.h" | ||
169 | 32 | |||
170 | 33 | #include <glib/gi18n.h> | ||
171 | 34 | #include <gtk/gtk.h> | ||
172 | 35 | #include <shell/cc-panel.h> | ||
173 | 36 | |||
174 | 37 | typedef struct | ||
175 | 38 | { | ||
176 | 39 | CcPanel parent; | ||
177 | 40 | } CcScreenSharingPanel; | ||
178 | 41 | |||
179 | 42 | typedef struct | ||
180 | 43 | { | ||
181 | 44 | CcPanelClass parent_class; | ||
182 | 45 | } CcScreenSharingPanelClass; | ||
183 | 46 | |||
184 | 47 | static GType cc_screen_sharing_panel_get_type (void); | ||
185 | 48 | |||
186 | 49 | CC_PANEL_REGISTER (CcScreenSharingPanel, cc_screen_sharing_panel) | ||
187 | 50 | |||
188 | 51 | #define VINO_SCHEMA_ID "org.gnome.Vino" | ||
189 | 52 | |||
190 | 53 | /* We define three GSettings mappings here: | ||
191 | 54 | * | ||
192 | 55 | * First, a relatively boring boolean inversion mapping. | ||
193 | 56 | */ | ||
194 | 57 | static gboolean | ||
195 | 58 | get_inverted (GValue *value, | ||
196 | 59 | GVariant *variant, | ||
197 | 60 | gpointer user_data) | ||
198 | 61 | { | ||
199 | 62 | g_value_set_boolean (value, !g_variant_get_boolean (variant)); | ||
200 | 63 | return TRUE; | ||
201 | 64 | } | ||
202 | 65 | |||
203 | 66 | static GVariant * | ||
204 | 67 | set_inverted (const GValue *value, | ||
205 | 68 | const GVariantType *type, | ||
206 | 69 | gpointer user_data) | ||
207 | 70 | { | ||
208 | 71 | return g_variant_new_boolean (!g_value_get_boolean (value)); | ||
209 | 72 | } | ||
210 | 73 | |||
211 | 74 | /* Next, one that maps between the array-of-strings list of | ||
212 | 75 | * authentication mechanisms and a boolean that is FALSE if the 'none' | ||
213 | 76 | * and TRUE otherwise (ie: for 'vnc' in the list). | ||
214 | 77 | */ | ||
215 | 78 | static gboolean | ||
216 | 79 | get_authtype (GValue *value, | ||
217 | 80 | GVariant *variant, | ||
218 | 81 | gpointer user_data) | ||
219 | 82 | { | ||
220 | 83 | GVariantIter iter; | ||
221 | 84 | const gchar *type; | ||
222 | 85 | |||
223 | 86 | g_variant_iter_init (&iter, variant); | ||
224 | 87 | g_value_set_boolean (value, TRUE); | ||
225 | 88 | |||
226 | 89 | while (g_variant_iter_next (&iter, "s", &type)) | ||
227 | 90 | if (strcmp (type, "none") == 0) | ||
228 | 91 | g_value_set_boolean (value, FALSE); | ||
229 | 92 | |||
230 | 93 | return TRUE; | ||
231 | 94 | } | ||
232 | 95 | |||
233 | 96 | static GVariant * | ||
234 | 97 | set_authtype (const GValue *value, | ||
235 | 98 | const GVariantType *type, | ||
236 | 99 | gpointer user_data) | ||
237 | 100 | { | ||
238 | 101 | const gchar *authtype; | ||
239 | 102 | |||
240 | 103 | if (g_value_get_boolean (value)) | ||
241 | 104 | authtype = "vnc"; | ||
242 | 105 | else | ||
243 | 106 | authtype = "none"; | ||
244 | 107 | |||
245 | 108 | return g_variant_new_strv (&authtype, 1); | ||
246 | 109 | } | ||
247 | 110 | |||
248 | 111 | |||
249 | 112 | /* Finally, a somewhat evil mapping for the password setting: | ||
250 | 113 | * | ||
251 | 114 | * If the setting is 'keyring' then we load the password from the | ||
252 | 115 | * keyring. Else, it is assumed to be a base64-encoded string which is | ||
253 | 116 | * the actual password. | ||
254 | 117 | * | ||
255 | 118 | * On setting the password, we always first try to use the keyring. If | ||
256 | 119 | * that is successful we write 'keyring' to the settings. If it fails | ||
257 | 120 | * then we base64-encode the password and write it to the settings. | ||
258 | 121 | * | ||
259 | 122 | * Doing it this way ensures that there is no ambiguity about what the | ||
260 | 123 | * password is in the event that gnome-keyring becomes available then | ||
261 | 124 | * unavailable again. | ||
262 | 125 | */ | ||
263 | 126 | static gboolean | ||
264 | 127 | get_password (GValue *value, | ||
265 | 128 | GVariant *variant, | ||
266 | 129 | gpointer user_data) | ||
267 | 130 | { | ||
268 | 131 | const gchar *setting; | ||
269 | 132 | |||
270 | 133 | setting = g_variant_get_string (variant, NULL); | ||
271 | 134 | |||
272 | 135 | if (strcmp (setting, "keyring") == 0) | ||
273 | 136 | { | ||
274 | 137 | /* "keyring" is the default value, even though vino doesn't support it at the moment */ | ||
275 | 138 | g_value_set_static_string (value, ""); | ||
276 | 139 | return TRUE; | ||
277 | 140 | } | ||
278 | 141 | else | ||
279 | 142 | { | ||
280 | 143 | gchar *decoded; | ||
281 | 144 | gsize length; | ||
282 | 145 | gboolean ok; | ||
283 | 146 | |||
284 | 147 | decoded = (gchar *) g_base64_decode (setting, &length); | ||
285 | 148 | |||
286 | 149 | if ((ok = g_utf8_validate (decoded, length, NULL))) | ||
287 | 150 | g_value_take_string (value, g_strndup (decoded, length)); | ||
288 | 151 | |||
289 | 152 | return ok; | ||
290 | 153 | } | ||
291 | 154 | } | ||
292 | 155 | |||
293 | 156 | static GVariant * | ||
294 | 157 | set_password (const GValue *value, | ||
295 | 158 | const GVariantType *type, | ||
296 | 159 | gpointer user_data) | ||
297 | 160 | { | ||
298 | 161 | const gchar *string; | ||
299 | 162 | gchar *base64; | ||
300 | 163 | |||
301 | 164 | string = g_value_get_string (value); | ||
302 | 165 | |||
303 | 166 | /* if that failed, store it in GSettings, base64 */ | ||
304 | 167 | base64 = g_base64_encode ((guchar *) string, strlen (string)); | ||
305 | 168 | return g_variant_new_from_data (G_VARIANT_TYPE_STRING, | ||
306 | 169 | base64, strlen (base64) + 1, | ||
307 | 170 | TRUE, g_free, base64); | ||
308 | 171 | } | ||
309 | 172 | |||
310 | 173 | typedef enum | ||
311 | 174 | { | ||
312 | 175 | VINO_ICON_VISIBILITY_NEVER, | ||
313 | 176 | VINO_ICON_VISIBILITY_ALWAYS, | ||
314 | 177 | VINO_ICON_VISIBILITY_CLIENT | ||
315 | 178 | } VinoIconVisibility; | ||
316 | 179 | |||
317 | 180 | static gboolean | ||
318 | 181 | get_icon_visibility (GValue *value, | ||
319 | 182 | GVariant *variant, | ||
320 | 183 | gpointer user_data) | ||
321 | 184 | { | ||
322 | 185 | const char *setting; | ||
323 | 186 | char *name; | ||
324 | 187 | |||
325 | 188 | setting = g_variant_get_string (variant, NULL); | ||
326 | 189 | |||
327 | 190 | g_object_get (user_data, "name", &name, NULL); | ||
328 | 191 | |||
329 | 192 | /* If the button name matches the setting, it should be active. */ | ||
330 | 193 | if (g_strcmp0 (name, setting) == 0) | ||
331 | 194 | g_value_set_boolean (value, TRUE); | ||
332 | 195 | |||
333 | 196 | g_free (name); | ||
334 | 197 | |||
335 | 198 | return TRUE; | ||
336 | 199 | } | ||
337 | 200 | |||
338 | 201 | static GVariant * | ||
339 | 202 | set_icon_visibility (const GValue *value, | ||
340 | 203 | const GVariantType *type, | ||
341 | 204 | gpointer user_data) | ||
342 | 205 | { | ||
343 | 206 | GVariant *variant = NULL; | ||
344 | 207 | char *name; | ||
345 | 208 | |||
346 | 209 | /* Don't act unless the button has been activated (turned ON). */ | ||
347 | 210 | if (!g_value_get_boolean (value)) | ||
348 | 211 | return NULL; | ||
349 | 212 | |||
350 | 213 | /* GtkToggleButton *button = GTK_TOGGLE_BUTTON(user_data); */ | ||
351 | 214 | g_object_get (user_data, "name", &name, NULL); | ||
352 | 215 | variant = g_variant_new_string (name); | ||
353 | 216 | |||
354 | 217 | g_free (name); | ||
355 | 218 | |||
356 | 219 | return variant; | ||
357 | 220 | } | ||
358 | 221 | |||
359 | 222 | static void | ||
360 | 223 | cc_screen_sharing_panel_init (CcScreenSharingPanel *panel) | ||
361 | 224 | { | ||
362 | 225 | struct { | ||
363 | 226 | const gchar *setting; | ||
364 | 227 | const gchar *name; | ||
365 | 228 | const gchar *property; | ||
366 | 229 | GSettingsBindFlags flags; | ||
367 | 230 | GSettingsBindGetMapping get_mapping; | ||
368 | 231 | GSettingsBindSetMapping set_mapping; | ||
369 | 232 | } bindings[] = { | ||
370 | 233 | { "enabled", "allowed_toggle", "active", G_SETTINGS_BIND_DEFAULT, NULL, NULL }, | ||
371 | 234 | |||
372 | 235 | { "enabled", "control_settings", "sensitive", G_SETTINGS_BIND_GET, NULL, NULL }, | ||
373 | 236 | { "view-only", "view_only_toggle", "active", G_SETTINGS_BIND_DEFAULT, get_inverted, set_inverted }, | ||
374 | 237 | |||
375 | 238 | { "enabled", "security_settings", "sensitive", G_SETTINGS_BIND_GET, NULL, NULL }, | ||
376 | 239 | { "prompt-enabled", "prompt_enabled_toggle", "active", G_SETTINGS_BIND_DEFAULT, NULL, NULL }, | ||
377 | 240 | { "authentication-methods", "password_toggle", "active", G_SETTINGS_BIND_DEFAULT, get_authtype, set_authtype }, | ||
378 | 241 | { "authentication-methods", "password_box", "sensitive", G_SETTINGS_BIND_GET, get_authtype, NULL }, | ||
379 | 242 | { "vnc-password", "password_entry", "text", G_SETTINGS_BIND_DEFAULT, get_password, set_password }, | ||
380 | 243 | { "use-upnp", "use_upnp_toggle", "active", G_SETTINGS_BIND_DEFAULT, NULL, NULL }, | ||
381 | 244 | |||
382 | 245 | { "enabled", "notification_settings", "sensitive", G_SETTINGS_BIND_GET, NULL, NULL }, | ||
383 | 246 | |||
384 | 247 | { "icon-visibility", "icon_always_radio", "active", G_SETTINGS_BIND_DEFAULT, get_icon_visibility, set_icon_visibility }, | ||
385 | 248 | { "icon-visibility", "icon_client_radio", "active", G_SETTINGS_BIND_DEFAULT, get_icon_visibility, set_icon_visibility }, | ||
386 | 249 | { "icon-visibility", "icon_never_radio", "active", G_SETTINGS_BIND_DEFAULT, get_icon_visibility, set_icon_visibility } | ||
387 | 250 | }; | ||
388 | 251 | GSettingsSchemaSource *source; | ||
389 | 252 | |||
390 | 253 | source = g_settings_schema_source_get_default (); | ||
391 | 254 | if (source && g_settings_schema_source_lookup (source, VINO_SCHEMA_ID, TRUE)) | ||
392 | 255 | { | ||
393 | 256 | GError *error = NULL; | ||
394 | 257 | GtkBuilder *builder; | ||
395 | 258 | GSettings *settings; | ||
396 | 259 | gint i; | ||
397 | 260 | |||
398 | 261 | vino_radio_button_get_type (); | ||
399 | 262 | vino_message_box_get_type (); | ||
400 | 263 | |||
401 | 264 | builder = gtk_builder_new (); | ||
402 | 265 | if (!gtk_builder_add_from_file (builder, GNOMECC_UI_DIR "/screen-sharing-panel.ui", &error)) | ||
403 | 266 | { | ||
404 | 267 | g_warning ("Unable to load interface file: %s", error->message); | ||
405 | 268 | g_error_free (error); | ||
406 | 269 | } | ||
407 | 270 | gtk_widget_reparent (GTK_WIDGET (gtk_builder_get_object (builder, "screen_sharing_vbox")), GTK_WIDGET (panel)); | ||
408 | 271 | |||
409 | 272 | settings = g_settings_new (VINO_SCHEMA_ID); | ||
410 | 273 | |||
411 | 274 | for (i = 0; i < G_N_ELEMENTS (bindings); i++) | ||
412 | 275 | { | ||
413 | 276 | GObject *object = gtk_builder_get_object (builder, bindings[i].name); | ||
414 | 277 | g_settings_bind_with_mapping (settings, bindings[i].setting, | ||
415 | 278 | object, | ||
416 | 279 | bindings[i].property, | ||
417 | 280 | bindings[i].flags, | ||
418 | 281 | bindings[i].get_mapping, | ||
419 | 282 | bindings[i].set_mapping, | ||
420 | 283 | object, NULL); | ||
421 | 284 | } | ||
422 | 285 | |||
423 | 286 | g_object_unref (settings); | ||
424 | 287 | g_object_unref (builder); | ||
425 | 288 | } | ||
426 | 289 | else | ||
427 | 290 | { | ||
428 | 291 | GtkWidget *label; | ||
429 | 292 | gchar *text; | ||
430 | 293 | |||
431 | 294 | label = gtk_label_new (NULL); | ||
432 | 295 | text = g_strdup_printf ("<big>%s</big>", _("Desktop sharing support not installed")); | ||
433 | 296 | gtk_label_set_markup (GTK_LABEL (label), text); | ||
434 | 297 | g_free (text); | ||
435 | 298 | gtk_widget_show (label); | ||
436 | 299 | gtk_container_add (GTK_CONTAINER (panel), label); | ||
437 | 300 | } | ||
438 | 301 | } | ||
439 | 302 | |||
440 | 303 | static void | ||
441 | 304 | cc_screen_sharing_panel_class_init (CcScreenSharingPanelClass *class) | ||
442 | 305 | { | ||
443 | 306 | } | ||
444 | 307 | |||
445 | 308 | void | ||
446 | 309 | cc_screen_sharing_panel_register (GIOModule *module) | ||
447 | 310 | { | ||
448 | 311 | cc_screen_sharing_panel_register_type (G_TYPE_MODULE (module)); | ||
449 | 312 | g_io_extension_point_implement (CC_SHELL_PANEL_EXTENSION_POINT, | ||
450 | 313 | cc_screen_sharing_panel_get_type (), | ||
451 | 314 | "screen-sharing", 0); | ||
452 | 315 | } | ||
453 | 316 | 0 | ||
454 | === removed file 'panels/screen-sharing/cc-screen-sharing-panel.h' | |||
455 | --- panels/screen-sharing/cc-screen-sharing-panel.h 2017-12-07 05:41:33 +0000 | |||
456 | +++ panels/screen-sharing/cc-screen-sharing-panel.h 1970-01-01 00:00:00 +0000 | |||
457 | @@ -1,29 +0,0 @@ | |||
458 | 1 | /* | ||
459 | 2 | * Copyright © 2010 Codethink Limited | ||
460 | 3 | * | ||
461 | 4 | * This program is free software; you can redistribute it and/or | ||
462 | 5 | * modify it under the terms of the GNU General Public License as | ||
463 | 6 | * published by the Free Software Foundation; either version 2 of the | ||
464 | 7 | * License, or (at your option) any later version. | ||
465 | 8 | * | ||
466 | 9 | * This program is distributed in the hope that it will be useful, but | ||
467 | 10 | * WITHOUT ANY WARRANTY; without even the implied warranty of | ||
468 | 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
469 | 12 | * General Public License for more details. | ||
470 | 13 | * | ||
471 | 14 | * You should have received a copy of the GNU General Public License | ||
472 | 15 | * along with this program; if not, write to the Free Software | ||
473 | 16 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA | ||
474 | 17 | * 02111-1307, USA. | ||
475 | 18 | * | ||
476 | 19 | * Author: Ryan Lortie <desrt@desrt.ca> | ||
477 | 20 | */ | ||
478 | 21 | |||
479 | 22 | #ifndef __vino_preferences_h__ | ||
480 | 23 | #define __vino_preferences_h__ | ||
481 | 24 | |||
482 | 25 | #include <shell/cc-panel.h> | ||
483 | 26 | |||
484 | 27 | void cc_screen_sharing_panel_register (GIOModule *module); | ||
485 | 28 | |||
486 | 29 | #endif /* __vino_preferences_h__ */ | ||
487 | 30 | 0 | ||
488 | === removed file 'panels/screen-sharing/screen-sharing-module.c' | |||
489 | --- panels/screen-sharing/screen-sharing-module.c 2017-12-07 05:41:33 +0000 | |||
490 | +++ panels/screen-sharing/screen-sharing-module.c 1970-01-01 00:00:00 +0000 | |||
491 | @@ -1,41 +0,0 @@ | |||
492 | 1 | /* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- | ||
493 | 2 | * | ||
494 | 3 | * Copyright (C) 2010 Red Hat, Inc | ||
495 | 4 | * | ||
496 | 5 | * This program is free software; you can redistribute it and/or modify | ||
497 | 6 | * it under the terms of the GNU General Public License as published by | ||
498 | 7 | * the Free Software Foundation; either version 2 of the License, or | ||
499 | 8 | * (at your option) any later version. | ||
500 | 9 | * | ||
501 | 10 | * This program is distributed in the hope that it will be useful, | ||
502 | 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
503 | 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
504 | 13 | * GNU General Public License for more details. | ||
505 | 14 | * | ||
506 | 15 | * You should have received a copy of the GNU General Public License | ||
507 | 16 | * along with this program; if not, write to the Free Software | ||
508 | 17 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | ||
509 | 18 | * | ||
510 | 19 | * | ||
511 | 20 | */ | ||
512 | 21 | |||
513 | 22 | #include <config.h> | ||
514 | 23 | |||
515 | 24 | #include "cc-screen-sharing-panel.h" | ||
516 | 25 | |||
517 | 26 | #include <glib/gi18n-lib.h> | ||
518 | 27 | |||
519 | 28 | void | ||
520 | 29 | g_io_module_load (GIOModule *module) | ||
521 | 30 | { | ||
522 | 31 | bindtextdomain (GETTEXT_PACKAGE, GNOMELOCALEDIR); | ||
523 | 32 | bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8"); | ||
524 | 33 | |||
525 | 34 | /* register the panel */ | ||
526 | 35 | cc_screen_sharing_panel_register (module); | ||
527 | 36 | } | ||
528 | 37 | |||
529 | 38 | void | ||
530 | 39 | g_io_module_unload (GIOModule *module) | ||
531 | 40 | { | ||
532 | 41 | } | ||
533 | 42 | 0 | ||
534 | === removed file 'panels/screen-sharing/screen-sharing-panel.ui' | |||
535 | --- panels/screen-sharing/screen-sharing-panel.ui 2017-12-07 05:41:33 +0000 | |||
536 | +++ panels/screen-sharing/screen-sharing-panel.ui 1970-01-01 00:00:00 +0000 | |||
537 | @@ -1,400 +0,0 @@ | |||
538 | 1 | <?xml version="1.0"?> | ||
539 | 2 | <interface> | ||
540 | 3 | <requires lib="gtk+" version="2.16"/> | ||
541 | 4 | <!-- interface-naming-policy toplevel-contextual --> | ||
542 | 5 | <object class="GtkWindow" id="window1"> | ||
543 | 6 | <child> | ||
544 | 7 | <object class="GtkBox" id="screen_sharing_vbox"> | ||
545 | 8 | <property name="visible">True</property> | ||
546 | 9 | <property name="orientation">vertical</property> | ||
547 | 10 | <property name="spacing">6</property> | ||
548 | 11 | <child> | ||
549 | 12 | <object class="GtkBox" id="vbox1"> | ||
550 | 13 | <property name="visible">True</property> | ||
551 | 14 | <property name="orientation">vertical</property> | ||
552 | 15 | <property name="border_width">6</property> | ||
553 | 16 | <property name="spacing">18</property> | ||
554 | 17 | <child> | ||
555 | 18 | <object class="GtkBox" id="sharing_box"> | ||
556 | 19 | <property name="visible">True</property> | ||
557 | 20 | <property name="orientation">vertical</property> | ||
558 | 21 | <property name="spacing">6</property> | ||
559 | 22 | <child> | ||
560 | 23 | <object class="GtkLabel" id="label1"> | ||
561 | 24 | <property name="visible">True</property> | ||
562 | 25 | <property name="xalign">0</property> | ||
563 | 26 | <property name="label" translatable="yes">Sharing</property> | ||
564 | 27 | <attributes> | ||
565 | 28 | <attribute name="weight" value="bold"/> | ||
566 | 29 | </attributes> | ||
567 | 30 | </object> | ||
568 | 31 | <packing> | ||
569 | 32 | <property name="position">0</property> | ||
570 | 33 | </packing> | ||
571 | 34 | </child> | ||
572 | 35 | <child> | ||
573 | 36 | <object class="GtkBox" id="writability_warning"> | ||
574 | 37 | <property name="orientation">horizontal</property> | ||
575 | 38 | <property name="no_show_all">True</property> | ||
576 | 39 | <property name="border_width">3</property> | ||
577 | 40 | <property name="spacing">6</property> | ||
578 | 41 | <child> | ||
579 | 42 | <object class="GtkLabel" id="label6"> | ||
580 | 43 | <property name="visible">True</property> | ||
581 | 44 | <property name="label"> </property> | ||
582 | 45 | </object> | ||
583 | 46 | <packing> | ||
584 | 47 | <property name="expand">False</property> | ||
585 | 48 | <property name="fill">False</property> | ||
586 | 49 | <property name="position">0</property> | ||
587 | 50 | </packing> | ||
588 | 51 | </child> | ||
589 | 52 | <child> | ||
590 | 53 | <object class="GtkImage" id="image1"> | ||
591 | 54 | <property name="visible">True</property> | ||
592 | 55 | <property name="stock">gtk-dialog-warning</property> | ||
593 | 56 | </object> | ||
594 | 57 | <packing> | ||
595 | 58 | <property name="expand">False</property> | ||
596 | 59 | <property name="position">1</property> | ||
597 | 60 | </packing> | ||
598 | 61 | </child> | ||
599 | 62 | <child> | ||
600 | 63 | <object class="GtkLabel" id="label8"> | ||
601 | 64 | <property name="visible">True</property> | ||
602 | 65 | <property name="label" translatable="yes">Some of these preferences are locked down</property> | ||
603 | 66 | <attributes> | ||
604 | 67 | <attribute name="style" value="italic"/> | ||
605 | 68 | </attributes> | ||
606 | 69 | </object> | ||
607 | 70 | <packing> | ||
608 | 71 | <property name="expand">False</property> | ||
609 | 72 | <property name="fill">False</property> | ||
610 | 73 | <property name="position">2</property> | ||
611 | 74 | </packing> | ||
612 | 75 | </child> | ||
613 | 76 | </object> | ||
614 | 77 | <packing> | ||
615 | 78 | <property name="position">1</property> | ||
616 | 79 | </packing> | ||
617 | 80 | </child> | ||
618 | 81 | <child> | ||
619 | 82 | <object class="GtkBox" id="hbox1"> | ||
620 | 83 | <property name="visible">True</property> | ||
621 | 84 | <property name="orientation">horizontal</property> | ||
622 | 85 | <child> | ||
623 | 86 | <object class="GtkLabel" id="label2"> | ||
624 | 87 | <property name="visible">True</property> | ||
625 | 88 | <property name="label"> </property> | ||
626 | 89 | </object> | ||
627 | 90 | <packing> | ||
628 | 91 | <property name="expand">False</property> | ||
629 | 92 | <property name="fill">False</property> | ||
630 | 93 | <property name="position">0</property> | ||
631 | 94 | </packing> | ||
632 | 95 | </child> | ||
633 | 96 | <child> | ||
634 | 97 | <object class="GtkCheckButton" id="allowed_toggle"> | ||
635 | 98 | <property name="label" translatable="yes">Allow other users to _view your desktop</property> | ||
636 | 99 | <property name="visible">True</property> | ||
637 | 100 | <property name="can_focus">True</property> | ||
638 | 101 | <property name="receives_default">False</property> | ||
639 | 102 | <property name="has_tooltip">True</property> | ||
640 | 103 | <property name="tooltip_text" translatable="yes">Your desktop will be shared</property> | ||
641 | 104 | <property name="use_underline">True</property> | ||
642 | 105 | <property name="draw_indicator">True</property> | ||
643 | 106 | </object> | ||
644 | 107 | <packing> | ||
645 | 108 | <property name="position">1</property> | ||
646 | 109 | </packing> | ||
647 | 110 | </child> | ||
648 | 111 | </object> | ||
649 | 112 | <packing> | ||
650 | 113 | <property name="position">2</property> | ||
651 | 114 | </packing> | ||
652 | 115 | </child> | ||
653 | 116 | <child> | ||
654 | 117 | <object class="GtkBox" id="control_settings"> | ||
655 | 118 | <property name="visible">True</property> | ||
656 | 119 | <property name="orientation">horizontal</property> | ||
657 | 120 | <child> | ||
658 | 121 | <object class="GtkLabel" id="label3"> | ||
659 | 122 | <property name="visible">True</property> | ||
660 | 123 | <property name="label"> </property> | ||
661 | 124 | </object> | ||
662 | 125 | <packing> | ||
663 | 126 | <property name="expand">False</property> | ||
664 | 127 | <property name="fill">False</property> | ||
665 | 128 | <property name="position">0</property> | ||
666 | 129 | </packing> | ||
667 | 130 | </child> | ||
668 | 131 | <child> | ||
669 | 132 | <object class="GtkCheckButton" id="view_only_toggle"> | ||
670 | 133 | <property name="label" translatable="yes">_Allow other users to control your desktop</property> | ||
671 | 134 | <property name="visible">True</property> | ||
672 | 135 | <property name="can_focus">True</property> | ||
673 | 136 | <property name="receives_default">False</property> | ||
674 | 137 | <property name="has_tooltip">True</property> | ||
675 | 138 | <property name="tooltip_text" translatable="yes">Remote users are able to control your mouse and keyboard</property> | ||
676 | 139 | <property name="use_underline">True</property> | ||
677 | 140 | <property name="draw_indicator">True</property> | ||
678 | 141 | </object> | ||
679 | 142 | <packing> | ||
680 | 143 | <property name="position">1</property> | ||
681 | 144 | </packing> | ||
682 | 145 | </child> | ||
683 | 146 | </object> | ||
684 | 147 | <packing> | ||
685 | 148 | <property name="position">3</property> | ||
686 | 149 | </packing> | ||
687 | 150 | </child> | ||
688 | 151 | <!-- | ||
689 | 152 | <child> | ||
690 | 153 | <object class="GtkBox" id="message_box"> | ||
691 | 154 | <property name="visible">True</property> | ||
692 | 155 | <property name="orientation">horizontal</property> | ||
693 | 156 | <child> | ||
694 | 157 | <object class="GtkLabel" id="label14"> | ||
695 | 158 | <property name="visible">True</property> | ||
696 | 159 | <property name="label"> </property> | ||
697 | 160 | </object> | ||
698 | 161 | <packing> | ||
699 | 162 | <property name="expand">False</property> | ||
700 | 163 | <property name="fill">False</property> | ||
701 | 164 | <property name="position">0</property> | ||
702 | 165 | </packing> | ||
703 | 166 | </child> | ||
704 | 167 | <child> | ||
705 | 168 | <object class="VinoMessageBox" id="message"> | ||
706 | 169 | <property name="visible">True</property> | ||
707 | 170 | </object> | ||
708 | 171 | <packing> | ||
709 | 172 | <property name="position">1</property> | ||
710 | 173 | </packing> | ||
711 | 174 | </child> | ||
712 | 175 | </object> | ||
713 | 176 | <packing> | ||
714 | 177 | <property name="position">4</property> | ||
715 | 178 | </packing> | ||
716 | 179 | </child> | ||
717 | 180 | --> | ||
718 | 181 | </object> | ||
719 | 182 | <packing> | ||
720 | 183 | <property name="position">0</property> | ||
721 | 184 | </packing> | ||
722 | 185 | </child> | ||
723 | 186 | <child> | ||
724 | 187 | <object class="GtkBox" id="security_box"> | ||
725 | 188 | <property name="visible">True</property> | ||
726 | 189 | <property name="orientation">vertical</property> | ||
727 | 190 | <property name="spacing">6</property> | ||
728 | 191 | <child> | ||
729 | 192 | <object class="GtkLabel" id="label4"> | ||
730 | 193 | <property name="visible">True</property> | ||
731 | 194 | <property name="xalign">0</property> | ||
732 | 195 | <property name="label" translatable="yes">Security</property> | ||
733 | 196 | <attributes> | ||
734 | 197 | <attribute name="weight" value="bold"/> | ||
735 | 198 | </attributes> | ||
736 | 199 | </object> | ||
737 | 200 | <packing> | ||
738 | 201 | <property name="position">0</property> | ||
739 | 202 | </packing> | ||
740 | 203 | </child> | ||
741 | 204 | <child> | ||
742 | 205 | <object class="GtkBox" id="hbox3"> | ||
743 | 206 | <property name="visible">True</property> | ||
744 | 207 | <property name="orientation">horizontal</property> | ||
745 | 208 | <child> | ||
746 | 209 | <object class="GtkBox" id="security_settings"> | ||
747 | 210 | <property name="visible">True</property> | ||
748 | 211 | <property name="orientation">vertical</property> | ||
749 | 212 | <property name="spacing">6</property> | ||
750 | 213 | <child> | ||
751 | 214 | <object class="GtkCheckButton" id="prompt_enabled_toggle"> | ||
752 | 215 | <property name="label" translatable="yes">_You must confirm each access to this machine</property> | ||
753 | 216 | <property name="visible">True</property> | ||
754 | 217 | <property name="can_focus">True</property> | ||
755 | 218 | <property name="receives_default">False</property> | ||
756 | 219 | <property name="use_underline">True</property> | ||
757 | 220 | <property name="draw_indicator">True</property> | ||
758 | 221 | </object> | ||
759 | 222 | <packing> | ||
760 | 223 | <property name="position">0</property> | ||
761 | 224 | </packing> | ||
762 | 225 | </child> | ||
763 | 226 | <child> | ||
764 | 227 | <object class="GtkBox" id="hbox4"> | ||
765 | 228 | <property name="visible">True</property> | ||
766 | 229 | <property name="orientation">horizontal</property> | ||
767 | 230 | <property name="spacing">12</property> | ||
768 | 231 | <child> | ||
769 | 232 | <object class="GtkCheckButton" id="password_toggle"> | ||
770 | 233 | <property name="label" translatable="yes">_Require the user to enter this password:</property> | ||
771 | 234 | <property name="visible">True</property> | ||
772 | 235 | <property name="can_focus">True</property> | ||
773 | 236 | <property name="receives_default">False</property> | ||
774 | 237 | <property name="use_underline">True</property> | ||
775 | 238 | <property name="draw_indicator">True</property> | ||
776 | 239 | </object> | ||
777 | 240 | <packing> | ||
778 | 241 | <property name="expand">False</property> | ||
779 | 242 | <property name="position">0</property> | ||
780 | 243 | </packing> | ||
781 | 244 | </child> | ||
782 | 245 | <child> | ||
783 | 246 | <object class="GtkBox" id="password_box"> | ||
784 | 247 | <property name="visible">True</property> | ||
785 | 248 | <property name="orientation">horizontal</property> | ||
786 | 249 | <child> | ||
787 | 250 | <object class="GtkEntry" id="password_entry"> | ||
788 | 251 | <property name="visible">True</property> | ||
789 | 252 | <property name="can_focus">True</property> | ||
790 | 253 | <property name="max_length">8</property> | ||
791 | 254 | <property name="visibility">False</property> | ||
792 | 255 | <property name="invisible_char">●</property> | ||
793 | 256 | </object> | ||
794 | 257 | <packing> | ||
795 | 258 | <property name="position">1</property> | ||
796 | 259 | </packing> | ||
797 | 260 | </child> | ||
798 | 261 | </object> | ||
799 | 262 | <packing> | ||
800 | 263 | <property name="position">1</property> | ||
801 | 264 | </packing> | ||
802 | 265 | </child> | ||
803 | 266 | </object> | ||
804 | 267 | <packing> | ||
805 | 268 | <property name="position">1</property> | ||
806 | 269 | </packing> | ||
807 | 270 | </child> | ||
808 | 271 | <child> | ||
809 | 272 | <object class="GtkCheckButton" id="use_upnp_toggle"> | ||
810 | 273 | <property name="label" translatable="yes">Automatically _configure UPnP router to open and forward ports</property> | ||
811 | 274 | <property name="visible">True</property> | ||
812 | 275 | <property name="can_focus">True</property> | ||
813 | 276 | <property name="receives_default">False</property> | ||
814 | 277 | <property name="has_tooltip">True</property> | ||
815 | 278 | <property name="tooltip_text" translatable="yes">The router must have the UPnP feature enabled</property> | ||
816 | 279 | <property name="use_underline">True</property> | ||
817 | 280 | <property name="draw_indicator">True</property> | ||
818 | 281 | </object> | ||
819 | 282 | <packing> | ||
820 | 283 | <property name="position">2</property> | ||
821 | 284 | </packing> | ||
822 | 285 | </child> | ||
823 | 286 | </object> | ||
824 | 287 | <packing> | ||
825 | 288 | <property name="padding">12</property> | ||
826 | 289 | <property name="position">0</property> | ||
827 | 290 | </packing> | ||
828 | 291 | </child> | ||
829 | 292 | </object> | ||
830 | 293 | <packing> | ||
831 | 294 | <property name="position">1</property> | ||
832 | 295 | </packing> | ||
833 | 296 | </child> | ||
834 | 297 | </object> | ||
835 | 298 | <packing> | ||
836 | 299 | <property name="position">1</property> | ||
837 | 300 | </packing> | ||
838 | 301 | </child> | ||
839 | 302 | <child> | ||
840 | 303 | <object class="GtkBox" id="notification_box"> | ||
841 | 304 | <property name="visible">True</property> | ||
842 | 305 | <property name="orientation">vertical</property> | ||
843 | 306 | <property name="spacing">6</property> | ||
844 | 307 | <child> | ||
845 | 308 | <object class="GtkLabel" id="label12"> | ||
846 | 309 | <property name="visible">True</property> | ||
847 | 310 | <property name="xalign">0</property> | ||
848 | 311 | <property name="label" translatable="yes">Show Notification Area Icon</property> | ||
849 | 312 | <attributes> | ||
850 | 313 | <attribute name="weight" value="bold"/> | ||
851 | 314 | </attributes> | ||
852 | 315 | </object> | ||
853 | 316 | <packing> | ||
854 | 317 | <property name="position">0</property> | ||
855 | 318 | </packing> | ||
856 | 319 | </child> | ||
857 | 320 | <child> | ||
858 | 321 | <object class="GtkBox" id="hbox8"> | ||
859 | 322 | <property name="visible">True</property> | ||
860 | 323 | <property name="orientation">horizontal</property> | ||
861 | 324 | <child> | ||
862 | 325 | <object class="GtkBox" id="notification_settings"> | ||
863 | 326 | <property name="visible">True</property> | ||
864 | 327 | <property name="orientation">vertical</property> | ||
865 | 328 | <property name="spacing">3</property> | ||
866 | 329 | <child> | ||
867 | 330 | <object class="VinoRadioButton" id="icon_always_radio"> | ||
868 | 331 | <property name='name'>always</property> | ||
869 | 332 | <property name="label" translatable="yes">Al_ways</property> | ||
870 | 333 | <property name="visible">True</property> | ||
871 | 334 | <property name="can_focus">True</property> | ||
872 | 335 | <property name="receives_default">False</property> | ||
873 | 336 | <property name="use_underline">True</property> | ||
874 | 337 | <property name="active">True</property> | ||
875 | 338 | <property name="draw_indicator">True</property> | ||
876 | 339 | </object> | ||
877 | 340 | <packing> | ||
878 | 341 | <property name="position">0</property> | ||
879 | 342 | </packing> | ||
880 | 343 | </child> | ||
881 | 344 | <child> | ||
882 | 345 | <object class="VinoRadioButton" id="icon_client_radio"> | ||
883 | 346 | <property name='name'>client</property> | ||
884 | 347 | <property name="label" translatable="yes">_Only when someone is connected</property> | ||
885 | 348 | <property name="visible">True</property> | ||
886 | 349 | <property name="can_focus">True</property> | ||
887 | 350 | <property name="receives_default">False</property> | ||
888 | 351 | <property name="use_underline">True</property> | ||
889 | 352 | <property name="active">True</property> | ||
890 | 353 | <property name="draw_indicator">True</property> | ||
891 | 354 | <property name="group">icon_always_radio</property> | ||
892 | 355 | </object> | ||
893 | 356 | <packing> | ||
894 | 357 | <property name="position">1</property> | ||
895 | 358 | </packing> | ||
896 | 359 | </child> | ||
897 | 360 | <child> | ||
898 | 361 | <object class="VinoRadioButton" id="icon_never_radio"> | ||
899 | 362 | <property name='name'>never</property> | ||
900 | 363 | <property name="label" translatable="yes">_Never</property> | ||
901 | 364 | <property name="visible">True</property> | ||
902 | 365 | <property name="can_focus">True</property> | ||
903 | 366 | <property name="receives_default">False</property> | ||
904 | 367 | <property name="use_underline">True</property> | ||
905 | 368 | <property name="active">True</property> | ||
906 | 369 | <property name="draw_indicator">True</property> | ||
907 | 370 | <property name="group">icon_always_radio</property> | ||
908 | 371 | </object> | ||
909 | 372 | <packing> | ||
910 | 373 | <property name="position">2</property> | ||
911 | 374 | </packing> | ||
912 | 375 | </child> | ||
913 | 376 | </object> | ||
914 | 377 | <packing> | ||
915 | 378 | <property name="padding">12</property> | ||
916 | 379 | <property name="position">0</property> | ||
917 | 380 | </packing> | ||
918 | 381 | </child> | ||
919 | 382 | </object> | ||
920 | 383 | <packing> | ||
921 | 384 | <property name="position">1</property> | ||
922 | 385 | </packing> | ||
923 | 386 | </child> | ||
924 | 387 | </object> | ||
925 | 388 | <packing> | ||
926 | 389 | <property name="position">2</property> | ||
927 | 390 | </packing> | ||
928 | 391 | </child> | ||
929 | 392 | </object> | ||
930 | 393 | <packing> | ||
931 | 394 | <property name="position">1</property> | ||
932 | 395 | </packing> | ||
933 | 396 | </child> | ||
934 | 397 | </object> | ||
935 | 398 | </child> | ||
936 | 399 | </object> | ||
937 | 400 | </interface> | ||
938 | 401 | 0 | ||
939 | === removed file 'panels/screen-sharing/unity-screen-sharing-panel.desktop.in.in' | |||
940 | --- panels/screen-sharing/unity-screen-sharing-panel.desktop.in.in 2017-12-07 05:41:33 +0000 | |||
941 | +++ panels/screen-sharing/unity-screen-sharing-panel.desktop.in.in 1970-01-01 00:00:00 +0000 | |||
942 | @@ -1,13 +0,0 @@ | |||
943 | 1 | [Desktop Entry] | ||
944 | 2 | _Name=Desktop Sharing | ||
945 | 3 | _Comment=Choose how other users can remotely view your desktop | ||
946 | 4 | Exec=unity-control-center screen-sharing | ||
947 | 5 | Icon=preferences-desktop-remote-desktop | ||
948 | 6 | Terminal=false | ||
949 | 7 | Type=Application | ||
950 | 8 | StartupNotify=true | ||
951 | 9 | Categories=GNOME;GTK;Settings;DesktopSettings;X-Unity-Settings-Panel;X-GNOME-PersonalSettings | ||
952 | 10 | OnlyShowIn=Unity; | ||
953 | 11 | X-Unity-Settings-Panel=screen-sharing | ||
954 | 12 | # Translators: those are keywords for the screen sharing control-center panel | ||
955 | 13 | _Keywords=Screen;Sharing;Remote;Desktop;VNC | ||
956 | 14 | 0 | ||
957 | === removed file 'panels/screen-sharing/vino-message-box.c' | |||
958 | --- panels/screen-sharing/vino-message-box.c 2017-12-07 05:41:33 +0000 | |||
959 | +++ panels/screen-sharing/vino-message-box.c 1970-01-01 00:00:00 +0000 | |||
960 | @@ -1,156 +0,0 @@ | |||
961 | 1 | /* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 4; tab-width: 4 -*- */ | ||
962 | 2 | /* | ||
963 | 3 | * vino-message-box.c | ||
964 | 4 | * Copyright (C) Jonh Wendell 2009 <wendell@bani.com.br> | ||
965 | 5 | * | ||
966 | 6 | * vino-message-box.c is free software: you can redistribute it and/or modify it | ||
967 | 7 | * under the terms of the GNU General Public License as published by the | ||
968 | 8 | * Free Software Foundation, either version 2 of the License, or | ||
969 | 9 | * (at your option) any later version. | ||
970 | 10 | * | ||
971 | 11 | * vino-message-box.c is distributed in the hope that it will be useful, but | ||
972 | 12 | * WITHOUT ANY WARRANTY; without even the implied warranty of | ||
973 | 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | ||
974 | 14 | * See the GNU General Public License for more details. | ||
975 | 15 | * | ||
976 | 16 | * You should have received a copy of the GNU General Public License along | ||
977 | 17 | * with this program. If not, see <http://www.gnu.org/licenses/>. | ||
978 | 18 | */ | ||
979 | 19 | |||
980 | 20 | #include <config.h> | ||
981 | 21 | #include <glib/gi18n.h> | ||
982 | 22 | #include "vino-message-box.h" | ||
983 | 23 | |||
984 | 24 | struct _VinoMessageBoxPrivate | ||
985 | 25 | { | ||
986 | 26 | GtkWidget *main_hbox; | ||
987 | 27 | GtkWidget *label; | ||
988 | 28 | GtkWidget *image; | ||
989 | 29 | }; | ||
990 | 30 | |||
991 | 31 | G_DEFINE_TYPE (VinoMessageBox, vino_message_box, GTK_TYPE_INFO_BAR); | ||
992 | 32 | |||
993 | 33 | static void | ||
994 | 34 | url_activated_cb(GtkWidget *url_label, const gchar *url) | ||
995 | 35 | { | ||
996 | 36 | GError *error; | ||
997 | 37 | GdkScreen *screen; | ||
998 | 38 | gchar *mailto; | ||
999 | 39 | |||
1000 | 40 | error = NULL; | ||
1001 | 41 | screen = gtk_widget_get_screen (url_label); | ||
1002 | 42 | mailto = g_strdup_printf ("mailto:?Body=%s", url); | ||
1003 | 43 | |||
1004 | 44 | if (!gtk_show_uri (screen, mailto, GDK_CURRENT_TIME, &error)) | ||
1005 | 45 | { | ||
1006 | 46 | GtkWidget *message_dialog, *parent; | ||
1007 | 47 | |||
1008 | 48 | parent = gtk_widget_get_toplevel (GTK_WIDGET (url_label)); | ||
1009 | 49 | if (!GTK_IS_WINDOW (parent)) | ||
1010 | 50 | parent = NULL; | ||
1011 | 51 | message_dialog = gtk_message_dialog_new (GTK_WINDOW (parent), | ||
1012 | 52 | GTK_DIALOG_MODAL | GTK_DIALOG_DESTROY_WITH_PARENT, | ||
1013 | 53 | GTK_MESSAGE_ERROR, | ||
1014 | 54 | GTK_BUTTONS_CLOSE, | ||
1015 | 55 | _("There was an error showing the URL \"%s\""), | ||
1016 | 56 | url); | ||
1017 | 57 | gtk_message_dialog_format_secondary_text (GTK_MESSAGE_DIALOG (message_dialog), | ||
1018 | 58 | "%s", | ||
1019 | 59 | error->message); | ||
1020 | 60 | |||
1021 | 61 | gtk_window_set_resizable (GTK_WINDOW (message_dialog), FALSE); | ||
1022 | 62 | |||
1023 | 63 | g_signal_connect (message_dialog, "response", | ||
1024 | 64 | G_CALLBACK (gtk_widget_destroy), | ||
1025 | 65 | NULL); | ||
1026 | 66 | |||
1027 | 67 | gtk_widget_show (message_dialog); | ||
1028 | 68 | g_error_free (error); | ||
1029 | 69 | } | ||
1030 | 70 | |||
1031 | 71 | g_free (mailto); | ||
1032 | 72 | } | ||
1033 | 73 | |||
1034 | 74 | static void | ||
1035 | 75 | vino_message_box_init (VinoMessageBox *box) | ||
1036 | 76 | { | ||
1037 | 77 | box->priv = G_TYPE_INSTANCE_GET_PRIVATE (box, VINO_TYPE_MESSAGE_BOX, VinoMessageBoxPrivate); | ||
1038 | 78 | |||
1039 | 79 | box->priv->main_hbox = gtk_info_bar_get_content_area (GTK_INFO_BAR (box)); | ||
1040 | 80 | box->priv->image = NULL; | ||
1041 | 81 | |||
1042 | 82 | box->priv->label = gtk_label_new (NULL); | ||
1043 | 83 | gtk_misc_set_alignment (GTK_MISC (box->priv->label), 0.0, 0.0); | ||
1044 | 84 | gtk_label_set_line_wrap (GTK_LABEL (box->priv->label), TRUE); | ||
1045 | 85 | gtk_label_set_selectable (GTK_LABEL (box->priv->label), TRUE); | ||
1046 | 86 | g_signal_connect (box->priv->label, | ||
1047 | 87 | "activate-link", | ||
1048 | 88 | G_CALLBACK (url_activated_cb), | ||
1049 | 89 | NULL); | ||
1050 | 90 | |||
1051 | 91 | gtk_widget_show (box->priv->label); | ||
1052 | 92 | gtk_info_bar_set_message_type (GTK_INFO_BAR (box), GTK_MESSAGE_INFO); | ||
1053 | 93 | gtk_container_add (GTK_CONTAINER (box->priv->main_hbox), box->priv->label); | ||
1054 | 94 | } | ||
1055 | 95 | |||
1056 | 96 | static void | ||
1057 | 97 | vino_message_box_finalize (GObject *object) | ||
1058 | 98 | { | ||
1059 | 99 | /* TODO: Add deinitalization code here */ | ||
1060 | 100 | |||
1061 | 101 | G_OBJECT_CLASS (vino_message_box_parent_class)->finalize (object); | ||
1062 | 102 | } | ||
1063 | 103 | |||
1064 | 104 | static void | ||
1065 | 105 | vino_message_box_class_init (VinoMessageBoxClass *klass) | ||
1066 | 106 | { | ||
1067 | 107 | GObjectClass* object_class = G_OBJECT_CLASS (klass); | ||
1068 | 108 | |||
1069 | 109 | object_class->finalize = vino_message_box_finalize; | ||
1070 | 110 | g_type_class_add_private (object_class, sizeof(VinoMessageBoxPrivate)); | ||
1071 | 111 | } | ||
1072 | 112 | |||
1073 | 113 | GtkWidget * | ||
1074 | 114 | vino_message_box_new (void) | ||
1075 | 115 | { | ||
1076 | 116 | return GTK_WIDGET (g_object_new (VINO_TYPE_MESSAGE_BOX, NULL)); | ||
1077 | 117 | } | ||
1078 | 118 | |||
1079 | 119 | void | ||
1080 | 120 | vino_message_box_set_label (VinoMessageBox *box, const gchar *label) | ||
1081 | 121 | { | ||
1082 | 122 | g_return_if_fail (VINO_IS_MESSAGE_BOX (box)); | ||
1083 | 123 | |||
1084 | 124 | gtk_label_set_markup (GTK_LABEL (box->priv->label), label); | ||
1085 | 125 | } | ||
1086 | 126 | |||
1087 | 127 | void | ||
1088 | 128 | vino_message_box_show_image (VinoMessageBox *box) | ||
1089 | 129 | { | ||
1090 | 130 | g_return_if_fail (VINO_IS_MESSAGE_BOX (box)); | ||
1091 | 131 | |||
1092 | 132 | if (box->priv->image) | ||
1093 | 133 | { | ||
1094 | 134 | gtk_widget_destroy (box->priv->image); | ||
1095 | 135 | box->priv->image = NULL; | ||
1096 | 136 | } | ||
1097 | 137 | |||
1098 | 138 | |||
1099 | 139 | box->priv->image = gtk_spinner_new (); | ||
1100 | 140 | gtk_spinner_start (GTK_SPINNER (box->priv->image)); | ||
1101 | 141 | |||
1102 | 142 | gtk_box_pack_start (GTK_BOX (box->priv->main_hbox), box->priv->image, FALSE, FALSE, 2); | ||
1103 | 143 | gtk_box_reorder_child (GTK_BOX (box->priv->main_hbox), box->priv->image, 0); | ||
1104 | 144 | gtk_widget_show (box->priv->image); | ||
1105 | 145 | } | ||
1106 | 146 | |||
1107 | 147 | void | ||
1108 | 148 | vino_message_box_hide_image (VinoMessageBox *box) | ||
1109 | 149 | { | ||
1110 | 150 | g_return_if_fail (VINO_IS_MESSAGE_BOX (box)); | ||
1111 | 151 | |||
1112 | 152 | if (box->priv->image) | ||
1113 | 153 | gtk_widget_destroy (box->priv->image); | ||
1114 | 154 | box->priv->image = NULL; | ||
1115 | 155 | } | ||
1116 | 156 | |||
1117 | 157 | 0 | ||
1118 | === removed file 'panels/screen-sharing/vino-message-box.h' | |||
1119 | --- panels/screen-sharing/vino-message-box.h 2017-12-07 05:41:33 +0000 | |||
1120 | +++ panels/screen-sharing/vino-message-box.h 1970-01-01 00:00:00 +0000 | |||
1121 | @@ -1,59 +0,0 @@ | |||
1122 | 1 | /* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 4; tab-width: 4 -*- */ | ||
1123 | 2 | /* | ||
1124 | 3 | * vino-message-box.c | ||
1125 | 4 | * Copyright (C) Jonh Wendell 2009 <wendell@bani.com.br> | ||
1126 | 5 | * | ||
1127 | 6 | * vino-message-box.c is free software: you can redistribute it and/or modify it | ||
1128 | 7 | * under the terms of the GNU General Public License as published by the | ||
1129 | 8 | * Free Software Foundation, either version 2 of the License, or | ||
1130 | 9 | * (at your option) any later version. | ||
1131 | 10 | * | ||
1132 | 11 | * vino-message-box.c is distributed in the hope that it will be useful, but | ||
1133 | 12 | * WITHOUT ANY WARRANTY; without even the implied warranty of | ||
1134 | 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | ||
1135 | 14 | * See the GNU General Public License for more details. | ||
1136 | 15 | * | ||
1137 | 16 | * You should have received a copy of the GNU General Public License along | ||
1138 | 17 | * with this program. If not, see <http://www.gnu.org/licenses/>. | ||
1139 | 18 | */ | ||
1140 | 19 | |||
1141 | 20 | #ifndef _VINO_MESSAGE_BOX_H_ | ||
1142 | 21 | #define _VINO_MESSAGE_BOX_H_ | ||
1143 | 22 | |||
1144 | 23 | #include <gtk/gtk.h> | ||
1145 | 24 | |||
1146 | 25 | G_BEGIN_DECLS | ||
1147 | 26 | |||
1148 | 27 | #define VINO_TYPE_MESSAGE_BOX (vino_message_box_get_type ()) | ||
1149 | 28 | #define VINO_MESSAGE_BOX(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), VINO_TYPE_MESSAGE_BOX, VinoMessageBox)) | ||
1150 | 29 | #define VINO_MESSAGE_BOX_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), VINO_TYPE_MESSAGE_BOX, VinoMessageBoxClass)) | ||
1151 | 30 | #define VINO_IS_MESSAGE_BOX(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), VINO_TYPE_MESSAGE_BOX)) | ||
1152 | 31 | #define VINO_IS_MESSAGE_BOX_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), VINO_TYPE_MESSAGE_BOX)) | ||
1153 | 32 | #define VINO_MESSAGE_BOX_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), VINO_TYPE_MESSAGE_BOX, VinoMessageBoxClass)) | ||
1154 | 33 | |||
1155 | 34 | typedef struct _VinoMessageBoxClass VinoMessageBoxClass; | ||
1156 | 35 | typedef struct _VinoMessageBox VinoMessageBox; | ||
1157 | 36 | typedef struct _VinoMessageBoxPrivate VinoMessageBoxPrivate; | ||
1158 | 37 | |||
1159 | 38 | struct _VinoMessageBoxClass | ||
1160 | 39 | { | ||
1161 | 40 | GtkInfoBarClass parent_class; | ||
1162 | 41 | }; | ||
1163 | 42 | |||
1164 | 43 | struct _VinoMessageBox | ||
1165 | 44 | { | ||
1166 | 45 | GtkInfoBar parent_instance; | ||
1167 | 46 | VinoMessageBoxPrivate *priv; | ||
1168 | 47 | }; | ||
1169 | 48 | |||
1170 | 49 | GType vino_message_box_get_type (void); | ||
1171 | 50 | |||
1172 | 51 | GtkWidget *vino_message_box_new (void); | ||
1173 | 52 | |||
1174 | 53 | void vino_message_box_set_label (VinoMessageBox *box, const gchar *label); | ||
1175 | 54 | void vino_message_box_show_image (VinoMessageBox *box); | ||
1176 | 55 | void vino_message_box_hide_image (VinoMessageBox *box); | ||
1177 | 56 | |||
1178 | 57 | G_END_DECLS | ||
1179 | 58 | |||
1180 | 59 | #endif /* _VINO_MESSAGE_BOX_H_ */ | ||
1181 | 60 | 0 | ||
1182 | === removed file 'panels/screen-sharing/vino-radio-button.c' | |||
1183 | --- panels/screen-sharing/vino-radio-button.c 2017-12-07 05:41:33 +0000 | |||
1184 | +++ panels/screen-sharing/vino-radio-button.c 1970-01-01 00:00:00 +0000 | |||
1185 | @@ -1,181 +0,0 @@ | |||
1186 | 1 | /* | ||
1187 | 2 | * Copyright © 2010 Codethink Limited | ||
1188 | 3 | * | ||
1189 | 4 | * This program is free software; you can redistribute it and/or | ||
1190 | 5 | * modify it under the terms of the GNU General Public License as | ||
1191 | 6 | * published by the Free Software Foundation; either version 2 of the | ||
1192 | 7 | * License, or (at your option) any later version. | ||
1193 | 8 | * | ||
1194 | 9 | * This program is distributed in the hope that it will be useful, but | ||
1195 | 10 | * WITHOUT ANY WARRANTY; without even the implied warranty of | ||
1196 | 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
1197 | 12 | * General Public License for more details. | ||
1198 | 13 | * | ||
1199 | 14 | * You should have received a copy of the GNU General Public License | ||
1200 | 15 | * along with this program; if not, write to the Free Software | ||
1201 | 16 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA | ||
1202 | 17 | * 02111-1307, USA. | ||
1203 | 18 | * | ||
1204 | 19 | * Author: Ryan Lortie <desrt@desrt.ca> | ||
1205 | 20 | */ | ||
1206 | 21 | |||
1207 | 22 | #include "vino-radio-button.h" | ||
1208 | 23 | |||
1209 | 24 | #include <gtk/gtk.h> | ||
1210 | 25 | |||
1211 | 26 | typedef struct | ||
1212 | 27 | { | ||
1213 | 28 | GtkRadioButton parent_instance; | ||
1214 | 29 | gchar *name; | ||
1215 | 30 | } VinoRadioButton; | ||
1216 | 31 | |||
1217 | 32 | typedef GtkRadioButtonClass VinoRadioButtonClass; | ||
1218 | 33 | |||
1219 | 34 | G_DEFINE_TYPE (VinoRadioButton, vino_radio_button, GTK_TYPE_RADIO_BUTTON) | ||
1220 | 35 | |||
1221 | 36 | enum | ||
1222 | 37 | { | ||
1223 | 38 | PROP_0, | ||
1224 | 39 | PROP_SETTINGS_NAME, | ||
1225 | 40 | PROP_SETTINGS_ACTIVE | ||
1226 | 41 | }; | ||
1227 | 42 | |||
1228 | 43 | static void | ||
1229 | 44 | vino_radio_button_get_property (GObject *object, guint prop_id, | ||
1230 | 45 | GValue *value, GParamSpec *pspec) | ||
1231 | 46 | { | ||
1232 | 47 | VinoRadioButton *vrb = (VinoRadioButton *) object; | ||
1233 | 48 | |||
1234 | 49 | switch (prop_id) | ||
1235 | 50 | { | ||
1236 | 51 | case PROP_SETTINGS_ACTIVE: | ||
1237 | 52 | { | ||
1238 | 53 | const GSList *list; | ||
1239 | 54 | |||
1240 | 55 | list = gtk_radio_button_get_group (&vrb->parent_instance); | ||
1241 | 56 | while (list) | ||
1242 | 57 | { | ||
1243 | 58 | VinoRadioButton *this = list->data; | ||
1244 | 59 | |||
1245 | 60 | if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (this))) | ||
1246 | 61 | { | ||
1247 | 62 | g_value_set_string (value, this->name); | ||
1248 | 63 | return; | ||
1249 | 64 | } | ||
1250 | 65 | |||
1251 | 66 | list = list->next; | ||
1252 | 67 | } | ||
1253 | 68 | } | ||
1254 | 69 | |||
1255 | 70 | g_warning ("No active radio buttons"); | ||
1256 | 71 | g_value_set_string (value, ""); | ||
1257 | 72 | return; | ||
1258 | 73 | |||
1259 | 74 | default: | ||
1260 | 75 | g_assert_not_reached (); | ||
1261 | 76 | } | ||
1262 | 77 | } | ||
1263 | 78 | |||
1264 | 79 | static void | ||
1265 | 80 | vino_radio_button_set_property (GObject *object, guint prop_id, | ||
1266 | 81 | const GValue *value, GParamSpec *pspec) | ||
1267 | 82 | { | ||
1268 | 83 | VinoRadioButton *vrb = (VinoRadioButton *) object; | ||
1269 | 84 | |||
1270 | 85 | switch (prop_id) | ||
1271 | 86 | { | ||
1272 | 87 | case PROP_SETTINGS_NAME: | ||
1273 | 88 | g_assert (vrb->name == NULL); | ||
1274 | 89 | vrb->name = g_value_dup_string (value); | ||
1275 | 90 | return; | ||
1276 | 91 | |||
1277 | 92 | case PROP_SETTINGS_ACTIVE: | ||
1278 | 93 | { | ||
1279 | 94 | const GSList *list; | ||
1280 | 95 | const gchar *name; | ||
1281 | 96 | |||
1282 | 97 | list = gtk_radio_button_get_group (&vrb->parent_instance); | ||
1283 | 98 | name = g_value_get_string (value); | ||
1284 | 99 | |||
1285 | 100 | while (list) | ||
1286 | 101 | { | ||
1287 | 102 | VinoRadioButton *this = list->data; | ||
1288 | 103 | |||
1289 | 104 | if (g_strcmp0 (this->name, name)) | ||
1290 | 105 | { | ||
1291 | 106 | gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (this), | ||
1292 | 107 | TRUE); | ||
1293 | 108 | return; | ||
1294 | 109 | } | ||
1295 | 110 | |||
1296 | 111 | list = list->next; | ||
1297 | 112 | } | ||
1298 | 113 | |||
1299 | 114 | g_warning ("No such radio button named `%s'", name); | ||
1300 | 115 | } | ||
1301 | 116 | return; | ||
1302 | 117 | |||
1303 | 118 | default: | ||
1304 | 119 | g_assert_not_reached (); | ||
1305 | 120 | } | ||
1306 | 121 | } | ||
1307 | 122 | |||
1308 | 123 | static void | ||
1309 | 124 | vino_radio_button_toggled (GtkToggleButton *button) | ||
1310 | 125 | { | ||
1311 | 126 | VinoRadioButton *vrb = (VinoRadioButton *) button; | ||
1312 | 127 | |||
1313 | 128 | /* As it is, we get the notification of the old button becoming inactivity | ||
1314 | 129 | * followed by the notification of the new button becoming active. Only run | ||
1315 | 130 | * when the new button becomes active in order to avoid unnecessary | ||
1316 | 131 | * notifications. | ||
1317 | 132 | */ | ||
1318 | 133 | if (gtk_toggle_button_get_active (button)) | ||
1319 | 134 | { | ||
1320 | 135 | const GSList *list; | ||
1321 | 136 | |||
1322 | 137 | list = gtk_radio_button_get_group (&vrb->parent_instance); | ||
1323 | 138 | while (list) | ||
1324 | 139 | { | ||
1325 | 140 | g_object_notify (list->data, "settings-active"); | ||
1326 | 141 | list = list->next; | ||
1327 | 142 | } | ||
1328 | 143 | } | ||
1329 | 144 | } | ||
1330 | 145 | |||
1331 | 146 | static void | ||
1332 | 147 | vino_radio_button_finalize (GObject *object) | ||
1333 | 148 | { | ||
1334 | 149 | VinoRadioButton *vrb = (VinoRadioButton *) object; | ||
1335 | 150 | |||
1336 | 151 | g_free (vrb->name); | ||
1337 | 152 | |||
1338 | 153 | G_OBJECT_CLASS (vino_radio_button_parent_class) | ||
1339 | 154 | ->finalize (object); | ||
1340 | 155 | } | ||
1341 | 156 | |||
1342 | 157 | static void | ||
1343 | 158 | vino_radio_button_init (VinoRadioButton *button) | ||
1344 | 159 | { | ||
1345 | 160 | } | ||
1346 | 161 | |||
1347 | 162 | static void | ||
1348 | 163 | vino_radio_button_class_init (GtkRadioButtonClass *class) | ||
1349 | 164 | { | ||
1350 | 165 | GtkToggleButtonClass *tb_class = GTK_TOGGLE_BUTTON_CLASS (class); | ||
1351 | 166 | GObjectClass *object_class = G_OBJECT_CLASS (class); | ||
1352 | 167 | |||
1353 | 168 | tb_class->toggled = vino_radio_button_toggled; | ||
1354 | 169 | object_class->get_property = vino_radio_button_get_property; | ||
1355 | 170 | object_class->set_property = vino_radio_button_set_property; | ||
1356 | 171 | object_class->finalize = vino_radio_button_finalize; | ||
1357 | 172 | |||
1358 | 173 | g_object_class_install_property (object_class, PROP_SETTINGS_NAME, | ||
1359 | 174 | g_param_spec_string ("settings-name", "name", "name", NULL, | ||
1360 | 175 | G_PARAM_CONSTRUCT_ONLY | G_PARAM_WRITABLE | | ||
1361 | 176 | G_PARAM_STATIC_STRINGS)); | ||
1362 | 177 | |||
1363 | 178 | g_object_class_install_property (object_class, PROP_SETTINGS_ACTIVE, | ||
1364 | 179 | g_param_spec_string ("settings-active", "active", "active", NULL, | ||
1365 | 180 | G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); | ||
1366 | 181 | } | ||
1367 | 182 | 0 | ||
1368 | === removed file 'panels/screen-sharing/vino-radio-button.h' | |||
1369 | --- panels/screen-sharing/vino-radio-button.h 2017-12-07 05:41:33 +0000 | |||
1370 | +++ panels/screen-sharing/vino-radio-button.h 1970-01-01 00:00:00 +0000 | |||
1371 | @@ -1,29 +0,0 @@ | |||
1372 | 1 | /* | ||
1373 | 2 | * Copyright © 2010 Codethink Limited | ||
1374 | 3 | * | ||
1375 | 4 | * This program is free software; you can redistribute it and/or | ||
1376 | 5 | * modify it under the terms of the GNU General Public License as | ||
1377 | 6 | * published by the Free Software Foundation; either version 2 of the | ||
1378 | 7 | * License, or (at your option) any later version. | ||
1379 | 8 | * | ||
1380 | 9 | * This program is distributed in the hope that it will be useful, but | ||
1381 | 10 | * WITHOUT ANY WARRANTY; without even the implied warranty of | ||
1382 | 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
1383 | 12 | * General Public License for more details. | ||
1384 | 13 | * | ||
1385 | 14 | * You should have received a copy of the GNU General Public License | ||
1386 | 15 | * along with this program; if not, write to the Free Software | ||
1387 | 16 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA | ||
1388 | 17 | * 02111-1307, USA. | ||
1389 | 18 | * | ||
1390 | 19 | * Author: Ryan Lortie <desrt@desrt.ca> | ||
1391 | 20 | */ | ||
1392 | 21 | |||
1393 | 22 | #ifndef __vino_radio_button_h__ | ||
1394 | 23 | #define __vino_radio_button_h__ | ||
1395 | 24 | |||
1396 | 25 | #include <glib-object.h> | ||
1397 | 26 | |||
1398 | 27 | GType vino_radio_button_get_type (void); | ||
1399 | 28 | |||
1400 | 29 | #endif /* __vino_radio_button_h__ */ | ||
1401 | 30 | 0 | ||
1402 | === added directory 'panels/sharing' | |||
1403 | === added file 'panels/sharing/Makefile.am' | |||
1404 | --- panels/sharing/Makefile.am 1970-01-01 00:00:00 +0000 | |||
1405 | +++ panels/sharing/Makefile.am 2018-11-21 12:36:03 +0000 | |||
1406 | @@ -0,0 +1,88 @@ | |||
1407 | 1 | # This is used in PANEL_CFLAGS | ||
1408 | 2 | cappletname = sharing | ||
1409 | 3 | |||
1410 | 4 | uidir = $(pkgdatadir)/ui/sharing | ||
1411 | 5 | dist_ui_DATA = sharing.ui networks.ui | ||
1412 | 6 | dbus_built_sources = org.gnome.SettingsDaemon.Sharing.c org.gnome.SettingsDaemon.Sharing.h | ||
1413 | 7 | |||
1414 | 8 | AM_CPPFLAGS = \ | ||
1415 | 9 | $(PANEL_CFLAGS) \ | ||
1416 | 10 | $(SHARING_PANEL_CFLAGS) \ | ||
1417 | 11 | -DSYSCONFDIR=\"$(sysconfdir)\" \ | ||
1418 | 12 | -DGNOMECC_UI_DIR="\"$(uidir)\"" \ | ||
1419 | 13 | -DGNOMELOCALEDIR="\"$(datadir)/locale\"" \ | ||
1420 | 14 | -DGNOMECC_DATA_DIR="\"$(pkgdatadir)\"" \ | ||
1421 | 15 | -DDATADIR="\"$(datadir)\"" \ | ||
1422 | 16 | -DLIBEXECDIR="\"$(libexecdir)\"" \ | ||
1423 | 17 | $(NULL) | ||
1424 | 18 | |||
1425 | 19 | ccpanelsdir = $(PANELS_DIR) | ||
1426 | 20 | ccpanels_LTLIBRARIES = libsharing.la | ||
1427 | 21 | |||
1428 | 22 | BUILT_SOURCES = \ | ||
1429 | 23 | cc-sharing-resources.c \ | ||
1430 | 24 | cc-sharing-resources.h \ | ||
1431 | 25 | $(dbus_built_sources) \ | ||
1432 | 26 | $(NULL) | ||
1433 | 27 | |||
1434 | 28 | libsharing_la_SOURCES = \ | ||
1435 | 29 | $(BUILT_SOURCES) \ | ||
1436 | 30 | cc-sharing-panel.c \ | ||
1437 | 31 | cc-sharing-panel.h \ | ||
1438 | 32 | cc-remote-login.c \ | ||
1439 | 33 | cc-remote-login.h \ | ||
1440 | 34 | cc-media-sharing.c \ | ||
1441 | 35 | cc-media-sharing.h \ | ||
1442 | 36 | vino-preferences.c \ | ||
1443 | 37 | vino-preferences.h \ | ||
1444 | 38 | file-share-properties.c \ | ||
1445 | 39 | file-share-properties.h \ | ||
1446 | 40 | cc-sharing-networks.c \ | ||
1447 | 41 | cc-sharing-networks.h \ | ||
1448 | 42 | cc-sharing-switch.c \ | ||
1449 | 43 | cc-sharing-switch.h \ | ||
1450 | 44 | gsd-sharing-enums.h \ | ||
1451 | 45 | sharing-module.c \ | ||
1452 | 46 | $(NULL) | ||
1453 | 47 | |||
1454 | 48 | |||
1455 | 49 | resource_files = $(shell glib-compile-resources --generate-dependencies $(srcdir)/sharing.gresource.xml) | ||
1456 | 50 | cc-sharing-resources.c: sharing.gresource.xml $(resource_files) | ||
1457 | 51 | $(AM_V_GEN) glib-compile-resources --target=$@ --sourcedir=$(srcdir) --generate-source --c-name cc_sharing $< | ||
1458 | 52 | cc-sharing-resources.h: sharing.gresource.xml $(resource_files) | ||
1459 | 53 | $(AM_V_GEN) glib-compile-resources --target=$@ --sourcedir=$(srcdir) --generate-header --c-name cc_sharing $< | ||
1460 | 54 | |||
1461 | 55 | $(dbus_built_sources) : Makefile.am org.gnome.SettingsDaemon.Sharing.xml | ||
1462 | 56 | $(AM_V_GEN) gdbus-codegen \ | ||
1463 | 57 | --interface-prefix org.gnome.SettingsDaemon. \ | ||
1464 | 58 | --c-namespace Gsd \ | ||
1465 | 59 | --generate-c-code org.gnome.SettingsDaemon.Sharing \ | ||
1466 | 60 | $(srcdir)/org.gnome.SettingsDaemon.Sharing.xml | ||
1467 | 61 | |||
1468 | 62 | libsharing_la_LIBADD = $(PANEL_LIBS) $(SHARING_PANEL_LIBS) | ||
1469 | 63 | libsharing_la_LDFLAGS = $(PANEL_LDFLAGS) | ||
1470 | 64 | |||
1471 | 65 | libexec_PROGRAMS = cc-remote-login-helper | ||
1472 | 66 | |||
1473 | 67 | cc_remote_login_helper_SOURCES = cc-remote-login-helper.c | ||
1474 | 68 | cc_remote_login_helper_LDADD = $(REMOTE_LOGIN_HELPER_LIBS) | ||
1475 | 69 | cc_remote_login_helper_CFLAGS = $(REMOTE_LOGIN_HELPER_CFLAGS) | ||
1476 | 70 | |||
1477 | 71 | com.canonical.controlcenter.remote-login-helper.policy.in: com.canonical.controlcenter.remote-login-helper.policy.in.in Makefile | ||
1478 | 72 | $(AM_V_GEN) sed -e "s|\@libexecdir\@|$(libexecdir)|" $< > $@ | ||
1479 | 73 | |||
1480 | 74 | @INTLTOOL_POLICY_RULE@ | ||
1481 | 75 | polkit_policydir = $(datadir)/polkit-1/actions | ||
1482 | 76 | polkit_policy_in_files = com.canonical.controlcenter.remote-login-helper.policy.in | ||
1483 | 77 | polkit_policy_DATA = $(polkit_policy_in_files:.policy.in=.policy) | ||
1484 | 78 | |||
1485 | 79 | |||
1486 | 80 | @INTLTOOL_DESKTOP_RULE@ | ||
1487 | 81 | desktopdir = $(datadir)/applications | ||
1488 | 82 | desktop_in_files = unity-sharing-panel.desktop.in | ||
1489 | 83 | desktop_DATA = $(desktop_in_files:.desktop.in=.desktop) | ||
1490 | 84 | |||
1491 | 85 | CLEANFILES = $(desktop_in_files) $(desktop_DATA) $(polkit_policy_DATA) $(polkit_policy_in_files) $(BUILT_SOURCES) | ||
1492 | 86 | EXTRA_DIST = $(resource_files) sharing.gresource.xml com.canonical.controlcenter.remote-login-helper.policy.in.in org.gnome.SettingsDaemon.Sharing.xml | ||
1493 | 87 | |||
1494 | 88 | -include $(top_srcdir)/git.mk | ||
1495 | 0 | 89 | ||
1496 | === added file 'panels/sharing/cc-media-sharing.c' | |||
1497 | --- panels/sharing/cc-media-sharing.c 1970-01-01 00:00:00 +0000 | |||
1498 | +++ panels/sharing/cc-media-sharing.c 2018-11-21 12:36:03 +0000 | |||
1499 | @@ -0,0 +1,153 @@ | |||
1500 | 1 | /* | ||
1501 | 2 | * Copyright (C) 2013 Intel, Inc | ||
1502 | 3 | * | ||
1503 | 4 | * This program is free software; you can redistribute it and/or modify | ||
1504 | 5 | * it under the terms of the GNU General Public License as published by | ||
1505 | 6 | * the Free Software Foundation; either version 2 of the License, or | ||
1506 | 7 | * (at your option) any later version. | ||
1507 | 8 | * | ||
1508 | 9 | * This program is distributed in the hope that it will be useful, | ||
1509 | 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
1510 | 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
1511 | 12 | * GNU General Public License for more details. | ||
1512 | 13 | * | ||
1513 | 14 | * You should have received a copy of the GNU General Public License | ||
1514 | 15 | * along with this program; if not, write to the Free Software | ||
1515 | 16 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. | ||
1516 | 17 | * | ||
1517 | 18 | * Author: Thomas Wood <thomas.wood@intel.com> | ||
1518 | 19 | * | ||
1519 | 20 | */ | ||
1520 | 21 | |||
1521 | 22 | #include "cc-media-sharing.h" | ||
1522 | 23 | |||
1523 | 24 | #include <gio/gio.h> | ||
1524 | 25 | #include <gio/gdesktopappinfo.h> | ||
1525 | 26 | #include <glib/gstdio.h> | ||
1526 | 27 | |||
1527 | 28 | static GKeyFile* | ||
1528 | 29 | cc_media_sharing_open_key_file (void) | ||
1529 | 30 | { | ||
1530 | 31 | gchar *path; | ||
1531 | 32 | GKeyFile *file; | ||
1532 | 33 | |||
1533 | 34 | file = g_key_file_new (); | ||
1534 | 35 | |||
1535 | 36 | path = g_build_filename (g_get_user_config_dir (), "rygel.conf", NULL); | ||
1536 | 37 | |||
1537 | 38 | if (!g_key_file_load_from_file (file, path, | ||
1538 | 39 | G_KEY_FILE_KEEP_COMMENTS | G_KEY_FILE_KEEP_TRANSLATIONS, | ||
1539 | 40 | NULL)) | ||
1540 | 41 | { | ||
1541 | 42 | g_free (path); | ||
1542 | 43 | path = g_build_filename (SYSCONFDIR, "rygel.conf", NULL); | ||
1543 | 44 | g_key_file_load_from_file (file, path, | ||
1544 | 45 | G_KEY_FILE_KEEP_COMMENTS | G_KEY_FILE_KEEP_TRANSLATIONS, | ||
1545 | 46 | NULL); | ||
1546 | 47 | } | ||
1547 | 48 | |||
1548 | 49 | g_free (path); | ||
1549 | 50 | |||
1550 | 51 | return file; | ||
1551 | 52 | } | ||
1552 | 53 | |||
1553 | 54 | void | ||
1554 | 55 | cc_media_sharing_get_preferences (gchar ***folders) | ||
1555 | 56 | { | ||
1556 | 57 | GKeyFile *file; | ||
1557 | 58 | |||
1558 | 59 | file = cc_media_sharing_open_key_file (); | ||
1559 | 60 | |||
1560 | 61 | if (folders) | ||
1561 | 62 | { | ||
1562 | 63 | gsize length; | ||
1563 | 64 | GPtrArray *array; | ||
1564 | 65 | char **str_list, **orig_list; | ||
1565 | 66 | |||
1566 | 67 | str_list = g_key_file_get_string_list (file, "MediaExport", "uris", | ||
1567 | 68 | &length, NULL); | ||
1568 | 69 | orig_list = str_list; | ||
1569 | 70 | array = g_ptr_array_new (); | ||
1570 | 71 | |||
1571 | 72 | while (str_list && *str_list) | ||
1572 | 73 | { | ||
1573 | 74 | const char *dir; | ||
1574 | 75 | |||
1575 | 76 | if (g_str_equal (*str_list, "@MUSIC@")) | ||
1576 | 77 | dir = g_get_user_special_dir (G_USER_DIRECTORY_MUSIC); | ||
1577 | 78 | else if (g_str_equal (*str_list, "@VIDEOS@")) | ||
1578 | 79 | dir = g_get_user_special_dir (G_USER_DIRECTORY_VIDEOS); | ||
1579 | 80 | else if (g_str_equal (*str_list, "@PICTURES@")) | ||
1580 | 81 | dir = g_get_user_special_dir (G_USER_DIRECTORY_PICTURES); | ||
1581 | 82 | else | ||
1582 | 83 | dir = g_strdup (*str_list); | ||
1583 | 84 | |||
1584 | 85 | if (dir != NULL) | ||
1585 | 86 | g_ptr_array_add (array, g_strdup (dir)); | ||
1586 | 87 | |||
1587 | 88 | str_list++; | ||
1588 | 89 | } | ||
1589 | 90 | |||
1590 | 91 | g_ptr_array_add (array, NULL); | ||
1591 | 92 | |||
1592 | 93 | *folders = (char **) g_ptr_array_free (array, FALSE); | ||
1593 | 94 | g_strfreev (orig_list); | ||
1594 | 95 | } | ||
1595 | 96 | |||
1596 | 97 | g_key_file_free (file); | ||
1597 | 98 | } | ||
1598 | 99 | |||
1599 | 100 | void | ||
1600 | 101 | cc_media_sharing_set_preferences (gchar **folders) | ||
1601 | 102 | { | ||
1602 | 103 | GKeyFile *file; | ||
1603 | 104 | gchar **str_list; | ||
1604 | 105 | gchar *path; | ||
1605 | 106 | gsize length; | ||
1606 | 107 | gchar *data; | ||
1607 | 108 | |||
1608 | 109 | file = cc_media_sharing_open_key_file (); | ||
1609 | 110 | |||
1610 | 111 | g_key_file_set_boolean (file, "general", "upnp-enabled", TRUE); | ||
1611 | 112 | g_key_file_set_boolean (file, "Tracker", "enabled", FALSE); | ||
1612 | 113 | g_key_file_set_boolean (file, "MediaExport", "enabled", TRUE); | ||
1613 | 114 | |||
1614 | 115 | str_list = folders; | ||
1615 | 116 | length = 0; | ||
1616 | 117 | |||
1617 | 118 | while (str_list && *str_list) | ||
1618 | 119 | { | ||
1619 | 120 | if (g_strcmp0 (*str_list, g_get_user_special_dir (G_USER_DIRECTORY_MUSIC)) == 0) | ||
1620 | 121 | { | ||
1621 | 122 | g_free (*str_list); | ||
1622 | 123 | *str_list = g_strdup ("@MUSIC@"); | ||
1623 | 124 | } | ||
1624 | 125 | |||
1625 | 126 | if (g_strcmp0 (*str_list, g_get_user_special_dir (G_USER_DIRECTORY_VIDEOS)) == 0) | ||
1626 | 127 | { | ||
1627 | 128 | g_free (*str_list); | ||
1628 | 129 | *str_list = g_strdup ("@VIDEOS@"); | ||
1629 | 130 | } | ||
1630 | 131 | |||
1631 | 132 | if (g_strcmp0 (*str_list, g_get_user_special_dir (G_USER_DIRECTORY_PICTURES)) == 0) | ||
1632 | 133 | { | ||
1633 | 134 | g_free (*str_list); | ||
1634 | 135 | *str_list = g_strdup ("@PICTURES@"); | ||
1635 | 136 | } | ||
1636 | 137 | |||
1637 | 138 | str_list++; | ||
1638 | 139 | length++; | ||
1639 | 140 | } | ||
1640 | 141 | |||
1641 | 142 | g_key_file_set_string_list (file, "MediaExport", "uris", (const gchar**) folders, length); | ||
1642 | 143 | |||
1643 | 144 | data = g_key_file_to_data (file, NULL, NULL); | ||
1644 | 145 | |||
1645 | 146 | path = g_build_filename (g_get_user_config_dir (), "rygel.conf", NULL); | ||
1646 | 147 | |||
1647 | 148 | g_file_set_contents (path, data, -1, NULL); | ||
1648 | 149 | |||
1649 | 150 | g_free (path); | ||
1650 | 151 | |||
1651 | 152 | g_key_file_free (file); | ||
1652 | 153 | } | ||
1653 | 0 | 154 | ||
1654 | === added file 'panels/sharing/cc-media-sharing.h' | |||
1655 | --- panels/sharing/cc-media-sharing.h 1970-01-01 00:00:00 +0000 | |||
1656 | +++ panels/sharing/cc-media-sharing.h 2018-11-21 12:36:03 +0000 | |||
1657 | @@ -0,0 +1,30 @@ | |||
1658 | 1 | /* | ||
1659 | 2 | * Copyright (C) 2013 Intel, Inc | ||
1660 | 3 | * | ||
1661 | 4 | * This program is free software; you can redistribute it and/or modify | ||
1662 | 5 | * it under the terms of the GNU General Public License as published by | ||
1663 | 6 | * the Free Software Foundation; either version 2 of the License, or | ||
1664 | 7 | * (at your option) any later version. | ||
1665 | 8 | * | ||
1666 | 9 | * This program is distributed in the hope that it will be useful, | ||
1667 | 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
1668 | 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
1669 | 12 | * GNU General Public License for more details. | ||
1670 | 13 | * | ||
1671 | 14 | * You should have received a copy of the GNU General Public License | ||
1672 | 15 | * along with this program; if not, write to the Free Software | ||
1673 | 16 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. | ||
1674 | 17 | * | ||
1675 | 18 | * Author: Thomas Wood <thomas.wood@intel.com> | ||
1676 | 19 | * | ||
1677 | 20 | */ | ||
1678 | 21 | |||
1679 | 22 | #ifndef __CC_MEDIA_SHARING_H__ | ||
1680 | 23 | #define __CC_MEDIA_SHARING_H__ | ||
1681 | 24 | |||
1682 | 25 | #include <glib.h> | ||
1683 | 26 | |||
1684 | 27 | void cc_media_sharing_get_preferences (gchar ***folders); | ||
1685 | 28 | void cc_media_sharing_set_preferences (gchar **folders); | ||
1686 | 29 | |||
1687 | 30 | #endif /* __CC_MEDIA_SHARING_H__ */ | ||
1688 | 0 | 31 | ||
1689 | === added file 'panels/sharing/cc-remote-login-helper.c' | |||
1690 | --- panels/sharing/cc-remote-login-helper.c 1970-01-01 00:00:00 +0000 | |||
1691 | +++ panels/sharing/cc-remote-login-helper.c 2018-11-21 12:36:03 +0000 | |||
1692 | @@ -0,0 +1,170 @@ | |||
1693 | 1 | /* | ||
1694 | 2 | * Copyright (C) 2013 Intel, Inc | ||
1695 | 3 | * | ||
1696 | 4 | * This program is free software; you can redistribute it and/or modify | ||
1697 | 5 | * it under the terms of the GNU General Public License as published by | ||
1698 | 6 | * the Free Software Foundation; either version 2 of the License, or | ||
1699 | 7 | * (at your option) any later version. | ||
1700 | 8 | * | ||
1701 | 9 | * This program is distributed in the hope that it will be useful, | ||
1702 | 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
1703 | 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
1704 | 12 | * GNU General Public License for more details. | ||
1705 | 13 | * | ||
1706 | 14 | * You should have received a copy of the GNU General Public License | ||
1707 | 15 | * along with this program; if not, write to the Free Software | ||
1708 | 16 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. | ||
1709 | 17 | * | ||
1710 | 18 | * Author: Thomas Wood <thomas.wood@intel.com> | ||
1711 | 19 | * | ||
1712 | 20 | */ | ||
1713 | 21 | |||
1714 | 22 | #include <gio/gio.h> | ||
1715 | 23 | |||
1716 | 24 | #ifndef SSHD_SERVICE | ||
1717 | 25 | #define SSHD_SERVICE "sshd.service" | ||
1718 | 26 | #endif | ||
1719 | 27 | |||
1720 | 28 | static const gchar *service_list[] = { SSHD_SERVICE, NULL }; | ||
1721 | 29 | |||
1722 | 30 | static gint | ||
1723 | 31 | enable_ssh_service () | ||
1724 | 32 | { | ||
1725 | 33 | GDBusConnection *connection; | ||
1726 | 34 | GError *error = NULL; | ||
1727 | 35 | GVariant *temp_variant; | ||
1728 | 36 | |||
1729 | 37 | connection = g_bus_get_sync (G_BUS_TYPE_SYSTEM, NULL, &error); | ||
1730 | 38 | if (!connection) | ||
1731 | 39 | { | ||
1732 | 40 | g_critical ("Error connecting to D-Bus system bus: %s", error->message); | ||
1733 | 41 | g_clear_error (&error); | ||
1734 | 42 | return 1; | ||
1735 | 43 | } | ||
1736 | 44 | |||
1737 | 45 | temp_variant = g_dbus_connection_call_sync (connection, | ||
1738 | 46 | "org.freedesktop.systemd1", | ||
1739 | 47 | "/org/freedesktop/systemd1", | ||
1740 | 48 | "org.freedesktop.systemd1.Manager", | ||
1741 | 49 | "StartUnit", | ||
1742 | 50 | g_variant_new ("(ss)", | ||
1743 | 51 | SSHD_SERVICE, | ||
1744 | 52 | "replace"), | ||
1745 | 53 | (GVariantType *) "(o)", | ||
1746 | 54 | G_DBUS_CALL_FLAGS_NONE, | ||
1747 | 55 | -1, | ||
1748 | 56 | NULL, | ||
1749 | 57 | &error); | ||
1750 | 58 | |||
1751 | 59 | if (!temp_variant) | ||
1752 | 60 | { | ||
1753 | 61 | g_critical ("Error starting " SSHD_SERVICE ": %s", error->message); | ||
1754 | 62 | g_clear_error (&error); | ||
1755 | 63 | return 1; | ||
1756 | 64 | } | ||
1757 | 65 | |||
1758 | 66 | g_variant_unref (temp_variant); | ||
1759 | 67 | |||
1760 | 68 | temp_variant = g_dbus_connection_call_sync (connection, | ||
1761 | 69 | "org.freedesktop.systemd1", | ||
1762 | 70 | "/org/freedesktop/systemd1", | ||
1763 | 71 | "org.freedesktop.systemd1.Manager", | ||
1764 | 72 | "EnableUnitFiles", | ||
1765 | 73 | g_variant_new ("(^asbb)", | ||
1766 | 74 | service_list, | ||
1767 | 75 | FALSE, FALSE), | ||
1768 | 76 | (GVariantType *) "(ba(sss))", | ||
1769 | 77 | G_DBUS_CALL_FLAGS_NONE, | ||
1770 | 78 | -1, | ||
1771 | 79 | NULL, | ||
1772 | 80 | &error); | ||
1773 | 81 | |||
1774 | 82 | if (!temp_variant) | ||
1775 | 83 | { | ||
1776 | 84 | g_critical ("Error enabling " SSHD_SERVICE ": %s", error->message); | ||
1777 | 85 | g_clear_error (&error); | ||
1778 | 86 | return 1; | ||
1779 | 87 | } | ||
1780 | 88 | |||
1781 | 89 | g_variant_unref (temp_variant); | ||
1782 | 90 | |||
1783 | 91 | return 0; | ||
1784 | 92 | } | ||
1785 | 93 | |||
1786 | 94 | static gint | ||
1787 | 95 | disable_ssh_service () | ||
1788 | 96 | { | ||
1789 | 97 | GDBusConnection *connection; | ||
1790 | 98 | GError *error = NULL; | ||
1791 | 99 | GVariant *temp_variant; | ||
1792 | 100 | |||
1793 | 101 | connection = g_bus_get_sync (G_BUS_TYPE_SYSTEM, NULL, &error); | ||
1794 | 102 | if (!connection) | ||
1795 | 103 | { | ||
1796 | 104 | g_critical ("Error connecting to D-Bus system bus: %s", error->message); | ||
1797 | 105 | g_clear_error (&error); | ||
1798 | 106 | return 1; | ||
1799 | 107 | } | ||
1800 | 108 | |||
1801 | 109 | temp_variant = g_dbus_connection_call_sync (connection, | ||
1802 | 110 | "org.freedesktop.systemd1", | ||
1803 | 111 | "/org/freedesktop/systemd1", | ||
1804 | 112 | "org.freedesktop.systemd1.Manager", | ||
1805 | 113 | "StopUnit", | ||
1806 | 114 | g_variant_new ("(ss)", SSHD_SERVICE, "replace"), | ||
1807 | 115 | (GVariantType *) "(o)", | ||
1808 | 116 | G_DBUS_CALL_FLAGS_NONE, | ||
1809 | 117 | -1, | ||
1810 | 118 | NULL, | ||
1811 | 119 | &error); | ||
1812 | 120 | if (!temp_variant) | ||
1813 | 121 | { | ||
1814 | 122 | g_critical ("Error stopping " SSHD_SERVICE ": %s", error->message); | ||
1815 | 123 | g_clear_error (&error); | ||
1816 | 124 | return 1; | ||
1817 | 125 | } | ||
1818 | 126 | |||
1819 | 127 | g_variant_unref (temp_variant); | ||
1820 | 128 | |||
1821 | 129 | temp_variant = g_dbus_connection_call_sync (connection, | ||
1822 | 130 | "org.freedesktop.systemd1", | ||
1823 | 131 | "/org/freedesktop/systemd1", | ||
1824 | 132 | "org.freedesktop.systemd1.Manager", | ||
1825 | 133 | "DisableUnitFiles", | ||
1826 | 134 | g_variant_new ("(^asb)", service_list, FALSE, | ||
1827 | 135 | FALSE), | ||
1828 | 136 | (GVariantType *) "(a(sss))", | ||
1829 | 137 | G_DBUS_CALL_FLAGS_NONE, | ||
1830 | 138 | -1, | ||
1831 | 139 | NULL, | ||
1832 | 140 | &error); | ||
1833 | 141 | |||
1834 | 142 | if (!temp_variant) | ||
1835 | 143 | { | ||
1836 | 144 | g_critical ("Error disabling " SSHD_SERVICE ": %s", error->message); | ||
1837 | 145 | g_clear_error (&error); | ||
1838 | 146 | return 1; | ||
1839 | 147 | } | ||
1840 | 148 | |||
1841 | 149 | g_variant_unref (temp_variant); | ||
1842 | 150 | |||
1843 | 151 | return 0; | ||
1844 | 152 | } | ||
1845 | 153 | |||
1846 | 154 | int | ||
1847 | 155 | main (int argc, | ||
1848 | 156 | char **argv) | ||
1849 | 157 | { | ||
1850 | 158 | if (argc < 2) | ||
1851 | 159 | return 1; | ||
1852 | 160 | |||
1853 | 161 | if (argv[1] == NULL) | ||
1854 | 162 | return 1; | ||
1855 | 163 | |||
1856 | 164 | if (g_str_equal (argv[1], "enable")) | ||
1857 | 165 | return enable_ssh_service (); | ||
1858 | 166 | else if (g_str_equal (argv[1], "disable")) | ||
1859 | 167 | return disable_ssh_service (); | ||
1860 | 168 | |||
1861 | 169 | return 1; | ||
1862 | 170 | } | ||
1863 | 0 | 171 | ||
1864 | === added file 'panels/sharing/cc-remote-login.c' | |||
1865 | --- panels/sharing/cc-remote-login.c 1970-01-01 00:00:00 +0000 | |||
1866 | +++ panels/sharing/cc-remote-login.c 2018-11-21 12:36:03 +0000 | |||
1867 | @@ -0,0 +1,338 @@ | |||
1868 | 1 | /* | ||
1869 | 2 | * Copyright (C) 2013 Intel, Inc | ||
1870 | 3 | * | ||
1871 | 4 | * This program is free software; you can redistribute it and/or modify | ||
1872 | 5 | * it under the terms of the GNU General Public License as published by | ||
1873 | 6 | * the Free Software Foundation; either version 2 of the License, or | ||
1874 | 7 | * (at your option) any later version. | ||
1875 | 8 | * | ||
1876 | 9 | * This program is distributed in the hope that it will be useful, | ||
1877 | 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
1878 | 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
1879 | 12 | * GNU General Public License for more details. | ||
1880 | 13 | * | ||
1881 | 14 | * You should have received a copy of the GNU General Public License | ||
1882 | 15 | * along with this program; if not, write to the Free Software | ||
1883 | 16 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. | ||
1884 | 17 | * | ||
1885 | 18 | * Author: Thomas Wood <thomas.wood@intel.com> | ||
1886 | 19 | * | ||
1887 | 20 | */ | ||
1888 | 21 | #include "cc-remote-login.h" | ||
1889 | 22 | #include <gio/gio.h> | ||
1890 | 23 | |||
1891 | 24 | #ifndef SSHD_SERVICE | ||
1892 | 25 | #define SSHD_SERVICE "sshd.service" | ||
1893 | 26 | #endif | ||
1894 | 27 | |||
1895 | 28 | typedef struct | ||
1896 | 29 | { | ||
1897 | 30 | GtkSwitch *gtkswitch; | ||
1898 | 31 | GtkWidget *button; | ||
1899 | 32 | GCancellable *cancellable; | ||
1900 | 33 | } CallbackData; | ||
1901 | 34 | |||
1902 | 35 | static void | ||
1903 | 36 | set_switch_state (GtkSwitch *gtkswitch, | ||
1904 | 37 | gboolean active) | ||
1905 | 38 | { | ||
1906 | 39 | if (gtk_switch_get_active (gtkswitch) != active) | ||
1907 | 40 | { | ||
1908 | 41 | g_object_set_data (G_OBJECT (gtkswitch), "set-from-dbus", | ||
1909 | 42 | GINT_TO_POINTER (1)); | ||
1910 | 43 | gtk_switch_set_active (gtkswitch, active); | ||
1911 | 44 | } | ||
1912 | 45 | gtk_widget_set_sensitive (GTK_WIDGET (gtkswitch), TRUE); | ||
1913 | 46 | } | ||
1914 | 47 | |||
1915 | 48 | static void | ||
1916 | 49 | active_state_ready_callback (GObject *source_object, | ||
1917 | 50 | GAsyncResult *result, | ||
1918 | 51 | CallbackData *callback_data) | ||
1919 | 52 | { | ||
1920 | 53 | GVariant *active_variant, *child_variant, *tmp_variant; | ||
1921 | 54 | const gchar *active_state; | ||
1922 | 55 | gboolean active; | ||
1923 | 56 | GError *error = NULL; | ||
1924 | 57 | |||
1925 | 58 | active_variant = g_dbus_connection_call_finish (G_DBUS_CONNECTION (source_object), | ||
1926 | 59 | result, &error); | ||
1927 | 60 | |||
1928 | 61 | if (!active_variant) | ||
1929 | 62 | { | ||
1930 | 63 | /* print a warning if there was an error but the operation was not | ||
1931 | 64 | * cancelled */ | ||
1932 | 65 | if (!g_error_matches(error, G_IO_ERROR, G_IO_ERROR_CANCELLED)) | ||
1933 | 66 | g_warning ("Error getting remote login state: %s", error->message); | ||
1934 | 67 | |||
1935 | 68 | g_clear_error (&error); | ||
1936 | 69 | g_free (callback_data); | ||
1937 | 70 | |||
1938 | 71 | /* the switch will be remain insensitive, since the current state could | ||
1939 | 72 | * not be determined */ | ||
1940 | 73 | return; | ||
1941 | 74 | } | ||
1942 | 75 | |||
1943 | 76 | child_variant = g_variant_get_child_value (active_variant, 0); | ||
1944 | 77 | tmp_variant = g_variant_get_variant (child_variant); | ||
1945 | 78 | active_state = g_variant_get_string (tmp_variant, NULL); | ||
1946 | 79 | |||
1947 | 80 | active = g_str_equal (active_state, "active"); | ||
1948 | 81 | |||
1949 | 82 | g_variant_unref (tmp_variant); | ||
1950 | 83 | g_variant_unref (child_variant); | ||
1951 | 84 | g_variant_unref (active_variant); | ||
1952 | 85 | |||
1953 | 86 | /* set the switch to the correct state */ | ||
1954 | 87 | if (callback_data->gtkswitch) | ||
1955 | 88 | set_switch_state (callback_data->gtkswitch, active); | ||
1956 | 89 | |||
1957 | 90 | g_free (callback_data); | ||
1958 | 91 | } | ||
1959 | 92 | |||
1960 | 93 | static void | ||
1961 | 94 | path_ready_callback (GObject *source_object, | ||
1962 | 95 | GAsyncResult *result, | ||
1963 | 96 | CallbackData *callback_data) | ||
1964 | 97 | { | ||
1965 | 98 | GVariant *path_variant, *child_variant; | ||
1966 | 99 | const gchar *object_path; | ||
1967 | 100 | GError *error = NULL; | ||
1968 | 101 | |||
1969 | 102 | path_variant = g_dbus_connection_call_finish (G_DBUS_CONNECTION (source_object), | ||
1970 | 103 | result, &error); | ||
1971 | 104 | |||
1972 | 105 | if (!path_variant) | ||
1973 | 106 | { | ||
1974 | 107 | if (g_error_matches (error, G_IO_ERROR, G_IO_ERROR_CANCELLED)) | ||
1975 | 108 | { | ||
1976 | 109 | g_free (callback_data); | ||
1977 | 110 | g_clear_error (&error); | ||
1978 | 111 | |||
1979 | 112 | return; | ||
1980 | 113 | } | ||
1981 | 114 | |||
1982 | 115 | /* this may fail if systemd or remote login service is not available */ | ||
1983 | 116 | g_debug ("Error getting remote login state: %s", error->message); | ||
1984 | 117 | |||
1985 | 118 | g_clear_error (&error); | ||
1986 | 119 | |||
1987 | 120 | /* hide the remote login button, since the service is not available */ | ||
1988 | 121 | if (callback_data->button) | ||
1989 | 122 | gtk_widget_hide (callback_data->button); | ||
1990 | 123 | |||
1991 | 124 | g_free (callback_data); | ||
1992 | 125 | |||
1993 | 126 | return; | ||
1994 | 127 | } | ||
1995 | 128 | |||
1996 | 129 | child_variant = g_variant_get_child_value (path_variant, 0); | ||
1997 | 130 | object_path = g_variant_get_string (child_variant, NULL); | ||
1998 | 131 | |||
1999 | 132 | g_dbus_connection_call (G_DBUS_CONNECTION (source_object), | ||
2000 | 133 | "org.freedesktop.systemd1", | ||
2001 | 134 | object_path, | ||
2002 | 135 | "org.freedesktop.DBus.Properties", | ||
2003 | 136 | "Get", | ||
2004 | 137 | g_variant_new ("(ss)", | ||
2005 | 138 | "org.freedesktop.systemd1.Unit", | ||
2006 | 139 | "ActiveState"), | ||
2007 | 140 | (GVariantType*) "(v)", | ||
2008 | 141 | G_DBUS_CALL_FLAGS_NONE, | ||
2009 | 142 | -1, | ||
2010 | 143 | callback_data->cancellable, | ||
2011 | 144 | (GAsyncReadyCallback) active_state_ready_callback, | ||
2012 | 145 | callback_data); | ||
2013 | 146 | |||
2014 | 147 | g_variant_unref (child_variant); | ||
2015 | 148 | g_variant_unref (path_variant); | ||
2016 | 149 | } | ||
2017 | 150 | |||
2018 | 151 | static void | ||
2019 | 152 | state_ready_callback (GObject *source_object, | ||
2020 | 153 | GAsyncResult *result, | ||
2021 | 154 | CallbackData *callback_data) | ||
2022 | 155 | { | ||
2023 | 156 | GVariant *state_variant, *child_variant; | ||
2024 | 157 | const gchar *state_string; | ||
2025 | 158 | GError *error = NULL; | ||
2026 | 159 | |||
2027 | 160 | state_variant = g_dbus_connection_call_finish (G_DBUS_CONNECTION (source_object), | ||
2028 | 161 | result, &error); | ||
2029 | 162 | if (!state_variant) | ||
2030 | 163 | { | ||
2031 | 164 | if (g_error_matches (error, G_IO_ERROR, G_IO_ERROR_CANCELLED)) | ||
2032 | 165 | { | ||
2033 | 166 | g_free (callback_data); | ||
2034 | 167 | g_clear_error (&error); | ||
2035 | 168 | |||
2036 | 169 | return; | ||
2037 | 170 | } | ||
2038 | 171 | |||
2039 | 172 | /* this may fail if systemd or remote login service is not available */ | ||
2040 | 173 | g_debug ("Error getting remote login state: %s", error->message); | ||
2041 | 174 | |||
2042 | 175 | g_clear_error (&error); | ||
2043 | 176 | |||
2044 | 177 | /* hide the remote login button, since the service is not available */ | ||
2045 | 178 | if (callback_data->button) | ||
2046 | 179 | gtk_widget_hide (callback_data->button); | ||
2047 | 180 | |||
2048 | 181 | g_free (callback_data); | ||
2049 | 182 | |||
2050 | 183 | return; | ||
2051 | 184 | } | ||
2052 | 185 | |||
2053 | 186 | child_variant = g_variant_get_child_value (state_variant, 0); | ||
2054 | 187 | state_string = g_variant_get_string (child_variant, NULL); | ||
2055 | 188 | |||
2056 | 189 | if (g_str_equal (state_string, "enabled")) | ||
2057 | 190 | { | ||
2058 | 191 | /* service is enabled, so check whether it is running or not */ | ||
2059 | 192 | g_dbus_connection_call (G_DBUS_CONNECTION (source_object), | ||
2060 | 193 | "org.freedesktop.systemd1", | ||
2061 | 194 | "/org/freedesktop/systemd1", | ||
2062 | 195 | "org.freedesktop.systemd1.Manager", | ||
2063 | 196 | "GetUnit", | ||
2064 | 197 | g_variant_new ("(s)", SSHD_SERVICE), | ||
2065 | 198 | (GVariantType*) "(o)", | ||
2066 | 199 | G_DBUS_CALL_FLAGS_NONE, | ||
2067 | 200 | -1, | ||
2068 | 201 | callback_data->cancellable, | ||
2069 | 202 | (GAsyncReadyCallback) path_ready_callback, | ||
2070 | 203 | callback_data); | ||
2071 | 204 | } | ||
2072 | 205 | else if (g_str_equal (state_string, "disabled")) | ||
2073 | 206 | { | ||
2074 | 207 | /* service is available, but is currently disabled */ | ||
2075 | 208 | set_switch_state (callback_data->gtkswitch, FALSE); | ||
2076 | 209 | |||
2077 | 210 | g_free (callback_data); | ||
2078 | 211 | } | ||
2079 | 212 | else | ||
2080 | 213 | { | ||
2081 | 214 | /* unknown state */ | ||
2082 | 215 | g_warning ("Unknown state %s for %s", state_string, SSHD_SERVICE); | ||
2083 | 216 | |||
2084 | 217 | g_free (callback_data); | ||
2085 | 218 | } | ||
2086 | 219 | |||
2087 | 220 | g_variant_unref (child_variant); | ||
2088 | 221 | g_variant_unref (state_variant); | ||
2089 | 222 | } | ||
2090 | 223 | |||
2091 | 224 | static void | ||
2092 | 225 | bus_ready_callback (GObject *source_object, | ||
2093 | 226 | GAsyncResult *result, | ||
2094 | 227 | CallbackData *callback_data) | ||
2095 | 228 | { | ||
2096 | 229 | GDBusConnection *connection; | ||
2097 | 230 | GError *error = NULL; | ||
2098 | 231 | |||
2099 | 232 | connection = g_bus_get_finish (result, &error); | ||
2100 | 233 | |||
2101 | 234 | if (!connection) | ||
2102 | 235 | { | ||
2103 | 236 | if (!g_error_matches (error, G_IO_ERROR, G_IO_ERROR_CANCELLED)) | ||
2104 | 237 | g_warning ("Error getting remote login state: %s", error->message); | ||
2105 | 238 | g_clear_error (&error); | ||
2106 | 239 | g_free (callback_data); | ||
2107 | 240 | |||
2108 | 241 | return; | ||
2109 | 242 | } | ||
2110 | 243 | |||
2111 | 244 | g_dbus_connection_call (connection, | ||
2112 | 245 | "org.freedesktop.systemd1", | ||
2113 | 246 | "/org/freedesktop/systemd1", | ||
2114 | 247 | "org.freedesktop.systemd1.Manager", | ||
2115 | 248 | "GetUnitFileState", | ||
2116 | 249 | g_variant_new ("(s)", SSHD_SERVICE), | ||
2117 | 250 | (GVariantType*) "(s)", | ||
2118 | 251 | G_DBUS_CALL_FLAGS_NONE, | ||
2119 | 252 | -1, | ||
2120 | 253 | callback_data->cancellable, | ||
2121 | 254 | (GAsyncReadyCallback) state_ready_callback, | ||
2122 | 255 | callback_data); | ||
2123 | 256 | } | ||
2124 | 257 | |||
2125 | 258 | void | ||
2126 | 259 | cc_remote_login_get_enabled (GCancellable *cancellable, | ||
2127 | 260 | GtkSwitch *gtkswitch, | ||
2128 | 261 | GtkWidget *button) | ||
2129 | 262 | { | ||
2130 | 263 | CallbackData *callback_data; | ||
2131 | 264 | |||
2132 | 265 | /* disable the switch until the current state is known */ | ||
2133 | 266 | gtk_widget_set_sensitive (GTK_WIDGET (gtkswitch), FALSE); | ||
2134 | 267 | |||
2135 | 268 | callback_data = g_new (CallbackData, 1); | ||
2136 | 269 | callback_data->gtkswitch = gtkswitch; | ||
2137 | 270 | callback_data->button = button; | ||
2138 | 271 | callback_data->cancellable = cancellable; | ||
2139 | 272 | |||
2140 | 273 | g_bus_get (G_BUS_TYPE_SYSTEM, callback_data->cancellable, | ||
2141 | 274 | (GAsyncReadyCallback) bus_ready_callback, callback_data); | ||
2142 | 275 | } | ||
2143 | 276 | |||
2144 | 277 | static gint std_err; | ||
2145 | 278 | |||
2146 | 279 | static void | ||
2147 | 280 | child_watch_func (GPid pid, | ||
2148 | 281 | gint status, | ||
2149 | 282 | gpointer user_data) | ||
2150 | 283 | { | ||
2151 | 284 | CallbackData *callback_data = user_data; | ||
2152 | 285 | if (status != 0) | ||
2153 | 286 | { | ||
2154 | 287 | g_warning ("Error enabling or disabling remote login service"); | ||
2155 | 288 | |||
2156 | 289 | /* make sure the switch reflects the current status */ | ||
2157 | 290 | cc_remote_login_get_enabled (callback_data->cancellable, callback_data->gtkswitch, NULL); | ||
2158 | 291 | } | ||
2159 | 292 | g_spawn_close_pid (pid); | ||
2160 | 293 | |||
2161 | 294 | gtk_widget_set_sensitive (GTK_WIDGET (callback_data->gtkswitch), TRUE); | ||
2162 | 295 | |||
2163 | 296 | g_free (user_data); | ||
2164 | 297 | } | ||
2165 | 298 | |||
2166 | 299 | void | ||
2167 | 300 | cc_remote_login_set_enabled (GCancellable *cancellable, | ||
2168 | 301 | GtkSwitch *gtkswitch) | ||
2169 | 302 | { | ||
2170 | 303 | gchar *command[] = { "pkexec", LIBEXECDIR "/cc-remote-login-helper", NULL, | ||
2171 | 304 | NULL }; | ||
2172 | 305 | GError *error = NULL; | ||
2173 | 306 | GPid pid; | ||
2174 | 307 | CallbackData *callback_data; | ||
2175 | 308 | |||
2176 | 309 | |||
2177 | 310 | if (GPOINTER_TO_INT (g_object_get_data (G_OBJECT (gtkswitch), "set-from-dbus")) == 1) | ||
2178 | 311 | { | ||
2179 | 312 | g_object_set_data (G_OBJECT (gtkswitch), "set-from-dbus", NULL); | ||
2180 | 313 | return; | ||
2181 | 314 | } | ||
2182 | 315 | |||
2183 | 316 | if (gtk_switch_get_active (gtkswitch)) | ||
2184 | 317 | command[2] = "enable"; | ||
2185 | 318 | else | ||
2186 | 319 | command[2] = "disable"; | ||
2187 | 320 | |||
2188 | 321 | gtk_widget_set_sensitive (GTK_WIDGET (gtkswitch), FALSE); | ||
2189 | 322 | |||
2190 | 323 | g_spawn_async_with_pipes (NULL, command, NULL, | ||
2191 | 324 | G_SPAWN_SEARCH_PATH | G_SPAWN_DO_NOT_REAP_CHILD, NULL, | ||
2192 | 325 | NULL, &pid, NULL, NULL, &std_err, &error); | ||
2193 | 326 | |||
2194 | 327 | callback_data = g_new0 (CallbackData, 1); | ||
2195 | 328 | callback_data->gtkswitch = gtkswitch; | ||
2196 | 329 | callback_data->cancellable = cancellable; | ||
2197 | 330 | |||
2198 | 331 | g_child_watch_add (pid, child_watch_func, callback_data); | ||
2199 | 332 | |||
2200 | 333 | if (error) | ||
2201 | 334 | { | ||
2202 | 335 | g_error ("Error running cc-remote-login-helper: %s", error->message); | ||
2203 | 336 | g_clear_error (&error); | ||
2204 | 337 | } | ||
2205 | 338 | } | ||
2206 | 0 | 339 | ||
2207 | === added file 'panels/sharing/cc-remote-login.h' | |||
2208 | --- panels/sharing/cc-remote-login.h 1970-01-01 00:00:00 +0000 | |||
2209 | +++ panels/sharing/cc-remote-login.h 2018-11-21 12:36:03 +0000 | |||
2210 | @@ -0,0 +1,33 @@ | |||
2211 | 1 | /* | ||
2212 | 2 | * Copyright (C) 2013 Intel, Inc | ||
2213 | 3 | * | ||
2214 | 4 | * This program is free software; you can redistribute it and/or modify | ||
2215 | 5 | * it under the terms of the GNU General Public License as published by | ||
2216 | 6 | * the Free Software Foundation; either version 2 of the License, or | ||
2217 | 7 | * (at your option) any later version. | ||
2218 | 8 | * | ||
2219 | 9 | * This program is distributed in the hope that it will be useful, | ||
2220 | 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
2221 | 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
2222 | 12 | * GNU General Public License for more details. | ||
2223 | 13 | * | ||
2224 | 14 | * You should have received a copy of the GNU General Public License | ||
2225 | 15 | * along with this program; if not, write to the Free Software | ||
2226 | 16 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. | ||
2227 | 17 | * | ||
2228 | 18 | * Author: Thomas Wood <thomas.wood@intel.com> | ||
2229 | 19 | * | ||
2230 | 20 | */ | ||
2231 | 21 | |||
2232 | 22 | #ifndef __CC_REMOTE_LOGIN_H__ | ||
2233 | 23 | #define __CC_REMOTE_LOGIN_H__ | ||
2234 | 24 | |||
2235 | 25 | #include <gtk/gtk.h> | ||
2236 | 26 | |||
2237 | 27 | void cc_remote_login_get_enabled (GCancellable *cancellable, | ||
2238 | 28 | GtkSwitch *gtkswitch, | ||
2239 | 29 | GtkWidget *button); | ||
2240 | 30 | void cc_remote_login_set_enabled (GCancellable *cancellable, | ||
2241 | 31 | GtkSwitch *gtkswitch); | ||
2242 | 32 | |||
2243 | 33 | #endif /* __CC_REMOTE_LOGIN_H__ **/ | ||
2244 | 0 | 34 | ||
2245 | === added file 'panels/sharing/cc-sharing-networks.c' | |||
2246 | --- panels/sharing/cc-sharing-networks.c 1970-01-01 00:00:00 +0000 | |||
2247 | +++ panels/sharing/cc-sharing-networks.c 2018-11-21 12:36:03 +0000 | |||
2248 | @@ -0,0 +1,567 @@ | |||
2249 | 1 | /* | ||
2250 | 2 | * Copyright (C) 2014 Bastien Nocera <hadess@hadess.net> | ||
2251 | 3 | * | ||
2252 | 4 | * This program is free software; you can redistribute it and/or modify | ||
2253 | 5 | * it under the terms of the GNU General Public License as published by | ||
2254 | 6 | * the Free Software Foundation; either version 2 of the License, or | ||
2255 | 7 | * (at your option) any later version. | ||
2256 | 8 | * | ||
2257 | 9 | * This program is distributed in the hope that it will be useful, | ||
2258 | 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
2259 | 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
2260 | 12 | * GNU General Public License for more details. | ||
2261 | 13 | * | ||
2262 | 14 | * You should have received a copy of the GNU General Public License | ||
2263 | 15 | * along with this program; if not, write to the Free Software | ||
2264 | 16 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. | ||
2265 | 17 | * | ||
2266 | 18 | */ | ||
2267 | 19 | |||
2268 | 20 | #include "config.h" | ||
2269 | 21 | |||
2270 | 22 | #include <gtk/gtk.h> | ||
2271 | 23 | #include <gio/gio.h> | ||
2272 | 24 | #include <glib/gi18n.h> | ||
2273 | 25 | |||
2274 | 26 | #include "cc-sharing-networks.h" | ||
2275 | 27 | #include "org.gnome.SettingsDaemon.Sharing.h" | ||
2276 | 28 | #include "gsd-sharing-enums.h" | ||
2277 | 29 | #include "shell/list-box-helper.h" | ||
2278 | 30 | |||
2279 | 31 | struct _CcSharingNetworksPrivate { | ||
2280 | 32 | GtkWidget *listbox; | ||
2281 | 33 | |||
2282 | 34 | GtkWidget *current_row; | ||
2283 | 35 | GtkWidget *current_label; | ||
2284 | 36 | GtkWidget *current_icon; | ||
2285 | 37 | GtkWidget *current_switch; | ||
2286 | 38 | |||
2287 | 39 | GtkWidget *no_network_row; | ||
2288 | 40 | |||
2289 | 41 | char *service_name; | ||
2290 | 42 | GsdSharing *proxy; | ||
2291 | 43 | CcSharingStatus status; | ||
2292 | 44 | |||
2293 | 45 | GList *networks; /* list of CcSharingNetwork */ | ||
2294 | 46 | }; | ||
2295 | 47 | |||
2296 | 48 | |||
2297 | 49 | G_DEFINE_TYPE_WITH_CODE (CcSharingNetworks, cc_sharing_networks, GTK_TYPE_GRID, | ||
2298 | 50 | G_ADD_PRIVATE (CcSharingNetworks)) | ||
2299 | 51 | |||
2300 | 52 | enum { | ||
2301 | 53 | PROP_0, | ||
2302 | 54 | PROP_PROXY, | ||
2303 | 55 | PROP_SERVICE_NAME, | ||
2304 | 56 | PROP_STATUS | ||
2305 | 57 | }; | ||
2306 | 58 | |||
2307 | 59 | static void cc_sharing_networks_class_init (CcSharingNetworksClass *klass); | ||
2308 | 60 | static void cc_sharing_networks_init (CcSharingNetworks *self); | ||
2309 | 61 | static void cc_sharing_networks_finalize (GObject *object); | ||
2310 | 62 | |||
2311 | 63 | static void cc_sharing_update_networks_box (CcSharingNetworks *self); | ||
2312 | 64 | |||
2313 | 65 | typedef struct { | ||
2314 | 66 | char *uuid; | ||
2315 | 67 | char *network_name; | ||
2316 | 68 | char *carrier_type; | ||
2317 | 69 | } CcSharingNetwork; | ||
2318 | 70 | |||
2319 | 71 | static void | ||
2320 | 72 | cc_sharing_network_free (gpointer data) | ||
2321 | 73 | { | ||
2322 | 74 | CcSharingNetwork *net = data; | ||
2323 | 75 | |||
2324 | 76 | g_free (net->uuid); | ||
2325 | 77 | g_free (net->network_name); | ||
2326 | 78 | g_free (net->carrier_type); | ||
2327 | 79 | g_free (net); | ||
2328 | 80 | } | ||
2329 | 81 | |||
2330 | 82 | static void | ||
2331 | 83 | cc_sharing_networks_update_status (CcSharingNetworks *self) | ||
2332 | 84 | { | ||
2333 | 85 | CcSharingStatus status; | ||
2334 | 86 | |||
2335 | 87 | if (self->priv->networks == NULL) | ||
2336 | 88 | status = CC_SHARING_STATUS_OFF; | ||
2337 | 89 | else if (gtk_widget_is_visible (self->priv->current_switch) && | ||
2338 | 90 | gtk_switch_get_active (GTK_SWITCH (self->priv->current_switch))) | ||
2339 | 91 | status = CC_SHARING_STATUS_ACTIVE; | ||
2340 | 92 | else | ||
2341 | 93 | status = CC_SHARING_STATUS_ENABLED; | ||
2342 | 94 | |||
2343 | 95 | if (status != self->priv->status) { | ||
2344 | 96 | self->priv->status = status; | ||
2345 | 97 | g_object_notify (G_OBJECT (self), "status"); | ||
2346 | 98 | } | ||
2347 | 99 | } | ||
2348 | 100 | |||
2349 | 101 | static void | ||
2350 | 102 | cc_sharing_update_networks (CcSharingNetworks *self) | ||
2351 | 103 | { | ||
2352 | 104 | GVariant *networks; | ||
2353 | 105 | char *uuid, *network_name, *carrier_type; | ||
2354 | 106 | GVariantIter iter; | ||
2355 | 107 | GError *error = NULL; | ||
2356 | 108 | |||
2357 | 109 | g_list_free_full (self->priv->networks, cc_sharing_network_free); | ||
2358 | 110 | self->priv->networks = NULL; | ||
2359 | 111 | |||
2360 | 112 | if (!gsd_sharing_call_list_networks_sync (self->priv->proxy, self->priv->service_name, &networks, NULL, &error)) { | ||
2361 | 113 | g_warning ("couldn't list networks: %s", error->message); | ||
2362 | 114 | g_dbus_proxy_set_cached_property (G_DBUS_PROXY (self->priv->proxy), | ||
2363 | 115 | "SharingStatus", | ||
2364 | 116 | g_variant_new_uint32 (GSD_SHARING_STATUS_OFFLINE)); | ||
2365 | 117 | g_error_free (error); | ||
2366 | 118 | cc_list_box_adjust_scrolling (GTK_LIST_BOX (self->priv->listbox)); | ||
2367 | 119 | return; | ||
2368 | 120 | } | ||
2369 | 121 | |||
2370 | 122 | g_variant_iter_init (&iter, networks); | ||
2371 | 123 | while (g_variant_iter_next (&iter, "(sss)", &uuid, &network_name, &carrier_type)) { | ||
2372 | 124 | CcSharingNetwork *net; | ||
2373 | 125 | |||
2374 | 126 | net = g_new0 (CcSharingNetwork, 1); | ||
2375 | 127 | net->uuid = uuid; | ||
2376 | 128 | net->network_name = network_name; | ||
2377 | 129 | net->carrier_type = carrier_type; | ||
2378 | 130 | self->priv->networks = g_list_prepend (self->priv->networks, net); | ||
2379 | 131 | } | ||
2380 | 132 | self->priv->networks = g_list_reverse (self->priv->networks); | ||
2381 | 133 | cc_list_box_adjust_scrolling (GTK_LIST_BOX (self->priv->listbox)); | ||
2382 | 134 | |||
2383 | 135 | g_variant_unref (networks); | ||
2384 | 136 | } | ||
2385 | 137 | |||
2386 | 138 | static void | ||
2387 | 139 | cc_sharing_networks_remove_network (GtkWidget *button, | ||
2388 | 140 | CcSharingNetworks *self) | ||
2389 | 141 | { | ||
2390 | 142 | GtkWidget *row; | ||
2391 | 143 | GError *error = NULL; | ||
2392 | 144 | gboolean ret; | ||
2393 | 145 | const char *uuid; | ||
2394 | 146 | |||
2395 | 147 | row = g_object_get_data (G_OBJECT (button), "row"); | ||
2396 | 148 | uuid = g_object_get_data (G_OBJECT (row), "uuid"); | ||
2397 | 149 | |||
2398 | 150 | ret = gsd_sharing_call_disable_service_sync (self->priv->proxy, | ||
2399 | 151 | self->priv->service_name, | ||
2400 | 152 | uuid, | ||
2401 | 153 | NULL, | ||
2402 | 154 | &error); | ||
2403 | 155 | if (!ret) { | ||
2404 | 156 | g_warning ("Failed to remove service %s: %s", | ||
2405 | 157 | self->priv->service_name, error->message); | ||
2406 | 158 | g_error_free (error); | ||
2407 | 159 | } | ||
2408 | 160 | |||
2409 | 161 | cc_sharing_update_networks (self); | ||
2410 | 162 | cc_sharing_update_networks_box (self); | ||
2411 | 163 | } | ||
2412 | 164 | |||
2413 | 165 | static gboolean | ||
2414 | 166 | cc_sharing_networks_enable_network (GtkSwitch *widget, | ||
2415 | 167 | gboolean state, | ||
2416 | 168 | gpointer user_data) | ||
2417 | 169 | { | ||
2418 | 170 | CcSharingNetworks *self = user_data; | ||
2419 | 171 | GError *error = NULL; | ||
2420 | 172 | gboolean ret; | ||
2421 | 173 | |||
2422 | 174 | if (state) { | ||
2423 | 175 | ret = gsd_sharing_call_enable_service_sync (self->priv->proxy, | ||
2424 | 176 | self->priv->service_name, | ||
2425 | 177 | NULL, | ||
2426 | 178 | &error); | ||
2427 | 179 | } else { | ||
2428 | 180 | ret = gsd_sharing_call_disable_service_sync (self->priv->proxy, | ||
2429 | 181 | self->priv->service_name, | ||
2430 | 182 | gsd_sharing_get_current_network (self->priv->proxy), | ||
2431 | 183 | NULL, | ||
2432 | 184 | &error); | ||
2433 | 185 | } | ||
2434 | 186 | |||
2435 | 187 | if (ret) { | ||
2436 | 188 | gtk_switch_set_state (widget, state); | ||
2437 | 189 | } else { | ||
2438 | 190 | g_warning ("Failed to %s service %s: %s", state ? "enable" : "disable", | ||
2439 | 191 | self->priv->service_name, error->message); | ||
2440 | 192 | g_error_free (error); | ||
2441 | 193 | g_signal_handlers_block_by_func (widget, | ||
2442 | 194 | cc_sharing_networks_enable_network, self); | ||
2443 | 195 | gtk_switch_set_active (widget, !state); | ||
2444 | 196 | g_signal_handlers_unblock_by_func (widget, | ||
2445 | 197 | cc_sharing_networks_enable_network, self); | ||
2446 | 198 | } | ||
2447 | 199 | |||
2448 | 200 | cc_sharing_update_networks (self); | ||
2449 | 201 | cc_sharing_networks_update_status (self); | ||
2450 | 202 | |||
2451 | 203 | return TRUE; | ||
2452 | 204 | } | ||
2453 | 205 | |||
2454 | 206 | static GtkWidget * | ||
2455 | 207 | cc_sharing_networks_new_row (const char *uuid, | ||
2456 | 208 | const char *network_name, | ||
2457 | 209 | const char *carrier_type, | ||
2458 | 210 | CcSharingNetworks *self) | ||
2459 | 211 | { | ||
2460 | 212 | GtkWidget *row, *box, *w; | ||
2461 | 213 | const char *icon_name; | ||
2462 | 214 | |||
2463 | 215 | row = gtk_list_box_row_new (); | ||
2464 | 216 | box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0); | ||
2465 | 217 | gtk_container_set_border_width (GTK_CONTAINER (box), 12); | ||
2466 | 218 | gtk_container_add (GTK_CONTAINER (row), box); | ||
2467 | 219 | |||
2468 | 220 | if (g_strcmp0 (carrier_type, "802-11-wireless") == 0) { | ||
2469 | 221 | icon_name = "network-wireless-offline-symbolic"; | ||
2470 | 222 | } else if (g_strcmp0 (carrier_type, "802-3-ethernet") == 0) { | ||
2471 | 223 | icon_name = "network-wired-disconnected-symbolic"; | ||
2472 | 224 | } else { | ||
2473 | 225 | icon_name = "network-wired-symbolic"; | ||
2474 | 226 | } | ||
2475 | 227 | |||
2476 | 228 | w = gtk_image_new_from_icon_name (icon_name, GTK_ICON_SIZE_MENU); | ||
2477 | 229 | gtk_widget_set_margin_end (w, 12); | ||
2478 | 230 | gtk_container_add (GTK_CONTAINER (box), w); | ||
2479 | 231 | |||
2480 | 232 | /* Label */ | ||
2481 | 233 | w = gtk_label_new (network_name); | ||
2482 | 234 | gtk_container_add (GTK_CONTAINER (box), w); | ||
2483 | 235 | |||
2484 | 236 | /* Remove button */ | ||
2485 | 237 | w = gtk_button_new_from_icon_name ("window-close-symbolic", GTK_ICON_SIZE_SMALL_TOOLBAR); | ||
2486 | 238 | gtk_button_set_relief (GTK_BUTTON (w), GTK_RELIEF_NONE); | ||
2487 | 239 | gtk_widget_set_margin_top (w, 3); | ||
2488 | 240 | gtk_widget_set_margin_bottom (w, 3); | ||
2489 | 241 | gtk_widget_set_margin_end (w, 12); | ||
2490 | 242 | gtk_widget_set_valign (w, GTK_ALIGN_CENTER); | ||
2491 | 243 | gtk_box_pack_end (GTK_BOX (box), w, FALSE, FALSE, 0); | ||
2492 | 244 | g_signal_connect (G_OBJECT (w), "clicked", | ||
2493 | 245 | G_CALLBACK (cc_sharing_networks_remove_network), self); | ||
2494 | 246 | g_object_set_data (G_OBJECT (w), "row", row); | ||
2495 | 247 | |||
2496 | 248 | g_object_set_data_full (G_OBJECT (row), "uuid", g_strdup (uuid), g_free); | ||
2497 | 249 | |||
2498 | 250 | gtk_widget_show_all (row); | ||
2499 | 251 | |||
2500 | 252 | return row; | ||
2501 | 253 | } | ||
2502 | 254 | |||
2503 | 255 | static GtkWidget * | ||
2504 | 256 | cc_sharing_networks_new_current_row (CcSharingNetworks *self) | ||
2505 | 257 | { | ||
2506 | 258 | GtkWidget *row, *box, *w; | ||
2507 | 259 | |||
2508 | 260 | row = gtk_list_box_row_new (); | ||
2509 | 261 | box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0); | ||
2510 | 262 | gtk_container_set_border_width (GTK_CONTAINER (box), 12); | ||
2511 | 263 | gtk_container_add (GTK_CONTAINER (row), box); | ||
2512 | 264 | |||
2513 | 265 | /* Icon */ | ||
2514 | 266 | w = gtk_image_new_from_icon_name ("image-missing", GTK_ICON_SIZE_MENU); | ||
2515 | 267 | gtk_widget_set_margin_end (w, 12); | ||
2516 | 268 | gtk_container_add (GTK_CONTAINER (box), w); | ||
2517 | 269 | self->priv->current_icon = w; | ||
2518 | 270 | |||
2519 | 271 | /* Label */ | ||
2520 | 272 | w = gtk_label_new (""); | ||
2521 | 273 | gtk_container_add (GTK_CONTAINER (box), w); | ||
2522 | 274 | self->priv->current_label = w; | ||
2523 | 275 | |||
2524 | 276 | w = gtk_switch_new (); | ||
2525 | 277 | gtk_widget_set_margin_top (w, 3); | ||
2526 | 278 | gtk_widget_set_margin_bottom (w, 3); | ||
2527 | 279 | gtk_widget_set_margin_end (w, 12); | ||
2528 | 280 | gtk_widget_set_valign (w, GTK_ALIGN_CENTER); | ||
2529 | 281 | gtk_box_pack_end (GTK_BOX (box), w, FALSE, FALSE, 0); | ||
2530 | 282 | g_signal_connect (G_OBJECT (w), "state-set", | ||
2531 | 283 | G_CALLBACK (cc_sharing_networks_enable_network), self); | ||
2532 | 284 | self->priv->current_switch = w; | ||
2533 | 285 | g_object_set_data (G_OBJECT (w), "row", row); | ||
2534 | 286 | |||
2535 | 287 | gtk_widget_show_all (box); | ||
2536 | 288 | |||
2537 | 289 | return row; | ||
2538 | 290 | } | ||
2539 | 291 | |||
2540 | 292 | static GtkWidget * | ||
2541 | 293 | cc_sharing_networks_new_no_network_row (CcSharingNetworks *self) | ||
2542 | 294 | { | ||
2543 | 295 | GtkWidget *row, *box, *w; | ||
2544 | 296 | |||
2545 | 297 | row = gtk_list_box_row_new (); | ||
2546 | 298 | box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0); | ||
2547 | 299 | gtk_container_set_border_width (GTK_CONTAINER (box), 12); | ||
2548 | 300 | gtk_container_add (GTK_CONTAINER (row), box); | ||
2549 | 301 | |||
2550 | 302 | /* Label */ | ||
2551 | 303 | w = gtk_label_new (_("No networks selected for sharing")); | ||
2552 | 304 | gtk_widget_set_hexpand (w, TRUE); | ||
2553 | 305 | gtk_widget_set_halign (w, GTK_ALIGN_CENTER); | ||
2554 | 306 | gtk_style_context_add_class (gtk_widget_get_style_context (w), "dim-label"); | ||
2555 | 307 | gtk_container_add (GTK_CONTAINER (box), w); | ||
2556 | 308 | |||
2557 | 309 | gtk_widget_show_all (box); | ||
2558 | 310 | |||
2559 | 311 | return row; | ||
2560 | 312 | } | ||
2561 | 313 | |||
2562 | 314 | static void | ||
2563 | 315 | cc_sharing_update_networks_box (CcSharingNetworks *self) | ||
2564 | 316 | { | ||
2565 | 317 | gboolean current_visible; | ||
2566 | 318 | const char *current_network; | ||
2567 | 319 | GList *children, *l; | ||
2568 | 320 | |||
2569 | 321 | children = gtk_container_get_children (GTK_CONTAINER (self->priv->listbox)); | ||
2570 | 322 | for (l = children; l != NULL; l = l->next) { | ||
2571 | 323 | GtkWidget *row = l->data; | ||
2572 | 324 | |||
2573 | 325 | if (row != self->priv->current_row && | ||
2574 | 326 | row != self->priv->no_network_row) | ||
2575 | 327 | gtk_widget_destroy (row); | ||
2576 | 328 | } | ||
2577 | 329 | g_list_free (children); | ||
2578 | 330 | |||
2579 | 331 | current_network = gsd_sharing_get_current_network (self->priv->proxy); | ||
2580 | 332 | |||
2581 | 333 | if (current_network != NULL && | ||
2582 | 334 | !g_str_equal (current_network, "")) { | ||
2583 | 335 | gboolean available; | ||
2584 | 336 | const char *carrier_type, *icon_name, *current_network_name; | ||
2585 | 337 | |||
2586 | 338 | gtk_widget_show (self->priv->current_row); | ||
2587 | 339 | current_visible = TRUE; | ||
2588 | 340 | |||
2589 | 341 | /* Network name */ | ||
2590 | 342 | g_object_set_data_full (G_OBJECT (self->priv->current_row), | ||
2591 | 343 | "uuid", g_strdup (current_network), g_free); | ||
2592 | 344 | current_network_name = gsd_sharing_get_current_network_name (self->priv->proxy); | ||
2593 | 345 | gtk_label_set_label (GTK_LABEL (self->priv->current_label), current_network_name); | ||
2594 | 346 | |||
2595 | 347 | /* Icon */ | ||
2596 | 348 | carrier_type = gsd_sharing_get_carrier_type (self->priv->proxy); | ||
2597 | 349 | if (g_strcmp0 (carrier_type, "802-11-wireless") == 0) { | ||
2598 | 350 | icon_name = "network-wireless-signal-excellent-symbolic"; | ||
2599 | 351 | } else if (g_strcmp0 (carrier_type, "802-3-ethernet") == 0) { | ||
2600 | 352 | icon_name = "network-wired-symbolic"; | ||
2601 | 353 | } else { | ||
2602 | 354 | icon_name = "network-wired-symbolic"; | ||
2603 | 355 | } | ||
2604 | 356 | gtk_image_set_from_icon_name (GTK_IMAGE (self->priv->current_icon), icon_name, GTK_ICON_SIZE_SMALL_TOOLBAR); | ||
2605 | 357 | |||
2606 | 358 | /* State */ | ||
2607 | 359 | available = gsd_sharing_get_sharing_status (self->priv->proxy) == GSD_SHARING_STATUS_AVAILABLE; | ||
2608 | 360 | gtk_widget_set_sensitive (self->priv->current_switch, available); | ||
2609 | 361 | //FIXME add a subtitle explaining why it's disabled | ||
2610 | 362 | } else { | ||
2611 | 363 | gtk_widget_hide (self->priv->current_row); | ||
2612 | 364 | current_visible = FALSE; | ||
2613 | 365 | } | ||
2614 | 366 | |||
2615 | 367 | for (l = self->priv->networks; l != NULL; l = l->next) { | ||
2616 | 368 | CcSharingNetwork *net = l->data; | ||
2617 | 369 | GtkWidget *row; | ||
2618 | 370 | |||
2619 | 371 | if (g_strcmp0 (net->uuid, current_network) == 0) { | ||
2620 | 372 | g_signal_handlers_block_by_func (self->priv->current_switch, | ||
2621 | 373 | cc_sharing_networks_enable_network, self); | ||
2622 | 374 | gtk_switch_set_state (GTK_SWITCH (self->priv->current_switch), TRUE); | ||
2623 | 375 | g_signal_handlers_unblock_by_func (self->priv->current_switch, | ||
2624 | 376 | cc_sharing_networks_enable_network, self); | ||
2625 | 377 | continue; | ||
2626 | 378 | } | ||
2627 | 379 | |||
2628 | 380 | row = cc_sharing_networks_new_row (net->uuid, | ||
2629 | 381 | net->network_name, | ||
2630 | 382 | net->carrier_type, | ||
2631 | 383 | self); | ||
2632 | 384 | gtk_list_box_insert (GTK_LIST_BOX (self->priv->listbox), row, -1); | ||
2633 | 385 | } | ||
2634 | 386 | |||
2635 | 387 | if (self->priv->networks == NULL && | ||
2636 | 388 | !current_visible) { | ||
2637 | 389 | gtk_widget_show (self->priv->no_network_row); | ||
2638 | 390 | } else { | ||
2639 | 391 | gtk_widget_hide (self->priv->no_network_row); | ||
2640 | 392 | } | ||
2641 | 393 | |||
2642 | 394 | cc_sharing_networks_update_status (self); | ||
2643 | 395 | |||
2644 | 396 | cc_list_box_adjust_scrolling (GTK_LIST_BOX (self->priv->listbox)); | ||
2645 | 397 | } | ||
2646 | 398 | |||
2647 | 399 | static void | ||
2648 | 400 | current_network_changed (GObject *object, | ||
2649 | 401 | GParamSpec *pspec, | ||
2650 | 402 | CcSharingNetworks *self) | ||
2651 | 403 | { | ||
2652 | 404 | cc_sharing_update_networks (self); | ||
2653 | 405 | cc_sharing_update_networks_box (self); | ||
2654 | 406 | } | ||
2655 | 407 | |||
2656 | 408 | static void | ||
2657 | 409 | cc_sharing_networks_constructed (GObject *object) | ||
2658 | 410 | { | ||
2659 | 411 | CcSharingNetworks *self; | ||
2660 | 412 | |||
2661 | 413 | G_OBJECT_CLASS (cc_sharing_networks_parent_class)->constructed (object); | ||
2662 | 414 | |||
2663 | 415 | self = CC_SHARING_NETWORKS (object); | ||
2664 | 416 | |||
2665 | 417 | gtk_list_box_set_header_func (GTK_LIST_BOX (self->priv->listbox), | ||
2666 | 418 | cc_list_box_update_header_func, NULL, | ||
2667 | 419 | NULL); | ||
2668 | 420 | |||
2669 | 421 | cc_list_box_setup_scrolling (GTK_LIST_BOX (self->priv->listbox), 3); | ||
2670 | 422 | |||
2671 | 423 | self->priv->current_row = cc_sharing_networks_new_current_row (self); | ||
2672 | 424 | gtk_list_box_insert (GTK_LIST_BOX (self->priv->listbox), self->priv->current_row, -1); | ||
2673 | 425 | g_object_set_data (G_OBJECT (self), "switch", self->priv->current_switch); | ||
2674 | 426 | |||
2675 | 427 | self->priv->no_network_row = cc_sharing_networks_new_no_network_row (self); | ||
2676 | 428 | gtk_list_box_insert (GTK_LIST_BOX (self->priv->listbox), self->priv->no_network_row, -1); | ||
2677 | 429 | |||
2678 | 430 | cc_sharing_update_networks (self); | ||
2679 | 431 | cc_sharing_update_networks_box (self); | ||
2680 | 432 | |||
2681 | 433 | g_signal_connect (self->priv->proxy, "notify::current-network", | ||
2682 | 434 | G_CALLBACK (current_network_changed), self); | ||
2683 | 435 | } | ||
2684 | 436 | |||
2685 | 437 | static void | ||
2686 | 438 | cc_sharing_networks_init (CcSharingNetworks *self) | ||
2687 | 439 | { | ||
2688 | 440 | gtk_widget_init_template (GTK_WIDGET (self)); | ||
2689 | 441 | self->priv = cc_sharing_networks_get_instance_private (self); | ||
2690 | 442 | } | ||
2691 | 443 | |||
2692 | 444 | GtkWidget * | ||
2693 | 445 | cc_sharing_networks_new (GDBusProxy *proxy, | ||
2694 | 446 | const char *service_name) | ||
2695 | 447 | { | ||
2696 | 448 | g_return_val_if_fail (GSD_IS_SHARING (proxy), NULL); | ||
2697 | 449 | g_return_val_if_fail (service_name != NULL, NULL); | ||
2698 | 450 | |||
2699 | 451 | return GTK_WIDGET (g_object_new (CC_TYPE_SHARING_NETWORKS, | ||
2700 | 452 | "proxy", proxy, | ||
2701 | 453 | "service-name", service_name, | ||
2702 | 454 | NULL)); | ||
2703 | 455 | } | ||
2704 | 456 | |||
2705 | 457 | static void | ||
2706 | 458 | cc_sharing_networks_set_property (GObject *object, | ||
2707 | 459 | guint prop_id, | ||
2708 | 460 | const GValue *value, | ||
2709 | 461 | GParamSpec *pspec) | ||
2710 | 462 | { | ||
2711 | 463 | CcSharingNetworks *self; | ||
2712 | 464 | |||
2713 | 465 | self = CC_SHARING_NETWORKS (object); | ||
2714 | 466 | |||
2715 | 467 | switch (prop_id) { | ||
2716 | 468 | case PROP_SERVICE_NAME: | ||
2717 | 469 | self->priv->service_name = g_value_dup_string (value); | ||
2718 | 470 | break; | ||
2719 | 471 | case PROP_PROXY: | ||
2720 | 472 | self->priv->proxy = g_value_dup_object (value); | ||
2721 | 473 | break; | ||
2722 | 474 | default: | ||
2723 | 475 | G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); | ||
2724 | 476 | break; | ||
2725 | 477 | } | ||
2726 | 478 | } | ||
2727 | 479 | |||
2728 | 480 | static void | ||
2729 | 481 | cc_sharing_networks_get_property (GObject *object, | ||
2730 | 482 | guint prop_id, | ||
2731 | 483 | GValue *value, | ||
2732 | 484 | GParamSpec *pspec) | ||
2733 | 485 | { | ||
2734 | 486 | CcSharingNetworks *self; | ||
2735 | 487 | |||
2736 | 488 | self = CC_SHARING_NETWORKS (object); | ||
2737 | 489 | |||
2738 | 490 | switch (prop_id) { | ||
2739 | 491 | case PROP_STATUS: | ||
2740 | 492 | g_value_set_uint (value, self->priv->status); | ||
2741 | 493 | break; | ||
2742 | 494 | default: | ||
2743 | 495 | G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); | ||
2744 | 496 | break; | ||
2745 | 497 | } | ||
2746 | 498 | } | ||
2747 | 499 | |||
2748 | 500 | static void | ||
2749 | 501 | cc_sharing_networks_finalize (GObject *object) | ||
2750 | 502 | { | ||
2751 | 503 | CcSharingNetworks *self; | ||
2752 | 504 | |||
2753 | 505 | g_return_if_fail (object != NULL); | ||
2754 | 506 | g_return_if_fail (CC_IS_SHARING_NETWORKS (object)); | ||
2755 | 507 | |||
2756 | 508 | self = CC_SHARING_NETWORKS (object); | ||
2757 | 509 | |||
2758 | 510 | g_return_if_fail (self->priv != NULL); | ||
2759 | 511 | |||
2760 | 512 | g_clear_object (&self->priv->proxy); | ||
2761 | 513 | g_clear_pointer (&self->priv->service_name, g_free); | ||
2762 | 514 | |||
2763 | 515 | if (self->priv->networks != NULL) { | ||
2764 | 516 | g_list_free_full (self->priv->networks, cc_sharing_network_free); | ||
2765 | 517 | self->priv->networks = NULL; | ||
2766 | 518 | } | ||
2767 | 519 | |||
2768 | 520 | G_OBJECT_CLASS (cc_sharing_networks_parent_class)->finalize (object); | ||
2769 | 521 | } | ||
2770 | 522 | |||
2771 | 523 | |||
2772 | 524 | static void | ||
2773 | 525 | cc_sharing_networks_class_init (CcSharingNetworksClass *klass) | ||
2774 | 526 | { | ||
2775 | 527 | GObjectClass *object_class = G_OBJECT_CLASS (klass); | ||
2776 | 528 | GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (klass); | ||
2777 | 529 | |||
2778 | 530 | object_class->set_property = cc_sharing_networks_set_property; | ||
2779 | 531 | object_class->get_property = cc_sharing_networks_get_property; | ||
2780 | 532 | object_class->finalize = cc_sharing_networks_finalize; | ||
2781 | 533 | object_class->constructed = cc_sharing_networks_constructed; | ||
2782 | 534 | |||
2783 | 535 | g_object_class_install_property (object_class, | ||
2784 | 536 | PROP_PROXY, | ||
2785 | 537 | g_param_spec_object ("proxy", | ||
2786 | 538 | "proxy", | ||
2787 | 539 | "proxy", | ||
2788 | 540 | GSD_TYPE_SHARING_PROXY, | ||
2789 | 541 | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY)); | ||
2790 | 542 | |||
2791 | 543 | g_object_class_install_property (object_class, | ||
2792 | 544 | PROP_SERVICE_NAME, | ||
2793 | 545 | g_param_spec_string ("service-name", | ||
2794 | 546 | "service-name", | ||
2795 | 547 | "service-name", | ||
2796 | 548 | NULL, | ||
2797 | 549 | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY)); | ||
2798 | 550 | |||
2799 | 551 | g_object_class_install_property (object_class, | ||
2800 | 552 | PROP_STATUS, | ||
2801 | 553 | g_param_spec_uint ("status", | ||
2802 | 554 | "status", | ||
2803 | 555 | "status", | ||
2804 | 556 | CC_SHARING_STATUS_UNSET, CC_SHARING_STATUS_ACTIVE + 1, CC_SHARING_STATUS_OFF, | ||
2805 | 557 | G_PARAM_READABLE)); | ||
2806 | 558 | |||
2807 | 559 | gtk_widget_class_set_template_from_resource (widget_class, | ||
2808 | 560 | "/org/gnome/control-center/sharing/networks.ui"); | ||
2809 | 561 | |||
2810 | 562 | gtk_widget_class_bind_template_child_private (widget_class, CcSharingNetworks, listbox); | ||
2811 | 563 | } | ||
2812 | 564 | |||
2813 | 565 | /* | ||
2814 | 566 | * vim: sw=2 ts=8 cindent noai bs=2 | ||
2815 | 567 | */ | ||
2816 | 0 | 568 | ||
2817 | === added file 'panels/sharing/cc-sharing-networks.h' | |||
2818 | --- panels/sharing/cc-sharing-networks.h 1970-01-01 00:00:00 +0000 | |||
2819 | +++ panels/sharing/cc-sharing-networks.h 2018-11-21 12:36:03 +0000 | |||
2820 | @@ -0,0 +1,63 @@ | |||
2821 | 1 | /* | ||
2822 | 2 | * Copyright (C) 2014 Bastien Nocera <hadess@hadess.net> | ||
2823 | 3 | * | ||
2824 | 4 | * This program is free software; you can redistribute it and/or modify | ||
2825 | 5 | * it under the terms of the GNU General Public License as published by | ||
2826 | 6 | * the Free Software Foundation; either version 2 of the License, or | ||
2827 | 7 | * (at your option) any later version. | ||
2828 | 8 | * | ||
2829 | 9 | * This program is distributed in the hope that it will be useful, | ||
2830 | 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
2831 | 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
2832 | 12 | * GNU General Public License for more details. | ||
2833 | 13 | * | ||
2834 | 14 | * You should have received a copy of the GNU General Public License | ||
2835 | 15 | * along with this program; if not, write to the Free Software | ||
2836 | 16 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. | ||
2837 | 17 | * | ||
2838 | 18 | */ | ||
2839 | 19 | |||
2840 | 20 | #ifndef __CC_SHARING_NETWORKS_H__ | ||
2841 | 21 | #define __CC_SHARING_NETWORKS_H__ | ||
2842 | 22 | |||
2843 | 23 | #include <gtk/gtkgrid.h> | ||
2844 | 24 | |||
2845 | 25 | G_BEGIN_DECLS | ||
2846 | 26 | |||
2847 | 27 | #define CC_TYPE_SHARING_NETWORKS (cc_sharing_networks_get_type ()) | ||
2848 | 28 | #define CC_SHARING_NETWORKS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), CC_TYPE_SHARING_NETWORKS, CcSharingNetworks)) | ||
2849 | 29 | #define CC_SHARING_NETWORKS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), CC_TYPE_SHARING_NETWORKS, CcSharingNetworksClass)) | ||
2850 | 30 | #define CC_IS_SHARING_NETWORKS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), CC_TYPE_SHARING_NETWORKS)) | ||
2851 | 31 | #define CC_IS_SHARING_NETWORKS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), CC_TYPE_SHARING_NETWORKS)) | ||
2852 | 32 | #define CC_SHARING_NETWORKS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), CC_TYPE_SHARING_NETWORKS, CcSharingNetworksClass)) | ||
2853 | 33 | |||
2854 | 34 | typedef struct _CcSharingNetworks CcSharingNetworks; | ||
2855 | 35 | typedef struct _CcSharingNetworksPrivate CcSharingNetworksPrivate; | ||
2856 | 36 | typedef struct _CcSharingNetworksClass CcSharingNetworksClass; | ||
2857 | 37 | |||
2858 | 38 | struct _CcSharingNetworks | ||
2859 | 39 | { | ||
2860 | 40 | GtkGrid parent_instance; | ||
2861 | 41 | |||
2862 | 42 | CcSharingNetworksPrivate *priv; | ||
2863 | 43 | }; | ||
2864 | 44 | |||
2865 | 45 | struct _CcSharingNetworksClass | ||
2866 | 46 | { | ||
2867 | 47 | GtkGridClass parent_class; | ||
2868 | 48 | }; | ||
2869 | 49 | |||
2870 | 50 | typedef enum { | ||
2871 | 51 | CC_SHARING_STATUS_UNSET, | ||
2872 | 52 | CC_SHARING_STATUS_OFF, | ||
2873 | 53 | CC_SHARING_STATUS_ENABLED, | ||
2874 | 54 | CC_SHARING_STATUS_ACTIVE | ||
2875 | 55 | } CcSharingStatus; | ||
2876 | 56 | |||
2877 | 57 | GType cc_sharing_networks_get_type (void) G_GNUC_CONST; | ||
2878 | 58 | GtkWidget * cc_sharing_networks_new (GDBusProxy *proxy, | ||
2879 | 59 | const char *service_name); | ||
2880 | 60 | |||
2881 | 61 | G_END_DECLS | ||
2882 | 62 | |||
2883 | 63 | #endif /* __CC_SHARING_NETWORKS_H__ */ | ||
2884 | 0 | 64 | ||
2885 | === added file 'panels/sharing/cc-sharing-panel.c' | |||
2886 | --- panels/sharing/cc-sharing-panel.c 1970-01-01 00:00:00 +0000 | |||
2887 | +++ panels/sharing/cc-sharing-panel.c 2018-11-21 12:36:03 +0000 | |||
2888 | @@ -0,0 +1,1276 @@ | |||
2889 | 1 | /* | ||
2890 | 2 | * Copyright (C) 2013 Intel, Inc | ||
2891 | 3 | * | ||
2892 | 4 | * This program is free software; you can redistribute it and/or modify | ||
2893 | 5 | * it under the terms of the GNU General Public License as published by | ||
2894 | 6 | * the Free Software Foundation; either version 2 of the License, or | ||
2895 | 7 | * (at your option) any later version. | ||
2896 | 8 | * | ||
2897 | 9 | * This program is distributed in the hope that it will be useful, | ||
2898 | 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
2899 | 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
2900 | 12 | * GNU General Public License for more details. | ||
2901 | 13 | * | ||
2902 | 14 | * You should have received a copy of the GNU General Public License | ||
2903 | 15 | * along with this program; if not, write to the Free Software | ||
2904 | 16 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. | ||
2905 | 17 | * | ||
2906 | 18 | * Author: Thomas Wood <thomas.wood@intel.com> | ||
2907 | 19 | * | ||
2908 | 20 | */ | ||
2909 | 21 | |||
2910 | 22 | #include "cc-sharing-panel.h" | ||
2911 | 23 | #include "shell/cc-hostname-entry.h" | ||
2912 | 24 | |||
2913 | 25 | #include "shell/list-box-helper.h" | ||
2914 | 26 | #include "cc-sharing-resources.h" | ||
2915 | 27 | #include "vino-preferences.h" | ||
2916 | 28 | #include "cc-remote-login.h" | ||
2917 | 29 | #include "file-share-properties.h" | ||
2918 | 30 | #include "cc-media-sharing.h" | ||
2919 | 31 | #include "cc-sharing-networks.h" | ||
2920 | 32 | #include "cc-sharing-switch.h" | ||
2921 | 33 | #include "org.gnome.SettingsDaemon.Sharing.h" | ||
2922 | 34 | |||
2923 | 35 | #ifdef GDK_WINDOWING_WAYLAND | ||
2924 | 36 | #include <gdk/gdkwayland.h> | ||
2925 | 37 | #endif | ||
2926 | 38 | #include <glib/gi18n.h> | ||
2927 | 39 | #include <config.h> | ||
2928 | 40 | |||
2929 | 41 | CC_PANEL_REGISTER (CcSharingPanel, cc_sharing_panel) | ||
2930 | 42 | |||
2931 | 43 | #define PANEL_PRIVATE(o) \ | ||
2932 | 44 | (G_TYPE_INSTANCE_GET_PRIVATE ((o), CC_TYPE_SHARING_PANEL, CcSharingPanelPrivate)) | ||
2933 | 45 | |||
2934 | 46 | |||
2935 | 47 | static void cc_sharing_panel_setup_label_with_hostname (CcSharingPanel *self, GtkWidget *label); | ||
2936 | 48 | static GtkWidget *cc_sharing_panel_new_media_sharing_row (const char *uri_or_path, | ||
2937 | 49 | CcSharingPanel *self); | ||
2938 | 50 | |||
2939 | 51 | static GtkWidget * | ||
2940 | 52 | _gtk_builder_get_widget (GtkBuilder *builder, | ||
2941 | 53 | const gchar *name) | ||
2942 | 54 | { | ||
2943 | 55 | GtkWidget *w; | ||
2944 | 56 | |||
2945 | 57 | w = (GtkWidget*) gtk_builder_get_object (builder, name); | ||
2946 | 58 | |||
2947 | 59 | g_assert (w != NULL); | ||
2948 | 60 | |||
2949 | 61 | return w; | ||
2950 | 62 | } | ||
2951 | 63 | |||
2952 | 64 | #define WID(y) _gtk_builder_get_widget (priv->builder, y) | ||
2953 | 65 | |||
2954 | 66 | #define VINO_SCHEMA_ID "org.gnome.Vino" | ||
2955 | 67 | #define FILE_SHARING_SCHEMA_ID "org.gnome.desktop.file-sharing" | ||
2956 | 68 | #define GNOME_REMOTE_DESKTOP_SCHEMA_ID "org.gnome.desktop.remote-desktop" | ||
2957 | 69 | |||
2958 | 70 | struct _CcSharingPanelPrivate | ||
2959 | 71 | { | ||
2960 | 72 | GtkBuilder *builder; | ||
2961 | 73 | |||
2962 | 74 | GtkWidget *master_switch; | ||
2963 | 75 | GtkWidget *hostname_entry; | ||
2964 | 76 | |||
2965 | 77 | GCancellable *sharing_proxy_cancellable; | ||
2966 | 78 | GDBusProxy *sharing_proxy; | ||
2967 | 79 | |||
2968 | 80 | GtkWidget *media_sharing_switch; | ||
2969 | 81 | GtkWidget *personal_file_sharing_switch; | ||
2970 | 82 | GtkWidget *screen_sharing_switch; | ||
2971 | 83 | |||
2972 | 84 | GtkWidget *media_sharing_dialog; | ||
2973 | 85 | GtkWidget *personal_file_sharing_dialog; | ||
2974 | 86 | GtkWidget *remote_login_dialog; | ||
2975 | 87 | GCancellable *remote_login_cancellable; | ||
2976 | 88 | GCancellable *hostname_cancellable; | ||
2977 | 89 | GtkWidget *screen_sharing_dialog; | ||
2978 | 90 | |||
2979 | 91 | guint remote_desktop_name_watch; | ||
2980 | 92 | }; | ||
2981 | 93 | |||
2982 | 94 | #define OFF_IF_VISIBLE(x) { if (gtk_widget_is_visible(x) && gtk_widget_is_sensitive(x)) gtk_switch_set_active (GTK_SWITCH(x), FALSE); } | ||
2983 | 95 | |||
2984 | 96 | static void | ||
2985 | 97 | cc_sharing_panel_master_switch_notify (GtkSwitch *gtkswitch, | ||
2986 | 98 | GParamSpec *pspec, | ||
2987 | 99 | CcSharingPanel *self) | ||
2988 | 100 | { | ||
2989 | 101 | CcSharingPanelPrivate *priv = self->priv; | ||
2990 | 102 | gboolean active; | ||
2991 | 103 | |||
2992 | 104 | active = gtk_switch_get_active (gtkswitch); | ||
2993 | 105 | |||
2994 | 106 | if (!active) | ||
2995 | 107 | { | ||
2996 | 108 | /* disable all services if the master switch is not active */ | ||
2997 | 109 | OFF_IF_VISIBLE(priv->media_sharing_switch); | ||
2998 | 110 | OFF_IF_VISIBLE(priv->personal_file_sharing_switch); | ||
2999 | 111 | OFF_IF_VISIBLE(priv->screen_sharing_switch); | ||
3000 | 112 | |||
3001 | 113 | gtk_switch_set_active (GTK_SWITCH (WID ("remote-login-switch")), FALSE); | ||
3002 | 114 | } | ||
3003 | 115 | |||
3004 | 116 | gtk_widget_set_sensitive (WID ("main-list-box"), active); | ||
3005 | 117 | } | ||
3006 | 118 | |||
3007 | 119 | static void | ||
3008 | 120 | cc_sharing_panel_constructed (GObject *object) | ||
3009 | 121 | { | ||
3010 | 122 | CcSharingPanelPrivate *priv = CC_SHARING_PANEL (object)->priv; | ||
3011 | 123 | |||
3012 | 124 | G_OBJECT_CLASS (cc_sharing_panel_parent_class)->constructed (object); | ||
3013 | 125 | |||
3014 | 126 | /* add the master switch */ | ||
3015 | 127 | cc_shell_embed_widget_in_header (cc_panel_get_shell (CC_PANEL (object)), | ||
3016 | 128 | gtk_widget_get_parent (priv->master_switch)); | ||
3017 | 129 | } | ||
3018 | 130 | |||
3019 | 131 | static void | ||
3020 | 132 | cc_sharing_panel_dispose (GObject *object) | ||
3021 | 133 | { | ||
3022 | 134 | CcSharingPanelPrivate *priv = CC_SHARING_PANEL (object)->priv; | ||
3023 | 135 | |||
3024 | 136 | if (priv->remote_desktop_name_watch) | ||
3025 | 137 | g_bus_unwatch_name (priv->remote_desktop_name_watch); | ||
3026 | 138 | priv->remote_desktop_name_watch = 0; | ||
3027 | 139 | |||
3028 | 140 | g_clear_object (&priv->builder); | ||
3029 | 141 | |||
3030 | 142 | if (priv->media_sharing_dialog) | ||
3031 | 143 | { | ||
3032 | 144 | gtk_widget_destroy (priv->media_sharing_dialog); | ||
3033 | 145 | priv->media_sharing_dialog = NULL; | ||
3034 | 146 | } | ||
3035 | 147 | |||
3036 | 148 | if (priv->personal_file_sharing_dialog) | ||
3037 | 149 | { | ||
3038 | 150 | gtk_widget_destroy (priv->personal_file_sharing_dialog); | ||
3039 | 151 | priv->personal_file_sharing_dialog = NULL; | ||
3040 | 152 | } | ||
3041 | 153 | |||
3042 | 154 | if (priv->remote_login_cancellable) | ||
3043 | 155 | { | ||
3044 | 156 | g_cancellable_cancel (priv->remote_login_cancellable); | ||
3045 | 157 | g_clear_object (&priv->remote_login_cancellable); | ||
3046 | 158 | } | ||
3047 | 159 | |||
3048 | 160 | if (priv->hostname_cancellable) | ||
3049 | 161 | { | ||
3050 | 162 | g_cancellable_cancel (priv->hostname_cancellable); | ||
3051 | 163 | g_clear_object (&priv->hostname_cancellable); | ||
3052 | 164 | } | ||
3053 | 165 | |||
3054 | 166 | if (priv->remote_login_dialog) | ||
3055 | 167 | { | ||
3056 | 168 | gtk_widget_destroy (priv->remote_login_dialog); | ||
3057 | 169 | priv->remote_login_dialog = NULL; | ||
3058 | 170 | } | ||
3059 | 171 | |||
3060 | 172 | if (priv->screen_sharing_dialog) | ||
3061 | 173 | { | ||
3062 | 174 | gtk_widget_destroy (priv->screen_sharing_dialog); | ||
3063 | 175 | priv->screen_sharing_dialog = NULL; | ||
3064 | 176 | } | ||
3065 | 177 | |||
3066 | 178 | g_cancellable_cancel (priv->sharing_proxy_cancellable); | ||
3067 | 179 | g_clear_object (&priv->sharing_proxy_cancellable); | ||
3068 | 180 | g_clear_object (&priv->sharing_proxy); | ||
3069 | 181 | |||
3070 | 182 | G_OBJECT_CLASS (cc_sharing_panel_parent_class)->dispose (object); | ||
3071 | 183 | } | ||
3072 | 184 | |||
3073 | 185 | static const char * | ||
3074 | 186 | cc_sharing_panel_get_help_uri (CcPanel *panel) | ||
3075 | 187 | { | ||
3076 | 188 | return "help:gnome-help/prefs-sharing"; | ||
3077 | 189 | } | ||
3078 | 190 | |||
3079 | 191 | static void | ||
3080 | 192 | cc_sharing_panel_class_init (CcSharingPanelClass *klass) | ||
3081 | 193 | { | ||
3082 | 194 | GObjectClass *object_class = G_OBJECT_CLASS (klass); | ||
3083 | 195 | CcPanelClass *panel_class = CC_PANEL_CLASS (klass); | ||
3084 | 196 | |||
3085 | 197 | g_type_class_add_private (klass, sizeof (CcSharingPanelPrivate)); | ||
3086 | 198 | |||
3087 | 199 | object_class->constructed = cc_sharing_panel_constructed; | ||
3088 | 200 | object_class->dispose = cc_sharing_panel_dispose; | ||
3089 | 201 | |||
3090 | 202 | panel_class->get_help_uri = cc_sharing_panel_get_help_uri; | ||
3091 | 203 | } | ||
3092 | 204 | |||
3093 | 205 | static void | ||
3094 | 206 | cc_sharing_panel_run_dialog (CcSharingPanel *self, | ||
3095 | 207 | const gchar *dialog_name) | ||
3096 | 208 | { | ||
3097 | 209 | CcSharingPanelPrivate *priv = self->priv; | ||
3098 | 210 | GtkWidget *dialog, *parent; | ||
3099 | 211 | |||
3100 | 212 | dialog = WID (dialog_name); | ||
3101 | 213 | |||
3102 | 214 | /* ensure labels with the hostname are updated if the hostname has changed */ | ||
3103 | 215 | cc_sharing_panel_setup_label_with_hostname (self, | ||
3104 | 216 | WID ("screen-sharing-label")); | ||
3105 | 217 | cc_sharing_panel_setup_label_with_hostname (self, WID ("remote-login-label")); | ||
3106 | 218 | cc_sharing_panel_setup_label_with_hostname (self, | ||
3107 | 219 | WID ("personal-file-sharing-label")); | ||
3108 | 220 | |||
3109 | 221 | |||
3110 | 222 | parent = cc_shell_get_toplevel (cc_panel_get_shell (CC_PANEL (self))); | ||
3111 | 223 | |||
3112 | 224 | gtk_window_set_transient_for (GTK_WINDOW (dialog), GTK_WINDOW (parent)); | ||
3113 | 225 | gtk_dialog_run (GTK_DIALOG (dialog)); | ||
3114 | 226 | } | ||
3115 | 227 | |||
3116 | 228 | static void | ||
3117 | 229 | cc_sharing_panel_main_list_box_row_activated (GtkListBox *listbox, | ||
3118 | 230 | GtkListBoxRow *row, | ||
3119 | 231 | CcSharingPanel *self) | ||
3120 | 232 | { | ||
3121 | 233 | gchar *widget_name, *found; | ||
3122 | 234 | |||
3123 | 235 | widget_name = g_strdup (gtk_buildable_get_name (GTK_BUILDABLE (row))); | ||
3124 | 236 | |||
3125 | 237 | if (!widget_name) | ||
3126 | 238 | return; | ||
3127 | 239 | |||
3128 | 240 | gtk_list_box_select_row (listbox, NULL); | ||
3129 | 241 | |||
3130 | 242 | /* replace "button" with "dialog" */ | ||
3131 | 243 | found = g_strrstr (widget_name, "button"); | ||
3132 | 244 | |||
3133 | 245 | if (!found) | ||
3134 | 246 | goto out; | ||
3135 | 247 | |||
3136 | 248 | memcpy (found, "dialog", 6); | ||
3137 | 249 | |||
3138 | 250 | cc_sharing_panel_run_dialog (self, widget_name); | ||
3139 | 251 | |||
3140 | 252 | out: | ||
3141 | 253 | g_free (widget_name); | ||
3142 | 254 | } | ||
3143 | 255 | |||
3144 | 256 | static gboolean | ||
3145 | 257 | cc_sharing_panel_switch_to_label_transform_func (GBinding *binding, | ||
3146 | 258 | const GValue *source_value, | ||
3147 | 259 | GValue *target_value, | ||
3148 | 260 | CcSharingPanel *self) | ||
3149 | 261 | { | ||
3150 | 262 | gboolean active; | ||
3151 | 263 | |||
3152 | 264 | if (!G_VALUE_HOLDS_BOOLEAN (source_value)) | ||
3153 | 265 | return FALSE; | ||
3154 | 266 | |||
3155 | 267 | if (!G_VALUE_HOLDS_STRING (target_value)) | ||
3156 | 268 | return FALSE; | ||
3157 | 269 | |||
3158 | 270 | active = g_value_get_boolean (source_value); | ||
3159 | 271 | |||
3160 | 272 | if (active) | ||
3161 | 273 | g_value_set_string (target_value, C_("service is enabled", "On")); | ||
3162 | 274 | else | ||
3163 | 275 | g_value_set_string (target_value, C_("service is disabled", "Off")); | ||
3164 | 276 | |||
3165 | 277 | /* ensure the master switch is active if one of the services is active */ | ||
3166 | 278 | if (active) | ||
3167 | 279 | gtk_switch_set_active (GTK_SWITCH (self->priv->master_switch), TRUE); | ||
3168 | 280 | |||
3169 | 281 | return TRUE; | ||
3170 | 282 | } | ||
3171 | 283 | |||
3172 | 284 | static gboolean | ||
3173 | 285 | cc_sharing_panel_networks_to_label_transform_func (GBinding *binding, | ||
3174 | 286 | const GValue *source_value, | ||
3175 | 287 | GValue *target_value, | ||
3176 | 288 | CcSharingPanel *self) | ||
3177 | 289 | { | ||
3178 | 290 | CcSharingStatus status; | ||
3179 | 291 | |||
3180 | 292 | if (!G_VALUE_HOLDS_UINT (source_value)) | ||
3181 | 293 | return FALSE; | ||
3182 | 294 | |||
3183 | 295 | if (!G_VALUE_HOLDS_STRING (target_value)) | ||
3184 | 296 | return FALSE; | ||
3185 | 297 | |||
3186 | 298 | status = g_value_get_uint (source_value); | ||
3187 | 299 | |||
3188 | 300 | switch (status) { | ||
3189 | 301 | case CC_SHARING_STATUS_OFF: | ||
3190 | 302 | g_value_set_string (target_value, C_("service is disabled", "Off")); | ||
3191 | 303 | break; | ||
3192 | 304 | case CC_SHARING_STATUS_ENABLED: | ||
3193 | 305 | g_value_set_string (target_value, C_("service is enabled", "Enabled")); | ||
3194 | 306 | break; | ||
3195 | 307 | case CC_SHARING_STATUS_ACTIVE: | ||
3196 | 308 | g_value_set_string (target_value, C_("service is active", "Active")); | ||
3197 | 309 | break; | ||
3198 | 310 | default: | ||
3199 | 311 | return FALSE; | ||
3200 | 312 | } | ||
3201 | 313 | |||
3202 | 314 | /* ensure the master switch is active if one of the services is active */ | ||
3203 | 315 | if (status != CC_SHARING_STATUS_OFF) | ||
3204 | 316 | gtk_switch_set_active (GTK_SWITCH (self->priv->master_switch), TRUE); | ||
3205 | 317 | |||
3206 | 318 | return TRUE; | ||
3207 | 319 | } | ||
3208 | 320 | |||
3209 | 321 | static void | ||
3210 | 322 | cc_sharing_panel_bind_switch_to_label (CcSharingPanel *self, | ||
3211 | 323 | GtkWidget *gtkswitch, | ||
3212 | 324 | GtkWidget *label) | ||
3213 | 325 | { | ||
3214 | 326 | g_object_bind_property_full (gtkswitch, "active", label, "label", | ||
3215 | 327 | G_BINDING_SYNC_CREATE, | ||
3216 | 328 | (GBindingTransformFunc) cc_sharing_panel_switch_to_label_transform_func, | ||
3217 | 329 | NULL, self, NULL); | ||
3218 | 330 | } | ||
3219 | 331 | |||
3220 | 332 | static void | ||
3221 | 333 | cc_sharing_panel_bind_networks_to_label (CcSharingPanel *self, | ||
3222 | 334 | GtkWidget *networks, | ||
3223 | 335 | GtkWidget *label) | ||
3224 | 336 | { | ||
3225 | 337 | g_object_bind_property_full (networks, "status", label, "label", | ||
3226 | 338 | G_BINDING_SYNC_CREATE, | ||
3227 | 339 | (GBindingTransformFunc) cc_sharing_panel_networks_to_label_transform_func, | ||
3228 | 340 | NULL, self, NULL); | ||
3229 | 341 | } | ||
3230 | 342 | |||
3231 | 343 | static void | ||
3232 | 344 | cc_sharing_panel_bind_switch_to_widgets (GtkWidget *gtkswitch, | ||
3233 | 345 | GtkWidget *first_widget, | ||
3234 | 346 | ...) | ||
3235 | 347 | { | ||
3236 | 348 | va_list w; | ||
3237 | 349 | GtkWidget *widget; | ||
3238 | 350 | |||
3239 | 351 | va_start (w, first_widget); | ||
3240 | 352 | |||
3241 | 353 | g_object_bind_property (gtkswitch, "active", first_widget, | ||
3242 | 354 | "sensitive", G_BINDING_SYNC_CREATE); | ||
3243 | 355 | |||
3244 | 356 | while ((widget = va_arg (w, GtkWidget*))) | ||
3245 | 357 | { | ||
3246 | 358 | g_object_bind_property (gtkswitch, "active", widget, | ||
3247 | 359 | "sensitive", G_BINDING_SYNC_CREATE); | ||
3248 | 360 | } | ||
3249 | 361 | |||
3250 | 362 | va_end (w); | ||
3251 | 363 | } | ||
3252 | 364 | |||
3253 | 365 | static void | ||
3254 | 366 | cc_sharing_panel_add_folder (GtkListBox *box, | ||
3255 | 367 | GtkListBoxRow *row, | ||
3256 | 368 | CcSharingPanel *self) | ||
3257 | 369 | { | ||
3258 | 370 | CcSharingPanelPrivate *priv = self->priv; | ||
3259 | 371 | GtkWidget *dialog; | ||
3260 | 372 | gchar *folder = NULL; | ||
3261 | 373 | gboolean matching = FALSE; | ||
3262 | 374 | GList *rows, *l; | ||
3263 | 375 | |||
3264 | 376 | if (!GPOINTER_TO_INT (g_object_get_data (G_OBJECT (row), "is-add"))) | ||
3265 | 377 | return; | ||
3266 | 378 | |||
3267 | 379 | dialog = gtk_file_chooser_dialog_new (_("Choose a Folder"), | ||
3268 | 380 | GTK_WINDOW (gtk_widget_get_toplevel (GTK_WIDGET (box))), | ||
3269 | 381 | GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER, | ||
3270 | 382 | _("_Cancel"), GTK_RESPONSE_CANCEL, | ||
3271 | 383 | _("_Open"), GTK_RESPONSE_ACCEPT, | ||
3272 | 384 | NULL); | ||
3273 | 385 | gtk_file_chooser_set_local_only (GTK_FILE_CHOOSER (dialog), FALSE); | ||
3274 | 386 | if (gtk_dialog_run (GTK_DIALOG (dialog)) != GTK_RESPONSE_ACCEPT) | ||
3275 | 387 | goto bail; | ||
3276 | 388 | |||
3277 | 389 | gtk_widget_hide (dialog); | ||
3278 | 390 | |||
3279 | 391 | box = GTK_LIST_BOX (WID ("shared-folders-listbox")); | ||
3280 | 392 | rows = gtk_container_get_children (GTK_CONTAINER (box)); | ||
3281 | 393 | |||
3282 | 394 | folder = gtk_file_chooser_get_uri (GTK_FILE_CHOOSER (dialog)); | ||
3283 | 395 | if (!folder || g_str_equal (folder, "")) | ||
3284 | 396 | goto bail; | ||
3285 | 397 | |||
3286 | 398 | g_debug ("Trying to add %s", folder); | ||
3287 | 399 | |||
3288 | 400 | for (l = rows; l != NULL; l = l->next) | ||
3289 | 401 | { | ||
3290 | 402 | const char *string; | ||
3291 | 403 | |||
3292 | 404 | string = g_object_get_data (G_OBJECT (l->data), "path"); | ||
3293 | 405 | matching = (g_strcmp0 (string, folder) == 0); | ||
3294 | 406 | |||
3295 | 407 | if (matching) | ||
3296 | 408 | { | ||
3297 | 409 | g_debug ("Found a duplicate for %s", folder); | ||
3298 | 410 | break; | ||
3299 | 411 | } | ||
3300 | 412 | } | ||
3301 | 413 | |||
3302 | 414 | if (!matching) | ||
3303 | 415 | { | ||
3304 | 416 | GtkWidget *row; | ||
3305 | 417 | int i; | ||
3306 | 418 | |||
3307 | 419 | row = cc_sharing_panel_new_media_sharing_row (folder, self); | ||
3308 | 420 | i = g_list_length (rows); | ||
3309 | 421 | gtk_list_box_insert (GTK_LIST_BOX (box), row, i - 1); | ||
3310 | 422 | } | ||
3311 | 423 | cc_list_box_adjust_scrolling (GTK_LIST_BOX (box)); | ||
3312 | 424 | |||
3313 | 425 | bail: | ||
3314 | 426 | g_free (folder); | ||
3315 | 427 | gtk_widget_destroy (dialog); | ||
3316 | 428 | } | ||
3317 | 429 | |||
3318 | 430 | static void | ||
3319 | 431 | cc_sharing_panel_remove_folder (GtkButton *button, | ||
3320 | 432 | CcSharingPanel *self) | ||
3321 | 433 | { | ||
3322 | 434 | CcSharingPanelPrivate *priv = self->priv; | ||
3323 | 435 | GtkWidget *row; | ||
3324 | 436 | |||
3325 | 437 | row = g_object_get_data (G_OBJECT (button), "row"); | ||
3326 | 438 | gtk_widget_destroy (row); | ||
3327 | 439 | cc_list_box_adjust_scrolling (GTK_LIST_BOX (WID ("shared-folders-listbox"))); | ||
3328 | 440 | } | ||
3329 | 441 | |||
3330 | 442 | static void | ||
3331 | 443 | cc_sharing_panel_media_sharing_dialog_response (GtkDialog *dialog, | ||
3332 | 444 | gint reponse_id, | ||
3333 | 445 | CcSharingPanel *self) | ||
3334 | 446 | { | ||
3335 | 447 | CcSharingPanelPrivate *priv = self->priv; | ||
3336 | 448 | GPtrArray *folders; | ||
3337 | 449 | GtkWidget *box; | ||
3338 | 450 | GList *rows, *l; | ||
3339 | 451 | |||
3340 | 452 | box = WID ("shared-folders-listbox"); | ||
3341 | 453 | rows = gtk_container_get_children (GTK_CONTAINER (box)); | ||
3342 | 454 | folders = g_ptr_array_new_with_free_func (g_free); | ||
3343 | 455 | |||
3344 | 456 | for (l = rows; l != NULL; l = l->next) | ||
3345 | 457 | { | ||
3346 | 458 | const char *folder; | ||
3347 | 459 | |||
3348 | 460 | folder = g_object_get_data (G_OBJECT (l->data), "path"); | ||
3349 | 461 | if (folder == NULL) | ||
3350 | 462 | continue; | ||
3351 | 463 | g_ptr_array_add (folders, g_strdup (folder)); | ||
3352 | 464 | } | ||
3353 | 465 | |||
3354 | 466 | g_ptr_array_add (folders, NULL); | ||
3355 | 467 | |||
3356 | 468 | cc_media_sharing_set_preferences ((gchar **) folders->pdata); | ||
3357 | 469 | |||
3358 | 470 | g_ptr_array_free (folders, TRUE); | ||
3359 | 471 | } | ||
3360 | 472 | |||
3361 | 473 | #define ICON_NAME_FOLDER "folder-symbolic" | ||
3362 | 474 | #define ICON_NAME_FOLDER_DESKTOP "user-desktop-symbolic" | ||
3363 | 475 | #define ICON_NAME_FOLDER_DOCUMENTS "folder-documents-symbolic" | ||
3364 | 476 | #define ICON_NAME_FOLDER_DOWNLOAD "folder-download-symbolic" | ||
3365 | 477 | #define ICON_NAME_FOLDER_MUSIC "folder-music-symbolic" | ||
3366 | 478 | #define ICON_NAME_FOLDER_PICTURES "folder-pictures-symbolic" | ||
3367 | 479 | #define ICON_NAME_FOLDER_PUBLIC_SHARE "folder-publicshare-symbolic" | ||
3368 | 480 | #define ICON_NAME_FOLDER_TEMPLATES "folder-templates-symbolic" | ||
3369 | 481 | #define ICON_NAME_FOLDER_VIDEOS "folder-videos-symbolic" | ||
3370 | 482 | #define ICON_NAME_FOLDER_SAVED_SEARCH "folder-saved-search-symbolic" | ||
3371 | 483 | |||
3372 | 484 | static GIcon * | ||
3373 | 485 | special_directory_get_gicon (GUserDirectory directory) | ||
3374 | 486 | { | ||
3375 | 487 | #define ICON_CASE(x) \ | ||
3376 | 488 | case G_USER_DIRECTORY_ ## x: \ | ||
3377 | 489 | return g_themed_icon_new_with_default_fallbacks (ICON_NAME_FOLDER_ ## x); | ||
3378 | 490 | |||
3379 | 491 | switch (directory) | ||
3380 | 492 | { | ||
3381 | 493 | ICON_CASE (DESKTOP); | ||
3382 | 494 | ICON_CASE (DOCUMENTS); | ||
3383 | 495 | ICON_CASE (DOWNLOAD); | ||
3384 | 496 | ICON_CASE (MUSIC); | ||
3385 | 497 | ICON_CASE (PICTURES); | ||
3386 | 498 | ICON_CASE (PUBLIC_SHARE); | ||
3387 | 499 | ICON_CASE (TEMPLATES); | ||
3388 | 500 | ICON_CASE (VIDEOS); | ||
3389 | 501 | |||
3390 | 502 | default: | ||
3391 | 503 | return g_themed_icon_new_with_default_fallbacks (ICON_NAME_FOLDER); | ||
3392 | 504 | } | ||
3393 | 505 | |||
3394 | 506 | #undef ICON_CASE | ||
3395 | 507 | } | ||
3396 | 508 | |||
3397 | 509 | static GtkWidget * | ||
3398 | 510 | cc_sharing_panel_new_media_sharing_row (const char *uri_or_path, | ||
3399 | 511 | CcSharingPanel *self) | ||
3400 | 512 | { | ||
3401 | 513 | GtkWidget *row, *box, *w; | ||
3402 | 514 | GUserDirectory dir = G_USER_N_DIRECTORIES; | ||
3403 | 515 | GIcon *icon; | ||
3404 | 516 | guint i; | ||
3405 | 517 | char *basename, *path; | ||
3406 | 518 | GFile *file; | ||
3407 | 519 | |||
3408 | 520 | file = g_file_new_for_commandline_arg (uri_or_path); | ||
3409 | 521 | path = g_file_get_path (file); | ||
3410 | 522 | g_object_unref (file); | ||
3411 | 523 | |||
3412 | 524 | row = gtk_list_box_row_new (); | ||
3413 | 525 | box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0); | ||
3414 | 526 | gtk_container_set_border_width (GTK_CONTAINER (box), 12); | ||
3415 | 527 | gtk_container_add (GTK_CONTAINER (row), box); | ||
3416 | 528 | |||
3417 | 529 | /* Find the icon and create it */ | ||
3418 | 530 | for (i = 0; i < G_USER_N_DIRECTORIES; i++) | ||
3419 | 531 | { | ||
3420 | 532 | if (g_strcmp0 (path, g_get_user_special_dir (i)) == 0) | ||
3421 | 533 | { | ||
3422 | 534 | dir = i; | ||
3423 | 535 | break; | ||
3424 | 536 | } | ||
3425 | 537 | } | ||
3426 | 538 | |||
3427 | 539 | icon = special_directory_get_gicon (dir); | ||
3428 | 540 | w = gtk_image_new_from_gicon (icon, GTK_ICON_SIZE_MENU); | ||
3429 | 541 | gtk_widget_set_margin_end (w, 12); | ||
3430 | 542 | gtk_container_add (GTK_CONTAINER (box), w); | ||
3431 | 543 | g_object_unref (icon); | ||
3432 | 544 | |||
3433 | 545 | /* Label */ | ||
3434 | 546 | basename = g_filename_display_basename (path); | ||
3435 | 547 | w = gtk_label_new (basename); | ||
3436 | 548 | g_free (basename); | ||
3437 | 549 | gtk_container_add (GTK_CONTAINER (box), w); | ||
3438 | 550 | |||
3439 | 551 | /* Remove button */ | ||
3440 | 552 | w = gtk_button_new_from_icon_name ("window-close-symbolic", GTK_ICON_SIZE_SMALL_TOOLBAR); | ||
3441 | 553 | gtk_button_set_relief (GTK_BUTTON (w), GTK_RELIEF_NONE); | ||
3442 | 554 | gtk_widget_set_margin_top (w, 3); | ||
3443 | 555 | gtk_widget_set_margin_bottom (w, 3); | ||
3444 | 556 | gtk_widget_set_margin_end (w, 12); | ||
3445 | 557 | gtk_widget_set_valign (w, GTK_ALIGN_CENTER); | ||
3446 | 558 | gtk_box_pack_end (GTK_BOX (box), w, FALSE, FALSE, 0); | ||
3447 | 559 | g_signal_connect (G_OBJECT (w), "clicked", | ||
3448 | 560 | G_CALLBACK (cc_sharing_panel_remove_folder), self); | ||
3449 | 561 | g_object_set_data (G_OBJECT (w), "row", row); | ||
3450 | 562 | |||
3451 | 563 | g_object_set_data_full (G_OBJECT (row), "path", path, g_free); | ||
3452 | 564 | |||
3453 | 565 | gtk_widget_show_all (row); | ||
3454 | 566 | |||
3455 | 567 | return row; | ||
3456 | 568 | } | ||
3457 | 569 | |||
3458 | 570 | static GtkWidget * | ||
3459 | 571 | cc_sharing_panel_new_add_media_sharing_row (CcSharingPanel *self) | ||
3460 | 572 | { | ||
3461 | 573 | GtkWidget *row, *box, *w; | ||
3462 | 574 | |||
3463 | 575 | row = gtk_list_box_row_new (); | ||
3464 | 576 | box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0); | ||
3465 | 577 | gtk_container_set_border_width (GTK_CONTAINER (box), 12); | ||
3466 | 578 | gtk_container_add (GTK_CONTAINER (row), box); | ||
3467 | 579 | |||
3468 | 580 | w = gtk_image_new_from_icon_name ("list-add-symbolic", GTK_ICON_SIZE_SMALL_TOOLBAR); | ||
3469 | 581 | gtk_container_add (GTK_CONTAINER (box), w); | ||
3470 | 582 | gtk_widget_set_hexpand (w, TRUE); | ||
3471 | 583 | gtk_widget_set_margin_top (w, 6); | ||
3472 | 584 | gtk_widget_set_margin_bottom (w, 6); | ||
3473 | 585 | |||
3474 | 586 | g_object_set_data (G_OBJECT (w), "row", row); | ||
3475 | 587 | |||
3476 | 588 | g_object_set_data (G_OBJECT (row), "is-add", GINT_TO_POINTER (1)); | ||
3477 | 589 | gtk_widget_show_all (row); | ||
3478 | 590 | |||
3479 | 591 | return row; | ||
3480 | 592 | } | ||
3481 | 593 | |||
3482 | 594 | static void | ||
3483 | 595 | cc_sharing_panel_setup_media_sharing_dialog (CcSharingPanel *self) | ||
3484 | 596 | { | ||
3485 | 597 | CcSharingPanelPrivate *priv = self->priv; | ||
3486 | 598 | gchar **folders, **list; | ||
3487 | 599 | GtkWidget *box, *networks, *grid, *w; | ||
3488 | 600 | char *path; | ||
3489 | 601 | |||
3490 | 602 | path = g_find_program_in_path ("rygel"); | ||
3491 | 603 | if (path == NULL) | ||
3492 | 604 | { | ||
3493 | 605 | gtk_widget_hide (WID ("media-sharing-button")); | ||
3494 | 606 | return; | ||
3495 | 607 | } | ||
3496 | 608 | g_free (path); | ||
3497 | 609 | |||
3498 | 610 | g_signal_connect (WID ("media-sharing-dialog"), "response", | ||
3499 | 611 | G_CALLBACK (cc_sharing_panel_media_sharing_dialog_response), | ||
3500 | 612 | self); | ||
3501 | 613 | |||
3502 | 614 | cc_media_sharing_get_preferences (&folders); | ||
3503 | 615 | |||
3504 | 616 | box = WID ("shared-folders-listbox"); | ||
3505 | 617 | gtk_list_box_set_header_func (GTK_LIST_BOX (box), | ||
3506 | 618 | cc_list_box_update_header_func, NULL, | ||
3507 | 619 | NULL); | ||
3508 | 620 | cc_list_box_setup_scrolling (GTK_LIST_BOX (box), 3); | ||
3509 | 621 | |||
3510 | 622 | list = folders; | ||
3511 | 623 | while (list && *list) | ||
3512 | 624 | { | ||
3513 | 625 | GtkWidget *row; | ||
3514 | 626 | |||
3515 | 627 | row = cc_sharing_panel_new_media_sharing_row (*list, self); | ||
3516 | 628 | gtk_list_box_insert (GTK_LIST_BOX (box), row, -1); | ||
3517 | 629 | list++; | ||
3518 | 630 | } | ||
3519 | 631 | |||
3520 | 632 | gtk_list_box_insert (GTK_LIST_BOX (box), | ||
3521 | 633 | cc_sharing_panel_new_add_media_sharing_row (self), -1); | ||
3522 | 634 | |||
3523 | 635 | cc_list_box_adjust_scrolling (GTK_LIST_BOX (box)); | ||
3524 | 636 | |||
3525 | 637 | g_signal_connect (G_OBJECT (box), "row-activated", | ||
3526 | 638 | G_CALLBACK (cc_sharing_panel_add_folder), self); | ||
3527 | 639 | |||
3528 | 640 | |||
3529 | 641 | g_strfreev (folders); | ||
3530 | 642 | |||
3531 | 643 | networks = cc_sharing_networks_new (self->priv->sharing_proxy, "rygel"); | ||
3532 | 644 | grid = WID ("grid4"); | ||
3533 | 645 | gtk_grid_attach (GTK_GRID (grid), networks, 0, 4, 2, 1); | ||
3534 | 646 | gtk_widget_show (networks); | ||
3535 | 647 | |||
3536 | 648 | w = cc_sharing_switch_new (networks); | ||
3537 | 649 | gtk_header_bar_pack_start (GTK_HEADER_BAR (WID ("media-sharing-headerbar")), w); | ||
3538 | 650 | self->priv->media_sharing_switch = w; | ||
3539 | 651 | |||
3540 | 652 | cc_sharing_panel_bind_networks_to_label (self, networks, | ||
3541 | 653 | WID ("media-sharing-status-label")); | ||
3542 | 654 | } | ||
3543 | 655 | |||
3544 | 656 | static gboolean | ||
3545 | 657 | cc_sharing_panel_label_activate_link (GtkLabel *label, | ||
3546 | 658 | gchar *uri, | ||
3547 | 659 | GtkMenu *menu) | ||
3548 | 660 | { | ||
3549 | 661 | gtk_menu_popup (menu, NULL, NULL, NULL, NULL, 0, gtk_get_current_event_time ()); | ||
3550 | 662 | |||
3551 | 663 | g_object_set_data_full (G_OBJECT (menu), "uri-text", g_strdup (uri), g_free); | ||
3552 | 664 | |||
3553 | 665 | return TRUE; | ||
3554 | 666 | } | ||
3555 | 667 | |||
3556 | 668 | static void | ||
3557 | 669 | copy_uri_to_clipboard (GtkMenuItem *item, | ||
3558 | 670 | GtkMenu *menu) | ||
3559 | 671 | { | ||
3560 | 672 | GtkClipboard *clipboard; | ||
3561 | 673 | const gchar *text; | ||
3562 | 674 | |||
3563 | 675 | text = g_object_get_data (G_OBJECT (menu), "uri-text"); | ||
3564 | 676 | |||
3565 | 677 | clipboard = gtk_clipboard_get (GDK_SELECTION_CLIPBOARD); | ||
3566 | 678 | gtk_clipboard_set_text (clipboard, text, -1); | ||
3567 | 679 | } | ||
3568 | 680 | |||
3569 | 681 | static void | ||
3570 | 682 | cc_sharing_panel_setup_label (CcSharingPanel *self, | ||
3571 | 683 | GtkWidget *label, | ||
3572 | 684 | const gchar *hostname) | ||
3573 | 685 | { | ||
3574 | 686 | CcSharingPanelPrivate *priv = self->priv; | ||
3575 | 687 | gchar *text; | ||
3576 | 688 | |||
3577 | 689 | if (label == WID ("personal-file-sharing-label")) | ||
3578 | 690 | text = g_strdup_printf (_("Personal File Sharing allows you to share your Public folder with others on your current network using: <a href=\"dav://%s\">dav://%s</a>"), hostname, hostname); | ||
3579 | 691 | else if (label == WID ("remote-login-label")) | ||
3580 | 692 | text = g_strdup_printf (_("When remote login is enabled, remote users can connect using the Secure Shell command:\n<a href=\"ssh %s\">ssh %s</a>"), hostname, hostname); | ||
3581 | 693 | else if (label == WID ("screen-sharing-label")) | ||
3582 | 694 | text = g_strdup_printf (_("Screen sharing allows remote users to view or control your screen by connecting to <a href=\"vnc://%s\">vnc://%s</a>"), hostname, hostname); | ||
3583 | 695 | else | ||
3584 | 696 | g_assert_not_reached (); | ||
3585 | 697 | |||
3586 | 698 | gtk_label_set_label (GTK_LABEL (label), text); | ||
3587 | 699 | |||
3588 | 700 | g_free (text); | ||
3589 | 701 | } | ||
3590 | 702 | |||
3591 | 703 | typedef struct | ||
3592 | 704 | { | ||
3593 | 705 | CcSharingPanel *panel; | ||
3594 | 706 | GtkWidget *label; | ||
3595 | 707 | } GetHostNameData; | ||
3596 | 708 | |||
3597 | 709 | static void | ||
3598 | 710 | cc_sharing_panel_get_host_name_fqdn_done (GDBusConnection *connection, | ||
3599 | 711 | GAsyncResult *res, | ||
3600 | 712 | GetHostNameData *data) | ||
3601 | 713 | { | ||
3602 | 714 | GError *error = NULL; | ||
3603 | 715 | GVariant *variant; | ||
3604 | 716 | const gchar *fqdn; | ||
3605 | 717 | |||
3606 | 718 | variant = g_dbus_connection_call_finish (connection, res, &error); | ||
3607 | 719 | |||
3608 | 720 | if (variant == NULL) | ||
3609 | 721 | { | ||
3610 | 722 | /* Avahi service may not be available */ | ||
3611 | 723 | g_debug ("Error calling GetHostNameFqdn: %s", error->message); | ||
3612 | 724 | |||
3613 | 725 | if (!g_error_matches (error, G_IO_ERROR, G_IO_ERROR_CANCELLED)) | ||
3614 | 726 | { | ||
3615 | 727 | gchar *hostname; | ||
3616 | 728 | |||
3617 | 729 | hostname = cc_hostname_entry_get_hostname (CC_HOSTNAME_ENTRY (data->panel->priv->hostname_entry)); | ||
3618 | 730 | |||
3619 | 731 | cc_sharing_panel_setup_label (data->panel, data->label, hostname); | ||
3620 | 732 | |||
3621 | 733 | g_free (hostname); | ||
3622 | 734 | } | ||
3623 | 735 | |||
3624 | 736 | g_free (data); | ||
3625 | 737 | g_error_free (error); | ||
3626 | 738 | return; | ||
3627 | 739 | } | ||
3628 | 740 | |||
3629 | 741 | g_variant_get (variant, "(&s)", &fqdn); | ||
3630 | 742 | |||
3631 | 743 | cc_sharing_panel_setup_label (data->panel, data->label, fqdn); | ||
3632 | 744 | |||
3633 | 745 | g_variant_unref (variant); | ||
3634 | 746 | g_object_unref (connection); | ||
3635 | 747 | g_free (data); | ||
3636 | 748 | } | ||
3637 | 749 | |||
3638 | 750 | static void | ||
3639 | 751 | cc_sharing_panel_bus_ready (GObject *object, | ||
3640 | 752 | GAsyncResult *res, | ||
3641 | 753 | GetHostNameData *data) | ||
3642 | 754 | { | ||
3643 | 755 | GDBusConnection *connection; | ||
3644 | 756 | GError *error = NULL; | ||
3645 | 757 | |||
3646 | 758 | connection = g_bus_get_finish (res, &error); | ||
3647 | 759 | |||
3648 | 760 | if (connection == NULL) | ||
3649 | 761 | { | ||
3650 | 762 | g_warning ("Could not connect to system bus: %s", error->message); | ||
3651 | 763 | |||
3652 | 764 | if (!g_error_matches (error, G_IO_ERROR, G_IO_ERROR_CANCELLED)) | ||
3653 | 765 | { | ||
3654 | 766 | gchar *hostname; | ||
3655 | 767 | |||
3656 | 768 | hostname = cc_hostname_entry_get_hostname (CC_HOSTNAME_ENTRY (data->panel->priv->hostname_entry)); | ||
3657 | 769 | |||
3658 | 770 | cc_sharing_panel_setup_label (data->panel, data->label, hostname); | ||
3659 | 771 | |||
3660 | 772 | g_free (hostname); | ||
3661 | 773 | } | ||
3662 | 774 | |||
3663 | 775 | g_error_free (error); | ||
3664 | 776 | g_free (data); | ||
3665 | 777 | return; | ||
3666 | 778 | } | ||
3667 | 779 | |||
3668 | 780 | g_dbus_connection_call (connection, | ||
3669 | 781 | "org.freedesktop.Avahi", | ||
3670 | 782 | "/", | ||
3671 | 783 | "org.freedesktop.Avahi.Server", | ||
3672 | 784 | "GetHostNameFqdn", | ||
3673 | 785 | NULL, | ||
3674 | 786 | (GVariantType*)"(s)", | ||
3675 | 787 | G_DBUS_CALL_FLAGS_NONE, | ||
3676 | 788 | -1, | ||
3677 | 789 | data->panel->priv->hostname_cancellable, | ||
3678 | 790 | (GAsyncReadyCallback) cc_sharing_panel_get_host_name_fqdn_done, | ||
3679 | 791 | data); | ||
3680 | 792 | } | ||
3681 | 793 | |||
3682 | 794 | |||
3683 | 795 | static void | ||
3684 | 796 | cc_sharing_panel_setup_label_with_hostname (CcSharingPanel *self, | ||
3685 | 797 | GtkWidget *label) | ||
3686 | 798 | { | ||
3687 | 799 | GtkWidget *menu; | ||
3688 | 800 | GtkWidget *menu_item; | ||
3689 | 801 | GetHostNameData *get_hostname_data; | ||
3690 | 802 | |||
3691 | 803 | /* create the menu */ | ||
3692 | 804 | menu = gtk_menu_new (); | ||
3693 | 805 | |||
3694 | 806 | menu_item = gtk_menu_item_new_with_label (_("Copy")); | ||
3695 | 807 | gtk_widget_show (menu_item); | ||
3696 | 808 | |||
3697 | 809 | g_signal_connect (menu_item, "activate", G_CALLBACK (copy_uri_to_clipboard), | ||
3698 | 810 | menu); | ||
3699 | 811 | |||
3700 | 812 | gtk_menu_shell_append (GTK_MENU_SHELL (menu), menu_item); | ||
3701 | 813 | |||
3702 | 814 | /* show the menu when the link is activated */ | ||
3703 | 815 | g_signal_connect (label, "activate-link", | ||
3704 | 816 | G_CALLBACK (cc_sharing_panel_label_activate_link), menu); | ||
3705 | 817 | |||
3706 | 818 | /* destroy the menu when the label is destroyed */ | ||
3707 | 819 | g_signal_connect_swapped (label, "destroy", G_CALLBACK (gtk_widget_destroy), | ||
3708 | 820 | menu); | ||
3709 | 821 | |||
3710 | 822 | |||
3711 | 823 | /* set the hostname */ | ||
3712 | 824 | get_hostname_data = g_new (GetHostNameData, 1); | ||
3713 | 825 | get_hostname_data->panel = self; | ||
3714 | 826 | get_hostname_data->label = label; | ||
3715 | 827 | g_bus_get (G_BUS_TYPE_SYSTEM, | ||
3716 | 828 | self->priv->hostname_cancellable, | ||
3717 | 829 | (GAsyncReadyCallback) cc_sharing_panel_bus_ready, | ||
3718 | 830 | get_hostname_data); | ||
3719 | 831 | } | ||
3720 | 832 | |||
3721 | 833 | static gboolean | ||
3722 | 834 | file_sharing_get_require_password (GValue *value, | ||
3723 | 835 | GVariant *variant, | ||
3724 | 836 | gpointer user_data) | ||
3725 | 837 | { | ||
3726 | 838 | if (g_str_equal (g_variant_get_string (variant, NULL), "always")) | ||
3727 | 839 | g_value_set_boolean (value, TRUE); | ||
3728 | 840 | else | ||
3729 | 841 | g_value_set_boolean (value, FALSE); | ||
3730 | 842 | |||
3731 | 843 | return TRUE; | ||
3732 | 844 | } | ||
3733 | 845 | |||
3734 | 846 | static GVariant * | ||
3735 | 847 | file_sharing_set_require_password (const GValue *value, | ||
3736 | 848 | const GVariantType *type, | ||
3737 | 849 | gpointer user_data) | ||
3738 | 850 | { | ||
3739 | 851 | if (g_value_get_boolean (value)) | ||
3740 | 852 | return g_variant_new_string ("always"); | ||
3741 | 853 | else | ||
3742 | 854 | return g_variant_new_string ("never"); | ||
3743 | 855 | } | ||
3744 | 856 | |||
3745 | 857 | static void | ||
3746 | 858 | file_sharing_password_changed (GtkEntry *entry) | ||
3747 | 859 | { | ||
3748 | 860 | file_share_write_out_password (gtk_entry_get_text (entry)); | ||
3749 | 861 | } | ||
3750 | 862 | |||
3751 | 863 | static void | ||
3752 | 864 | cc_sharing_panel_setup_personal_file_sharing_dialog (CcSharingPanel *self) | ||
3753 | 865 | { | ||
3754 | 866 | CcSharingPanelPrivate *priv = self->priv; | ||
3755 | 867 | GSettings *settings; | ||
3756 | 868 | GtkWidget *networks, *grid, *w; | ||
3757 | 869 | |||
3758 | 870 | cc_sharing_panel_bind_switch_to_widgets (WID ("personal-file-sharing-require-password-switch"), | ||
3759 | 871 | WID ("personal-file-sharing-password-entry"), | ||
3760 | 872 | WID ("personal-file-sharing-password-label"), | ||
3761 | 873 | NULL); | ||
3762 | 874 | |||
3763 | 875 | cc_sharing_panel_setup_label_with_hostname (self, | ||
3764 | 876 | WID ("personal-file-sharing-label")); | ||
3765 | 877 | |||
3766 | 878 | /* the password cannot be read, so just make sure the entry is not empty */ | ||
3767 | 879 | gtk_entry_set_text (GTK_ENTRY (WID ("personal-file-sharing-password-entry")), | ||
3768 | 880 | "password"); | ||
3769 | 881 | |||
3770 | 882 | settings = g_settings_new (FILE_SHARING_SCHEMA_ID); | ||
3771 | 883 | g_settings_bind_with_mapping (settings, "require-password", | ||
3772 | 884 | WID ("personal-file-sharing-require-password-switch"), | ||
3773 | 885 | "active", | ||
3774 | 886 | G_SETTINGS_BIND_DEFAULT, | ||
3775 | 887 | file_sharing_get_require_password, | ||
3776 | 888 | file_sharing_set_require_password, NULL, NULL); | ||
3777 | 889 | |||
3778 | 890 | g_signal_connect (WID ("personal-file-sharing-password-entry"), | ||
3779 | 891 | "notify::text", G_CALLBACK (file_sharing_password_changed), | ||
3780 | 892 | NULL); | ||
3781 | 893 | |||
3782 | 894 | networks = cc_sharing_networks_new (self->priv->sharing_proxy, "gnome-user-share-webdav"); | ||
3783 | 895 | grid = WID ("grid2"); | ||
3784 | 896 | gtk_grid_attach (GTK_GRID (grid), networks, 0, 3, 2, 1); | ||
3785 | 897 | gtk_widget_show (networks); | ||
3786 | 898 | |||
3787 | 899 | w = cc_sharing_switch_new (networks); | ||
3788 | 900 | gtk_header_bar_pack_start (GTK_HEADER_BAR (WID ("personal-file-sharing-headerbar")), w); | ||
3789 | 901 | self->priv->personal_file_sharing_switch = w; | ||
3790 | 902 | |||
3791 | 903 | cc_sharing_panel_bind_networks_to_label (self, | ||
3792 | 904 | networks, | ||
3793 | 905 | WID ("personal-file-sharing-status-label")); | ||
3794 | 906 | } | ||
3795 | 907 | |||
3796 | 908 | static void | ||
3797 | 909 | remote_login_switch_activate (GtkSwitch *remote_login_switch, | ||
3798 | 910 | GParamSpec *pspec, | ||
3799 | 911 | CcSharingPanel *self) | ||
3800 | 912 | { | ||
3801 | 913 | cc_remote_login_set_enabled (self->priv->remote_login_cancellable, remote_login_switch); | ||
3802 | 914 | } | ||
3803 | 915 | |||
3804 | 916 | static void | ||
3805 | 917 | cc_sharing_panel_setup_remote_login_dialog (CcSharingPanel *self) | ||
3806 | 918 | { | ||
3807 | 919 | CcSharingPanelPrivate *priv = self->priv; | ||
3808 | 920 | |||
3809 | 921 | cc_sharing_panel_bind_switch_to_label (self, WID ("remote-login-switch"), | ||
3810 | 922 | WID ("remote-login-status-label")); | ||
3811 | 923 | |||
3812 | 924 | cc_sharing_panel_setup_label_with_hostname (self, WID ("remote-login-label")); | ||
3813 | 925 | |||
3814 | 926 | g_signal_connect (WID ("remote-login-switch"), "notify::active", | ||
3815 | 927 | G_CALLBACK (remote_login_switch_activate), self); | ||
3816 | 928 | gtk_widget_set_sensitive (WID ("remote-login-switch"), FALSE); | ||
3817 | 929 | |||
3818 | 930 | cc_remote_login_get_enabled (self->priv->remote_login_cancellable, | ||
3819 | 931 | GTK_SWITCH (WID ("remote-login-switch")), | ||
3820 | 932 | WID ("remote-login-button")); | ||
3821 | 933 | } | ||
3822 | 934 | |||
3823 | 935 | static gboolean | ||
3824 | 936 | cc_sharing_panel_check_schema_available (CcSharingPanel *self, | ||
3825 | 937 | const gchar *schema_id) | ||
3826 | 938 | { | ||
3827 | 939 | GSettingsSchemaSource *source; | ||
3828 | 940 | GSettingsSchema *schema; | ||
3829 | 941 | |||
3830 | 942 | source = g_settings_schema_source_get_default (); | ||
3831 | 943 | if (!source) | ||
3832 | 944 | return FALSE; | ||
3833 | 945 | |||
3834 | 946 | schema = g_settings_schema_source_lookup (source, schema_id, TRUE); | ||
3835 | 947 | if (!schema) | ||
3836 | 948 | return FALSE; | ||
3837 | 949 | |||
3838 | 950 | g_settings_schema_unref (schema); | ||
3839 | 951 | return TRUE; | ||
3840 | 952 | } | ||
3841 | 953 | |||
3842 | 954 | static void | ||
3843 | 955 | screen_sharing_show_cb (GtkWidget *widget, CcSharingPanel *self) | ||
3844 | 956 | { | ||
3845 | 957 | CcSharingPanelPrivate *priv = self->priv; | ||
3846 | 958 | |||
3847 | 959 | gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (WID ("show-password-checkbutton")), | ||
3848 | 960 | FALSE); | ||
3849 | 961 | } | ||
3850 | 962 | |||
3851 | 963 | static void | ||
3852 | 964 | screen_sharing_hide_cb (GtkWidget *widget, CcSharingPanel *self) | ||
3853 | 965 | { | ||
3854 | 966 | GtkToggleButton *ac_radio; | ||
3855 | 967 | GtkEntry *pw_entry; | ||
3856 | 968 | const gchar *password; | ||
3857 | 969 | CcSharingPanelPrivate *priv = self->priv; | ||
3858 | 970 | |||
3859 | 971 | ac_radio = GTK_TOGGLE_BUTTON (WID ("approve-connections-radiobutton")); | ||
3860 | 972 | pw_entry = GTK_ENTRY (WID ("remote-control-password-entry")); | ||
3861 | 973 | password = gtk_entry_get_text (pw_entry); | ||
3862 | 974 | |||
3863 | 975 | if (password == NULL || *password == '\0') | ||
3864 | 976 | gtk_toggle_button_set_active (ac_radio, TRUE); | ||
3865 | 977 | } | ||
3866 | 978 | |||
3867 | 979 | #define MAX_PASSWORD_SIZE 8 | ||
3868 | 980 | static void | ||
3869 | 981 | screen_sharing_password_insert_text_cb (GtkEditable *editable, | ||
3870 | 982 | gchar *new_text, | ||
3871 | 983 | gint new_text_length, | ||
3872 | 984 | gpointer position, | ||
3873 | 985 | gpointer user_data) | ||
3874 | 986 | { | ||
3875 | 987 | int l, available_size; | ||
3876 | 988 | |||
3877 | 989 | l = gtk_entry_buffer_get_bytes (gtk_entry_get_buffer (GTK_ENTRY (editable))); | ||
3878 | 990 | |||
3879 | 991 | if (l + new_text_length <= MAX_PASSWORD_SIZE) | ||
3880 | 992 | return; | ||
3881 | 993 | |||
3882 | 994 | g_signal_stop_emission_by_name (editable, "insert-text"); | ||
3883 | 995 | gtk_widget_error_bell (GTK_WIDGET (editable)); | ||
3884 | 996 | |||
3885 | 997 | available_size = g_utf8_strlen (new_text, MAX_PASSWORD_SIZE - l); | ||
3886 | 998 | if (available_size == 0) | ||
3887 | 999 | return; | ||
3888 | 1000 | |||
3889 | 1001 | g_signal_handlers_block_by_func (editable, | ||
3890 | 1002 | (gpointer) screen_sharing_password_insert_text_cb, | ||
3891 | 1003 | user_data); | ||
3892 | 1004 | gtk_editable_insert_text (editable, new_text, available_size, position); | ||
3893 | 1005 | g_signal_handlers_unblock_by_func (editable, | ||
3894 | 1006 | (gpointer) screen_sharing_password_insert_text_cb, | ||
3895 | 1007 | user_data); | ||
3896 | 1008 | } | ||
3897 | 1009 | #undef MAX_PASSWORD_SIZE | ||
3898 | 1010 | |||
3899 | 1011 | static void | ||
3900 | 1012 | cc_sharing_panel_setup_screen_sharing_dialog_vino (CcSharingPanel *self) | ||
3901 | 1013 | { | ||
3902 | 1014 | CcSharingPanelPrivate *priv = self->priv; | ||
3903 | 1015 | GSettings *settings; | ||
3904 | 1016 | GtkWidget *networks, *box, *w; | ||
3905 | 1017 | |||
3906 | 1018 | cc_sharing_panel_bind_switch_to_widgets (WID ("require-password-radiobutton"), | ||
3907 | 1019 | WID ("password-grid"), | ||
3908 | 1020 | NULL); | ||
3909 | 1021 | |||
3910 | 1022 | cc_sharing_panel_setup_label_with_hostname (self, | ||
3911 | 1023 | WID ("screen-sharing-label")); | ||
3912 | 1024 | |||
3913 | 1025 | /* settings bindings */ | ||
3914 | 1026 | settings = g_settings_new (VINO_SCHEMA_ID); | ||
3915 | 1027 | g_settings_bind (settings, "view-only", WID ("remote-control-checkbutton"), | ||
3916 | 1028 | "active", | ||
3917 | 1029 | G_SETTINGS_BIND_DEFAULT | G_SETTINGS_BIND_INVERT_BOOLEAN); | ||
3918 | 1030 | g_settings_bind (settings, "prompt-enabled", | ||
3919 | 1031 | WID ("approve-connections-radiobutton"), "active", | ||
3920 | 1032 | G_SETTINGS_BIND_DEFAULT); | ||
3921 | 1033 | g_settings_bind_with_mapping (settings, "authentication-methods", | ||
3922 | 1034 | WID ("require-password-radiobutton"), | ||
3923 | 1035 | "active", | ||
3924 | 1036 | G_SETTINGS_BIND_DEFAULT, | ||
3925 | 1037 | vino_get_authtype, vino_set_authtype, NULL, NULL); | ||
3926 | 1038 | |||
3927 | 1039 | g_settings_bind_with_mapping (settings, "vnc-password", | ||
3928 | 1040 | WID ("remote-control-password-entry"), | ||
3929 | 1041 | "text", | ||
3930 | 1042 | G_SETTINGS_BIND_DEFAULT, | ||
3931 | 1043 | vino_get_password, vino_set_password, NULL, NULL); | ||
3932 | 1044 | |||
3933 | 1045 | g_object_bind_property (WID ("show-password-checkbutton"), "active", | ||
3934 | 1046 | WID ("remote-control-password-entry"), "visibility", | ||
3935 | 1047 | G_BINDING_SYNC_CREATE); | ||
3936 | 1048 | |||
3937 | 1049 | /* make sure the password entry is hidden by default */ | ||
3938 | 1050 | g_signal_connect (priv->screen_sharing_dialog, "show", | ||
3939 | 1051 | G_CALLBACK (screen_sharing_show_cb), self); | ||
3940 | 1052 | |||
3941 | 1053 | g_signal_connect (priv->screen_sharing_dialog, "hide", | ||
3942 | 1054 | G_CALLBACK (screen_sharing_hide_cb), self); | ||
3943 | 1055 | |||
3944 | 1056 | /* accept at most 8 bytes in password entry */ | ||
3945 | 1057 | g_signal_connect (WID ("remote-control-password-entry"), "insert-text", | ||
3946 | 1058 | G_CALLBACK (screen_sharing_password_insert_text_cb), self); | ||
3947 | 1059 | |||
3948 | 1060 | networks = cc_sharing_networks_new (self->priv->sharing_proxy, "vino-server"); | ||
3949 | 1061 | box = WID ("remote-control-box"); | ||
3950 | 1062 | gtk_box_pack_end (GTK_BOX (box), networks, TRUE, TRUE, 0); | ||
3951 | 1063 | gtk_widget_show (networks); | ||
3952 | 1064 | |||
3953 | 1065 | w = cc_sharing_switch_new (networks); | ||
3954 | 1066 | gtk_header_bar_pack_start (GTK_HEADER_BAR (WID ("screen-sharing-headerbar")), w); | ||
3955 | 1067 | self->priv->screen_sharing_switch = w; | ||
3956 | 1068 | |||
3957 | 1069 | cc_sharing_panel_bind_networks_to_label (self, networks, | ||
3958 | 1070 | WID ("screen-sharing-status-label")); | ||
3959 | 1071 | } | ||
3960 | 1072 | |||
3961 | 1073 | static void | ||
3962 | 1074 | cc_sharing_panel_setup_screen_sharing_dialog_gnome_remote_desktop (CcSharingPanel *self) | ||
3963 | 1075 | { | ||
3964 | 1076 | CcSharingPanelPrivate *priv = self->priv; | ||
3965 | 1077 | GtkWidget *networks, *w; | ||
3966 | 1078 | |||
3967 | 1079 | networks = cc_sharing_networks_new (self->priv->sharing_proxy, "gnome-remote-desktop"); | ||
3968 | 1080 | gtk_widget_hide (WID ("remote-control-box")); | ||
3969 | 1081 | gtk_grid_attach (GTK_GRID (WID ("grid3")), networks, 0, 1, 2, 1); | ||
3970 | 1082 | gtk_widget_show (networks); | ||
3971 | 1083 | |||
3972 | 1084 | w = cc_sharing_switch_new (networks); | ||
3973 | 1085 | gtk_header_bar_pack_start (GTK_HEADER_BAR (WID ("screen-sharing-headerbar")), w); | ||
3974 | 1086 | self->priv->screen_sharing_switch = w; | ||
3975 | 1087 | |||
3976 | 1088 | cc_sharing_panel_bind_networks_to_label (self, networks, | ||
3977 | 1089 | WID ("screen-sharing-status-label")); | ||
3978 | 1090 | } | ||
3979 | 1091 | |||
3980 | 1092 | static void | ||
3981 | 1093 | remote_desktop_name_appeared (GDBusConnection *connection, | ||
3982 | 1094 | const gchar *name, | ||
3983 | 1095 | const gchar *name_owner, | ||
3984 | 1096 | gpointer user_data) | ||
3985 | 1097 | { | ||
3986 | 1098 | CcSharingPanel *self = CC_SHARING_PANEL (user_data); | ||
3987 | 1099 | CcSharingPanelPrivate *priv = self->priv; | ||
3988 | 1100 | |||
3989 | 1101 | g_bus_unwatch_name (priv->remote_desktop_name_watch); | ||
3990 | 1102 | priv->remote_desktop_name_watch = 0; | ||
3991 | 1103 | |||
3992 | 1104 | cc_sharing_panel_setup_screen_sharing_dialog_gnome_remote_desktop (self); | ||
3993 | 1105 | gtk_widget_show (WID ("screen-sharing-button")); | ||
3994 | 1106 | } | ||
3995 | 1107 | |||
3996 | 1108 | static void | ||
3997 | 1109 | check_remote_desktop_available (CcSharingPanel *self) | ||
3998 | 1110 | { | ||
3999 | 1111 | CcSharingPanelPrivate *priv = self->priv; | ||
4000 | 1112 | |||
4001 | 1113 | if (!cc_sharing_panel_check_schema_available (self, GNOME_REMOTE_DESKTOP_SCHEMA_ID)) | ||
4002 | 1114 | return; | ||
4003 | 1115 | |||
4004 | 1116 | priv->remote_desktop_name_watch = g_bus_watch_name (G_BUS_TYPE_SESSION, | ||
4005 | 1117 | "org.gnome.Mutter.RemoteDesktop", | ||
4006 | 1118 | G_BUS_NAME_WATCHER_FLAGS_NONE, | ||
4007 | 1119 | remote_desktop_name_appeared, | ||
4008 | 1120 | NULL, | ||
4009 | 1121 | self, | ||
4010 | 1122 | NULL); | ||
4011 | 1123 | } | ||
4012 | 1124 | |||
4013 | 1125 | static void | ||
4014 | 1126 | sharing_proxy_ready (GObject *source, | ||
4015 | 1127 | GAsyncResult *res, | ||
4016 | 1128 | gpointer user_data) | ||
4017 | 1129 | { | ||
4018 | 1130 | CcSharingPanel *self; | ||
4019 | 1131 | CcSharingPanelPrivate *priv; | ||
4020 | 1132 | GDBusProxy *proxy; | ||
4021 | 1133 | GError *error = NULL; | ||
4022 | 1134 | |||
4023 | 1135 | proxy = G_DBUS_PROXY (gsd_sharing_proxy_new_for_bus_finish (res, &error)); | ||
4024 | 1136 | if (!proxy) { | ||
4025 | 1137 | if (!g_error_matches (error, G_IO_ERROR, G_IO_ERROR_CANCELLED)) | ||
4026 | 1138 | g_warning ("Failed to get sharing proxy: %s", error->message); | ||
4027 | 1139 | g_error_free (error); | ||
4028 | 1140 | return; | ||
4029 | 1141 | } | ||
4030 | 1142 | |||
4031 | 1143 | self = CC_SHARING_PANEL (user_data); | ||
4032 | 1144 | priv = self->priv; | ||
4033 | 1145 | priv->sharing_proxy = proxy; | ||
4034 | 1146 | |||
4035 | 1147 | /* media sharing */ | ||
4036 | 1148 | cc_sharing_panel_setup_media_sharing_dialog (self); | ||
4037 | 1149 | |||
4038 | 1150 | /* personal file sharing */ | ||
4039 | 1151 | if (cc_sharing_panel_check_schema_available (self, FILE_SHARING_SCHEMA_ID)) | ||
4040 | 1152 | cc_sharing_panel_setup_personal_file_sharing_dialog (self); | ||
4041 | 1153 | else | ||
4042 | 1154 | gtk_widget_hide (WID ("personal-file-sharing-button")); | ||
4043 | 1155 | |||
4044 | 1156 | /* remote login */ | ||
4045 | 1157 | cc_sharing_panel_setup_remote_login_dialog (self); | ||
4046 | 1158 | |||
4047 | 1159 | /* screen sharing */ | ||
4048 | 1160 | #ifdef GDK_WINDOWING_WAYLAND | ||
4049 | 1161 | if (GDK_IS_WAYLAND_DISPLAY (gdk_display_get_default ())) | ||
4050 | 1162 | { | ||
4051 | 1163 | check_remote_desktop_available (self); | ||
4052 | 1164 | gtk_widget_hide (WID ("screen-sharing-button")); | ||
4053 | 1165 | } | ||
4054 | 1166 | else | ||
4055 | 1167 | #endif | ||
4056 | 1168 | if (cc_sharing_panel_check_schema_available (self, VINO_SCHEMA_ID)) | ||
4057 | 1169 | cc_sharing_panel_setup_screen_sharing_dialog_vino (self); | ||
4058 | 1170 | else | ||
4059 | 1171 | gtk_widget_hide (WID ("screen-sharing-button")); | ||
4060 | 1172 | } | ||
4061 | 1173 | |||
4062 | 1174 | static void | ||
4063 | 1175 | cc_sharing_panel_init (CcSharingPanel *self) | ||
4064 | 1176 | { | ||
4065 | 1177 | CcSharingPanelPrivate *priv = self->priv = PANEL_PRIVATE (self); | ||
4066 | 1178 | GtkWidget *box; | ||
4067 | 1179 | GError *err = NULL; | ||
4068 | 1180 | gchar *objects[] = { | ||
4069 | 1181 | "sharing-panel", | ||
4070 | 1182 | "media-sharing-dialog", | ||
4071 | 1183 | "personal-file-sharing-dialog", | ||
4072 | 1184 | "remote-login-dialog", | ||
4073 | 1185 | "screen-sharing-dialog", | ||
4074 | 1186 | NULL }; | ||
4075 | 1187 | |||
4076 | 1188 | g_resources_register (cc_sharing_get_resource ()); | ||
4077 | 1189 | |||
4078 | 1190 | priv->builder = gtk_builder_new (); | ||
4079 | 1191 | |||
4080 | 1192 | gtk_builder_add_objects_from_resource (priv->builder, | ||
4081 | 1193 | "/org/gnome/control-center/sharing/sharing.ui", | ||
4082 | 1194 | objects, &err); | ||
4083 | 1195 | |||
4084 | 1196 | if (err) | ||
4085 | 1197 | g_error ("Error loading CcSharingPanel user interface: %s", err->message); | ||
4086 | 1198 | |||
4087 | 1199 | priv->hostname_entry = WID ("hostname-entry"); | ||
4088 | 1200 | |||
4089 | 1201 | gtk_container_add (GTK_CONTAINER (self), WID ("sharing-panel")); | ||
4090 | 1202 | |||
4091 | 1203 | g_signal_connect (WID ("main-list-box"), "row-activated", | ||
4092 | 1204 | G_CALLBACK (cc_sharing_panel_main_list_box_row_activated), self); | ||
4093 | 1205 | |||
4094 | 1206 | priv->hostname_cancellable = g_cancellable_new (); | ||
4095 | 1207 | |||
4096 | 1208 | priv->media_sharing_dialog = WID ("media-sharing-dialog"); | ||
4097 | 1209 | priv->personal_file_sharing_dialog = WID ("personal-file-sharing-dialog"); | ||
4098 | 1210 | priv->remote_login_dialog = WID ("remote-login-dialog"); | ||
4099 | 1211 | priv->remote_login_cancellable = g_cancellable_new (); | ||
4100 | 1212 | priv->screen_sharing_dialog = WID ("screen-sharing-dialog"); | ||
4101 | 1213 | |||
4102 | 1214 | g_signal_connect (priv->media_sharing_dialog, "response", | ||
4103 | 1215 | G_CALLBACK (gtk_widget_hide), NULL); | ||
4104 | 1216 | g_signal_connect (priv->personal_file_sharing_dialog, "response", | ||
4105 | 1217 | G_CALLBACK (gtk_widget_hide), NULL); | ||
4106 | 1218 | g_signal_connect (priv->remote_login_dialog, "response", | ||
4107 | 1219 | G_CALLBACK (gtk_widget_hide), NULL); | ||
4108 | 1220 | g_signal_connect (priv->screen_sharing_dialog, "response", | ||
4109 | 1221 | G_CALLBACK (gtk_widget_hide), NULL); | ||
4110 | 1222 | |||
4111 | 1223 | gtk_list_box_set_activate_on_single_click (GTK_LIST_BOX (WID ("main-list-box")), | ||
4112 | 1224 | TRUE); | ||
4113 | 1225 | gtk_list_box_set_header_func (GTK_LIST_BOX (WID ("main-list-box")), | ||
4114 | 1226 | cc_list_box_update_header_func, | ||
4115 | 1227 | NULL, NULL); | ||
4116 | 1228 | |||
4117 | 1229 | /* create the master switch */ | ||
4118 | 1230 | box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 6); | ||
4119 | 1231 | |||
4120 | 1232 | priv->master_switch = gtk_switch_new (); | ||
4121 | 1233 | atk_object_set_name (ATK_OBJECT (gtk_widget_get_accessible (priv->master_switch)), _("Sharing")); | ||
4122 | 1234 | gtk_widget_set_valign (priv->master_switch, GTK_ALIGN_CENTER); | ||
4123 | 1235 | gtk_box_pack_start (GTK_BOX (box), priv->master_switch, FALSE, FALSE, 4); | ||
4124 | 1236 | gtk_widget_show_all (box); | ||
4125 | 1237 | |||
4126 | 1238 | /* start the panel in the disabled state */ | ||
4127 | 1239 | gtk_switch_set_active (GTK_SWITCH (priv->master_switch), FALSE); | ||
4128 | 1240 | gtk_widget_set_sensitive (WID ("main-list-box"), FALSE); | ||
4129 | 1241 | g_signal_connect (priv->master_switch, "notify::active", | ||
4130 | 1242 | G_CALLBACK (cc_sharing_panel_master_switch_notify), self); | ||
4131 | 1243 | |||
4132 | 1244 | priv->sharing_proxy_cancellable = g_cancellable_new (); | ||
4133 | 1245 | gsd_sharing_proxy_new_for_bus (G_BUS_TYPE_SESSION, | ||
4134 | 1246 | G_DBUS_PROXY_FLAGS_NONE, | ||
4135 | 1247 | "org.gnome.SettingsDaemon.Sharing", | ||
4136 | 1248 | "/org/gnome/SettingsDaemon/Sharing", | ||
4137 | 1249 | priv->sharing_proxy_cancellable, | ||
4138 | 1250 | sharing_proxy_ready, | ||
4139 | 1251 | self); | ||
4140 | 1252 | |||
4141 | 1253 | /* make sure the hostname entry isn't focused by default */ | ||
4142 | 1254 | g_signal_connect_swapped (self, "map", G_CALLBACK (gtk_widget_grab_focus), | ||
4143 | 1255 | WID ("main-list-box")); | ||
4144 | 1256 | } | ||
4145 | 1257 | |||
4146 | 1258 | CcSharingPanel * | ||
4147 | 1259 | cc_sharing_panel_new (void) | ||
4148 | 1260 | { | ||
4149 | 1261 | return g_object_new (CC_TYPE_SHARING_PANEL, NULL); | ||
4150 | 1262 | } | ||
4151 | 1263 | |||
4152 | 1264 | /* ---------------------------------------------------------------------------------------------------- */ | ||
4153 | 1265 | |||
4154 | 1266 | void | ||
4155 | 1267 | cc_sharing_panel_register (GIOModule *module) | ||
4156 | 1268 | { | ||
4157 | 1269 | textdomain (GETTEXT_PACKAGE); | ||
4158 | 1270 | bindtextdomain (GETTEXT_PACKAGE, "/usr/share/locale"); | ||
4159 | 1271 | bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8"); | ||
4160 | 1272 | cc_sharing_panel_register_type (G_TYPE_MODULE (module)); | ||
4161 | 1273 | g_io_extension_point_implement (CC_SHELL_PANEL_EXTENSION_POINT, | ||
4162 | 1274 | CC_TYPE_SHARING_PANEL, | ||
4163 | 1275 | "sharing", 0); | ||
4164 | 1276 | } | ||
4165 | 0 | 1277 | ||
4166 | === added file 'panels/sharing/cc-sharing-panel.h' | |||
4167 | --- panels/sharing/cc-sharing-panel.h 1970-01-01 00:00:00 +0000 | |||
4168 | +++ panels/sharing/cc-sharing-panel.h 2018-11-21 12:36:03 +0000 | |||
4169 | @@ -0,0 +1,75 @@ | |||
4170 | 1 | /* | ||
4171 | 2 | * Copyright (C) 2013 Intel, Inc | ||
4172 | 3 | * | ||
4173 | 4 | * This program is free software; you can redistribute it and/or modify | ||
4174 | 5 | * it under the terms of the GNU General Public License as published by | ||
4175 | 6 | * the Free Software Foundation; either version 2 of the License, or | ||
4176 | 7 | * (at your option) any later version. | ||
4177 | 8 | * | ||
4178 | 9 | * This program is distributed in the hope that it will be useful, | ||
4179 | 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
4180 | 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
4181 | 12 | * GNU General Public License for more details. | ||
4182 | 13 | * | ||
4183 | 14 | * You should have received a copy of the GNU General Public License | ||
4184 | 15 | * along with this program; if not, write to the Free Software | ||
4185 | 16 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. | ||
4186 | 17 | * | ||
4187 | 18 | * Author: Thomas Wood <thomas.wood@intel.com> | ||
4188 | 19 | * | ||
4189 | 20 | */ | ||
4190 | 21 | |||
4191 | 22 | #ifndef __CC_SHARING_PANEL_H__ | ||
4192 | 23 | #define __CC_SHARING_PANEL_H__ | ||
4193 | 24 | |||
4194 | 25 | #include <shell/cc-shell.h> | ||
4195 | 26 | |||
4196 | 27 | G_BEGIN_DECLS | ||
4197 | 28 | |||
4198 | 29 | #define CC_TYPE_SHARING_PANEL cc_sharing_panel_get_type() | ||
4199 | 30 | |||
4200 | 31 | #define CC_SHARING_PANEL(obj) \ | ||
4201 | 32 | (G_TYPE_CHECK_INSTANCE_CAST ((obj), \ | ||
4202 | 33 | CC_TYPE_SHARING_PANEL, CcSharingPanel)) | ||
4203 | 34 | |||
4204 | 35 | #define CC_SHARING_PANEL_CLASS(klass) \ | ||
4205 | 36 | (G_TYPE_CHECK_CLASS_CAST ((klass), \ | ||
4206 | 37 | CC_TYPE_SHARING_PANEL, CcSharingPanelClass)) | ||
4207 | 38 | |||
4208 | 39 | #define CC_SHARING_IS_PANEL(obj) \ | ||
4209 | 40 | (G_TYPE_CHECK_INSTANCE_TYPE ((obj), \ | ||
4210 | 41 | CC_TYPE_SHARING_PANEL)) | ||
4211 | 42 | |||
4212 | 43 | #define CC_SHARING_IS_PANEL_CLASS(klass) \ | ||
4213 | 44 | (G_TYPE_CHECK_CLASS_TYPE ((klass), \ | ||
4214 | 45 | CC_TYPE_SHARING_PANEL)) | ||
4215 | 46 | |||
4216 | 47 | #define CC_SHARING_PANEL_GET_CLASS(obj) \ | ||
4217 | 48 | (G_TYPE_INSTANCE_GET_CLASS ((obj), \ | ||
4218 | 49 | CC_TYPE_SHARING_PANEL, CcSharingPanelClass)) | ||
4219 | 50 | |||
4220 | 51 | typedef struct _CcSharingPanel CcSharingPanel; | ||
4221 | 52 | typedef struct _CcSharingPanelClass CcSharingPanelClass; | ||
4222 | 53 | typedef struct _CcSharingPanelPrivate CcSharingPanelPrivate; | ||
4223 | 54 | |||
4224 | 55 | struct _CcSharingPanel | ||
4225 | 56 | { | ||
4226 | 57 | CcPanel parent; | ||
4227 | 58 | |||
4228 | 59 | CcSharingPanelPrivate *priv; | ||
4229 | 60 | }; | ||
4230 | 61 | |||
4231 | 62 | struct _CcSharingPanelClass | ||
4232 | 63 | { | ||
4233 | 64 | CcPanelClass parent_class; | ||
4234 | 65 | }; | ||
4235 | 66 | |||
4236 | 67 | GType cc_sharing_panel_get_type (void) G_GNUC_CONST; | ||
4237 | 68 | |||
4238 | 69 | CcSharingPanel *cc_sharing_panel_new (void); | ||
4239 | 70 | |||
4240 | 71 | void cc_sharing_panel_register (GIOModule *module); | ||
4241 | 72 | |||
4242 | 73 | G_END_DECLS | ||
4243 | 74 | |||
4244 | 75 | #endif /* __CC_SHARING_PANEL_H__ */ | ||
4245 | 0 | 76 | ||
4246 | === added file 'panels/sharing/cc-sharing-resources.c' | |||
4247 | --- panels/sharing/cc-sharing-resources.c 1970-01-01 00:00:00 +0000 | |||
4248 | +++ panels/sharing/cc-sharing-resources.c 2018-11-21 12:36:03 +0000 | |||
4249 | @@ -0,0 +1,3781 @@ | |||
4250 | 1 | #include <gio/gio.h> | ||
4251 | 2 | |||
4252 | 3 | #if defined (__ELF__) && ( __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 6)) | ||
4253 | 4 | # define SECTION __attribute__ ((section (".gresource.cc_sharing"), aligned (8))) | ||
4254 | 5 | #else | ||
4255 | 6 | # define SECTION | ||
4256 | 7 | #endif | ||
4257 | 8 | |||
4258 | 9 | static const SECTION union { const guint8 data[28945]; const double alignment; void * const ptr;} cc_sharing_resource_data = { { | ||
4259 | 10 | 0x47, 0x56, 0x61, 0x72, 0x69, 0x61, 0x6e, 0x74, | ||
4260 | 11 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
4261 | 12 | 0x18, 0x00, 0x00, 0x00, 0xe4, 0x00, 0x00, 0x00, | ||
4262 | 13 | 0x00, 0x00, 0x00, 0x28, 0x07, 0x00, 0x00, 0x00, | ||
4263 | 14 | 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, | ||
4264 | 15 | 0x02, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, | ||
4265 | 16 | 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, | ||
4266 | 17 | 0x04, 0x00, 0x00, 0x00, 0xce, 0xd7, 0x2c, 0x8d, | ||
4267 | 18 | 0x04, 0x00, 0x00, 0x00, 0xe4, 0x00, 0x00, 0x00, | ||
4268 | 19 | 0x0f, 0x00, 0x4c, 0x00, 0xf4, 0x00, 0x00, 0x00, | ||
4269 | 20 | 0xf8, 0x00, 0x00, 0x00, 0x4b, 0x50, 0x90, 0x0b, | ||
4270 | 21 | 0x02, 0x00, 0x00, 0x00, 0xf8, 0x00, 0x00, 0x00, | ||
4271 | 22 | 0x04, 0x00, 0x4c, 0x00, 0xfc, 0x00, 0x00, 0x00, | ||
4272 | 23 | 0x00, 0x01, 0x00, 0x00, 0xd4, 0xb5, 0x02, 0x00, | ||
4273 | 24 | 0xff, 0xff, 0xff, 0xff, 0x00, 0x01, 0x00, 0x00, | ||
4274 | 25 | 0x01, 0x00, 0x4c, 0x00, 0x04, 0x01, 0x00, 0x00, | ||
4275 | 26 | 0x08, 0x01, 0x00, 0x00, 0xe9, 0xd8, 0x00, 0x8a, | ||
4276 | 27 | 0x00, 0x00, 0x00, 0x00, 0x08, 0x01, 0x00, 0x00, | ||
4277 | 28 | 0x08, 0x00, 0x4c, 0x00, 0x10, 0x01, 0x00, 0x00, | ||
4278 | 29 | 0x18, 0x01, 0x00, 0x00, 0xb0, 0xb7, 0x24, 0x30, | ||
4279 | 30 | 0x01, 0x00, 0x00, 0x00, 0x18, 0x01, 0x00, 0x00, | ||
4280 | 31 | 0x06, 0x00, 0x4c, 0x00, 0x20, 0x01, 0x00, 0x00, | ||
4281 | 32 | 0x24, 0x01, 0x00, 0x00, 0x41, 0x21, 0xeb, 0x90, | ||
4282 | 33 | 0x03, 0x00, 0x00, 0x00, 0x24, 0x01, 0x00, 0x00, | ||
4283 | 34 | 0x0a, 0x00, 0x76, 0x00, 0x30, 0x01, 0x00, 0x00, | ||
4284 | 35 | 0xf9, 0x6a, 0x00, 0x00, 0x52, 0xb2, 0x84, 0x21, | ||
4285 | 36 | 0x03, 0x00, 0x00, 0x00, 0xf9, 0x6a, 0x00, 0x00, | ||
4286 | 37 | 0x0b, 0x00, 0x76, 0x00, 0x08, 0x6b, 0x00, 0x00, | ||
4287 | 38 | 0x11, 0x71, 0x00, 0x00, 0x63, 0x6f, 0x6e, 0x74, | ||
4288 | 39 | 0x72, 0x6f, 0x6c, 0x2d, 0x63, 0x65, 0x6e, 0x74, | ||
4289 | 40 | 0x65, 0x72, 0x2f, 0x00, 0x03, 0x00, 0x00, 0x00, | ||
4290 | 41 | 0x6f, 0x72, 0x67, 0x2f, 0x04, 0x00, 0x00, 0x00, | ||
4291 | 42 | 0x2f, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, | ||
4292 | 43 | 0x73, 0x68, 0x61, 0x72, 0x69, 0x6e, 0x67, 0x2f, | ||
4293 | 44 | 0x06, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, | ||
4294 | 45 | 0x67, 0x6e, 0x6f, 0x6d, 0x65, 0x2f, 0x00, 0x00, | ||
4295 | 46 | 0x00, 0x00, 0x00, 0x00, 0x73, 0x68, 0x61, 0x72, | ||
4296 | 47 | 0x69, 0x6e, 0x67, 0x2e, 0x75, 0x69, 0x00, 0x00, | ||
4297 | 48 | 0xb9, 0x69, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
4298 | 49 | 0x3c, 0x3f, 0x78, 0x6d, 0x6c, 0x20, 0x76, 0x65, | ||
4299 | 50 | 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x3d, 0x22, 0x31, | ||
4300 | 51 | 0x2e, 0x30, 0x22, 0x20, 0x65, 0x6e, 0x63, 0x6f, | ||
4301 | 52 | 0x64, 0x69, 0x6e, 0x67, 0x3d, 0x22, 0x55, 0x54, | ||
4302 | 53 | 0x46, 0x2d, 0x38, 0x22, 0x3f, 0x3e, 0x0a, 0x3c, | ||
4303 | 54 | 0x21, 0x2d, 0x2d, 0x20, 0x47, 0x65, 0x6e, 0x65, | ||
4304 | 55 | 0x72, 0x61, 0x74, 0x65, 0x64, 0x20, 0x77, 0x69, | ||
4305 | 56 | 0x74, 0x68, 0x20, 0x67, 0x6c, 0x61, 0x64, 0x65, | ||
4306 | 57 | 0x20, 0x33, 0x2e, 0x31, 0x38, 0x2e, 0x31, 0x20, | ||
4307 | 58 | 0x2d, 0x2d, 0x3e, 0x0a, 0x3c, 0x69, 0x6e, 0x74, | ||
4308 | 59 | 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x3e, 0x3c, | ||
4309 | 60 | 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x73, | ||
4310 | 61 | 0x20, 0x6c, 0x69, 0x62, 0x3d, 0x22, 0x67, 0x74, | ||
4311 | 62 | 0x6b, 0x2b, 0x22, 0x20, 0x76, 0x65, 0x72, 0x73, | ||
4312 | 63 | 0x69, 0x6f, 0x6e, 0x3d, 0x22, 0x33, 0x2e, 0x31, | ||
4313 | 64 | 0x30, 0x22, 0x2f, 0x3e, 0x3c, 0x6f, 0x62, 0x6a, | ||
4314 | 65 | 0x65, 0x63, 0x74, 0x20, 0x63, 0x6c, 0x61, 0x73, | ||
4315 | 66 | 0x73, 0x3d, 0x22, 0x47, 0x74, 0x6b, 0x42, 0x6f, | ||
4316 | 67 | 0x78, 0x22, 0x20, 0x69, 0x64, 0x3d, 0x22, 0x73, | ||
4317 | 68 | 0x68, 0x61, 0x72, 0x69, 0x6e, 0x67, 0x2d, 0x70, | ||
4318 | 69 | 0x61, 0x6e, 0x65, 0x6c, 0x22, 0x3e, 0x3c, 0x70, | ||
4319 | 70 | 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x20, | ||
4320 | 71 | 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x76, 0x69, | ||
4321 | 72 | 0x73, 0x69, 0x62, 0x6c, 0x65, 0x22, 0x3e, 0x54, | ||
4322 | 73 | 0x72, 0x75, 0x65, 0x3c, 0x2f, 0x70, 0x72, 0x6f, | ||
4323 | 74 | 0x70, 0x65, 0x72, 0x74, 0x79, 0x3e, 0x3c, 0x70, | ||
4324 | 75 | 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x20, | ||
4325 | 76 | 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x63, 0x61, | ||
4326 | 77 | 0x6e, 0x5f, 0x66, 0x6f, 0x63, 0x75, 0x73, 0x22, | ||
4327 | 78 | 0x3e, 0x46, 0x61, 0x6c, 0x73, 0x65, 0x3c, 0x2f, | ||
4328 | 79 | 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, | ||
4329 | 80 | 0x3e, 0x3c, 0x21, 0x2d, 0x2d, 0x20, 0x53, 0x74, | ||
4330 | 81 | 0x75, 0x62, 0x20, 0x62, 0x6f, 0x78, 0x65, 0x73, | ||
4331 | 82 | 0x20, 0x74, 0x6f, 0x20, 0x6d, 0x61, 0x6b, 0x65, | ||
4332 | 83 | 0x20, 0x74, 0x68, 0x65, 0x20, 0x63, 0x6f, 0x6e, | ||
4333 | 84 | 0x74, 0x65, 0x6e, 0x74, 0x20, 0x63, 0x6f, 0x76, | ||
4334 | 85 | 0x65, 0x72, 0x20, 0x31, 0x2f, 0x33, 0x20, 0x6f, | ||
4335 | 86 | 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x73, 0x63, | ||
4336 | 87 | 0x72, 0x65, 0x65, 0x6e, 0x20, 0x2d, 0x2d, 0x3e, | ||
4337 | 88 | 0x3c, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x3e, 0x3c, | ||
4338 | 89 | 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x20, 0x63, | ||
4339 | 90 | 0x6c, 0x61, 0x73, 0x73, 0x3d, 0x22, 0x47, 0x74, | ||
4340 | 91 | 0x6b, 0x42, 0x6f, 0x78, 0x22, 0x3e, 0x3c, 0x70, | ||
4341 | 92 | 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x20, | ||
4342 | 93 | 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x76, 0x69, | ||
4343 | 94 | 0x73, 0x69, 0x62, 0x6c, 0x65, 0x22, 0x3e, 0x54, | ||
4344 | 95 | 0x72, 0x75, 0x65, 0x3c, 0x2f, 0x70, 0x72, 0x6f, | ||
4345 | 96 | 0x70, 0x65, 0x72, 0x74, 0x79, 0x3e, 0x3c, 0x70, | ||
4346 | 97 | 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x20, | ||
4347 | 98 | 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x63, 0x61, | ||
4348 | 99 | 0x6e, 0x5f, 0x66, 0x6f, 0x63, 0x75, 0x73, 0x22, | ||
4349 | 100 | 0x3e, 0x46, 0x61, 0x6c, 0x73, 0x65, 0x3c, 0x2f, | ||
4350 | 101 | 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, | ||
4351 | 102 | 0x3e, 0x3c, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, | ||
4352 | 103 | 0x74, 0x79, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d, | ||
4353 | 104 | 0x22, 0x68, 0x65, 0x78, 0x70, 0x61, 0x6e, 0x64, | ||
4354 | 105 | 0x22, 0x3e, 0x54, 0x72, 0x75, 0x65, 0x3c, 0x2f, | ||
4355 | 106 | 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, | ||
4356 | 107 | 0x3e, 0x3c, 0x2f, 0x6f, 0x62, 0x6a, 0x65, 0x63, | ||
4357 | 108 | 0x74, 0x3e, 0x3c, 0x2f, 0x63, 0x68, 0x69, 0x6c, | ||
4358 | 109 | 0x64, 0x3e, 0x3c, 0x63, 0x68, 0x69, 0x6c, 0x64, | ||
4359 | 110 | 0x3e, 0x3c, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, | ||
4360 | 111 | 0x20, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x3d, 0x22, | ||
4361 | 112 | 0x47, 0x74, 0x6b, 0x42, 0x6f, 0x78, 0x22, 0x3e, | ||
4362 | 113 | 0x3c, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, | ||
4363 | 114 | 0x79, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22, | ||
4364 | 115 | 0x76, 0x69, 0x73, 0x69, 0x62, 0x6c, 0x65, 0x22, | ||
4365 | 116 | 0x3e, 0x54, 0x72, 0x75, 0x65, 0x3c, 0x2f, 0x70, | ||
4366 | 117 | 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x3e, | ||
4367 | 118 | 0x3c, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, | ||
4368 | 119 | 0x79, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22, | ||
4369 | 120 | 0x63, 0x61, 0x6e, 0x5f, 0x66, 0x6f, 0x63, 0x75, | ||
4370 | 121 | 0x73, 0x22, 0x3e, 0x46, 0x61, 0x6c, 0x73, 0x65, | ||
4371 | 122 | 0x3c, 0x2f, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, | ||
4372 | 123 | 0x74, 0x79, 0x3e, 0x3c, 0x70, 0x72, 0x6f, 0x70, | ||
4373 | 124 | 0x65, 0x72, 0x74, 0x79, 0x20, 0x6e, 0x61, 0x6d, | ||
4374 | 125 | 0x65, 0x3d, 0x22, 0x68, 0x65, 0x78, 0x70, 0x61, | ||
4375 | 126 | 0x6e, 0x64, 0x22, 0x3e, 0x54, 0x72, 0x75, 0x65, | ||
4376 | 127 | 0x3c, 0x2f, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, | ||
4377 | 128 | 0x74, 0x79, 0x3e, 0x3c, 0x2f, 0x6f, 0x62, 0x6a, | ||
4378 | 129 | 0x65, 0x63, 0x74, 0x3e, 0x3c, 0x70, 0x61, 0x63, | ||
4379 | 130 | 0x6b, 0x69, 0x6e, 0x67, 0x3e, 0x3c, 0x70, 0x72, | ||
4380 | 131 | 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x20, 0x6e, | ||
4381 | 132 | 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x70, 0x61, 0x63, | ||
4382 | 133 | 0x6b, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x22, 0x3e, | ||
4383 | 134 | 0x65, 0x6e, 0x64, 0x3c, 0x2f, 0x70, 0x72, 0x6f, | ||
4384 | 135 | 0x70, 0x65, 0x72, 0x74, 0x79, 0x3e, 0x3c, 0x2f, | ||
4385 | 136 | 0x70, 0x61, 0x63, 0x6b, 0x69, 0x6e, 0x67, 0x3e, | ||
4386 | 137 | 0x3c, 0x2f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x3e, | ||
4387 | 138 | 0x3c, 0x21, 0x2d, 0x2d, 0x20, 0x43, 0x6f, 0x6e, | ||
4388 | 139 | 0x74, 0x65, 0x6e, 0x74, 0x20, 0x2d, 0x2d, 0x3e, | ||
4389 | 140 | 0x3c, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x3e, 0x3c, | ||
4390 | 141 | 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x20, 0x63, | ||
4391 | 142 | 0x6c, 0x61, 0x73, 0x73, 0x3d, 0x22, 0x47, 0x74, | ||
4392 | 143 | 0x6b, 0x42, 0x6f, 0x78, 0x22, 0x3e, 0x3c, 0x70, | ||
4393 | 144 | 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x20, | ||
4394 | 145 | 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x76, 0x69, | ||
4395 | 146 | 0x73, 0x69, 0x62, 0x6c, 0x65, 0x22, 0x3e, 0x54, | ||
4396 | 147 | 0x72, 0x75, 0x65, 0x3c, 0x2f, 0x70, 0x72, 0x6f, | ||
4397 | 148 | 0x70, 0x65, 0x72, 0x74, 0x79, 0x3e, 0x3c, 0x70, | ||
4398 | 149 | 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x20, | ||
4399 | 150 | 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x63, 0x61, | ||
4400 | 151 | 0x6e, 0x5f, 0x66, 0x6f, 0x63, 0x75, 0x73, 0x22, | ||
4401 | 152 | 0x3e, 0x46, 0x61, 0x6c, 0x73, 0x65, 0x3c, 0x2f, | ||
4402 | 153 | 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, | ||
4403 | 154 | 0x3e, 0x3c, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, | ||
4404 | 155 | 0x74, 0x79, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d, | ||
4405 | 156 | 0x22, 0x6d, 0x61, 0x72, 0x67, 0x69, 0x6e, 0x5f, | ||
4406 | 157 | 0x74, 0x6f, 0x70, 0x22, 0x3e, 0x33, 0x32, 0x3c, | ||
4407 | 158 | 0x2f, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, | ||
4408 | 159 | 0x79, 0x3e, 0x3c, 0x70, 0x72, 0x6f, 0x70, 0x65, | ||
4409 | 160 | 0x72, 0x74, 0x79, 0x20, 0x6e, 0x61, 0x6d, 0x65, | ||
4410 | 161 | 0x3d, 0x22, 0x6d, 0x61, 0x72, 0x67, 0x69, 0x6e, | ||
4411 | 162 | 0x5f, 0x62, 0x6f, 0x74, 0x74, 0x6f, 0x6d, 0x22, | ||
4412 | 163 | 0x3e, 0x33, 0x32, 0x3c, 0x2f, 0x70, 0x72, 0x6f, | ||
4413 | 164 | 0x70, 0x65, 0x72, 0x74, 0x79, 0x3e, 0x3c, 0x70, | ||
4414 | 165 | 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x20, | ||
4415 | 166 | 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x6d, 0x61, | ||
4416 | 167 | 0x72, 0x67, 0x69, 0x6e, 0x5f, 0x6c, 0x65, 0x66, | ||
4417 | 168 | 0x74, 0x22, 0x3e, 0x32, 0x34, 0x3c, 0x2f, 0x70, | ||
4418 | 169 | 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x3e, | ||
4419 | 170 | 0x3c, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, | ||
4420 | 171 | 0x79, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22, | ||
4421 | 172 | 0x6d, 0x61, 0x72, 0x67, 0x69, 0x6e, 0x5f, 0x72, | ||
4422 | 173 | 0x69, 0x67, 0x68, 0x74, 0x22, 0x3e, 0x32, 0x34, | ||
4423 | 174 | 0x3c, 0x2f, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, | ||
4424 | 175 | 0x74, 0x79, 0x3e, 0x3c, 0x70, 0x72, 0x6f, 0x70, | ||
4425 | 176 | 0x65, 0x72, 0x74, 0x79, 0x20, 0x6e, 0x61, 0x6d, | ||
4426 | 177 | 0x65, 0x3d, 0x22, 0x68, 0x65, 0x78, 0x70, 0x61, | ||
4427 | 178 | 0x6e, 0x64, 0x22, 0x3e, 0x54, 0x72, 0x75, 0x65, | ||
4428 | 179 | 0x3c, 0x2f, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, | ||
4429 | 180 | 0x74, 0x79, 0x3e, 0x3c, 0x70, 0x72, 0x6f, 0x70, | ||
4430 | 181 | 0x65, 0x72, 0x74, 0x79, 0x20, 0x6e, 0x61, 0x6d, | ||
4431 | 182 | 0x65, 0x3d, 0x22, 0x6f, 0x72, 0x69, 0x65, 0x6e, | ||
4432 | 183 | 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x3e, | ||
4433 | 184 | 0x76, 0x65, 0x72, 0x74, 0x69, 0x63, 0x61, 0x6c, | ||
4434 | 185 | 0x3c, 0x2f, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, | ||
4435 | 186 | 0x74, 0x79, 0x3e, 0x3c, 0x63, 0x68, 0x69, 0x6c, | ||
4436 | 187 | 0x64, 0x3e, 0x3c, 0x6f, 0x62, 0x6a, 0x65, 0x63, | ||
4437 | 188 | 0x74, 0x20, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x3d, | ||
4438 | 189 | 0x22, 0x47, 0x74, 0x6b, 0x4c, 0x61, 0x62, 0x65, | ||
4439 | 190 | 0x6c, 0x22, 0x20, 0x69, 0x64, 0x3d, 0x22, 0x6c, | ||
4440 | 191 | 0x61, 0x62, 0x65, 0x6c, 0x36, 0x22, 0x3e, 0x3c, | ||
4441 | 192 | 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, | ||
4442 | 193 | 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x76, | ||
4443 | 194 | 0x69, 0x73, 0x69, 0x62, 0x6c, 0x65, 0x22, 0x3e, | ||
4444 | 195 | 0x54, 0x72, 0x75, 0x65, 0x3c, 0x2f, 0x70, 0x72, | ||
4445 | 196 | 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x3e, 0x3c, | ||
4446 | 197 | 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, | ||
4447 | 198 | 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x63, | ||
4448 | 199 | 0x61, 0x6e, 0x5f, 0x66, 0x6f, 0x63, 0x75, 0x73, | ||
4449 | 200 | 0x22, 0x3e, 0x46, 0x61, 0x6c, 0x73, 0x65, 0x3c, | ||
4450 | 201 | 0x2f, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, | ||
4451 | 202 | 0x79, 0x3e, 0x3c, 0x70, 0x72, 0x6f, 0x70, 0x65, | ||
4452 | 203 | 0x72, 0x74, 0x79, 0x20, 0x6e, 0x61, 0x6d, 0x65, | ||
4453 | 204 | 0x3d, 0x22, 0x6d, 0x61, 0x72, 0x67, 0x69, 0x6e, | ||
4454 | 205 | 0x5f, 0x62, 0x6f, 0x74, 0x74, 0x6f, 0x6d, 0x22, | ||
4455 | 206 | 0x3e, 0x31, 0x32, 0x3c, 0x2f, 0x70, 0x72, 0x6f, | ||
4456 | 207 | 0x70, 0x65, 0x72, 0x74, 0x79, 0x3e, 0x3c, 0x70, | ||
4457 | 208 | 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x20, | ||
4458 | 209 | 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x78, 0x61, | ||
4459 | 210 | 0x6c, 0x69, 0x67, 0x6e, 0x22, 0x3e, 0x30, 0x3c, | ||
4460 | 211 | 0x2f, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, | ||
4461 | 212 | 0x79, 0x3e, 0x3c, 0x70, 0x72, 0x6f, 0x70, 0x65, | ||
4462 | 213 | 0x72, 0x74, 0x79, 0x20, 0x6e, 0x61, 0x6d, 0x65, | ||
4463 | 214 | 0x3d, 0x22, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x22, | ||
4464 | 215 | 0x20, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x6c, 0x61, | ||
4465 | 216 | 0x74, 0x61, 0x62, 0x6c, 0x65, 0x3d, 0x22, 0x79, | ||
4466 | 217 | 0x65, 0x73, 0x22, 0x3e, 0x5f, 0x43, 0x6f, 0x6d, | ||
4467 | 218 | 0x70, 0x75, 0x74, 0x65, 0x72, 0x20, 0x4e, 0x61, | ||
4468 | 219 | 0x6d, 0x65, 0x3c, 0x2f, 0x70, 0x72, 0x6f, 0x70, | ||
4469 | 220 | 0x65, 0x72, 0x74, 0x79, 0x3e, 0x3c, 0x70, 0x72, | ||
4470 | 221 | 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x20, 0x6e, | ||
4471 | 222 | 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x75, 0x73, 0x65, | ||
4472 | 223 | 0x5f, 0x75, 0x6e, 0x64, 0x65, 0x72, 0x6c, 0x69, | ||
4473 | 224 | 0x6e, 0x65, 0x22, 0x3e, 0x54, 0x72, 0x75, 0x65, | ||
4474 | 225 | 0x3c, 0x2f, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, | ||
4475 | 226 | 0x74, 0x79, 0x3e, 0x3c, 0x70, 0x72, 0x6f, 0x70, | ||
4476 | 227 | 0x65, 0x72, 0x74, 0x79, 0x20, 0x6e, 0x61, 0x6d, | ||
4477 | 228 | 0x65, 0x3d, 0x22, 0x6d, 0x6e, 0x65, 0x6d, 0x6f, | ||
4478 | 229 | 0x6e, 0x69, 0x63, 0x5f, 0x77, 0x69, 0x64, 0x67, | ||
4479 | 230 | 0x65, 0x74, 0x22, 0x3e, 0x68, 0x6f, 0x73, 0x74, | ||
4480 | 231 | 0x6e, 0x61, 0x6d, 0x65, 0x2d, 0x65, 0x6e, 0x74, | ||
4481 | 232 | 0x72, 0x79, 0x3c, 0x2f, 0x70, 0x72, 0x6f, 0x70, | ||
4482 | 233 | 0x65, 0x72, 0x74, 0x79, 0x3e, 0x3c, 0x61, 0x63, | ||
4483 | 234 | 0x63, 0x65, 0x73, 0x73, 0x69, 0x62, 0x69, 0x6c, | ||
4484 | 235 | 0x69, 0x74, 0x79, 0x3e, 0x3c, 0x72, 0x65, 0x6c, | ||
4485 | 236 | 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x74, 0x79, | ||
4486 | 237 | 0x70, 0x65, 0x3d, 0x22, 0x6c, 0x61, 0x62, 0x65, | ||
4487 | 238 | 0x6c, 0x2d, 0x66, 0x6f, 0x72, 0x22, 0x20, 0x74, | ||
4488 | 239 | 0x61, 0x72, 0x67, 0x65, 0x74, 0x3d, 0x22, 0x68, | ||
4489 | 240 | 0x6f, 0x73, 0x74, 0x6e, 0x61, 0x6d, 0x65, 0x2d, | ||
4490 | 241 | 0x65, 0x6e, 0x74, 0x72, 0x79, 0x22, 0x2f, 0x3e, | ||
4491 | 242 | 0x3c, 0x2f, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, | ||
4492 | 243 | 0x69, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x3e, | ||
4493 | 244 | 0x3c, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, | ||
4494 | 245 | 0x74, 0x65, 0x73, 0x3e, 0x3c, 0x61, 0x74, 0x74, | ||
4495 | 246 | 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x20, 0x6e, | ||
4496 | 247 | 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x77, 0x65, 0x69, | ||
4497 | 248 | 0x67, 0x68, 0x74, 0x22, 0x20, 0x76, 0x61, 0x6c, | ||
4498 | 249 | 0x75, 0x65, 0x3d, 0x22, 0x62, 0x6f, 0x6c, 0x64, | ||
4499 | 250 | 0x22, 0x2f, 0x3e, 0x3c, 0x2f, 0x61, 0x74, 0x74, | ||
4500 | 251 | 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x3e, | ||
4501 | 252 | 0x3c, 0x2f, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, | ||
4502 | 253 | 0x3e, 0x3c, 0x70, 0x61, 0x63, 0x6b, 0x69, 0x6e, | ||
4503 | 254 | 0x67, 0x3e, 0x3c, 0x70, 0x72, 0x6f, 0x70, 0x65, | ||
4504 | 255 | 0x72, 0x74, 0x79, 0x20, 0x6e, 0x61, 0x6d, 0x65, | ||
4505 | 256 | 0x3d, 0x22, 0x65, 0x78, 0x70, 0x61, 0x6e, 0x64, | ||
4506 | 257 | 0x22, 0x3e, 0x46, 0x61, 0x6c, 0x73, 0x65, 0x3c, | ||
4507 | 258 | 0x2f, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, | ||
4508 | 259 | 0x79, 0x3e, 0x3c, 0x70, 0x72, 0x6f, 0x70, 0x65, | ||
4509 | 260 | 0x72, 0x74, 0x79, 0x20, 0x6e, 0x61, 0x6d, 0x65, | ||
4510 | 261 | 0x3d, 0x22, 0x66, 0x69, 0x6c, 0x6c, 0x22, 0x3e, | ||
4511 | 262 | 0x54, 0x72, 0x75, 0x65, 0x3c, 0x2f, 0x70, 0x72, | ||
4512 | 263 | 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x3e, 0x3c, | ||
4513 | 264 | 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, | ||
4514 | 265 | 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x70, | ||
4515 | 266 | 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x22, | ||
4516 | 267 | 0x3e, 0x30, 0x3c, 0x2f, 0x70, 0x72, 0x6f, 0x70, | ||
4517 | 268 | 0x65, 0x72, 0x74, 0x79, 0x3e, 0x3c, 0x2f, 0x70, | ||
4518 | 269 | 0x61, 0x63, 0x6b, 0x69, 0x6e, 0x67, 0x3e, 0x3c, | ||
4519 | 270 | 0x2f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x3e, 0x3c, | ||
4520 | 271 | 0x63, 0x68, 0x69, 0x6c, 0x64, 0x3e, 0x3c, 0x6f, | ||
4521 | 272 | 0x62, 0x6a, 0x65, 0x63, 0x74, 0x20, 0x63, 0x6c, | ||
4522 | 273 | 0x61, 0x73, 0x73, 0x3d, 0x22, 0x43, 0x63, 0x48, | ||
4523 | 274 | 0x6f, 0x73, 0x74, 0x6e, 0x61, 0x6d, 0x65, 0x45, | ||
4524 | 275 | 0x6e, 0x74, 0x72, 0x79, 0x22, 0x20, 0x69, 0x64, | ||
4525 | 276 | 0x3d, 0x22, 0x68, 0x6f, 0x73, 0x74, 0x6e, 0x61, | ||
4526 | 277 | 0x6d, 0x65, 0x2d, 0x65, 0x6e, 0x74, 0x72, 0x79, | ||
4527 | 278 | 0x22, 0x3e, 0x3c, 0x70, 0x72, 0x6f, 0x70, 0x65, | ||
4528 | 279 | 0x72, 0x74, 0x79, 0x20, 0x6e, 0x61, 0x6d, 0x65, | ||
4529 | 280 | 0x3d, 0x22, 0x76, 0x69, 0x73, 0x69, 0x62, 0x6c, | ||
4530 | 281 | 0x65, 0x22, 0x3e, 0x54, 0x72, 0x75, 0x65, 0x3c, | ||
4531 | 282 | 0x2f, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, | ||
4532 | 283 | 0x79, 0x3e, 0x3c, 0x70, 0x72, 0x6f, 0x70, 0x65, | ||
4533 | 284 | 0x72, 0x74, 0x79, 0x20, 0x6e, 0x61, 0x6d, 0x65, | ||
4534 | 285 | 0x3d, 0x22, 0x63, 0x61, 0x6e, 0x5f, 0x66, 0x6f, | ||
4535 | 286 | 0x63, 0x75, 0x73, 0x22, 0x3e, 0x54, 0x72, 0x75, | ||
4536 | 287 | 0x65, 0x3c, 0x2f, 0x70, 0x72, 0x6f, 0x70, 0x65, | ||
4537 | 288 | 0x72, 0x74, 0x79, 0x3e, 0x3c, 0x70, 0x72, 0x6f, | ||
4538 | 289 | 0x70, 0x65, 0x72, 0x74, 0x79, 0x20, 0x6e, 0x61, | ||
4539 | 290 | 0x6d, 0x65, 0x3d, 0x22, 0x6d, 0x61, 0x72, 0x67, | ||
4540 | 291 | 0x69, 0x6e, 0x5f, 0x62, 0x6f, 0x74, 0x74, 0x6f, | ||
4541 | 292 | 0x6d, 0x22, 0x3e, 0x33, 0x32, 0x3c, 0x2f, 0x70, | ||
4542 | 293 | 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x3e, | ||
4543 | 294 | 0x3c, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, | ||
4544 | 295 | 0x79, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22, | ||
4545 | 296 | 0x69, 0x6e, 0x76, 0x69, 0x73, 0x69, 0x62, 0x6c, | ||
4546 | 297 | 0x65, 0x5f, 0x63, 0x68, 0x61, 0x72, 0x22, 0x3e, | ||
4547 | 298 | 0xe2, 0x97, 0x8f, 0x3c, 0x2f, 0x70, 0x72, 0x6f, | ||
4548 | 299 | 0x70, 0x65, 0x72, 0x74, 0x79, 0x3e, 0x3c, 0x61, | ||
4549 | 300 | 0x63, 0x63, 0x65, 0x73, 0x73, 0x69, 0x62, 0x69, | ||
4550 | 301 | 0x6c, 0x69, 0x74, 0x79, 0x3e, 0x3c, 0x72, 0x65, | ||
4551 | 302 | 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x74, | ||
4552 | 303 | 0x79, 0x70, 0x65, 0x3d, 0x22, 0x6c, 0x61, 0x62, | ||
4553 | 304 | 0x65, 0x6c, 0x6c, 0x65, 0x64, 0x2d, 0x62, 0x79, | ||
4554 | 305 | 0x22, 0x20, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, | ||
4555 | 306 | 0x3d, 0x22, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x36, | ||
4556 | 307 | 0x22, 0x2f, 0x3e, 0x3c, 0x2f, 0x61, 0x63, 0x63, | ||
4557 | 308 | 0x65, 0x73, 0x73, 0x69, 0x62, 0x69, 0x6c, 0x69, | ||
4558 | 309 | 0x74, 0x79, 0x3e, 0x3c, 0x2f, 0x6f, 0x62, 0x6a, | ||
4559 | 310 | 0x65, 0x63, 0x74, 0x3e, 0x3c, 0x70, 0x61, 0x63, | ||
4560 | 311 | 0x6b, 0x69, 0x6e, 0x67, 0x3e, 0x3c, 0x70, 0x72, | ||
4561 | 312 | 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x20, 0x6e, | ||
4562 | 313 | 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x65, 0x78, 0x70, | ||
4563 | 314 | 0x61, 0x6e, 0x64, 0x22, 0x3e, 0x46, 0x61, 0x6c, | ||
4564 | 315 | 0x73, 0x65, 0x3c, 0x2f, 0x70, 0x72, 0x6f, 0x70, | ||
4565 | 316 | 0x65, 0x72, 0x74, 0x79, 0x3e, 0x3c, 0x70, 0x72, | ||
4566 | 317 | 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x20, 0x6e, | ||
4567 | 318 | 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x66, 0x69, 0x6c, | ||
4568 | 319 | 0x6c, 0x22, 0x3e, 0x54, 0x72, 0x75, 0x65, 0x3c, | ||
4569 | 320 | 0x2f, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, | ||
4570 | 321 | 0x79, 0x3e, 0x3c, 0x70, 0x72, 0x6f, 0x70, 0x65, | ||
4571 | 322 | 0x72, 0x74, 0x79, 0x20, 0x6e, 0x61, 0x6d, 0x65, | ||
4572 | 323 | 0x3d, 0x22, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, | ||
4573 | 324 | 0x6f, 0x6e, 0x22, 0x3e, 0x31, 0x3c, 0x2f, 0x70, | ||
4574 | 325 | 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x3e, | ||
4575 | 326 | 0x3c, 0x2f, 0x70, 0x61, 0x63, 0x6b, 0x69, 0x6e, | ||
4576 | 327 | 0x67, 0x3e, 0x3c, 0x2f, 0x63, 0x68, 0x69, 0x6c, | ||
4577 | 328 | 0x64, 0x3e, 0x3c, 0x63, 0x68, 0x69, 0x6c, 0x64, | ||
4578 | 329 | 0x3e, 0x3c, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, | ||
4579 | 330 | 0x20, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x3d, 0x22, | ||
4580 | 331 | 0x47, 0x74, 0x6b, 0x46, 0x72, 0x61, 0x6d, 0x65, | ||
4581 | 332 | 0x22, 0x20, 0x69, 0x64, 0x3d, 0x22, 0x66, 0x72, | ||
4582 | 333 | 0x61, 0x6d, 0x65, 0x31, 0x22, 0x3e, 0x3c, 0x70, | ||
4583 | 334 | 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x20, | ||
4584 | 335 | 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x76, 0x69, | ||
4585 | 336 | 0x73, 0x69, 0x62, 0x6c, 0x65, 0x22, 0x3e, 0x54, | ||
4586 | 337 | 0x72, 0x75, 0x65, 0x3c, 0x2f, 0x70, 0x72, 0x6f, | ||
4587 | 338 | 0x70, 0x65, 0x72, 0x74, 0x79, 0x3e, 0x3c, 0x70, | ||
4588 | 339 | 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x20, | ||
4589 | 340 | 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x63, 0x61, | ||
4590 | 341 | 0x6e, 0x5f, 0x66, 0x6f, 0x63, 0x75, 0x73, 0x22, | ||
4591 | 342 | 0x3e, 0x46, 0x61, 0x6c, 0x73, 0x65, 0x3c, 0x2f, | ||
4592 | 343 | 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, | ||
4593 | 344 | 0x3e, 0x3c, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, | ||
4594 | 345 | 0x74, 0x79, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d, | ||
4595 | 346 | 0x22, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x5f, 0x78, | ||
4596 | 347 | 0x61, 0x6c, 0x69, 0x67, 0x6e, 0x22, 0x3e, 0x30, | ||
4597 | 348 | 0x3c, 0x2f, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, | ||
4598 | 349 | 0x74, 0x79, 0x3e, 0x3c, 0x70, 0x72, 0x6f, 0x70, | ||
4599 | 350 | 0x65, 0x72, 0x74, 0x79, 0x20, 0x6e, 0x61, 0x6d, | ||
4600 | 351 | 0x65, 0x3d, 0x22, 0x73, 0x68, 0x61, 0x64, 0x6f, | ||
4601 | 352 | 0x77, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x22, 0x3e, | ||
4602 | 353 | 0x69, 0x6e, 0x3c, 0x2f, 0x70, 0x72, 0x6f, 0x70, | ||
4603 | 354 | 0x65, 0x72, 0x74, 0x79, 0x3e, 0x3c, 0x63, 0x68, | ||
4604 | 355 | 0x69, 0x6c, 0x64, 0x3e, 0x3c, 0x6f, 0x62, 0x6a, | ||
4605 | 356 | 0x65, 0x63, 0x74, 0x20, 0x63, 0x6c, 0x61, 0x73, | ||
4606 | 357 | 0x73, 0x3d, 0x22, 0x47, 0x74, 0x6b, 0x4c, 0x69, | ||
4607 | 358 | 0x73, 0x74, 0x42, 0x6f, 0x78, 0x22, 0x20, 0x69, | ||
4608 | 359 | 0x64, 0x3d, 0x22, 0x6d, 0x61, 0x69, 0x6e, 0x2d, | ||
4609 | 360 | 0x6c, 0x69, 0x73, 0x74, 0x2d, 0x62, 0x6f, 0x78, | ||
4610 | 361 | 0x22, 0x3e, 0x3c, 0x70, 0x72, 0x6f, 0x70, 0x65, | ||
4611 | 362 | 0x72, 0x74, 0x79, 0x20, 0x6e, 0x61, 0x6d, 0x65, | ||
4612 | 363 | 0x3d, 0x22, 0x76, 0x69, 0x73, 0x69, 0x62, 0x6c, | ||
4613 | 364 | 0x65, 0x22, 0x3e, 0x54, 0x72, 0x75, 0x65, 0x3c, | ||
4614 | 365 | 0x2f, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, | ||
4615 | 366 | 0x79, 0x3e, 0x3c, 0x63, 0x68, 0x69, 0x6c, 0x64, | ||
4616 | 367 | 0x3e, 0x3c, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, | ||
4617 | 368 | 0x20, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x3d, 0x22, | ||
4618 | 369 | 0x47, 0x74, 0x6b, 0x4c, 0x69, 0x73, 0x74, 0x42, | ||
4619 | 370 | 0x6f, 0x78, 0x52, 0x6f, 0x77, 0x22, 0x20, 0x69, | ||
4620 | 371 | 0x64, 0x3d, 0x22, 0x70, 0x65, 0x72, 0x73, 0x6f, | ||
4621 | 372 | 0x6e, 0x61, 0x6c, 0x2d, 0x66, 0x69, 0x6c, 0x65, | ||
4622 | 373 | 0x2d, 0x73, 0x68, 0x61, 0x72, 0x69, 0x6e, 0x67, | ||
4623 | 374 | 0x2d, 0x62, 0x75, 0x74, 0x74, 0x6f, 0x6e, 0x22, | ||
4624 | 375 | 0x3e, 0x3c, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, | ||
4625 | 376 | 0x74, 0x79, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d, | ||
4626 | 377 | 0x22, 0x76, 0x69, 0x73, 0x69, 0x62, 0x6c, 0x65, | ||
4627 | 378 | 0x22, 0x3e, 0x54, 0x72, 0x75, 0x65, 0x3c, 0x2f, | ||
4628 | 379 | 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, | ||
4629 | 380 | 0x3e, 0x3c, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x3e, | ||
4630 | 381 | 0x3c, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x20, | ||
4631 | 382 | 0x63, 0x6c, 0x61, 0x73, 0x73, 0x3d, 0x22, 0x47, | ||
4632 | 383 | 0x74, 0x6b, 0x42, 0x6f, 0x78, 0x22, 0x20, 0x69, | ||
4633 | 384 | 0x64, 0x3d, 0x22, 0x62, 0x6f, 0x78, 0x32, 0x22, | ||
4634 | 385 | 0x3e, 0x3c, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, | ||
4635 | 386 | 0x74, 0x79, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d, | ||
4636 | 387 | 0x22, 0x6d, 0x61, 0x72, 0x67, 0x69, 0x6e, 0x5f, | ||
4637 | 388 | 0x74, 0x6f, 0x70, 0x22, 0x3e, 0x31, 0x38, 0x3c, | ||
4638 | 389 | 0x2f, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, | ||
4639 | 390 | 0x79, 0x3e, 0x3c, 0x70, 0x72, 0x6f, 0x70, 0x65, | ||
4640 | 391 | 0x72, 0x74, 0x79, 0x20, 0x6e, 0x61, 0x6d, 0x65, | ||
4641 | 392 | 0x3d, 0x22, 0x6d, 0x61, 0x72, 0x67, 0x69, 0x6e, | ||
4642 | 393 | 0x5f, 0x62, 0x6f, 0x74, 0x74, 0x6f, 0x6d, 0x22, | ||
4643 | 394 | 0x3e, 0x31, 0x38, 0x3c, 0x2f, 0x70, 0x72, 0x6f, | ||
4644 | 395 | 0x70, 0x65, 0x72, 0x74, 0x79, 0x3e, 0x3c, 0x70, | ||
4645 | 396 | 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x20, | ||
4646 | 397 | 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x6d, 0x61, | ||
4647 | 398 | 0x72, 0x67, 0x69, 0x6e, 0x5f, 0x6c, 0x65, 0x66, | ||
4648 | 399 | 0x74, 0x22, 0x3e, 0x31, 0x32, 0x3c, 0x2f, 0x70, | ||
4649 | 400 | 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x3e, | ||
4650 | 401 | 0x3c, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, | ||
4651 | 402 | 0x79, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22, | ||
4652 | 403 | 0x6d, 0x61, 0x72, 0x67, 0x69, 0x6e, 0x5f, 0x72, | ||
4653 | 404 | 0x69, 0x67, 0x68, 0x74, 0x22, 0x3e, 0x31, 0x32, | ||
4654 | 405 | 0x3c, 0x2f, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, | ||
4655 | 406 | 0x74, 0x79, 0x3e, 0x3c, 0x70, 0x72, 0x6f, 0x70, | ||
4656 | 407 | 0x65, 0x72, 0x74, 0x79, 0x20, 0x6e, 0x61, 0x6d, | ||
4657 | 408 | 0x65, 0x3d, 0x22, 0x76, 0x69, 0x73, 0x69, 0x62, | ||
4658 | 409 | 0x6c, 0x65, 0x22, 0x3e, 0x54, 0x72, 0x75, 0x65, | ||
4659 | 410 | 0x3c, 0x2f, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, | ||
4660 | 411 | 0x74, 0x79, 0x3e, 0x3c, 0x70, 0x72, 0x6f, 0x70, | ||
4661 | 412 | 0x65, 0x72, 0x74, 0x79, 0x20, 0x6e, 0x61, 0x6d, | ||
4662 | 413 | 0x65, 0x3d, 0x22, 0x63, 0x61, 0x6e, 0x5f, 0x66, | ||
4663 | 414 | 0x6f, 0x63, 0x75, 0x73, 0x22, 0x3e, 0x46, 0x61, | ||
4664 | 415 | 0x6c, 0x73, 0x65, 0x3c, 0x2f, 0x70, 0x72, 0x6f, | ||
4665 | 416 | 0x70, 0x65, 0x72, 0x74, 0x79, 0x3e, 0x3c, 0x63, | ||
4666 | 417 | 0x68, 0x69, 0x6c, 0x64, 0x3e, 0x3c, 0x6f, 0x62, | ||
4667 | 418 | 0x6a, 0x65, 0x63, 0x74, 0x20, 0x63, 0x6c, 0x61, | ||
4668 | 419 | 0x73, 0x73, 0x3d, 0x22, 0x47, 0x74, 0x6b, 0x4c, | ||
4669 | 420 | 0x61, 0x62, 0x65, 0x6c, 0x22, 0x20, 0x69, 0x64, | ||
4670 | 421 | 0x3d, 0x22, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x38, | ||
4671 | 422 | 0x22, 0x3e, 0x3c, 0x70, 0x72, 0x6f, 0x70, 0x65, | ||
4672 | 423 | 0x72, 0x74, 0x79, 0x20, 0x6e, 0x61, 0x6d, 0x65, | ||
4673 | 424 | 0x3d, 0x22, 0x76, 0x69, 0x73, 0x69, 0x62, 0x6c, | ||
4674 | 425 | 0x65, 0x22, 0x3e, 0x54, 0x72, 0x75, 0x65, 0x3c, | ||
4675 | 426 | 0x2f, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, | ||
4676 | 427 | 0x79, 0x3e, 0x3c, 0x70, 0x72, 0x6f, 0x70, 0x65, | ||
4677 | 428 | 0x72, 0x74, 0x79, 0x20, 0x6e, 0x61, 0x6d, 0x65, | ||
4678 | 429 | 0x3d, 0x22, 0x63, 0x61, 0x6e, 0x5f, 0x66, 0x6f, | ||
4679 | 430 | 0x63, 0x75, 0x73, 0x22, 0x3e, 0x46, 0x61, 0x6c, | ||
4680 | 431 | 0x73, 0x65, 0x3c, 0x2f, 0x70, 0x72, 0x6f, 0x70, | ||
4681 | 432 | 0x65, 0x72, 0x74, 0x79, 0x3e, 0x3c, 0x70, 0x72, | ||
4682 | 433 | 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x20, 0x6e, | ||
4683 | 434 | 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x68, 0x61, 0x6c, | ||
4684 | 435 | 0x69, 0x67, 0x6e, 0x22, 0x3e, 0x73, 0x74, 0x61, | ||
4685 | 436 | 0x72, 0x74, 0x3c, 0x2f, 0x70, 0x72, 0x6f, 0x70, | ||
4686 | 437 | 0x65, 0x72, 0x74, 0x79, 0x3e, 0x3c, 0x70, 0x72, | ||
4687 | 438 | 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x20, 0x6e, | ||
4688 | 439 | 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x68, 0x65, 0x78, | ||
4689 | 440 | 0x70, 0x61, 0x6e, 0x64, 0x22, 0x3e, 0x54, 0x72, | ||
4690 | 441 | 0x75, 0x65, 0x3c, 0x2f, 0x70, 0x72, 0x6f, 0x70, | ||
4691 | 442 | 0x65, 0x72, 0x74, 0x79, 0x3e, 0x3c, 0x70, 0x72, | ||
4692 | 443 | 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x20, 0x74, | ||
4693 | 444 | 0x72, 0x61, 0x6e, 0x73, 0x6c, 0x61, 0x74, 0x61, | ||
4694 | 445 | 0x62, 0x6c, 0x65, 0x3d, 0x22, 0x79, 0x65, 0x73, | ||
4695 | 446 | 0x22, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22, | ||
4696 | 447 | 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x22, 0x3e, 0x5f, | ||
4697 | 448 | 0x46, 0x69, 0x6c, 0x65, 0x20, 0x53, 0x68, 0x61, | ||
4698 | 449 | 0x72, 0x69, 0x6e, 0x67, 0x3c, 0x2f, 0x70, 0x72, | ||
4699 | 450 | 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x3e, 0x3c, | ||
4700 | 451 | 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, | ||
4701 | 452 | 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x75, | ||
4702 | 453 | 0x73, 0x65, 0x5f, 0x75, 0x6e, 0x64, 0x65, 0x72, | ||
4703 | 454 | 0x6c, 0x69, 0x6e, 0x65, 0x22, 0x3e, 0x54, 0x72, | ||
4704 | 455 | 0x75, 0x65, 0x3c, 0x2f, 0x70, 0x72, 0x6f, 0x70, | ||
4705 | 456 | 0x65, 0x72, 0x74, 0x79, 0x3e, 0x3c, 0x70, 0x72, | ||
4706 | 457 | 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x20, 0x6e, | ||
4707 | 458 | 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x6d, 0x6e, 0x65, | ||
4708 | 459 | 0x6d, 0x6f, 0x6e, 0x69, 0x63, 0x5f, 0x77, 0x69, | ||
4709 | 460 | 0x64, 0x67, 0x65, 0x74, 0x22, 0x3e, 0x70, 0x65, | ||
4710 | 461 | 0x72, 0x73, 0x6f, 0x6e, 0x61, 0x6c, 0x2d, 0x66, | ||
4711 | 462 | 0x69, 0x6c, 0x65, 0x2d, 0x73, 0x68, 0x61, 0x72, | ||
4712 | 463 | 0x69, 0x6e, 0x67, 0x2d, 0x62, 0x75, 0x74, 0x74, | ||
4713 | 464 | 0x6f, 0x6e, 0x3c, 0x2f, 0x70, 0x72, 0x6f, 0x70, | ||
4714 | 465 | 0x65, 0x72, 0x74, 0x79, 0x3e, 0x3c, 0x2f, 0x6f, | ||
4715 | 466 | 0x62, 0x6a, 0x65, 0x63, 0x74, 0x3e, 0x3c, 0x70, | ||
4716 | 467 | 0x61, 0x63, 0x6b, 0x69, 0x6e, 0x67, 0x3e, 0x3c, | ||
4717 | 468 | 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, | ||
4718 | 469 | 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x65, | ||
4719 | 470 | 0x78, 0x70, 0x61, 0x6e, 0x64, 0x22, 0x3e, 0x46, | ||
4720 | 471 | 0x61, 0x6c, 0x73, 0x65, 0x3c, 0x2f, 0x70, 0x72, | ||
4721 | 472 | 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x3e, 0x3c, | ||
4722 | 473 | 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, | ||
4723 | 474 | 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x66, | ||
4724 | 475 | 0x69, 0x6c, 0x6c, 0x22, 0x3e, 0x54, 0x72, 0x75, | ||
4725 | 476 | 0x65, 0x3c, 0x2f, 0x70, 0x72, 0x6f, 0x70, 0x65, | ||
4726 | 477 | 0x72, 0x74, 0x79, 0x3e, 0x3c, 0x70, 0x72, 0x6f, | ||
4727 | 478 | 0x70, 0x65, 0x72, 0x74, 0x79, 0x20, 0x6e, 0x61, | ||
4728 | 479 | 0x6d, 0x65, 0x3d, 0x22, 0x70, 0x6f, 0x73, 0x69, | ||
4729 | 480 | 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x3e, 0x30, 0x3c, | ||
4730 | 481 | 0x2f, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, | ||
4731 | 482 | 0x79, 0x3e, 0x3c, 0x2f, 0x70, 0x61, 0x63, 0x6b, | ||
4732 | 483 | 0x69, 0x6e, 0x67, 0x3e, 0x3c, 0x2f, 0x63, 0x68, | ||
4733 | 484 | 0x69, 0x6c, 0x64, 0x3e, 0x3c, 0x63, 0x68, 0x69, | ||
4734 | 485 | 0x6c, 0x64, 0x3e, 0x3c, 0x6f, 0x62, 0x6a, 0x65, | ||
4735 | 486 | 0x63, 0x74, 0x20, 0x63, 0x6c, 0x61, 0x73, 0x73, | ||
4736 | 487 | 0x3d, 0x22, 0x47, 0x74, 0x6b, 0x4c, 0x61, 0x62, | ||
4737 | 488 | 0x65, 0x6c, 0x22, 0x20, 0x69, 0x64, 0x3d, 0x22, | ||
4738 | 489 | 0x70, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x61, 0x6c, | ||
4739 | 490 | 0x2d, 0x66, 0x69, 0x6c, 0x65, 0x2d, 0x73, 0x68, | ||
4740 | 491 | 0x61, 0x72, 0x69, 0x6e, 0x67, 0x2d, 0x73, 0x74, | ||
4741 | 492 | 0x61, 0x74, 0x75, 0x73, 0x2d, 0x6c, 0x61, 0x62, | ||
4742 | 493 | 0x65, 0x6c, 0x22, 0x3e, 0x3c, 0x70, 0x72, 0x6f, | ||
4743 | 494 | 0x70, 0x65, 0x72, 0x74, 0x79, 0x20, 0x6e, 0x61, | ||
4744 | 495 | 0x6d, 0x65, 0x3d, 0x22, 0x76, 0x69, 0x73, 0x69, | ||
4745 | 496 | 0x62, 0x6c, 0x65, 0x22, 0x3e, 0x54, 0x72, 0x75, | ||
4746 | 497 | 0x65, 0x3c, 0x2f, 0x70, 0x72, 0x6f, 0x70, 0x65, | ||
4747 | 498 | 0x72, 0x74, 0x79, 0x3e, 0x3c, 0x70, 0x72, 0x6f, | ||
4748 | 499 | 0x70, 0x65, 0x72, 0x74, 0x79, 0x20, 0x6e, 0x61, | ||
4749 | 500 | 0x6d, 0x65, 0x3d, 0x22, 0x63, 0x61, 0x6e, 0x5f, | ||
4750 | 501 | 0x66, 0x6f, 0x63, 0x75, 0x73, 0x22, 0x3e, 0x46, | ||
4751 | 502 | 0x61, 0x6c, 0x73, 0x65, 0x3c, 0x2f, 0x70, 0x72, | ||
4752 | 503 | 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x3e, 0x3c, | ||
4753 | 504 | 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, | ||
4754 | 505 | 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x6c, | ||
4755 | 506 | 0x61, 0x62, 0x65, 0x6c, 0x22, 0x3e, 0x4f, 0x66, | ||
4756 | 507 | 0x66, 0x3c, 0x2f, 0x70, 0x72, 0x6f, 0x70, 0x65, | ||
4757 | 508 | 0x72, 0x74, 0x79, 0x3e, 0x3c, 0x2f, 0x6f, 0x62, | ||
4758 | 509 | 0x6a, 0x65, 0x63, 0x74, 0x3e, 0x3c, 0x70, 0x61, | ||
4759 | 510 | 0x63, 0x6b, 0x69, 0x6e, 0x67, 0x3e, 0x3c, 0x70, | ||
4760 | 511 | 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x20, | ||
4761 | 512 | 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x65, 0x78, | ||
4762 | 513 | 0x70, 0x61, 0x6e, 0x64, 0x22, 0x3e, 0x46, 0x61, | ||
4763 | 514 | 0x6c, 0x73, 0x65, 0x3c, 0x2f, 0x70, 0x72, 0x6f, | ||
4764 | 515 | 0x70, 0x65, 0x72, 0x74, 0x79, 0x3e, 0x3c, 0x70, | ||
4765 | 516 | 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x20, | ||
4766 | 517 | 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x66, 0x69, | ||
4767 | 518 | 0x6c, 0x6c, 0x22, 0x3e, 0x54, 0x72, 0x75, 0x65, | ||
4768 | 519 | 0x3c, 0x2f, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, | ||
4769 | 520 | 0x74, 0x79, 0x3e, 0x3c, 0x70, 0x72, 0x6f, 0x70, | ||
4770 | 521 | 0x65, 0x72, 0x74, 0x79, 0x20, 0x6e, 0x61, 0x6d, | ||
4771 | 522 | 0x65, 0x3d, 0x22, 0x70, 0x6f, 0x73, 0x69, 0x74, | ||
4772 | 523 | 0x69, 0x6f, 0x6e, 0x22, 0x3e, 0x31, 0x3c, 0x2f, | ||
4773 | 524 | 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, | ||
4774 | 525 | 0x3e, 0x3c, 0x2f, 0x70, 0x61, 0x63, 0x6b, 0x69, | ||
4775 | 526 | 0x6e, 0x67, 0x3e, 0x3c, 0x2f, 0x63, 0x68, 0x69, | ||
4776 | 527 | 0x6c, 0x64, 0x3e, 0x3c, 0x2f, 0x6f, 0x62, 0x6a, | ||
4777 | 528 | 0x65, 0x63, 0x74, 0x3e, 0x3c, 0x2f, 0x63, 0x68, | ||
4778 | 529 | 0x69, 0x6c, 0x64, 0x3e, 0x3c, 0x2f, 0x6f, 0x62, | ||
4779 | 530 | 0x6a, 0x65, 0x63, 0x74, 0x3e, 0x3c, 0x2f, 0x63, | ||
4780 | 531 | 0x68, 0x69, 0x6c, 0x64, 0x3e, 0x3c, 0x63, 0x68, | ||
4781 | 532 | 0x69, 0x6c, 0x64, 0x3e, 0x3c, 0x6f, 0x62, 0x6a, | ||
4782 | 533 | 0x65, 0x63, 0x74, 0x20, 0x63, 0x6c, 0x61, 0x73, | ||
4783 | 534 | 0x73, 0x3d, 0x22, 0x47, 0x74, 0x6b, 0x4c, 0x69, | ||
4784 | 535 | 0x73, 0x74, 0x42, 0x6f, 0x78, 0x52, 0x6f, 0x77, | ||
4785 | 536 | 0x22, 0x20, 0x69, 0x64, 0x3d, 0x22, 0x73, 0x63, | ||
4786 | 537 | 0x72, 0x65, 0x65, 0x6e, 0x2d, 0x73, 0x68, 0x61, | ||
4787 | 538 | 0x72, 0x69, 0x6e, 0x67, 0x2d, 0x62, 0x75, 0x74, | ||
4788 | 539 | 0x74, 0x6f, 0x6e, 0x22, 0x3e, 0x3c, 0x70, 0x72, | ||
4789 | 540 | 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x20, 0x6e, | ||
4790 | 541 | 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x76, 0x69, 0x73, | ||
4791 | 542 | 0x69, 0x62, 0x6c, 0x65, 0x22, 0x3e, 0x54, 0x72, | ||
4792 | 543 | 0x75, 0x65, 0x3c, 0x2f, 0x70, 0x72, 0x6f, 0x70, | ||
4793 | 544 | 0x65, 0x72, 0x74, 0x79, 0x3e, 0x3c, 0x63, 0x68, | ||
4794 | 545 | 0x69, 0x6c, 0x64, 0x3e, 0x3c, 0x6f, 0x62, 0x6a, | ||
4795 | 546 | 0x65, 0x63, 0x74, 0x20, 0x63, 0x6c, 0x61, 0x73, | ||
4796 | 547 | 0x73, 0x3d, 0x22, 0x47, 0x74, 0x6b, 0x42, 0x6f, | ||
4797 | 548 | 0x78, 0x22, 0x20, 0x69, 0x64, 0x3d, 0x22, 0x62, | ||
4798 | 549 | 0x6f, 0x78, 0x33, 0x22, 0x3e, 0x3c, 0x70, 0x72, | ||
4799 | 550 | 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x20, 0x6e, | ||
4800 | 551 | 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x6d, 0x61, 0x72, | ||
4801 | 552 | 0x67, 0x69, 0x6e, 0x5f, 0x74, 0x6f, 0x70, 0x22, | ||
4802 | 553 | 0x3e, 0x31, 0x38, 0x3c, 0x2f, 0x70, 0x72, 0x6f, | ||
4803 | 554 | 0x70, 0x65, 0x72, 0x74, 0x79, 0x3e, 0x3c, 0x70, | ||
4804 | 555 | 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x20, | ||
4805 | 556 | 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x6d, 0x61, | ||
4806 | 557 | 0x72, 0x67, 0x69, 0x6e, 0x5f, 0x62, 0x6f, 0x74, | ||
4807 | 558 | 0x74, 0x6f, 0x6d, 0x22, 0x3e, 0x31, 0x38, 0x3c, | ||
4808 | 559 | 0x2f, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, | ||
4809 | 560 | 0x79, 0x3e, 0x3c, 0x70, 0x72, 0x6f, 0x70, 0x65, | ||
4810 | 561 | 0x72, 0x74, 0x79, 0x20, 0x6e, 0x61, 0x6d, 0x65, | ||
4811 | 562 | 0x3d, 0x22, 0x6d, 0x61, 0x72, 0x67, 0x69, 0x6e, | ||
4812 | 563 | 0x5f, 0x6c, 0x65, 0x66, 0x74, 0x22, 0x3e, 0x31, | ||
4813 | 564 | 0x32, 0x3c, 0x2f, 0x70, 0x72, 0x6f, 0x70, 0x65, | ||
4814 | 565 | 0x72, 0x74, 0x79, 0x3e, 0x3c, 0x70, 0x72, 0x6f, | ||
4815 | 566 | 0x70, 0x65, 0x72, 0x74, 0x79, 0x20, 0x6e, 0x61, | ||
4816 | 567 | 0x6d, 0x65, 0x3d, 0x22, 0x6d, 0x61, 0x72, 0x67, | ||
4817 | 568 | 0x69, 0x6e, 0x5f, 0x72, 0x69, 0x67, 0x68, 0x74, | ||
4818 | 569 | 0x22, 0x3e, 0x31, 0x32, 0x3c, 0x2f, 0x70, 0x72, | ||
4819 | 570 | 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x3e, 0x3c, | ||
4820 | 571 | 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, | ||
4821 | 572 | 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x76, | ||
4822 | 573 | 0x69, 0x73, 0x69, 0x62, 0x6c, 0x65, 0x22, 0x3e, | ||
4823 | 574 | 0x54, 0x72, 0x75, 0x65, 0x3c, 0x2f, 0x70, 0x72, | ||
4824 | 575 | 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x3e, 0x3c, | ||
4825 | 576 | 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, | ||
4826 | 577 | 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x63, | ||
4827 | 578 | 0x61, 0x6e, 0x5f, 0x66, 0x6f, 0x63, 0x75, 0x73, | ||
4828 | 579 | 0x22, 0x3e, 0x46, 0x61, 0x6c, 0x73, 0x65, 0x3c, | ||
4829 | 580 | 0x2f, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, | ||
4830 | 581 | 0x79, 0x3e, 0x3c, 0x63, 0x68, 0x69, 0x6c, 0x64, | ||
4831 | 582 | 0x3e, 0x3c, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, | ||
4832 | 583 | 0x20, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x3d, 0x22, | ||
4833 | 584 | 0x47, 0x74, 0x6b, 0x4c, 0x61, 0x62, 0x65, 0x6c, | ||
4834 | 585 | 0x22, 0x20, 0x69, 0x64, 0x3d, 0x22, 0x6c, 0x61, | ||
4835 | 586 | 0x62, 0x65, 0x6c, 0x39, 0x22, 0x3e, 0x3c, 0x70, | ||
4836 | 587 | 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x20, | ||
4837 | 588 | 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x76, 0x69, | ||
4838 | 589 | 0x73, 0x69, 0x62, 0x6c, 0x65, 0x22, 0x3e, 0x54, | ||
4839 | 590 | 0x72, 0x75, 0x65, 0x3c, 0x2f, 0x70, 0x72, 0x6f, | ||
4840 | 591 | 0x70, 0x65, 0x72, 0x74, 0x79, 0x3e, 0x3c, 0x70, | ||
4841 | 592 | 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x20, | ||
4842 | 593 | 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x63, 0x61, | ||
4843 | 594 | 0x6e, 0x5f, 0x66, 0x6f, 0x63, 0x75, 0x73, 0x22, | ||
4844 | 595 | 0x3e, 0x46, 0x61, 0x6c, 0x73, 0x65, 0x3c, 0x2f, | ||
4845 | 596 | 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, | ||
4846 | 597 | 0x3e, 0x3c, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, | ||
4847 | 598 | 0x74, 0x79, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d, | ||
4848 | 599 | 0x22, 0x68, 0x61, 0x6c, 0x69, 0x67, 0x6e, 0x22, | ||
4849 | 600 | 0x3e, 0x73, 0x74, 0x61, 0x72, 0x74, 0x3c, 0x2f, | ||
4850 | 601 | 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, | ||
4851 | 602 | 0x3e, 0x3c, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, | ||
4852 | 603 | 0x74, 0x79, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d, | ||
4853 | 604 | 0x22, 0x68, 0x65, 0x78, 0x70, 0x61, 0x6e, 0x64, | ||
4854 | 605 | 0x22, 0x3e, 0x54, 0x72, 0x75, 0x65, 0x3c, 0x2f, | ||
4855 | 606 | 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, | ||
4856 | 607 | 0x3e, 0x3c, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, | ||
4857 | 608 | 0x74, 0x79, 0x20, 0x74, 0x72, 0x61, 0x6e, 0x73, | ||
4858 | 609 | 0x6c, 0x61, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x3d, | ||
4859 | 610 | 0x22, 0x79, 0x65, 0x73, 0x22, 0x20, 0x6e, 0x61, | ||
4860 | 611 | 0x6d, 0x65, 0x3d, 0x22, 0x6c, 0x61, 0x62, 0x65, | ||
4861 | 612 | 0x6c, 0x22, 0x3e, 0x5f, 0x53, 0x63, 0x72, 0x65, | ||
4862 | 613 | 0x65, 0x6e, 0x20, 0x53, 0x68, 0x61, 0x72, 0x69, | ||
4863 | 614 | 0x6e, 0x67, 0x3c, 0x2f, 0x70, 0x72, 0x6f, 0x70, | ||
4864 | 615 | 0x65, 0x72, 0x74, 0x79, 0x3e, 0x3c, 0x70, 0x72, | ||
4865 | 616 | 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x20, 0x6e, | ||
4866 | 617 | 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x75, 0x73, 0x65, | ||
4867 | 618 | 0x5f, 0x75, 0x6e, 0x64, 0x65, 0x72, 0x6c, 0x69, | ||
4868 | 619 | 0x6e, 0x65, 0x22, 0x3e, 0x54, 0x72, 0x75, 0x65, | ||
4869 | 620 | 0x3c, 0x2f, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, | ||
4870 | 621 | 0x74, 0x79, 0x3e, 0x3c, 0x70, 0x72, 0x6f, 0x70, | ||
4871 | 622 | 0x65, 0x72, 0x74, 0x79, 0x20, 0x6e, 0x61, 0x6d, | ||
4872 | 623 | 0x65, 0x3d, 0x22, 0x6d, 0x6e, 0x65, 0x6d, 0x6f, | ||
4873 | 624 | 0x6e, 0x69, 0x63, 0x5f, 0x77, 0x69, 0x64, 0x67, | ||
4874 | 625 | 0x65, 0x74, 0x22, 0x3e, 0x73, 0x63, 0x72, 0x65, | ||
4875 | 626 | 0x65, 0x6e, 0x2d, 0x73, 0x68, 0x61, 0x72, 0x69, | ||
4876 | 627 | 0x6e, 0x67, 0x2d, 0x62, 0x75, 0x74, 0x74, 0x6f, | ||
4877 | 628 | 0x6e, 0x3c, 0x2f, 0x70, 0x72, 0x6f, 0x70, 0x65, | ||
4878 | 629 | 0x72, 0x74, 0x79, 0x3e, 0x3c, 0x2f, 0x6f, 0x62, | ||
4879 | 630 | 0x6a, 0x65, 0x63, 0x74, 0x3e, 0x3c, 0x70, 0x61, | ||
4880 | 631 | 0x63, 0x6b, 0x69, 0x6e, 0x67, 0x3e, 0x3c, 0x70, | ||
4881 | 632 | 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x20, | ||
4882 | 633 | 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x65, 0x78, | ||
4883 | 634 | 0x70, 0x61, 0x6e, 0x64, 0x22, 0x3e, 0x46, 0x61, | ||
4884 | 635 | 0x6c, 0x73, 0x65, 0x3c, 0x2f, 0x70, 0x72, 0x6f, | ||
4885 | 636 | 0x70, 0x65, 0x72, 0x74, 0x79, 0x3e, 0x3c, 0x70, | ||
4886 | 637 | 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x20, | ||
4887 | 638 | 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x66, 0x69, | ||
4888 | 639 | 0x6c, 0x6c, 0x22, 0x3e, 0x54, 0x72, 0x75, 0x65, | ||
4889 | 640 | 0x3c, 0x2f, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, | ||
4890 | 641 | 0x74, 0x79, 0x3e, 0x3c, 0x70, 0x72, 0x6f, 0x70, | ||
4891 | 642 | 0x65, 0x72, 0x74, 0x79, 0x20, 0x6e, 0x61, 0x6d, | ||
4892 | 643 | 0x65, 0x3d, 0x22, 0x70, 0x6f, 0x73, 0x69, 0x74, | ||
4893 | 644 | 0x69, 0x6f, 0x6e, 0x22, 0x3e, 0x30, 0x3c, 0x2f, | ||
4894 | 645 | 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, | ||
4895 | 646 | 0x3e, 0x3c, 0x2f, 0x70, 0x61, 0x63, 0x6b, 0x69, | ||
4896 | 647 | 0x6e, 0x67, 0x3e, 0x3c, 0x2f, 0x63, 0x68, 0x69, | ||
4897 | 648 | 0x6c, 0x64, 0x3e, 0x3c, 0x63, 0x68, 0x69, 0x6c, | ||
4898 | 649 | 0x64, 0x3e, 0x3c, 0x6f, 0x62, 0x6a, 0x65, 0x63, | ||
4899 | 650 | 0x74, 0x20, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x3d, | ||
4900 | 651 | 0x22, 0x47, 0x74, 0x6b, 0x4c, 0x61, 0x62, 0x65, | ||
4901 | 652 | 0x6c, 0x22, 0x20, 0x69, 0x64, 0x3d, 0x22, 0x73, | ||
4902 | 653 | 0x63, 0x72, 0x65, 0x65, 0x6e, 0x2d, 0x73, 0x68, | ||
4903 | 654 | 0x61, 0x72, 0x69, 0x6e, 0x67, 0x2d, 0x73, 0x74, | ||
4904 | 655 | 0x61, 0x74, 0x75, 0x73, 0x2d, 0x6c, 0x61, 0x62, | ||
4905 | 656 | 0x65, 0x6c, 0x22, 0x3e, 0x3c, 0x70, 0x72, 0x6f, | ||
4906 | 657 | 0x70, 0x65, 0x72, 0x74, 0x79, 0x20, 0x6e, 0x61, | ||
4907 | 658 | 0x6d, 0x65, 0x3d, 0x22, 0x76, 0x69, 0x73, 0x69, | ||
4908 | 659 | 0x62, 0x6c, 0x65, 0x22, 0x3e, 0x54, 0x72, 0x75, | ||
4909 | 660 | 0x65, 0x3c, 0x2f, 0x70, 0x72, 0x6f, 0x70, 0x65, | ||
4910 | 661 | 0x72, 0x74, 0x79, 0x3e, 0x3c, 0x70, 0x72, 0x6f, | ||
4911 | 662 | 0x70, 0x65, 0x72, 0x74, 0x79, 0x20, 0x6e, 0x61, | ||
4912 | 663 | 0x6d, 0x65, 0x3d, 0x22, 0x63, 0x61, 0x6e, 0x5f, | ||
4913 | 664 | 0x66, 0x6f, 0x63, 0x75, 0x73, 0x22, 0x3e, 0x46, | ||
4914 | 665 | 0x61, 0x6c, 0x73, 0x65, 0x3c, 0x2f, 0x70, 0x72, | ||
4915 | 666 | 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x3e, 0x3c, | ||
4916 | 667 | 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, | ||
4917 | 668 | 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x6c, | ||
4918 | 669 | 0x61, 0x62, 0x65, 0x6c, 0x22, 0x3e, 0x4f, 0x66, | ||
4919 | 670 | 0x66, 0x3c, 0x2f, 0x70, 0x72, 0x6f, 0x70, 0x65, | ||
4920 | 671 | 0x72, 0x74, 0x79, 0x3e, 0x3c, 0x2f, 0x6f, 0x62, | ||
4921 | 672 | 0x6a, 0x65, 0x63, 0x74, 0x3e, 0x3c, 0x70, 0x61, | ||
4922 | 673 | 0x63, 0x6b, 0x69, 0x6e, 0x67, 0x3e, 0x3c, 0x70, | ||
4923 | 674 | 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x20, | ||
4924 | 675 | 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x65, 0x78, | ||
4925 | 676 | 0x70, 0x61, 0x6e, 0x64, 0x22, 0x3e, 0x46, 0x61, | ||
4926 | 677 | 0x6c, 0x73, 0x65, 0x3c, 0x2f, 0x70, 0x72, 0x6f, | ||
4927 | 678 | 0x70, 0x65, 0x72, 0x74, 0x79, 0x3e, 0x3c, 0x70, | ||
4928 | 679 | 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x20, | ||
4929 | 680 | 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x66, 0x69, | ||
4930 | 681 | 0x6c, 0x6c, 0x22, 0x3e, 0x54, 0x72, 0x75, 0x65, | ||
4931 | 682 | 0x3c, 0x2f, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, | ||
4932 | 683 | 0x74, 0x79, 0x3e, 0x3c, 0x70, 0x72, 0x6f, 0x70, | ||
4933 | 684 | 0x65, 0x72, 0x74, 0x79, 0x20, 0x6e, 0x61, 0x6d, | ||
4934 | 685 | 0x65, 0x3d, 0x22, 0x70, 0x6f, 0x73, 0x69, 0x74, | ||
4935 | 686 | 0x69, 0x6f, 0x6e, 0x22, 0x3e, 0x31, 0x3c, 0x2f, | ||
4936 | 687 | 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, | ||
4937 | 688 | 0x3e, 0x3c, 0x2f, 0x70, 0x61, 0x63, 0x6b, 0x69, | ||
4938 | 689 | 0x6e, 0x67, 0x3e, 0x3c, 0x2f, 0x63, 0x68, 0x69, | ||
4939 | 690 | 0x6c, 0x64, 0x3e, 0x3c, 0x2f, 0x6f, 0x62, 0x6a, | ||
4940 | 691 | 0x65, 0x63, 0x74, 0x3e, 0x3c, 0x2f, 0x63, 0x68, | ||
4941 | 692 | 0x69, 0x6c, 0x64, 0x3e, 0x3c, 0x2f, 0x6f, 0x62, | ||
4942 | 693 | 0x6a, 0x65, 0x63, 0x74, 0x3e, 0x3c, 0x2f, 0x63, | ||
4943 | 694 | 0x68, 0x69, 0x6c, 0x64, 0x3e, 0x3c, 0x63, 0x68, | ||
4944 | 695 | 0x69, 0x6c, 0x64, 0x3e, 0x3c, 0x6f, 0x62, 0x6a, | ||
4945 | 696 | 0x65, 0x63, 0x74, 0x20, 0x63, 0x6c, 0x61, 0x73, | ||
4946 | 697 | 0x73, 0x3d, 0x22, 0x47, 0x74, 0x6b, 0x4c, 0x69, | ||
4947 | 698 | 0x73, 0x74, 0x42, 0x6f, 0x78, 0x52, 0x6f, 0x77, | ||
4948 | 699 | 0x22, 0x20, 0x69, 0x64, 0x3d, 0x22, 0x6d, 0x65, | ||
4949 | 700 | 0x64, 0x69, 0x61, 0x2d, 0x73, 0x68, 0x61, 0x72, | ||
4950 | 701 | 0x69, 0x6e, 0x67, 0x2d, 0x62, 0x75, 0x74, 0x74, | ||
4951 | 702 | 0x6f, 0x6e, 0x22, 0x3e, 0x3c, 0x70, 0x72, 0x6f, | ||
4952 | 703 | 0x70, 0x65, 0x72, 0x74, 0x79, 0x20, 0x6e, 0x61, | ||
4953 | 704 | 0x6d, 0x65, 0x3d, 0x22, 0x76, 0x69, 0x73, 0x69, | ||
4954 | 705 | 0x62, 0x6c, 0x65, 0x22, 0x3e, 0x54, 0x72, 0x75, | ||
4955 | 706 | 0x65, 0x3c, 0x2f, 0x70, 0x72, 0x6f, 0x70, 0x65, | ||
4956 | 707 | 0x72, 0x74, 0x79, 0x3e, 0x3c, 0x63, 0x68, 0x69, | ||
4957 | 708 | 0x6c, 0x64, 0x3e, 0x3c, 0x6f, 0x62, 0x6a, 0x65, | ||
4958 | 709 | 0x63, 0x74, 0x20, 0x63, 0x6c, 0x61, 0x73, 0x73, | ||
4959 | 710 | 0x3d, 0x22, 0x47, 0x74, 0x6b, 0x42, 0x6f, 0x78, | ||
4960 | 711 | 0x22, 0x20, 0x69, 0x64, 0x3d, 0x22, 0x62, 0x6f, | ||
4961 | 712 | 0x78, 0x34, 0x22, 0x3e, 0x3c, 0x70, 0x72, 0x6f, | ||
4962 | 713 | 0x70, 0x65, 0x72, 0x74, 0x79, 0x20, 0x6e, 0x61, | ||
4963 | 714 | 0x6d, 0x65, 0x3d, 0x22, 0x6d, 0x61, 0x72, 0x67, | ||
4964 | 715 | 0x69, 0x6e, 0x5f, 0x74, 0x6f, 0x70, 0x22, 0x3e, | ||
4965 | 716 | 0x31, 0x38, 0x3c, 0x2f, 0x70, 0x72, 0x6f, 0x70, | ||
4966 | 717 | 0x65, 0x72, 0x74, 0x79, 0x3e, 0x3c, 0x70, 0x72, | ||
4967 | 718 | 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x20, 0x6e, | ||
4968 | 719 | 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x6d, 0x61, 0x72, | ||
4969 | 720 | 0x67, 0x69, 0x6e, 0x5f, 0x62, 0x6f, 0x74, 0x74, | ||
4970 | 721 | 0x6f, 0x6d, 0x22, 0x3e, 0x31, 0x38, 0x3c, 0x2f, | ||
4971 | 722 | 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, | ||
4972 | 723 | 0x3e, 0x3c, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, | ||
4973 | 724 | 0x74, 0x79, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d, | ||
4974 | 725 | 0x22, 0x6d, 0x61, 0x72, 0x67, 0x69, 0x6e, 0x5f, | ||
4975 | 726 | 0x6c, 0x65, 0x66, 0x74, 0x22, 0x3e, 0x31, 0x32, | ||
4976 | 727 | 0x3c, 0x2f, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, | ||
4977 | 728 | 0x74, 0x79, 0x3e, 0x3c, 0x70, 0x72, 0x6f, 0x70, | ||
4978 | 729 | 0x65, 0x72, 0x74, 0x79, 0x20, 0x6e, 0x61, 0x6d, | ||
4979 | 730 | 0x65, 0x3d, 0x22, 0x6d, 0x61, 0x72, 0x67, 0x69, | ||
4980 | 731 | 0x6e, 0x5f, 0x72, 0x69, 0x67, 0x68, 0x74, 0x22, | ||
4981 | 732 | 0x3e, 0x31, 0x32, 0x3c, 0x2f, 0x70, 0x72, 0x6f, | ||
4982 | 733 | 0x70, 0x65, 0x72, 0x74, 0x79, 0x3e, 0x3c, 0x70, | ||
4983 | 734 | 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x20, | ||
4984 | 735 | 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x76, 0x69, | ||
4985 | 736 | 0x73, 0x69, 0x62, 0x6c, 0x65, 0x22, 0x3e, 0x54, | ||
4986 | 737 | 0x72, 0x75, 0x65, 0x3c, 0x2f, 0x70, 0x72, 0x6f, | ||
4987 | 738 | 0x70, 0x65, 0x72, 0x74, 0x79, 0x3e, 0x3c, 0x70, | ||
4988 | 739 | 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x20, | ||
4989 | 740 | 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x63, 0x61, | ||
4990 | 741 | 0x6e, 0x5f, 0x66, 0x6f, 0x63, 0x75, 0x73, 0x22, | ||
4991 | 742 | 0x3e, 0x46, 0x61, 0x6c, 0x73, 0x65, 0x3c, 0x2f, | ||
4992 | 743 | 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, | ||
4993 | 744 | 0x3e, 0x3c, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x3e, | ||
4994 | 745 | 0x3c, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x20, | ||
4995 | 746 | 0x63, 0x6c, 0x61, 0x73, 0x73, 0x3d, 0x22, 0x47, | ||
4996 | 747 | 0x74, 0x6b, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x22, | ||
4997 | 748 | 0x20, 0x69, 0x64, 0x3d, 0x22, 0x6c, 0x61, 0x62, | ||
4998 | 749 | 0x65, 0x6c, 0x31, 0x30, 0x22, 0x3e, 0x3c, 0x70, | ||
4999 | 750 | 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x20, | ||
5000 | 751 | 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x76, 0x69, |
I can't global approve this, but it's fine for me.