~ubuntu-branches/ubuntu/utopic/gnome-settings-daemon/utopic

« back to all changes in this revision

Viewing changes to debian/patches/git_housekeeping_ignore_list.patch

  • Committer: Package Import Robot
  • Author(s): Sebastien Bacher, Martin Pitt, Sebastien Bacher
  • Date: 2013-05-13 15:28:42 UTC
  • Revision ID: package-import@ubuntu.com-20130513152842-o8birmss2qigkbqn
Tags: 3.6.4-0ubuntu10
[ Martin Pitt ]
* Drop 51_lock_screen_on_suspend.patch: Superseded by handling this key in
  gnome-screensaver. With that, g-screensaver mirrors what's being done in
  g-shell, and avoids patching settings-daemon.

[ Sebastien Bacher ]
* debian/patches/git_housekeeping_ignore_list.patch:
  - correctly handle ignore list for disk space notifications (lp: #881376)
* debian/patches/git_glib_get_xdg_dirs.patch:
  - use glib to get xdg dirs (rather than reading the environment)
* debian/patches/git_sound_not_polling.patch:
  - don't poll on non existant directories

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
From 8ed86ae526dda44ed2c9f793facd5f5c70dc15ec Mon Sep 17 00:00:00 2001
 
2
From: Bastien Nocera <hadess@hadess.net>
 
3
Date: Wed, 20 Feb 2013 23:03:27 +0000
 
4
Subject: housekeeping: Fix incorrect handling of ignore_paths
 
5
 
 
6
You can't use G_N_ELEMENTS() on a non-static array.
 
7
 
 
8
Also use a guint to iterate, and prepend to the list (which
 
9
is quicker than appending for long lists).
 
10
---
 
11
diff --git a/plugins/housekeeping/gsd-disk-space.c b/plugins/housekeeping/gsd-disk-space.c
 
12
index b2976ea..704dd6c 100644
 
13
--- a/plugins/housekeeping/gsd-disk-space.c
 
14
+++ b/plugins/housekeeping/gsd-disk-space.c
 
15
@@ -965,12 +965,10 @@ gsd_ldsm_get_config (void)
 
16
 
 
17
         settings_list = g_settings_get_strv (settings, SETTINGS_IGNORE_PATHS);
 
18
         if (settings_list != NULL) {
 
19
-                gint i;
 
20
+                guint i;
 
21
 
 
22
-                for (i = 0; i < G_N_ELEMENTS (settings_list); i++) {
 
23
-                        if (settings_list[i] != NULL)
 
24
-                                ignore_paths = g_slist_append (ignore_paths, g_strdup (settings_list[i]));
 
25
-                }
 
26
+                for (i = 0; i < settings_list[i] != NULL; i++)
 
27
+                        ignore_paths = g_slist_prepend (ignore_paths, g_strdup (settings_list[i]));
 
28
 
 
29
                 /* Make sure we dont leave stale entries in ldsm_notified_hash */
 
30
                 g_hash_table_foreach_remove (ldsm_notified_hash,