[gnome-control-center] background: Remove some dead code
- From: Georges Basile Stavracas Neto <gbsneto src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-control-center] background: Remove some dead code
- Date: Wed, 19 Feb 2020 10:58:14 +0000 (UTC)
commit 4838ce4228d975ff42f8e01fc8bbf382ee80df42
Author: Florian Müllner <fmuellner gnome org>
Date: Tue Feb 11 15:15:26 2020 +0100
background: Remove some dead code
update_preview() is never called with a non-NULL item.
https://gitlab.gnome.org/GNOME/gnome-control-center/issues/864
panels/background/cc-background-panel.c | 20 ++++----------------
1 file changed, 4 insertions(+), 16 deletions(-)
---
diff --git a/panels/background/cc-background-panel.c b/panels/background/cc-background-panel.c
index 51b082c32..27efe88b0 100644
--- a/panels/background/cc-background-panel.c
+++ b/panels/background/cc-background-panel.c
@@ -82,24 +82,12 @@ get_current_background (CcBackgroundPanel *panel,
static void
update_preview (CcBackgroundPanel *panel,
- GSettings *settings,
- CcBackgroundItem *item)
+ GSettings *settings)
{
CcBackgroundItem *current_background;
current_background = get_current_background (panel, settings);
- if (item && current_background)
- {
- g_object_unref (current_background);
- current_background = cc_background_item_copy (item);
- if (settings == panel->settings)
- panel->current_background = current_background;
- else
- panel->current_lock_background = current_background;
- cc_background_item_load (current_background, NULL);
- }
-
if (settings == panel->settings)
cc_background_preview_set_item (panel->desktop_preview, current_background);
else
@@ -337,7 +325,7 @@ on_settings_changed (GSettings *settings,
CcBackgroundPanel *panel)
{
reload_current_bg (panel, settings);
- update_preview (panel, settings, NULL);
+ update_preview (panel, settings);
}
static void
@@ -359,9 +347,9 @@ cc_background_panel_init (CcBackgroundPanel *panel)
/* Load the backgrounds */
reload_current_bg (panel, panel->settings);
- update_preview (panel, panel->settings, NULL);
+ update_preview (panel, panel->settings);
reload_current_bg (panel, panel->lock_settings);
- update_preview (panel, panel->lock_settings, NULL);
+ update_preview (panel, panel->lock_settings);
/* Background settings */
g_signal_connect (panel->settings, "changed", G_CALLBACK (on_settings_changed), panel);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]