[gnome-applet-alarm-clock] - Fix crash when enabling autostart (#615699 and #619770)
Christoph Wickert
cwickert at fedoraproject.org
Mon Sep 27 21:29:43 UTC 2010
commit 243fbc9acf37ae7cdbc7edf57a0de135ddbb6ecf
Author: Christoph Wickert <cwickert at fedoraproject.org>
Date: Mon Sep 27 23:29:43 2010 +0200
- Fix crash when enabling autostart (#615699 and #619770)
...alarm-clock-0.3.1-create-config-autostart.patch | 32 ++++++++++++++++++++
gnome-applet-alarm-clock.spec | 8 ++++-
2 files changed, 39 insertions(+), 1 deletions(-)
---
diff --git a/gnome-applet-alarm-clock-0.3.1-create-config-autostart.patch b/gnome-applet-alarm-clock-0.3.1-create-config-autostart.patch
new file mode 100644
index 0000000..261e887
--- /dev/null
+++ b/gnome-applet-alarm-clock-0.3.1-create-config-autostart.patch
@@ -0,0 +1,32 @@
+--- src/prefs.c 2010-05-04 20:30:12 +0000
++++ src/prefs.c 2010-09-06 10:25:34 +0000
+@@ -226,6 +226,19 @@
+ g_debug ("Preferences: Autostart ENABLE!");
+
+ if (file != autostart_user_file) {
++ // Create ~/.config/autostart if it doesn't exist
++ f = g_file_get_parent (autostart_user_file);
++ if (!g_file_query_exists (f, NULL)) {
++ g_debug ("Preferences: creating user autostart dir...");
++ if (!g_file_make_directory_with_parents (f, NULL, &err)) {
++ filename = g_file_get_path (f);
++ g_warning ("Preferences: Could not mkdir '%s': %s", filename, err->message);
++ g_free (filename);
++ g_object_unref (f);
++ return;
++ }
++ }
++
+ // Copy .desktop to autostart_user_file
+ filename = g_build_filename (ALARM_CLOCK_DATADIR, "applications", PACKAGE ".desktop", NULL);
+ f = g_file_new_for_path (filename);
+@@ -233,6 +246,8 @@
+ if (!g_file_copy (f, autostart_user_file, G_FILE_COPY_NONE, NULL, NULL, NULL, &err)) {
+ g_warning ("Preferences: Could not copy '%s' to user config dir: %s", filename, err->message);
+ g_error_free (err);
++ g_free (filename);
++ return;
+ }
+
+ g_free (filename);
+
diff --git a/gnome-applet-alarm-clock.spec b/gnome-applet-alarm-clock.spec
index 35da356..52738a8 100644
--- a/gnome-applet-alarm-clock.spec
+++ b/gnome-applet-alarm-clock.spec
@@ -4,13 +4,15 @@
Name: gnome-applet-alarm-clock
Version: 0.3.1
-Release: 1%{?dist}
+Release: 2%{?dist}
Summary: Alarm clock for the GNOME panel
Group: User Interface/Desktops
License: GPLv2+
URL: http://alarm-clock.pseudoberries.com
Source0: http://launchpad.net/alarm-clock/trunk/%{version}/+download/%{srcname}-%{version}.tar.gz
+# http://bazaar.launchpad.net/~joh/alarm-clock/trunk/revision/193
+Patch0: gnome-applet-alarm-clock-0.3.1-create-config-autostart.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: GConf2-devel
@@ -33,6 +35,7 @@ snoozing and a flexible notification system.
%prep
%setup -qn %{srcname}-%{version}
+%patch0 -p0 -b .create-config-autostart
%build
@@ -85,6 +88,9 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
%changelog
+* Mon Sep 27 2010 Christoph Wickert <cwickert at fedoraproject.org> - 0.3.1-2
+- Fix crash when enabling autostart (#615699 and #619770)
+
* Sun Jul 04 2010 Christoph Wickert <cwickert at fedoraproject.org> - 0.3.1-1
- Update to 0.3.1 (fixes #597043)
- Switch to new GConf scriptlet macros
More information about the scm-commits
mailing list