Do

Merge lp://qastaging/~alexlauni/do/wiki-urls into lp://qastaging/do

Proposed by Alex Launi
Status: Merged
Merged at revision: not available
Proposed branch: lp://qastaging/~alexlauni/do/wiki-urls
Merge into: lp://qastaging/do
Diff against target: None lines
To merge this branch: bzr merge lp://qastaging/~alexlauni/do/wiki-urls
Reviewer Review Type Date Requested Status
Robert Dyer (community) Approve
Review via email: mp+7839@code.qastaging.launchpad.net
To post a comment you must log in.
Revision history for this message
Alex Launi (alexlauni) wrote :

Makes the About button respect the addin manifest's URL attribute if set.

1254. By Alex Launi

Enforce the url attribute of the addin, make about button desensitized if no url attribute

Revision history for this message
Robert Dyer (psybers) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'Do/gtk-gui/gui.stetic'
2--- Do/gtk-gui/gui.stetic 2009-06-21 02:20:30 +0000
3+++ Do/gtk-gui/gui.stetic 2009-06-24 10:20:55 +0000
4@@ -6,9 +6,6 @@
5 </configuration>
6 <import>
7 <widget-library name="Mono.Addins.Gui, Version=0.4.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756" />
8- <widget-library name="../../Do.Platform.Linux/bin/Debug/Do.Platform.Linux.dll" />
9- <widget-library name="../../Do.Interface.Linux/bin/Debug/Do.Interface.Linux.dll" />
10- <widget-library name="../../Do.Interface.Linux.AnimationBase/bin/Debug/Do.Interface.Linux.AnimationBase.dll" />
11 <widget-library name="../bin/Debug/Do.exe" internal="true" />
12 </import>
13 <widget class="Gtk.Window" id="Do.UI.PreferencesWindow" design-size="450 470">
14
15=== modified file 'Do/gtk-gui/objects.xml'
16--- Do/gtk-gui/objects.xml 2009-06-06 18:05:52 +0000
17+++ Do/gtk-gui/objects.xml 2009-06-24 10:20:55 +0000
18@@ -7,8 +7,4 @@
19 <itemgroups />
20 <signals />
21 </object>
22- <object type="Do.UI.ManagePluginsPreferencesWidget" palette-category="Do" allow-children="false" base-type="Gtk.Bin">
23- <itemgroups />
24- <signals />
25- </object>
26 </objects>
27\ No newline at end of file
28
29=== modified file 'Do/src/Do.UI/ManagePluginsPreferencesWidget.cs'
30--- Do/src/Do.UI/ManagePluginsPreferencesWidget.cs 2009-06-05 19:45:45 +0000
31+++ Do/src/Do.UI/ManagePluginsPreferencesWidget.cs 2009-06-24 10:20:55 +0000
32@@ -208,14 +208,20 @@
33 {
34 foreach (string id in nview.GetSelectedAddins ()) {
35 try {
36+ string name, url;
37 Addin a = AddinManager.Registry.GetAddin (id);
38- string category;
39- if (PluginManager.PluginClassifiesAs (a, "Docklets"))
40- category = DockletWikiPageFormat;
41+ name = Addin.GetIdName (id).Split ('.')[1];
42+
43+ // plugin manifest files support a Url attribute, if this attribute is set we should
44+ // use it instead of trying to guess the wiki page.
45+ if (!string.IsNullOrEmpty (a.Description.Url))
46+ url = a.Description.Url;
47+ else if (PluginManager.PluginClassifiesAs (a, "Docklets"))
48+ url = string.Format (DockletWikiPageFormat, name);
49 else
50- category = PluginWikiPageFormat;
51- string name = Addin.GetIdName (id).Split ('.')[1];
52- Services.Environment.OpenUrl (string.Format (WikiPage, name, category));
53+ url = string.Format (PluginWikiPageFormat, name);
54+
55+ Services.Environment.OpenUrl (url);
56 } catch { }
57 }
58 }