~ubuntu-branches/ubuntu/quantal/shotwell/quantal

« back to all changes in this revision

Viewing changes to src/plugins/Plugins.vala

  • Committer: Bazaar Package Importer
  • Author(s): Sebastien Bacher
  • Date: 2011-08-24 11:45:16 UTC
  • mfrom: (1.2.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20110824114516-01cf7d83qvc9nse1
Tags: 0.11.0-0ubuntu1
New upstream version, drop patches which are in the new version

Show diffs side-by-side

added added

removed removed

Lines of Context:
77
77
        // register themselves)
78
78
        is_core = is_core_pluggable(pluggable);
79
79
        
80
 
        // enabled defaults to false unless this Pluggable is core, in which case default is true
81
 
        enabled = Config.get_instance().is_plugin_enabled(id, is_core);
 
80
       FuzzyPropertyState saved_state = Config.Facade.get_instance().is_plugin_enabled(id);
 
81
        enabled = ((is_core && (saved_state != FuzzyPropertyState.DISABLED)) ||
 
82
            (!is_core && (saved_state == FuzzyPropertyState.ENABLED)));
82
83
        
83
84
        // inform the plugin of its activation state
84
85
        pluggable.activation(enabled);
96
97
            return false;
97
98
        
98
99
        this.enabled = enabled;
99
 
        Config.get_instance().set_plugin_enabled(id, enabled);
 
100
        Config.Facade.get_instance().set_plugin_enabled(id, enabled);
100
101
        pluggable.activation(enabled);
101
102
        
102
103
        return true;