   #
   # name - The identifying {String} name of the plugin.
   unregisterPluginControls: (name) ->
-    atom.config.unobserve "minimap.plugins.#{name}"
-    atom.workspaceView.off "minimap:toggle-#{name}"
+    @pluginsSubscriptions[name].dispose()
+    delete @pluginsSubscriptions[name]
     delete @config.plugins.properties[name]


    atom.config.set(settingsKey, true) unless atom.config.get(settingsKey)?

    atom.config.observe settingsKey, =>
      @updatesPluginActivationState(name)

    atom.workspaceView.command "minimap:toggle-#{name}", =>
      atom.config.set settingsKey, not atom.config.get(settingsKey)
      @updatesPluginActivationState(name)

  # Internal: When the `minimap.displayPluginsControls` setting is toggled,
  # this function will unregister the commands and setting that was created

Mixin = require 'mixto'
{CompositeDisposable} = require 'event-kit'

# Public: Provides methods to manage minimap plugins.
#
