Merge lp:~darkxst/gnome-control-center/vanilla into lp:~robert-ancell/gnome-control-center/vanilla

Proposed by Tim Lunn
Status: Rejected
Rejected by: Robert Ancell
Proposed branch: lp:~darkxst/gnome-control-center/vanilla
Merge into: lp:~robert-ancell/gnome-control-center/vanilla
Diff against target: 2693 lines (+2580/-2)
15 files modified
debian/changelog (+25/-1)
debian/control (+16/-0)
debian/control.in (+16/-0)
debian/libgnome-control-center1.symbols (+6/-1)
debian/patches/52_region_language.patch (+586/-0)
debian/patches/64_restore_terminal_keyboard_shortcut.patch (+13/-0)
debian/patches/92_ubuntu_system_proxy.patch (+213/-0)
debian/patches/99_add_lock-on-suspend.patch (+75/-0)
debian/patches/git-background-lock-screen.patch (+862/-0)
debian/patches/git-background-remove-unused-widget.patch (+111/-0)
debian/patches/git_rename_natural_scrolling.patch (+26/-0)
debian/patches/revert_git_dont_hide_zoom.patch (+78/-0)
debian/patches/revert_git_drop_library.patch (+170/-0)
debian/patches/series (+11/-0)
debian/patches/ubuntu_external_panels.patch (+372/-0)
To merge this branch: bzr merge lp:~darkxst/gnome-control-center/vanilla
Reviewer Review Type Date Requested Status
Robert Ancell Pending
Review via email: mp+202187@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Robert Ancell (robert-ancell) wrote :

This branch is not being maintained - you can make changes to g-c-c once u-c-c is the default.

Unmerged revisions

10. By Tim Lunn

uncomment buildflags

9. By Tim Lunn

[ Tim Lunn ]
* debian/control.in:
  - Add back libgnome-control-center packages
* debian/patches/52_region_language.patch:
  - Adapt region panel to use Ubuntu style regions and UTF-8
* debian/patches/64_restore_terminal_keyboard_shortcut.patch:
  - Bring back terminal shortcut
* debian/patches/92_ubuntu_system_proxy.patch:
  - Add system proxy support
* debian/patches/99_add_lock-on-suspend.patch:
  - Add option to lock on suspend
* debian/patches/git_rename_natural_scrolling.patch:
  - change potentially offensive string
* debian/patches/git-background-*.patch:
  - Allow setting a different background for the GNOME Shell lock
    screen (LP: #1219188)
* debian/patches/revert_git_dont_hide_zoom.patch:
  - Being back zoom settings
* debian/patches/ubuntu-external-panels.patch:
  - Reimplement support for external panels
* debian/libgnome-control-center1.symbols:
  - Add new symbols from external panel patch

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'debian/changelog'
2--- debian/changelog 2013-12-18 21:27:37 +0000
3+++ debian/changelog 2014-01-18 01:26:36 +0000
4@@ -1,5 +1,6 @@
5-gnome-control-center (1:3.8.6-0ubuntu1+unity) UNRELEASED; urgency=low
6+gnome-control-center (1:3.8.6-0ubuntu1+unity) UNRELEASED; urgency=medium
7
8+ [ Robert Ancell ]
9 * New upstream release
10 * Drop all Unity customizations
11 * debian/control:
12@@ -15,6 +16,29 @@
13 * debian/patches/git_iconview_columns.patch:
14 - Set the number of columns, that seems needed with new GTK versions
15
16+ [ Tim Lunn ]
17+ * debian/control.in:
18+ - Add back libgnome-control-center packages
19+ * debian/patches/52_region_language.patch:
20+ - Adapt region panel to use Ubuntu style regions and UTF-8
21+ * debian/patches/64_restore_terminal_keyboard_shortcut.patch:
22+ - Bring back terminal shortcut
23+ * debian/patches/92_ubuntu_system_proxy.patch:
24+ - Add system proxy support
25+ * debian/patches/99_add_lock-on-suspend.patch:
26+ - Add option to lock on suspend
27+ * debian/patches/git_rename_natural_scrolling.patch:
28+ - change potentially offensive string
29+ * debian/patches/git-background-*.patch:
30+ - Allow setting a different background for the GNOME Shell lock
31+ screen (LP: #1219188)
32+ * debian/patches/revert_git_dont_hide_zoom.patch:
33+ - Being back zoom settings
34+ * debian/patches/ubuntu-external-panels.patch:
35+ - Reimplement support for external panels
36+ * debian/libgnome-control-center1.symbols:
37+ - Add new symbols from external panel patch
38+
39 -- Robert Ancell <robert.ancell@canonical.com> Wed, 04 Dec 2013 11:03:26 +1300
40
41 gnome-control-center (1:3.6.3-0ubuntu48) trusty; urgency=low
42
43=== modified file 'debian/control'
44--- debian/control 2013-12-13 01:57:54 +0000
45+++ debian/control 2014-01-18 01:26:36 +0000
46@@ -140,3 +140,19 @@
47 Description: configuration applets for GNOME - data files
48 This package contains data files (icons, pixmaps, locales files) needed by
49 the configuration applets in the gnome-control-center package.
50+
51+Package: libgnome-control-center-dev
52+Architecture: any
53+Section: libdevel
54+Depends: ${misc:Depends},
55+ libgnome-control-center1 (= ${binary:Version})
56+Description: utilities to configure the GNOME desktop
57+ This package contains the files needed to build Control Center panels
58+
59+Package: libgnome-control-center1
60+Architecture: any
61+Section: libs
62+Depends: ${misc:Depends},
63+ ${shlibs:Depends}
64+Description: utilities to configure the GNOME desktop
65+ This package contains the library used by Control Center panels
66
67=== modified file 'debian/control.in'
68--- debian/control.in 2013-12-13 01:57:54 +0000
69+++ debian/control.in 2014-01-18 01:26:36 +0000
70@@ -136,3 +136,19 @@
71 Description: configuration applets for GNOME - data files
72 This package contains data files (icons, pixmaps, locales files) needed by
73 the configuration applets in the gnome-control-center package.
74+
75+Package: libgnome-control-center-dev
76+Architecture: any
77+Section: libdevel
78+Depends: ${misc:Depends},
79+ libgnome-control-center1 (= ${binary:Version})
80+Description: utilities to configure the GNOME desktop
81+ This package contains the files needed to build Control Center panels
82+
83+Package: libgnome-control-center1
84+Architecture: any
85+Section: libs
86+Depends: ${misc:Depends},
87+ ${shlibs:Depends}
88+Description: utilities to configure the GNOME desktop
89+ This package contains the library used by Control Center panels
90
91=== modified file 'debian/libgnome-control-center1.symbols'
92--- debian/libgnome-control-center1.symbols 2013-11-29 07:00:27 +0000
93+++ debian/libgnome-control-center1.symbols 2014-01-18 01:26:36 +0000
94@@ -1,18 +1,23 @@
95 libgnome-control-center.so.1 libgnome-control-center1 #MINVER#
96 * Build-Depends-Package: libgnome-control-center-dev
97 cc_editable_entry_get_editable@Base 1:3.1.3
98+ cc_editable_entry_get_ellipsize@Base 1:3.8.6
99+ cc_editable_entry_get_max_width_chars@Base 1:3.8.6
100 cc_editable_entry_get_scale@Base 1:3.1.3
101 cc_editable_entry_get_selectable@Base 1:3.1.4
102 cc_editable_entry_get_text@Base 1:3.1.3
103 cc_editable_entry_get_type@Base 1:3.1.3
104 cc_editable_entry_get_weight@Base 1:3.1.3
105+ cc_editable_entry_get_width_chars@Base 1:3.8.6
106 cc_editable_entry_new@Base 1:3.1.3
107 cc_editable_entry_set_editable@Base 1:3.1.3
108+ cc_editable_entry_set_ellipsize@Base 1:3.8.6
109+ cc_editable_entry_set_max_width_chars@Base 1:3.8.6
110 cc_editable_entry_set_scale@Base 1:3.1.3
111 cc_editable_entry_set_selectable@Base 1:3.1.4
112 cc_editable_entry_set_text@Base 1:3.1.3
113 cc_editable_entry_set_weight@Base 1:3.1.3
114- cc_panel_get_display_name@Base 1:3.6.3-0ubuntu32
115+ cc_editable_entry_set_width_chars@Base 1:3.8.6
116 cc_panel_get_help_uri@Base 1:3.5.2
117 cc_panel_get_permission@Base 1:3.1.3
118 cc_panel_get_shell@Base 1:2.91.2
119
120=== added file 'debian/patches/52_region_language.patch'
121--- debian/patches/52_region_language.patch 1970-01-01 00:00:00 +0000
122+++ debian/patches/52_region_language.patch 2014-01-18 01:26:36 +0000
123@@ -0,0 +1,586 @@
124+Description: Adapts the region capplet and the language chooser in the user accounts capplet
125+Forwarded: https://bugzilla.gnome.org/695939, https://bugzilla.gnome.org/695940
126+Author: Gunnar Hjalmarsson <gunnarhj@ubuntu.com>
127+Last-Update: 2013-03-21
128+
129+ Some background that explains the need for this patch:
130+
131+ * Ubuntu isn't shipped with all languages installed and all locales generated.
132+ Instead the users install the needed language pack(s), and the corresponding
133+ locales are generated.
134+
135+ * The code in accountsservice for handling languages has been extended via Ubuntu
136+ specific patches. That code is shared by multiple packages. Currently those
137+ packages are:
138+ - gnome-control-center
139+ - language-selector (Xubuntu and Lubuntu will keep using the language-selector
140+ UI for now)
141+ - lightdm (for the language chooser in lightdm-gtk-greeter)
142+
143+ With this patch applied, the g-c-c region capplet and the language chooser in the
144+ user accounts capplet behave approximately the same way as language-selector. No
145+ migration code needed when standard Ubuntu drops the language-selector UI.
146+
147+ Compared with how the region capplet in g-c-c works out of the box, this patch
148+ results in:
149+
150+ * Languages are dealt with using 'll' and 'll_CC' language codes instead of
151+ complete locale names.
152+
153+ * Selected language is stored in both LANGUAGE and LANG.
154+
155+ * Only one language list that shows the translations belonging to the installed
156+ language packs (not a 'short' and a 'long' list).
157+
158+ * User level settings of language and regional formats are stored as
159+ accountsservice properties and in ~/.pam_environment.
160+
161+ * All the formats related locale categories set, not just a subset.
162+
163+ The following changes now live in gnome-desktop3
164+
165+ * Translation @variants, e.g. ca@valencia, are displayed properly.
166+
167+ * Locales stored with codeset '.UTF-8' instead of '.utf8'.
168+
169+ * The 'common_name' field taken into account when parsing the iso-codes XML files
170+ for language names.
171+
172+From 785b001bbc1d9cca74745ea6dfb75d60f3b5b7a9 Mon Sep 17 00:00:00 2001
173+From: Tim Lunn <tim@feathertop.org>
174+Date: Fri, 12 Apr 2013 08:55:40 +1000
175+Subject: [PATCH] Ubuntu changes required for proper region support.
176+
177+---
178+ panels/common/cc-common-language.c | 110 +++++++++++++++++++++++++++---
179+ panels/common/cc-common-language.h | 3 +
180+ panels/common/cc-language-chooser.c | 5 +-
181+ panels/region/cc-format-chooser.c | 2 +
182+ panels/region/cc-input-chooser.c | 4 +-
183+ panels/region/cc-region-panel.c | 127 ++++++++++++++++++++++++++---------
184+ panels/user-accounts/um-user-panel.c | 11 ++-
185+ 7 files changed, 216 insertions(+), 46 deletions(-)
186+
187+--- a/panels/common/cc-common-language.c
188++++ b/panels/common/cc-common-language.c
189+@@ -321,6 +321,67 @@
190+ return language;
191+ }
192+
193++gchar *
194++cc_common_language_get_property (const gchar *prop_name)
195++{
196++ GDBusConnection *bus;
197++ gchar *user_path;
198++ GError *error = NULL;
199++ GVariant *properties;
200++ GVariantIter *iter;
201++ gchar *key;
202++ GVariant *value;
203++ gchar *ret = NULL;
204++
205++ if (g_strcmp0 (prop_name, "Language") != 0 && g_strcmp0 (prop_name, "FormatsLocale") != 0) {
206++ g_warning ("Invalid argument: '%s'", prop_name);
207++ return ret;
208++ }
209++
210++ bus = g_bus_get_sync (G_BUS_TYPE_SYSTEM, NULL, NULL);
211++ user_path = g_strdup_printf ("/org/freedesktop/Accounts/User%i", getuid ());
212++
213++ properties = g_dbus_connection_call_sync (bus,
214++ "org.freedesktop.Accounts",
215++ user_path,
216++ "org.freedesktop.DBus.Properties",
217++ "GetAll",
218++ g_variant_new ("(s)", "org.freedesktop.Accounts.User"),
219++ G_VARIANT_TYPE ("(a{sv})"),
220++ G_DBUS_CALL_FLAGS_NONE,
221++ -1,
222++ NULL,
223++ &error);
224++ if (!properties) {
225++ g_warning ("Error calling GetAll() when retrieving properties for %s: %s", user_path, error->message);
226++ g_error_free (error);
227++ /* g_hash_table_lookup() is not NULL-safe, so don't return NULL */
228++ if (g_strcmp0 (prop_name, "Language") == 0)
229++ ret = g_strdup ("en");
230++ else
231++ ret = g_strdup ("en_US.UTF-8");
232++ goto out;
233++ }
234++
235++ g_variant_get (properties, "(a{sv})", &iter);
236++ while (g_variant_iter_loop (iter, "{&sv}", &key, &value)) {
237++ if (g_strcmp0 (key, prop_name) == 0) {
238++ g_variant_get (value, "s", &ret);
239++ break;
240++ }
241++ }
242++
243++ g_variant_unref (properties);
244++ g_variant_iter_free (iter);
245++
246++out:
247++ g_object_unref (bus);
248++ g_free (user_path);
249++
250++ return ret;
251++}
252++
253++
254+ typedef struct {
255+ GtkListStore *store;
256+ gboolean user_lang;
257+@@ -428,7 +489,7 @@
258+ char *lang;
259+ gboolean found;
260+
261+- lang = cc_common_language_get_current_language ();
262++ lang = cc_common_language_get_property ("Language");
263+ g_debug ("Trying to select lang '%s' in treeview", lang);
264+ model = gtk_tree_view_get_model (treeview);
265+ found = FALSE;
266+@@ -513,6 +574,7 @@
267+ return lang;
268+ }
269+
270++/*
271+ static void
272+ add_other_users_language (GHashTable *ht)
273+ {
274+@@ -573,6 +635,7 @@
275+
276+ g_object_unref (proxy);
277+ }
278++*/
279+
280+ static void
281+ insert_language (GHashTable *ht,
282+@@ -596,10 +659,10 @@
283+
284+ g_debug ("We have translations for %s", lang);
285+
286+- if (g_str_has_suffix (lang, ".utf8"))
287++ if (g_str_has_suffix (lang, ".UTF-8"))
288+ key = g_strdup (lang);
289+ else
290+- key = g_strdup_printf ("%s.utf8", lang);
291++ key = g_strdup_printf ("%s.UTF-8", lang);
292+
293+ label_own_lang = gnome_get_language_from_locale (key, key);
294+ label_current_lang = gnome_get_language_from_locale (key, NULL);
295+@@ -625,9 +688,18 @@
296+ cc_common_language_get_initial_languages (void)
297+ {
298+ GHashTable *ht;
299++ gchar **langs;
300++ gint i;
301+
302+ ht = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, g_free);
303+
304++ langs = gnome_get_all_locales ();
305++ for (i = 0; langs[i]; i++) {
306++ char *language = strtok (langs[i], ".");
307++ insert_language (ht, language);
308++ }
309++ g_strfreev (langs);
310++/*
311+ insert_language (ht, "en_US");
312+ insert_language (ht, "en_GB");
313+ insert_language (ht, "de_DE");
314+@@ -637,7 +709,7 @@
315+ insert_language (ht, "ja_JP");
316+ insert_language (ht, "ru_RU");
317+ insert_language (ht, "ar_EG");
318+-
319++*/
320+ return ht;
321+ }
322+
323+@@ -651,10 +723,10 @@
324+ ht = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, g_free);
325+
326+ /* Add the languages used by other users on the system */
327+- add_other_users_language (ht);
328++ // add_other_users_language (ht);
329+
330+ /* Add current locale */
331+- name = cc_common_language_get_current_language ();
332++ name = cc_common_language_get_property ("Language");
333+ if (g_hash_table_lookup (ht, name) == NULL) {
334+ language = gnome_get_language_from_locale (name, NULL);
335+ g_hash_table_insert (ht, name, language);
336+@@ -703,6 +775,28 @@
337+ return ht;
338+ }
339+
340++void
341++cc_common_language_get_locale (const gchar *language, gchar **locale){
342++ gchar *command;
343++ GError *error = NULL;
344++ /* Get locale that corresponds to the language */
345++ command = g_strconcat ("/usr/share/language-tools/language2locale ", language, NULL);
346++ if (!g_spawn_command_line_sync (command, locale, NULL, NULL, &error)) {
347++ g_warning ("Couldn't get LANG locale: %s", error->message);
348++ g_error_free (error);
349++ g_free (command);
350++
351++ return;
352++ }
353++
354++ g_free (command);
355++ g_strchomp (*locale);
356++ if (strlen (*locale) == 0) {
357++ g_warning ("Couldn't get LANG locale -- Copying interrupted");
358++ return;
359++ }
360++
361++}
362+ static void
363+ foreach_user_lang_cb (gpointer key,
364+ gpointer value,
365+@@ -734,7 +828,7 @@
366+ user_langs = cc_common_language_get_initial_languages ();
367+
368+ /* Add the current locale first */
369+- name = cc_common_language_get_current_language ();
370++ name = cc_common_language_get_property ("Language");
371+ display = g_hash_table_lookup (user_langs, name);
372+ if (!display) {
373+ insert_language (user_langs, name);
374+@@ -750,8 +844,8 @@
375+ g_hash_table_foreach (user_langs, (GHFunc) foreach_user_lang_cb, store);
376+
377+ /* And now the "Other…" selection */
378+- gtk_list_store_append (store, &iter);
379+- gtk_list_store_set (store, &iter, LOCALE_COL, NULL, DISPLAY_LOCALE_COL, _("Other…"), -1);
380++ //gtk_list_store_append (store, &iter);
381++ //gtk_list_store_set (store, &iter, LOCALE_COL, NULL, DISPLAY_LOCALE_COL, _("Other…"), -1);
382+
383+ g_hash_table_destroy (user_langs);
384+ }
385+--- a/panels/common/cc-common-language.h
386++++ b/panels/common/cc-common-language.h
387+@@ -45,6 +45,7 @@
388+ GHashTable *user_langs);
389+ gboolean cc_common_language_has_font (const gchar *locale);
390+ gchar *cc_common_language_get_current_language (void);
391++gchar *cc_common_language_get_property (const gchar *prop_name);
392+
393+ GHashTable *cc_common_language_get_initial_languages (void);
394+ GHashTable *cc_common_language_get_user_languages (void);
395+@@ -57,6 +58,8 @@
396+
397+ void cc_common_language_add_user_languages (GtkTreeModel *model);
398+
399++void cc_common_language_get_locale (const gchar *language, gchar **locale);
400++
401+ G_END_DECLS
402+
403+ #endif
404+--- a/panels/common/cc-language-chooser.c
405++++ b/panels/common/cc-language-chooser.c
406+@@ -1,5 +1,4 @@
407+-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*-
408+- *
409++/*
410+ * Copyright (C) 2013 Red Hat, Inc
411+ *
412+ * This program is free software; you can redistribute it and/or modify
413+@@ -79,7 +78,9 @@
414+ egg_list_box_refilter (EGG_LIST_BOX (priv->language_list));
415+ }
416+ } else {
417++
418+ gtk_widget_set_opacity (check, 0.0);
419++
420+ }
421+ }
422+ g_list_free (children);
423+--- a/panels/region/cc-format-chooser.c
424++++ b/panels/region/cc-format-chooser.c
425+@@ -170,7 +170,9 @@
426+
427+ } else {
428+ /* mark as unselected */
429++
430+ gtk_widget_set_opacity (check, 0.0);
431++
432+ }
433+ }
434+ g_list_free (children);
435+--- a/panels/region/cc-input-chooser.c
436++++ b/panels/region/cc-input-chooser.c
437+@@ -909,7 +909,7 @@
438+ lang_code != NULL &&
439+ country_code != NULL)
440+ {
441+- gchar *locale = g_strdup_printf ("%s_%s.utf8", lang_code, country_code);
442++ gchar *locale = g_strdup_printf ("%s_%s.UTF-8", lang_code, country_code);
443+
444+ info = g_hash_table_lookup (priv->locales, locale);
445+ if (info)
446+@@ -1034,7 +1034,7 @@
447+ if (!gnome_parse_locale (*locale, &lang_code, &country_code, NULL, NULL))
448+ continue;
449+
450+- simple_locale = g_strdup_printf ("%s_%s.utf8", lang_code, country_code);
451++ simple_locale = g_strdup_printf ("%s_%s.UTF-8", lang_code, country_code);
452+ if (g_hash_table_contains (priv->locales, simple_locale))
453+ {
454+ g_free (simple_locale);
455+--- a/panels/region/cc-region-panel.c
456++++ b/panels/region/cc-region-panel.c
457+@@ -404,14 +404,55 @@
458+ }
459+
460+ static void
461++set_formats_locale (const gchar *formats_locale)
462++{
463++ GDBusProxy *proxy;
464++ GError *error = NULL;
465++ gchar *user_path;
466++ GVariant *ret;
467++
468++ user_path = g_strdup_printf ("/org/freedesktop/Accounts/User%i", getuid ());
469++ proxy = g_dbus_proxy_new_for_bus_sync (G_BUS_TYPE_SYSTEM,
470++ G_DBUS_PROXY_FLAGS_NONE,
471++ NULL,
472++ "org.freedesktop.Accounts",
473++ user_path,
474++ "org.freedesktop.Accounts.User",
475++ NULL,
476++ &error);
477++ if (!proxy) {
478++ g_warning ("Couldn't get accountsservice proxy for %s: %s", user_path, error->message);
479++ g_error_free (error);
480++ g_free (user_path);
481++ return;
482++ }
483++
484++ ret = g_dbus_proxy_call_sync (proxy,
485++ "SetFormatsLocale",
486++ g_variant_new ("(s)", formats_locale),
487++ G_DBUS_CALL_FLAGS_NONE,
488++ -1,
489++ NULL,
490++ &error);
491++ if (!ret) {
492++ g_warning ("Couldn't set FormatsLocale: %s", error->message);
493++ g_error_free (error);
494++ } else
495++ g_variant_unref (ret);
496++
497++ g_object_unref (proxy);
498++ g_free (user_path);
499++}
500++
501++static void
502+ update_region (CcRegionPanel *self,
503+ const gchar *region)
504+ {
505+- CcRegionPanelPrivate *priv = self->priv;
506++ CcRegionPanelPrivate *priv = self->priv;
507+
508+ if (g_strcmp0 (region, priv->region) == 0)
509+ return;
510+-
511++ set_formats_locale(region);
512+ g_settings_set_string (priv->locale_settings, KEY_REGION, region);
513+ maybe_notify (self, LC_TIME, region);
514+ }
515+@@ -545,7 +586,7 @@
516+ CcRegionPanelPrivate *priv = self->priv;
517+
518+ g_free (priv->region);
519+- priv->region = g_settings_get_string (priv->locale_settings, KEY_REGION);
520++ priv->region = cc_common_language_get_property ("FormatsLocale");
521+ update_region_label (self);
522+ }
523+
524+@@ -576,14 +617,16 @@
525+ {
526+ CcRegionPanelPrivate *priv = self->priv;
527+ const gchar *language;
528+-
529+- if (act_user_is_loaded (priv->user))
530++ const gchar *locale;
531++ if (act_user_is_loaded (priv->user)){
532+ language = act_user_get_language (priv->user);
533++ cc_common_language_get_locale (language, &locale);
534++ }
535+ else
536+- language = "en_US.utf-8";
537++ locale = "en_US.UTF-8";
538+
539+ g_free (priv->language);
540+- priv->language = g_strdup (language);
541++ priv->language = g_strdup (locale);
542+ update_language_label (self);
543+ }
544+
545+@@ -1428,6 +1471,16 @@
546+ update_buttons (self);
547+ }
548+
549++static gchar *
550++strip_quotes (const gchar *str)
551++{
552++ if ((g_str_has_prefix (str, "\"") && g_str_has_suffix (str, "\""))
553++ || (g_str_has_prefix (str, "'") && g_str_has_suffix (str, "'")))
554++ return g_strndup (str + 1, strlen (str) - 2);
555++ else
556++ return g_strdup (str);
557++}
558++
559+ static void
560+ on_localed_properties_changed (GDBusProxy *proxy,
561+ GVariant *changed_properties,
562+@@ -1442,34 +1495,49 @@
563+ const gchar **strv;
564+ gsize len;
565+ gint i;
566+- const gchar *lang, *messages, *time;
567++ gchar *lang, *language, *messages, *time;
568+
569+ strv = g_variant_get_strv (v, &len);
570+
571+- lang = messages = time = NULL;
572++ lang = language = messages = time = NULL;
573+ for (i = 0; strv[i]; i++) {
574+ if (g_str_has_prefix (strv[i], "LANG=")) {
575+- lang = strv[i] + strlen ("LANG=");
576++ lang = strip_quotes (strv[i] + strlen ("LANG="));
577++ } else if (g_str_has_prefix (strv[i], "LANGUAGE=")) {
578++ gchar *tmp = strip_quotes (strv[i] + strlen ("LANGUAGE="));
579++ gchar **tokens = g_strsplit (tmp, ":", 2);
580++ language = g_strdup (tokens[0]);
581++ g_free (tmp);
582++ g_strfreev (tokens);
583+ } else if (g_str_has_prefix (strv[i], "LC_MESSAGES=")) {
584+- messages = strv[i] + strlen ("LC_MESSAGES=");
585++ messages = strip_quotes (strv[i] + strlen ("LC_MESSAGES="));
586+ } else if (g_str_has_prefix (strv[i], "LC_TIME=")) {
587+- time = strv[i] + strlen ("LC_TIME=");
588++ time = strip_quotes (strv[i] + strlen ("LC_TIME="));
589+ }
590+ }
591++ g_free (strv);
592++
593+ if (!lang) {
594+- lang = "";
595++ lang = g_strdup ("en_US.UTF-8");
596+ }
597+- if (!messages) {
598+- messages = lang;
599++ if (!language) {
600++ if (messages)
601++ language = g_strdup (messages);
602++ else
603++ language = g_strdup (lang);
604+ }
605+ if (!time) {
606+- time = lang;
607++ time = g_strdup (lang);
608+ }
609+ g_free (priv->system_language);
610+- priv->system_language = g_strdup (messages);
611++ priv->system_language = g_strdup (language);
612+ g_free (priv->system_region);
613+ priv->system_region = g_strdup (time);
614+ g_variant_unref (v);
615++ g_free (lang);
616++ g_free (language);
617++ g_free (messages);
618++ g_free (time);
619+
620+ update_language_label (self);
621+ }
622+@@ -1539,29 +1607,28 @@
623+ CcRegionPanelPrivate *priv = self->priv;
624+ GVariantBuilder *b;
625+ gchar *s;
626++ gchar *lang;
627++ gint i;
628++
629++ cc_common_language_get_locale (priv->system_language, &lang);
630+
631+ b = g_variant_builder_new (G_VARIANT_TYPE ("as"));
632+- s = g_strconcat ("LANG=", priv->system_language, NULL);
633++ s = g_strconcat ("LANG=", lang, NULL);
634+ g_variant_builder_add (b, "s", s);
635+ g_free (s);
636+
637+- if (g_strcmp0 (priv->system_language, priv->system_region) != 0) {
638+- s = g_strconcat ("LC_TIME=", priv->system_region, NULL);
639+- g_variant_builder_add (b, "s", s);
640+- g_free (s);
641+- s = g_strconcat ("LC_NUMERIC=", priv->system_region, NULL);
642+- g_variant_builder_add (b, "s", s);
643+- g_free (s);
644+- s = g_strconcat ("LC_MONETARY=", priv->system_region, NULL);
645+- g_variant_builder_add (b, "s", s);
646+- g_free (s);
647+- s = g_strconcat ("LC_MEASUREMENT=", priv->system_region, NULL);
648+- g_variant_builder_add (b, "s", s);
649+- g_free (s);
650+- s = g_strconcat ("LC_PAPER=", priv->system_region, NULL);
651++ s = g_strconcat ("LANGUAGE=", priv->system_language, NULL);
652++ g_variant_builder_add (b, "s", s);
653++ g_free (s);
654++ const gchar *format_categories[] = { "LC_NUMERIC", "LC_TIME",
655++ "LC_MONETARY", "LC_PAPER", "LC_IDENTIFICATION", "LC_NAME",
656++ "LC_ADDRESS", "LC_TELEPHONE", "LC_MEASUREMENT", NULL };
657++ for (i = 0; format_categories[i] != NULL; i++) {
658++ s = g_strconcat (format_categories[i], "=", priv->system_region, NULL);
659+ g_variant_builder_add (b, "s", s);
660+ g_free (s);
661+ }
662++
663+ g_dbus_proxy_call (priv->localed,
664+ "SetLocale",
665+ g_variant_new ("(asb)", b, TRUE),
666+--- a/panels/user-accounts/um-user-panel.c
667++++ b/panels/user-accounts/um-user-panel.c
668+@@ -697,8 +697,9 @@
669+ cc_common_language_add_user_languages (model);
670+
671+ lang = g_strdup (act_user_get_language (user));
672++ cc_common_language_get_locale (lang, &lang);
673+ if (!lang)
674+- lang = cc_common_language_get_current_language ();
675++ lang = cc_common_language_get_property ("Language");
676+ if (cc_common_language_get_iter_for_language (model, lang, &iter))
677+ um_editable_combo_set_active_iter (UM_EDITABLE_COMBO (widget), &iter);
678+ g_free (lang);
679+@@ -824,8 +825,9 @@
680+ }
681+ else {
682+ lang = g_strdup (act_user_get_language (user));
683++ cc_common_language_get_locale (lang, &lang);
684+ if (!lang) {
685+- lang = cc_common_language_get_current_language ();
686++ lang = cc_common_language_get_property ("Language");
687+ }
688+ }
689+ cc_common_language_get_iter_for_language (model, lang, &iter);
690+@@ -845,6 +847,7 @@
691+ GtkTreeModel *model;
692+ GtkTreeIter iter;
693+ gchar *lang;
694++ gchar *locale;
695+ ActUser *user;
696+
697+ if (!um_editable_combo_get_active_iter (combo, &iter))
698+@@ -855,8 +858,10 @@
699+ model = um_editable_combo_get_model (combo);
700+
701+ gtk_tree_model_get (model, &iter, 0, &lang, -1);
702++ cc_common_language_get_locale(act_user_get_language (user),&locale);
703++
704+ if (lang) {
705+- if (g_strcmp0 (lang, act_user_get_language (user)) != 0) {
706++ if (g_strcmp0 (lang, locale) != 0) {
707+ act_user_set_language (user, lang);
708+ }
709+ g_free (lang);
710
711=== added file 'debian/patches/64_restore_terminal_keyboard_shortcut.patch'
712--- debian/patches/64_restore_terminal_keyboard_shortcut.patch 1970-01-01 00:00:00 +0000
713+++ debian/patches/64_restore_terminal_keyboard_shortcut.patch 2014-01-18 01:26:36 +0000
714@@ -0,0 +1,13 @@
715+Index: gnome-control-center-3.4.2/panels/keyboard/01-launchers.xml.in
716+===================================================================
717+--- gnome-control-center-3.4.2.orig/panels/keyboard/01-launchers.xml.in 2011-08-25 11:09:31.000000000 -0400
718++++ gnome-control-center-3.4.2/panels/keyboard/01-launchers.xml.in 2012-08-25 23:34:01.889092065 -0400
719+@@ -7,6 +7,8 @@
720+
721+ <KeyListEntry name="email" _description="Launch email client"/>
722+
723++ <KeyListEntry name="terminal" _description="Launch terminal"/>
724++
725+ <KeyListEntry name="www" _description="Launch web browser"/>
726+
727+ <KeyListEntry name="home" _description="Home folder"/>
728
729=== added file 'debian/patches/92_ubuntu_system_proxy.patch'
730--- debian/patches/92_ubuntu_system_proxy.patch 1970-01-01 00:00:00 +0000
731+++ debian/patches/92_ubuntu_system_proxy.patch 2014-01-18 01:26:36 +0000
732@@ -0,0 +1,213 @@
733+--- a/panels/network/net-proxy.c
734++++ b/panels/network/net-proxy.c
735+@@ -25,8 +25,14 @@
736+ #include <glib/gi18n.h>
737+ #include <gio/gio.h>
738+
739++#include <grp.h>
740++#include <unistd.h>
741++#include <gdesktop-enums.h>
742++
743+ #include "net-proxy.h"
744+
745++
746++
747+ #define NET_PROXY_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), NET_TYPE_PROXY, NetProxyPrivate))
748+
749+ struct _NetProxyPrivate
750+@@ -306,6 +312,148 @@
751+ return g_variant_builder_end (&builder);
752+ }
753+
754++
755++static gboolean
756++ubuntu_is_in_admin_group (int id_group)
757++{
758++ gid_t groups [1024];
759++ int i, ngroups;
760++
761++ ngroups = getgroups (1024, groups);
762++ if (ngroups < 0) {
763++ perror ("getgroups");
764++ return FALSE;
765++ }
766++
767++ for (i = 0; i < ngroups; ++i) {
768++ if (groups[i] == id_group)
769++ return TRUE;
770++ }
771++
772++ return FALSE;
773++}
774++
775++static gboolean
776++ubuntu_is_admin ()
777++{
778++ struct group *admin_group;
779++
780++ admin_group = getgrnam ("admin");
781++ if (admin_group != NULL && ubuntu_is_in_admin_group (admin_group->gr_gid))
782++ return TRUE;
783++
784++ admin_group = getgrnam ("sudo");
785++ if (admin_group != NULL && ubuntu_is_in_admin_group (admin_group->gr_gid))
786++ return TRUE;
787++
788++ return FALSE;
789++}
790++
791++static void
792++ubuntu_reset_system_proxy (GDBusProxy *proxy, const gchar *protocol)
793++{
794++ GVariant *result;
795++ GError *error = NULL;
796++
797++ result = g_dbus_proxy_call_sync (proxy, "set_proxy",
798++ g_variant_new ("(ss)", protocol, ""),
799++ G_DBUS_CALL_FLAGS_NONE,
800++ -1, NULL, &error);
801++ if (result)
802++ g_variant_unref (result);
803++ else {
804++ g_warning ("Error while calling set_proxy for %s protocol: %s", protocol, error->message);
805++ g_error_free (error);
806++ }
807++}
808++
809++static void
810++ubuntu_set_proxy_for_protocol (GDBusProxy *proxy, const gchar *protocol, GSettings *settings)
811++{
812++ GVariant *result;
813++ gchar *proxy_str, *host;
814++ GError *error = NULL;
815++ gint port;
816++
817++ host = g_settings_get_string (settings, "host");
818++ port = g_settings_get_int (settings, "port");
819++
820++ if (host && *host == '\0') {
821++ ubuntu_reset_system_proxy (proxy, protocol);
822++ } else {
823++ proxy_str = g_strdup_printf ("%s://%s:%i/", protocol, host, port);
824++
825++ result = g_dbus_proxy_call_sync (proxy, "set_proxy",
826++ g_variant_new ("(ss)", protocol, proxy_str),
827++ G_DBUS_CALL_FLAGS_NONE,
828++ -1, NULL, &error);
829++ if (result)
830++ g_variant_unref (result);
831++ else {
832++ g_warning ("Error while calling set_proxy for %s protocol: %s", protocol, error->message);
833++ g_error_free (error);
834++ }
835++ g_free (proxy_str);
836++ }
837++
838++ /* Free memory */
839++ g_free (host);
840++ g_object_unref (settings);
841++}
842++
843++static void
844++ubuntu_on_proxy_apply_system_settings (GtkButton *button, gpointer user_data)
845++{
846++ GDBusConnection *bus;
847++ GDBusProxy *dbus_proxy;
848++ GError *error;
849++ GDesktopProxyMode proxy_mode;
850++ NetProxy *proxy = NET_PROXY (user_data);
851++
852++ error = NULL;
853++ bus = g_bus_get_sync (G_BUS_TYPE_SYSTEM, NULL, &error);
854++ if (!bus) {
855++ g_warning ("Could not retrieve system bus: %s", error->message);
856++ g_error_free (error);
857++
858++ return;
859++ }
860++
861++ dbus_proxy = g_dbus_proxy_new_sync (bus, 0, NULL,
862++ "com.ubuntu.SystemService",
863++ "/",
864++ "com.ubuntu.SystemService",
865++ NULL,
866++ &error);
867++ if (!dbus_proxy) {
868++ g_warning ("Could not retrieve bus object: %s", error->message);
869++ g_error_free (error);
870++
871++ return;
872++ }
873++
874++ /* Retrieve the current settings */
875++ proxy_mode = g_settings_get_enum (proxy->priv->settings, "mode");
876++ switch (proxy_mode) {
877++ case G_DESKTOP_PROXY_MODE_AUTO:
878++ case G_DESKTOP_PROXY_MODE_NONE:
879++ ubuntu_reset_system_proxy (dbus_proxy, "http");
880++ ubuntu_reset_system_proxy (dbus_proxy, "https");
881++ ubuntu_reset_system_proxy (dbus_proxy, "ftp");
882++ ubuntu_reset_system_proxy (dbus_proxy, "socks");
883++ break;
884++ case G_DESKTOP_PROXY_MODE_MANUAL:
885++ ubuntu_set_proxy_for_protocol (dbus_proxy, "http", g_settings_get_child (proxy->priv->settings, "http"));
886++ ubuntu_set_proxy_for_protocol (dbus_proxy, "https", g_settings_get_child (proxy->priv->settings, "https"));
887++ ubuntu_set_proxy_for_protocol (dbus_proxy, "ftp", g_settings_get_child (proxy->priv->settings, "ftp"));
888++ ubuntu_set_proxy_for_protocol (dbus_proxy, "socks", g_settings_get_child (proxy->priv->settings, "socks"));
889++ break;
890++ }
891++
892++ /* Free memory */
893++ g_object_unref (dbus_proxy);
894++}
895++
896+ static void
897+ net_proxy_init (NetProxy *proxy)
898+ {
899+@@ -427,6 +575,13 @@
900+ G_SETTINGS_BIND_DEFAULT, get_ignore_hosts, set_ignore_hosts,
901+ NULL, NULL);
902+
903++ /* Ubuntu button for system proxy settings */
904++ if (ubuntu_is_admin ()) {
905++ g_signal_connect (G_OBJECT (gtk_builder_get_object (proxy->priv->builder, "system_proxy_button")), "clicked",
906++ G_CALLBACK (ubuntu_on_proxy_apply_system_settings), proxy);
907++ } else
908++ gtk_widget_hide (GTK_WIDGET (gtk_builder_get_object (proxy->priv->builder, "system_proxy_button")));
909++
910+ /* hide the switch until we get some more detail in the mockup */
911+ widget = GTK_WIDGET (gtk_builder_get_object (proxy->priv->builder,
912+ "device_proxy_off_switch"));
913+--- a/panels/network/network-proxy.ui
914++++ b/panels/network/network-proxy.ui
915+@@ -229,6 +229,21 @@
916+ </packing>
917+ </child>
918+ <child>
919++ <object class="GtkButton" id="system_proxy_button">
920++ <property name="label" translatable="yes">Apply system wide</property>
921++ <property name="visible">True</property>
922++ <property name="can_focus">True</property>
923++ <property name="receives_default">True</property>
924++ <property name="use_action_appearance">False</property>
925++ </object>
926++ <packing>
927++ <property name="left_attach">0</property>
928++ <property name="top_attach">8</property>
929++ <property name="width">3</property>
930++ <property name="height">1</property>
931++ </packing>
932++ </child>
933++ <child>
934+ <object class="GtkLabel" id="label_proxy_warning">
935+ <property name="visible">False</property>
936+ <property name="can_focus">False</property>
937+@@ -239,7 +254,7 @@
938+ </object>
939+ <packing>
940+ <property name="left_attach">0</property>
941+- <property name="top_attach">8</property>
942++ <property name="top_attach">9</property>
943+ <property name="width">3</property>
944+ <property name="height">1</property>
945+ </packing>
946
947=== added file 'debian/patches/99_add_lock-on-suspend.patch'
948--- debian/patches/99_add_lock-on-suspend.patch 1970-01-01 00:00:00 +0000
949+++ debian/patches/99_add_lock-on-suspend.patch 2014-01-18 01:26:36 +0000
950@@ -0,0 +1,75 @@
951+Description: Add a new preference to lock the screen when the system suspends.
952+Author: Marc Deslauriers <marc.deslauriers@canonical.com>
953+Forwarded: no, likely a Ubuntu-specific preference
954+Bug-Ubuntu: https://bugs.launchpad.net/bugs/938076
955+
956+From: Tim Lunn <tim@feathertop.org>
957+Date: Mon, 3 Jun 2013 17:27:45 +1000
958+Subject: [PATCH] ubuntu lock on suspend
959+
960+---
961+ panels/privacy/cc-privacy-panel.c | 5 +++++
962+ panels/privacy/privacy.ui | 31 +++++++++++++++++++++++++++++++
963+ 2 files changed, 36 insertions(+)
964+
965+diff --git a/panels/privacy/cc-privacy-panel.c b/panels/privacy/cc-privacy-panel.c
966+index d92b9e4..fb1be4c 100644
967+--- a/panels/privacy/cc-privacy-panel.c
968++++ b/panels/privacy/cc-privacy-panel.c
969+@@ -299,6 +299,11 @@ add_screen_lock (CcPrivacyPanel *self)
970+ g_settings_bind (self->priv->notification_settings, "show-in-lock-screen",
971+ w, "active",
972+ G_SETTINGS_BIND_DEFAULT);
973++
974++ w = GTK_WIDGET (gtk_builder_get_object (self->priv->builder, "screen_lock_suspend"));
975++ g_settings_bind (self->priv->lock_settings, "ubuntu-lock-on-suspend",
976++ w, "active",
977++ G_SETTINGS_BIND_DEFAULT);
978+ }
979+
980+ static void
981+diff --git a/panels/privacy/privacy.ui b/panels/privacy/privacy.ui
982+index ec62b70..b5d43f4 100644
983+--- a/panels/privacy/privacy.ui
984++++ b/panels/privacy/privacy.ui
985+@@ -612,6 +612,37 @@
986+ <property name="height">1</property>
987+ </packing>
988+ </child>
989++ <child>
990++ <object class="GtkLabel" id="label8">
991++ <property name="visible">True</property>
992++ <property name="can_focus">False</property>
993++ <property name="xalign">0</property>
994++ <property name="hexpand">True</property>
995++ <property name="label" translatable="yes">Lock Screen on Suspend</property>
996++ <property name="use_underline">True</property>
997++ <property name="mnemonic_widget">screen_lock_suspend</property>
998++ </object>
999++ <packing>
1000++ <property name="left_attach">0</property>
1001++ <property name="top_attach">3</property>
1002++ <property name="width">1</property>
1003++ <property name="height">1</property>
1004++ </packing>
1005++ </child>
1006++ <child>
1007++ <object class="GtkSwitch" id="screen_lock_suspend">
1008++ <property name="visible">True</property>
1009++ <property name="can_focus">True</property>
1010++ <property name="halign">end</property>
1011++ <property name="valign">center</property>
1012++ </object>
1013++ <packing>
1014++ <property name="left_attach">1</property>
1015++ <property name="top_attach">3</property>
1016++ <property name="width">1</property>
1017++ <property name="height">1</property>
1018++ </packing>
1019++ </child>
1020+ </object>
1021+ <packing>
1022+ <property name="expand">False</property>
1023+--
1024+1.8.1.2
1025+
1026
1027=== added file 'debian/patches/git-background-lock-screen.patch'
1028--- debian/patches/git-background-lock-screen.patch 1970-01-01 00:00:00 +0000
1029+++ debian/patches/git-background-lock-screen.patch 2014-01-18 01:26:36 +0000
1030@@ -0,0 +1,862 @@
1031+From 5e7afdf89c5722f494ecaac6179e2aed256d1976 Mon Sep 17 00:00:00 2001
1032+From: Bastien Nocera <hadess@hadess.net>
1033+Date: Mon, 19 Aug 2013 21:00:48 +0200
1034+Subject: [PATCH] background: Add support for lock screen background
1035+
1036+https://bugzilla.gnome.org/show_bug.cgi?id=696166
1037+---
1038+ panels/background/background.ui | 289 +++++++++++++++++++++++++-------
1039+ panels/background/cc-background-panel.c | 208 ++++++++++++++++-------
1040+ 2 files changed, 375 insertions(+), 122 deletions(-)
1041+
1042+diff --git a/panels/background/background.ui b/panels/background/background.ui
1043+index 77e9968..2b72502 100644
1044+--- a/panels/background/background.ui
1045++++ b/panels/background/background.ui
1046+@@ -4,115 +4,286 @@
1047+ <object class="GtkHBox" id="background-panel">
1048+ <property name="visible">True</property>
1049+ <property name="can_focus">False</property>
1050++ <property name="margin_left">6</property>
1051++ <property name="margin_right">6</property>
1052++ <property name="margin_top">6</property>
1053++ <property name="margin_bottom">6</property>
1054+ <property name="border_width">10</property>
1055+ <property name="spacing">12</property>
1056+- <property name="margin-left">6</property>
1057+- <property name="margin-right">6</property>
1058+- <property name="margin-top">6</property>
1059+- <property name="margin-bottom">6</property>
1060+ <child>
1061+- <object class="GtkVBox" id="vbox3">
1062++ <object class="GtkBox" id="box1">
1063+ <property name="visible">True</property>
1064+ <property name="can_focus">False</property>
1065+- <property name="spacing">6</property>
1066++ <property name="margin_top">100</property>
1067++ <property name="margin_bottom">100</property>
1068+ <child>
1069+- <object class="GtkAspectFrame" id="aspectframe1">
1070++ <object class="GtkVBox" id="vbox3">
1071+ <property name="visible">True</property>
1072+ <property name="can_focus">False</property>
1073+- <property name="margin_left">12</property>
1074+- <property name="label_xalign">0</property>
1075+- <property name="shadow_type">none</property>
1076+ <child>
1077+- <object class="GtkButton" id="background-set-button">
1078+- <property name="use_action_appearance">False</property>
1079++ <object class="GtkAspectFrame" id="aspectframe1">
1080+ <property name="visible">True</property>
1081+- <property name="can_focus">True</property>
1082+- <property name="receives_default">True</property>
1083+- <property name="valign">center</property>
1084++ <property name="can_focus">False</property>
1085++ <property name="margin_right">12</property>
1086++ <property name="label_xalign">0</property>
1087++ <property name="shadow_type">none</property>
1088+ <child>
1089+- <object class="GtkDrawingArea" id="background-desktop-drawingarea">
1090+- <property name="width_request">417</property>
1091+- <property name="height_request">250</property>
1092++ <object class="GtkButton" id="background-set-button">
1093+ <property name="visible">True</property>
1094+- <property name="can_focus">False</property>
1095++ <property name="can_focus">True</property>
1096++ <property name="receives_default">True</property>
1097+ <property name="valign">center</property>
1098+- <property name="margin_left">6</property>
1099+- <property name="margin_right">6</property>
1100+- <property name="margin_top">6</property>
1101+- <property name="margin_bottom">6</property>
1102+- <property name="hexpand">True</property>
1103+- <property name="vexpand">True</property>
1104++ <child>
1105++ <object class="GtkBox" id="box2">
1106++ <property name="visible">True</property>
1107++ <property name="can_focus">False</property>
1108++ <property name="orientation">vertical</property>
1109++ <child>
1110++ <object class="GtkDrawingArea" id="background-desktop-drawingarea">
1111++ <property name="width_request">310</property>
1112++ <property name="height_request">170</property>
1113++ <property name="visible">True</property>
1114++ <property name="can_focus">False</property>
1115++ <property name="valign">center</property>
1116++ <property name="margin_left">6</property>
1117++ <property name="margin_right">6</property>
1118++ <property name="margin_top">6</property>
1119++ <property name="margin_bottom">6</property>
1120++ <property name="hexpand">True</property>
1121++ <property name="vexpand">True</property>
1122++ </object>
1123++ <packing>
1124++ <property name="expand">False</property>
1125++ <property name="fill">True</property>
1126++ <property name="position">0</property>
1127++ </packing>
1128++ </child>
1129++ <child>
1130++ <object class="GtkLabel" id="label1">
1131++ <property name="visible">True</property>
1132++ <property name="can_focus">False</property>
1133++ <property name="label" translatable="yes">Background</property>
1134++ </object>
1135++ <packing>
1136++ <property name="expand">False</property>
1137++ <property name="fill">True</property>
1138++ <property name="position">1</property>
1139++ </packing>
1140++ </child>
1141++ </object>
1142++ </child>
1143+ </object>
1144+ </child>
1145+ </object>
1146++ <packing>
1147++ <property name="expand">True</property>
1148++ <property name="fill">True</property>
1149++ <property name="position">0</property>
1150++ </packing>
1151+ </child>
1152+- </object>
1153+- <packing>
1154+- <property name="expand">True</property>
1155+- <property name="fill">True</property>
1156+- <property name="position">0</property>
1157+- </packing>
1158+- </child>
1159+- <child>
1160+- <object class="GtkHBox" id="bottom-hbox">
1161+- <property name="visible">True</property>
1162+- <property name="can_focus">False</property>
1163+- <property name="spacing">12</property>
1164+ <child>
1165+- <object class="GtkHBox" id="hbox2">
1166++ <object class="GtkHBox" id="bottom-hbox">
1167+ <property name="visible">True</property>
1168+ <property name="can_focus">False</property>
1169+- <property name="halign">center</property>
1170+- <property name="spacing">2</property>
1171++ <property name="spacing">12</property>
1172+ <child>
1173+- <object class="GtkImage" id="slide_image">
1174++ <object class="GtkHBox" id="hbox2">
1175+ <property name="visible">True</property>
1176+ <property name="can_focus">False</property>
1177+- <property name="icon_name">slideshow-symbolic</property>
1178++ <property name="halign">center</property>
1179++ <property name="margin_top">12</property>
1180++ <property name="spacing">2</property>
1181++ <child>
1182++ <object class="GtkImage" id="slide_image">
1183++ <property name="visible">True</property>
1184++ <property name="can_focus">False</property>
1185++ <property name="icon_name">slideshow-symbolic</property>
1186++ </object>
1187++ <packing>
1188++ <property name="expand">False</property>
1189++ <property name="fill">True</property>
1190++ <property name="position">0</property>
1191++ </packing>
1192++ </child>
1193++ <child>
1194++ <object class="GtkLabel" id="strut">
1195++ <property name="visible">True</property>
1196++ <property name="can_focus">False</property>
1197++ <property name="label"> </property>
1198++ </object>
1199++ <packing>
1200++ <property name="expand">False</property>
1201++ <property name="fill">True</property>
1202++ <property name="position">1</property>
1203++ </packing>
1204++ </child>
1205++ <child>
1206++ <object class="GtkLabel" id="slide-label">
1207++ <property name="visible">True</property>
1208++ <property name="can_focus">False</property>
1209++ <property name="xalign">0</property>
1210++ <property name="label" translatable="yes" comments="This refers to a slideshow background">Changes throughout the day</property>
1211++ </object>
1212++ <packing>
1213++ <property name="expand">False</property>
1214++ <property name="fill">True</property>
1215++ <property name="position">1</property>
1216++ </packing>
1217++ </child>
1218+ </object>
1219+ <packing>
1220+- <property name="expand">False</property>
1221++ <property name="expand">True</property>
1222+ <property name="fill">True</property>
1223+ <property name="position">0</property>
1224+ </packing>
1225+ </child>
1226++ </object>
1227++ <packing>
1228++ <property name="expand">False</property>
1229++ <property name="fill">True</property>
1230++ <property name="position">2</property>
1231++ </packing>
1232++ </child>
1233++ </object>
1234++ <packing>
1235++ <property name="expand">False</property>
1236++ <property name="fill">True</property>
1237++ <property name="position">0</property>
1238++ </packing>
1239++ </child>
1240++ <child>
1241++ <object class="GtkVBox" id="vbox1">
1242++ <property name="visible">True</property>
1243++ <property name="can_focus">False</property>
1244++ <child>
1245++ <object class="GtkAspectFrame" id="aspectframe2">
1246++ <property name="visible">True</property>
1247++ <property name="can_focus">False</property>
1248++ <property name="margin_left">12</property>
1249++ <property name="label_xalign">0</property>
1250++ <property name="shadow_type">none</property>
1251+ <child>
1252+- <object class="GtkLabel" id="strut">
1253++ <object class="GtkButton" id="background-lock-set-button">
1254+ <property name="visible">True</property>
1255+- <property name="can_focus">False</property>
1256+- <property name="label"> </property>
1257++ <property name="can_focus">True</property>
1258++ <property name="receives_default">True</property>
1259++ <property name="valign">center</property>
1260++ <child>
1261++ <object class="GtkBox" id="box3">
1262++ <property name="visible">True</property>
1263++ <property name="can_focus">False</property>
1264++ <property name="orientation">vertical</property>
1265++ <child>
1266++ <object class="GtkDrawingArea" id="background-lock-drawingarea">
1267++ <property name="width_request">310</property>
1268++ <property name="height_request">170</property>
1269++ <property name="visible">True</property>
1270++ <property name="can_focus">False</property>
1271++ <property name="valign">center</property>
1272++ <property name="margin_left">6</property>
1273++ <property name="margin_right">6</property>
1274++ <property name="margin_top">6</property>
1275++ <property name="margin_bottom">6</property>
1276++ <property name="hexpand">True</property>
1277++ <property name="vexpand">True</property>
1278++ </object>
1279++ <packing>
1280++ <property name="expand">False</property>
1281++ <property name="fill">True</property>
1282++ <property name="position">0</property>
1283++ </packing>
1284++ </child>
1285++ <child>
1286++ <object class="GtkLabel" id="label2">
1287++ <property name="visible">True</property>
1288++ <property name="can_focus">False</property>
1289++ <property name="label" translatable="yes">Lock Screen</property>
1290++ </object>
1291++ <packing>
1292++ <property name="expand">False</property>
1293++ <property name="fill">True</property>
1294++ <property name="position">1</property>
1295++ </packing>
1296++ </child>
1297++ </object>
1298++ </child>
1299+ </object>
1300+- <packing>
1301+- <property name="expand">False</property>
1302+- <property name="fill">True</property>
1303+- <property name="position">1</property>
1304+- </packing>
1305+ </child>
1306++ </object>
1307++ <packing>
1308++ <property name="expand">True</property>
1309++ <property name="fill">True</property>
1310++ <property name="position">0</property>
1311++ </packing>
1312++ </child>
1313++ <child>
1314++ <object class="GtkHBox" id="bottom-hbox1">
1315++ <property name="visible">True</property>
1316++ <property name="can_focus">False</property>
1317++ <property name="spacing">12</property>
1318+ <child>
1319+- <object class="GtkLabel" id="slide-label">
1320++ <object class="GtkHBox" id="hbox1">
1321+ <property name="visible">True</property>
1322+ <property name="can_focus">False</property>
1323+- <property name="xalign">0</property>
1324+- <property name="label" translatable="yes" comments="This refers to a slideshow background">Changes throughout the day</property>
1325++ <property name="halign">center</property>
1326++ <property name="margin_top">12</property>
1327++ <property name="spacing">2</property>
1328++ <child>
1329++ <object class="GtkImage" id="slide_image1">
1330++ <property name="visible">True</property>
1331++ <property name="can_focus">False</property>
1332++ <property name="icon_name">slideshow-symbolic</property>
1333++ </object>
1334++ <packing>
1335++ <property name="expand">False</property>
1336++ <property name="fill">True</property>
1337++ <property name="position">0</property>
1338++ </packing>
1339++ </child>
1340++ <child>
1341++ <object class="GtkLabel" id="strut1">
1342++ <property name="visible">True</property>
1343++ <property name="can_focus">False</property>
1344++ <property name="label"> </property>
1345++ </object>
1346++ <packing>
1347++ <property name="expand">False</property>
1348++ <property name="fill">True</property>
1349++ <property name="position">1</property>
1350++ </packing>
1351++ </child>
1352++ <child>
1353++ <object class="GtkLabel" id="slide-label1">
1354++ <property name="visible">True</property>
1355++ <property name="can_focus">False</property>
1356++ <property name="xalign">0</property>
1357++ <property name="label" translatable="yes" comments="This refers to a slideshow background">Changes throughout the day</property>
1358++ </object>
1359++ <packing>
1360++ <property name="expand">False</property>
1361++ <property name="fill">True</property>
1362++ <property name="position">1</property>
1363++ </packing>
1364++ </child>
1365+ </object>
1366+ <packing>
1367+- <property name="expand">False</property>
1368++ <property name="expand">True</property>
1369+ <property name="fill">True</property>
1370+- <property name="position">1</property>
1371++ <property name="position">0</property>
1372+ </packing>
1373+ </child>
1374+ </object>
1375+ <packing>
1376+- <property name="expand">True</property>
1377++ <property name="expand">False</property>
1378+ <property name="fill">True</property>
1379+- <property name="position">0</property>
1380++ <property name="position">2</property>
1381+ </packing>
1382+ </child>
1383+ </object>
1384+ <packing>
1385+ <property name="expand">False</property>
1386+ <property name="fill">True</property>
1387+- <property name="position">2</property>
1388++ <property name="position">1</property>
1389+ </packing>
1390+ </child>
1391+ </object>
1392+diff --git a/panels/background/cc-background-panel.c b/panels/background/cc-background-panel.c
1393+index 14fa244..8de6e23 100644
1394+--- a/panels/background/cc-background-panel.c
1395++++ b/panels/background/cc-background-panel.c
1396+@@ -38,6 +38,7 @@
1397+ #include "bg-pictures-source.h"
1398+
1399+ #define WP_PATH_ID "org.gnome.desktop.background"
1400++#define WP_LOCK_PATH_ID "org.gnome.desktop.screensaver"
1401+ #define WP_URI_KEY "picture-uri"
1402+ #define WP_OPTIONS_KEY "picture-options"
1403+ #define WP_SHADING_KEY "color-shading-type"
1404+@@ -55,10 +56,12 @@ struct _CcBackgroundPanelPrivate
1405+ GDBusConnection *connection;
1406+
1407+ GSettings *settings;
1408++ GSettings *lock_settings;
1409+
1410+ GnomeDesktopThumbnailFactory *thumb_factory;
1411+
1412+ CcBackgroundItem *current_background;
1413++ CcBackgroundItem *current_lock_background;
1414+
1415+ GCancellable *copy_cancellable;
1416+ GCancellable *capture_cancellable;
1417+@@ -71,6 +74,8 @@ struct _CcBackgroundPanelPrivate
1418+ };
1419+
1420+ #define WID(y) (GtkWidget *) gtk_builder_get_object (priv->builder, y)
1421++#define CURRENT_BG (settings == priv->settings ? priv->current_background : priv->current_lock_background)
1422++#define SAVE_PATH (settings == priv->settings ? "last-edited.xml" : "last-edited-lock.xml")
1423+
1424+ static const char *
1425+ cc_background_panel_get_help_uri (CcPanel *panel)
1426+@@ -89,6 +94,7 @@ cc_background_panel_dispose (GObject *object)
1427+ priv->spinner = NULL;
1428+
1429+ g_clear_object (&priv->settings);
1430++ g_clear_object (&priv->lock_settings);
1431+
1432+ if (priv->copy_cancellable)
1433+ {
1434+@@ -131,6 +137,7 @@ cc_background_panel_finalize (GObject *object)
1435+ CcBackgroundPanelPrivate *priv = CC_BACKGROUND_PANEL (object)->priv;
1436+
1437+ g_clear_object (&priv->current_background);
1438++ g_clear_object (&priv->current_lock_background);
1439+
1440+ G_OBJECT_CLASS (cc_background_panel_parent_class)->finalize (object);
1441+ }
1442+@@ -151,59 +158,77 @@ cc_background_panel_class_init (CcBackgroundPanelClass *klass)
1443+
1444+ static void
1445+ update_preview (CcBackgroundPanelPrivate *priv,
1446++ GSettings *settings,
1447+ CcBackgroundItem *item)
1448+ {
1449+ gboolean changes_with_time;
1450++ CcBackgroundItem *current_background;
1451++
1452++ current_background = CURRENT_BG;
1453+
1454+- if (item && priv->current_background)
1455++ if (item && current_background)
1456+ {
1457+- g_object_unref (priv->current_background);
1458+- priv->current_background = cc_background_item_copy (item);
1459+- cc_background_item_load (priv->current_background, NULL);
1460++ g_object_unref (current_background);
1461++ current_background = cc_background_item_copy (item);
1462++ if (settings == priv->settings)
1463++ priv->current_background = current_background;
1464++ else
1465++ priv->current_lock_background = current_background;
1466++ cc_background_item_load (current_background, NULL);
1467+ }
1468+
1469+ changes_with_time = FALSE;
1470+
1471+- if (priv->current_background)
1472++ if (current_background)
1473+ {
1474+- changes_with_time = cc_background_item_changes_with_time (priv->current_background);
1475++ changes_with_time = cc_background_item_changes_with_time (current_background);
1476+ }
1477+
1478+- gtk_widget_set_visible (WID ("slide_image"), changes_with_time);
1479+- gtk_widget_set_visible (WID ("slide-label"), changes_with_time);
1480++ if (settings == priv->settings)
1481++ {
1482++ gtk_widget_set_visible (WID ("slide_image"), changes_with_time);
1483++ gtk_widget_set_visible (WID ("slide-label"), changes_with_time);
1484++
1485++ gtk_widget_queue_draw (WID ("background-desktop-drawingarea"));
1486++ }
1487++ else
1488++ {
1489++ gtk_widget_set_visible (WID ("slide_image1"), changes_with_time);
1490++ gtk_widget_set_visible (WID ("slide-label1"), changes_with_time);
1491+
1492+- gtk_widget_queue_draw (WID ("background-desktop-drawingarea"));
1493++ gtk_widget_queue_draw (WID ("background-lock-drawingarea"));
1494++ }
1495+ }
1496+
1497+ static char *
1498+-get_save_path (void)
1499++get_save_path (const char *filename)
1500+ {
1501+ return g_build_filename (g_get_user_config_dir (),
1502+ "gnome-control-center",
1503+ "backgrounds",
1504+- "last-edited.xml",
1505++ filename,
1506+ NULL);
1507+ }
1508+
1509+ static void
1510+-update_display_preview (CcBackgroundPanel *panel)
1511++update_display_preview (CcBackgroundPanel *panel,
1512++ GtkWidget *widget,
1513++ CcBackgroundItem *current_background)
1514+ {
1515+ CcBackgroundPanelPrivate *priv = panel->priv;
1516+- GtkWidget *widget;
1517+ GtkAllocation allocation;
1518+- const gint preview_width = 416;
1519+- const gint preview_height = 248;
1520++ const gint preview_width = 309;
1521++ const gint preview_height = 168;
1522+ GdkPixbuf *pixbuf;
1523+ GIcon *icon;
1524+ cairo_t *cr;
1525+
1526+- widget = WID ("background-desktop-drawingarea");
1527+ gtk_widget_get_allocation (widget, &allocation);
1528+
1529+- if (!priv->current_background)
1530++ if (!current_background)
1531+ return;
1532+
1533+- icon = cc_background_item_get_frame_thumbnail (priv->current_background,
1534++ icon = cc_background_item_get_frame_thumbnail (current_background,
1535+ priv->thumb_factory,
1536+ preview_width,
1537+ preview_height,
1538+@@ -218,11 +243,14 @@ update_display_preview (CcBackgroundPanel *panel)
1539+ g_object_unref (pixbuf);
1540+
1541+ pixbuf = NULL;
1542+- if (panel->priv->display_screenshot != NULL)
1543+- pixbuf = gdk_pixbuf_scale_simple (panel->priv->display_screenshot,
1544+- preview_width,
1545+- preview_height,
1546+- GDK_INTERP_BILINEAR);
1547++ if (current_background == priv->current_background &&
1548++ panel->priv->display_screenshot != NULL)
1549++ {
1550++ pixbuf = gdk_pixbuf_scale_simple (panel->priv->display_screenshot,
1551++ preview_width,
1552++ preview_height,
1553++ GDK_INTERP_BILINEAR);
1554++ }
1555+
1556+ if (pixbuf)
1557+ {
1558+@@ -271,6 +299,7 @@ on_screenshot_finished (GObject *source,
1559+ error->message);
1560+ g_error_free (error);
1561+ /* fallback? */
1562++ priv = panel->priv;
1563+ goto out;
1564+ }
1565+ g_variant_unref (result);
1566+@@ -322,7 +351,7 @@ on_screenshot_finished (GObject *source,
1567+ cairo_surface_destroy (surface);
1568+
1569+ out:
1570+- update_display_preview (panel);
1571++ update_display_preview (panel, WID ("background-desktop-drawingarea"), priv->current_background);
1572+ }
1573+
1574+ static gboolean
1575+@@ -407,6 +436,7 @@ on_preview_draw (GtkWidget *widget,
1576+ cairo_t *cr,
1577+ CcBackgroundPanel *panel)
1578+ {
1579++ CcBackgroundPanelPrivate *priv = panel->priv;
1580+ /* we have another shot in flight or an existing cache */
1581+ if (panel->priv->display_screenshot == NULL
1582+ && panel->priv->screenshot_path == NULL)
1583+@@ -414,13 +444,24 @@ on_preview_draw (GtkWidget *widget,
1584+ get_screenshot_async (panel);
1585+ }
1586+ else
1587+- update_display_preview (panel);
1588++ update_display_preview (panel, widget, priv->current_background);
1589++
1590++ return TRUE;
1591++}
1592+
1593++static gboolean
1594++on_lock_preview_draw (GtkWidget *widget,
1595++ cairo_t *cr,
1596++ CcBackgroundPanel *panel)
1597++{
1598++ CcBackgroundPanelPrivate *priv = panel->priv;
1599++ update_display_preview (panel, widget, priv->current_lock_background);
1600+ return TRUE;
1601+ }
1602+
1603+ static void
1604+-reload_current_bg (CcBackgroundPanel *self)
1605++reload_current_bg (CcBackgroundPanel *self,
1606++ GSettings *settings)
1607+ {
1608+ CcBackgroundPanelPrivate *priv;
1609+ CcBackgroundItem *saved, *configured;
1610+@@ -429,12 +470,12 @@ reload_current_bg (CcBackgroundPanel *self)
1611+ priv = self->priv;
1612+
1613+ /* Load the saved configuration */
1614+- uri = get_save_path ();
1615++ uri = get_save_path (SAVE_PATH);
1616+ saved = cc_background_xml_get_item (uri);
1617+ g_free (uri);
1618+
1619+ /* initalise the current background information from settings */
1620+- uri = g_settings_get_string (priv->settings, WP_URI_KEY);
1621++ uri = g_settings_get_string (settings, WP_URI_KEY);
1622+ if (uri && *uri == '\0')
1623+ {
1624+ g_free (uri);
1625+@@ -450,12 +491,12 @@ reload_current_bg (CcBackgroundPanel *self)
1626+ configured = cc_background_item_new (uri);
1627+ g_free (uri);
1628+
1629+- pcolor = g_settings_get_string (priv->settings, WP_PCOLOR_KEY);
1630+- scolor = g_settings_get_string (priv->settings, WP_SCOLOR_KEY);
1631++ pcolor = g_settings_get_string (settings, WP_PCOLOR_KEY);
1632++ scolor = g_settings_get_string (settings, WP_SCOLOR_KEY);
1633+ g_object_set (G_OBJECT (configured),
1634+ "name", _("Current background"),
1635+- "placement", g_settings_get_enum (priv->settings, WP_OPTIONS_KEY),
1636+- "shading", g_settings_get_enum (priv->settings, WP_SHADING_KEY),
1637++ "placement", g_settings_get_enum (settings, WP_OPTIONS_KEY),
1638++ "shading", g_settings_get_enum (settings, WP_SHADING_KEY),
1639+ "primary-color", pcolor,
1640+ "secondary-color", scolor,
1641+ NULL);
1642+@@ -479,9 +520,17 @@ reload_current_bg (CcBackgroundPanel *self)
1643+ if (saved != NULL)
1644+ g_object_unref (saved);
1645+
1646+- g_clear_object (&priv->current_background);
1647+- priv->current_background = configured;
1648+- cc_background_item_load (priv->current_background, NULL);
1649++ if (settings == priv->settings)
1650++ {
1651++ g_clear_object (&priv->current_background);
1652++ priv->current_background = configured;
1653++ }
1654++ else
1655++ {
1656++ g_clear_object (&priv->current_lock_background);
1657++ priv->current_lock_background = configured;
1658++ }
1659++ cc_background_item_load (configured, NULL);
1660+ }
1661+
1662+ static gboolean
1663+@@ -512,6 +561,8 @@ copy_finished_cb (GObject *source_object,
1664+ CcBackgroundPanel *panel = (CcBackgroundPanel *) pointer;
1665+ CcBackgroundPanelPrivate *priv = panel->priv;
1666+ CcBackgroundItem *item;
1667++ CcBackgroundItem *current_background;
1668++ GSettings *settings;
1669+
1670+ if (!g_file_copy_finish (G_FILE (source_object), result, &err))
1671+ {
1672+@@ -523,8 +574,10 @@ copy_finished_cb (GObject *source_object,
1673+ g_error_free (err);
1674+ }
1675+ item = g_object_get_data (source_object, "item");
1676++ settings = g_object_get_data (source_object, "settings");
1677++ current_background = CURRENT_BG;
1678+
1679+- g_settings_apply (priv->settings);
1680++ g_settings_apply (settings);
1681+
1682+ /* the panel may have been destroyed before the callback is run, so be sure
1683+ * to check the widgets are not NULL */
1684+@@ -535,19 +588,19 @@ copy_finished_cb (GObject *source_object,
1685+ priv->spinner = NULL;
1686+ }
1687+
1688+- if (priv->current_background)
1689+- cc_background_item_load (priv->current_background, NULL);
1690++ if (current_background)
1691++ cc_background_item_load (current_background, NULL);
1692+
1693+ if (priv->builder)
1694+ {
1695+ char *filename;
1696+
1697+- update_preview (priv, item);
1698++ update_preview (priv, settings, item);
1699+
1700+ /* Save the source XML if there is one */
1701+- filename = get_save_path ();
1702++ filename = get_save_path (SAVE_PATH);
1703+ if (create_save_dir ())
1704+- cc_background_xml_save (priv->current_background, filename);
1705++ cc_background_xml_save (current_background, filename);
1706+ }
1707+
1708+ /* remove the reference taken when the copy was set up */
1709+@@ -556,6 +609,7 @@ copy_finished_cb (GObject *source_object,
1710+
1711+ static void
1712+ set_background (CcBackgroundPanel *panel,
1713++ GSettings *settings,
1714+ CcBackgroundItem *item)
1715+ {
1716+ CcBackgroundPanelPrivate *priv = panel->priv;
1717+@@ -573,8 +627,8 @@ set_background (CcBackgroundPanel *panel,
1718+
1719+ if ((flags & CC_BACKGROUND_ITEM_HAS_URI) && uri == NULL)
1720+ {
1721+- g_settings_set_enum (priv->settings, WP_OPTIONS_KEY, G_DESKTOP_BACKGROUND_STYLE_NONE);
1722+- g_settings_set_string (priv->settings, WP_URI_KEY, "");
1723++ g_settings_set_enum (settings, WP_OPTIONS_KEY, G_DESKTOP_BACKGROUND_STYLE_NONE);
1724++ g_settings_set_string (settings, WP_URI_KEY, "");
1725+ }
1726+ else if (cc_background_item_get_source_url (item) != NULL &&
1727+ cc_background_item_get_needs_download (item))
1728+@@ -631,6 +685,7 @@ set_background (CcBackgroundPanel *panel,
1729+ * finished */
1730+ g_object_ref (panel);
1731+ g_object_set_data_full (G_OBJECT (source), "item", g_object_ref (item), g_object_unref);
1732++ g_object_set_data (G_OBJECT (source), "settings", settings);
1733+ g_file_copy_async (source, dest, G_FILE_COPY_OVERWRITE,
1734+ G_PRIORITY_DEFAULT, priv->copy_cancellable,
1735+ NULL, NULL,
1736+@@ -639,7 +694,7 @@ set_background (CcBackgroundPanel *panel,
1737+ dest_uri = g_file_get_uri (dest);
1738+ g_object_unref (dest);
1739+
1740+- g_settings_set_string (priv->settings, WP_URI_KEY, dest_uri);
1741++ g_settings_set_string (settings, WP_URI_KEY, dest_uri);
1742+ g_object_set (G_OBJECT (item),
1743+ "uri", dest_uri,
1744+ "needs-download", FALSE,
1745+@@ -653,37 +708,37 @@ set_background (CcBackgroundPanel *panel,
1746+ }
1747+ else
1748+ {
1749+- g_settings_set_string (priv->settings, WP_URI_KEY, uri);
1750++ g_settings_set_string (settings, WP_URI_KEY, uri);
1751+ }
1752+
1753+ /* Also set the placement if we have a URI and the previous value was none */
1754+ if (flags & CC_BACKGROUND_ITEM_HAS_PLACEMENT)
1755+ {
1756+- g_settings_set_enum (priv->settings, WP_OPTIONS_KEY, cc_background_item_get_placement (item));
1757++ g_settings_set_enum (settings, WP_OPTIONS_KEY, cc_background_item_get_placement (item));
1758+ }
1759+ else if (uri != NULL)
1760+ {
1761+- style = g_settings_get_enum (priv->settings, WP_OPTIONS_KEY);
1762++ style = g_settings_get_enum (settings, WP_OPTIONS_KEY);
1763+ if (style == G_DESKTOP_BACKGROUND_STYLE_NONE)
1764+- g_settings_set_enum (priv->settings, WP_OPTIONS_KEY, cc_background_item_get_placement (item));
1765++ g_settings_set_enum (settings, WP_OPTIONS_KEY, cc_background_item_get_placement (item));
1766+ }
1767+
1768+ if (flags & CC_BACKGROUND_ITEM_HAS_SHADING)
1769+- g_settings_set_enum (priv->settings, WP_SHADING_KEY, cc_background_item_get_shading (item));
1770++ g_settings_set_enum (settings, WP_SHADING_KEY, cc_background_item_get_shading (item));
1771+
1772+- g_settings_set_string (priv->settings, WP_PCOLOR_KEY, cc_background_item_get_pcolor (item));
1773+- g_settings_set_string (priv->settings, WP_SCOLOR_KEY, cc_background_item_get_scolor (item));
1774++ g_settings_set_string (settings, WP_PCOLOR_KEY, cc_background_item_get_pcolor (item));
1775++ g_settings_set_string (settings, WP_SCOLOR_KEY, cc_background_item_get_scolor (item));
1776+
1777+ /* update the preview information */
1778+ if (save_settings != FALSE)
1779+ {
1780+ /* Apply all changes */
1781+- g_settings_apply (priv->settings);
1782++ g_settings_apply (settings);
1783+
1784+ /* Save the source XML if there is one */
1785+- filename = get_save_path ();
1786++ filename = get_save_path (SAVE_PATH);
1787+ if (create_save_dir ())
1788+- cc_background_xml_save (priv->current_background, filename);
1789++ cc_background_xml_save (CURRENT_BG, filename);
1790+ }
1791+ }
1792+
1793+@@ -699,7 +754,7 @@ on_chooser_dialog_response (GtkDialog *dialog,
1794+ item = cc_background_chooser_dialog_get_item (CC_BACKGROUND_CHOOSER_DIALOG (dialog));
1795+ if (item != NULL)
1796+ {
1797+- set_background (self, item);
1798++ set_background (self, g_object_get_data (G_OBJECT (dialog), "settings"), item);
1799+ g_object_unref (item);
1800+ }
1801+ }
1802+@@ -708,13 +763,14 @@ on_chooser_dialog_response (GtkDialog *dialog,
1803+ }
1804+
1805+ static void
1806+-on_background_button_clicked (GtkButton *button,
1807+- CcBackgroundPanel *self)
1808++launch_chooser (CcBackgroundPanel *self,
1809++ GSettings *settings)
1810+ {
1811+ CcBackgroundPanelPrivate *priv = self->priv;
1812+ GtkWidget *dialog;
1813+
1814+ dialog = cc_background_chooser_dialog_new ();
1815++ g_object_set_data (G_OBJECT (dialog), "settings", settings);
1816+ gtk_window_set_transient_for (GTK_WINDOW (dialog),
1817+ GTK_WINDOW (gtk_widget_get_toplevel (WID ("background-panel"))));
1818+ gtk_widget_show (dialog);
1819+@@ -724,12 +780,26 @@ on_background_button_clicked (GtkButton *button,
1820+ }
1821+
1822+ static void
1823++on_background_button_clicked (GtkButton *button,
1824++ CcBackgroundPanel *self)
1825++{
1826++ launch_chooser (self, self->priv->settings);
1827++}
1828++
1829++static void
1830++on_lock_button_clicked (GtkButton *button,
1831++ CcBackgroundPanel *self)
1832++{
1833++ launch_chooser (self, self->priv->lock_settings);
1834++}
1835++
1836++static void
1837+ on_settings_changed (GSettings *settings,
1838+ gchar *key,
1839+ CcBackgroundPanel *self)
1840+ {
1841+- reload_current_bg (self);
1842+- update_preview (self->priv, NULL);
1843++ reload_current_bg (self, settings);
1844++ update_preview (self->priv, settings, NULL);
1845+ }
1846+
1847+ static void
1848+@@ -760,6 +830,9 @@ cc_background_panel_init (CcBackgroundPanel *self)
1849+ priv->settings = g_settings_new (WP_PATH_ID);
1850+ g_settings_delay (priv->settings);
1851+
1852++ priv->lock_settings = g_settings_new (WP_LOCK_PATH_ID);
1853++ g_settings_delay (priv->lock_settings);
1854++
1855+ /* add the top level widget */
1856+ widget = WID ("background-panel");
1857+
1858+@@ -768,19 +841,28 @@ cc_background_panel_init (CcBackgroundPanel *self)
1859+
1860+ /* setup preview area */
1861+ widget = WID ("background-desktop-drawingarea");
1862+- g_signal_connect (widget, "draw", G_CALLBACK (on_preview_draw),
1863+- self);
1864++ g_signal_connect (widget, "draw", G_CALLBACK (on_preview_draw), self);
1865++ widget = WID ("background-lock-drawingarea");
1866++ g_signal_connect (widget, "draw", G_CALLBACK (on_lock_preview_draw), self);
1867+
1868+ priv->copy_cancellable = g_cancellable_new ();
1869+ priv->capture_cancellable = g_cancellable_new ();
1870+
1871+ priv->thumb_factory = gnome_desktop_thumbnail_factory_new (GNOME_DESKTOP_THUMBNAIL_SIZE_LARGE);
1872+
1873+- reload_current_bg (self);
1874+- update_preview (priv, NULL);
1875++ /* Load the backgrounds */
1876++ reload_current_bg (self, priv->settings);
1877++ update_preview (priv, priv->settings, NULL);
1878++ reload_current_bg (self, priv->lock_settings);
1879++ update_preview (priv, priv->lock_settings, NULL);
1880+
1881++ /* Background settings */
1882+ g_signal_connect (priv->settings, "changed", G_CALLBACK (on_settings_changed), self);
1883++ g_signal_connect (priv->lock_settings, "changed", G_CALLBACK (on_settings_changed), self);
1884+
1885++ /* Background buttons */
1886+ widget = WID ("background-set-button");
1887+ g_signal_connect (widget, "clicked", G_CALLBACK (on_background_button_clicked), self);
1888++ widget = WID ("background-lock-set-button");
1889++ g_signal_connect (widget, "clicked", G_CALLBACK (on_lock_button_clicked), self);
1890+ }
1891+--
1892+1.8.3.1
1893
1894=== added file 'debian/patches/git-background-remove-unused-widget.patch'
1895--- debian/patches/git-background-remove-unused-widget.patch 1970-01-01 00:00:00 +0000
1896+++ debian/patches/git-background-remove-unused-widget.patch 2014-01-18 01:26:36 +0000
1897@@ -0,0 +1,111 @@
1898+From dd56de9653361d17a300aeb7872f152a7e2de356 Mon Sep 17 00:00:00 2001
1899+From: Bastien Nocera <hadess@hadess.net>
1900+Date: Mon, 19 Aug 2013 20:55:29 +0200
1901+Subject: [PATCH] background: Remove unused "lock" preview widgets
1902+
1903+https://bugzilla.gnome.org/show_bug.cgi?id=696166
1904+---
1905+ panels/background/background.ui | 60 ++++++++++-------------------------------
1906+ 1 file changed, 14 insertions(+), 46 deletions(-)
1907+
1908+diff --git a/panels/background/background.ui b/panels/background/background.ui
1909+index 651cf69..77e9968 100644
1910+--- a/panels/background/background.ui
1911++++ b/panels/background/background.ui
1912+@@ -30,48 +30,18 @@
1913+ <property name="receives_default">True</property>
1914+ <property name="valign">center</property>
1915+ <child>
1916+- <object class="GtkBox" id="box1">
1917++ <object class="GtkDrawingArea" id="background-desktop-drawingarea">
1918++ <property name="width_request">417</property>
1919++ <property name="height_request">250</property>
1920+ <property name="visible">True</property>
1921+ <property name="can_focus">False</property>
1922++ <property name="valign">center</property>
1923++ <property name="margin_left">6</property>
1924++ <property name="margin_right">6</property>
1925++ <property name="margin_top">6</property>
1926++ <property name="margin_bottom">6</property>
1927+ <property name="hexpand">True</property>
1928+- <property name="spacing">18</property>
1929+- <child>
1930+- <object class="GtkDrawingArea" id="background-desktop-drawingarea">
1931+- <property name="width_request">417</property>
1932+- <property name="height_request">250</property>
1933+- <property name="visible">True</property>
1934+- <property name="can_focus">False</property>
1935+- <property name="valign">center</property>
1936+- <property name="margin_left">6</property>
1937+- <property name="margin_right">6</property>
1938+- <property name="margin_top">6</property>
1939+- <property name="margin_bottom">6</property>
1940+- <property name="hexpand">True</property>
1941+- <property name="vexpand">True</property>
1942+- </object>
1943+- <packing>
1944+- <property name="expand">True</property>
1945+- <property name="fill">True</property>
1946+- <property name="position">0</property>
1947+- </packing>
1948+- </child>
1949+- <child>
1950+- <object class="GtkDrawingArea" id="background-lock-drawingarea">
1951+- <property name="can_focus">False</property>
1952+- <property name="no_show_all">True</property>
1953+- <property name="valign">center</property>
1954+- <property name="margin_left">6</property>
1955+- <property name="margin_right">6</property>
1956+- <property name="margin_top">6</property>
1957+- <property name="hexpand">True</property>
1958+- <property name="vexpand">True</property>
1959+- </object>
1960+- <packing>
1961+- <property name="expand">True</property>
1962+- <property name="fill">True</property>
1963+- <property name="position">1</property>
1964+- </packing>
1965+- </child>
1966++ <property name="vexpand">True</property>
1967+ </object>
1968+ </child>
1969+ </object>
1970+@@ -107,11 +77,10 @@
1971+ </packing>
1972+ </child>
1973+ <child>
1974+- <object class="GtkLabel" id="slide-label">
1975++ <object class="GtkLabel" id="strut">
1976+ <property name="visible">True</property>
1977+ <property name="can_focus">False</property>
1978+- <property name="xalign">0</property>
1979+- <property name="label" translatable="yes" comments="This refers to a slideshow background">Changes throughout the day</property>
1980++ <property name="label"> </property>
1981+ </object>
1982+ <packing>
1983+ <property name="expand">False</property>
1984+@@ -120,10 +89,11 @@
1985+ </packing>
1986+ </child>
1987+ <child>
1988+- <object class="GtkLabel" id="strut">
1989++ <object class="GtkLabel" id="slide-label">
1990+ <property name="visible">True</property>
1991+ <property name="can_focus">False</property>
1992+- <property name="label"> </property>
1993++ <property name="xalign">0</property>
1994++ <property name="label" translatable="yes" comments="This refers to a slideshow background">Changes throughout the day</property>
1995+ </object>
1996+ <packing>
1997+ <property name="expand">False</property>
1998+@@ -200,8 +170,6 @@
1999+ <object class="GtkSizeGroup" id="sizegroup">
2000+ <property name="mode">vertical</property>
2001+ <widgets>
2002+- <widget name="sources-combobox"/>
2003+- <widget name="heading-hbox"/>
2004+ <widget name="slide-label"/>
2005+ <widget name="strut"/>
2006+ </widgets>
2007+--
2008+1.8.3.1
2009
2010=== added file 'debian/patches/git_rename_natural_scrolling.patch'
2011--- debian/patches/git_rename_natural_scrolling.patch 1970-01-01 00:00:00 +0000
2012+++ debian/patches/git_rename_natural_scrolling.patch 2014-01-18 01:26:36 +0000
2013@@ -0,0 +1,26 @@
2014+From 92148a4be791614eaf4582ea540cff82e27134de Mon Sep 17 00:00:00 2001
2015+From: Ondrej Holy <oholy@redhat.com>
2016+Date: Tue, 11 Jun 2013 12:58:28 +0000
2017+Subject: mouse: Rename "Content sticks to fingers"
2018+
2019+...to "Natural scrolling". The previous name was a little bit
2020+disgusting, and people didn't understand its purpose. Using the
2021+same name as OSX means that people will either know it, or be less
2022+afraid of testing it.
2023+
2024+https://bugzilla.gnome.org/show_bug.cgi?id=689128
2025+---
2026+diff --git a/panels/mouse/gnome-mouse-properties.ui b/panels/mouse/gnome-mouse-properties.ui
2027+index cd77080..3735903 100644
2028+--- a/panels/mouse/gnome-mouse-properties.ui
2029++++ b/panels/mouse/gnome-mouse-properties.ui
2030+@@ -655,7 +655,7 @@
2031+ </child>
2032+ <child>
2033+ <object class="GtkCheckButton" id="natural_scroll_toggle">
2034+- <property name="label" translatable="yes">C_ontent sticks to fingers</property>
2035++ <property name="label" translatable="yes" comments="Translators: This switch reverses the scrolling direction for touchpads. The term used comes from OS X so use the same translation if possible. ">_Natural scrolling</property>
2036+ <property name="use_action_appearance">False</property>
2037+ <property name="visible">True</property>
2038+ <property name="can_focus">True</property>
2039+
2040
2041=== added file 'debian/patches/revert_git_dont_hide_zoom.patch'
2042--- debian/patches/revert_git_dont_hide_zoom.patch 1970-01-01 00:00:00 +0000
2043+++ debian/patches/revert_git_dont_hide_zoom.patch 2014-01-18 01:26:36 +0000
2044@@ -0,0 +1,78 @@
2045+From c384570bace7055e5fb6b7e9208086e749fd325d Mon Sep 17 00:00:00 2001
2046+From: Bastien Nocera <hadess@hadess.net>
2047+Date: Fri, 09 Nov 2012 13:30:39 +0000
2048+Subject: universal-access: Always show the zoom options
2049+
2050+Now that the fallback mode is gone. #fallback
2051+
2052+https://bugzilla.gnome.org/show_bug.cgi?id=682862
2053+---
2054+Index: gnome-control-center-3.8.3/panels/universal-access/cc-ua-panel.c
2055+===================================================================
2056+--- gnome-control-center-3.8.3.orig/panels/universal-access/cc-ua-panel.c 2013-06-11 20:04:34.087380775 -0400
2057++++ gnome-control-center-3.8.3/panels/universal-access/cc-ua-panel.c 2013-06-11 20:04:34.083380775 -0400
2058+@@ -60,6 +60,7 @@
2059+ GSettings *mediakeys_settings;
2060+
2061+ ZoomOptions *zoom_options;
2062++ guint shell_watch_id;
2063+ };
2064+
2065+
2066+@@ -94,6 +95,12 @@
2067+ {
2068+ CcUaPanelPrivate *priv = CC_UA_PANEL (object)->priv;
2069+
2070++ if (priv->shell_watch_id)
2071++ {
2072++ g_bus_unwatch_name (priv->shell_watch_id);
2073++ priv->shell_watch_id = 0;
2074++ }
2075++
2076+ if (priv->builder)
2077+ {
2078+ g_object_unref (priv->builder);
2079+@@ -300,6 +307,29 @@
2080+ g_free (text);
2081+ }
2082+
2083++static void
2084++shell_vanished_cb (GDBusConnection *connection,
2085++ const gchar *name,
2086++ CcUaPanel *self)
2087++{
2088++ CcUaPanelPrivate *priv = self->priv;
2089++
2090++ gtk_widget_hide (WID (priv->builder, "zoom_label_box"));
2091++ gtk_widget_hide (WID (priv->builder, "zoom_value_box"));
2092++}
2093++
2094++static void
2095++shell_appeared_cb (GDBusConnection *connection,
2096++ const gchar *name,
2097++ const gchar *name_owner,
2098++ CcUaPanel *self)
2099++{
2100++ CcUaPanelPrivate *priv = self->priv;
2101++
2102++ gtk_widget_show (WID (priv->builder, "zoom_label_box"));
2103++ gtk_widget_show (WID (priv->builder, "zoom_value_box"));
2104++}
2105++
2106+ static gboolean
2107+ get_large_text_mapping (GValue *value,
2108+ GVariant *variant,
2109+@@ -401,6 +431,13 @@
2110+ WID (priv->builder, "seeing_toggle_keys_switch"), "active",
2111+ G_SETTINGS_BIND_DEFAULT);
2112+
2113++ priv->shell_watch_id = g_bus_watch_name (G_BUS_TYPE_SESSION,
2114++ "org.gnome.Shell",
2115++ G_BUS_NAME_WATCHER_FLAGS_NONE,
2116++ (GBusNameAppearedCallback) shell_appeared_cb,
2117++ (GBusNameVanishedCallback) shell_vanished_cb,
2118++ self,
2119++ NULL);
2120+ g_signal_connect (WID (priv->builder, "seeing_zoom_preferences_button"),
2121+ "clicked",
2122+ G_CALLBACK (zoom_options_launch_cb), self);
2123
2124=== added file 'debian/patches/revert_git_drop_library.patch'
2125--- debian/patches/revert_git_drop_library.patch 1970-01-01 00:00:00 +0000
2126+++ debian/patches/revert_git_drop_library.patch 2014-01-18 01:26:36 +0000
2127@@ -0,0 +1,170 @@
2128+From bf89fe818409d237dd2af14bc33326aed8edcaea Mon Sep 17 00:00:00 2001
2129+From: Tim Lunn <tim@feathertop.org>
2130+Date: Sun, 28 Apr 2013 15:10:00 +1000
2131+Subject: [PATCH 1/2] revert git drop library
2132+
2133+---
2134+ configure.ac | 15 +++++++++++-
2135+ panels/common/Makefile.am | 3 +++
2136+ shell/Makefile.am | 47 ++++++++++++++++++++++++++++++-------
2137+ shell/libgnome-control-center.pc.in | 12 ++++++++++
2138+ 4 files changed, 68 insertions(+), 9 deletions(-)
2139+ create mode 100644 shell/libgnome-control-center.pc.in
2140+
2141+--- a/configure.ac
2142++++ b/configure.ac
2143+@@ -19,6 +19,15 @@
2144+ LT_PREREQ([2.2])
2145+ LT_INIT
2146+
2147++# .so version for libgnome-control-center
2148++LIBGNOMECONTROLCENTER_CURRENT=1
2149++LIBGNOMECONTROLCENTER_REVISION=0
2150++LIBGNOMECONTROLCENTER_AGE=0
2151++AC_SUBST(LIBGNOMECONTROLCENTER_CURRENT)
2152++AC_SUBST(LIBGNOMECONTROLCENTER_REVISION)
2153++AC_SUBST(LIBGNOMECONTROLCENTER_AGE)
2154++
2155++
2156+ # Internationalization support
2157+
2158+ IT_PROG_INTLTOOL([0.40.1])
2159+@@ -326,9 +335,12 @@
2160+ PANEL_CFLAGS="-I\$(top_srcdir)/ -DG_LOG_DOMAIN=\"\\\"\$(cappletname)-cc-panel\\\"\" -DPANEL_ID=\"\\\"\$(cappletname)\\\"\""
2161+ AC_SUBST(PANEL_CFLAGS)
2162+
2163+-PANEL_LIBS=""
2164++PANEL_LIBS="\$(top_builddir)/shell/libgnome-control-center.la"
2165+ AC_SUBST(PANEL_LIBS)
2166+
2167++PANEL_LDFLAGS="-export_dynamic -avoid-version -module -no-undefined -export-symbols-regex '^g_io_module_(load|unload)'"
2168++AC_SUBST(PANEL_LDFLAGS)
2169++
2170+ dnl ==============================================
2171+ dnl libsocialweb
2172+ dnl ==============================================
2173+@@ -426,6 +438,7 @@
2174+
2175+ AC_CONFIG_FILES([
2176+ Makefile
2177++shell/libgnome-control-center.pc
2178+ panels/Makefile
2179+ panels/common/Makefile
2180+ panels/background/Makefile
2181+--- a/panels/common/Makefile.am
2182++++ b/panels/common/Makefile.am
2183+@@ -21,8 +21,11 @@
2184+ cc-language-chooser.h
2185+
2186+ liblanguage_la_LIBADD = \
2187++ $(PANEL_LIBS) \
2188+ $(LIBLANGUAGE_LIBS)
2189+
2190++liblanguage_la_LDFLAGS = $(PANEL_LDFLAGS)
2191++
2192+ resource_files = $(shell glib-compile-resources --sourcedir=$(srcdir) --generate-dependencies $(srcdir)/common.gresource.xml)
2193+ cc-common-resources.c: common.gresource.xml $(resource_files)
2194+ $(AM_V_GEN) glib-compile-resources --target=$@ --sourcedir=$(srcdir) --generate-source --c-name cc_common $<
2195+--- a/shell/Makefile.am
2196++++ b/shell/Makefile.am
2197+@@ -28,14 +28,8 @@
2198+ cc-shell-category-view.h \
2199+ cc-shell-item-view.c \
2200+ cc-shell-item-view.h \
2201+- cc-editable-entry.c \
2202+- cc-editable-entry.h \
2203+- cc-panel-loader.c \
2204+- cc-panel-loader.h \
2205+- cc-panel.c \
2206+- cc-panel.h \
2207+- cc-shell.c \
2208+- cc-shell.h \
2209++ cc-panel-loader.c \
2210++ cc-panel-loader.h \
2211+ hostname-helper.c \
2212+ hostname-helper.h \
2213+ cc-hostname-entry.c \
2214+@@ -44,8 +38,43 @@
2215+
2216+ gnome_control_center_LDFLAGS = -export-dynamic
2217+
2218++lib_LTLIBRARIES = libgnome-control-center.la
2219++
2220++libgnome_control_center_include_HEADERS = \
2221++ cc-panel.h \
2222++ cc-shell.h \
2223++ cc-editable-entry.h \
2224++ $(NULL)
2225++
2226++libgnome_control_center_la_SOURCES = \
2227++ cc-panel.c \
2228++ cc-panel.h \
2229++ cc-shell.c \
2230++ cc-shell.h \
2231++ cc-editable-entry.c \
2232++ cc-editable-entry.h \
2233++ $(NULL)
2234++
2235++libgnome_control_center_la_LDFLAGS = \
2236++ -no-undefined \
2237++ -version-info $(LIBGNOMECONTROLCENTER_CURRENT):$(LIBGNOMECONTROLCENTER_REVISION):$(LIBGNOMECONTROLCENTER_AGE) \
2238++ $(LIBGD_LIBS) \
2239++ $(NULL)
2240++
2241++libgnome_control_center_la_LIBADD = \
2242++ $(LIBGNOME_CONTROL_CENTER_LIBS) \
2243++ $(NULL)
2244++
2245++libgnome_control_center_la_LIBTOOLFLAGS = --tag=disable-static
2246++
2247++libgnome_control_center_includedir = $(includedir)/gnome-control-center-1/libgnome-control-center
2248++
2249++pkgconfigdir=$(libdir)/pkgconfig
2250++pkgconfig_DATA=libgnome-control-center.pc
2251++
2252+ gnome_control_center_LDADD = \
2253+ libshell.la \
2254++ libgnome-control-center.la \
2255+ $(SHELL_LIBS) \
2256+ $(CHEESE_LIBS) \
2257+ $(top_builddir)/libgd/libgd.la \
2258+@@ -99,6 +128,8 @@
2259+
2260+ EXTRA_DIST = \
2261+ gnome-control-center.desktop.in.in \
2262++ libgnome-control-center.pc.in \
2263++ $(servicefile_in_files) \
2264+ $(completion_in_files) \
2265+ list-panel.sh
2266+
2267+--- /dev/null
2268++++ b/shell/libgnome-control-center.pc.in
2269+@@ -0,0 +1,12 @@
2270++prefix=@prefix@
2271++exec_prefix=@exec_prefix@
2272++libdir=@libdir@
2273++includedir=@includedir@
2274++extensiondir=@libdir@/control-center-1/panels
2275++
2276++Name: libgnome-control-center
2277++Description: A library to create GNOME Control Center extensions
2278++Version: @VERSION@
2279++Requires: glib-2.0 gio-2.0 gtk+-3.0
2280++Libs: -L${libdir} -lgnome-control-center
2281++Cflags: -I${includedir}/gnome-control-center-1
2282+\ No newline at end of file
2283+--- a/Makefile.am
2284++++ b/Makefile.am
2285+@@ -34,6 +34,12 @@
2286+
2287+ -include $(top_srcdir)/git.mk
2288+
2289++libgnome-control-center.la:
2290++ cd shell && $(MAKE) $(AM_MAKEFLAGS) libgnome-control-center.la
2291++
2292++BUILT_SOURCES = libgnome-control-center.la
2293++
2294++
2295+ dist-hook:
2296+ @if test -d "$(srcdir)/.git"; \
2297+ then \
2298
2299=== modified file 'debian/patches/series'
2300--- debian/patches/series 2013-12-18 21:27:37 +0000
2301+++ debian/patches/series 2014-01-18 01:26:36 +0000
2302@@ -2,3 +2,14 @@
2303 git_iconview_columns.patch
2304 01_hide_in_unity.patch
2305 02_new_goa.patch
2306+52_region_language.patch
2307+64_restore_terminal_keyboard_shortcut.patch
2308+92_ubuntu_system_proxy.patch
2309+99_add_lock-on-suspend.patch
2310+revert_git_dont_hide_zoom.patch
2311+git-background-remove-unused-widget.patch
2312+git-background-lock-screen.patch
2313+git_rename_natural_scrolling.patch
2314+revert_git_drop_library.patch
2315+ubuntu_external_panels.patch
2316+
2317
2318=== added file 'debian/patches/ubuntu_external_panels.patch'
2319--- debian/patches/ubuntu_external_panels.patch 1970-01-01 00:00:00 +0000
2320+++ debian/patches/ubuntu_external_panels.patch 2014-01-18 01:26:36 +0000
2321@@ -0,0 +1,372 @@
2322+From 740aa2c73a11501a1059f1715a9618fcced42ee9 Mon Sep 17 00:00:00 2001
2323+From: Tim Lunn <tim@feathertop.org>
2324+Date: Sun, 28 Apr 2013 11:59:58 +1000
2325+Subject: [PATCH] Reimplement support for loading external panels
2326+
2327+Also brings back support for hiding icons based on XDG_CURRENT_DESKTOP
2328+and the ShowIn values in desktop files.
2329+
2330+This does not re-implement the gmenu loading code. So for now we
2331+just look for a desktop file in the following format
2332+gnome-'panelname'-panel.desktop or 'panelname'-ccpanel.desktop.
2333+launchers (that are not actual modules) are loaded from the static
2334+list all_launchers, hard-coded into the patch.
2335+
2336+Any external module that use the following macro will need to change
2337+CC_PANEL_REGISTER() -> CC_PANEL_REGISTER_EXTERNAL()
2338+---
2339+ configure.ac | 3 ++
2340+ shell/Makefile.am | 3 +-
2341+ shell/cc-panel-loader.c | 112 +++++++++++++++++++++++++++++++++++++++++++++++-
2342+ shell/cc-panel-loader.h | 1 +
2343+ shell/cc-panel.h | 8 ++++
2344+ shell/cc-window.c | 95 ++++++++++++++++++++++++++++++++++++++++
2345+ 6 files changed, 220 insertions(+), 2 deletions(-)
2346+
2347+--- a/configure.ac
2348++++ b/configure.ac
2349+@@ -341,6 +341,9 @@
2350+ dnl Panels
2351+ dnl =======================================
2352+
2353++PANELS_DIR="${libdir}/control-center-1/panels"
2354++AC_SUBST(PANELS_DIR)
2355++
2356+ PANEL_CFLAGS="-I\$(top_srcdir)/ -DG_LOG_DOMAIN=\"\\\"\$(cappletname)-cc-panel\\\"\" -DPANEL_ID=\"\\\"\$(cappletname)\\\"\""
2357+ AC_SUBST(PANEL_CFLAGS)
2358+
2359+--- a/shell/Makefile.am
2360++++ b/shell/Makefile.am
2361+@@ -113,7 +113,8 @@
2362+ gnome_control_center_LDADD += $(top_builddir)/panels/bluetooth/libbluetooth.la
2363+ endif
2364+
2365+-AM_CPPFLAGS = -DGNOMELOCALEDIR="\"$(datadir)/locale\""
2366++AM_CPPFLAGS = -DGNOMELOCALEDIR="\"$(datadir)/locale\"" \
2367++ -DPANELS_DIR="\"$(PANELS_DIR)\""
2368+
2369+ sysdir = $(datadir)/applications
2370+ sys_in_files = gnome-control-center.desktop.in
2371+--- a/shell/cc-panel-loader.c
2372++++ b/shell/cc-panel-loader.c
2373+@@ -26,6 +26,19 @@
2374+
2375+ #include "cc-panel-loader.h"
2376+
2377++/* This is a list of desktop file launchers that should be loaded
2378++where they are available */
2379++static struct {
2380++ const char *name;
2381++} all_launchers[] = {
2382++ {"gufw"},
2383++ {"landscape-client-settings"},
2384++ {"language-selector"},
2385++ {"software-properties-gtk"},
2386++ {"system-config-printer"},
2387++ {"ubuntuone-installer"},
2388++};
2389++
2390+ #ifndef CC_PANEL_LOADER_NO_GTYPES
2391+
2392+ /* Extension points */
2393+@@ -149,6 +162,37 @@
2394+ return retval;
2395+ }
2396+
2397++static gboolean
2398++parse_show_in (GDesktopAppInfo *app)
2399++{
2400++ const char *env;
2401++ gboolean result;
2402++
2403++ env = g_getenv ("XDG_CURRENT_DESKTOP");
2404++ result = g_desktop_app_info_get_show_in (app, env);
2405++
2406++ return result;
2407++}
2408++
2409++static gboolean
2410++cc_panel_loader_add_item (CcShellModel *model, const char *name, GDesktopAppInfo *app )
2411++{
2412++ int category;
2413++ gboolean show;
2414++
2415++ category = parse_categories (app);
2416++ if (G_UNLIKELY (category < 0))
2417++ return FALSE;
2418++
2419++ show = parse_show_in (app);
2420++ if (!show)
2421++ return FALSE;
2422++
2423++ cc_shell_model_add_item (model, category, G_APP_INFO (app), name);
2424++
2425++ return TRUE;
2426++}
2427++
2428+ void
2429+ cc_panel_loader_fill_model (CcShellModel *model)
2430+ {
2431+@@ -159,6 +203,7 @@
2432+ GDesktopAppInfo *app;
2433+ char *desktop_name;
2434+ int category;
2435++ gboolean show;
2436+
2437+ desktop_name = g_strconcat ("gnome-", all_panels[i].name,
2438+ "-panel.desktop", NULL);
2439+@@ -176,11 +221,80 @@
2440+ if (G_UNLIKELY (category < 0))
2441+ continue;
2442+
2443++ show = parse_show_in (app);
2444++ if (!show)
2445++ continue;
2446++
2447+ cc_shell_model_add_item (model, category, G_APP_INFO (app), all_panels[i].name);
2448+ g_object_unref (app);
2449+ }
2450+ }
2451+
2452++void
2453++cc_panel_loader_external_fill_model (CcShellModel *model, GIOExtensionPoint *extension_point)
2454++{
2455++ GList *panels, *l;
2456++ /* Load native panel modules/plugins */
2457++ panels = g_io_extension_point_get_extensions (extension_point);
2458++
2459++ for (l = panels; l != NULL; l = l->next)
2460++ {
2461++ GIOExtension *extension;
2462++ const gchar *name;
2463++
2464++ GDesktopAppInfo *app;
2465++ char *desktop_name;
2466++
2467++ extension = l->data;
2468++
2469++ name = g_io_extension_get_name (extension);
2470++
2471++ desktop_name = g_strconcat ("gnome-", name, "-panel.desktop", NULL);
2472++ app = g_desktop_app_info_new (desktop_name);
2473++ g_free (desktop_name);
2474++
2475++ if (app == NULL) {
2476++ desktop_name = g_strconcat (name, "-ccpanel.desktop", NULL);
2477++ app = g_desktop_app_info_new (desktop_name);
2478++ g_free (desktop_name);
2479++ }
2480++
2481++ if (app == NULL)
2482++ {
2483++ g_warning ("Ignoring broken panel %s (missing desktop file)",
2484++ name);
2485++ continue;
2486++ }
2487++ cc_panel_loader_add_item(model, name, app);
2488++ g_object_unref (app);
2489++
2490++ }
2491++ g_list_free (l);
2492++
2493++ /* Load desktop launchers */
2494++ int i;
2495++
2496++ for (i = 0; i < G_N_ELEMENTS (all_launchers); i++)
2497++ {
2498++ GDesktopAppInfo *app;
2499++ char *desktop_name;
2500++
2501++ desktop_name = g_strconcat (all_launchers[i].name, ".desktop", NULL);
2502++ app = g_desktop_app_info_new (desktop_name);
2503++ g_free (desktop_name);
2504++
2505++ if (app == NULL)
2506++ {
2507++ g_warning ("Ignoring launcher %s (missing desktop file)",
2508++ all_launchers[i].name);
2509++ continue;
2510++ }
2511++ cc_panel_loader_add_item(model, all_launchers[i].name, app);
2512++ g_object_unref (app);
2513++ }
2514++
2515++}
2516++
2517+ #ifndef CC_PANEL_LOADER_NO_GTYPES
2518+
2519+ static GHashTable *panel_types;
2520+@@ -208,7 +322,8 @@
2521+ ensure_panel_types ();
2522+
2523+ get_type = g_hash_table_lookup (panel_types, name);
2524+- g_return_val_if_fail (get_type != NULL, NULL);
2525++ if (get_type == NULL)
2526++ return NULL;
2527+
2528+ return g_object_new (get_type (),
2529+ "shell", shell,
2530+--- a/shell/cc-panel-loader.h
2531++++ b/shell/cc-panel-loader.h
2532+@@ -29,6 +29,7 @@
2533+ G_BEGIN_DECLS
2534+
2535+ void cc_panel_loader_fill_model (CcShellModel *model);
2536++void cc_panel_loader_external_fill_model (CcShellModel *model, GIOExtensionPoint *extension_point);
2537+ GList *cc_panel_loader_get_panels (void);
2538+ CcPanel *cc_panel_loader_load_by_name (CcShell *shell,
2539+ const char *name,
2540+--- a/shell/cc-panel.h
2541++++ b/shell/cc-panel.h
2542+@@ -46,6 +46,14 @@
2543+ #define CC_PANEL_REGISTER(PluginName, plugin_name) \
2544+ G_DEFINE_TYPE (PluginName, plugin_name, CC_TYPE_PANEL)
2545+
2546++#define CC_PANEL_REGISTER_EXTERNAL(PluginName, plugin_name) \
2547++ G_DEFINE_TYPE_WITH_CODE (PluginName, plugin_name, CC_TYPE_PANEL, \
2548++ GIOExtensionPoint *ep; \
2549++ ep = g_io_extension_point_register ("CcPanel"); \
2550++ g_io_extension_point_set_required_type (ep, CC_TYPE_PANEL); \
2551++ g_io_extension_point_implement (CC_SHELL_PANEL_EXTENSION_POINT, \
2552++ g_define_type_id, PANEL_ID, 0))
2553++
2554+ typedef struct CcPanelPrivate CcPanelPrivate;
2555+
2556+ typedef struct _CcPanel CcPanel;
2557+--- a/shell/cc-window.c
2558++++ b/shell/cc-window.c
2559+@@ -97,6 +97,8 @@
2560+
2561+ CcPanel *active_panel;
2562+
2563++ GIOExtensionPoint *extension_point;
2564++
2565+ int monitor_num;
2566+ CcSmallScreen small_screen;
2567+ };
2568+@@ -136,6 +138,53 @@
2569+ return NULL;
2570+ }
2571+
2572++static CcPanel *
2573++external_load_by_id (CcWindow *self,
2574++ const char *name,
2575++ const gchar **argv)
2576++{
2577++ CcWindowPrivate *priv = self->priv;
2578++ GIOExtension *extension;
2579++ GType panel_type = G_TYPE_INVALID;
2580++
2581++ /* check if there is an plugin that implements this panel */
2582++ extension = g_io_extension_point_get_extension_by_name (priv->extension_point, name);
2583++ if (extension)
2584++ panel_type = g_io_extension_get_type (extension);
2585++
2586++ if (panel_type == G_TYPE_INVALID)
2587++ {
2588++ g_warning ("Could not find the loadable module for panel '%s'", name);
2589++ return NULL;
2590++ }
2591++
2592++ return g_object_new (panel_type,
2593++ "shell", CC_SHELL (self),
2594++ "argv", argv,
2595++ NULL);
2596++}
2597++
2598++static void
2599++external_launch_by_id (const char *name)
2600++{
2601++ GDesktopAppInfo *app;
2602++ char *desktop_name;
2603++ const char *command;
2604++
2605++ desktop_name = g_strconcat (name, ".desktop", NULL);
2606++ app = g_desktop_app_info_new (desktop_name);
2607++ g_free (desktop_name);
2608++
2609++ command = g_app_info_get_executable ( G_APP_INFO (app));
2610++
2611++ if (command && command[0])
2612++ {
2613++ g_spawn_command_line_async (command, NULL);
2614++ }
2615++ g_object_unref (app);
2616++
2617++}
2618++
2619+ static gboolean
2620+ activate_panel (CcWindow *self,
2621+ const gchar *id,
2622+@@ -151,6 +200,17 @@
2623+ return FALSE;
2624+
2625+ priv->current_panel = GTK_WIDGET (cc_panel_loader_load_by_name (CC_SHELL (self), id, argv));
2626++ if (!priv->current_panel)
2627++ {
2628++ priv->current_panel = GTK_WIDGET (external_load_by_id(self, id, argv));
2629++ if (!priv->current_panel)
2630++ {
2631++ external_launch_by_id (id);
2632++ return FALSE;
2633++ }
2634++ }
2635++
2636++
2637+ cc_shell_set_active_panel (CC_SHELL (self), CC_PANEL (priv->current_panel));
2638+ gtk_widget_show (priv->current_panel);
2639+
2640+@@ -863,8 +923,43 @@
2641+ add_category_view (shell, CC_CATEGORY_SYSTEM, C_("category", "System"));
2642+
2643+ cc_panel_loader_fill_model (CC_SHELL_MODEL (shell->priv->store));
2644++ cc_panel_loader_external_fill_model (CC_SHELL_MODEL (shell->priv->store),shell->priv->extension_point);
2645++}
2646++
2647++static void
2648++load_panel_plugins (CcWindow *shell)
2649++{
2650++ GList *modules;
2651++ GList *panels, *l;
2652++
2653++ /* only allow this function to be run once to prevent modules being loaded
2654++ * twice
2655++ */
2656++
2657++ if (shell->priv->extension_point)
2658++ return;
2659++
2660++ /* make sure the base type is registered */
2661++ g_type_from_name ("CcPanel");
2662++
2663++ shell->priv->extension_point
2664++ = g_io_extension_point_register (CC_SHELL_PANEL_EXTENSION_POINT);
2665++
2666++ /* load all the plugins in the panels directory */
2667++ modules = g_io_modules_load_all_in_directory (PANELS_DIR);
2668++
2669++ panels = g_io_extension_point_get_extensions (shell->priv->extension_point);
2670++
2671++ for (l = panels; l != NULL; l= l->next)
2672++ {
2673++ g_debug ("modules %s", g_io_extension_get_name (l->data));
2674++ }
2675++ g_list_free (l);
2676++ g_list_free (modules);
2677+ }
2678+
2679++
2680++
2681+ static void
2682+ previous_button_clicked_cb (GtkButton *button,
2683+ CcWindow *shell)
2684+@@ -1398,6 +1493,9 @@
2685+
2686+ gtk_widget_set_size_request (priv->scrolled_window, FIXED_WIDTH, -1);
2687+
2688++ /* load the panels that are implemented as plugins */
2689++ load_panel_plugins (self);
2690++
2691+ /* load the available settings panels */
2692+ setup_model (self);
2693+ }

Subscribers

People subscribed via source and target branches

to all changes: