[cheese/three-point-oh] only load effect files ending with ".effect"
- From: Daniel G. Siegel <dgsiegel src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [cheese/three-point-oh] only load effect files ending with ".effect"
- Date: Sat, 3 Jul 2010 10:03:18 +0000 (UTC)
commit 06c410fcaffde0f125d9b3a1cdcd7925f7d49c9e
Author: daniel g. siegel <dgsiegel gnome org>
Date: Sat Jul 3 12:02:05 2010 +0200
only load effect files ending with ".effect"
src/cheese-effects-manager.vala | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
---
diff --git a/src/cheese-effects-manager.vala b/src/cheese-effects-manager.vala
index 4be6e59..00c77db 100644
--- a/src/cheese-effects-manager.vala
+++ b/src/cheese-effects-manager.vala
@@ -54,8 +54,10 @@ internal class Cheese.EffectsManager : GLib.Object
cur_file = dir.read_name ();
while (cur_file != null)
{
- Effect effect = EffectsManager.parse_effect_file (GLib.Path.build_filename (directory, cur_file));
- effects.add (effect);
+ if (cur_file.has_suffix(".effect")) {
+ Effect effect = EffectsManager.parse_effect_file (GLib.Path.build_filename (directory, cur_file));
+ effects.add (effect);
+ }
cur_file = dir.read_name ();
}
}
@@ -70,7 +72,6 @@ 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 user_effects = GLib.Path.build_filename (Environment.get_user_data_dir (), ".cheese", "effects");
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]