~ubuntu-branches/ubuntu/trusty/monodevelop/trusty-proposed

« back to all changes in this revision

Viewing changes to external/mono-addins/Mono.Addins.Gui/Mono.Addins.Gui/AddinInstaller.cs

  • Committer: Package Import Robot
  • Author(s): Jo Shields
  • Date: 2013-05-12 09:46:03 UTC
  • mto: This revision was merged to the branch mainline in revision 29.
  • Revision ID: package-import@ubuntu.com-20130512094603-mad323bzcxvmcam0
Tags: upstream-4.0.5+dfsg
ImportĀ upstreamĀ versionĀ 4.0.5+dfsg

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
 
 
2
 
 
3
using System;
 
4
using Mono.Addins.Setup;
 
5
using Mono.Unix;
 
6
 
 
7
namespace Mono.Addins.Gui
 
8
{
 
9
        public class AddinInstaller: IAddinInstaller
 
10
        {
 
11
                public void InstallAddins (AddinRegistry reg, string message, string[] addinIds)
 
12
                {
 
13
                        AddinInstallerDialog dlg = new AddinInstallerDialog (reg, message, addinIds);
 
14
                        try {
 
15
                                if (dlg.Run () == (int) Gtk.ResponseType.Cancel)
 
16
                                        throw new InstallException (Catalog.GetString ("Installation cancelled"));
 
17
                                else if (dlg.ErrMessage != null)
 
18
                                        throw new InstallException (dlg.ErrMessage);
 
19
                        }
 
20
                        finally {
 
21
                                dlg.Destroy ();
 
22
                        }
 
23
                }
 
24
        }
 
25
}