diff options
author | daniel g. siegel <dgsiegel@gnome.org> | 2010-08-10 01:08:10 +0200 |
---|---|---|
committer | daniel g. siegel <dgsiegel@gnome.org> | 2010-08-10 01:11:15 +0200 |
commit | 67666646e2dbb430aa180f53427282f9a3057f23 (patch) | |
tree | 39ab7ebd1c938c39d2558567469958451b79c799 /src/cheese-effects-manager.vala | |
parent | 93c8e165981c32438099962d694fe83c0204ded9 (diff) | |
download | cheese-67666646e2dbb430aa180f53427282f9a3057f23.tar.gz |
add identity effect manually at the first position of the effect list
Diffstat (limited to 'src/cheese-effects-manager.vala')
-rw-r--r-- | src/cheese-effects-manager.vala | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/src/cheese-effects-manager.vala b/src/cheese-effects-manager.vala index d80e267f..6c9e1025 100644 --- a/src/cheese-effects-manager.vala +++ b/src/cheese-effects-manager.vala @@ -26,7 +26,7 @@ const string GROUP_NAME = "Effect"; internal class Cheese.EffectsManager : GLib.Object { - public static Cheese.Effect ? parse_effect_file (string filename) + public static Cheese.Effect? parse_effect_file (string filename) { KeyFile kf = new KeyFile (); Effect eff = new Effect (); @@ -109,15 +109,13 @@ internal class Cheese.EffectsManager : GLib.Object 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 */ - foreach (Effect e in effects) + /* add identity effect as the first in the effect list */ + if (effects.size > 0) { - if (e.pipeline_desc == "identity") - { - effects.remove (e); - effects.insert (0, e); - break; - } + Effect e = new Effect (); + e.name = _("No Effect"); + e.pipeline_desc = "identity"; + effects.insert (0, e); } } |