Merge lp:~khurshid-alam/unity-control-center/sharing-panel into lp:unity-control-center

Proposed by Khurshid Alam
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
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-center

This commit imports sharing panel from gnome-control-center and removes old screen-sharing panel.
https://bugzilla.gnome.org/show_bug.cgi?id=731862

Description of the change

To post a comment you must log in.
Revision history for this message
Marco Trevisan (Treviño) (3v1n0) :
review: Approve
Revision history for this message
Marco Trevisan (Treviño) (3v1n0) wrote :

I can't global approve this, but it's fine for me.

Revision history for this message
Khurshid Alam (khurshid-alam) wrote :

Laney also approved this on https://bugs.launchpad.net/ubuntu/+source/unity-control-center/+bug/1741027/comments/9 (though it was for bionic)

so I ask him ?

Revision history for this message
Khurshid Alam (khurshid-alam) wrote :

Since disco is already out, can it be landed in disco ?

Revision history for this message
Marco Trevisan (Treviño) (3v1n0) wrote :

Some dep version changed, what was the reason for?

review: Needs Information
12915. By Khurshid Alam

Don't downgrade libgnome-desktop dependency

Revision history for this message
Khurshid Alam (khurshid-alam) wrote :

Right, dependencies shouldn't have changed. I was using old bzr-rewrite package.

Fixed now.

Revision history for this message
Marco Trevisan (Treviño) (3v1n0) :
12916. By Khurshid Alam

Drop libgirepository1.0-dev from build-dep

Revision history for this message
Khurshid Alam (khurshid-alam) wrote :

I also dropped libgirepository1.0-dev from build-dep.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'configure.ac'
--- configure.ac 2018-02-16 13:07:36 +0000
+++ configure.ac 2018-11-21 12:36:03 +0000
@@ -130,10 +130,12 @@
130 gsettings-desktop-schemas >= $SCHEMAS_REQUIRED_VERSION130 gsettings-desktop-schemas >= $SCHEMAS_REQUIRED_VERSION
131 libnotify >= $LIBNOTIFY_REQUIRED_VERSION"131 libnotify >= $LIBNOTIFY_REQUIRED_VERSION"
132132
133PKG_CHECK_MODULES(LIBUNITY_CONTROL_CENTER, $COMMON_MODULES)133PKG_CHECK_MODULES(LIBUNITY_CONTROL_CENTER, $COMMON_MODULES
134 polkit-gobject-1 >= $POLKIT_REQUIRED_VERSION)
134PKG_CHECK_MODULES(LIBLANGUAGE, $COMMON_MODULES gnome-desktop-3.0 fontconfig)135PKG_CHECK_MODULES(LIBLANGUAGE, $COMMON_MODULES gnome-desktop-3.0 fontconfig)
135PKG_CHECK_MODULES(LIBSHORTCUTS, $COMMON_MODULES x11)136PKG_CHECK_MODULES(LIBSHORTCUTS, $COMMON_MODULES x11)
136PKG_CHECK_MODULES(SHELL, $COMMON_MODULES libgnome-menu-3.0 gio-unix-2.0 x11)137PKG_CHECK_MODULES(SHELL, $COMMON_MODULES libgnome-menu-3.0 gio-unix-2.0 x11
138 polkit-gobject-1 >= $POLKIT_REQUIRED_VERSION)
137PKG_CHECK_MODULES(APPEARANCE_PANEL, $COMMON_MODULES libxml-2.0 gnome-desktop-3.0139PKG_CHECK_MODULES(APPEARANCE_PANEL, $COMMON_MODULES libxml-2.0 gnome-desktop-3.0
138 gdk-pixbuf-2.0 >= $GDKPIXBUF_REQUIRED_VERSION)140 gdk-pixbuf-2.0 >= $GDKPIXBUF_REQUIRED_VERSION)
139PKG_CHECK_MODULES(DATETIME_PANEL, $COMMON_MODULES timezonemap geonames141PKG_CHECK_MODULES(DATETIME_PANEL, $COMMON_MODULES timezonemap geonames
@@ -159,8 +161,9 @@
159 $IBUS_MODULE161 $IBUS_MODULE
160 $FCITX_MODULE162 $FCITX_MODULE
161 x11)163 x11)
164PKG_CHECK_MODULES(REMOTE_LOGIN_HELPER, glib-2.0 >= $GLIB_REQUIRED_VERSION gio-2.0)
162PKG_CHECK_MODULES(SCREEN_PANEL, $COMMON_MODULES)165PKG_CHECK_MODULES(SCREEN_PANEL, $COMMON_MODULES)
163PKG_CHECK_MODULES(SCREEN_SHARING_PANEL, $COMMON_MODULES)166PKG_CHECK_MODULES(SHARING_PANEL, $COMMON_MODULES)
164PKG_CHECK_MODULES(SOUND_PANEL, $COMMON_MODULES libxml-2.0167PKG_CHECK_MODULES(SOUND_PANEL, $COMMON_MODULES libxml-2.0
165 libcanberra-gtk3 >= $CANBERRA_REQUIRED_VERSION168 libcanberra-gtk3 >= $CANBERRA_REQUIRED_VERSION
166 libpulse >= $PA_REQUIRED_VERSION169 libpulse >= $PA_REQUIRED_VERSION
@@ -183,7 +186,7 @@
183PKG_CHECK_MODULES(NETWORK_MANAGER, NetworkManager >= $NETWORK_MANAGER_REQUIRED_VERSION186PKG_CHECK_MODULES(NETWORK_MANAGER, NetworkManager >= $NETWORK_MANAGER_REQUIRED_VERSION
184 libnm-glib >= $NETWORK_MANAGER_REQUIRED_VERSION187 libnm-glib >= $NETWORK_MANAGER_REQUIRED_VERSION
185 libnm-util >= $NETWORK_MANAGER_REQUIRED_VERSION188 libnm-util >= $NETWORK_MANAGER_REQUIRED_VERSION
186 libnm-gtk >= $NETWORK_MANAGER_REQUIRED_VERSION,189 libnm-gtk >= $NETWORK_MANAGER_REQUIRED_VERSION,
187 [have_networkmanager=yes], have_networkmanager=no)190 [have_networkmanager=yes], have_networkmanager=no)
188if test "x$have_networkmanager" = xno ; then191if test "x$have_networkmanager" = xno ; then
189 AC_MSG_WARN(*** Network panel will not be built (NetworkManager ~0.9 or newer not found) ***)192 AC_MSG_WARN(*** Network panel will not be built (NetworkManager ~0.9 or newer not found) ***)
@@ -490,8 +493,8 @@
490panels/sound/data/icons/scalable/devices/Makefile493panels/sound/data/icons/scalable/devices/Makefile
491panels/screen/Makefile494panels/screen/Makefile
492panels/screen/unity-screen-panel.desktop.in495panels/screen/unity-screen-panel.desktop.in
493panels/screen-sharing/Makefile496panels/sharing/Makefile
494panels/screen-sharing/unity-screen-sharing-panel.desktop.in497panels/sharing/unity-sharing-panel.desktop.in
495panels/info/Makefile498panels/info/Makefile
496panels/info/unity-info-panel.desktop.in499panels/info/unity-info-panel.desktop.in
497panels/power/Makefile500panels/power/Makefile
498501
=== modified file 'debian/libunity-control-center1.symbols'
--- debian/libunity-control-center1.symbols 2018-02-07 13:07:13 +0000
+++ debian/libunity-control-center1.symbols 2018-11-21 12:36:03 +0000
@@ -18,6 +18,9 @@
18 cc_editable_entry_set_text@Base 14.04.018 cc_editable_entry_set_text@Base 14.04.0
19 cc_editable_entry_set_weight@Base 14.04.019 cc_editable_entry_set_weight@Base 14.04.0
20 cc_editable_entry_set_width_chars@Base 14.04.3+14.04.2014022520 cc_editable_entry_set_width_chars@Base 14.04.3+14.04.20140225
21 cc_hostname_entry_get_hostname@Base 15.04.0+17.10.20171225
22 cc_hostname_entry_get_type@Base 15.04.0+17.10.20171225
23 cc_hostname_entry_new@Base 15.04.0+17.10.20171225
21 cc_list_box_adjust_scrolling@Base 15.04.0+17.10.2017122524 cc_list_box_adjust_scrolling@Base 15.04.0+17.10.20171225
22 cc_list_box_setup_scrolling@Base 15.04.0+17.10.2017122525 cc_list_box_setup_scrolling@Base 15.04.0+17.10.20171225
23 cc_list_box_update_header_func@Base 15.04.0+17.10.2017122526 cc_list_box_update_header_func@Base 15.04.0+17.10.20171225
@@ -32,3 +35,5 @@
32 cc_shell_get_type@Base 14.04.035 cc_shell_get_type@Base 14.04.0
33 cc_shell_set_active_panel@Base 14.04.036 cc_shell_set_active_panel@Base 14.04.0
34 cc_shell_set_active_panel_from_id@Base 14.04.037 cc_shell_set_active_panel_from_id@Base 14.04.0
38 pretty_hostname_to_ssid@Base 15.04.0+17.10.20171225
39 pretty_hostname_to_static@Base 15.04.0+17.10.20171225
3540
=== modified file 'panels/Makefile.am'
--- panels/Makefile.am 2018-02-07 13:01:46 +0000
+++ panels/Makefile.am 2018-11-21 12:36:03 +0000
@@ -10,11 +10,11 @@
10 region \10 region \
11 info \11 info \
12 sound \12 sound \
13 sharing \
13 keyboard \14 keyboard \
14 universal-access \15 universal-access \
15 user-accounts \16 user-accounts \
16 bluetooth \17 bluetooth
17 screen-sharing
1818
19if BUILD_WACOM19if BUILD_WACOM
20SUBDIRS += wacom20SUBDIRS += wacom
2121
=== removed directory 'panels/screen-sharing'
=== removed file 'panels/screen-sharing/Makefile.am'
--- panels/screen-sharing/Makefile.am 2017-12-07 05:41:33 +0000
+++ panels/screen-sharing/Makefile.am 1970-01-01 00:00:00 +0000
@@ -1,39 +0,0 @@
1# This is used in PANEL_CFLAGS
2cappletname = screen-sharing
3
4uidir = $(pkgdatadir)/ui/screen-sharing
5dist_ui_DATA = \
6 screen-sharing-panel.ui
7
8INCLUDES = \
9 $(PANEL_CFLAGS) \
10 $(SCREEN_SHARING_PANEL_CFLAGS) \
11 -DG_LOG_DOMAIN="\"$(PACKAGE)\"" \
12 -DGNOMECC_UI_DIR="\"$(uidir)\"" \
13 -DGNOMELOCALEDIR="\"$(datadir)/locale\"" \
14 $(NULL)
15
16ccpanelsdir = $(PANELS_DIR)
17ccpanels_LTLIBRARIES = libscreen-sharing.la
18
19libscreen_sharing_la_SOURCES = \
20 screen-sharing-module.c \
21 vino-message-box.c \
22 vino-message-box.h \
23 cc-screen-sharing-panel.c \
24 cc-screen-sharing-panel.h \
25 vino-radio-button.c \
26 vino-radio-button.h
27
28libscreen_sharing_la_LIBADD = $(PANEL_LIBS) $(SCREEN_SHARING_PANEL_LIBS)
29libscreen_sharing_la_LDFLAGS = $(PANEL_LDFLAGS)
30
31@INTLTOOL_DESKTOP_RULE@
32
33desktopdir = $(datadir)/applications
34desktop_in_files = unity-screen-sharing-panel.desktop.in
35desktop_DATA = $(desktop_in_files:.desktop.in=.desktop)
36
37CLEANFILES = $(desktop_in_files) $(desktop_DATA)
38
39-include $(top_srcdir)/git.mk
400
=== removed file 'panels/screen-sharing/cc-screen-sharing-panel.c'
--- panels/screen-sharing/cc-screen-sharing-panel.c 2017-12-07 05:41:33 +0000
+++ panels/screen-sharing/cc-screen-sharing-panel.c 1970-01-01 00:00:00 +0000
@@ -1,315 +0,0 @@
1/*
2 * Copyright (C) 2003 Sun Microsystems, Inc.
3 * Copyright (C) 2006 Jonh Wendell <wendell@bani.com.br>
4 * Copyright © 2010 Codethink Limited
5 *
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public License as
8 * published by the Free Software Foundation; either version 2 of the
9 * License, or (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful, but
12 * WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
19 * 02111-1307, USA.
20 *
21 * Authors:
22 * Mark McLoughlin <mark@skynet.ie>
23 * Jonh Wendell <wendell@bani.com.br>
24 * Ryan Lortie <desrt@desrt.ca>
25 */
26
27#include "config.h"
28
29#include "cc-screen-sharing-panel.h"
30#include "vino-radio-button.h"
31#include "vino-message-box.h"
32
33#include <glib/gi18n.h>
34#include <gtk/gtk.h>
35#include <shell/cc-panel.h>
36
37typedef struct
38{
39 CcPanel parent;
40} CcScreenSharingPanel;
41
42typedef struct
43{
44 CcPanelClass parent_class;
45} CcScreenSharingPanelClass;
46
47static GType cc_screen_sharing_panel_get_type (void);
48
49CC_PANEL_REGISTER (CcScreenSharingPanel, cc_screen_sharing_panel)
50
51#define VINO_SCHEMA_ID "org.gnome.Vino"
52
53/* We define three GSettings mappings here:
54 *
55 * First, a relatively boring boolean inversion mapping.
56 */
57static gboolean
58get_inverted (GValue *value,
59 GVariant *variant,
60 gpointer user_data)
61{
62 g_value_set_boolean (value, !g_variant_get_boolean (variant));
63 return TRUE;
64}
65
66static GVariant *
67set_inverted (const GValue *value,
68 const GVariantType *type,
69 gpointer user_data)
70{
71 return g_variant_new_boolean (!g_value_get_boolean (value));
72}
73
74/* Next, one that maps between the array-of-strings list of
75 * authentication mechanisms and a boolean that is FALSE if the 'none'
76 * and TRUE otherwise (ie: for 'vnc' in the list).
77 */
78static gboolean
79get_authtype (GValue *value,
80 GVariant *variant,
81 gpointer user_data)
82{
83 GVariantIter iter;
84 const gchar *type;
85
86 g_variant_iter_init (&iter, variant);
87 g_value_set_boolean (value, TRUE);
88
89 while (g_variant_iter_next (&iter, "s", &type))
90 if (strcmp (type, "none") == 0)
91 g_value_set_boolean (value, FALSE);
92
93 return TRUE;
94}
95
96static GVariant *
97set_authtype (const GValue *value,
98 const GVariantType *type,
99 gpointer user_data)
100{
101 const gchar *authtype;
102
103 if (g_value_get_boolean (value))
104 authtype = "vnc";
105 else
106 authtype = "none";
107
108 return g_variant_new_strv (&authtype, 1);
109}
110
111
112/* Finally, a somewhat evil mapping for the password setting:
113 *
114 * If the setting is 'keyring' then we load the password from the
115 * keyring. Else, it is assumed to be a base64-encoded string which is
116 * the actual password.
117 *
118 * On setting the password, we always first try to use the keyring. If
119 * that is successful we write 'keyring' to the settings. If it fails
120 * then we base64-encode the password and write it to the settings.
121 *
122 * Doing it this way ensures that there is no ambiguity about what the
123 * password is in the event that gnome-keyring becomes available then
124 * unavailable again.
125 */
126static gboolean
127get_password (GValue *value,
128 GVariant *variant,
129 gpointer user_data)
130{
131 const gchar *setting;
132
133 setting = g_variant_get_string (variant, NULL);
134
135 if (strcmp (setting, "keyring") == 0)
136 {
137 /* "keyring" is the default value, even though vino doesn't support it at the moment */
138 g_value_set_static_string (value, "");
139 return TRUE;
140 }
141 else
142 {
143 gchar *decoded;
144 gsize length;
145 gboolean ok;
146
147 decoded = (gchar *) g_base64_decode (setting, &length);
148
149 if ((ok = g_utf8_validate (decoded, length, NULL)))
150 g_value_take_string (value, g_strndup (decoded, length));
151
152 return ok;
153 }
154}
155
156static GVariant *
157set_password (const GValue *value,
158 const GVariantType *type,
159 gpointer user_data)
160{
161 const gchar *string;
162 gchar *base64;
163
164 string = g_value_get_string (value);
165
166 /* if that failed, store it in GSettings, base64 */
167 base64 = g_base64_encode ((guchar *) string, strlen (string));
168 return g_variant_new_from_data (G_VARIANT_TYPE_STRING,
169 base64, strlen (base64) + 1,
170 TRUE, g_free, base64);
171}
172
173typedef enum
174{
175 VINO_ICON_VISIBILITY_NEVER,
176 VINO_ICON_VISIBILITY_ALWAYS,
177 VINO_ICON_VISIBILITY_CLIENT
178} VinoIconVisibility;
179
180static gboolean
181get_icon_visibility (GValue *value,
182 GVariant *variant,
183 gpointer user_data)
184{
185 const char *setting;
186 char *name;
187
188 setting = g_variant_get_string (variant, NULL);
189
190 g_object_get (user_data, "name", &name, NULL);
191
192 /* If the button name matches the setting, it should be active. */
193 if (g_strcmp0 (name, setting) == 0)
194 g_value_set_boolean (value, TRUE);
195
196 g_free (name);
197
198 return TRUE;
199}
200
201static GVariant *
202set_icon_visibility (const GValue *value,
203 const GVariantType *type,
204 gpointer user_data)
205{
206 GVariant *variant = NULL;
207 char *name;
208
209 /* Don't act unless the button has been activated (turned ON). */
210 if (!g_value_get_boolean (value))
211 return NULL;
212
213 /* GtkToggleButton *button = GTK_TOGGLE_BUTTON(user_data); */
214 g_object_get (user_data, "name", &name, NULL);
215 variant = g_variant_new_string (name);
216
217 g_free (name);
218
219 return variant;
220}
221
222static void
223cc_screen_sharing_panel_init (CcScreenSharingPanel *panel)
224{
225 struct {
226 const gchar *setting;
227 const gchar *name;
228 const gchar *property;
229 GSettingsBindFlags flags;
230 GSettingsBindGetMapping get_mapping;
231 GSettingsBindSetMapping set_mapping;
232 } bindings[] = {
233 { "enabled", "allowed_toggle", "active", G_SETTINGS_BIND_DEFAULT, NULL, NULL },
234
235 { "enabled", "control_settings", "sensitive", G_SETTINGS_BIND_GET, NULL, NULL },
236 { "view-only", "view_only_toggle", "active", G_SETTINGS_BIND_DEFAULT, get_inverted, set_inverted },
237
238 { "enabled", "security_settings", "sensitive", G_SETTINGS_BIND_GET, NULL, NULL },
239 { "prompt-enabled", "prompt_enabled_toggle", "active", G_SETTINGS_BIND_DEFAULT, NULL, NULL },
240 { "authentication-methods", "password_toggle", "active", G_SETTINGS_BIND_DEFAULT, get_authtype, set_authtype },
241 { "authentication-methods", "password_box", "sensitive", G_SETTINGS_BIND_GET, get_authtype, NULL },
242 { "vnc-password", "password_entry", "text", G_SETTINGS_BIND_DEFAULT, get_password, set_password },
243 { "use-upnp", "use_upnp_toggle", "active", G_SETTINGS_BIND_DEFAULT, NULL, NULL },
244
245 { "enabled", "notification_settings", "sensitive", G_SETTINGS_BIND_GET, NULL, NULL },
246
247 { "icon-visibility", "icon_always_radio", "active", G_SETTINGS_BIND_DEFAULT, get_icon_visibility, set_icon_visibility },
248 { "icon-visibility", "icon_client_radio", "active", G_SETTINGS_BIND_DEFAULT, get_icon_visibility, set_icon_visibility },
249 { "icon-visibility", "icon_never_radio", "active", G_SETTINGS_BIND_DEFAULT, get_icon_visibility, set_icon_visibility }
250 };
251 GSettingsSchemaSource *source;
252
253 source = g_settings_schema_source_get_default ();
254 if (source && g_settings_schema_source_lookup (source, VINO_SCHEMA_ID, TRUE))
255 {
256 GError *error = NULL;
257 GtkBuilder *builder;
258 GSettings *settings;
259 gint i;
260
261 vino_radio_button_get_type ();
262 vino_message_box_get_type ();
263
264 builder = gtk_builder_new ();
265 if (!gtk_builder_add_from_file (builder, GNOMECC_UI_DIR "/screen-sharing-panel.ui", &error))
266 {
267 g_warning ("Unable to load interface file: %s", error->message);
268 g_error_free (error);
269 }
270 gtk_widget_reparent (GTK_WIDGET (gtk_builder_get_object (builder, "screen_sharing_vbox")), GTK_WIDGET (panel));
271
272 settings = g_settings_new (VINO_SCHEMA_ID);
273
274 for (i = 0; i < G_N_ELEMENTS (bindings); i++)
275 {
276 GObject *object = gtk_builder_get_object (builder, bindings[i].name);
277 g_settings_bind_with_mapping (settings, bindings[i].setting,
278 object,
279 bindings[i].property,
280 bindings[i].flags,
281 bindings[i].get_mapping,
282 bindings[i].set_mapping,
283 object, NULL);
284 }
285
286 g_object_unref (settings);
287 g_object_unref (builder);
288 }
289 else
290 {
291 GtkWidget *label;
292 gchar *text;
293
294 label = gtk_label_new (NULL);
295 text = g_strdup_printf ("<big>%s</big>", _("Desktop sharing support not installed"));
296 gtk_label_set_markup (GTK_LABEL (label), text);
297 g_free (text);
298 gtk_widget_show (label);
299 gtk_container_add (GTK_CONTAINER (panel), label);
300 }
301}
302
303static void
304cc_screen_sharing_panel_class_init (CcScreenSharingPanelClass *class)
305{
306}
307
308void
309cc_screen_sharing_panel_register (GIOModule *module)
310{
311 cc_screen_sharing_panel_register_type (G_TYPE_MODULE (module));
312 g_io_extension_point_implement (CC_SHELL_PANEL_EXTENSION_POINT,
313 cc_screen_sharing_panel_get_type (),
314 "screen-sharing", 0);
315}
3160
=== removed file 'panels/screen-sharing/cc-screen-sharing-panel.h'
--- panels/screen-sharing/cc-screen-sharing-panel.h 2017-12-07 05:41:33 +0000
+++ panels/screen-sharing/cc-screen-sharing-panel.h 1970-01-01 00:00:00 +0000
@@ -1,29 +0,0 @@
1/*
2 * Copyright © 2010 Codethink Limited
3 *
4 * This program is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU General Public License as
6 * published by the Free Software Foundation; either version 2 of the
7 * License, or (at your option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful, but
10 * WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
17 * 02111-1307, USA.
18 *
19 * Author: Ryan Lortie <desrt@desrt.ca>
20 */
21
22#ifndef __vino_preferences_h__
23#define __vino_preferences_h__
24
25#include <shell/cc-panel.h>
26
27void cc_screen_sharing_panel_register (GIOModule *module);
28
29#endif /* __vino_preferences_h__ */
300
=== removed file 'panels/screen-sharing/screen-sharing-module.c'
--- panels/screen-sharing/screen-sharing-module.c 2017-12-07 05:41:33 +0000
+++ panels/screen-sharing/screen-sharing-module.c 1970-01-01 00:00:00 +0000
@@ -1,41 +0,0 @@
1/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*-
2 *
3 * Copyright (C) 2010 Red Hat, Inc
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2 of the License, or
8 * (at your option) any later version.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18 *
19 *
20 */
21
22#include <config.h>
23
24#include "cc-screen-sharing-panel.h"
25
26#include <glib/gi18n-lib.h>
27
28void
29g_io_module_load (GIOModule *module)
30{
31 bindtextdomain (GETTEXT_PACKAGE, GNOMELOCALEDIR);
32 bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
33
34 /* register the panel */
35 cc_screen_sharing_panel_register (module);
36}
37
38void
39g_io_module_unload (GIOModule *module)
40{
41}
420
=== removed file 'panels/screen-sharing/screen-sharing-panel.ui'
--- panels/screen-sharing/screen-sharing-panel.ui 2017-12-07 05:41:33 +0000
+++ panels/screen-sharing/screen-sharing-panel.ui 1970-01-01 00:00:00 +0000
@@ -1,400 +0,0 @@
1<?xml version="1.0"?>
2<interface>
3 <requires lib="gtk+" version="2.16"/>
4 <!-- interface-naming-policy toplevel-contextual -->
5 <object class="GtkWindow" id="window1">
6 <child>
7 <object class="GtkBox" id="screen_sharing_vbox">
8 <property name="visible">True</property>
9 <property name="orientation">vertical</property>
10 <property name="spacing">6</property>
11 <child>
12 <object class="GtkBox" id="vbox1">
13 <property name="visible">True</property>
14 <property name="orientation">vertical</property>
15 <property name="border_width">6</property>
16 <property name="spacing">18</property>
17 <child>
18 <object class="GtkBox" id="sharing_box">
19 <property name="visible">True</property>
20 <property name="orientation">vertical</property>
21 <property name="spacing">6</property>
22 <child>
23 <object class="GtkLabel" id="label1">
24 <property name="visible">True</property>
25 <property name="xalign">0</property>
26 <property name="label" translatable="yes">Sharing</property>
27 <attributes>
28 <attribute name="weight" value="bold"/>
29 </attributes>
30 </object>
31 <packing>
32 <property name="position">0</property>
33 </packing>
34 </child>
35 <child>
36 <object class="GtkBox" id="writability_warning">
37 <property name="orientation">horizontal</property>
38 <property name="no_show_all">True</property>
39 <property name="border_width">3</property>
40 <property name="spacing">6</property>
41 <child>
42 <object class="GtkLabel" id="label6">
43 <property name="visible">True</property>
44 <property name="label"> </property>
45 </object>
46 <packing>
47 <property name="expand">False</property>
48 <property name="fill">False</property>
49 <property name="position">0</property>
50 </packing>
51 </child>
52 <child>
53 <object class="GtkImage" id="image1">
54 <property name="visible">True</property>
55 <property name="stock">gtk-dialog-warning</property>
56 </object>
57 <packing>
58 <property name="expand">False</property>
59 <property name="position">1</property>
60 </packing>
61 </child>
62 <child>
63 <object class="GtkLabel" id="label8">
64 <property name="visible">True</property>
65 <property name="label" translatable="yes">Some of these preferences are locked down</property>
66 <attributes>
67 <attribute name="style" value="italic"/>
68 </attributes>
69 </object>
70 <packing>
71 <property name="expand">False</property>
72 <property name="fill">False</property>
73 <property name="position">2</property>
74 </packing>
75 </child>
76 </object>
77 <packing>
78 <property name="position">1</property>
79 </packing>
80 </child>
81 <child>
82 <object class="GtkBox" id="hbox1">
83 <property name="visible">True</property>
84 <property name="orientation">horizontal</property>
85 <child>
86 <object class="GtkLabel" id="label2">
87 <property name="visible">True</property>
88 <property name="label"> </property>
89 </object>
90 <packing>
91 <property name="expand">False</property>
92 <property name="fill">False</property>
93 <property name="position">0</property>
94 </packing>
95 </child>
96 <child>
97 <object class="GtkCheckButton" id="allowed_toggle">
98 <property name="label" translatable="yes">Allow other users to _view your desktop</property>
99 <property name="visible">True</property>
100 <property name="can_focus">True</property>
101 <property name="receives_default">False</property>
102 <property name="has_tooltip">True</property>
103 <property name="tooltip_text" translatable="yes">Your desktop will be shared</property>
104 <property name="use_underline">True</property>
105 <property name="draw_indicator">True</property>
106 </object>
107 <packing>
108 <property name="position">1</property>
109 </packing>
110 </child>
111 </object>
112 <packing>
113 <property name="position">2</property>
114 </packing>
115 </child>
116 <child>
117 <object class="GtkBox" id="control_settings">
118 <property name="visible">True</property>
119 <property name="orientation">horizontal</property>
120 <child>
121 <object class="GtkLabel" id="label3">
122 <property name="visible">True</property>
123 <property name="label"> </property>
124 </object>
125 <packing>
126 <property name="expand">False</property>
127 <property name="fill">False</property>
128 <property name="position">0</property>
129 </packing>
130 </child>
131 <child>
132 <object class="GtkCheckButton" id="view_only_toggle">
133 <property name="label" translatable="yes">_Allow other users to control your desktop</property>
134 <property name="visible">True</property>
135 <property name="can_focus">True</property>
136 <property name="receives_default">False</property>
137 <property name="has_tooltip">True</property>
138 <property name="tooltip_text" translatable="yes">Remote users are able to control your mouse and keyboard</property>
139 <property name="use_underline">True</property>
140 <property name="draw_indicator">True</property>
141 </object>
142 <packing>
143 <property name="position">1</property>
144 </packing>
145 </child>
146 </object>
147 <packing>
148 <property name="position">3</property>
149 </packing>
150 </child>
151 <!--
152 <child>
153 <object class="GtkBox" id="message_box">
154 <property name="visible">True</property>
155 <property name="orientation">horizontal</property>
156 <child>
157 <object class="GtkLabel" id="label14">
158 <property name="visible">True</property>
159 <property name="label"> </property>
160 </object>
161 <packing>
162 <property name="expand">False</property>
163 <property name="fill">False</property>
164 <property name="position">0</property>
165 </packing>
166 </child>
167 <child>
168 <object class="VinoMessageBox" id="message">
169 <property name="visible">True</property>
170 </object>
171 <packing>
172 <property name="position">1</property>
173 </packing>
174 </child>
175 </object>
176 <packing>
177 <property name="position">4</property>
178 </packing>
179 </child>
180 -->
181 </object>
182 <packing>
183 <property name="position">0</property>
184 </packing>
185 </child>
186 <child>
187 <object class="GtkBox" id="security_box">
188 <property name="visible">True</property>
189 <property name="orientation">vertical</property>
190 <property name="spacing">6</property>
191 <child>
192 <object class="GtkLabel" id="label4">
193 <property name="visible">True</property>
194 <property name="xalign">0</property>
195 <property name="label" translatable="yes">Security</property>
196 <attributes>
197 <attribute name="weight" value="bold"/>
198 </attributes>
199 </object>
200 <packing>
201 <property name="position">0</property>
202 </packing>
203 </child>
204 <child>
205 <object class="GtkBox" id="hbox3">
206 <property name="visible">True</property>
207 <property name="orientation">horizontal</property>
208 <child>
209 <object class="GtkBox" id="security_settings">
210 <property name="visible">True</property>
211 <property name="orientation">vertical</property>
212 <property name="spacing">6</property>
213 <child>
214 <object class="GtkCheckButton" id="prompt_enabled_toggle">
215 <property name="label" translatable="yes">_You must confirm each access to this machine</property>
216 <property name="visible">True</property>
217 <property name="can_focus">True</property>
218 <property name="receives_default">False</property>
219 <property name="use_underline">True</property>
220 <property name="draw_indicator">True</property>
221 </object>
222 <packing>
223 <property name="position">0</property>
224 </packing>
225 </child>
226 <child>
227 <object class="GtkBox" id="hbox4">
228 <property name="visible">True</property>
229 <property name="orientation">horizontal</property>
230 <property name="spacing">12</property>
231 <child>
232 <object class="GtkCheckButton" id="password_toggle">
233 <property name="label" translatable="yes">_Require the user to enter this password:</property>
234 <property name="visible">True</property>
235 <property name="can_focus">True</property>
236 <property name="receives_default">False</property>
237 <property name="use_underline">True</property>
238 <property name="draw_indicator">True</property>
239 </object>
240 <packing>
241 <property name="expand">False</property>
242 <property name="position">0</property>
243 </packing>
244 </child>
245 <child>
246 <object class="GtkBox" id="password_box">
247 <property name="visible">True</property>
248 <property name="orientation">horizontal</property>
249 <child>
250 <object class="GtkEntry" id="password_entry">
251 <property name="visible">True</property>
252 <property name="can_focus">True</property>
253 <property name="max_length">8</property>
254 <property name="visibility">False</property>
255 <property name="invisible_char">&#x25CF;</property>
256 </object>
257 <packing>
258 <property name="position">1</property>
259 </packing>
260 </child>
261 </object>
262 <packing>
263 <property name="position">1</property>
264 </packing>
265 </child>
266 </object>
267 <packing>
268 <property name="position">1</property>
269 </packing>
270 </child>
271 <child>
272 <object class="GtkCheckButton" id="use_upnp_toggle">
273 <property name="label" translatable="yes">Automatically _configure UPnP router to open and forward ports</property>
274 <property name="visible">True</property>
275 <property name="can_focus">True</property>
276 <property name="receives_default">False</property>
277 <property name="has_tooltip">True</property>
278 <property name="tooltip_text" translatable="yes">The router must have the UPnP feature enabled</property>
279 <property name="use_underline">True</property>
280 <property name="draw_indicator">True</property>
281 </object>
282 <packing>
283 <property name="position">2</property>
284 </packing>
285 </child>
286 </object>
287 <packing>
288 <property name="padding">12</property>
289 <property name="position">0</property>
290 </packing>
291 </child>
292 </object>
293 <packing>
294 <property name="position">1</property>
295 </packing>
296 </child>
297 </object>
298 <packing>
299 <property name="position">1</property>
300 </packing>
301 </child>
302 <child>
303 <object class="GtkBox" id="notification_box">
304 <property name="visible">True</property>
305 <property name="orientation">vertical</property>
306 <property name="spacing">6</property>
307 <child>
308 <object class="GtkLabel" id="label12">
309 <property name="visible">True</property>
310 <property name="xalign">0</property>
311 <property name="label" translatable="yes">Show Notification Area Icon</property>
312 <attributes>
313 <attribute name="weight" value="bold"/>
314 </attributes>
315 </object>
316 <packing>
317 <property name="position">0</property>
318 </packing>
319 </child>
320 <child>
321 <object class="GtkBox" id="hbox8">
322 <property name="visible">True</property>
323 <property name="orientation">horizontal</property>
324 <child>
325 <object class="GtkBox" id="notification_settings">
326 <property name="visible">True</property>
327 <property name="orientation">vertical</property>
328 <property name="spacing">3</property>
329 <child>
330 <object class="VinoRadioButton" id="icon_always_radio">
331 <property name='name'>always</property>
332 <property name="label" translatable="yes">Al_ways</property>
333 <property name="visible">True</property>
334 <property name="can_focus">True</property>
335 <property name="receives_default">False</property>
336 <property name="use_underline">True</property>
337 <property name="active">True</property>
338 <property name="draw_indicator">True</property>
339 </object>
340 <packing>
341 <property name="position">0</property>
342 </packing>
343 </child>
344 <child>
345 <object class="VinoRadioButton" id="icon_client_radio">
346 <property name='name'>client</property>
347 <property name="label" translatable="yes">_Only when someone is connected</property>
348 <property name="visible">True</property>
349 <property name="can_focus">True</property>
350 <property name="receives_default">False</property>
351 <property name="use_underline">True</property>
352 <property name="active">True</property>
353 <property name="draw_indicator">True</property>
354 <property name="group">icon_always_radio</property>
355 </object>
356 <packing>
357 <property name="position">1</property>
358 </packing>
359 </child>
360 <child>
361 <object class="VinoRadioButton" id="icon_never_radio">
362 <property name='name'>never</property>
363 <property name="label" translatable="yes">_Never</property>
364 <property name="visible">True</property>
365 <property name="can_focus">True</property>
366 <property name="receives_default">False</property>
367 <property name="use_underline">True</property>
368 <property name="active">True</property>
369 <property name="draw_indicator">True</property>
370 <property name="group">icon_always_radio</property>
371 </object>
372 <packing>
373 <property name="position">2</property>
374 </packing>
375 </child>
376 </object>
377 <packing>
378 <property name="padding">12</property>
379 <property name="position">0</property>
380 </packing>
381 </child>
382 </object>
383 <packing>
384 <property name="position">1</property>
385 </packing>
386 </child>
387 </object>
388 <packing>
389 <property name="position">2</property>
390 </packing>
391 </child>
392 </object>
393 <packing>
394 <property name="position">1</property>
395 </packing>
396 </child>
397 </object>
398 </child>
399 </object>
400</interface>
4010
=== removed file 'panels/screen-sharing/unity-screen-sharing-panel.desktop.in.in'
--- panels/screen-sharing/unity-screen-sharing-panel.desktop.in.in 2017-12-07 05:41:33 +0000
+++ panels/screen-sharing/unity-screen-sharing-panel.desktop.in.in 1970-01-01 00:00:00 +0000
@@ -1,13 +0,0 @@
1[Desktop Entry]
2_Name=Desktop Sharing
3_Comment=Choose how other users can remotely view your desktop
4Exec=unity-control-center screen-sharing
5Icon=preferences-desktop-remote-desktop
6Terminal=false
7Type=Application
8StartupNotify=true
9Categories=GNOME;GTK;Settings;DesktopSettings;X-Unity-Settings-Panel;X-GNOME-PersonalSettings
10OnlyShowIn=Unity;
11X-Unity-Settings-Panel=screen-sharing
12# Translators: those are keywords for the screen sharing control-center panel
13_Keywords=Screen;Sharing;Remote;Desktop;VNC
140
=== removed file 'panels/screen-sharing/vino-message-box.c'
--- panels/screen-sharing/vino-message-box.c 2017-12-07 05:41:33 +0000
+++ panels/screen-sharing/vino-message-box.c 1970-01-01 00:00:00 +0000
@@ -1,156 +0,0 @@
1/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 4; tab-width: 4 -*- */
2/*
3 * vino-message-box.c
4 * Copyright (C) Jonh Wendell 2009 <wendell@bani.com.br>
5 *
6 * vino-message-box.c is free software: you can redistribute it and/or modify it
7 * under the terms of the GNU General Public License as published by the
8 * Free Software Foundation, either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 * vino-message-box.c is distributed in the hope that it will be useful, but
12 * WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
14 * See the GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License along
17 * with this program. If not, see <http://www.gnu.org/licenses/>.
18 */
19
20#include <config.h>
21#include <glib/gi18n.h>
22#include "vino-message-box.h"
23
24struct _VinoMessageBoxPrivate
25{
26 GtkWidget *main_hbox;
27 GtkWidget *label;
28 GtkWidget *image;
29};
30
31G_DEFINE_TYPE (VinoMessageBox, vino_message_box, GTK_TYPE_INFO_BAR);
32
33static void
34url_activated_cb(GtkWidget *url_label, const gchar *url)
35{
36 GError *error;
37 GdkScreen *screen;
38 gchar *mailto;
39
40 error = NULL;
41 screen = gtk_widget_get_screen (url_label);
42 mailto = g_strdup_printf ("mailto:?Body=%s", url);
43
44 if (!gtk_show_uri (screen, mailto, GDK_CURRENT_TIME, &error))
45 {
46 GtkWidget *message_dialog, *parent;
47
48 parent = gtk_widget_get_toplevel (GTK_WIDGET (url_label));
49 if (!GTK_IS_WINDOW (parent))
50 parent = NULL;
51 message_dialog = gtk_message_dialog_new (GTK_WINDOW (parent),
52 GTK_DIALOG_MODAL | GTK_DIALOG_DESTROY_WITH_PARENT,
53 GTK_MESSAGE_ERROR,
54 GTK_BUTTONS_CLOSE,
55 _("There was an error showing the URL \"%s\""),
56 url);
57 gtk_message_dialog_format_secondary_text (GTK_MESSAGE_DIALOG (message_dialog),
58 "%s",
59 error->message);
60
61 gtk_window_set_resizable (GTK_WINDOW (message_dialog), FALSE);
62
63 g_signal_connect (message_dialog, "response",
64 G_CALLBACK (gtk_widget_destroy),
65 NULL);
66
67 gtk_widget_show (message_dialog);
68 g_error_free (error);
69 }
70
71 g_free (mailto);
72}
73
74static void
75vino_message_box_init (VinoMessageBox *box)
76{
77 box->priv = G_TYPE_INSTANCE_GET_PRIVATE (box, VINO_TYPE_MESSAGE_BOX, VinoMessageBoxPrivate);
78
79 box->priv->main_hbox = gtk_info_bar_get_content_area (GTK_INFO_BAR (box));
80 box->priv->image = NULL;
81
82 box->priv->label = gtk_label_new (NULL);
83 gtk_misc_set_alignment (GTK_MISC (box->priv->label), 0.0, 0.0);
84 gtk_label_set_line_wrap (GTK_LABEL (box->priv->label), TRUE);
85 gtk_label_set_selectable (GTK_LABEL (box->priv->label), TRUE);
86 g_signal_connect (box->priv->label,
87 "activate-link",
88 G_CALLBACK (url_activated_cb),
89 NULL);
90
91 gtk_widget_show (box->priv->label);
92 gtk_info_bar_set_message_type (GTK_INFO_BAR (box), GTK_MESSAGE_INFO);
93 gtk_container_add (GTK_CONTAINER (box->priv->main_hbox), box->priv->label);
94}
95
96static void
97vino_message_box_finalize (GObject *object)
98{
99 /* TODO: Add deinitalization code here */
100
101 G_OBJECT_CLASS (vino_message_box_parent_class)->finalize (object);
102}
103
104static void
105vino_message_box_class_init (VinoMessageBoxClass *klass)
106{
107 GObjectClass* object_class = G_OBJECT_CLASS (klass);
108
109 object_class->finalize = vino_message_box_finalize;
110 g_type_class_add_private (object_class, sizeof(VinoMessageBoxPrivate));
111}
112
113GtkWidget *
114vino_message_box_new (void)
115{
116 return GTK_WIDGET (g_object_new (VINO_TYPE_MESSAGE_BOX, NULL));
117}
118
119void
120vino_message_box_set_label (VinoMessageBox *box, const gchar *label)
121{
122 g_return_if_fail (VINO_IS_MESSAGE_BOX (box));
123
124 gtk_label_set_markup (GTK_LABEL (box->priv->label), label);
125}
126
127void
128vino_message_box_show_image (VinoMessageBox *box)
129{
130 g_return_if_fail (VINO_IS_MESSAGE_BOX (box));
131
132 if (box->priv->image)
133 {
134 gtk_widget_destroy (box->priv->image);
135 box->priv->image = NULL;
136 }
137
138
139 box->priv->image = gtk_spinner_new ();
140 gtk_spinner_start (GTK_SPINNER (box->priv->image));
141
142 gtk_box_pack_start (GTK_BOX (box->priv->main_hbox), box->priv->image, FALSE, FALSE, 2);
143 gtk_box_reorder_child (GTK_BOX (box->priv->main_hbox), box->priv->image, 0);
144 gtk_widget_show (box->priv->image);
145}
146
147void
148vino_message_box_hide_image (VinoMessageBox *box)
149{
150 g_return_if_fail (VINO_IS_MESSAGE_BOX (box));
151
152 if (box->priv->image)
153 gtk_widget_destroy (box->priv->image);
154 box->priv->image = NULL;
155}
156
1570
=== removed file 'panels/screen-sharing/vino-message-box.h'
--- panels/screen-sharing/vino-message-box.h 2017-12-07 05:41:33 +0000
+++ panels/screen-sharing/vino-message-box.h 1970-01-01 00:00:00 +0000
@@ -1,59 +0,0 @@
1/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 4; tab-width: 4 -*- */
2/*
3 * vino-message-box.c
4 * Copyright (C) Jonh Wendell 2009 <wendell@bani.com.br>
5 *
6 * vino-message-box.c is free software: you can redistribute it and/or modify it
7 * under the terms of the GNU General Public License as published by the
8 * Free Software Foundation, either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 * vino-message-box.c is distributed in the hope that it will be useful, but
12 * WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
14 * See the GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License along
17 * with this program. If not, see <http://www.gnu.org/licenses/>.
18 */
19
20#ifndef _VINO_MESSAGE_BOX_H_
21#define _VINO_MESSAGE_BOX_H_
22
23#include <gtk/gtk.h>
24
25G_BEGIN_DECLS
26
27#define VINO_TYPE_MESSAGE_BOX (vino_message_box_get_type ())
28#define VINO_MESSAGE_BOX(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), VINO_TYPE_MESSAGE_BOX, VinoMessageBox))
29#define VINO_MESSAGE_BOX_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), VINO_TYPE_MESSAGE_BOX, VinoMessageBoxClass))
30#define VINO_IS_MESSAGE_BOX(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), VINO_TYPE_MESSAGE_BOX))
31#define VINO_IS_MESSAGE_BOX_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), VINO_TYPE_MESSAGE_BOX))
32#define VINO_MESSAGE_BOX_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), VINO_TYPE_MESSAGE_BOX, VinoMessageBoxClass))
33
34typedef struct _VinoMessageBoxClass VinoMessageBoxClass;
35typedef struct _VinoMessageBox VinoMessageBox;
36typedef struct _VinoMessageBoxPrivate VinoMessageBoxPrivate;
37
38struct _VinoMessageBoxClass
39{
40 GtkInfoBarClass parent_class;
41};
42
43struct _VinoMessageBox
44{
45 GtkInfoBar parent_instance;
46 VinoMessageBoxPrivate *priv;
47};
48
49GType vino_message_box_get_type (void);
50
51GtkWidget *vino_message_box_new (void);
52
53void vino_message_box_set_label (VinoMessageBox *box, const gchar *label);
54void vino_message_box_show_image (VinoMessageBox *box);
55void vino_message_box_hide_image (VinoMessageBox *box);
56
57G_END_DECLS
58
59#endif /* _VINO_MESSAGE_BOX_H_ */
600
=== removed file 'panels/screen-sharing/vino-radio-button.c'
--- panels/screen-sharing/vino-radio-button.c 2017-12-07 05:41:33 +0000
+++ panels/screen-sharing/vino-radio-button.c 1970-01-01 00:00:00 +0000
@@ -1,181 +0,0 @@
1/*
2 * Copyright © 2010 Codethink Limited
3 *
4 * This program is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU General Public License as
6 * published by the Free Software Foundation; either version 2 of the
7 * License, or (at your option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful, but
10 * WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
17 * 02111-1307, USA.
18 *
19 * Author: Ryan Lortie <desrt@desrt.ca>
20 */
21
22#include "vino-radio-button.h"
23
24#include <gtk/gtk.h>
25
26typedef struct
27{
28 GtkRadioButton parent_instance;
29 gchar *name;
30} VinoRadioButton;
31
32typedef GtkRadioButtonClass VinoRadioButtonClass;
33
34G_DEFINE_TYPE (VinoRadioButton, vino_radio_button, GTK_TYPE_RADIO_BUTTON)
35
36enum
37{
38 PROP_0,
39 PROP_SETTINGS_NAME,
40 PROP_SETTINGS_ACTIVE
41};
42
43static void
44vino_radio_button_get_property (GObject *object, guint prop_id,
45 GValue *value, GParamSpec *pspec)
46{
47 VinoRadioButton *vrb = (VinoRadioButton *) object;
48
49 switch (prop_id)
50 {
51 case PROP_SETTINGS_ACTIVE:
52 {
53 const GSList *list;
54
55 list = gtk_radio_button_get_group (&vrb->parent_instance);
56 while (list)
57 {
58 VinoRadioButton *this = list->data;
59
60 if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (this)))
61 {
62 g_value_set_string (value, this->name);
63 return;
64 }
65
66 list = list->next;
67 }
68 }
69
70 g_warning ("No active radio buttons");
71 g_value_set_string (value, "");
72 return;
73
74 default:
75 g_assert_not_reached ();
76 }
77}
78
79static void
80vino_radio_button_set_property (GObject *object, guint prop_id,
81 const GValue *value, GParamSpec *pspec)
82{
83 VinoRadioButton *vrb = (VinoRadioButton *) object;
84
85 switch (prop_id)
86 {
87 case PROP_SETTINGS_NAME:
88 g_assert (vrb->name == NULL);
89 vrb->name = g_value_dup_string (value);
90 return;
91
92 case PROP_SETTINGS_ACTIVE:
93 {
94 const GSList *list;
95 const gchar *name;
96
97 list = gtk_radio_button_get_group (&vrb->parent_instance);
98 name = g_value_get_string (value);
99
100 while (list)
101 {
102 VinoRadioButton *this = list->data;
103
104 if (g_strcmp0 (this->name, name))
105 {
106 gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (this),
107 TRUE);
108 return;
109 }
110
111 list = list->next;
112 }
113
114 g_warning ("No such radio button named `%s'", name);
115 }
116 return;
117
118 default:
119 g_assert_not_reached ();
120 }
121}
122
123static void
124vino_radio_button_toggled (GtkToggleButton *button)
125{
126 VinoRadioButton *vrb = (VinoRadioButton *) button;
127
128 /* As it is, we get the notification of the old button becoming inactivity
129 * followed by the notification of the new button becoming active. Only run
130 * when the new button becomes active in order to avoid unnecessary
131 * notifications.
132 */
133 if (gtk_toggle_button_get_active (button))
134 {
135 const GSList *list;
136
137 list = gtk_radio_button_get_group (&vrb->parent_instance);
138 while (list)
139 {
140 g_object_notify (list->data, "settings-active");
141 list = list->next;
142 }
143 }
144}
145
146static void
147vino_radio_button_finalize (GObject *object)
148{
149 VinoRadioButton *vrb = (VinoRadioButton *) object;
150
151 g_free (vrb->name);
152
153 G_OBJECT_CLASS (vino_radio_button_parent_class)
154 ->finalize (object);
155}
156
157static void
158vino_radio_button_init (VinoRadioButton *button)
159{
160}
161
162static void
163vino_radio_button_class_init (GtkRadioButtonClass *class)
164{
165 GtkToggleButtonClass *tb_class = GTK_TOGGLE_BUTTON_CLASS (class);
166 GObjectClass *object_class = G_OBJECT_CLASS (class);
167
168 tb_class->toggled = vino_radio_button_toggled;
169 object_class->get_property = vino_radio_button_get_property;
170 object_class->set_property = vino_radio_button_set_property;
171 object_class->finalize = vino_radio_button_finalize;
172
173 g_object_class_install_property (object_class, PROP_SETTINGS_NAME,
174 g_param_spec_string ("settings-name", "name", "name", NULL,
175 G_PARAM_CONSTRUCT_ONLY | G_PARAM_WRITABLE |
176 G_PARAM_STATIC_STRINGS));
177
178 g_object_class_install_property (object_class, PROP_SETTINGS_ACTIVE,
179 g_param_spec_string ("settings-active", "active", "active", NULL,
180 G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
181}
1820
=== removed file 'panels/screen-sharing/vino-radio-button.h'
--- panels/screen-sharing/vino-radio-button.h 2017-12-07 05:41:33 +0000
+++ panels/screen-sharing/vino-radio-button.h 1970-01-01 00:00:00 +0000
@@ -1,29 +0,0 @@
1/*
2 * Copyright © 2010 Codethink Limited
3 *
4 * This program is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU General Public License as
6 * published by the Free Software Foundation; either version 2 of the
7 * License, or (at your option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful, but
10 * WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
17 * 02111-1307, USA.
18 *
19 * Author: Ryan Lortie <desrt@desrt.ca>
20 */
21
22#ifndef __vino_radio_button_h__
23#define __vino_radio_button_h__
24
25#include <glib-object.h>
26
27GType vino_radio_button_get_type (void);
28
29#endif /* __vino_radio_button_h__ */
300
=== added directory 'panels/sharing'
=== added file 'panels/sharing/Makefile.am'
--- panels/sharing/Makefile.am 1970-01-01 00:00:00 +0000
+++ panels/sharing/Makefile.am 2018-11-21 12:36:03 +0000
@@ -0,0 +1,88 @@
1# This is used in PANEL_CFLAGS
2cappletname = sharing
3
4uidir = $(pkgdatadir)/ui/sharing
5dist_ui_DATA = sharing.ui networks.ui
6dbus_built_sources = org.gnome.SettingsDaemon.Sharing.c org.gnome.SettingsDaemon.Sharing.h
7
8AM_CPPFLAGS = \
9 $(PANEL_CFLAGS) \
10 $(SHARING_PANEL_CFLAGS) \
11 -DSYSCONFDIR=\"$(sysconfdir)\" \
12 -DGNOMECC_UI_DIR="\"$(uidir)\"" \
13 -DGNOMELOCALEDIR="\"$(datadir)/locale\"" \
14 -DGNOMECC_DATA_DIR="\"$(pkgdatadir)\"" \
15 -DDATADIR="\"$(datadir)\"" \
16 -DLIBEXECDIR="\"$(libexecdir)\"" \
17 $(NULL)
18
19ccpanelsdir = $(PANELS_DIR)
20ccpanels_LTLIBRARIES = libsharing.la
21
22BUILT_SOURCES = \
23 cc-sharing-resources.c \
24 cc-sharing-resources.h \
25 $(dbus_built_sources) \
26 $(NULL)
27
28libsharing_la_SOURCES = \
29 $(BUILT_SOURCES) \
30 cc-sharing-panel.c \
31 cc-sharing-panel.h \
32 cc-remote-login.c \
33 cc-remote-login.h \
34 cc-media-sharing.c \
35 cc-media-sharing.h \
36 vino-preferences.c \
37 vino-preferences.h \
38 file-share-properties.c \
39 file-share-properties.h \
40 cc-sharing-networks.c \
41 cc-sharing-networks.h \
42 cc-sharing-switch.c \
43 cc-sharing-switch.h \
44 gsd-sharing-enums.h \
45 sharing-module.c \
46 $(NULL)
47
48
49resource_files = $(shell glib-compile-resources --generate-dependencies $(srcdir)/sharing.gresource.xml)
50cc-sharing-resources.c: sharing.gresource.xml $(resource_files)
51 $(AM_V_GEN) glib-compile-resources --target=$@ --sourcedir=$(srcdir) --generate-source --c-name cc_sharing $<
52cc-sharing-resources.h: sharing.gresource.xml $(resource_files)
53 $(AM_V_GEN) glib-compile-resources --target=$@ --sourcedir=$(srcdir) --generate-header --c-name cc_sharing $<
54
55$(dbus_built_sources) : Makefile.am org.gnome.SettingsDaemon.Sharing.xml
56 $(AM_V_GEN) gdbus-codegen \
57 --interface-prefix org.gnome.SettingsDaemon. \
58 --c-namespace Gsd \
59 --generate-c-code org.gnome.SettingsDaemon.Sharing \
60 $(srcdir)/org.gnome.SettingsDaemon.Sharing.xml
61
62libsharing_la_LIBADD = $(PANEL_LIBS) $(SHARING_PANEL_LIBS)
63libsharing_la_LDFLAGS = $(PANEL_LDFLAGS)
64
65libexec_PROGRAMS = cc-remote-login-helper
66
67cc_remote_login_helper_SOURCES = cc-remote-login-helper.c
68cc_remote_login_helper_LDADD = $(REMOTE_LOGIN_HELPER_LIBS)
69cc_remote_login_helper_CFLAGS = $(REMOTE_LOGIN_HELPER_CFLAGS)
70
71com.canonical.controlcenter.remote-login-helper.policy.in: com.canonical.controlcenter.remote-login-helper.policy.in.in Makefile
72 $(AM_V_GEN) sed -e "s|\@libexecdir\@|$(libexecdir)|" $< > $@
73
74@INTLTOOL_POLICY_RULE@
75polkit_policydir = $(datadir)/polkit-1/actions
76polkit_policy_in_files = com.canonical.controlcenter.remote-login-helper.policy.in
77polkit_policy_DATA = $(polkit_policy_in_files:.policy.in=.policy)
78
79
80@INTLTOOL_DESKTOP_RULE@
81desktopdir = $(datadir)/applications
82desktop_in_files = unity-sharing-panel.desktop.in
83desktop_DATA = $(desktop_in_files:.desktop.in=.desktop)
84
85CLEANFILES = $(desktop_in_files) $(desktop_DATA) $(polkit_policy_DATA) $(polkit_policy_in_files) $(BUILT_SOURCES)
86EXTRA_DIST = $(resource_files) sharing.gresource.xml com.canonical.controlcenter.remote-login-helper.policy.in.in org.gnome.SettingsDaemon.Sharing.xml
87
88-include $(top_srcdir)/git.mk
089
=== added file 'panels/sharing/cc-media-sharing.c'
--- panels/sharing/cc-media-sharing.c 1970-01-01 00:00:00 +0000
+++ panels/sharing/cc-media-sharing.c 2018-11-21 12:36:03 +0000
@@ -0,0 +1,153 @@
1/*
2 * Copyright (C) 2013 Intel, Inc
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
17 *
18 * Author: Thomas Wood <thomas.wood@intel.com>
19 *
20 */
21
22#include "cc-media-sharing.h"
23
24#include <gio/gio.h>
25#include <gio/gdesktopappinfo.h>
26#include <glib/gstdio.h>
27
28static GKeyFile*
29cc_media_sharing_open_key_file (void)
30{
31 gchar *path;
32 GKeyFile *file;
33
34 file = g_key_file_new ();
35
36 path = g_build_filename (g_get_user_config_dir (), "rygel.conf", NULL);
37
38 if (!g_key_file_load_from_file (file, path,
39 G_KEY_FILE_KEEP_COMMENTS | G_KEY_FILE_KEEP_TRANSLATIONS,
40 NULL))
41 {
42 g_free (path);
43 path = g_build_filename (SYSCONFDIR, "rygel.conf", NULL);
44 g_key_file_load_from_file (file, path,
45 G_KEY_FILE_KEEP_COMMENTS | G_KEY_FILE_KEEP_TRANSLATIONS,
46 NULL);
47 }
48
49 g_free (path);
50
51 return file;
52}
53
54void
55cc_media_sharing_get_preferences (gchar ***folders)
56{
57 GKeyFile *file;
58
59 file = cc_media_sharing_open_key_file ();
60
61 if (folders)
62 {
63 gsize length;
64 GPtrArray *array;
65 char **str_list, **orig_list;
66
67 str_list = g_key_file_get_string_list (file, "MediaExport", "uris",
68 &length, NULL);
69 orig_list = str_list;
70 array = g_ptr_array_new ();
71
72 while (str_list && *str_list)
73 {
74 const char *dir;
75
76 if (g_str_equal (*str_list, "@MUSIC@"))
77 dir = g_get_user_special_dir (G_USER_DIRECTORY_MUSIC);
78 else if (g_str_equal (*str_list, "@VIDEOS@"))
79 dir = g_get_user_special_dir (G_USER_DIRECTORY_VIDEOS);
80 else if (g_str_equal (*str_list, "@PICTURES@"))
81 dir = g_get_user_special_dir (G_USER_DIRECTORY_PICTURES);
82 else
83 dir = g_strdup (*str_list);
84
85 if (dir != NULL)
86 g_ptr_array_add (array, g_strdup (dir));
87
88 str_list++;
89 }
90
91 g_ptr_array_add (array, NULL);
92
93 *folders = (char **) g_ptr_array_free (array, FALSE);
94 g_strfreev (orig_list);
95 }
96
97 g_key_file_free (file);
98}
99
100void
101cc_media_sharing_set_preferences (gchar **folders)
102{
103 GKeyFile *file;
104 gchar **str_list;
105 gchar *path;
106 gsize length;
107 gchar *data;
108
109 file = cc_media_sharing_open_key_file ();
110
111 g_key_file_set_boolean (file, "general", "upnp-enabled", TRUE);
112 g_key_file_set_boolean (file, "Tracker", "enabled", FALSE);
113 g_key_file_set_boolean (file, "MediaExport", "enabled", TRUE);
114
115 str_list = folders;
116 length = 0;
117
118 while (str_list && *str_list)
119 {
120 if (g_strcmp0 (*str_list, g_get_user_special_dir (G_USER_DIRECTORY_MUSIC)) == 0)
121 {
122 g_free (*str_list);
123 *str_list = g_strdup ("@MUSIC@");
124 }
125
126 if (g_strcmp0 (*str_list, g_get_user_special_dir (G_USER_DIRECTORY_VIDEOS)) == 0)
127 {
128 g_free (*str_list);
129 *str_list = g_strdup ("@VIDEOS@");
130 }
131
132 if (g_strcmp0 (*str_list, g_get_user_special_dir (G_USER_DIRECTORY_PICTURES)) == 0)
133 {
134 g_free (*str_list);
135 *str_list = g_strdup ("@PICTURES@");
136 }
137
138 str_list++;
139 length++;
140 }
141
142 g_key_file_set_string_list (file, "MediaExport", "uris", (const gchar**) folders, length);
143
144 data = g_key_file_to_data (file, NULL, NULL);
145
146 path = g_build_filename (g_get_user_config_dir (), "rygel.conf", NULL);
147
148 g_file_set_contents (path, data, -1, NULL);
149
150 g_free (path);
151
152 g_key_file_free (file);
153}
0154
=== added file 'panels/sharing/cc-media-sharing.h'
--- panels/sharing/cc-media-sharing.h 1970-01-01 00:00:00 +0000
+++ panels/sharing/cc-media-sharing.h 2018-11-21 12:36:03 +0000
@@ -0,0 +1,30 @@
1/*
2 * Copyright (C) 2013 Intel, Inc
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
17 *
18 * Author: Thomas Wood <thomas.wood@intel.com>
19 *
20 */
21
22#ifndef __CC_MEDIA_SHARING_H__
23#define __CC_MEDIA_SHARING_H__
24
25#include <glib.h>
26
27void cc_media_sharing_get_preferences (gchar ***folders);
28void cc_media_sharing_set_preferences (gchar **folders);
29
30#endif /* __CC_MEDIA_SHARING_H__ */
031
=== added file 'panels/sharing/cc-remote-login-helper.c'
--- panels/sharing/cc-remote-login-helper.c 1970-01-01 00:00:00 +0000
+++ panels/sharing/cc-remote-login-helper.c 2018-11-21 12:36:03 +0000
@@ -0,0 +1,170 @@
1/*
2 * Copyright (C) 2013 Intel, Inc
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
17 *
18 * Author: Thomas Wood <thomas.wood@intel.com>
19 *
20 */
21
22#include <gio/gio.h>
23
24#ifndef SSHD_SERVICE
25#define SSHD_SERVICE "sshd.service"
26#endif
27
28static const gchar *service_list[] = { SSHD_SERVICE, NULL };
29
30static gint
31enable_ssh_service ()
32{
33 GDBusConnection *connection;
34 GError *error = NULL;
35 GVariant *temp_variant;
36
37 connection = g_bus_get_sync (G_BUS_TYPE_SYSTEM, NULL, &error);
38 if (!connection)
39 {
40 g_critical ("Error connecting to D-Bus system bus: %s", error->message);
41 g_clear_error (&error);
42 return 1;
43 }
44
45 temp_variant = g_dbus_connection_call_sync (connection,
46 "org.freedesktop.systemd1",
47 "/org/freedesktop/systemd1",
48 "org.freedesktop.systemd1.Manager",
49 "StartUnit",
50 g_variant_new ("(ss)",
51 SSHD_SERVICE,
52 "replace"),
53 (GVariantType *) "(o)",
54 G_DBUS_CALL_FLAGS_NONE,
55 -1,
56 NULL,
57 &error);
58
59 if (!temp_variant)
60 {
61 g_critical ("Error starting " SSHD_SERVICE ": %s", error->message);
62 g_clear_error (&error);
63 return 1;
64 }
65
66 g_variant_unref (temp_variant);
67
68 temp_variant = g_dbus_connection_call_sync (connection,
69 "org.freedesktop.systemd1",
70 "/org/freedesktop/systemd1",
71 "org.freedesktop.systemd1.Manager",
72 "EnableUnitFiles",
73 g_variant_new ("(^asbb)",
74 service_list,
75 FALSE, FALSE),
76 (GVariantType *) "(ba(sss))",
77 G_DBUS_CALL_FLAGS_NONE,
78 -1,
79 NULL,
80 &error);
81
82 if (!temp_variant)
83 {
84 g_critical ("Error enabling " SSHD_SERVICE ": %s", error->message);
85 g_clear_error (&error);
86 return 1;
87 }
88
89 g_variant_unref (temp_variant);
90
91 return 0;
92}
93
94static gint
95disable_ssh_service ()
96{
97 GDBusConnection *connection;
98 GError *error = NULL;
99 GVariant *temp_variant;
100
101 connection = g_bus_get_sync (G_BUS_TYPE_SYSTEM, NULL, &error);
102 if (!connection)
103 {
104 g_critical ("Error connecting to D-Bus system bus: %s", error->message);
105 g_clear_error (&error);
106 return 1;
107 }
108
109 temp_variant = g_dbus_connection_call_sync (connection,
110 "org.freedesktop.systemd1",
111 "/org/freedesktop/systemd1",
112 "org.freedesktop.systemd1.Manager",
113 "StopUnit",
114 g_variant_new ("(ss)", SSHD_SERVICE, "replace"),
115 (GVariantType *) "(o)",
116 G_DBUS_CALL_FLAGS_NONE,
117 -1,
118 NULL,
119 &error);
120 if (!temp_variant)
121 {
122 g_critical ("Error stopping " SSHD_SERVICE ": %s", error->message);
123 g_clear_error (&error);
124 return 1;
125 }
126
127 g_variant_unref (temp_variant);
128
129 temp_variant = g_dbus_connection_call_sync (connection,
130 "org.freedesktop.systemd1",
131 "/org/freedesktop/systemd1",
132 "org.freedesktop.systemd1.Manager",
133 "DisableUnitFiles",
134 g_variant_new ("(^asb)", service_list, FALSE,
135 FALSE),
136 (GVariantType *) "(a(sss))",
137 G_DBUS_CALL_FLAGS_NONE,
138 -1,
139 NULL,
140 &error);
141
142 if (!temp_variant)
143 {
144 g_critical ("Error disabling " SSHD_SERVICE ": %s", error->message);
145 g_clear_error (&error);
146 return 1;
147 }
148
149 g_variant_unref (temp_variant);
150
151 return 0;
152}
153
154int
155main (int argc,
156 char **argv)
157{
158 if (argc < 2)
159 return 1;
160
161 if (argv[1] == NULL)
162 return 1;
163
164 if (g_str_equal (argv[1], "enable"))
165 return enable_ssh_service ();
166 else if (g_str_equal (argv[1], "disable"))
167 return disable_ssh_service ();
168
169 return 1;
170}
0171
=== added file 'panels/sharing/cc-remote-login.c'
--- panels/sharing/cc-remote-login.c 1970-01-01 00:00:00 +0000
+++ panels/sharing/cc-remote-login.c 2018-11-21 12:36:03 +0000
@@ -0,0 +1,338 @@
1/*
2 * Copyright (C) 2013 Intel, Inc
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
17 *
18 * Author: Thomas Wood <thomas.wood@intel.com>
19 *
20 */
21#include "cc-remote-login.h"
22#include <gio/gio.h>
23
24#ifndef SSHD_SERVICE
25#define SSHD_SERVICE "sshd.service"
26#endif
27
28typedef struct
29{
30 GtkSwitch *gtkswitch;
31 GtkWidget *button;
32 GCancellable *cancellable;
33} CallbackData;
34
35static void
36set_switch_state (GtkSwitch *gtkswitch,
37 gboolean active)
38{
39 if (gtk_switch_get_active (gtkswitch) != active)
40 {
41 g_object_set_data (G_OBJECT (gtkswitch), "set-from-dbus",
42 GINT_TO_POINTER (1));
43 gtk_switch_set_active (gtkswitch, active);
44 }
45 gtk_widget_set_sensitive (GTK_WIDGET (gtkswitch), TRUE);
46}
47
48static void
49active_state_ready_callback (GObject *source_object,
50 GAsyncResult *result,
51 CallbackData *callback_data)
52{
53 GVariant *active_variant, *child_variant, *tmp_variant;
54 const gchar *active_state;
55 gboolean active;
56 GError *error = NULL;
57
58 active_variant = g_dbus_connection_call_finish (G_DBUS_CONNECTION (source_object),
59 result, &error);
60
61 if (!active_variant)
62 {
63 /* print a warning if there was an error but the operation was not
64 * cancelled */
65 if (!g_error_matches(error, G_IO_ERROR, G_IO_ERROR_CANCELLED))
66 g_warning ("Error getting remote login state: %s", error->message);
67
68 g_clear_error (&error);
69 g_free (callback_data);
70
71 /* the switch will be remain insensitive, since the current state could
72 * not be determined */
73 return;
74 }
75
76 child_variant = g_variant_get_child_value (active_variant, 0);
77 tmp_variant = g_variant_get_variant (child_variant);
78 active_state = g_variant_get_string (tmp_variant, NULL);
79
80 active = g_str_equal (active_state, "active");
81
82 g_variant_unref (tmp_variant);
83 g_variant_unref (child_variant);
84 g_variant_unref (active_variant);
85
86 /* set the switch to the correct state */
87 if (callback_data->gtkswitch)
88 set_switch_state (callback_data->gtkswitch, active);
89
90 g_free (callback_data);
91}
92
93static void
94path_ready_callback (GObject *source_object,
95 GAsyncResult *result,
96 CallbackData *callback_data)
97{
98 GVariant *path_variant, *child_variant;
99 const gchar *object_path;
100 GError *error = NULL;
101
102 path_variant = g_dbus_connection_call_finish (G_DBUS_CONNECTION (source_object),
103 result, &error);
104
105 if (!path_variant)
106 {
107 if (g_error_matches (error, G_IO_ERROR, G_IO_ERROR_CANCELLED))
108 {
109 g_free (callback_data);
110 g_clear_error (&error);
111
112 return;
113 }
114
115 /* this may fail if systemd or remote login service is not available */
116 g_debug ("Error getting remote login state: %s", error->message);
117
118 g_clear_error (&error);
119
120 /* hide the remote login button, since the service is not available */
121 if (callback_data->button)
122 gtk_widget_hide (callback_data->button);
123
124 g_free (callback_data);
125
126 return;
127 }
128
129 child_variant = g_variant_get_child_value (path_variant, 0);
130 object_path = g_variant_get_string (child_variant, NULL);
131
132 g_dbus_connection_call (G_DBUS_CONNECTION (source_object),
133 "org.freedesktop.systemd1",
134 object_path,
135 "org.freedesktop.DBus.Properties",
136 "Get",
137 g_variant_new ("(ss)",
138 "org.freedesktop.systemd1.Unit",
139 "ActiveState"),
140 (GVariantType*) "(v)",
141 G_DBUS_CALL_FLAGS_NONE,
142 -1,
143 callback_data->cancellable,
144 (GAsyncReadyCallback) active_state_ready_callback,
145 callback_data);
146
147 g_variant_unref (child_variant);
148 g_variant_unref (path_variant);
149}
150
151static void
152state_ready_callback (GObject *source_object,
153 GAsyncResult *result,
154 CallbackData *callback_data)
155{
156 GVariant *state_variant, *child_variant;
157 const gchar *state_string;
158 GError *error = NULL;
159
160 state_variant = g_dbus_connection_call_finish (G_DBUS_CONNECTION (source_object),
161 result, &error);
162 if (!state_variant)
163 {
164 if (g_error_matches (error, G_IO_ERROR, G_IO_ERROR_CANCELLED))
165 {
166 g_free (callback_data);
167 g_clear_error (&error);
168
169 return;
170 }
171
172 /* this may fail if systemd or remote login service is not available */
173 g_debug ("Error getting remote login state: %s", error->message);
174
175 g_clear_error (&error);
176
177 /* hide the remote login button, since the service is not available */
178 if (callback_data->button)
179 gtk_widget_hide (callback_data->button);
180
181 g_free (callback_data);
182
183 return;
184 }
185
186 child_variant = g_variant_get_child_value (state_variant, 0);
187 state_string = g_variant_get_string (child_variant, NULL);
188
189 if (g_str_equal (state_string, "enabled"))
190 {
191 /* service is enabled, so check whether it is running or not */
192 g_dbus_connection_call (G_DBUS_CONNECTION (source_object),
193 "org.freedesktop.systemd1",
194 "/org/freedesktop/systemd1",
195 "org.freedesktop.systemd1.Manager",
196 "GetUnit",
197 g_variant_new ("(s)", SSHD_SERVICE),
198 (GVariantType*) "(o)",
199 G_DBUS_CALL_FLAGS_NONE,
200 -1,
201 callback_data->cancellable,
202 (GAsyncReadyCallback) path_ready_callback,
203 callback_data);
204 }
205 else if (g_str_equal (state_string, "disabled"))
206 {
207 /* service is available, but is currently disabled */
208 set_switch_state (callback_data->gtkswitch, FALSE);
209
210 g_free (callback_data);
211 }
212 else
213 {
214 /* unknown state */
215 g_warning ("Unknown state %s for %s", state_string, SSHD_SERVICE);
216
217 g_free (callback_data);
218 }
219
220 g_variant_unref (child_variant);
221 g_variant_unref (state_variant);
222}
223
224static void
225bus_ready_callback (GObject *source_object,
226 GAsyncResult *result,
227 CallbackData *callback_data)
228{
229 GDBusConnection *connection;
230 GError *error = NULL;
231
232 connection = g_bus_get_finish (result, &error);
233
234 if (!connection)
235 {
236 if (!g_error_matches (error, G_IO_ERROR, G_IO_ERROR_CANCELLED))
237 g_warning ("Error getting remote login state: %s", error->message);
238 g_clear_error (&error);
239 g_free (callback_data);
240
241 return;
242 }
243
244 g_dbus_connection_call (connection,
245 "org.freedesktop.systemd1",
246 "/org/freedesktop/systemd1",
247 "org.freedesktop.systemd1.Manager",
248 "GetUnitFileState",
249 g_variant_new ("(s)", SSHD_SERVICE),
250 (GVariantType*) "(s)",
251 G_DBUS_CALL_FLAGS_NONE,
252 -1,
253 callback_data->cancellable,
254 (GAsyncReadyCallback) state_ready_callback,
255 callback_data);
256}
257
258void
259cc_remote_login_get_enabled (GCancellable *cancellable,
260 GtkSwitch *gtkswitch,
261 GtkWidget *button)
262{
263 CallbackData *callback_data;
264
265 /* disable the switch until the current state is known */
266 gtk_widget_set_sensitive (GTK_WIDGET (gtkswitch), FALSE);
267
268 callback_data = g_new (CallbackData, 1);
269 callback_data->gtkswitch = gtkswitch;
270 callback_data->button = button;
271 callback_data->cancellable = cancellable;
272
273 g_bus_get (G_BUS_TYPE_SYSTEM, callback_data->cancellable,
274 (GAsyncReadyCallback) bus_ready_callback, callback_data);
275}
276
277static gint std_err;
278
279static void
280child_watch_func (GPid pid,
281 gint status,
282 gpointer user_data)
283{
284 CallbackData *callback_data = user_data;
285 if (status != 0)
286 {
287 g_warning ("Error enabling or disabling remote login service");
288
289 /* make sure the switch reflects the current status */
290 cc_remote_login_get_enabled (callback_data->cancellable, callback_data->gtkswitch, NULL);
291 }
292 g_spawn_close_pid (pid);
293
294 gtk_widget_set_sensitive (GTK_WIDGET (callback_data->gtkswitch), TRUE);
295
296 g_free (user_data);
297}
298
299void
300cc_remote_login_set_enabled (GCancellable *cancellable,
301 GtkSwitch *gtkswitch)
302{
303 gchar *command[] = { "pkexec", LIBEXECDIR "/cc-remote-login-helper", NULL,
304 NULL };
305 GError *error = NULL;
306 GPid pid;
307 CallbackData *callback_data;
308
309
310 if (GPOINTER_TO_INT (g_object_get_data (G_OBJECT (gtkswitch), "set-from-dbus")) == 1)
311 {
312 g_object_set_data (G_OBJECT (gtkswitch), "set-from-dbus", NULL);
313 return;
314 }
315
316 if (gtk_switch_get_active (gtkswitch))
317 command[2] = "enable";
318 else
319 command[2] = "disable";
320
321 gtk_widget_set_sensitive (GTK_WIDGET (gtkswitch), FALSE);
322
323 g_spawn_async_with_pipes (NULL, command, NULL,
324 G_SPAWN_SEARCH_PATH | G_SPAWN_DO_NOT_REAP_CHILD, NULL,
325 NULL, &pid, NULL, NULL, &std_err, &error);
326
327 callback_data = g_new0 (CallbackData, 1);
328 callback_data->gtkswitch = gtkswitch;
329 callback_data->cancellable = cancellable;
330
331 g_child_watch_add (pid, child_watch_func, callback_data);
332
333 if (error)
334 {
335 g_error ("Error running cc-remote-login-helper: %s", error->message);
336 g_clear_error (&error);
337 }
338}
0339
=== added file 'panels/sharing/cc-remote-login.h'
--- panels/sharing/cc-remote-login.h 1970-01-01 00:00:00 +0000
+++ panels/sharing/cc-remote-login.h 2018-11-21 12:36:03 +0000
@@ -0,0 +1,33 @@
1/*
2 * Copyright (C) 2013 Intel, Inc
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
17 *
18 * Author: Thomas Wood <thomas.wood@intel.com>
19 *
20 */
21
22#ifndef __CC_REMOTE_LOGIN_H__
23#define __CC_REMOTE_LOGIN_H__
24
25#include <gtk/gtk.h>
26
27void cc_remote_login_get_enabled (GCancellable *cancellable,
28 GtkSwitch *gtkswitch,
29 GtkWidget *button);
30void cc_remote_login_set_enabled (GCancellable *cancellable,
31 GtkSwitch *gtkswitch);
32
33#endif /* __CC_REMOTE_LOGIN_H__ **/
034
=== added file 'panels/sharing/cc-sharing-networks.c'
--- panels/sharing/cc-sharing-networks.c 1970-01-01 00:00:00 +0000
+++ panels/sharing/cc-sharing-networks.c 2018-11-21 12:36:03 +0000
@@ -0,0 +1,567 @@
1/*
2 * Copyright (C) 2014 Bastien Nocera <hadess@hadess.net>
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
17 *
18 */
19
20#include "config.h"
21
22#include <gtk/gtk.h>
23#include <gio/gio.h>
24#include <glib/gi18n.h>
25
26#include "cc-sharing-networks.h"
27#include "org.gnome.SettingsDaemon.Sharing.h"
28#include "gsd-sharing-enums.h"
29#include "shell/list-box-helper.h"
30
31struct _CcSharingNetworksPrivate {
32 GtkWidget *listbox;
33
34 GtkWidget *current_row;
35 GtkWidget *current_label;
36 GtkWidget *current_icon;
37 GtkWidget *current_switch;
38
39 GtkWidget *no_network_row;
40
41 char *service_name;
42 GsdSharing *proxy;
43 CcSharingStatus status;
44
45 GList *networks; /* list of CcSharingNetwork */
46};
47
48
49G_DEFINE_TYPE_WITH_CODE (CcSharingNetworks, cc_sharing_networks, GTK_TYPE_GRID,
50 G_ADD_PRIVATE (CcSharingNetworks))
51
52enum {
53 PROP_0,
54 PROP_PROXY,
55 PROP_SERVICE_NAME,
56 PROP_STATUS
57};
58
59static void cc_sharing_networks_class_init (CcSharingNetworksClass *klass);
60static void cc_sharing_networks_init (CcSharingNetworks *self);
61static void cc_sharing_networks_finalize (GObject *object);
62
63static void cc_sharing_update_networks_box (CcSharingNetworks *self);
64
65typedef struct {
66 char *uuid;
67 char *network_name;
68 char *carrier_type;
69} CcSharingNetwork;
70
71static void
72cc_sharing_network_free (gpointer data)
73{
74 CcSharingNetwork *net = data;
75
76 g_free (net->uuid);
77 g_free (net->network_name);
78 g_free (net->carrier_type);
79 g_free (net);
80}
81
82static void
83cc_sharing_networks_update_status (CcSharingNetworks *self)
84{
85 CcSharingStatus status;
86
87 if (self->priv->networks == NULL)
88 status = CC_SHARING_STATUS_OFF;
89 else if (gtk_widget_is_visible (self->priv->current_switch) &&
90 gtk_switch_get_active (GTK_SWITCH (self->priv->current_switch)))
91 status = CC_SHARING_STATUS_ACTIVE;
92 else
93 status = CC_SHARING_STATUS_ENABLED;
94
95 if (status != self->priv->status) {
96 self->priv->status = status;
97 g_object_notify (G_OBJECT (self), "status");
98 }
99}
100
101static void
102cc_sharing_update_networks (CcSharingNetworks *self)
103{
104 GVariant *networks;
105 char *uuid, *network_name, *carrier_type;
106 GVariantIter iter;
107 GError *error = NULL;
108
109 g_list_free_full (self->priv->networks, cc_sharing_network_free);
110 self->priv->networks = NULL;
111
112 if (!gsd_sharing_call_list_networks_sync (self->priv->proxy, self->priv->service_name, &networks, NULL, &error)) {
113 g_warning ("couldn't list networks: %s", error->message);
114 g_dbus_proxy_set_cached_property (G_DBUS_PROXY (self->priv->proxy),
115 "SharingStatus",
116 g_variant_new_uint32 (GSD_SHARING_STATUS_OFFLINE));
117 g_error_free (error);
118 cc_list_box_adjust_scrolling (GTK_LIST_BOX (self->priv->listbox));
119 return;
120 }
121
122 g_variant_iter_init (&iter, networks);
123 while (g_variant_iter_next (&iter, "(sss)", &uuid, &network_name, &carrier_type)) {
124 CcSharingNetwork *net;
125
126 net = g_new0 (CcSharingNetwork, 1);
127 net->uuid = uuid;
128 net->network_name = network_name;
129 net->carrier_type = carrier_type;
130 self->priv->networks = g_list_prepend (self->priv->networks, net);
131 }
132 self->priv->networks = g_list_reverse (self->priv->networks);
133 cc_list_box_adjust_scrolling (GTK_LIST_BOX (self->priv->listbox));
134
135 g_variant_unref (networks);
136}
137
138static void
139cc_sharing_networks_remove_network (GtkWidget *button,
140 CcSharingNetworks *self)
141{
142 GtkWidget *row;
143 GError *error = NULL;
144 gboolean ret;
145 const char *uuid;
146
147 row = g_object_get_data (G_OBJECT (button), "row");
148 uuid = g_object_get_data (G_OBJECT (row), "uuid");
149
150 ret = gsd_sharing_call_disable_service_sync (self->priv->proxy,
151 self->priv->service_name,
152 uuid,
153 NULL,
154 &error);
155 if (!ret) {
156 g_warning ("Failed to remove service %s: %s",
157 self->priv->service_name, error->message);
158 g_error_free (error);
159 }
160
161 cc_sharing_update_networks (self);
162 cc_sharing_update_networks_box (self);
163}
164
165static gboolean
166cc_sharing_networks_enable_network (GtkSwitch *widget,
167 gboolean state,
168 gpointer user_data)
169{
170 CcSharingNetworks *self = user_data;
171 GError *error = NULL;
172 gboolean ret;
173
174 if (state) {
175 ret = gsd_sharing_call_enable_service_sync (self->priv->proxy,
176 self->priv->service_name,
177 NULL,
178 &error);
179 } else {
180 ret = gsd_sharing_call_disable_service_sync (self->priv->proxy,
181 self->priv->service_name,
182 gsd_sharing_get_current_network (self->priv->proxy),
183 NULL,
184 &error);
185 }
186
187 if (ret) {
188 gtk_switch_set_state (widget, state);
189 } else {
190 g_warning ("Failed to %s service %s: %s", state ? "enable" : "disable",
191 self->priv->service_name, error->message);
192 g_error_free (error);
193 g_signal_handlers_block_by_func (widget,
194 cc_sharing_networks_enable_network, self);
195 gtk_switch_set_active (widget, !state);
196 g_signal_handlers_unblock_by_func (widget,
197 cc_sharing_networks_enable_network, self);
198 }
199
200 cc_sharing_update_networks (self);
201 cc_sharing_networks_update_status (self);
202
203 return TRUE;
204}
205
206static GtkWidget *
207cc_sharing_networks_new_row (const char *uuid,
208 const char *network_name,
209 const char *carrier_type,
210 CcSharingNetworks *self)
211{
212 GtkWidget *row, *box, *w;
213 const char *icon_name;
214
215 row = gtk_list_box_row_new ();
216 box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
217 gtk_container_set_border_width (GTK_CONTAINER (box), 12);
218 gtk_container_add (GTK_CONTAINER (row), box);
219
220 if (g_strcmp0 (carrier_type, "802-11-wireless") == 0) {
221 icon_name = "network-wireless-offline-symbolic";
222 } else if (g_strcmp0 (carrier_type, "802-3-ethernet") == 0) {
223 icon_name = "network-wired-disconnected-symbolic";
224 } else {
225 icon_name = "network-wired-symbolic";
226 }
227
228 w = gtk_image_new_from_icon_name (icon_name, GTK_ICON_SIZE_MENU);
229 gtk_widget_set_margin_end (w, 12);
230 gtk_container_add (GTK_CONTAINER (box), w);
231
232 /* Label */
233 w = gtk_label_new (network_name);
234 gtk_container_add (GTK_CONTAINER (box), w);
235
236 /* Remove button */
237 w = gtk_button_new_from_icon_name ("window-close-symbolic", GTK_ICON_SIZE_SMALL_TOOLBAR);
238 gtk_button_set_relief (GTK_BUTTON (w), GTK_RELIEF_NONE);
239 gtk_widget_set_margin_top (w, 3);
240 gtk_widget_set_margin_bottom (w, 3);
241 gtk_widget_set_margin_end (w, 12);
242 gtk_widget_set_valign (w, GTK_ALIGN_CENTER);
243 gtk_box_pack_end (GTK_BOX (box), w, FALSE, FALSE, 0);
244 g_signal_connect (G_OBJECT (w), "clicked",
245 G_CALLBACK (cc_sharing_networks_remove_network), self);
246 g_object_set_data (G_OBJECT (w), "row", row);
247
248 g_object_set_data_full (G_OBJECT (row), "uuid", g_strdup (uuid), g_free);
249
250 gtk_widget_show_all (row);
251
252 return row;
253}
254
255static GtkWidget *
256cc_sharing_networks_new_current_row (CcSharingNetworks *self)
257{
258 GtkWidget *row, *box, *w;
259
260 row = gtk_list_box_row_new ();
261 box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
262 gtk_container_set_border_width (GTK_CONTAINER (box), 12);
263 gtk_container_add (GTK_CONTAINER (row), box);
264
265 /* Icon */
266 w = gtk_image_new_from_icon_name ("image-missing", GTK_ICON_SIZE_MENU);
267 gtk_widget_set_margin_end (w, 12);
268 gtk_container_add (GTK_CONTAINER (box), w);
269 self->priv->current_icon = w;
270
271 /* Label */
272 w = gtk_label_new ("");
273 gtk_container_add (GTK_CONTAINER (box), w);
274 self->priv->current_label = w;
275
276 w = gtk_switch_new ();
277 gtk_widget_set_margin_top (w, 3);
278 gtk_widget_set_margin_bottom (w, 3);
279 gtk_widget_set_margin_end (w, 12);
280 gtk_widget_set_valign (w, GTK_ALIGN_CENTER);
281 gtk_box_pack_end (GTK_BOX (box), w, FALSE, FALSE, 0);
282 g_signal_connect (G_OBJECT (w), "state-set",
283 G_CALLBACK (cc_sharing_networks_enable_network), self);
284 self->priv->current_switch = w;
285 g_object_set_data (G_OBJECT (w), "row", row);
286
287 gtk_widget_show_all (box);
288
289 return row;
290}
291
292static GtkWidget *
293cc_sharing_networks_new_no_network_row (CcSharingNetworks *self)
294{
295 GtkWidget *row, *box, *w;
296
297 row = gtk_list_box_row_new ();
298 box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
299 gtk_container_set_border_width (GTK_CONTAINER (box), 12);
300 gtk_container_add (GTK_CONTAINER (row), box);
301
302 /* Label */
303 w = gtk_label_new (_("No networks selected for sharing"));
304 gtk_widget_set_hexpand (w, TRUE);
305 gtk_widget_set_halign (w, GTK_ALIGN_CENTER);
306 gtk_style_context_add_class (gtk_widget_get_style_context (w), "dim-label");
307 gtk_container_add (GTK_CONTAINER (box), w);
308
309 gtk_widget_show_all (box);
310
311 return row;
312}
313
314static void
315cc_sharing_update_networks_box (CcSharingNetworks *self)
316{
317 gboolean current_visible;
318 const char *current_network;
319 GList *children, *l;
320
321 children = gtk_container_get_children (GTK_CONTAINER (self->priv->listbox));
322 for (l = children; l != NULL; l = l->next) {
323 GtkWidget *row = l->data;
324
325 if (row != self->priv->current_row &&
326 row != self->priv->no_network_row)
327 gtk_widget_destroy (row);
328 }
329 g_list_free (children);
330
331 current_network = gsd_sharing_get_current_network (self->priv->proxy);
332
333 if (current_network != NULL &&
334 !g_str_equal (current_network, "")) {
335 gboolean available;
336 const char *carrier_type, *icon_name, *current_network_name;
337
338 gtk_widget_show (self->priv->current_row);
339 current_visible = TRUE;
340
341 /* Network name */
342 g_object_set_data_full (G_OBJECT (self->priv->current_row),
343 "uuid", g_strdup (current_network), g_free);
344 current_network_name = gsd_sharing_get_current_network_name (self->priv->proxy);
345 gtk_label_set_label (GTK_LABEL (self->priv->current_label), current_network_name);
346
347 /* Icon */
348 carrier_type = gsd_sharing_get_carrier_type (self->priv->proxy);
349 if (g_strcmp0 (carrier_type, "802-11-wireless") == 0) {
350 icon_name = "network-wireless-signal-excellent-symbolic";
351 } else if (g_strcmp0 (carrier_type, "802-3-ethernet") == 0) {
352 icon_name = "network-wired-symbolic";
353 } else {
354 icon_name = "network-wired-symbolic";
355 }
356 gtk_image_set_from_icon_name (GTK_IMAGE (self->priv->current_icon), icon_name, GTK_ICON_SIZE_SMALL_TOOLBAR);
357
358 /* State */
359 available = gsd_sharing_get_sharing_status (self->priv->proxy) == GSD_SHARING_STATUS_AVAILABLE;
360 gtk_widget_set_sensitive (self->priv->current_switch, available);
361 //FIXME add a subtitle explaining why it's disabled
362 } else {
363 gtk_widget_hide (self->priv->current_row);
364 current_visible = FALSE;
365 }
366
367 for (l = self->priv->networks; l != NULL; l = l->next) {
368 CcSharingNetwork *net = l->data;
369 GtkWidget *row;
370
371 if (g_strcmp0 (net->uuid, current_network) == 0) {
372 g_signal_handlers_block_by_func (self->priv->current_switch,
373 cc_sharing_networks_enable_network, self);
374 gtk_switch_set_state (GTK_SWITCH (self->priv->current_switch), TRUE);
375 g_signal_handlers_unblock_by_func (self->priv->current_switch,
376 cc_sharing_networks_enable_network, self);
377 continue;
378 }
379
380 row = cc_sharing_networks_new_row (net->uuid,
381 net->network_name,
382 net->carrier_type,
383 self);
384 gtk_list_box_insert (GTK_LIST_BOX (self->priv->listbox), row, -1);
385 }
386
387 if (self->priv->networks == NULL &&
388 !current_visible) {
389 gtk_widget_show (self->priv->no_network_row);
390 } else {
391 gtk_widget_hide (self->priv->no_network_row);
392 }
393
394 cc_sharing_networks_update_status (self);
395
396 cc_list_box_adjust_scrolling (GTK_LIST_BOX (self->priv->listbox));
397}
398
399static void
400current_network_changed (GObject *object,
401 GParamSpec *pspec,
402 CcSharingNetworks *self)
403{
404 cc_sharing_update_networks (self);
405 cc_sharing_update_networks_box (self);
406}
407
408static void
409cc_sharing_networks_constructed (GObject *object)
410{
411 CcSharingNetworks *self;
412
413 G_OBJECT_CLASS (cc_sharing_networks_parent_class)->constructed (object);
414
415 self = CC_SHARING_NETWORKS (object);
416
417 gtk_list_box_set_header_func (GTK_LIST_BOX (self->priv->listbox),
418 cc_list_box_update_header_func, NULL,
419 NULL);
420
421 cc_list_box_setup_scrolling (GTK_LIST_BOX (self->priv->listbox), 3);
422
423 self->priv->current_row = cc_sharing_networks_new_current_row (self);
424 gtk_list_box_insert (GTK_LIST_BOX (self->priv->listbox), self->priv->current_row, -1);
425 g_object_set_data (G_OBJECT (self), "switch", self->priv->current_switch);
426
427 self->priv->no_network_row = cc_sharing_networks_new_no_network_row (self);
428 gtk_list_box_insert (GTK_LIST_BOX (self->priv->listbox), self->priv->no_network_row, -1);
429
430 cc_sharing_update_networks (self);
431 cc_sharing_update_networks_box (self);
432
433 g_signal_connect (self->priv->proxy, "notify::current-network",
434 G_CALLBACK (current_network_changed), self);
435}
436
437static void
438cc_sharing_networks_init (CcSharingNetworks *self)
439{
440 gtk_widget_init_template (GTK_WIDGET (self));
441 self->priv = cc_sharing_networks_get_instance_private (self);
442}
443
444GtkWidget *
445cc_sharing_networks_new (GDBusProxy *proxy,
446 const char *service_name)
447{
448 g_return_val_if_fail (GSD_IS_SHARING (proxy), NULL);
449 g_return_val_if_fail (service_name != NULL, NULL);
450
451 return GTK_WIDGET (g_object_new (CC_TYPE_SHARING_NETWORKS,
452 "proxy", proxy,
453 "service-name", service_name,
454 NULL));
455}
456
457static void
458cc_sharing_networks_set_property (GObject *object,
459 guint prop_id,
460 const GValue *value,
461 GParamSpec *pspec)
462{
463 CcSharingNetworks *self;
464
465 self = CC_SHARING_NETWORKS (object);
466
467 switch (prop_id) {
468 case PROP_SERVICE_NAME:
469 self->priv->service_name = g_value_dup_string (value);
470 break;
471 case PROP_PROXY:
472 self->priv->proxy = g_value_dup_object (value);
473 break;
474 default:
475 G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
476 break;
477 }
478}
479
480static void
481cc_sharing_networks_get_property (GObject *object,
482 guint prop_id,
483 GValue *value,
484 GParamSpec *pspec)
485{
486 CcSharingNetworks *self;
487
488 self = CC_SHARING_NETWORKS (object);
489
490 switch (prop_id) {
491 case PROP_STATUS:
492 g_value_set_uint (value, self->priv->status);
493 break;
494 default:
495 G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
496 break;
497 }
498}
499
500static void
501cc_sharing_networks_finalize (GObject *object)
502{
503 CcSharingNetworks *self;
504
505 g_return_if_fail (object != NULL);
506 g_return_if_fail (CC_IS_SHARING_NETWORKS (object));
507
508 self = CC_SHARING_NETWORKS (object);
509
510 g_return_if_fail (self->priv != NULL);
511
512 g_clear_object (&self->priv->proxy);
513 g_clear_pointer (&self->priv->service_name, g_free);
514
515 if (self->priv->networks != NULL) {
516 g_list_free_full (self->priv->networks, cc_sharing_network_free);
517 self->priv->networks = NULL;
518 }
519
520 G_OBJECT_CLASS (cc_sharing_networks_parent_class)->finalize (object);
521}
522
523
524static void
525cc_sharing_networks_class_init (CcSharingNetworksClass *klass)
526{
527 GObjectClass *object_class = G_OBJECT_CLASS (klass);
528 GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (klass);
529
530 object_class->set_property = cc_sharing_networks_set_property;
531 object_class->get_property = cc_sharing_networks_get_property;
532 object_class->finalize = cc_sharing_networks_finalize;
533 object_class->constructed = cc_sharing_networks_constructed;
534
535 g_object_class_install_property (object_class,
536 PROP_PROXY,
537 g_param_spec_object ("proxy",
538 "proxy",
539 "proxy",
540 GSD_TYPE_SHARING_PROXY,
541 G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY));
542
543 g_object_class_install_property (object_class,
544 PROP_SERVICE_NAME,
545 g_param_spec_string ("service-name",
546 "service-name",
547 "service-name",
548 NULL,
549 G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY));
550
551 g_object_class_install_property (object_class,
552 PROP_STATUS,
553 g_param_spec_uint ("status",
554 "status",
555 "status",
556 CC_SHARING_STATUS_UNSET, CC_SHARING_STATUS_ACTIVE + 1, CC_SHARING_STATUS_OFF,
557 G_PARAM_READABLE));
558
559 gtk_widget_class_set_template_from_resource (widget_class,
560 "/org/gnome/control-center/sharing/networks.ui");
561
562 gtk_widget_class_bind_template_child_private (widget_class, CcSharingNetworks, listbox);
563}
564
565/*
566 * vim: sw=2 ts=8 cindent noai bs=2
567 */
0568
=== added file 'panels/sharing/cc-sharing-networks.h'
--- panels/sharing/cc-sharing-networks.h 1970-01-01 00:00:00 +0000
+++ panels/sharing/cc-sharing-networks.h 2018-11-21 12:36:03 +0000
@@ -0,0 +1,63 @@
1/*
2 * Copyright (C) 2014 Bastien Nocera <hadess@hadess.net>
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
17 *
18 */
19
20#ifndef __CC_SHARING_NETWORKS_H__
21#define __CC_SHARING_NETWORKS_H__
22
23#include <gtk/gtkgrid.h>
24
25G_BEGIN_DECLS
26
27#define CC_TYPE_SHARING_NETWORKS (cc_sharing_networks_get_type ())
28#define CC_SHARING_NETWORKS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), CC_TYPE_SHARING_NETWORKS, CcSharingNetworks))
29#define CC_SHARING_NETWORKS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), CC_TYPE_SHARING_NETWORKS, CcSharingNetworksClass))
30#define CC_IS_SHARING_NETWORKS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), CC_TYPE_SHARING_NETWORKS))
31#define CC_IS_SHARING_NETWORKS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), CC_TYPE_SHARING_NETWORKS))
32#define CC_SHARING_NETWORKS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), CC_TYPE_SHARING_NETWORKS, CcSharingNetworksClass))
33
34typedef struct _CcSharingNetworks CcSharingNetworks;
35typedef struct _CcSharingNetworksPrivate CcSharingNetworksPrivate;
36typedef struct _CcSharingNetworksClass CcSharingNetworksClass;
37
38struct _CcSharingNetworks
39{
40 GtkGrid parent_instance;
41
42 CcSharingNetworksPrivate *priv;
43};
44
45struct _CcSharingNetworksClass
46{
47 GtkGridClass parent_class;
48};
49
50typedef enum {
51 CC_SHARING_STATUS_UNSET,
52 CC_SHARING_STATUS_OFF,
53 CC_SHARING_STATUS_ENABLED,
54 CC_SHARING_STATUS_ACTIVE
55} CcSharingStatus;
56
57GType cc_sharing_networks_get_type (void) G_GNUC_CONST;
58GtkWidget * cc_sharing_networks_new (GDBusProxy *proxy,
59 const char *service_name);
60
61G_END_DECLS
62
63#endif /* __CC_SHARING_NETWORKS_H__ */
064
=== added file 'panels/sharing/cc-sharing-panel.c'
--- panels/sharing/cc-sharing-panel.c 1970-01-01 00:00:00 +0000
+++ panels/sharing/cc-sharing-panel.c 2018-11-21 12:36:03 +0000
@@ -0,0 +1,1276 @@
1/*
2 * Copyright (C) 2013 Intel, Inc
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
17 *
18 * Author: Thomas Wood <thomas.wood@intel.com>
19 *
20 */
21
22#include "cc-sharing-panel.h"
23#include "shell/cc-hostname-entry.h"
24
25#include "shell/list-box-helper.h"
26#include "cc-sharing-resources.h"
27#include "vino-preferences.h"
28#include "cc-remote-login.h"
29#include "file-share-properties.h"
30#include "cc-media-sharing.h"
31#include "cc-sharing-networks.h"
32#include "cc-sharing-switch.h"
33#include "org.gnome.SettingsDaemon.Sharing.h"
34
35#ifdef GDK_WINDOWING_WAYLAND
36#include <gdk/gdkwayland.h>
37#endif
38#include <glib/gi18n.h>
39#include <config.h>
40
41CC_PANEL_REGISTER (CcSharingPanel, cc_sharing_panel)
42
43#define PANEL_PRIVATE(o) \
44 (G_TYPE_INSTANCE_GET_PRIVATE ((o), CC_TYPE_SHARING_PANEL, CcSharingPanelPrivate))
45
46
47static void cc_sharing_panel_setup_label_with_hostname (CcSharingPanel *self, GtkWidget *label);
48static GtkWidget *cc_sharing_panel_new_media_sharing_row (const char *uri_or_path,
49 CcSharingPanel *self);
50
51static GtkWidget *
52_gtk_builder_get_widget (GtkBuilder *builder,
53 const gchar *name)
54{
55 GtkWidget *w;
56
57 w = (GtkWidget*) gtk_builder_get_object (builder, name);
58
59 g_assert (w != NULL);
60
61 return w;
62}
63
64#define WID(y) _gtk_builder_get_widget (priv->builder, y)
65
66#define VINO_SCHEMA_ID "org.gnome.Vino"
67#define FILE_SHARING_SCHEMA_ID "org.gnome.desktop.file-sharing"
68#define GNOME_REMOTE_DESKTOP_SCHEMA_ID "org.gnome.desktop.remote-desktop"
69
70struct _CcSharingPanelPrivate
71{
72 GtkBuilder *builder;
73
74 GtkWidget *master_switch;
75 GtkWidget *hostname_entry;
76
77 GCancellable *sharing_proxy_cancellable;
78 GDBusProxy *sharing_proxy;
79
80 GtkWidget *media_sharing_switch;
81 GtkWidget *personal_file_sharing_switch;
82 GtkWidget *screen_sharing_switch;
83
84 GtkWidget *media_sharing_dialog;
85 GtkWidget *personal_file_sharing_dialog;
86 GtkWidget *remote_login_dialog;
87 GCancellable *remote_login_cancellable;
88 GCancellable *hostname_cancellable;
89 GtkWidget *screen_sharing_dialog;
90
91 guint remote_desktop_name_watch;
92};
93
94#define OFF_IF_VISIBLE(x) { if (gtk_widget_is_visible(x) && gtk_widget_is_sensitive(x)) gtk_switch_set_active (GTK_SWITCH(x), FALSE); }
95
96static void
97cc_sharing_panel_master_switch_notify (GtkSwitch *gtkswitch,
98 GParamSpec *pspec,
99 CcSharingPanel *self)
100{
101 CcSharingPanelPrivate *priv = self->priv;
102 gboolean active;
103
104 active = gtk_switch_get_active (gtkswitch);
105
106 if (!active)
107 {
108 /* disable all services if the master switch is not active */
109 OFF_IF_VISIBLE(priv->media_sharing_switch);
110 OFF_IF_VISIBLE(priv->personal_file_sharing_switch);
111 OFF_IF_VISIBLE(priv->screen_sharing_switch);
112
113 gtk_switch_set_active (GTK_SWITCH (WID ("remote-login-switch")), FALSE);
114 }
115
116 gtk_widget_set_sensitive (WID ("main-list-box"), active);
117}
118
119static void
120cc_sharing_panel_constructed (GObject *object)
121{
122 CcSharingPanelPrivate *priv = CC_SHARING_PANEL (object)->priv;
123
124 G_OBJECT_CLASS (cc_sharing_panel_parent_class)->constructed (object);
125
126 /* add the master switch */
127 cc_shell_embed_widget_in_header (cc_panel_get_shell (CC_PANEL (object)),
128 gtk_widget_get_parent (priv->master_switch));
129}
130
131static void
132cc_sharing_panel_dispose (GObject *object)
133{
134 CcSharingPanelPrivate *priv = CC_SHARING_PANEL (object)->priv;
135
136 if (priv->remote_desktop_name_watch)
137 g_bus_unwatch_name (priv->remote_desktop_name_watch);
138 priv->remote_desktop_name_watch = 0;
139
140 g_clear_object (&priv->builder);
141
142 if (priv->media_sharing_dialog)
143 {
144 gtk_widget_destroy (priv->media_sharing_dialog);
145 priv->media_sharing_dialog = NULL;
146 }
147
148 if (priv->personal_file_sharing_dialog)
149 {
150 gtk_widget_destroy (priv->personal_file_sharing_dialog);
151 priv->personal_file_sharing_dialog = NULL;
152 }
153
154 if (priv->remote_login_cancellable)
155 {
156 g_cancellable_cancel (priv->remote_login_cancellable);
157 g_clear_object (&priv->remote_login_cancellable);
158 }
159
160 if (priv->hostname_cancellable)
161 {
162 g_cancellable_cancel (priv->hostname_cancellable);
163 g_clear_object (&priv->hostname_cancellable);
164 }
165
166 if (priv->remote_login_dialog)
167 {
168 gtk_widget_destroy (priv->remote_login_dialog);
169 priv->remote_login_dialog = NULL;
170 }
171
172 if (priv->screen_sharing_dialog)
173 {
174 gtk_widget_destroy (priv->screen_sharing_dialog);
175 priv->screen_sharing_dialog = NULL;
176 }
177
178 g_cancellable_cancel (priv->sharing_proxy_cancellable);
179 g_clear_object (&priv->sharing_proxy_cancellable);
180 g_clear_object (&priv->sharing_proxy);
181
182 G_OBJECT_CLASS (cc_sharing_panel_parent_class)->dispose (object);
183}
184
185static const char *
186cc_sharing_panel_get_help_uri (CcPanel *panel)
187{
188 return "help:gnome-help/prefs-sharing";
189}
190
191static void
192cc_sharing_panel_class_init (CcSharingPanelClass *klass)
193{
194 GObjectClass *object_class = G_OBJECT_CLASS (klass);
195 CcPanelClass *panel_class = CC_PANEL_CLASS (klass);
196
197 g_type_class_add_private (klass, sizeof (CcSharingPanelPrivate));
198
199 object_class->constructed = cc_sharing_panel_constructed;
200 object_class->dispose = cc_sharing_panel_dispose;
201
202 panel_class->get_help_uri = cc_sharing_panel_get_help_uri;
203}
204
205static void
206cc_sharing_panel_run_dialog (CcSharingPanel *self,
207 const gchar *dialog_name)
208{
209 CcSharingPanelPrivate *priv = self->priv;
210 GtkWidget *dialog, *parent;
211
212 dialog = WID (dialog_name);
213
214 /* ensure labels with the hostname are updated if the hostname has changed */
215 cc_sharing_panel_setup_label_with_hostname (self,
216 WID ("screen-sharing-label"));
217 cc_sharing_panel_setup_label_with_hostname (self, WID ("remote-login-label"));
218 cc_sharing_panel_setup_label_with_hostname (self,
219 WID ("personal-file-sharing-label"));
220
221
222 parent = cc_shell_get_toplevel (cc_panel_get_shell (CC_PANEL (self)));
223
224 gtk_window_set_transient_for (GTK_WINDOW (dialog), GTK_WINDOW (parent));
225 gtk_dialog_run (GTK_DIALOG (dialog));
226}
227
228static void
229cc_sharing_panel_main_list_box_row_activated (GtkListBox *listbox,
230 GtkListBoxRow *row,
231 CcSharingPanel *self)
232{
233 gchar *widget_name, *found;
234
235 widget_name = g_strdup (gtk_buildable_get_name (GTK_BUILDABLE (row)));
236
237 if (!widget_name)
238 return;
239
240 gtk_list_box_select_row (listbox, NULL);
241
242 /* replace "button" with "dialog" */
243 found = g_strrstr (widget_name, "button");
244
245 if (!found)
246 goto out;
247
248 memcpy (found, "dialog", 6);
249
250 cc_sharing_panel_run_dialog (self, widget_name);
251
252out:
253 g_free (widget_name);
254}
255
256static gboolean
257cc_sharing_panel_switch_to_label_transform_func (GBinding *binding,
258 const GValue *source_value,
259 GValue *target_value,
260 CcSharingPanel *self)
261{
262 gboolean active;
263
264 if (!G_VALUE_HOLDS_BOOLEAN (source_value))
265 return FALSE;
266
267 if (!G_VALUE_HOLDS_STRING (target_value))
268 return FALSE;
269
270 active = g_value_get_boolean (source_value);
271
272 if (active)
273 g_value_set_string (target_value, C_("service is enabled", "On"));
274 else
275 g_value_set_string (target_value, C_("service is disabled", "Off"));
276
277 /* ensure the master switch is active if one of the services is active */
278 if (active)
279 gtk_switch_set_active (GTK_SWITCH (self->priv->master_switch), TRUE);
280
281 return TRUE;
282}
283
284static gboolean
285cc_sharing_panel_networks_to_label_transform_func (GBinding *binding,
286 const GValue *source_value,
287 GValue *target_value,
288 CcSharingPanel *self)
289{
290 CcSharingStatus status;
291
292 if (!G_VALUE_HOLDS_UINT (source_value))
293 return FALSE;
294
295 if (!G_VALUE_HOLDS_STRING (target_value))
296 return FALSE;
297
298 status = g_value_get_uint (source_value);
299
300 switch (status) {
301 case CC_SHARING_STATUS_OFF:
302 g_value_set_string (target_value, C_("service is disabled", "Off"));
303 break;
304 case CC_SHARING_STATUS_ENABLED:
305 g_value_set_string (target_value, C_("service is enabled", "Enabled"));
306 break;
307 case CC_SHARING_STATUS_ACTIVE:
308 g_value_set_string (target_value, C_("service is active", "Active"));
309 break;
310 default:
311 return FALSE;
312 }
313
314 /* ensure the master switch is active if one of the services is active */
315 if (status != CC_SHARING_STATUS_OFF)
316 gtk_switch_set_active (GTK_SWITCH (self->priv->master_switch), TRUE);
317
318 return TRUE;
319}
320
321static void
322cc_sharing_panel_bind_switch_to_label (CcSharingPanel *self,
323 GtkWidget *gtkswitch,
324 GtkWidget *label)
325{
326 g_object_bind_property_full (gtkswitch, "active", label, "label",
327 G_BINDING_SYNC_CREATE,
328 (GBindingTransformFunc) cc_sharing_panel_switch_to_label_transform_func,
329 NULL, self, NULL);
330}
331
332static void
333cc_sharing_panel_bind_networks_to_label (CcSharingPanel *self,
334 GtkWidget *networks,
335 GtkWidget *label)
336{
337 g_object_bind_property_full (networks, "status", label, "label",
338 G_BINDING_SYNC_CREATE,
339 (GBindingTransformFunc) cc_sharing_panel_networks_to_label_transform_func,
340 NULL, self, NULL);
341}
342
343static void
344cc_sharing_panel_bind_switch_to_widgets (GtkWidget *gtkswitch,
345 GtkWidget *first_widget,
346 ...)
347{
348 va_list w;
349 GtkWidget *widget;
350
351 va_start (w, first_widget);
352
353 g_object_bind_property (gtkswitch, "active", first_widget,
354 "sensitive", G_BINDING_SYNC_CREATE);
355
356 while ((widget = va_arg (w, GtkWidget*)))
357 {
358 g_object_bind_property (gtkswitch, "active", widget,
359 "sensitive", G_BINDING_SYNC_CREATE);
360 }
361
362 va_end (w);
363}
364
365static void
366cc_sharing_panel_add_folder (GtkListBox *box,
367 GtkListBoxRow *row,
368 CcSharingPanel *self)
369{
370 CcSharingPanelPrivate *priv = self->priv;
371 GtkWidget *dialog;
372 gchar *folder = NULL;
373 gboolean matching = FALSE;
374 GList *rows, *l;
375
376 if (!GPOINTER_TO_INT (g_object_get_data (G_OBJECT (row), "is-add")))
377 return;
378
379 dialog = gtk_file_chooser_dialog_new (_("Choose a Folder"),
380 GTK_WINDOW (gtk_widget_get_toplevel (GTK_WIDGET (box))),
381 GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER,
382 _("_Cancel"), GTK_RESPONSE_CANCEL,
383 _("_Open"), GTK_RESPONSE_ACCEPT,
384 NULL);
385 gtk_file_chooser_set_local_only (GTK_FILE_CHOOSER (dialog), FALSE);
386 if (gtk_dialog_run (GTK_DIALOG (dialog)) != GTK_RESPONSE_ACCEPT)
387 goto bail;
388
389 gtk_widget_hide (dialog);
390
391 box = GTK_LIST_BOX (WID ("shared-folders-listbox"));
392 rows = gtk_container_get_children (GTK_CONTAINER (box));
393
394 folder = gtk_file_chooser_get_uri (GTK_FILE_CHOOSER (dialog));
395 if (!folder || g_str_equal (folder, ""))
396 goto bail;
397
398 g_debug ("Trying to add %s", folder);
399
400 for (l = rows; l != NULL; l = l->next)
401 {
402 const char *string;
403
404 string = g_object_get_data (G_OBJECT (l->data), "path");
405 matching = (g_strcmp0 (string, folder) == 0);
406
407 if (matching)
408 {
409 g_debug ("Found a duplicate for %s", folder);
410 break;
411 }
412 }
413
414 if (!matching)
415 {
416 GtkWidget *row;
417 int i;
418
419 row = cc_sharing_panel_new_media_sharing_row (folder, self);
420 i = g_list_length (rows);
421 gtk_list_box_insert (GTK_LIST_BOX (box), row, i - 1);
422 }
423 cc_list_box_adjust_scrolling (GTK_LIST_BOX (box));
424
425bail:
426 g_free (folder);
427 gtk_widget_destroy (dialog);
428}
429
430static void
431cc_sharing_panel_remove_folder (GtkButton *button,
432 CcSharingPanel *self)
433{
434 CcSharingPanelPrivate *priv = self->priv;
435 GtkWidget *row;
436
437 row = g_object_get_data (G_OBJECT (button), "row");
438 gtk_widget_destroy (row);
439 cc_list_box_adjust_scrolling (GTK_LIST_BOX (WID ("shared-folders-listbox")));
440}
441
442static void
443cc_sharing_panel_media_sharing_dialog_response (GtkDialog *dialog,
444 gint reponse_id,
445 CcSharingPanel *self)
446{
447 CcSharingPanelPrivate *priv = self->priv;
448 GPtrArray *folders;
449 GtkWidget *box;
450 GList *rows, *l;
451
452 box = WID ("shared-folders-listbox");
453 rows = gtk_container_get_children (GTK_CONTAINER (box));
454 folders = g_ptr_array_new_with_free_func (g_free);
455
456 for (l = rows; l != NULL; l = l->next)
457 {
458 const char *folder;
459
460 folder = g_object_get_data (G_OBJECT (l->data), "path");
461 if (folder == NULL)
462 continue;
463 g_ptr_array_add (folders, g_strdup (folder));
464 }
465
466 g_ptr_array_add (folders, NULL);
467
468 cc_media_sharing_set_preferences ((gchar **) folders->pdata);
469
470 g_ptr_array_free (folders, TRUE);
471}
472
473#define ICON_NAME_FOLDER "folder-symbolic"
474#define ICON_NAME_FOLDER_DESKTOP "user-desktop-symbolic"
475#define ICON_NAME_FOLDER_DOCUMENTS "folder-documents-symbolic"
476#define ICON_NAME_FOLDER_DOWNLOAD "folder-download-symbolic"
477#define ICON_NAME_FOLDER_MUSIC "folder-music-symbolic"
478#define ICON_NAME_FOLDER_PICTURES "folder-pictures-symbolic"
479#define ICON_NAME_FOLDER_PUBLIC_SHARE "folder-publicshare-symbolic"
480#define ICON_NAME_FOLDER_TEMPLATES "folder-templates-symbolic"
481#define ICON_NAME_FOLDER_VIDEOS "folder-videos-symbolic"
482#define ICON_NAME_FOLDER_SAVED_SEARCH "folder-saved-search-symbolic"
483
484static GIcon *
485special_directory_get_gicon (GUserDirectory directory)
486{
487#define ICON_CASE(x) \
488 case G_USER_DIRECTORY_ ## x: \
489 return g_themed_icon_new_with_default_fallbacks (ICON_NAME_FOLDER_ ## x);
490
491 switch (directory)
492 {
493 ICON_CASE (DESKTOP);
494 ICON_CASE (DOCUMENTS);
495 ICON_CASE (DOWNLOAD);
496 ICON_CASE (MUSIC);
497 ICON_CASE (PICTURES);
498 ICON_CASE (PUBLIC_SHARE);
499 ICON_CASE (TEMPLATES);
500 ICON_CASE (VIDEOS);
501
502 default:
503 return g_themed_icon_new_with_default_fallbacks (ICON_NAME_FOLDER);
504 }
505
506#undef ICON_CASE
507}
508
509static GtkWidget *
510cc_sharing_panel_new_media_sharing_row (const char *uri_or_path,
511 CcSharingPanel *self)
512{
513 GtkWidget *row, *box, *w;
514 GUserDirectory dir = G_USER_N_DIRECTORIES;
515 GIcon *icon;
516 guint i;
517 char *basename, *path;
518 GFile *file;
519
520 file = g_file_new_for_commandline_arg (uri_or_path);
521 path = g_file_get_path (file);
522 g_object_unref (file);
523
524 row = gtk_list_box_row_new ();
525 box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
526 gtk_container_set_border_width (GTK_CONTAINER (box), 12);
527 gtk_container_add (GTK_CONTAINER (row), box);
528
529 /* Find the icon and create it */
530 for (i = 0; i < G_USER_N_DIRECTORIES; i++)
531 {
532 if (g_strcmp0 (path, g_get_user_special_dir (i)) == 0)
533 {
534 dir = i;
535 break;
536 }
537 }
538
539 icon = special_directory_get_gicon (dir);
540 w = gtk_image_new_from_gicon (icon, GTK_ICON_SIZE_MENU);
541 gtk_widget_set_margin_end (w, 12);
542 gtk_container_add (GTK_CONTAINER (box), w);
543 g_object_unref (icon);
544
545 /* Label */
546 basename = g_filename_display_basename (path);
547 w = gtk_label_new (basename);
548 g_free (basename);
549 gtk_container_add (GTK_CONTAINER (box), w);
550
551 /* Remove button */
552 w = gtk_button_new_from_icon_name ("window-close-symbolic", GTK_ICON_SIZE_SMALL_TOOLBAR);
553 gtk_button_set_relief (GTK_BUTTON (w), GTK_RELIEF_NONE);
554 gtk_widget_set_margin_top (w, 3);
555 gtk_widget_set_margin_bottom (w, 3);
556 gtk_widget_set_margin_end (w, 12);
557 gtk_widget_set_valign (w, GTK_ALIGN_CENTER);
558 gtk_box_pack_end (GTK_BOX (box), w, FALSE, FALSE, 0);
559 g_signal_connect (G_OBJECT (w), "clicked",
560 G_CALLBACK (cc_sharing_panel_remove_folder), self);
561 g_object_set_data (G_OBJECT (w), "row", row);
562
563 g_object_set_data_full (G_OBJECT (row), "path", path, g_free);
564
565 gtk_widget_show_all (row);
566
567 return row;
568}
569
570static GtkWidget *
571cc_sharing_panel_new_add_media_sharing_row (CcSharingPanel *self)
572{
573 GtkWidget *row, *box, *w;
574
575 row = gtk_list_box_row_new ();
576 box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
577 gtk_container_set_border_width (GTK_CONTAINER (box), 12);
578 gtk_container_add (GTK_CONTAINER (row), box);
579
580 w = gtk_image_new_from_icon_name ("list-add-symbolic", GTK_ICON_SIZE_SMALL_TOOLBAR);
581 gtk_container_add (GTK_CONTAINER (box), w);
582 gtk_widget_set_hexpand (w, TRUE);
583 gtk_widget_set_margin_top (w, 6);
584 gtk_widget_set_margin_bottom (w, 6);
585
586 g_object_set_data (G_OBJECT (w), "row", row);
587
588 g_object_set_data (G_OBJECT (row), "is-add", GINT_TO_POINTER (1));
589 gtk_widget_show_all (row);
590
591 return row;
592}
593
594static void
595cc_sharing_panel_setup_media_sharing_dialog (CcSharingPanel *self)
596{
597 CcSharingPanelPrivate *priv = self->priv;
598 gchar **folders, **list;
599 GtkWidget *box, *networks, *grid, *w;
600 char *path;
601
602 path = g_find_program_in_path ("rygel");
603 if (path == NULL)
604 {
605 gtk_widget_hide (WID ("media-sharing-button"));
606 return;
607 }
608 g_free (path);
609
610 g_signal_connect (WID ("media-sharing-dialog"), "response",
611 G_CALLBACK (cc_sharing_panel_media_sharing_dialog_response),
612 self);
613
614 cc_media_sharing_get_preferences (&folders);
615
616 box = WID ("shared-folders-listbox");
617 gtk_list_box_set_header_func (GTK_LIST_BOX (box),
618 cc_list_box_update_header_func, NULL,
619 NULL);
620 cc_list_box_setup_scrolling (GTK_LIST_BOX (box), 3);
621
622 list = folders;
623 while (list && *list)
624 {
625 GtkWidget *row;
626
627 row = cc_sharing_panel_new_media_sharing_row (*list, self);
628 gtk_list_box_insert (GTK_LIST_BOX (box), row, -1);
629 list++;
630 }
631
632 gtk_list_box_insert (GTK_LIST_BOX (box),
633 cc_sharing_panel_new_add_media_sharing_row (self), -1);
634
635 cc_list_box_adjust_scrolling (GTK_LIST_BOX (box));
636
637 g_signal_connect (G_OBJECT (box), "row-activated",
638 G_CALLBACK (cc_sharing_panel_add_folder), self);
639
640
641 g_strfreev (folders);
642
643 networks = cc_sharing_networks_new (self->priv->sharing_proxy, "rygel");
644 grid = WID ("grid4");
645 gtk_grid_attach (GTK_GRID (grid), networks, 0, 4, 2, 1);
646 gtk_widget_show (networks);
647
648 w = cc_sharing_switch_new (networks);
649 gtk_header_bar_pack_start (GTK_HEADER_BAR (WID ("media-sharing-headerbar")), w);
650 self->priv->media_sharing_switch = w;
651
652 cc_sharing_panel_bind_networks_to_label (self, networks,
653 WID ("media-sharing-status-label"));
654}
655
656static gboolean
657cc_sharing_panel_label_activate_link (GtkLabel *label,
658 gchar *uri,
659 GtkMenu *menu)
660{
661 gtk_menu_popup (menu, NULL, NULL, NULL, NULL, 0, gtk_get_current_event_time ());
662
663 g_object_set_data_full (G_OBJECT (menu), "uri-text", g_strdup (uri), g_free);
664
665 return TRUE;
666}
667
668static void
669copy_uri_to_clipboard (GtkMenuItem *item,
670 GtkMenu *menu)
671{
672 GtkClipboard *clipboard;
673 const gchar *text;
674
675 text = g_object_get_data (G_OBJECT (menu), "uri-text");
676
677 clipboard = gtk_clipboard_get (GDK_SELECTION_CLIPBOARD);
678 gtk_clipboard_set_text (clipboard, text, -1);
679}
680
681static void
682cc_sharing_panel_setup_label (CcSharingPanel *self,
683 GtkWidget *label,
684 const gchar *hostname)
685{
686 CcSharingPanelPrivate *priv = self->priv;
687 gchar *text;
688
689 if (label == WID ("personal-file-sharing-label"))
690 text = g_strdup_printf (_("Personal File Sharing allows you to share your Public folder with others on your current network using: <a href=\"dav://%s\">dav://%s</a>"), hostname, hostname);
691 else if (label == WID ("remote-login-label"))
692 text = g_strdup_printf (_("When remote login is enabled, remote users can connect using the Secure Shell command:\n<a href=\"ssh %s\">ssh %s</a>"), hostname, hostname);
693 else if (label == WID ("screen-sharing-label"))
694 text = g_strdup_printf (_("Screen sharing allows remote users to view or control your screen by connecting to <a href=\"vnc://%s\">vnc://%s</a>"), hostname, hostname);
695 else
696 g_assert_not_reached ();
697
698 gtk_label_set_label (GTK_LABEL (label), text);
699
700 g_free (text);
701}
702
703typedef struct
704{
705 CcSharingPanel *panel;
706 GtkWidget *label;
707} GetHostNameData;
708
709static void
710cc_sharing_panel_get_host_name_fqdn_done (GDBusConnection *connection,
711 GAsyncResult *res,
712 GetHostNameData *data)
713{
714 GError *error = NULL;
715 GVariant *variant;
716 const gchar *fqdn;
717
718 variant = g_dbus_connection_call_finish (connection, res, &error);
719
720 if (variant == NULL)
721 {
722 /* Avahi service may not be available */
723 g_debug ("Error calling GetHostNameFqdn: %s", error->message);
724
725 if (!g_error_matches (error, G_IO_ERROR, G_IO_ERROR_CANCELLED))
726 {
727 gchar *hostname;
728
729 hostname = cc_hostname_entry_get_hostname (CC_HOSTNAME_ENTRY (data->panel->priv->hostname_entry));
730
731 cc_sharing_panel_setup_label (data->panel, data->label, hostname);
732
733 g_free (hostname);
734 }
735
736 g_free (data);
737 g_error_free (error);
738 return;
739 }
740
741 g_variant_get (variant, "(&s)", &fqdn);
742
743 cc_sharing_panel_setup_label (data->panel, data->label, fqdn);
744
745 g_variant_unref (variant);
746 g_object_unref (connection);
747 g_free (data);
748}
749
750static void
751cc_sharing_panel_bus_ready (GObject *object,
752 GAsyncResult *res,
753 GetHostNameData *data)
754{
755 GDBusConnection *connection;
756 GError *error = NULL;
757
758 connection = g_bus_get_finish (res, &error);
759
760 if (connection == NULL)
761 {
762 g_warning ("Could not connect to system bus: %s", error->message);
763
764 if (!g_error_matches (error, G_IO_ERROR, G_IO_ERROR_CANCELLED))
765 {
766 gchar *hostname;
767
768 hostname = cc_hostname_entry_get_hostname (CC_HOSTNAME_ENTRY (data->panel->priv->hostname_entry));
769
770 cc_sharing_panel_setup_label (data->panel, data->label, hostname);
771
772 g_free (hostname);
773 }
774
775 g_error_free (error);
776 g_free (data);
777 return;
778 }
779
780 g_dbus_connection_call (connection,
781 "org.freedesktop.Avahi",
782 "/",
783 "org.freedesktop.Avahi.Server",
784 "GetHostNameFqdn",
785 NULL,
786 (GVariantType*)"(s)",
787 G_DBUS_CALL_FLAGS_NONE,
788 -1,
789 data->panel->priv->hostname_cancellable,
790 (GAsyncReadyCallback) cc_sharing_panel_get_host_name_fqdn_done,
791 data);
792}
793
794
795static void
796cc_sharing_panel_setup_label_with_hostname (CcSharingPanel *self,
797 GtkWidget *label)
798{
799 GtkWidget *menu;
800 GtkWidget *menu_item;
801 GetHostNameData *get_hostname_data;
802
803 /* create the menu */
804 menu = gtk_menu_new ();
805
806 menu_item = gtk_menu_item_new_with_label (_("Copy"));
807 gtk_widget_show (menu_item);
808
809 g_signal_connect (menu_item, "activate", G_CALLBACK (copy_uri_to_clipboard),
810 menu);
811
812 gtk_menu_shell_append (GTK_MENU_SHELL (menu), menu_item);
813
814 /* show the menu when the link is activated */
815 g_signal_connect (label, "activate-link",
816 G_CALLBACK (cc_sharing_panel_label_activate_link), menu);
817
818 /* destroy the menu when the label is destroyed */
819 g_signal_connect_swapped (label, "destroy", G_CALLBACK (gtk_widget_destroy),
820 menu);
821
822
823 /* set the hostname */
824 get_hostname_data = g_new (GetHostNameData, 1);
825 get_hostname_data->panel = self;
826 get_hostname_data->label = label;
827 g_bus_get (G_BUS_TYPE_SYSTEM,
828 self->priv->hostname_cancellable,
829 (GAsyncReadyCallback) cc_sharing_panel_bus_ready,
830 get_hostname_data);
831}
832
833static gboolean
834file_sharing_get_require_password (GValue *value,
835 GVariant *variant,
836 gpointer user_data)
837{
838 if (g_str_equal (g_variant_get_string (variant, NULL), "always"))
839 g_value_set_boolean (value, TRUE);
840 else
841 g_value_set_boolean (value, FALSE);
842
843 return TRUE;
844}
845
846static GVariant *
847file_sharing_set_require_password (const GValue *value,
848 const GVariantType *type,
849 gpointer user_data)
850{
851 if (g_value_get_boolean (value))
852 return g_variant_new_string ("always");
853 else
854 return g_variant_new_string ("never");
855}
856
857static void
858file_sharing_password_changed (GtkEntry *entry)
859{
860 file_share_write_out_password (gtk_entry_get_text (entry));
861}
862
863static void
864cc_sharing_panel_setup_personal_file_sharing_dialog (CcSharingPanel *self)
865{
866 CcSharingPanelPrivate *priv = self->priv;
867 GSettings *settings;
868 GtkWidget *networks, *grid, *w;
869
870 cc_sharing_panel_bind_switch_to_widgets (WID ("personal-file-sharing-require-password-switch"),
871 WID ("personal-file-sharing-password-entry"),
872 WID ("personal-file-sharing-password-label"),
873 NULL);
874
875 cc_sharing_panel_setup_label_with_hostname (self,
876 WID ("personal-file-sharing-label"));
877
878 /* the password cannot be read, so just make sure the entry is not empty */
879 gtk_entry_set_text (GTK_ENTRY (WID ("personal-file-sharing-password-entry")),
880 "password");
881
882 settings = g_settings_new (FILE_SHARING_SCHEMA_ID);
883 g_settings_bind_with_mapping (settings, "require-password",
884 WID ("personal-file-sharing-require-password-switch"),
885 "active",
886 G_SETTINGS_BIND_DEFAULT,
887 file_sharing_get_require_password,
888 file_sharing_set_require_password, NULL, NULL);
889
890 g_signal_connect (WID ("personal-file-sharing-password-entry"),
891 "notify::text", G_CALLBACK (file_sharing_password_changed),
892 NULL);
893
894 networks = cc_sharing_networks_new (self->priv->sharing_proxy, "gnome-user-share-webdav");
895 grid = WID ("grid2");
896 gtk_grid_attach (GTK_GRID (grid), networks, 0, 3, 2, 1);
897 gtk_widget_show (networks);
898
899 w = cc_sharing_switch_new (networks);
900 gtk_header_bar_pack_start (GTK_HEADER_BAR (WID ("personal-file-sharing-headerbar")), w);
901 self->priv->personal_file_sharing_switch = w;
902
903 cc_sharing_panel_bind_networks_to_label (self,
904 networks,
905 WID ("personal-file-sharing-status-label"));
906}
907
908static void
909remote_login_switch_activate (GtkSwitch *remote_login_switch,
910 GParamSpec *pspec,
911 CcSharingPanel *self)
912{
913 cc_remote_login_set_enabled (self->priv->remote_login_cancellable, remote_login_switch);
914}
915
916static void
917cc_sharing_panel_setup_remote_login_dialog (CcSharingPanel *self)
918{
919 CcSharingPanelPrivate *priv = self->priv;
920
921 cc_sharing_panel_bind_switch_to_label (self, WID ("remote-login-switch"),
922 WID ("remote-login-status-label"));
923
924 cc_sharing_panel_setup_label_with_hostname (self, WID ("remote-login-label"));
925
926 g_signal_connect (WID ("remote-login-switch"), "notify::active",
927 G_CALLBACK (remote_login_switch_activate), self);
928 gtk_widget_set_sensitive (WID ("remote-login-switch"), FALSE);
929
930 cc_remote_login_get_enabled (self->priv->remote_login_cancellable,
931 GTK_SWITCH (WID ("remote-login-switch")),
932 WID ("remote-login-button"));
933}
934
935static gboolean
936cc_sharing_panel_check_schema_available (CcSharingPanel *self,
937 const gchar *schema_id)
938{
939 GSettingsSchemaSource *source;
940 GSettingsSchema *schema;
941
942 source = g_settings_schema_source_get_default ();
943 if (!source)
944 return FALSE;
945
946 schema = g_settings_schema_source_lookup (source, schema_id, TRUE);
947 if (!schema)
948 return FALSE;
949
950 g_settings_schema_unref (schema);
951 return TRUE;
952}
953
954static void
955screen_sharing_show_cb (GtkWidget *widget, CcSharingPanel *self)
956{
957 CcSharingPanelPrivate *priv = self->priv;
958
959 gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (WID ("show-password-checkbutton")),
960 FALSE);
961}
962
963static void
964screen_sharing_hide_cb (GtkWidget *widget, CcSharingPanel *self)
965{
966 GtkToggleButton *ac_radio;
967 GtkEntry *pw_entry;
968 const gchar *password;
969 CcSharingPanelPrivate *priv = self->priv;
970
971 ac_radio = GTK_TOGGLE_BUTTON (WID ("approve-connections-radiobutton"));
972 pw_entry = GTK_ENTRY (WID ("remote-control-password-entry"));
973 password = gtk_entry_get_text (pw_entry);
974
975 if (password == NULL || *password == '\0')
976 gtk_toggle_button_set_active (ac_radio, TRUE);
977}
978
979#define MAX_PASSWORD_SIZE 8
980static void
981screen_sharing_password_insert_text_cb (GtkEditable *editable,
982 gchar *new_text,
983 gint new_text_length,
984 gpointer position,
985 gpointer user_data)
986{
987 int l, available_size;
988
989 l = gtk_entry_buffer_get_bytes (gtk_entry_get_buffer (GTK_ENTRY (editable)));
990
991 if (l + new_text_length <= MAX_PASSWORD_SIZE)
992 return;
993
994 g_signal_stop_emission_by_name (editable, "insert-text");
995 gtk_widget_error_bell (GTK_WIDGET (editable));
996
997 available_size = g_utf8_strlen (new_text, MAX_PASSWORD_SIZE - l);
998 if (available_size == 0)
999 return;
1000
1001 g_signal_handlers_block_by_func (editable,
1002 (gpointer) screen_sharing_password_insert_text_cb,
1003 user_data);
1004 gtk_editable_insert_text (editable, new_text, available_size, position);
1005 g_signal_handlers_unblock_by_func (editable,
1006 (gpointer) screen_sharing_password_insert_text_cb,
1007 user_data);
1008}
1009#undef MAX_PASSWORD_SIZE
1010
1011static void
1012cc_sharing_panel_setup_screen_sharing_dialog_vino (CcSharingPanel *self)
1013{
1014 CcSharingPanelPrivate *priv = self->priv;
1015 GSettings *settings;
1016 GtkWidget *networks, *box, *w;
1017
1018 cc_sharing_panel_bind_switch_to_widgets (WID ("require-password-radiobutton"),
1019 WID ("password-grid"),
1020 NULL);
1021
1022 cc_sharing_panel_setup_label_with_hostname (self,
1023 WID ("screen-sharing-label"));
1024
1025 /* settings bindings */
1026 settings = g_settings_new (VINO_SCHEMA_ID);
1027 g_settings_bind (settings, "view-only", WID ("remote-control-checkbutton"),
1028 "active",
1029 G_SETTINGS_BIND_DEFAULT | G_SETTINGS_BIND_INVERT_BOOLEAN);
1030 g_settings_bind (settings, "prompt-enabled",
1031 WID ("approve-connections-radiobutton"), "active",
1032 G_SETTINGS_BIND_DEFAULT);
1033 g_settings_bind_with_mapping (settings, "authentication-methods",
1034 WID ("require-password-radiobutton"),
1035 "active",
1036 G_SETTINGS_BIND_DEFAULT,
1037 vino_get_authtype, vino_set_authtype, NULL, NULL);
1038
1039 g_settings_bind_with_mapping (settings, "vnc-password",
1040 WID ("remote-control-password-entry"),
1041 "text",
1042 G_SETTINGS_BIND_DEFAULT,
1043 vino_get_password, vino_set_password, NULL, NULL);
1044
1045 g_object_bind_property (WID ("show-password-checkbutton"), "active",
1046 WID ("remote-control-password-entry"), "visibility",
1047 G_BINDING_SYNC_CREATE);
1048
1049 /* make sure the password entry is hidden by default */
1050 g_signal_connect (priv->screen_sharing_dialog, "show",
1051 G_CALLBACK (screen_sharing_show_cb), self);
1052
1053 g_signal_connect (priv->screen_sharing_dialog, "hide",
1054 G_CALLBACK (screen_sharing_hide_cb), self);
1055
1056 /* accept at most 8 bytes in password entry */
1057 g_signal_connect (WID ("remote-control-password-entry"), "insert-text",
1058 G_CALLBACK (screen_sharing_password_insert_text_cb), self);
1059
1060 networks = cc_sharing_networks_new (self->priv->sharing_proxy, "vino-server");
1061 box = WID ("remote-control-box");
1062 gtk_box_pack_end (GTK_BOX (box), networks, TRUE, TRUE, 0);
1063 gtk_widget_show (networks);
1064
1065 w = cc_sharing_switch_new (networks);
1066 gtk_header_bar_pack_start (GTK_HEADER_BAR (WID ("screen-sharing-headerbar")), w);
1067 self->priv->screen_sharing_switch = w;
1068
1069 cc_sharing_panel_bind_networks_to_label (self, networks,
1070 WID ("screen-sharing-status-label"));
1071}
1072
1073static void
1074cc_sharing_panel_setup_screen_sharing_dialog_gnome_remote_desktop (CcSharingPanel *self)
1075{
1076 CcSharingPanelPrivate *priv = self->priv;
1077 GtkWidget *networks, *w;
1078
1079 networks = cc_sharing_networks_new (self->priv->sharing_proxy, "gnome-remote-desktop");
1080 gtk_widget_hide (WID ("remote-control-box"));
1081 gtk_grid_attach (GTK_GRID (WID ("grid3")), networks, 0, 1, 2, 1);
1082 gtk_widget_show (networks);
1083
1084 w = cc_sharing_switch_new (networks);
1085 gtk_header_bar_pack_start (GTK_HEADER_BAR (WID ("screen-sharing-headerbar")), w);
1086 self->priv->screen_sharing_switch = w;
1087
1088 cc_sharing_panel_bind_networks_to_label (self, networks,
1089 WID ("screen-sharing-status-label"));
1090}
1091
1092static void
1093remote_desktop_name_appeared (GDBusConnection *connection,
1094 const gchar *name,
1095 const gchar *name_owner,
1096 gpointer user_data)
1097{
1098 CcSharingPanel *self = CC_SHARING_PANEL (user_data);
1099 CcSharingPanelPrivate *priv = self->priv;
1100
1101 g_bus_unwatch_name (priv->remote_desktop_name_watch);
1102 priv->remote_desktop_name_watch = 0;
1103
1104 cc_sharing_panel_setup_screen_sharing_dialog_gnome_remote_desktop (self);
1105 gtk_widget_show (WID ("screen-sharing-button"));
1106}
1107
1108static void
1109check_remote_desktop_available (CcSharingPanel *self)
1110{
1111 CcSharingPanelPrivate *priv = self->priv;
1112
1113 if (!cc_sharing_panel_check_schema_available (self, GNOME_REMOTE_DESKTOP_SCHEMA_ID))
1114 return;
1115
1116 priv->remote_desktop_name_watch = g_bus_watch_name (G_BUS_TYPE_SESSION,
1117 "org.gnome.Mutter.RemoteDesktop",
1118 G_BUS_NAME_WATCHER_FLAGS_NONE,
1119 remote_desktop_name_appeared,
1120 NULL,
1121 self,
1122 NULL);
1123}
1124
1125static void
1126sharing_proxy_ready (GObject *source,
1127 GAsyncResult *res,
1128 gpointer user_data)
1129{
1130 CcSharingPanel *self;
1131 CcSharingPanelPrivate *priv;
1132 GDBusProxy *proxy;
1133 GError *error = NULL;
1134
1135 proxy = G_DBUS_PROXY (gsd_sharing_proxy_new_for_bus_finish (res, &error));
1136 if (!proxy) {
1137 if (!g_error_matches (error, G_IO_ERROR, G_IO_ERROR_CANCELLED))
1138 g_warning ("Failed to get sharing proxy: %s", error->message);
1139 g_error_free (error);
1140 return;
1141 }
1142
1143 self = CC_SHARING_PANEL (user_data);
1144 priv = self->priv;
1145 priv->sharing_proxy = proxy;
1146
1147 /* media sharing */
1148 cc_sharing_panel_setup_media_sharing_dialog (self);
1149
1150 /* personal file sharing */
1151 if (cc_sharing_panel_check_schema_available (self, FILE_SHARING_SCHEMA_ID))
1152 cc_sharing_panel_setup_personal_file_sharing_dialog (self);
1153 else
1154 gtk_widget_hide (WID ("personal-file-sharing-button"));
1155
1156 /* remote login */
1157 cc_sharing_panel_setup_remote_login_dialog (self);
1158
1159 /* screen sharing */
1160#ifdef GDK_WINDOWING_WAYLAND
1161 if (GDK_IS_WAYLAND_DISPLAY (gdk_display_get_default ()))
1162 {
1163 check_remote_desktop_available (self);
1164 gtk_widget_hide (WID ("screen-sharing-button"));
1165 }
1166 else
1167#endif
1168 if (cc_sharing_panel_check_schema_available (self, VINO_SCHEMA_ID))
1169 cc_sharing_panel_setup_screen_sharing_dialog_vino (self);
1170 else
1171 gtk_widget_hide (WID ("screen-sharing-button"));
1172}
1173
1174static void
1175cc_sharing_panel_init (CcSharingPanel *self)
1176{
1177 CcSharingPanelPrivate *priv = self->priv = PANEL_PRIVATE (self);
1178 GtkWidget *box;
1179 GError *err = NULL;
1180 gchar *objects[] = {
1181 "sharing-panel",
1182 "media-sharing-dialog",
1183 "personal-file-sharing-dialog",
1184 "remote-login-dialog",
1185 "screen-sharing-dialog",
1186 NULL };
1187
1188 g_resources_register (cc_sharing_get_resource ());
1189
1190 priv->builder = gtk_builder_new ();
1191
1192 gtk_builder_add_objects_from_resource (priv->builder,
1193 "/org/gnome/control-center/sharing/sharing.ui",
1194 objects, &err);
1195
1196 if (err)
1197 g_error ("Error loading CcSharingPanel user interface: %s", err->message);
1198
1199 priv->hostname_entry = WID ("hostname-entry");
1200
1201 gtk_container_add (GTK_CONTAINER (self), WID ("sharing-panel"));
1202
1203 g_signal_connect (WID ("main-list-box"), "row-activated",
1204 G_CALLBACK (cc_sharing_panel_main_list_box_row_activated), self);
1205
1206 priv->hostname_cancellable = g_cancellable_new ();
1207
1208 priv->media_sharing_dialog = WID ("media-sharing-dialog");
1209 priv->personal_file_sharing_dialog = WID ("personal-file-sharing-dialog");
1210 priv->remote_login_dialog = WID ("remote-login-dialog");
1211 priv->remote_login_cancellable = g_cancellable_new ();
1212 priv->screen_sharing_dialog = WID ("screen-sharing-dialog");
1213
1214 g_signal_connect (priv->media_sharing_dialog, "response",
1215 G_CALLBACK (gtk_widget_hide), NULL);
1216 g_signal_connect (priv->personal_file_sharing_dialog, "response",
1217 G_CALLBACK (gtk_widget_hide), NULL);
1218 g_signal_connect (priv->remote_login_dialog, "response",
1219 G_CALLBACK (gtk_widget_hide), NULL);
1220 g_signal_connect (priv->screen_sharing_dialog, "response",
1221 G_CALLBACK (gtk_widget_hide), NULL);
1222
1223 gtk_list_box_set_activate_on_single_click (GTK_LIST_BOX (WID ("main-list-box")),
1224 TRUE);
1225 gtk_list_box_set_header_func (GTK_LIST_BOX (WID ("main-list-box")),
1226 cc_list_box_update_header_func,
1227 NULL, NULL);
1228
1229 /* create the master switch */
1230 box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 6);
1231
1232 priv->master_switch = gtk_switch_new ();
1233 atk_object_set_name (ATK_OBJECT (gtk_widget_get_accessible (priv->master_switch)), _("Sharing"));
1234 gtk_widget_set_valign (priv->master_switch, GTK_ALIGN_CENTER);
1235 gtk_box_pack_start (GTK_BOX (box), priv->master_switch, FALSE, FALSE, 4);
1236 gtk_widget_show_all (box);
1237
1238 /* start the panel in the disabled state */
1239 gtk_switch_set_active (GTK_SWITCH (priv->master_switch), FALSE);
1240 gtk_widget_set_sensitive (WID ("main-list-box"), FALSE);
1241 g_signal_connect (priv->master_switch, "notify::active",
1242 G_CALLBACK (cc_sharing_panel_master_switch_notify), self);
1243
1244 priv->sharing_proxy_cancellable = g_cancellable_new ();
1245 gsd_sharing_proxy_new_for_bus (G_BUS_TYPE_SESSION,
1246 G_DBUS_PROXY_FLAGS_NONE,
1247 "org.gnome.SettingsDaemon.Sharing",
1248 "/org/gnome/SettingsDaemon/Sharing",
1249 priv->sharing_proxy_cancellable,
1250 sharing_proxy_ready,
1251 self);
1252
1253 /* make sure the hostname entry isn't focused by default */
1254 g_signal_connect_swapped (self, "map", G_CALLBACK (gtk_widget_grab_focus),
1255 WID ("main-list-box"));
1256}
1257
1258CcSharingPanel *
1259cc_sharing_panel_new (void)
1260{
1261 return g_object_new (CC_TYPE_SHARING_PANEL, NULL);
1262}
1263
1264/* ---------------------------------------------------------------------------------------------------- */
1265
1266void
1267cc_sharing_panel_register (GIOModule *module)
1268{
1269 textdomain (GETTEXT_PACKAGE);
1270 bindtextdomain (GETTEXT_PACKAGE, "/usr/share/locale");
1271 bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
1272 cc_sharing_panel_register_type (G_TYPE_MODULE (module));
1273 g_io_extension_point_implement (CC_SHELL_PANEL_EXTENSION_POINT,
1274 CC_TYPE_SHARING_PANEL,
1275 "sharing", 0);
1276}
01277
=== added file 'panels/sharing/cc-sharing-panel.h'
--- panels/sharing/cc-sharing-panel.h 1970-01-01 00:00:00 +0000
+++ panels/sharing/cc-sharing-panel.h 2018-11-21 12:36:03 +0000
@@ -0,0 +1,75 @@
1/*
2 * Copyright (C) 2013 Intel, Inc
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
17 *
18 * Author: Thomas Wood <thomas.wood@intel.com>
19 *
20 */
21
22#ifndef __CC_SHARING_PANEL_H__
23#define __CC_SHARING_PANEL_H__
24
25#include <shell/cc-shell.h>
26
27G_BEGIN_DECLS
28
29#define CC_TYPE_SHARING_PANEL cc_sharing_panel_get_type()
30
31#define CC_SHARING_PANEL(obj) \
32 (G_TYPE_CHECK_INSTANCE_CAST ((obj), \
33 CC_TYPE_SHARING_PANEL, CcSharingPanel))
34
35#define CC_SHARING_PANEL_CLASS(klass) \
36 (G_TYPE_CHECK_CLASS_CAST ((klass), \
37 CC_TYPE_SHARING_PANEL, CcSharingPanelClass))
38
39#define CC_SHARING_IS_PANEL(obj) \
40 (G_TYPE_CHECK_INSTANCE_TYPE ((obj), \
41 CC_TYPE_SHARING_PANEL))
42
43#define CC_SHARING_IS_PANEL_CLASS(klass) \
44 (G_TYPE_CHECK_CLASS_TYPE ((klass), \
45 CC_TYPE_SHARING_PANEL))
46
47#define CC_SHARING_PANEL_GET_CLASS(obj) \
48 (G_TYPE_INSTANCE_GET_CLASS ((obj), \
49 CC_TYPE_SHARING_PANEL, CcSharingPanelClass))
50
51typedef struct _CcSharingPanel CcSharingPanel;
52typedef struct _CcSharingPanelClass CcSharingPanelClass;
53typedef struct _CcSharingPanelPrivate CcSharingPanelPrivate;
54
55struct _CcSharingPanel
56{
57 CcPanel parent;
58
59 CcSharingPanelPrivate *priv;
60};
61
62struct _CcSharingPanelClass
63{
64 CcPanelClass parent_class;
65};
66
67GType cc_sharing_panel_get_type (void) G_GNUC_CONST;
68
69CcSharingPanel *cc_sharing_panel_new (void);
70
71void cc_sharing_panel_register (GIOModule *module);
72
73G_END_DECLS
74
75#endif /* __CC_SHARING_PANEL_H__ */
076
=== added file 'panels/sharing/cc-sharing-resources.c'
--- panels/sharing/cc-sharing-resources.c 1970-01-01 00:00:00 +0000
+++ panels/sharing/cc-sharing-resources.c 2018-11-21 12:36:03 +0000
@@ -0,0 +1,3781 @@
1#include <gio/gio.h>
2
3#if defined (__ELF__) && ( __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 6))
4# define SECTION __attribute__ ((section (".gresource.cc_sharing"), aligned (8)))
5#else
6# define SECTION
7#endif
8
9static const SECTION union { const guint8 data[28945]; const double alignment; void * const ptr;} cc_sharing_resource_data = { {
10 0x47, 0x56, 0x61, 0x72, 0x69, 0x61, 0x6e, 0x74,
11 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
12 0x18, 0x00, 0x00, 0x00, 0xe4, 0x00, 0x00, 0x00,
13 0x00, 0x00, 0x00, 0x28, 0x07, 0x00, 0x00, 0x00,
14 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
15 0x02, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
16 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
17 0x04, 0x00, 0x00, 0x00, 0xce, 0xd7, 0x2c, 0x8d,
18 0x04, 0x00, 0x00, 0x00, 0xe4, 0x00, 0x00, 0x00,
19 0x0f, 0x00, 0x4c, 0x00, 0xf4, 0x00, 0x00, 0x00,
20 0xf8, 0x00, 0x00, 0x00, 0x4b, 0x50, 0x90, 0x0b,
21 0x02, 0x00, 0x00, 0x00, 0xf8, 0x00, 0x00, 0x00,
22 0x04, 0x00, 0x4c, 0x00, 0xfc, 0x00, 0x00, 0x00,
23 0x00, 0x01, 0x00, 0x00, 0xd4, 0xb5, 0x02, 0x00,
24 0xff, 0xff, 0xff, 0xff, 0x00, 0x01, 0x00, 0x00,
25 0x01, 0x00, 0x4c, 0x00, 0x04, 0x01, 0x00, 0x00,
26 0x08, 0x01, 0x00, 0x00, 0xe9, 0xd8, 0x00, 0x8a,
27 0x00, 0x00, 0x00, 0x00, 0x08, 0x01, 0x00, 0x00,
28 0x08, 0x00, 0x4c, 0x00, 0x10, 0x01, 0x00, 0x00,
29 0x18, 0x01, 0x00, 0x00, 0xb0, 0xb7, 0x24, 0x30,
30 0x01, 0x00, 0x00, 0x00, 0x18, 0x01, 0x00, 0x00,
31 0x06, 0x00, 0x4c, 0x00, 0x20, 0x01, 0x00, 0x00,
32 0x24, 0x01, 0x00, 0x00, 0x41, 0x21, 0xeb, 0x90,
33 0x03, 0x00, 0x00, 0x00, 0x24, 0x01, 0x00, 0x00,
34 0x0a, 0x00, 0x76, 0x00, 0x30, 0x01, 0x00, 0x00,
35 0xf9, 0x6a, 0x00, 0x00, 0x52, 0xb2, 0x84, 0x21,
36 0x03, 0x00, 0x00, 0x00, 0xf9, 0x6a, 0x00, 0x00,
37 0x0b, 0x00, 0x76, 0x00, 0x08, 0x6b, 0x00, 0x00,
38 0x11, 0x71, 0x00, 0x00, 0x63, 0x6f, 0x6e, 0x74,
39 0x72, 0x6f, 0x6c, 0x2d, 0x63, 0x65, 0x6e, 0x74,
40 0x65, 0x72, 0x2f, 0x00, 0x03, 0x00, 0x00, 0x00,
41 0x6f, 0x72, 0x67, 0x2f, 0x04, 0x00, 0x00, 0x00,
42 0x2f, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
43 0x73, 0x68, 0x61, 0x72, 0x69, 0x6e, 0x67, 0x2f,
44 0x06, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00,
45 0x67, 0x6e, 0x6f, 0x6d, 0x65, 0x2f, 0x00, 0x00,
46 0x00, 0x00, 0x00, 0x00, 0x73, 0x68, 0x61, 0x72,
47 0x69, 0x6e, 0x67, 0x2e, 0x75, 0x69, 0x00, 0x00,
48 0xb9, 0x69, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
49 0x3c, 0x3f, 0x78, 0x6d, 0x6c, 0x20, 0x76, 0x65,
50 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x3d, 0x22, 0x31,
51 0x2e, 0x30, 0x22, 0x20, 0x65, 0x6e, 0x63, 0x6f,
52 0x64, 0x69, 0x6e, 0x67, 0x3d, 0x22, 0x55, 0x54,
53 0x46, 0x2d, 0x38, 0x22, 0x3f, 0x3e, 0x0a, 0x3c,
54 0x21, 0x2d, 0x2d, 0x20, 0x47, 0x65, 0x6e, 0x65,
55 0x72, 0x61, 0x74, 0x65, 0x64, 0x20, 0x77, 0x69,
56 0x74, 0x68, 0x20, 0x67, 0x6c, 0x61, 0x64, 0x65,
57 0x20, 0x33, 0x2e, 0x31, 0x38, 0x2e, 0x31, 0x20,
58 0x2d, 0x2d, 0x3e, 0x0a, 0x3c, 0x69, 0x6e, 0x74,
59 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x3e, 0x3c,
60 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x73,
61 0x20, 0x6c, 0x69, 0x62, 0x3d, 0x22, 0x67, 0x74,
62 0x6b, 0x2b, 0x22, 0x20, 0x76, 0x65, 0x72, 0x73,
63 0x69, 0x6f, 0x6e, 0x3d, 0x22, 0x33, 0x2e, 0x31,
64 0x30, 0x22, 0x2f, 0x3e, 0x3c, 0x6f, 0x62, 0x6a,
65 0x65, 0x63, 0x74, 0x20, 0x63, 0x6c, 0x61, 0x73,
66 0x73, 0x3d, 0x22, 0x47, 0x74, 0x6b, 0x42, 0x6f,
67 0x78, 0x22, 0x20, 0x69, 0x64, 0x3d, 0x22, 0x73,
68 0x68, 0x61, 0x72, 0x69, 0x6e, 0x67, 0x2d, 0x70,
69 0x61, 0x6e, 0x65, 0x6c, 0x22, 0x3e, 0x3c, 0x70,
70 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x20,
71 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x76, 0x69,
72 0x73, 0x69, 0x62, 0x6c, 0x65, 0x22, 0x3e, 0x54,
73 0x72, 0x75, 0x65, 0x3c, 0x2f, 0x70, 0x72, 0x6f,
74 0x70, 0x65, 0x72, 0x74, 0x79, 0x3e, 0x3c, 0x70,
75 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x20,
76 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x63, 0x61,
77 0x6e, 0x5f, 0x66, 0x6f, 0x63, 0x75, 0x73, 0x22,
78 0x3e, 0x46, 0x61, 0x6c, 0x73, 0x65, 0x3c, 0x2f,
79 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79,
80 0x3e, 0x3c, 0x21, 0x2d, 0x2d, 0x20, 0x53, 0x74,
81 0x75, 0x62, 0x20, 0x62, 0x6f, 0x78, 0x65, 0x73,
82 0x20, 0x74, 0x6f, 0x20, 0x6d, 0x61, 0x6b, 0x65,
83 0x20, 0x74, 0x68, 0x65, 0x20, 0x63, 0x6f, 0x6e,
84 0x74, 0x65, 0x6e, 0x74, 0x20, 0x63, 0x6f, 0x76,
85 0x65, 0x72, 0x20, 0x31, 0x2f, 0x33, 0x20, 0x6f,
86 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x73, 0x63,
87 0x72, 0x65, 0x65, 0x6e, 0x20, 0x2d, 0x2d, 0x3e,
88 0x3c, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x3e, 0x3c,
89 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x20, 0x63,
90 0x6c, 0x61, 0x73, 0x73, 0x3d, 0x22, 0x47, 0x74,
91 0x6b, 0x42, 0x6f, 0x78, 0x22, 0x3e, 0x3c, 0x70,
92 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x20,
93 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x76, 0x69,
94 0x73, 0x69, 0x62, 0x6c, 0x65, 0x22, 0x3e, 0x54,
95 0x72, 0x75, 0x65, 0x3c, 0x2f, 0x70, 0x72, 0x6f,
96 0x70, 0x65, 0x72, 0x74, 0x79, 0x3e, 0x3c, 0x70,
97 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x20,
98 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x63, 0x61,
99 0x6e, 0x5f, 0x66, 0x6f, 0x63, 0x75, 0x73, 0x22,
100 0x3e, 0x46, 0x61, 0x6c, 0x73, 0x65, 0x3c, 0x2f,
101 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79,
102 0x3e, 0x3c, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72,
103 0x74, 0x79, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d,
104 0x22, 0x68, 0x65, 0x78, 0x70, 0x61, 0x6e, 0x64,
105 0x22, 0x3e, 0x54, 0x72, 0x75, 0x65, 0x3c, 0x2f,
106 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79,
107 0x3e, 0x3c, 0x2f, 0x6f, 0x62, 0x6a, 0x65, 0x63,
108 0x74, 0x3e, 0x3c, 0x2f, 0x63, 0x68, 0x69, 0x6c,
109 0x64, 0x3e, 0x3c, 0x63, 0x68, 0x69, 0x6c, 0x64,
110 0x3e, 0x3c, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74,
111 0x20, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x3d, 0x22,
112 0x47, 0x74, 0x6b, 0x42, 0x6f, 0x78, 0x22, 0x3e,
113 0x3c, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74,
114 0x79, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22,
115 0x76, 0x69, 0x73, 0x69, 0x62, 0x6c, 0x65, 0x22,
116 0x3e, 0x54, 0x72, 0x75, 0x65, 0x3c, 0x2f, 0x70,
117 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x3e,
118 0x3c, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74,
119 0x79, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22,
120 0x63, 0x61, 0x6e, 0x5f, 0x66, 0x6f, 0x63, 0x75,
121 0x73, 0x22, 0x3e, 0x46, 0x61, 0x6c, 0x73, 0x65,
122 0x3c, 0x2f, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72,
123 0x74, 0x79, 0x3e, 0x3c, 0x70, 0x72, 0x6f, 0x70,
124 0x65, 0x72, 0x74, 0x79, 0x20, 0x6e, 0x61, 0x6d,
125 0x65, 0x3d, 0x22, 0x68, 0x65, 0x78, 0x70, 0x61,
126 0x6e, 0x64, 0x22, 0x3e, 0x54, 0x72, 0x75, 0x65,
127 0x3c, 0x2f, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72,
128 0x74, 0x79, 0x3e, 0x3c, 0x2f, 0x6f, 0x62, 0x6a,
129 0x65, 0x63, 0x74, 0x3e, 0x3c, 0x70, 0x61, 0x63,
130 0x6b, 0x69, 0x6e, 0x67, 0x3e, 0x3c, 0x70, 0x72,
131 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x20, 0x6e,
132 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x70, 0x61, 0x63,
133 0x6b, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x22, 0x3e,
134 0x65, 0x6e, 0x64, 0x3c, 0x2f, 0x70, 0x72, 0x6f,
135 0x70, 0x65, 0x72, 0x74, 0x79, 0x3e, 0x3c, 0x2f,
136 0x70, 0x61, 0x63, 0x6b, 0x69, 0x6e, 0x67, 0x3e,
137 0x3c, 0x2f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x3e,
138 0x3c, 0x21, 0x2d, 0x2d, 0x20, 0x43, 0x6f, 0x6e,
139 0x74, 0x65, 0x6e, 0x74, 0x20, 0x2d, 0x2d, 0x3e,
140 0x3c, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x3e, 0x3c,
141 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x20, 0x63,
142 0x6c, 0x61, 0x73, 0x73, 0x3d, 0x22, 0x47, 0x74,
143 0x6b, 0x42, 0x6f, 0x78, 0x22, 0x3e, 0x3c, 0x70,
144 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x20,
145 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x76, 0x69,
146 0x73, 0x69, 0x62, 0x6c, 0x65, 0x22, 0x3e, 0x54,
147 0x72, 0x75, 0x65, 0x3c, 0x2f, 0x70, 0x72, 0x6f,
148 0x70, 0x65, 0x72, 0x74, 0x79, 0x3e, 0x3c, 0x70,
149 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x20,
150 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x63, 0x61,
151 0x6e, 0x5f, 0x66, 0x6f, 0x63, 0x75, 0x73, 0x22,
152 0x3e, 0x46, 0x61, 0x6c, 0x73, 0x65, 0x3c, 0x2f,
153 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79,
154 0x3e, 0x3c, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72,
155 0x74, 0x79, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d,
156 0x22, 0x6d, 0x61, 0x72, 0x67, 0x69, 0x6e, 0x5f,
157 0x74, 0x6f, 0x70, 0x22, 0x3e, 0x33, 0x32, 0x3c,
158 0x2f, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74,
159 0x79, 0x3e, 0x3c, 0x70, 0x72, 0x6f, 0x70, 0x65,
160 0x72, 0x74, 0x79, 0x20, 0x6e, 0x61, 0x6d, 0x65,
161 0x3d, 0x22, 0x6d, 0x61, 0x72, 0x67, 0x69, 0x6e,
162 0x5f, 0x62, 0x6f, 0x74, 0x74, 0x6f, 0x6d, 0x22,
163 0x3e, 0x33, 0x32, 0x3c, 0x2f, 0x70, 0x72, 0x6f,
164 0x70, 0x65, 0x72, 0x74, 0x79, 0x3e, 0x3c, 0x70,
165 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x20,
166 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x6d, 0x61,
167 0x72, 0x67, 0x69, 0x6e, 0x5f, 0x6c, 0x65, 0x66,
168 0x74, 0x22, 0x3e, 0x32, 0x34, 0x3c, 0x2f, 0x70,
169 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x3e,
170 0x3c, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74,
171 0x79, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22,
172 0x6d, 0x61, 0x72, 0x67, 0x69, 0x6e, 0x5f, 0x72,
173 0x69, 0x67, 0x68, 0x74, 0x22, 0x3e, 0x32, 0x34,
174 0x3c, 0x2f, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72,
175 0x74, 0x79, 0x3e, 0x3c, 0x70, 0x72, 0x6f, 0x70,
176 0x65, 0x72, 0x74, 0x79, 0x20, 0x6e, 0x61, 0x6d,
177 0x65, 0x3d, 0x22, 0x68, 0x65, 0x78, 0x70, 0x61,
178 0x6e, 0x64, 0x22, 0x3e, 0x54, 0x72, 0x75, 0x65,
179 0x3c, 0x2f, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72,
180 0x74, 0x79, 0x3e, 0x3c, 0x70, 0x72, 0x6f, 0x70,
181 0x65, 0x72, 0x74, 0x79, 0x20, 0x6e, 0x61, 0x6d,
182 0x65, 0x3d, 0x22, 0x6f, 0x72, 0x69, 0x65, 0x6e,
183 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x3e,
184 0x76, 0x65, 0x72, 0x74, 0x69, 0x63, 0x61, 0x6c,
185 0x3c, 0x2f, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72,
186 0x74, 0x79, 0x3e, 0x3c, 0x63, 0x68, 0x69, 0x6c,
187 0x64, 0x3e, 0x3c, 0x6f, 0x62, 0x6a, 0x65, 0x63,
188 0x74, 0x20, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x3d,
189 0x22, 0x47, 0x74, 0x6b, 0x4c, 0x61, 0x62, 0x65,
190 0x6c, 0x22, 0x20, 0x69, 0x64, 0x3d, 0x22, 0x6c,
191 0x61, 0x62, 0x65, 0x6c, 0x36, 0x22, 0x3e, 0x3c,
192 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79,
193 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x76,
194 0x69, 0x73, 0x69, 0x62, 0x6c, 0x65, 0x22, 0x3e,
195 0x54, 0x72, 0x75, 0x65, 0x3c, 0x2f, 0x70, 0x72,
196 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x3e, 0x3c,
197 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79,
198 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x63,
199 0x61, 0x6e, 0x5f, 0x66, 0x6f, 0x63, 0x75, 0x73,
200 0x22, 0x3e, 0x46, 0x61, 0x6c, 0x73, 0x65, 0x3c,
201 0x2f, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74,
202 0x79, 0x3e, 0x3c, 0x70, 0x72, 0x6f, 0x70, 0x65,
203 0x72, 0x74, 0x79, 0x20, 0x6e, 0x61, 0x6d, 0x65,
204 0x3d, 0x22, 0x6d, 0x61, 0x72, 0x67, 0x69, 0x6e,
205 0x5f, 0x62, 0x6f, 0x74, 0x74, 0x6f, 0x6d, 0x22,
206 0x3e, 0x31, 0x32, 0x3c, 0x2f, 0x70, 0x72, 0x6f,
207 0x70, 0x65, 0x72, 0x74, 0x79, 0x3e, 0x3c, 0x70,
208 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x20,
209 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x78, 0x61,
210 0x6c, 0x69, 0x67, 0x6e, 0x22, 0x3e, 0x30, 0x3c,
211 0x2f, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74,
212 0x79, 0x3e, 0x3c, 0x70, 0x72, 0x6f, 0x70, 0x65,
213 0x72, 0x74, 0x79, 0x20, 0x6e, 0x61, 0x6d, 0x65,
214 0x3d, 0x22, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x22,
215 0x20, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x6c, 0x61,
216 0x74, 0x61, 0x62, 0x6c, 0x65, 0x3d, 0x22, 0x79,
217 0x65, 0x73, 0x22, 0x3e, 0x5f, 0x43, 0x6f, 0x6d,
218 0x70, 0x75, 0x74, 0x65, 0x72, 0x20, 0x4e, 0x61,
219 0x6d, 0x65, 0x3c, 0x2f, 0x70, 0x72, 0x6f, 0x70,
220 0x65, 0x72, 0x74, 0x79, 0x3e, 0x3c, 0x70, 0x72,
221 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x20, 0x6e,
222 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x75, 0x73, 0x65,
223 0x5f, 0x75, 0x6e, 0x64, 0x65, 0x72, 0x6c, 0x69,
224 0x6e, 0x65, 0x22, 0x3e, 0x54, 0x72, 0x75, 0x65,
225 0x3c, 0x2f, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72,
226 0x74, 0x79, 0x3e, 0x3c, 0x70, 0x72, 0x6f, 0x70,
227 0x65, 0x72, 0x74, 0x79, 0x20, 0x6e, 0x61, 0x6d,
228 0x65, 0x3d, 0x22, 0x6d, 0x6e, 0x65, 0x6d, 0x6f,
229 0x6e, 0x69, 0x63, 0x5f, 0x77, 0x69, 0x64, 0x67,
230 0x65, 0x74, 0x22, 0x3e, 0x68, 0x6f, 0x73, 0x74,
231 0x6e, 0x61, 0x6d, 0x65, 0x2d, 0x65, 0x6e, 0x74,
232 0x72, 0x79, 0x3c, 0x2f, 0x70, 0x72, 0x6f, 0x70,
233 0x65, 0x72, 0x74, 0x79, 0x3e, 0x3c, 0x61, 0x63,
234 0x63, 0x65, 0x73, 0x73, 0x69, 0x62, 0x69, 0x6c,
235 0x69, 0x74, 0x79, 0x3e, 0x3c, 0x72, 0x65, 0x6c,
236 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x74, 0x79,
237 0x70, 0x65, 0x3d, 0x22, 0x6c, 0x61, 0x62, 0x65,
238 0x6c, 0x2d, 0x66, 0x6f, 0x72, 0x22, 0x20, 0x74,
239 0x61, 0x72, 0x67, 0x65, 0x74, 0x3d, 0x22, 0x68,
240 0x6f, 0x73, 0x74, 0x6e, 0x61, 0x6d, 0x65, 0x2d,
241 0x65, 0x6e, 0x74, 0x72, 0x79, 0x22, 0x2f, 0x3e,
242 0x3c, 0x2f, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73,
243 0x69, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x3e,
244 0x3c, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75,
245 0x74, 0x65, 0x73, 0x3e, 0x3c, 0x61, 0x74, 0x74,
246 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x20, 0x6e,
247 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x77, 0x65, 0x69,
248 0x67, 0x68, 0x74, 0x22, 0x20, 0x76, 0x61, 0x6c,
249 0x75, 0x65, 0x3d, 0x22, 0x62, 0x6f, 0x6c, 0x64,
250 0x22, 0x2f, 0x3e, 0x3c, 0x2f, 0x61, 0x74, 0x74,
251 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x3e,
252 0x3c, 0x2f, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74,
253 0x3e, 0x3c, 0x70, 0x61, 0x63, 0x6b, 0x69, 0x6e,
254 0x67, 0x3e, 0x3c, 0x70, 0x72, 0x6f, 0x70, 0x65,
255 0x72, 0x74, 0x79, 0x20, 0x6e, 0x61, 0x6d, 0x65,
256 0x3d, 0x22, 0x65, 0x78, 0x70, 0x61, 0x6e, 0x64,
257 0x22, 0x3e, 0x46, 0x61, 0x6c, 0x73, 0x65, 0x3c,
258 0x2f, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74,
259 0x79, 0x3e, 0x3c, 0x70, 0x72, 0x6f, 0x70, 0x65,
260 0x72, 0x74, 0x79, 0x20, 0x6e, 0x61, 0x6d, 0x65,
261 0x3d, 0x22, 0x66, 0x69, 0x6c, 0x6c, 0x22, 0x3e,
262 0x54, 0x72, 0x75, 0x65, 0x3c, 0x2f, 0x70, 0x72,
263 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x3e, 0x3c,
264 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79,
265 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x70,
266 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x22,
267 0x3e, 0x30, 0x3c, 0x2f, 0x70, 0x72, 0x6f, 0x70,
268 0x65, 0x72, 0x74, 0x79, 0x3e, 0x3c, 0x2f, 0x70,
269 0x61, 0x63, 0x6b, 0x69, 0x6e, 0x67, 0x3e, 0x3c,
270 0x2f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x3e, 0x3c,
271 0x63, 0x68, 0x69, 0x6c, 0x64, 0x3e, 0x3c, 0x6f,
272 0x62, 0x6a, 0x65, 0x63, 0x74, 0x20, 0x63, 0x6c,
273 0x61, 0x73, 0x73, 0x3d, 0x22, 0x43, 0x63, 0x48,
274 0x6f, 0x73, 0x74, 0x6e, 0x61, 0x6d, 0x65, 0x45,
275 0x6e, 0x74, 0x72, 0x79, 0x22, 0x20, 0x69, 0x64,
276 0x3d, 0x22, 0x68, 0x6f, 0x73, 0x74, 0x6e, 0x61,
277 0x6d, 0x65, 0x2d, 0x65, 0x6e, 0x74, 0x72, 0x79,
278 0x22, 0x3e, 0x3c, 0x70, 0x72, 0x6f, 0x70, 0x65,
279 0x72, 0x74, 0x79, 0x20, 0x6e, 0x61, 0x6d, 0x65,
280 0x3d, 0x22, 0x76, 0x69, 0x73, 0x69, 0x62, 0x6c,
281 0x65, 0x22, 0x3e, 0x54, 0x72, 0x75, 0x65, 0x3c,
282 0x2f, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74,
283 0x79, 0x3e, 0x3c, 0x70, 0x72, 0x6f, 0x70, 0x65,
284 0x72, 0x74, 0x79, 0x20, 0x6e, 0x61, 0x6d, 0x65,
285 0x3d, 0x22, 0x63, 0x61, 0x6e, 0x5f, 0x66, 0x6f,
286 0x63, 0x75, 0x73, 0x22, 0x3e, 0x54, 0x72, 0x75,
287 0x65, 0x3c, 0x2f, 0x70, 0x72, 0x6f, 0x70, 0x65,
288 0x72, 0x74, 0x79, 0x3e, 0x3c, 0x70, 0x72, 0x6f,
289 0x70, 0x65, 0x72, 0x74, 0x79, 0x20, 0x6e, 0x61,
290 0x6d, 0x65, 0x3d, 0x22, 0x6d, 0x61, 0x72, 0x67,
291 0x69, 0x6e, 0x5f, 0x62, 0x6f, 0x74, 0x74, 0x6f,
292 0x6d, 0x22, 0x3e, 0x33, 0x32, 0x3c, 0x2f, 0x70,
293 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x3e,
294 0x3c, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74,
295 0x79, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22,
296 0x69, 0x6e, 0x76, 0x69, 0x73, 0x69, 0x62, 0x6c,
297 0x65, 0x5f, 0x63, 0x68, 0x61, 0x72, 0x22, 0x3e,
298 0xe2, 0x97, 0x8f, 0x3c, 0x2f, 0x70, 0x72, 0x6f,
299 0x70, 0x65, 0x72, 0x74, 0x79, 0x3e, 0x3c, 0x61,
300 0x63, 0x63, 0x65, 0x73, 0x73, 0x69, 0x62, 0x69,
301 0x6c, 0x69, 0x74, 0x79, 0x3e, 0x3c, 0x72, 0x65,
302 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x74,
303 0x79, 0x70, 0x65, 0x3d, 0x22, 0x6c, 0x61, 0x62,
304 0x65, 0x6c, 0x6c, 0x65, 0x64, 0x2d, 0x62, 0x79,
305 0x22, 0x20, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74,
306 0x3d, 0x22, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x36,
307 0x22, 0x2f, 0x3e, 0x3c, 0x2f, 0x61, 0x63, 0x63,
308 0x65, 0x73, 0x73, 0x69, 0x62, 0x69, 0x6c, 0x69,
309 0x74, 0x79, 0x3e, 0x3c, 0x2f, 0x6f, 0x62, 0x6a,
310 0x65, 0x63, 0x74, 0x3e, 0x3c, 0x70, 0x61, 0x63,
311 0x6b, 0x69, 0x6e, 0x67, 0x3e, 0x3c, 0x70, 0x72,
312 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x20, 0x6e,
313 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x65, 0x78, 0x70,
314 0x61, 0x6e, 0x64, 0x22, 0x3e, 0x46, 0x61, 0x6c,
315 0x73, 0x65, 0x3c, 0x2f, 0x70, 0x72, 0x6f, 0x70,
316 0x65, 0x72, 0x74, 0x79, 0x3e, 0x3c, 0x70, 0x72,
317 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x20, 0x6e,
318 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x66, 0x69, 0x6c,
319 0x6c, 0x22, 0x3e, 0x54, 0x72, 0x75, 0x65, 0x3c,
320 0x2f, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74,
321 0x79, 0x3e, 0x3c, 0x70, 0x72, 0x6f, 0x70, 0x65,
322 0x72, 0x74, 0x79, 0x20, 0x6e, 0x61, 0x6d, 0x65,
323 0x3d, 0x22, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69,
324 0x6f, 0x6e, 0x22, 0x3e, 0x31, 0x3c, 0x2f, 0x70,
325 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x3e,
326 0x3c, 0x2f, 0x70, 0x61, 0x63, 0x6b, 0x69, 0x6e,
327 0x67, 0x3e, 0x3c, 0x2f, 0x63, 0x68, 0x69, 0x6c,
328 0x64, 0x3e, 0x3c, 0x63, 0x68, 0x69, 0x6c, 0x64,
329 0x3e, 0x3c, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74,
330 0x20, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x3d, 0x22,
331 0x47, 0x74, 0x6b, 0x46, 0x72, 0x61, 0x6d, 0x65,
332 0x22, 0x20, 0x69, 0x64, 0x3d, 0x22, 0x66, 0x72,
333 0x61, 0x6d, 0x65, 0x31, 0x22, 0x3e, 0x3c, 0x70,
334 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x20,
335 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x76, 0x69,
336 0x73, 0x69, 0x62, 0x6c, 0x65, 0x22, 0x3e, 0x54,
337 0x72, 0x75, 0x65, 0x3c, 0x2f, 0x70, 0x72, 0x6f,
338 0x70, 0x65, 0x72, 0x74, 0x79, 0x3e, 0x3c, 0x70,
339 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x20,
340 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x63, 0x61,
341 0x6e, 0x5f, 0x66, 0x6f, 0x63, 0x75, 0x73, 0x22,
342 0x3e, 0x46, 0x61, 0x6c, 0x73, 0x65, 0x3c, 0x2f,
343 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79,
344 0x3e, 0x3c, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72,
345 0x74, 0x79, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d,
346 0x22, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x5f, 0x78,
347 0x61, 0x6c, 0x69, 0x67, 0x6e, 0x22, 0x3e, 0x30,
348 0x3c, 0x2f, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72,
349 0x74, 0x79, 0x3e, 0x3c, 0x70, 0x72, 0x6f, 0x70,
350 0x65, 0x72, 0x74, 0x79, 0x20, 0x6e, 0x61, 0x6d,
351 0x65, 0x3d, 0x22, 0x73, 0x68, 0x61, 0x64, 0x6f,
352 0x77, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x22, 0x3e,
353 0x69, 0x6e, 0x3c, 0x2f, 0x70, 0x72, 0x6f, 0x70,
354 0x65, 0x72, 0x74, 0x79, 0x3e, 0x3c, 0x63, 0x68,
355 0x69, 0x6c, 0x64, 0x3e, 0x3c, 0x6f, 0x62, 0x6a,
356 0x65, 0x63, 0x74, 0x20, 0x63, 0x6c, 0x61, 0x73,
357 0x73, 0x3d, 0x22, 0x47, 0x74, 0x6b, 0x4c, 0x69,
358 0x73, 0x74, 0x42, 0x6f, 0x78, 0x22, 0x20, 0x69,
359 0x64, 0x3d, 0x22, 0x6d, 0x61, 0x69, 0x6e, 0x2d,
360 0x6c, 0x69, 0x73, 0x74, 0x2d, 0x62, 0x6f, 0x78,
361 0x22, 0x3e, 0x3c, 0x70, 0x72, 0x6f, 0x70, 0x65,
362 0x72, 0x74, 0x79, 0x20, 0x6e, 0x61, 0x6d, 0x65,
363 0x3d, 0x22, 0x76, 0x69, 0x73, 0x69, 0x62, 0x6c,
364 0x65, 0x22, 0x3e, 0x54, 0x72, 0x75, 0x65, 0x3c,
365 0x2f, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74,
366 0x79, 0x3e, 0x3c, 0x63, 0x68, 0x69, 0x6c, 0x64,
367 0x3e, 0x3c, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74,
368 0x20, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x3d, 0x22,
369 0x47, 0x74, 0x6b, 0x4c, 0x69, 0x73, 0x74, 0x42,
370 0x6f, 0x78, 0x52, 0x6f, 0x77, 0x22, 0x20, 0x69,
371 0x64, 0x3d, 0x22, 0x70, 0x65, 0x72, 0x73, 0x6f,
372 0x6e, 0x61, 0x6c, 0x2d, 0x66, 0x69, 0x6c, 0x65,
373 0x2d, 0x73, 0x68, 0x61, 0x72, 0x69, 0x6e, 0x67,
374 0x2d, 0x62, 0x75, 0x74, 0x74, 0x6f, 0x6e, 0x22,
375 0x3e, 0x3c, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72,
376 0x74, 0x79, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d,
377 0x22, 0x76, 0x69, 0x73, 0x69, 0x62, 0x6c, 0x65,
378 0x22, 0x3e, 0x54, 0x72, 0x75, 0x65, 0x3c, 0x2f,
379 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79,
380 0x3e, 0x3c, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x3e,
381 0x3c, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x20,
382 0x63, 0x6c, 0x61, 0x73, 0x73, 0x3d, 0x22, 0x47,
383 0x74, 0x6b, 0x42, 0x6f, 0x78, 0x22, 0x20, 0x69,
384 0x64, 0x3d, 0x22, 0x62, 0x6f, 0x78, 0x32, 0x22,
385 0x3e, 0x3c, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72,
386 0x74, 0x79, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d,
387 0x22, 0x6d, 0x61, 0x72, 0x67, 0x69, 0x6e, 0x5f,
388 0x74, 0x6f, 0x70, 0x22, 0x3e, 0x31, 0x38, 0x3c,
389 0x2f, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74,
390 0x79, 0x3e, 0x3c, 0x70, 0x72, 0x6f, 0x70, 0x65,
391 0x72, 0x74, 0x79, 0x20, 0x6e, 0x61, 0x6d, 0x65,
392 0x3d, 0x22, 0x6d, 0x61, 0x72, 0x67, 0x69, 0x6e,
393 0x5f, 0x62, 0x6f, 0x74, 0x74, 0x6f, 0x6d, 0x22,
394 0x3e, 0x31, 0x38, 0x3c, 0x2f, 0x70, 0x72, 0x6f,
395 0x70, 0x65, 0x72, 0x74, 0x79, 0x3e, 0x3c, 0x70,
396 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x20,
397 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x6d, 0x61,
398 0x72, 0x67, 0x69, 0x6e, 0x5f, 0x6c, 0x65, 0x66,
399 0x74, 0x22, 0x3e, 0x31, 0x32, 0x3c, 0x2f, 0x70,
400 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x3e,
401 0x3c, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74,
402 0x79, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22,
403 0x6d, 0x61, 0x72, 0x67, 0x69, 0x6e, 0x5f, 0x72,
404 0x69, 0x67, 0x68, 0x74, 0x22, 0x3e, 0x31, 0x32,
405 0x3c, 0x2f, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72,
406 0x74, 0x79, 0x3e, 0x3c, 0x70, 0x72, 0x6f, 0x70,
407 0x65, 0x72, 0x74, 0x79, 0x20, 0x6e, 0x61, 0x6d,
408 0x65, 0x3d, 0x22, 0x76, 0x69, 0x73, 0x69, 0x62,
409 0x6c, 0x65, 0x22, 0x3e, 0x54, 0x72, 0x75, 0x65,
410 0x3c, 0x2f, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72,
411 0x74, 0x79, 0x3e, 0x3c, 0x70, 0x72, 0x6f, 0x70,
412 0x65, 0x72, 0x74, 0x79, 0x20, 0x6e, 0x61, 0x6d,
413 0x65, 0x3d, 0x22, 0x63, 0x61, 0x6e, 0x5f, 0x66,
414 0x6f, 0x63, 0x75, 0x73, 0x22, 0x3e, 0x46, 0x61,
415 0x6c, 0x73, 0x65, 0x3c, 0x2f, 0x70, 0x72, 0x6f,
416 0x70, 0x65, 0x72, 0x74, 0x79, 0x3e, 0x3c, 0x63,
417 0x68, 0x69, 0x6c, 0x64, 0x3e, 0x3c, 0x6f, 0x62,
418 0x6a, 0x65, 0x63, 0x74, 0x20, 0x63, 0x6c, 0x61,
419 0x73, 0x73, 0x3d, 0x22, 0x47, 0x74, 0x6b, 0x4c,
420 0x61, 0x62, 0x65, 0x6c, 0x22, 0x20, 0x69, 0x64,
421 0x3d, 0x22, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x38,
422 0x22, 0x3e, 0x3c, 0x70, 0x72, 0x6f, 0x70, 0x65,
423 0x72, 0x74, 0x79, 0x20, 0x6e, 0x61, 0x6d, 0x65,
424 0x3d, 0x22, 0x76, 0x69, 0x73, 0x69, 0x62, 0x6c,
425 0x65, 0x22, 0x3e, 0x54, 0x72, 0x75, 0x65, 0x3c,
426 0x2f, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74,
427 0x79, 0x3e, 0x3c, 0x70, 0x72, 0x6f, 0x70, 0x65,
428 0x72, 0x74, 0x79, 0x20, 0x6e, 0x61, 0x6d, 0x65,
429 0x3d, 0x22, 0x63, 0x61, 0x6e, 0x5f, 0x66, 0x6f,
430 0x63, 0x75, 0x73, 0x22, 0x3e, 0x46, 0x61, 0x6c,
431 0x73, 0x65, 0x3c, 0x2f, 0x70, 0x72, 0x6f, 0x70,
432 0x65, 0x72, 0x74, 0x79, 0x3e, 0x3c, 0x70, 0x72,
433 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x20, 0x6e,
434 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x68, 0x61, 0x6c,
435 0x69, 0x67, 0x6e, 0x22, 0x3e, 0x73, 0x74, 0x61,
436 0x72, 0x74, 0x3c, 0x2f, 0x70, 0x72, 0x6f, 0x70,
437 0x65, 0x72, 0x74, 0x79, 0x3e, 0x3c, 0x70, 0x72,
438 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x20, 0x6e,
439 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x68, 0x65, 0x78,
440 0x70, 0x61, 0x6e, 0x64, 0x22, 0x3e, 0x54, 0x72,
441 0x75, 0x65, 0x3c, 0x2f, 0x70, 0x72, 0x6f, 0x70,
442 0x65, 0x72, 0x74, 0x79, 0x3e, 0x3c, 0x70, 0x72,
443 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x20, 0x74,
444 0x72, 0x61, 0x6e, 0x73, 0x6c, 0x61, 0x74, 0x61,
445 0x62, 0x6c, 0x65, 0x3d, 0x22, 0x79, 0x65, 0x73,
446 0x22, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22,
447 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x22, 0x3e, 0x5f,
448 0x46, 0x69, 0x6c, 0x65, 0x20, 0x53, 0x68, 0x61,
449 0x72, 0x69, 0x6e, 0x67, 0x3c, 0x2f, 0x70, 0x72,
450 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x3e, 0x3c,
451 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79,
452 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x75,
453 0x73, 0x65, 0x5f, 0x75, 0x6e, 0x64, 0x65, 0x72,
454 0x6c, 0x69, 0x6e, 0x65, 0x22, 0x3e, 0x54, 0x72,
455 0x75, 0x65, 0x3c, 0x2f, 0x70, 0x72, 0x6f, 0x70,
456 0x65, 0x72, 0x74, 0x79, 0x3e, 0x3c, 0x70, 0x72,
457 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x20, 0x6e,
458 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x6d, 0x6e, 0x65,
459 0x6d, 0x6f, 0x6e, 0x69, 0x63, 0x5f, 0x77, 0x69,
460 0x64, 0x67, 0x65, 0x74, 0x22, 0x3e, 0x70, 0x65,
461 0x72, 0x73, 0x6f, 0x6e, 0x61, 0x6c, 0x2d, 0x66,
462 0x69, 0x6c, 0x65, 0x2d, 0x73, 0x68, 0x61, 0x72,
463 0x69, 0x6e, 0x67, 0x2d, 0x62, 0x75, 0x74, 0x74,
464 0x6f, 0x6e, 0x3c, 0x2f, 0x70, 0x72, 0x6f, 0x70,
465 0x65, 0x72, 0x74, 0x79, 0x3e, 0x3c, 0x2f, 0x6f,
466 0x62, 0x6a, 0x65, 0x63, 0x74, 0x3e, 0x3c, 0x70,
467 0x61, 0x63, 0x6b, 0x69, 0x6e, 0x67, 0x3e, 0x3c,
468 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79,
469 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x65,
470 0x78, 0x70, 0x61, 0x6e, 0x64, 0x22, 0x3e, 0x46,
471 0x61, 0x6c, 0x73, 0x65, 0x3c, 0x2f, 0x70, 0x72,
472 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x3e, 0x3c,
473 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79,
474 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x66,
475 0x69, 0x6c, 0x6c, 0x22, 0x3e, 0x54, 0x72, 0x75,
476 0x65, 0x3c, 0x2f, 0x70, 0x72, 0x6f, 0x70, 0x65,
477 0x72, 0x74, 0x79, 0x3e, 0x3c, 0x70, 0x72, 0x6f,
478 0x70, 0x65, 0x72, 0x74, 0x79, 0x20, 0x6e, 0x61,
479 0x6d, 0x65, 0x3d, 0x22, 0x70, 0x6f, 0x73, 0x69,
480 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x3e, 0x30, 0x3c,
481 0x2f, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74,
482 0x79, 0x3e, 0x3c, 0x2f, 0x70, 0x61, 0x63, 0x6b,
483 0x69, 0x6e, 0x67, 0x3e, 0x3c, 0x2f, 0x63, 0x68,
484 0x69, 0x6c, 0x64, 0x3e, 0x3c, 0x63, 0x68, 0x69,
485 0x6c, 0x64, 0x3e, 0x3c, 0x6f, 0x62, 0x6a, 0x65,
486 0x63, 0x74, 0x20, 0x63, 0x6c, 0x61, 0x73, 0x73,
487 0x3d, 0x22, 0x47, 0x74, 0x6b, 0x4c, 0x61, 0x62,
488 0x65, 0x6c, 0x22, 0x20, 0x69, 0x64, 0x3d, 0x22,
489 0x70, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x61, 0x6c,
490 0x2d, 0x66, 0x69, 0x6c, 0x65, 0x2d, 0x73, 0x68,
491 0x61, 0x72, 0x69, 0x6e, 0x67, 0x2d, 0x73, 0x74,
492 0x61, 0x74, 0x75, 0x73, 0x2d, 0x6c, 0x61, 0x62,
493 0x65, 0x6c, 0x22, 0x3e, 0x3c, 0x70, 0x72, 0x6f,
494 0x70, 0x65, 0x72, 0x74, 0x79, 0x20, 0x6e, 0x61,
495 0x6d, 0x65, 0x3d, 0x22, 0x76, 0x69, 0x73, 0x69,
496 0x62, 0x6c, 0x65, 0x22, 0x3e, 0x54, 0x72, 0x75,
497 0x65, 0x3c, 0x2f, 0x70, 0x72, 0x6f, 0x70, 0x65,
498 0x72, 0x74, 0x79, 0x3e, 0x3c, 0x70, 0x72, 0x6f,
499 0x70, 0x65, 0x72, 0x74, 0x79, 0x20, 0x6e, 0x61,
500 0x6d, 0x65, 0x3d, 0x22, 0x63, 0x61, 0x6e, 0x5f,
501 0x66, 0x6f, 0x63, 0x75, 0x73, 0x22, 0x3e, 0x46,
502 0x61, 0x6c, 0x73, 0x65, 0x3c, 0x2f, 0x70, 0x72,
503 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x3e, 0x3c,
504 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79,
505 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x6c,
506 0x61, 0x62, 0x65, 0x6c, 0x22, 0x3e, 0x4f, 0x66,
507 0x66, 0x3c, 0x2f, 0x70, 0x72, 0x6f, 0x70, 0x65,
508 0x72, 0x74, 0x79, 0x3e, 0x3c, 0x2f, 0x6f, 0x62,
509 0x6a, 0x65, 0x63, 0x74, 0x3e, 0x3c, 0x70, 0x61,
510 0x63, 0x6b, 0x69, 0x6e, 0x67, 0x3e, 0x3c, 0x70,
511 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x20,
512 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x65, 0x78,
513 0x70, 0x61, 0x6e, 0x64, 0x22, 0x3e, 0x46, 0x61,
514 0x6c, 0x73, 0x65, 0x3c, 0x2f, 0x70, 0x72, 0x6f,
515 0x70, 0x65, 0x72, 0x74, 0x79, 0x3e, 0x3c, 0x70,
516 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x20,
517 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x66, 0x69,
518 0x6c, 0x6c, 0x22, 0x3e, 0x54, 0x72, 0x75, 0x65,
519 0x3c, 0x2f, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72,
520 0x74, 0x79, 0x3e, 0x3c, 0x70, 0x72, 0x6f, 0x70,
521 0x65, 0x72, 0x74, 0x79, 0x20, 0x6e, 0x61, 0x6d,
522 0x65, 0x3d, 0x22, 0x70, 0x6f, 0x73, 0x69, 0x74,
523 0x69, 0x6f, 0x6e, 0x22, 0x3e, 0x31, 0x3c, 0x2f,
524 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79,
525 0x3e, 0x3c, 0x2f, 0x70, 0x61, 0x63, 0x6b, 0x69,
526 0x6e, 0x67, 0x3e, 0x3c, 0x2f, 0x63, 0x68, 0x69,
527 0x6c, 0x64, 0x3e, 0x3c, 0x2f, 0x6f, 0x62, 0x6a,
528 0x65, 0x63, 0x74, 0x3e, 0x3c, 0x2f, 0x63, 0x68,
529 0x69, 0x6c, 0x64, 0x3e, 0x3c, 0x2f, 0x6f, 0x62,
530 0x6a, 0x65, 0x63, 0x74, 0x3e, 0x3c, 0x2f, 0x63,
531 0x68, 0x69, 0x6c, 0x64, 0x3e, 0x3c, 0x63, 0x68,
532 0x69, 0x6c, 0x64, 0x3e, 0x3c, 0x6f, 0x62, 0x6a,
533 0x65, 0x63, 0x74, 0x20, 0x63, 0x6c, 0x61, 0x73,
534 0x73, 0x3d, 0x22, 0x47, 0x74, 0x6b, 0x4c, 0x69,
535 0x73, 0x74, 0x42, 0x6f, 0x78, 0x52, 0x6f, 0x77,
536 0x22, 0x20, 0x69, 0x64, 0x3d, 0x22, 0x73, 0x63,
537 0x72, 0x65, 0x65, 0x6e, 0x2d, 0x73, 0x68, 0x61,
538 0x72, 0x69, 0x6e, 0x67, 0x2d, 0x62, 0x75, 0x74,
539 0x74, 0x6f, 0x6e, 0x22, 0x3e, 0x3c, 0x70, 0x72,
540 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x20, 0x6e,
541 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x76, 0x69, 0x73,
542 0x69, 0x62, 0x6c, 0x65, 0x22, 0x3e, 0x54, 0x72,
543 0x75, 0x65, 0x3c, 0x2f, 0x70, 0x72, 0x6f, 0x70,
544 0x65, 0x72, 0x74, 0x79, 0x3e, 0x3c, 0x63, 0x68,
545 0x69, 0x6c, 0x64, 0x3e, 0x3c, 0x6f, 0x62, 0x6a,
546 0x65, 0x63, 0x74, 0x20, 0x63, 0x6c, 0x61, 0x73,
547 0x73, 0x3d, 0x22, 0x47, 0x74, 0x6b, 0x42, 0x6f,
548 0x78, 0x22, 0x20, 0x69, 0x64, 0x3d, 0x22, 0x62,
549 0x6f, 0x78, 0x33, 0x22, 0x3e, 0x3c, 0x70, 0x72,
550 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x20, 0x6e,
551 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x6d, 0x61, 0x72,
552 0x67, 0x69, 0x6e, 0x5f, 0x74, 0x6f, 0x70, 0x22,
553 0x3e, 0x31, 0x38, 0x3c, 0x2f, 0x70, 0x72, 0x6f,
554 0x70, 0x65, 0x72, 0x74, 0x79, 0x3e, 0x3c, 0x70,
555 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x20,
556 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x6d, 0x61,
557 0x72, 0x67, 0x69, 0x6e, 0x5f, 0x62, 0x6f, 0x74,
558 0x74, 0x6f, 0x6d, 0x22, 0x3e, 0x31, 0x38, 0x3c,
559 0x2f, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74,
560 0x79, 0x3e, 0x3c, 0x70, 0x72, 0x6f, 0x70, 0x65,
561 0x72, 0x74, 0x79, 0x20, 0x6e, 0x61, 0x6d, 0x65,
562 0x3d, 0x22, 0x6d, 0x61, 0x72, 0x67, 0x69, 0x6e,
563 0x5f, 0x6c, 0x65, 0x66, 0x74, 0x22, 0x3e, 0x31,
564 0x32, 0x3c, 0x2f, 0x70, 0x72, 0x6f, 0x70, 0x65,
565 0x72, 0x74, 0x79, 0x3e, 0x3c, 0x70, 0x72, 0x6f,
566 0x70, 0x65, 0x72, 0x74, 0x79, 0x20, 0x6e, 0x61,
567 0x6d, 0x65, 0x3d, 0x22, 0x6d, 0x61, 0x72, 0x67,
568 0x69, 0x6e, 0x5f, 0x72, 0x69, 0x67, 0x68, 0x74,
569 0x22, 0x3e, 0x31, 0x32, 0x3c, 0x2f, 0x70, 0x72,
570 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x3e, 0x3c,
571 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79,
572 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x76,
573 0x69, 0x73, 0x69, 0x62, 0x6c, 0x65, 0x22, 0x3e,
574 0x54, 0x72, 0x75, 0x65, 0x3c, 0x2f, 0x70, 0x72,
575 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x3e, 0x3c,
576 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79,
577 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x63,
578 0x61, 0x6e, 0x5f, 0x66, 0x6f, 0x63, 0x75, 0x73,
579 0x22, 0x3e, 0x46, 0x61, 0x6c, 0x73, 0x65, 0x3c,
580 0x2f, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74,
581 0x79, 0x3e, 0x3c, 0x63, 0x68, 0x69, 0x6c, 0x64,
582 0x3e, 0x3c, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74,
583 0x20, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x3d, 0x22,
584 0x47, 0x74, 0x6b, 0x4c, 0x61, 0x62, 0x65, 0x6c,
585 0x22, 0x20, 0x69, 0x64, 0x3d, 0x22, 0x6c, 0x61,
586 0x62, 0x65, 0x6c, 0x39, 0x22, 0x3e, 0x3c, 0x70,
587 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x20,
588 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x76, 0x69,
589 0x73, 0x69, 0x62, 0x6c, 0x65, 0x22, 0x3e, 0x54,
590 0x72, 0x75, 0x65, 0x3c, 0x2f, 0x70, 0x72, 0x6f,
591 0x70, 0x65, 0x72, 0x74, 0x79, 0x3e, 0x3c, 0x70,
592 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x20,
593 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x63, 0x61,
594 0x6e, 0x5f, 0x66, 0x6f, 0x63, 0x75, 0x73, 0x22,
595 0x3e, 0x46, 0x61, 0x6c, 0x73, 0x65, 0x3c, 0x2f,
596 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79,
597 0x3e, 0x3c, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72,
598 0x74, 0x79, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d,
599 0x22, 0x68, 0x61, 0x6c, 0x69, 0x67, 0x6e, 0x22,
600 0x3e, 0x73, 0x74, 0x61, 0x72, 0x74, 0x3c, 0x2f,
601 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79,
602 0x3e, 0x3c, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72,
603 0x74, 0x79, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d,
604 0x22, 0x68, 0x65, 0x78, 0x70, 0x61, 0x6e, 0x64,
605 0x22, 0x3e, 0x54, 0x72, 0x75, 0x65, 0x3c, 0x2f,
606 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79,
607 0x3e, 0x3c, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72,
608 0x74, 0x79, 0x20, 0x74, 0x72, 0x61, 0x6e, 0x73,
609 0x6c, 0x61, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x3d,
610 0x22, 0x79, 0x65, 0x73, 0x22, 0x20, 0x6e, 0x61,
611 0x6d, 0x65, 0x3d, 0x22, 0x6c, 0x61, 0x62, 0x65,
612 0x6c, 0x22, 0x3e, 0x5f, 0x53, 0x63, 0x72, 0x65,
613 0x65, 0x6e, 0x20, 0x53, 0x68, 0x61, 0x72, 0x69,
614 0x6e, 0x67, 0x3c, 0x2f, 0x70, 0x72, 0x6f, 0x70,
615 0x65, 0x72, 0x74, 0x79, 0x3e, 0x3c, 0x70, 0x72,
616 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x20, 0x6e,
617 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x75, 0x73, 0x65,
618 0x5f, 0x75, 0x6e, 0x64, 0x65, 0x72, 0x6c, 0x69,
619 0x6e, 0x65, 0x22, 0x3e, 0x54, 0x72, 0x75, 0x65,
620 0x3c, 0x2f, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72,
621 0x74, 0x79, 0x3e, 0x3c, 0x70, 0x72, 0x6f, 0x70,
622 0x65, 0x72, 0x74, 0x79, 0x20, 0x6e, 0x61, 0x6d,
623 0x65, 0x3d, 0x22, 0x6d, 0x6e, 0x65, 0x6d, 0x6f,
624 0x6e, 0x69, 0x63, 0x5f, 0x77, 0x69, 0x64, 0x67,
625 0x65, 0x74, 0x22, 0x3e, 0x73, 0x63, 0x72, 0x65,
626 0x65, 0x6e, 0x2d, 0x73, 0x68, 0x61, 0x72, 0x69,
627 0x6e, 0x67, 0x2d, 0x62, 0x75, 0x74, 0x74, 0x6f,
628 0x6e, 0x3c, 0x2f, 0x70, 0x72, 0x6f, 0x70, 0x65,
629 0x72, 0x74, 0x79, 0x3e, 0x3c, 0x2f, 0x6f, 0x62,
630 0x6a, 0x65, 0x63, 0x74, 0x3e, 0x3c, 0x70, 0x61,
631 0x63, 0x6b, 0x69, 0x6e, 0x67, 0x3e, 0x3c, 0x70,
632 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x20,
633 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x65, 0x78,
634 0x70, 0x61, 0x6e, 0x64, 0x22, 0x3e, 0x46, 0x61,
635 0x6c, 0x73, 0x65, 0x3c, 0x2f, 0x70, 0x72, 0x6f,
636 0x70, 0x65, 0x72, 0x74, 0x79, 0x3e, 0x3c, 0x70,
637 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x20,
638 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x66, 0x69,
639 0x6c, 0x6c, 0x22, 0x3e, 0x54, 0x72, 0x75, 0x65,
640 0x3c, 0x2f, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72,
641 0x74, 0x79, 0x3e, 0x3c, 0x70, 0x72, 0x6f, 0x70,
642 0x65, 0x72, 0x74, 0x79, 0x20, 0x6e, 0x61, 0x6d,
643 0x65, 0x3d, 0x22, 0x70, 0x6f, 0x73, 0x69, 0x74,
644 0x69, 0x6f, 0x6e, 0x22, 0x3e, 0x30, 0x3c, 0x2f,
645 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79,
646 0x3e, 0x3c, 0x2f, 0x70, 0x61, 0x63, 0x6b, 0x69,
647 0x6e, 0x67, 0x3e, 0x3c, 0x2f, 0x63, 0x68, 0x69,
648 0x6c, 0x64, 0x3e, 0x3c, 0x63, 0x68, 0x69, 0x6c,
649 0x64, 0x3e, 0x3c, 0x6f, 0x62, 0x6a, 0x65, 0x63,
650 0x74, 0x20, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x3d,
651 0x22, 0x47, 0x74, 0x6b, 0x4c, 0x61, 0x62, 0x65,
652 0x6c, 0x22, 0x20, 0x69, 0x64, 0x3d, 0x22, 0x73,
653 0x63, 0x72, 0x65, 0x65, 0x6e, 0x2d, 0x73, 0x68,
654 0x61, 0x72, 0x69, 0x6e, 0x67, 0x2d, 0x73, 0x74,
655 0x61, 0x74, 0x75, 0x73, 0x2d, 0x6c, 0x61, 0x62,
656 0x65, 0x6c, 0x22, 0x3e, 0x3c, 0x70, 0x72, 0x6f,
657 0x70, 0x65, 0x72, 0x74, 0x79, 0x20, 0x6e, 0x61,
658 0x6d, 0x65, 0x3d, 0x22, 0x76, 0x69, 0x73, 0x69,
659 0x62, 0x6c, 0x65, 0x22, 0x3e, 0x54, 0x72, 0x75,
660 0x65, 0x3c, 0x2f, 0x70, 0x72, 0x6f, 0x70, 0x65,
661 0x72, 0x74, 0x79, 0x3e, 0x3c, 0x70, 0x72, 0x6f,
662 0x70, 0x65, 0x72, 0x74, 0x79, 0x20, 0x6e, 0x61,
663 0x6d, 0x65, 0x3d, 0x22, 0x63, 0x61, 0x6e, 0x5f,
664 0x66, 0x6f, 0x63, 0x75, 0x73, 0x22, 0x3e, 0x46,
665 0x61, 0x6c, 0x73, 0x65, 0x3c, 0x2f, 0x70, 0x72,
666 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x3e, 0x3c,
667 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79,
668 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x6c,
669 0x61, 0x62, 0x65, 0x6c, 0x22, 0x3e, 0x4f, 0x66,
670 0x66, 0x3c, 0x2f, 0x70, 0x72, 0x6f, 0x70, 0x65,
671 0x72, 0x74, 0x79, 0x3e, 0x3c, 0x2f, 0x6f, 0x62,
672 0x6a, 0x65, 0x63, 0x74, 0x3e, 0x3c, 0x70, 0x61,
673 0x63, 0x6b, 0x69, 0x6e, 0x67, 0x3e, 0x3c, 0x70,
674 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x20,
675 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x65, 0x78,
676 0x70, 0x61, 0x6e, 0x64, 0x22, 0x3e, 0x46, 0x61,
677 0x6c, 0x73, 0x65, 0x3c, 0x2f, 0x70, 0x72, 0x6f,
678 0x70, 0x65, 0x72, 0x74, 0x79, 0x3e, 0x3c, 0x70,
679 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x20,
680 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x66, 0x69,
681 0x6c, 0x6c, 0x22, 0x3e, 0x54, 0x72, 0x75, 0x65,
682 0x3c, 0x2f, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72,
683 0x74, 0x79, 0x3e, 0x3c, 0x70, 0x72, 0x6f, 0x70,
684 0x65, 0x72, 0x74, 0x79, 0x20, 0x6e, 0x61, 0x6d,
685 0x65, 0x3d, 0x22, 0x70, 0x6f, 0x73, 0x69, 0x74,
686 0x69, 0x6f, 0x6e, 0x22, 0x3e, 0x31, 0x3c, 0x2f,
687 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79,
688 0x3e, 0x3c, 0x2f, 0x70, 0x61, 0x63, 0x6b, 0x69,
689 0x6e, 0x67, 0x3e, 0x3c, 0x2f, 0x63, 0x68, 0x69,
690 0x6c, 0x64, 0x3e, 0x3c, 0x2f, 0x6f, 0x62, 0x6a,
691 0x65, 0x63, 0x74, 0x3e, 0x3c, 0x2f, 0x63, 0x68,
692 0x69, 0x6c, 0x64, 0x3e, 0x3c, 0x2f, 0x6f, 0x62,
693 0x6a, 0x65, 0x63, 0x74, 0x3e, 0x3c, 0x2f, 0x63,
694 0x68, 0x69, 0x6c, 0x64, 0x3e, 0x3c, 0x63, 0x68,
695 0x69, 0x6c, 0x64, 0x3e, 0x3c, 0x6f, 0x62, 0x6a,
696 0x65, 0x63, 0x74, 0x20, 0x63, 0x6c, 0x61, 0x73,
697 0x73, 0x3d, 0x22, 0x47, 0x74, 0x6b, 0x4c, 0x69,
698 0x73, 0x74, 0x42, 0x6f, 0x78, 0x52, 0x6f, 0x77,
699 0x22, 0x20, 0x69, 0x64, 0x3d, 0x22, 0x6d, 0x65,
700 0x64, 0x69, 0x61, 0x2d, 0x73, 0x68, 0x61, 0x72,
701 0x69, 0x6e, 0x67, 0x2d, 0x62, 0x75, 0x74, 0x74,
702 0x6f, 0x6e, 0x22, 0x3e, 0x3c, 0x70, 0x72, 0x6f,
703 0x70, 0x65, 0x72, 0x74, 0x79, 0x20, 0x6e, 0x61,
704 0x6d, 0x65, 0x3d, 0x22, 0x76, 0x69, 0x73, 0x69,
705 0x62, 0x6c, 0x65, 0x22, 0x3e, 0x54, 0x72, 0x75,
706 0x65, 0x3c, 0x2f, 0x70, 0x72, 0x6f, 0x70, 0x65,
707 0x72, 0x74, 0x79, 0x3e, 0x3c, 0x63, 0x68, 0x69,
708 0x6c, 0x64, 0x3e, 0x3c, 0x6f, 0x62, 0x6a, 0x65,
709 0x63, 0x74, 0x20, 0x63, 0x6c, 0x61, 0x73, 0x73,
710 0x3d, 0x22, 0x47, 0x74, 0x6b, 0x42, 0x6f, 0x78,
711 0x22, 0x20, 0x69, 0x64, 0x3d, 0x22, 0x62, 0x6f,
712 0x78, 0x34, 0x22, 0x3e, 0x3c, 0x70, 0x72, 0x6f,
713 0x70, 0x65, 0x72, 0x74, 0x79, 0x20, 0x6e, 0x61,
714 0x6d, 0x65, 0x3d, 0x22, 0x6d, 0x61, 0x72, 0x67,
715 0x69, 0x6e, 0x5f, 0x74, 0x6f, 0x70, 0x22, 0x3e,
716 0x31, 0x38, 0x3c, 0x2f, 0x70, 0x72, 0x6f, 0x70,
717 0x65, 0x72, 0x74, 0x79, 0x3e, 0x3c, 0x70, 0x72,
718 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x20, 0x6e,
719 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x6d, 0x61, 0x72,
720 0x67, 0x69, 0x6e, 0x5f, 0x62, 0x6f, 0x74, 0x74,
721 0x6f, 0x6d, 0x22, 0x3e, 0x31, 0x38, 0x3c, 0x2f,
722 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79,
723 0x3e, 0x3c, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72,
724 0x74, 0x79, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d,
725 0x22, 0x6d, 0x61, 0x72, 0x67, 0x69, 0x6e, 0x5f,
726 0x6c, 0x65, 0x66, 0x74, 0x22, 0x3e, 0x31, 0x32,
727 0x3c, 0x2f, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72,
728 0x74, 0x79, 0x3e, 0x3c, 0x70, 0x72, 0x6f, 0x70,
729 0x65, 0x72, 0x74, 0x79, 0x20, 0x6e, 0x61, 0x6d,
730 0x65, 0x3d, 0x22, 0x6d, 0x61, 0x72, 0x67, 0x69,
731 0x6e, 0x5f, 0x72, 0x69, 0x67, 0x68, 0x74, 0x22,
732 0x3e, 0x31, 0x32, 0x3c, 0x2f, 0x70, 0x72, 0x6f,
733 0x70, 0x65, 0x72, 0x74, 0x79, 0x3e, 0x3c, 0x70,
734 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x20,
735 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x76, 0x69,
736 0x73, 0x69, 0x62, 0x6c, 0x65, 0x22, 0x3e, 0x54,
737 0x72, 0x75, 0x65, 0x3c, 0x2f, 0x70, 0x72, 0x6f,
738 0x70, 0x65, 0x72, 0x74, 0x79, 0x3e, 0x3c, 0x70,
739 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x20,
740 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x63, 0x61,
741 0x6e, 0x5f, 0x66, 0x6f, 0x63, 0x75, 0x73, 0x22,
742 0x3e, 0x46, 0x61, 0x6c, 0x73, 0x65, 0x3c, 0x2f,
743 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79,
744 0x3e, 0x3c, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x3e,
745 0x3c, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x20,
746 0x63, 0x6c, 0x61, 0x73, 0x73, 0x3d, 0x22, 0x47,
747 0x74, 0x6b, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x22,
748 0x20, 0x69, 0x64, 0x3d, 0x22, 0x6c, 0x61, 0x62,
749 0x65, 0x6c, 0x31, 0x30, 0x22, 0x3e, 0x3c, 0x70,
750 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x20,
751 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x76, 0x69,
The diff has been truncated for viewing.

Subscribers

People subscribed via source and target branches