[cheese] remove the effect files from cheese



commit 833d21fe49f67a153ed4b84ed80864c6d943988d
Author: daniel g. siegel <dgsiegel gnome org>
Date:   Thu Jul 29 17:15:57 2010 +0200

    remove the effect files from cheese
    
    from now on, effects are brought to the users home by the
    package gnome-video-effects (http://git.gnome.org/browse/gnome-video-effects).
    this way, many applications, like Pitivi or Empathy are able
    to use the same effects as we do. however, we will not
    depend on it, as it is an optional package and not needed to
    run.
    
    cheese looks for a directory named gnome-video-effects in
    one of the system share directories proposed by XDG (mostly
    /usr/share/ or /usr/local/share/).
    
    it also looks if the user has a directory named
    ~/.gnome-video-effects. we probably should change that and
    use the XDG standard for user shared files, which is ~/.local/share/

 configure.ac                        |    1 -
 data/Makefile.am                    |    2 +-
 data/effects/Makefile.am            |   30 -----------------------
 data/effects/README                 |   44 -----------------------------------
 data/effects/agingtv.effect.in      |    4 ---
 data/effects/dicetv.effect.in       |    4 ---
 data/effects/edgetv.effect.in       |    4 ---
 data/effects/hulk.effect.in         |    4 ---
 data/effects/identity.effect.in     |    4 ---
 data/effects/mauve.effect.in        |    4 ---
 data/effects/noir.effect.in         |    4 ---
 data/effects/optv.effect.in         |    4 ---
 data/effects/quarktv.effect.in      |    4 ---
 data/effects/radioactv.effect.in    |    4 ---
 data/effects/saturation.effect.in   |    4 ---
 data/effects/shagadelictv.effect.in |    4 ---
 data/effects/streaktv.effect.in     |    4 ---
 data/effects/vertigotv.effect.in    |    4 ---
 data/effects/warptv.effect.in       |    4 ---
 src/cheese-effects-manager.vala     |   12 ++++++---
 20 files changed, 9 insertions(+), 140 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 5373859..f18cb27 100644
--- a/configure.ac
+++ b/configure.ac
@@ -180,7 +180,6 @@ docs/reference/Makefile
 docs/reference/version.xml
 data/Makefile
 data/cheese.desktop.in
-data/effects/Makefile
 data/icons/Makefile
 data/icons/16x16/Makefile
 data/icons/22x22/Makefile
diff --git a/data/Makefile.am b/data/Makefile.am
index c9117b0..dc277b6 100644
--- a/data/Makefile.am
+++ b/data/Makefile.am
@@ -1,4 +1,4 @@
-SUBDIRS = icons effects pixmaps
+SUBDIRS = icons pixmaps
 
 @INTLTOOL_DESKTOP_RULE@
 desktopdir = $(datadir)/applications
diff --git a/src/cheese-effects-manager.vala b/src/cheese-effects-manager.vala
index cb19c2f..820ea48 100644
--- a/src/cheese-effects-manager.vala
+++ b/src/cheese-effects-manager.vala
@@ -94,11 +94,15 @@ internal class Cheese.EffectsManager : GLib.Object
 
   public void load_effects ()
   {
-    string system_effects = GLib.Path.build_filename (Config.PACKAGE_DATADIR, "effects");
-
-    effects.add_all (load_effects_from_directory (system_effects));
+    string system_effects;
+    foreach (string dir in Environment.get_system_data_dirs ())
+    {
+      system_effects = GLib.Path.build_filename (dir, "gnome-video-effects");
+      effects.add_all (load_effects_from_directory (system_effects));
+    }
 
-    string user_effects = GLib.Path.build_filename (Environment.get_user_data_dir (), ".cheese", "effects");
+    // FIXME: it would be probably better to use ~/.local/share/
+    string user_effects = GLib.Path.build_filename (Environment.get_user_data_dir (), ".gnome-video-effects");
     effects.add_all (load_effects_from_directory (user_effects));
 
     /* GROSS HACK: to make identity element appear first */



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]