f-spot r4599 - in branches/FSPOT_0_5_0_STABLE: . src src/UI.Dialog
- From: sdelcroix svn gnome org
- To: svn-commits-list gnome org
- Subject: f-spot r4599 - in branches/FSPOT_0_5_0_STABLE: . src src/UI.Dialog
- Date: Tue, 18 Nov 2008 20:14:14 +0000 (UTC)
Author: sdelcroix
Date: Tue Nov 18 20:14:14 2008
New Revision: 4599
URL: http://svn.gnome.org/viewvc/f-spot?rev=4599&view=rev
Log:
2008-11-18 Stephane Delcroix <sdelcroix novell com>
* src/UI.Dialog/PreferenceDialog.cs: handle the case where the
screensaver_tag from gconf no longer exists. Fix bgo #560265.
Modified:
branches/FSPOT_0_5_0_STABLE/ChangeLog
branches/FSPOT_0_5_0_STABLE/src/TagStore.cs
branches/FSPOT_0_5_0_STABLE/src/UI.Dialog/PreferenceDialog.cs
Modified: branches/FSPOT_0_5_0_STABLE/src/TagStore.cs
==============================================================================
--- branches/FSPOT_0_5_0_STABLE/src/TagStore.cs (original)
+++ branches/FSPOT_0_5_0_STABLE/src/TagStore.cs Tue Nov 18 20:14:14 2008
@@ -129,7 +129,6 @@
foreach (Tag t in this.item_cache.Values)
if (t.Id == id)
return t;
-
return null;
}
Modified: branches/FSPOT_0_5_0_STABLE/src/UI.Dialog/PreferenceDialog.cs
==============================================================================
--- branches/FSPOT_0_5_0_STABLE/src/UI.Dialog/PreferenceDialog.cs (original)
+++ branches/FSPOT_0_5_0_STABLE/src/UI.Dialog/PreferenceDialog.cs Tue Nov 18 20:14:14 2008
@@ -327,18 +327,13 @@
use_x_profile_check.Active = active;
break;
case Preferences.SCREENSAVER_TAG:
- try {
- screensaver_tag = Preferences.Get<int> (key);
- } catch (System.Exception e) {
- Console.WriteLine (e);
- screensaver_tag = 0;
- }
- if (screensaver_tag == 0) {
+ screensaver_tag = Preferences.Get<int> (key);
+ Tag t = MainWindow.Toplevel.Database.Tags.GetTagById (screensaver_tag);
+ if (screensaver_tag == 0 || t == null) {
screensaverall_radio.Active = true;
tag_button.Sensitive = false;
} else {
screensavertagged_radio.Active = true;
- Tag t = MainWindow.Toplevel.Database.Tags.GetTagById (screensaver_tag);
tag_button.Label = t.Name;
}
break;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]