Do

Merge lp://staging/~alexlauni/do/no-repo into lp://staging/do

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

the right branch

Revision history for this message
Jason Smith (jassmith) wrote :

The XmlTextReader needs to be disposed

This is not too friendly to translators:
string errorMessage = Catalog.GetString ("<b><span size=\"large\">There was an error installing the selected {0}</span></b>");

use:
string errorMessage = "<b><span size=\"large\">" + Catalog.GetString ("There was an error installing the selected ") + "{0}</span></b>";

Optionally:
LINQ-ify EnableDisabledPlugins ();

review: Approve
lp://staging/~alexlauni/do/no-repo updated
1118. By Alex Launi

wrap XmlReader in a using block

1119. By Alex Launi

some more linqification in InstallLocalPlugins

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'Do.Universe/Do.Universe.mdp'
--- Do.Universe/Do.Universe.mdp 2009-01-27 03:23:24 +0000
+++ Do.Universe/Do.Universe.mdp 2009-04-21 01:01:54 +0000
@@ -49,6 +49,5 @@
49 <ProjectReference type="Gac" localcopy="True" refto="System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />49 <ProjectReference type="Gac" localcopy="True" refto="System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
50 <ProjectReference type="Gac" localcopy="True" refto="gtk-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f" />50 <ProjectReference type="Gac" localcopy="True" refto="gtk-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f" />
51 <ProjectReference type="Gac" localcopy="True" refto="gdk-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f" />51 <ProjectReference type="Gac" localcopy="True" refto="gdk-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f" />
52 <ProjectReference type="Gac" localcopy="True" refto="Do.Platform, Version=0.8.0.0, Culture=neutral, PublicKeyToken=null" />
53 </References>52 </References>
54</Project>53</Project>
55\ No newline at end of file54\ No newline at end of file
5655
=== added file 'Do/Do.addins'
--- Do/Do.addins 1970-01-01 00:00:00 +0000
+++ Do/Do.addins 2009-03-31 23:04:25 +0000
@@ -0,0 +1,3 @@
1<Addins>
2 <Directory include-subdirs="true">./plugins</Directory>
3</Addins>
04
=== modified file 'Do/Do.mdp'
--- Do/Do.mdp 2009-04-18 03:12:46 +0000
+++ Do/Do.mdp 2009-04-21 22:18:57 +0000
@@ -101,6 +101,7 @@
101 <ProjectReference type="Project" localcopy="True" refto="Do.Interface.Linux" />101 <ProjectReference type="Project" localcopy="True" refto="Do.Interface.Linux" />
102 <ProjectReference type="Project" localcopy="True" refto="Do.Universe" />102 <ProjectReference type="Project" localcopy="True" refto="Do.Universe" />
103 <ProjectReference type="Gac" localcopy="True" refto="glib-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f" />103 <ProjectReference type="Gac" localcopy="True" refto="glib-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f" />
104 <ProjectReference type="Gac" localcopy="True" refto="System.Xml, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
104 </References>105 </References>
105 <LanguageParameters ApplicationIcon="../../../../../jason/do/trunk-merge/Do" ctype="CSharpProjectParameters" />106 <LanguageParameters ApplicationIcon="../../../../../jason/do/trunk-merge/Do" ctype="CSharpProjectParameters" />
106 <Deployment.LinuxDeployData scriptName="gnome-do" />107 <Deployment.LinuxDeployData scriptName="gnome-do" />
107108
=== modified file 'Do/Makefile.am'
--- Do/Makefile.am 2009-03-22 05:41:46 +0000
+++ Do/Makefile.am 2009-04-21 22:18:57 +0000
@@ -88,7 +88,8 @@
88 $(MONO_ADDINS_SETUP_LIBS) \88 $(MONO_ADDINS_SETUP_LIBS) \
89 $(NUNIT_LIBS) \89 $(NUNIT_LIBS) \
90 System \90 System \
91 System.Core91 System.Core \
92 System.Xml
9293
93PROJECT_REFERENCES = \94PROJECT_REFERENCES = \
94 Do.Universe \95 Do.Universe \
@@ -103,7 +104,7 @@
103CLEANFILES += Do.exe.config gnome-do104CLEANFILES += Do.exe.config gnome-do
104EXTRA_DIST += Do.exe.config.in gnome-do.in105EXTRA_DIST += Do.exe.config.in gnome-do.in
105106
106module_DATA += Do.exe.config107module_DATA += Do.exe.config Do.addins
107bin_SCRIPTS = gnome-do108bin_SCRIPTS = gnome-do
108109
109MCS_FLAGS += -unsafe110MCS_FLAGS += -unsafe
110111
=== modified file 'Do/gtk-gui/gui.stetic'
--- Do/gtk-gui/gui.stetic 2009-03-06 07:14:21 +0000
+++ Do/gtk-gui/gui.stetic 2009-04-22 02:17:30 +0000
@@ -5,7 +5,7 @@
5 <target-gtk-version>2.12</target-gtk-version>5 <target-gtk-version>2.12</target-gtk-version>
6 </configuration>6 </configuration>
7 <import>7 <import>
8 <widget-library name="Mono.Addins.Gui, Version=0.3.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756" />8 <widget-library name="Mono.Addins.Gui, Version=0.4.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756" />
9 <widget-library name="../bin/Debug/Do.exe" internal="true" />9 <widget-library name="../bin/Debug/Do.exe" internal="true" />
10 </import>10 </import>
11 <widget class="Gtk.Window" id="Do.UI.PreferencesWindow" design-size="450 470">11 <widget class="Gtk.Window" id="Do.UI.PreferencesWindow" design-size="450 470">
@@ -1011,7 +1011,7 @@
1011 <child internal-child="VBox">1011 <child internal-child="VBox">
1012 <widget class="Gtk.VBox" id="dialog1_VBox">1012 <widget class="Gtk.VBox" id="dialog1_VBox">
1013 <property name="MemberName" />1013 <property name="MemberName" />
1014 <property name="BorderWidth">5</property>1014 <property name="BorderWidth">2</property>
1015 <child>1015 <child>
1016 <widget class="Gtk.VBox" id="vbox2">1016 <widget class="Gtk.VBox" id="vbox2">
1017 <property name="MemberName" />1017 <property name="MemberName" />
@@ -1119,7 +1119,7 @@
1119 <child internal-child="ActionArea">1119 <child internal-child="ActionArea">
1120 <widget class="Gtk.HButtonBox" id="dialog1_ActionArea">1120 <widget class="Gtk.HButtonBox" id="dialog1_ActionArea">
1121 <property name="MemberName" />1121 <property name="MemberName" />
1122 <property name="Spacing">10</property>1122 <property name="Spacing">6</property>
1123 <property name="BorderWidth">5</property>1123 <property name="BorderWidth">5</property>
1124 <property name="Size">1</property>1124 <property name="Size">1</property>
1125 <property name="LayoutStyle">End</property>1125 <property name="LayoutStyle">End</property>
11261126
=== modified file 'Do/gtk-gui/objects.xml'
--- Do/gtk-gui/objects.xml 2009-04-18 03:12:46 +0000
+++ Do/gtk-gui/objects.xml 2009-04-21 22:18:57 +0000
@@ -1,2 +1,14 @@
1<objects attr-sync="on">1<objects attr-sync="on">
2 <object type="Do.UI.KeybindingsPreferencesWidget" palette-category="Do" allow-children="false" base-type="Gtk.Bin">
3 <itemgroups />
4 <signals />
5 </object>
6 <object type="Do.UI.GeneralPreferencesWidget" palette-category="Do" allow-children="false" base-type="Gtk.Bin">
7 <itemgroups />
8 <signals />
9 </object>
10 <object type="Do.UI.ManagePluginsPreferencesWidget" palette-category="Do" allow-children="false" base-type="Gtk.Bin">
11 <itemgroups />
12 <signals />
13 </object>
2</objects>14</objects>
3\ No newline at end of file15\ No newline at end of file
416
=== modified file 'Do/src/Do.Core/Paths.cs'
--- Do/src/Do.Core/Paths.cs 2009-01-11 00:00:14 +0000
+++ Do/src/Do.Core/Paths.cs 2009-04-22 02:51:50 +0000
@@ -29,50 +29,22 @@
29 29
30 internal static class Paths30 internal static class Paths
31 {31 {
32 const string PluginsDirectory = "plugins";
32 const string ApplicationDirectory = "gnome-do";33 const string ApplicationDirectory = "gnome-do";
33 const string PluginsDirectory = "plugins";34 const string DefaultAddinsDirectory = "addins";
34 const string RepositoryIndicatorFile = "main.mrep";
3535
36 //// <value>36 //// <value>
37 /// Directory where Do saves its Mono.Addins repository cache.37 /// Directory where Do saves its Mono.Addins repository cache.
38 /// </value>38 /// </value>
39 public static string UserPluginsDirectory {39 public static string UserPluginsDirectory {
40 get {40 get {
41 string userData =41 string userData = Environment.GetFolderPath (Environment.SpecialFolder.LocalApplicationData);
42 Environment.GetFolderPath (Environment.SpecialFolder.LocalApplicationData);42 return userData.Combine (ApplicationDirectory, PluginsDirectory);
43 string pluginDirectory
44 = string.Format ("{0}-{1}", PluginsDirectory, AssemblyInfo.DisplayVersion);
45 return userData.Combine (ApplicationDirectory, pluginDirectory);
46 }
47 }
48
49 //// <value>
50 /// Directories where Do looks for Mono.Addins repositories. These
51 /// directories exist and probably contain valid repositories.
52 /// </value>
53 public static IEnumerable<string> SystemPluginDirectories {
54 get {
55 foreach (string repository in MaybeSystemPluginDirectories) {
56 if (File.Exists (Path.Combine (repository, RepositoryIndicatorFile)))
57 yield return repository;
58 }
59 }
60 }
61
62 //// <value>
63 /// Directories where Do might look for Mono.Addins repositories; these
64 /// directories may not exist or may not be valid repositories.
65 /// </value>
66 static IEnumerable<string> MaybeSystemPluginDirectories {
67 get {
68 yield return AppDomain.CurrentDomain.BaseDirectory.Combine (PluginsDirectory);
69
70 string systemData =
71 Environment.GetFolderPath (Environment.SpecialFolder.CommonApplicationData);
72 yield return systemData.Combine (ApplicationDirectory, PluginsDirectory);
73 yield return "/usr/local/share".Combine (ApplicationDirectory, PluginsDirectory);
74 }43 }
75 }44 }
76 45
46 public static string UserAddinInstallationDirectory {
47 get { return UserPluginsDirectory.Combine (DefaultAddinsDirectory); }
48 }
77 }49 }
78}50}
7951
=== modified file 'Do/src/Do.Core/PluginManager.cs'
--- Do/src/Do.Core/PluginManager.cs 2009-01-18 19:59:39 +0000
+++ Do/src/Do.Core/PluginManager.cs 2009-04-22 02:17:30 +0000
@@ -20,6 +20,7 @@
2020
21using System;21using System;
22using System.IO;22using System.IO;
23using System.Xml;
23using System.Linq;24using System.Linq;
24using System.Collections.Generic;25using System.Collections.Generic;
2526
@@ -54,25 +55,28 @@
54 new CommunityAddinClassifier (),55 new CommunityAddinClassifier (),
55 new GreedyAddinClassifier (),56 new GreedyAddinClassifier (),
56 };57 };
5758
58 /// <summary>59 /// <summary>
59 /// Performs plugin system initialization. Should be called before this60 /// Performs plugin system initialization. Should be called before this
60 /// class or any Mono.Addins class is used. The ordering is very delicate.61 /// class or any Mono.Addins class is used. The ordering is very delicate.
61 /// </summary>62 /// </summary>
62 public static void Initialize ()63 public static void Initialize ()
63 {64 {
65 IEnumerable<string> savedPlugins = PluginsEnabledBeforeLoad ();
66
64 // Initialize Mono.Addins.67 // Initialize Mono.Addins.
65 AddinManager.Initialize (Paths.UserPluginsDirectory);68 AddinManager.Initialize (Paths.UserPluginsDirectory);
6669 // This is a workaround for a Mono.Addins bug where updated addins will get
67 // Register repositories.70 // disabled on update. We save the currently enabled addins, update, then
68 SetupService setup = new SetupService (AddinManager.Registry);71 // reenable them with the Id of the new version. It's a bit hackish but lluis
69 foreach (string path in Paths.SystemPluginDirectories) {72 // said it's a reasonable approach until that bug is fixed
70 string url = "file://" + path;73 // https://bugzilla.novell.com/show_bug.cgi?id=490302
71 if (!setup.Repositories.ContainsRepository (url)) {74 if (CorePreferences.PeekDebug)
72 setup.Repositories.RegisterRepository (null, url, false);75 AddinManager.Registry.Rebuild (null);
73 }76 else
74 }77 AddinManager.Registry.Update (null);
7578 EnableDisabledPlugins (savedPlugins);
79
76 // Initialize services before addins that may use them are loaded.80 // Initialize services before addins that may use them are loaded.
77 Services.Initialize ();81 Services.Initialize ();
78 InterfaceManager.Initialize ();82 InterfaceManager.Initialize ();
@@ -80,8 +84,24 @@
80 // Now allow loading of non-services.84 // Now allow loading of non-services.
81 foreach (string path in ExtensionPaths)85 foreach (string path in ExtensionPaths)
82 AddinManager.AddExtensionNodeHandler (path, OnPluginChanged);86 AddinManager.AddExtensionNodeHandler (path, OnPluginChanged);
8387 }
84 InstallLocalPlugins (setup);88
89 public static void InstallLocalPlugins ()
90 {
91 string [] manual;
92 IEnumerable<string> saved;
93
94 manual = Directory.GetFiles (Paths.UserAddinInstallationDirectory, "*.dll");
95 for (int i = 0; i < manual.Length; i++) {
96 manual [i] = Path.GetFileName (manual [i]);
97 }
98
99 AddinManager.Registry.Rebuild (null);
100 saved = AddinManager.Registry.GetAddins ()
101 .Where (addin => manual.Contains (Path.GetFileName (addin.AddinFile)))
102 .Select (addin => addin.Id);
103
104 EnableDisabledPlugins (saved);
85 }105 }
86106
87 public static bool PluginClassifiesAs (AddinRepositoryEntry entry, string className)107 public static bool PluginClassifiesAs (AddinRepositoryEntry entry, string className)
@@ -139,35 +159,67 @@
139 public static IEnumerable<Act> Actions {159 public static IEnumerable<Act> Actions {
140 get { return AddinManager.GetExtensionObjects ("/Do/Action").OfType<Act> (); }160 get { return AddinManager.GetExtensionObjects ("/Do/Action").OfType<Act> (); }
141 }161 }
142162
143 /// <summary>163 /// <summary>
144 /// Installs plugins that are located in the <see164 /// Returns a list of the plugins that were enabled before Mono.Addins was initialised.
145 /// cref="Paths.UserPlugins"/> directory. This will build addins165 /// this is read from config.xml.
146 /// (mpack files) and install them.
147 /// </summary>166 /// </summary>
148 /// <param name="setup">167 /// <returns>
149 /// A <see cref="SetupService"/>168 /// A <see cref="IEnumerable"/> of strings containing the versionless plugin id of all
150 /// </param>169 /// enabled plugins.
151 public static void InstallLocalPlugins (SetupService setup)170 /// </returns>
152 {171 static IEnumerable<string> PluginsEnabledBeforeLoad ()
153 IProgressStatus status = new ConsoleProgressStatus (false);172 {
154 // GetFilePaths is like Directory.GetFiles but returned files have directory prefixed.173 XmlTextReader reader;
155 Func<string, string, IEnumerable<string>> GetFilePaths = (dir, pattern) =>174 List<string> plugins;
156 Directory.GetFiles (dir, pattern).Select (f => Path.Combine (dir, f));175
157 176 plugins = new List<string> ();
158 // Create mpack (addin packages) out of dlls.177
159 GetFilePaths (Paths.UserPluginsDirectory, "*.dll")178 try {
160 .ForEach (path => setup.BuildPackage (status, Paths.UserPluginsDirectory, new[] { path }))179 // set up the reader by loading file, telling it that whitespace doesn't matter, and the DTD is irrelevant
161 // We delete the dlls after creating mpacks so we don't delete any dlls prematurely.180 reader = new XmlTextReader (Paths.UserPluginsDirectory.Combine ("addin-db-001", "config.xml"));
162 .ForEach (File.Delete);181 reader.XmlResolver = null;
182 reader.WhitespaceHandling = WhitespaceHandling.None;
183 reader.MoveToContent ();
184
185 if (string.IsNullOrEmpty (reader.Name))
186 return Enumerable.Empty<string> ();
187
188 while (reader.Read ()) {
189 string id;
190 if (reader.NodeType != XmlNodeType.Element || !reader.HasAttributes)
191 continue;
192
193 reader.MoveToAttribute ("id");
194 id = AddinIdWithoutVersion (reader.Value);
195
196 if (string.IsNullOrEmpty (id))
197 continue;
198
199 reader.MoveToAttribute ("enabled");
200
201 if (Boolean.Parse (reader.Value))
202 plugins.Add (id);
203 }
204 } catch (FileNotFoundException e) {
205 Log.Debug ("Could not find locate Mono.Addins config.xml: {0}", e.Message);
206 } catch (XmlException e) {
207 Log.Error ("Error while parsing Mono.Addins config.xml: {0}", e.Message);
208 Log.Debug (e.StackTrace);
209 }
210
211 return plugins;
212 }
213
214 static void EnableDisabledPlugins (IEnumerable<string> savedPlugins)
215 {
216 foreach (Addin addin in AddinManager.Registry.GetAddins ()) {
217 string id = addin.Id;
218 if (!AddinManager.Registry.IsAddinEnabled (id) && savedPlugins.Any (name => id.StartsWith (name)))
219 AddinManager.Registry.EnableAddin (id);
220 }
221 }
163222
164 // Install each mpack file, deleting each file when finished installing it.
165 foreach (string path in GetFilePaths (Paths.UserPluginsDirectory, "*.mpack")) {
166 setup.Install (status, new[] { path });
167 File.Delete (path);
168 }
169 }
170
171 static void OnPluginChanged (object sender, ExtensionNodeEventArgs args)223 static void OnPluginChanged (object sender, ExtensionNodeEventArgs args)
172 {224 {
173 TypeExtensionNode node = args.ExtensionNode as TypeExtensionNode;225 TypeExtensionNode node = args.ExtensionNode as TypeExtensionNode;
@@ -244,5 +296,10 @@
244 {296 {
245 return ObjectsForAddin<IConfigurable> (id);297 return ObjectsForAddin<IConfigurable> (id);
246 }298 }
299
300 static string AddinIdWithoutVersion (string id)
301 {
302 return id.Substring (0, id.IndexOf (','));
303 }
247 }304 }
248}305}
249306
=== modified file 'Do/src/Do.UI/ManagePluginsPreferencesWidget.cs'
--- Do/src/Do.UI/ManagePluginsPreferencesWidget.cs 2009-02-19 03:09:17 +0000
+++ Do/src/Do.UI/ManagePluginsPreferencesWidget.cs 2009-04-22 02:17:30 +0000
@@ -25,10 +25,9 @@
25using System.Collections.Generic;25using System.Collections.Generic;
2626
27using Gtk;27using Gtk;
28using Mono.Unix;
29using Mono.Addins;28using Mono.Addins;
30using Mono.Addins.Gui;
31using Mono.Addins.Setup;29using Mono.Addins.Setup;
30using Mono.Unix;
3231
33using Do;32using Do;
34using Do.Core;33using Do.Core;
@@ -44,8 +43,7 @@
44 public partial class ManagePluginsPreferencesWidget : Bin, IConfigurable43 public partial class ManagePluginsPreferencesWidget : Bin, IConfigurable
45 {44 {
4645
47 const string PluginWikiPageFormat =46 const string PluginWikiPageFormat = "http://do.davebsd.com/wiki/index.php?title={0}_Plugin";
48 "http://do.davebsd.com/wiki/index.php?title={0}_Plugin";
4947
50 PluginNodeView nview;48 PluginNodeView nview;
51 SearchEntry search_entry;49 SearchEntry search_entry;
@@ -92,44 +90,56 @@
92 search_entry.Show();90 search_entry.Show();
93 search_entry.Ready = true;91 search_entry.Ready = true;
94 92
95 hbox1.PackStart (search_entry,true,true,0);93 hbox1.PackStart (search_entry, true, true, 0);
96 hbox1.ShowAll();94 hbox1.ShowAll ();
97 95
98 Services.Application.RunOnMainThread (() =>96 Services.Application.RunOnMainThread (() => search_entry.InnerEntry.GrabFocus ());
99 search_entry.InnerEntry.GrabFocus ()
100 );
101 }97 }
102 98
103 protected void OnDragDataReceived (object sender, DragDataReceivedArgs args)99 protected void OnDragDataReceived (object sender, DragDataReceivedArgs args)
104 {100 {
105 string data = Encoding.UTF8.GetString (args.SelectionData.Data);101 string data;
102 string [] uriList;
103 List<string> errors;
104
105 data = Encoding.UTF8.GetString (args.SelectionData.Data);
106 // Sometimes we get a null at the end, and it crashes us.106 // Sometimes we get a null at the end, and it crashes us.
107 data = data.TrimEnd ('\0');107 data = data.TrimEnd ('\0');
108 108
109 string [] uriList = Regex.Split (data, "\r\n");109 errors = new List<string> ();
110 List<string> errors = new List<string> ();110 uriList = Regex.Split (data, "\r\n");
111
111 foreach (string uri in uriList) {112 foreach (string uri in uriList) {
112 string file;113 string file, path, filename;
113 string path;
114 114
115 if (string.IsNullOrEmpty (uri))
116 continue;
117
115 try {118 try {
116 file = uri.Remove (0, 7);119 file = uri.Remove (0, 7); // 7 is the length of file://
117 string fileName = System.IO.Path.GetFileName (file);120 // I have to use System.IO here due to a Gtk namespace conflict
121 filename = System.IO.Path.GetFileName (file);
122
118 if (!file.EndsWith (".dll")) {123 if (!file.EndsWith (".dll")) {
119 errors.Add (fileName);124 errors.Add (filename);
120 continue;125 continue;
121 }126 }
122127
123 path = Paths.UserPluginsDirectory.Combine (fileName);128 if (!Directory.Exists (Paths.UserAddinInstallationDirectory))
129 Directory.CreateDirectory (Paths.UserAddinInstallationDirectory);
130
131 path = Paths.UserAddinInstallationDirectory.Combine (filename);
124 File.Copy (file, path, true);132 File.Copy (file, path, true);
125 } catch { }133
134 if (errors.Count > 0)
135 new PluginErrorDialog (errors.ToArray ());
136
137 PluginManager.InstallLocalPlugins ();
138 } catch (Exception e) {
139 Log<ManagePluginsPreferencesWidget>.Error ("An unexpected error occurred installing your plugin");
140 Log<ManagePluginsPreferencesWidget>.Debug ("{0}\n{1}", e.Message, e.StackTrace);
141 }
126 } 142 }
127
128 if (errors.Count > 0)
129 new PluginErrorDialog (errors.ToArray ());
130
131 SetupService setup = new SetupService (AddinManager.Registry);
132 PluginManager.InstallLocalPlugins (setup);
133 }143 }
134144
135 public Bin GetConfiguration ()145 public Bin GetConfiguration ()
136146
=== modified file 'Do/src/Do.UI/PluginErrorDialog.cs'
--- Do/src/Do.UI/PluginErrorDialog.cs 2008-10-25 03:53:44 +0000
+++ Do/src/Do.UI/PluginErrorDialog.cs 2009-04-22 02:17:30 +0000
@@ -29,12 +29,12 @@
29 29
30 public PluginErrorDialog(string[] files)30 public PluginErrorDialog(string[] files)
31 {31 {
32 string errorMessage = Catalog.GetString ("<b><span size=\"large\">There was an error installing the selected {0}</span></b>");
33
32 this.Build();34 this.Build();
33 35
34 if (files.Length > 1)36 header_lbl.Markup = Catalog.GetPluralString (string.Format (errorMessage, Catalog.GetString ("plugin")),
35 header_lbl.Markup = Catalog.GetString ("<b><span size=\"large\">There was an error installing the selected plugins</span></b>");37 string.Format (errorMessage, Catalog.GetString ("plugins")), files.Length);
36 else
37 header_lbl.Markup = Catalog.GetString ("<b><span size=\"large\">There was an error installing the selected plugin</span></b>");
38 38
39 string errors = "";39 string errors = "";
40 for (int i = 0; i < files.Length; i++) {40 for (int i = 0; i < files.Length; i++) {
4141
=== modified file 'Do/src/Do.UI/PreferencesWindow.cs'
--- Do/src/Do.UI/PreferencesWindow.cs 2009-01-05 22:19:09 +0000
+++ Do/src/Do.UI/PreferencesWindow.cs 2009-04-22 02:17:30 +0000
@@ -51,9 +51,7 @@
5151
52 btn_close.IsFocus = true;52 btn_close.IsFocus = true;
53 53
54 TargetEntry [] targets = {54 TargetEntry [] targets = { new TargetEntry ("text/uri-list", 0, 0) };
55 new TargetEntry ("text/uri-list", 0, 0),
56 };
57 Drag.DestSet (this, DestDefaults.All, targets, Gdk.DragAction.Copy);55 Drag.DestSet (this, DestDefaults.All, targets, Gdk.DragAction.Copy);
58 56
59 // Add notebook pages.57 // Add notebook pages.