aboutsummaryrefslogtreecommitdiff
path: root/debian/patches
diff options
context:
space:
mode:
authorKen VanDine <ken.vandine@canonical.com>2012-01-24 22:20:59 -0500
committerKen VanDine <ken.vandine@canonical.com>2012-01-24 22:20:59 -0500
commit645376ce15e97a5caca6869236aa7df82af3b1ca (patch)
treecdf04901609abe4f963339506bef6f4c02058856 /debian/patches
parent5c23d138bfa80811e6c1198804dca164b608e08b (diff)
downloadayatana-indicator-sound-645376ce15e97a5caca6869236aa7df82af3b1ca.tar.gz
ayatana-indicator-sound-645376ce15e97a5caca6869236aa7df82af3b1ca.tar.bz2
ayatana-indicator-sound-645376ce15e97a5caca6869236aa7df82af3b1ca.zip
* -debian/patches/disable_Werror.patch
- disabled in debian/rules instead * Add lazy_init.patch: Avoid spawning notification daemon right at startup, instead initialize it lazily when actually doing a notification. Improves boot speed. (LP: #912150) * Add disable_Werror.patch: Build without -Werror, to avoid build failure due to deprecated declarations. (LP: #912160)
Diffstat (limited to 'debian/patches')
-rw-r--r--debian/patches/lazy_init.patch40
-rw-r--r--debian/patches/series1
2 files changed, 41 insertions, 0 deletions
diff --git a/debian/patches/lazy_init.patch b/debian/patches/lazy_init.patch
new file mode 100644
index 0000000..cc0fe17
--- /dev/null
+++ b/debian/patches/lazy_init.patch
@@ -0,0 +1,40 @@
+Description: Avoid spawning notification daemon right at startup, instead initialize it lazily when actually doing a notification. Improves boot speed.
+Bug: https://launchpad.net/bugs/912150
+Author: Martin Pitt <martin.pitt@ubuntu.com>
+Forwarded: https://code.launchpad.net/~pitti/indicator-sound/lazy-notification-init/+merge/87576
+
+--- a/src/sound-state-manager.c 2011-04-05 03:14:19 +0000
++++ b/src/sound-state-manager.c 2012-01-05 08:46:07 +0000
+@@ -80,8 +80,6 @@
+
+ priv->settings_manager = g_settings_new("com.canonical.indicators.sound");
+
+- sound_state_manager_notification_init (self);
+-
+ sound_state_manager_prepare_state_image_names (self);
+ sound_state_manager_prepare_blocked_animation (self);
+
+@@ -134,6 +132,13 @@
+ static void
+ sound_state_manager_notification_init (SoundStateManager* self)
+ {
++ static gboolean initialized = FALSE;
++
++ /* one-time lazy initialization */
++ if (initialized)
++ return;
++ initialized = TRUE;
++
+ SoundStateManagerPrivate* priv = SOUND_STATE_MANAGER_GET_PRIVATE(self);
+
+ if (!notify_init(PACKAGE_NAME))
+@@ -164,6 +169,8 @@
+ {
+ SoundStateManagerPrivate* priv = SOUND_STATE_MANAGER_GET_PRIVATE(self);
+
++ sound_state_manager_notification_init (self);
++
+ if (priv->notification == NULL ||
+ g_settings_get_boolean (priv->settings_manager, "show-notify-osd-on-scroll") == FALSE){
+ return;
+
diff --git a/debian/patches/series b/debian/patches/series
index e69de29..20dfb03 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -0,0 +1 @@
+lazy_init.patch