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