f-spot r4590 - in trunk/src: . Platform/Gnome Platform/Null Utils
- From: sdelcroix svn gnome org
- To: svn-commits-list gnome org
- Subject: f-spot r4590 - in trunk/src: . Platform/Gnome Platform/Null Utils
- Date: Mon, 17 Nov 2008 10:57:58 +0000 (UTC)
Author: sdelcroix
Date: Mon Nov 17 10:57:58 2008
New Revision: 4590
URL: http://svn.gnome.org/viewvc/f-spot?rev=4590&view=rev
Log:
move the Desktop Wallpaper stuffs in Platform
Added:
trunk/src/Platform/Gnome/Desktop.cs
trunk/src/Platform/Null/Desktop.cs
Modified:
trunk/src/MainWindow.cs
trunk/src/Makefile.am
trunk/src/SingleView.cs
trunk/src/Utils/GnomeUtil.cs
Modified: trunk/src/MainWindow.cs
==============================================================================
--- trunk/src/MainWindow.cs (original)
+++ trunk/src/MainWindow.cs Mon Nov 17 10:57:58 2008
@@ -22,6 +22,7 @@
using FSpot.Widgets;
using FSpot.Utils;
using FSpot.UI.Dialog;
+using FSpot.Platform;
using LibGPhoto2;
@@ -2624,14 +2625,12 @@
void HandleSetAsBackgroundCommand (object sender, EventArgs args)
{
-#if !NOGCONF
Photo current = CurrentPhoto;
if (current == null)
return;
- GnomeUtil.SetBackgroundImage (current.DefaultVersionUri.LocalPath);
-#endif
+ Desktop.SetBackgroundImage (current.DefaultVersionUri.LocalPath);
}
void HandleSetDateRange (object sender, EventArgs args) {
Modified: trunk/src/Makefile.am
==============================================================================
--- trunk/src/Makefile.am (original)
+++ trunk/src/Makefile.am Mon Nov 17 10:57:58 2008
@@ -76,11 +76,13 @@
$(srcdir)/Widgets/ScrolledView.cs
GNOME_PLATFORM_CSDISTFILES = \
+ $(srcdir)/Platform/Gnome/Desktop.cs \
$(srcdir)/Platform/Gnome/PreferenceBackend.cs \
$(srcdir)/Platform/Gnome/ScreenSaver.cs \
$(srcdir)/Platform/Gnome/ThumbnailFactory.cs
NULL_PLATFORM_CSDISTFILES = \
+ $(srcdir)/Platform/Null/Desktop.cs \
$(srcdir)/Platform/Null/PreferenceBackend.cs \
$(srcdir)/Platform/Null/ScreenSaver.cs \
$(srcdir)/Platform/Gnome/ThumbnailFactory.cs
Added: trunk/src/Platform/Gnome/Desktop.cs
==============================================================================
--- (empty file)
+++ trunk/src/Platform/Gnome/Desktop.cs Mon Nov 17 10:57:58 2008
@@ -0,0 +1,25 @@
+/*
+ * FSpot.Platform.Gnome.Desktop.cs
+ *
+ * Author(s):
+ * Stephane Delcrois <stephane delcroix org>
+ *
+ * This is free software. See COPYING for details.
+ */
+
+namespace FSpot.Platform
+{
+ public class Desktop
+ {
+ public static void SetBackgroundImage (string path)
+ {
+ GConf.Client client = new GConf.Client ();
+ client.Set ("/desktop/gnome/background/color_shading_type", "solid");
+ client.Set ("/desktop/gnome/background/primary_color", "#000000");
+ client.Set ("/desktop/gnome/background/picture_options", "stretched");
+ client.Set ("/desktop/gnome/background/picture_opacity", 100);
+ client.Set ("/desktop/gnome/background/picture_filename", path);
+ client.Set ("/desktop/gnome/background/draw_background", true);
+ }
+ }
+}
Added: trunk/src/Platform/Null/Desktop.cs
==============================================================================
--- (empty file)
+++ trunk/src/Platform/Null/Desktop.cs Mon Nov 17 10:57:58 2008
@@ -0,0 +1,20 @@
+/*
+ * FSpot.Platform.Null.Desktop.cs
+ *
+ * Author(s):
+ * Stephane Delcrois <stephane delcroix org>
+ *
+ * This is free software. See COPYING for details.
+ */
+
+namespace FSpot.Platform
+{
+ public class Desktop
+ {
+ public static void SetBackgroundImage (string path)
+ {
+ Log.Information ("SetBackgroundImage not implemented in the null platform");
+ }
+ }
+}
+
Modified: trunk/src/SingleView.cs
==============================================================================
--- trunk/src/SingleView.cs (original)
+++ trunk/src/SingleView.cs Mon Nov 17 10:57:58 2008
@@ -8,6 +8,7 @@
using FSpot.Utils;
using FSpot.UI.Dialog;
using FSpot.Widgets;
+using FSpot.Platform;
namespace FSpot {
public class SingleView {
@@ -273,14 +274,12 @@
void HandleSetAsBackgroundCommand (object sender, EventArgs args)
{
-#if !NOGCONF
IBrowsableItem current = image_view.Item.Current;
if (current == null)
return;
- GnomeUtil.SetBackgroundImage (current.DefaultVersionUri.LocalPath);
-#endif
+ Desktop.SetBackgroundImage (current.DefaultVersionUri.LocalPath);
}
private void HandleViewToolbar (object sender, System.EventArgs args)
Modified: trunk/src/Utils/GnomeUtil.cs
==============================================================================
--- trunk/src/Utils/GnomeUtil.cs (original)
+++ trunk/src/Utils/GnomeUtil.cs Mon Nov 17 10:57:58 2008
@@ -53,17 +53,5 @@
}
}
-#if !NOGCONF
- public static void SetBackgroundImage (string path)
- {
- GConf.Client client = new GConf.Client ();
- client.Set ("/desktop/gnome/background/color_shading_type", "solid");
- client.Set ("/desktop/gnome/background/primary_color", "#000000");
- client.Set ("/desktop/gnome/background/picture_options", "stretched");
- client.Set ("/desktop/gnome/background/picture_opacity", 100);
- client.Set ("/desktop/gnome/background/picture_filename", path);
- client.Set ("/desktop/gnome/background/draw_background", true);
- }
-#endif
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]