[gnome-control-center/wip/jsparber/background: 124/125] Merge branch 'master' into wip/jsparber/background https://bugzilla.gnome.org/show_bug.cgi?id=788515
- From: Julian Sparber <jsparber src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-control-center/wip/jsparber/background: 124/125] Merge branch 'master' into wip/jsparber/background https://bugzilla.gnome.org/show_bug.cgi?id=788515
- Date: Fri, 2 Feb 2018 17:14:42 +0000 (UTC)
commit 9856a9812452bed0c3eb7e65d2864b84f92fe76e
Merge: cea26e1 a701b46
Author: Julian Sparber <julian sparber net>
Date: Fri Feb 2 14:31:01 2018 +0100
Merge branch 'master' into wip/jsparber/background
https://bugzilla.gnome.org/show_bug.cgi?id=788515
.gitmodules | 8 +-
Makefile.am | 50 -
Makefile.decl | 53 -
autogen.sh | 31 -
configure.ac | 599 ---
data/icons/gnome-control-center-src.svg | 2854 +++++++++++++
.../hicolor_apps_16x16_gnome-control-center.png | Bin 0 -> 819 bytes
.../hicolor_apps_24x24_gnome-control-center.png | Bin 0 -> 1168 bytes
.../hicolor_apps_32x32_gnome-control-center.png | Bin 0 -> 2044 bytes
.../hicolor_apps_48x48_gnome-control-center.png | Bin 0 -> 3257 bytes
.../hicolor_apps_512x512_gnome-control-center.png | Bin 0 -> 111227 bytes
...apps_symbolic_gnome-control-center-symbolic.svg | 32 +
data/icons/meson.build | 19 +
.../keyboard => gettext/its}/gnome-keybindings.its | 8 +-
.../keyboard => gettext/its}/gnome-keybindings.loc | 0
gettext/its/sounds.its | 6 +
gettext/its/sounds.loc | 6 +
git.mk | 311 --
libgd | 1 -
m4/as-ac-expand.m4 | 43 -
m4/ax_config_dir.m4 | 109 -
m4/empty | 1 -
man/Makefile.am | 21 -
man/meson.build | 26 +
meson.build | 286 ++
meson_options.txt | 5 +
meson_post_install.py | 19 +
panels/Makefile.am | 34 -
panels/background/Makefile.am | 88 -
panels/background/bg-colors-source.c | 62 +-
panels/background/bg-pictures-source.c | 152 +-
panels/background/bg-wallpapers-source.c | 24 +-
panels/background/cc-background-item.c | 82 +-
panels/background/cc-background-panel.c | 34 +-
panels/background/cc-background-xml.c | 135 +-
.../gnome-background-panel.desktop.in.in | 9 +-
panels/background/meson.build | 126 +
panels/bluetooth/Makefile.am | 38 -
.../bluetooth/gnome-bluetooth-panel.desktop.in.in | 7 +-
panels/bluetooth/meson.build | 42 +
panels/color/Makefile.am | 50 -
panels/color/cc-color-panel.c | 13 +-
panels/color/gnome-color-panel.desktop.in.in | 7 +-
panels/color/icons/16x16/Makefile.am | 13 -
panels/color/icons/22x22/Makefile.am | 13 -
panels/color/icons/24x24/Makefile.am | 13 -
panels/color/icons/256x256/Makefile.am | 13 -
panels/color/icons/32x32/Makefile.am | 13 -
panels/color/icons/48x48/Makefile.am | 13 -
panels/color/icons/64x64/Makefile.am | 13 -
panels/color/icons/Makefile.am | 20 -
panels/color/icons/meson.build | 21 +
panels/color/icons/scalable/Makefile.am | 13 -
panels/color/meson.build | 63 +
panels/common/Makefile.am | 100 -
panels/common/gnome-settings-bus.h | 2 -
panels/common/gsd-device-manager-x11.c | 33 +-
panels/common/meson.build | 123 +
panels/datetime/Makefile.am | 114 -
panels/datetime/cc-datetime-panel.c | 191 +-
panels/datetime/cc-timezone-map.c | 33 +-
panels/datetime/gnome-datetime-panel.desktop.in.in | 9 +-
panels/datetime/icons/meson.build | 19 +
panels/datetime/meson.build | 215 +
.../org.gnome.controlcenter.datetime.policy.in | 4 +-
panels/datetime/po-timezones/LINGUAS | 69 +
panels/datetime/po-timezones/Makefile.am | 35 -
panels/datetime/po-timezones/meson.build | 1 +
panels/datetime/test-timezone-gfx.c | 9 +-
panels/datetime/test-timezone.c | 14 +-
panels/datetime/tz.c | 38 +-
panels/datetime/tz.h | 4 +
panels/display/Makefile.am | 80 -
panels/display/cc-display-config-dbus.c | 114 +-
panels/display/cc-display-panel.c | 564 ++--
panels/display/cc-night-light-dialog.c | 7 +-
panels/display/gnome-display-panel.desktop.in.in | 7 +-
panels/display/icons/meson.build | 18 +
panels/display/meson.build | 66 +
panels/info/Makefile.am | 72 -
panels/info/cc-info-default-apps-panel.c | 22 +-
panels/info/cc-info-default-apps-panel.h | 2 +-
panels/info/cc-info-overview-panel.c | 217 +-
panels/info/cc-info-overview-panel.h | 2 +-
panels/info/cc-info-panel.c | 194 -
panels/info/cc-info-panel.h | 33 -
panels/info/cc-info-removable-media-panel.c | 49 +-
panels/info/cc-info-removable-media-panel.h | 2 +-
panels/info/gnome-default-apps-panel.desktop.in.in | 9 +-
.../info/gnome-info-overview-panel.desktop.in.in | 9 +-
panels/info/gnome-info-panel.desktop.in.in | 20 -
.../info/gnome-removable-media-panel.desktop.in.in | 9 +-
panels/info/gsd-disk-space-helper.c | 8 +-
panels/info/info-cleanup.c | 42 +-
panels/info/info.gresource.xml | 1 -
panels/info/info.ui | 125 -
panels/info/meson.build | 115 +
panels/info/test-info-cleanup.c | 17 +-
panels/keyboard/00-multimedia.xml.in | 22 +-
panels/keyboard/01-input-sources.xml.in | 6 +-
panels/keyboard/01-launchers.xml.in | 16 +-
panels/keyboard/01-screenshot.xml.in | 16 +-
panels/keyboard/01-system.xml.in | 6 +-
panels/keyboard/50-accessibility.xml.in | 18 +-
panels/keyboard/Makefile.am | 75 -
panels/keyboard/cc-keyboard-option.c | 13 -
panels/keyboard/cc-keyboard-option.h | 5 +-
panels/keyboard/gnome-keyboard-panel.desktop.in.in | 7 +-
panels/keyboard/meson.build | 95 +
panels/meson.build | 44 +
panels/mouse/Makefile.am | 56 -
panels/mouse/cc-mouse-caps-helper.c | 8 +-
panels/mouse/gnome-mouse-panel.desktop.in.in | 7 +-
panels/mouse/gnome-mouse-properties.c | 2 +-
panels/mouse/gnome-mouse-test.c | 7 +-
panels/mouse/meson.build | 72 +
panels/network/Makefile.am | 65 -
panels/network/cc-wifi-panel.c | 24 +-
panels/network/connection-editor/Makefile.am | 56 -
panels/network/connection-editor/ce-page-details.c | 49 +
panels/network/connection-editor/details-page.ui | 53 +-
panels/network/connection-editor/meson.build | 52 +
panels/network/gnome-network-panel.desktop.in.in | 7 +-
panels/network/gnome-wifi-panel.desktop.in.in | 7 +-
panels/network/meson.build | 79 +
panels/network/net-device-ethernet.c | 1 +
panels/network/net-device-wifi.c | 77 +-
panels/network/net-device-wifi.h | 1 +
panels/network/network-mobile.ui | 6 +-
panels/network/network-wifi.ui | 431 +-
panels/network/wifi.ui | 58 +-
panels/network/wireless-security/Makefile.am | 72 -
.../network/wireless-security/eap-method-fast.ui | 3 +-
.../network/wireless-security/eap-method-peap.ui | 98 +-
.../network/wireless-security/eap-method-simple.ui | 3 +-
panels/network/wireless-security/eap-method-tls.ui | 77 +-
.../network/wireless-security/eap-method-ttls.ui | 50 +-
panels/network/wireless-security/meson.build | 98 +
panels/network/wireless-security/ws-dynamic-wep.ui | 3 +-
panels/network/wireless-security/ws-wpa-eap.ui | 3 +-
panels/notifications/Makefile.am | 39 -
.../gnome-notifications-panel.desktop.in.in | 9 +-
panels/notifications/meson.build | 46 +
panels/online-accounts/Makefile.am | 46 -
.../gnome-online-accounts-panel.desktop.in.in | 9 +-
panels/online-accounts/icons/16x16/Makefile.am | 14 -
panels/online-accounts/icons/22x22/Makefile.am | 14 -
panels/online-accounts/icons/24x24/Makefile.am | 14 -
panels/online-accounts/icons/256x256/Makefile.am | 14 -
panels/online-accounts/icons/32x32/Makefile.am | 14 -
panels/online-accounts/icons/48x48/Makefile.am | 14 -
panels/online-accounts/icons/Makefile.am | 23 -
panels/online-accounts/icons/meson.build | 15 +
panels/online-accounts/meson.build | 48 +
panels/power/Makefile.am | 50 -
panels/power/cc-power-panel.c | 22 +-
panels/power/gnome-power-panel.desktop.in.in | 7 +-
panels/power/icons/16x16/Makefile.am | 14 -
panels/power/icons/22x22/Makefile.am | 14 -
panels/power/icons/24x24/Makefile.am | 14 -
panels/power/icons/256x256/Makefile.am | 14 -
panels/power/icons/32x32/Makefile.am | 14 -
panels/power/icons/48x48/Makefile.am | 14 -
panels/power/icons/Makefile.am | 22 -
panels/power/icons/meson.build | 15 +
panels/power/meson.build | 55 +
panels/power/power.ui | 8 +
panels/printers/Makefile.am | 89 -
panels/printers/gnome-printers-panel.desktop.in.in | 7 +-
panels/printers/meson.build | 99 +
panels/printers/pp-printer-entry.c | 16 +-
panels/printers/printer-entry.ui | 11 +-
panels/privacy/Makefile.am | 38 -
panels/privacy/cc-privacy-panel.c | 4 +
panels/privacy/gnome-privacy-panel.desktop.in.in | 9 +-
panels/privacy/meson.build | 40 +
panels/privacy/privacy.ui | 41 +-
panels/region/Makefile.am | 52 -
panels/region/gnome-region-panel.desktop.in.in | 9 +-
panels/region/meson.build | 61 +
panels/search/Makefile.am | 41 -
panels/search/gnome-search-panel.desktop.in.in | 9 +-
panels/search/meson.build | 49 +
panels/sharing/Makefile.am | 81 -
panels/sharing/cc-sharing-networks.c | 6 +-
panels/sharing/cc-sharing-panel.c | 11 +-
panels/sharing/gnome-sharing-panel.desktop.in.in | 9 +-
panels/sharing/meson.build | 101 +
....controlcenter.remote-login-helper.policy.in.in | 5 +-
panels/sharing/sharing.ui | 41 +-
panels/sound/Makefile.am | 71 -
panels/sound/cc-sound-panel.c | 14 +-
panels/sound/data/Makefile.am | 42 -
panels/sound/data/gnome-sound-panel.desktop.in.in | 6 +-
panels/sound/data/icons/16x16/Makefile.am | 4 -
panels/sound/data/icons/16x16/apps/Makefile.am | 19 -
panels/sound/data/icons/16x16/devices/Makefile.am | 18 -
panels/sound/data/icons/16x16/status/Makefile.am | 21 -
panels/sound/data/icons/22x22/Makefile.am | 4 -
panels/sound/data/icons/22x22/apps/Makefile.am | 19 -
panels/sound/data/icons/22x22/status/Makefile.am | 21 -
panels/sound/data/icons/24x24/Makefile.am | 4 -
panels/sound/data/icons/24x24/apps/Makefile.am | 18 -
panels/sound/data/icons/24x24/devices/Makefile.am | 18 -
panels/sound/data/icons/24x24/status/Makefile.am | 21 -
panels/sound/data/icons/32x32/Makefile.am | 4 -
panels/sound/data/icons/32x32/apps/Makefile.am | 19 -
panels/sound/data/icons/32x32/devices/Makefile.am | 18 -
panels/sound/data/icons/32x32/status/Makefile.am | 21 -
panels/sound/data/icons/48x48/Makefile.am | 4 -
panels/sound/data/icons/48x48/apps/Makefile.am | 18 -
panels/sound/data/icons/48x48/devices/Makefile.am | 18 -
panels/sound/data/icons/Makefile.am | 12 -
panels/sound/data/icons/meson.build | 69 +
panels/sound/data/icons/scalable/Makefile.am | 4 -
panels/sound/data/icons/scalable/apps/Makefile.am | 18 -
.../sound/data/icons/scalable/devices/Makefile.am | 37 -
panels/sound/data/sounds/Makefile.am | 29 -
.../data/sounds/gnome-sounds-default.xml.in.in | 10 +-
panels/sound/data/sounds/meson.build | 32 +
panels/sound/data/symbolic-icons/Makefile.am | 10 -
panels/sound/data/symbolic-icons/meson.build | 13 +
.../sound/data/symbolic-icons/scalable/Makefile.am | 3 -
.../symbolic-icons/scalable/status/Makefile.am | 14 -
panels/sound/gvc | 1 -
panels/sound/gvc-channel-bar.c | 4 +-
panels/sound/gvc-combo-box.c | 3 +-
panels/sound/gvc-mixer-dialog.c | 115 +-
panels/sound/gvc-sound-theme-chooser.c | 51 +-
panels/sound/gvc-speaker-test.c | 4 +-
panels/sound/meson.build | 68 +
panels/sound/sound-theme-file-utils.c | 85 +-
panels/universal-access/Makefile.am | 40 -
.../gnome-universal-access-panel.desktop.in.in | 9 +-
panels/universal-access/meson.build | 53 +
panels/universal-access/uap.ui | 86 +-
panels/user-accounts/Makefile.am | 130 -
panels/user-accounts/data/Makefile.am | 20 -
panels/user-accounts/data/faces/Makefile.am | 34 -
.../data/gnome-user-accounts-panel.desktop.in.in | 8 +-
panels/user-accounts/data/user-accounts-dialog.ui | 48 +
panels/user-accounts/meson.build | 171 +
...org.gnome.controlcenter.user-accounts.policy.in | 4 +-
panels/user-accounts/um-user-panel.c | 17 +-
panels/user-accounts/um-utils.c | 34 +-
panels/wacom/Makefile.am | 91 -
panels/wacom/calibrator/Makefile.am | 47 -
panels/wacom/calibrator/meson.build | 36 +
panels/wacom/cc-wacom-stylus-page.c | 71 +-
panels/wacom/cc-wacom-tool.c | 21 +-
panels/wacom/gnome-wacom-panel.desktop.in.in | 7 +-
panels/wacom/meson.build | 107 +
panels/wacom/wacom-stylus-3btn-no-eraser.svg | 132 +
panels/wacom/wacom-stylus-3btn.svg | 138 +
panels/wacom/wacom-stylus-page.ui | 33 +-
panels/wacom/wacom.gresource.xml | 2 +
po/POTFILES.in | 172 +-
po/POTFILES.skip | 61 -
po/README.translators | 10 -
po/ca.po | 1016 +++---
po/cs.po | 2 +-
po/de.po | 965 +++---
po/es.po | 4186 ++++++++++----------
po/fi.po | 4134 ++++++++++---------
po/fr.po | 219 +-
po/fur.po | 335 +-
po/hr.po | 618 ++--
po/hu.po | 4095 ++++++++++---------
po/meson.build | 5 +
po/nb.po | 1375 ++++----
po/ne.po | 1682 +++++----
po/sk.po | 1077 +++---
search-provider/Makefile.am | 54 -
search-provider/cc-search-provider.c | 62 +-
search-provider/cc-search-provider.h | 32 +-
search-provider/control-center-search-provider.c | 18 +-
search-provider/meson.build | 49 +
shell/Makefile.am | 176 -
shell/TODO | 7 -
shell/alt/Makefile.am | 22 -
shell/alt/cc-window.c | 1606 --------
shell/alt/cc-window.h | 46 -
shell/appdata/Makefile.am | 14 -
shell/appdata/gnome-control-center.appdata.xml.in | 8 +-
shell/appdata/meson.build | 10 +
shell/cc-application.c | 87 +-
shell/cc-application.h | 46 +-
shell/cc-hostname-entry.c | 76 +-
shell/cc-hostname-entry.h | 45 +-
shell/cc-panel-list.c | 23 +-
shell/cc-panel-list.h | 1 +
shell/cc-panel-loader.c | 23 +-
shell/cc-shell-model.h | 8 -
shell/cc-window.c | 582 ++--
shell/cc-window.h | 4 -
shell/completions/gnome-control-center.in | 2 -
shell/completions/meson.build | 12 +
shell/gnome-control-center.desktop.in.in | 6 +-
shell/main.c | 8 +-
shell/meson.build | 135 +
shell/window.ui | 23 +
subprojects/gvc | 1 +
subprojects/libgd | 1 +
update-from-gsd.in | 10 +
update-from-gsd.sh | 2 +-
update-from-nma.in | 19 +
306 files changed, 18785 insertions(+), 18383 deletions(-)
---
diff --cc panels/background/bg-wallpapers-source.c
index 661bdef,50f40b3..47d8da2
--- a/panels/background/bg-wallpapers-source.c
+++ b/panels/background/bg-wallpapers-source.c
@@@ -65,27 -65,15 +65,23 @@@ load_wallpapers (gchar *ke
thumbnail_width, thumbnail_height,
scale_factor);
if (pixbuf == NULL)
- goto out;
+ return;
surface = gdk_cairo_surface_create_from_pixbuf (pixbuf, scale_factor, NULL);
- gtk_list_store_set (store, &iter,
- 0, surface,
- 1, item,
- 2, cc_background_item_get_name (item),
- -1);
+
+ gtk_list_store_insert_with_values (store, &iter, -1,
+ 0, surface,
+ 1, item,
+ 2, cc_background_item_get_name (item),
+ -1);
+
+ /* gtk_list_store_set (store, &iter,
+ 0, surface,
+ 1, item,
+ 2, cc_background_item_get_name (item),
+ -1);
+ */
-
- out:
g_clear_pointer (&surface, (GDestroyNotify) cairo_surface_destroy);
- if (pixbuf)
- g_object_unref (pixbuf);
}
static void
diff --cc panels/background/cc-background-panel.c
index 59028a3,8d54d56..ca36ac0
--- a/panels/background/cc-background-panel.c
+++ b/panels/background/cc-background-panel.c
@@@ -122,9 -130,18 +122,9 @@@ cc_background_panel_class_init (CcBackg
object_class->finalize = cc_background_panel_finalize;
}
-static CcBackgroundItem *
-get_current_background (CcBackgroundPanel *panel, GSettings *settings)
-{
- if (settings == panel->settings)
- return panel->current_background;
- else
- return panel->current_lock_background;
-}
-
static void
update_preview (CcBackgroundPanel *panel,
- GSettings *settings,
+ GSettings *settings,
CcBackgroundItem *item)
{
gboolean changes_with_time;
@@@ -147,14 -167,24 +147,14 @@@
changes_with_time = cc_background_item_changes_with_time (current_background);
}
- if (settings == panel->settings)
- {
- gtk_widget_set_visible (WID ("slide_image"), changes_with_time);
- gtk_widget_set_visible (WID ("slide-label"), changes_with_time);
-
- gtk_widget_queue_draw (WID ("background-desktop-drawingarea"));
- }
- else
- {
- gtk_widget_set_visible (WID ("slide_image1"), changes_with_time);
- gtk_widget_set_visible (WID ("slide-label1"), changes_with_time);
+ gtk_revealer_set_reveal_child (GTK_REVEALER (WID ("wallpaper-info")),
+ changes_with_time);
- gtk_widget_queue_draw (WID ("background-lock-drawingarea"));
- }
+ gtk_widget_queue_draw (WID ("background-desktop-drawingarea"));
}
- static char *
+ static gchar *
-get_save_path (CcBackgroundPanel *panel, GSettings *settings)
+get_save_path (const char *filename)
{
return g_build_filename (g_get_user_config_dir (),
"gnome-control-center",
@@@ -225,15 -260,17 +225,17 @@@ on_panel_resize (GtkWidget *widget
static void
reload_current_bg (CcBackgroundPanel *panel,
- GSettings *settings)
+ GSettings *settings)
{
- CcBackgroundItem *saved, *configured;
- gchar *uri, *pcolor, *scolor;
+ g_autoptr(CcBackgroundItem) saved = NULL;
+ CcBackgroundItem *configured;
+ g_autofree gchar *uri = NULL;
+ g_autofree gchar *pcolor = NULL;
+ g_autofree gchar *scolor = NULL;
/* Load the saved configuration */
- uri = get_save_path (panel, settings);
+ uri = get_save_path ("last-edited.xml");
saved = cc_background_xml_get_item (uri);
- g_free (uri);
/* initalise the current background information from settings */
uri = g_settings_get_string (settings, WP_URI_KEY);
@@@ -271,30 -303,35 +268,28 @@@
if (cc_background_item_get_placement (saved) == G_DESKTOP_BACKGROUND_STYLE_NONE)
flags &=~ (CC_BACKGROUND_ITEM_HAS_PCOLOR | CC_BACKGROUND_ITEM_HAS_SCOLOR);
g_object_set (G_OBJECT (configured),
- "name", cc_background_item_get_name (saved),
- "flags", flags,
- "source-url", cc_background_item_get_source_url (saved),
- "source-xml", cc_background_item_get_source_xml (saved),
- NULL);
+ "name", cc_background_item_get_name (saved),
+ "flags", flags,
+ "source-url", cc_background_item_get_source_url (saved),
+ "source-xml", cc_background_item_get_source_xml (saved),
+ NULL);
}
- if (saved != NULL)
- g_object_unref (saved);
- if (settings == panel->settings)
- {
- g_clear_object (&panel->current_background);
- panel->current_background = configured;
- }
- else
- {
- g_clear_object (&panel->current_lock_background);
- panel->current_lock_background = configured;
- }
+ g_clear_object (&panel->current_background);
+ panel->current_background = configured;
+
cc_background_item_load (configured, NULL);
}
static gboolean
create_save_dir (void)
{
- char *path;
+ g_autofree char *path = NULL;
path = g_build_filename (g_get_user_config_dir (),
- "gnome-control-center",
- "backgrounds",
- NULL);
+ "gnome-control-center",
+ "backgrounds",
+ NULL);
if (g_mkdir_with_parents (path, USER_DIR_MODE) < 0)
{
g_warning ("Failed to create directory '%s'", path);
@@@ -330,7 -414,73 +322,6 @@@ set_background (CcBackgroundPanel *pane
else if (cc_background_item_get_source_url (item) != NULL &&
cc_background_item_get_needs_download (item))
{
- //do not handle
- g_autoptr(GFile) source = NULL;
- g_autoptr(GFile) dest = NULL;
- g_autofree gchar *cache_path = NULL;
- g_autofree gchar *basename = NULL;
- g_autofree gchar *display_name = NULL;
- g_autofree gchar *dest_path = NULL;
- g_autofree gchar *dest_uri = NULL;
- g_autoptr(GdkPixbuf) pixbuf = NULL;
-
- cache_path = bg_pictures_source_get_cache_path ();
- if (g_mkdir_with_parents (cache_path, USER_DIR_MODE) < 0)
- {
- g_warning ("Failed to create directory '%s'", cache_path);
- return;
- }
-
- dest_path = bg_pictures_source_get_unique_path (cc_background_item_get_source_url (item));
- dest = g_file_new_for_path (dest_path);
- source = g_file_new_for_uri (cc_background_item_get_source_url (item));
- basename = g_file_get_basename (source);
- display_name = g_filename_display_name (basename);
- dest_path = g_file_get_path (dest);
-
- /* create a blank image to use until the source image is ready */
- pixbuf = gdk_pixbuf_new (GDK_COLORSPACE_RGB, TRUE, 8, 1, 1);
- gdk_pixbuf_fill (pixbuf, 0x00000000);
- gdk_pixbuf_save (pixbuf, dest_path, "png", NULL, NULL);
-
- if (panel->copy_cancellable)
- {
- g_cancellable_cancel (panel->copy_cancellable);
- g_cancellable_reset (panel->copy_cancellable);
- }
-
- if (panel->spinner)
- {
- gtk_widget_destroy (GTK_WIDGET (panel->spinner));
- panel->spinner = NULL;
- }
-
- /* create a spinner while the file downloads */
- panel->spinner = gtk_spinner_new ();
- gtk_spinner_start (GTK_SPINNER (panel->spinner));
- gtk_box_pack_start (GTK_BOX (WID ("bottom-hbox")), panel->spinner, FALSE,
- FALSE, 6);
- gtk_widget_show (panel->spinner);
-
- /* reference the panel in case it is removed before the copy is
- * finished */
- g_object_ref (panel);
- g_object_set_data_full (G_OBJECT (source), "item", g_object_ref (item), g_object_unref);
- g_object_set_data (G_OBJECT (source), "settings", settings);
- g_file_copy_async (source, dest, G_FILE_COPY_OVERWRITE,
- G_PRIORITY_DEFAULT, panel->copy_cancellable,
- NULL, NULL,
- copy_finished_cb, panel);
- dest_uri = g_file_get_uri (dest);
-
- g_settings_set_string (settings, WP_URI_KEY, dest_uri);
- g_object_set (G_OBJECT (item),
- "uri", dest_uri,
- "needs-download", FALSE,
- "name", display_name,
- NULL);
-
- /* delay the updated drawing of the preview until the copy finishes */
- save_settings = FALSE;
}
else
{
@@@ -510,13 -578,9 +503,13 @@@ static voi
cc_background_panel_init (CcBackgroundPanel *panel)
{
gchar *objects[] = {"background-panel", NULL };
- GError *err = NULL;
+ g_autoptr(GError) err = NULL;
+ GtkCssProvider *provider;
GtkWidget *widget;
+ /* Create wallpapers store */
+ panel->store = cc_background_store_new ();
+
panel->connection = g_application_get_dbus_connection (g_application_get_default ());
g_resources_register (cc_background_get_resource ());
@@@ -587,14 -620,16 +579,12 @@@
/* Load the backgrounds */
reload_current_bg (panel, panel->settings);
update_preview (panel, panel->settings, NULL);
- reload_current_bg (panel, panel->lock_settings);
- update_preview (panel, panel->lock_settings, NULL);
+ /* Bind liststore to flowbox */
+ cc_background_store_bind_flow_box (panel->store,
+ panel,
+ WID("background-gallery"),
+ create_gallery_item);
-
-
/* Background settings */
g_signal_connect (panel->settings, "changed", G_CALLBACK (on_settings_changed), panel);
- g_signal_connect (panel->lock_settings, "changed", G_CALLBACK (on_settings_changed), panel);
-
- /* Background buttons */
- widget = WID ("background-set-button");
- g_signal_connect (widget, "clicked", G_CALLBACK (on_background_button_clicked), panel);
- widget = WID ("background-lock-set-button");
- g_signal_connect (widget, "clicked", G_CALLBACK (on_lock_button_clicked), panel);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]