~ubuntu-branches/ubuntu/wily/gnome-do/wily

« back to all changes in this revision

Viewing changes to Do/src/Do.UI/ManagePluginsPreferencesWidget.cs

  • Committer: Bazaar Package Importer
  • Author(s): Christopher James Halse Rogers
  • Date: 2011-02-15 21:50:02 UTC
  • mfrom: (1.1.10 upstream)
  • Revision ID: james.westby@ubuntu.com-20110215215002-1j8ylb69o15asb06
Tags: 0.8.4-0ubuntu1
* The Race Against FF upload.  Merge from unreleased Debian git.
  Remaining Ubuntu changes:
  + debian/patches/05_disable_resize_grips.patch.diff:
    Disable resize handles for the Do windows.
  + debian/control:
    Bump gtk# build dep for HasResizeGrip API.
* New Debian changes:
* The long fortold release
  + Fixes a threadsafety issue resulting in 100% CPU usage (Closes: 565591,
    LP: #450852).
  + Proxies all keyring calls to the GTK main thread, as required by the new
    gnome-keyring (Closes: 603876, LP: #553643)
* debian/patches/00_bundledlibs.dpatch:
* debian/rules:
  + Upstream has dropped bundled gmcs binary; now 100% DFSG-free, so we don't
    have to repack the tarball or patch the buildsystem.
* debian/patches/03_disable_docky.dpatch:
  + Drop.  Docky is now gone in the upstream tarball.
* debian/rules:
* debian/control:
* debian/patches/*:
  + Switch to quilt to harmonise with other pkg-cli-* packages.
* debian/control:
  + Drop recommends on gnome-do-docklets.  Docky is now a separate package,
    so the docklets are useless for Do.
  + Bump Breaks on gnome-do-plugins to 0.8.3.  Do no longer provides the Wink
    library, which has been imported into the 0.8.3 do-plugins sources.
  + Bump standards-version; no changes needed.
  + Migrate to git and update VCS fields appropriately

Show diffs side-by-side

added added

removed removed

Lines of Context:
25
25
using System.Collections.Generic;
26
26
 
27
27
using Gtk;
 
28
 
28
29
using Mono.Addins;
29
 
using Mono.Addins.Setup;
30
30
using Mono.Unix;
31
31
 
32
32
using Do;
45
45
 
46
46
                const string WikiPage = "http://do.davebsd.com/wiki/{0}{1}";
47
47
                const string PluginWikiPageFormat = "_Plugin";
48
 
                const string DockletWikiPageFormat = "_Docklet";
49
48
 
50
49
                PluginNodeView nview;
51
50
                SearchEntry search_entry;
167
166
 
168
167
                private void OnPluginToggled (string id, bool enabled)
169
168
                {       
170
 
                        // If the addin isn't found, install it.
171
 
                        if (null == AddinManager.Registry.GetAddin (id)) {
172
 
                                IAddinInstaller installer = new ConsoleAddinInstaller ();
173
 
                                try {
174
 
                                        installer.InstallAddins (AddinManager.Registry,
175
 
                                                string.Format ("Installing \"{0}\" addin...", id), new [] { id });
176
 
                                } catch (InstallException e) {
177
 
                                        Log<ManagePluginsPreferencesWidget>.Error (e.Message);
178
 
                                        Log<ManagePluginsPreferencesWidget>.Debug (e.StackTrace);
179
 
                                        return;
180
 
                                }
181
 
                        }
182
 
                        // Now enable or disable the plugin.
183
 
                        if (enabled) {
184
 
                                AddinManager.Registry.EnableAddin (id);
185
 
                        } else {
186
 
                                AddinManager.Registry.DisableAddin (id);
187
 
                        }
188
 
                        UpdateButtonState ();
189
 
                }
190
 
                
191
 
                void OnBtnRefreshClicked (object sender, EventArgs e)
192
 
                {
193
 
                        nview.Refresh (true);
 
169
                        if (enabled)
 
170
                                PluginManager.Enable (id);
 
171
                        else
 
172
                                PluginManager.Disable (id);     
194
173
                        UpdateButtonState ();
195
174
                }
196
175
 
219
198
                                        // use it instead of trying to guess the wiki page.
220
199
                                        if (!string.IsNullOrEmpty (a.Description.Url))
221
200
                                                url = a.Description.Url;
222
 
                                        if (PluginManager.PluginClassifiesAs (a, "Docklets"))
223
 
                                                url = string.Format (WikiPage, name, DockletWikiPageFormat);
224
 
                                        else
225
 
                                                url = string.Format (WikiPage, name, PluginWikiPageFormat);
 
201
                                        url = string.Format (WikiPage, name, PluginWikiPageFormat);
226
202
                                        
227
203
                                        Services.Environment.OpenUrl (url);
228
204
                                } catch (Exception e) {