~ted/ubuntu/lucid/tomboy/with-patch

« back to all changes in this revision

Viewing changes to Mono.Addins/Mono.Addins.Gui/Mono.Addins.Gui/AddinInstallDialog.cs

Tags: upstream-0.9.8
Import upstream version 0.9.8

Show diffs side-by-side

added added

removed removed

Lines of Context:
32
32
using System.Threading;
33
33
using System.Collections;
34
34
using System.Collections.Specialized;
 
35
using System.Diagnostics;
35
36
using Mono.Unix;
36
37
 
37
38
using Gtk;
122
123
                        else
123
124
                                reps = service.Repositories.GetAvailableAddins (rep);
124
125
                        
125
 
                        foreach (AddinRepositoryEntry arep in reps) {
126
 
                                Addin sinfo = AddinManager.Registry.GetAddin (arep.Addin.Id);
 
126
                        foreach (AddinRepositoryEntry arep in reps)
 
127
                        {
127
128
                                if (!Services.InApplicationNamespace (service, arep.Addin.Id))
128
129
                                        continue;
129
130
                                
 
131
                                // Find whatever version is installed
 
132
                                Addin sinfo = AddinManager.Registry.GetAddin (Addin.GetIdName (arep.Addin.Id));
 
133
                                
130
134
                                if (sinfo == null) {
131
135
                                        if (showNotInstalled)
132
136
                                                tree.AddAddin (arep.Addin, arep, true);
191
195
                protected void OnManageSites (object sender, EventArgs e)
192
196
                {
193
197
                        ManageSitesDialog dlg = new ManageSitesDialog (service);
 
198
                        dlg.TransientFor = this;
194
199
                        try {
195
200
                                dlg.Run ();
196
201
                                FillRepos ();
258
263
                                return;
259
264
                                
260
265
                        if (info.Url != "")
261
 
                                Gnome.Url.Show (info.Url);
 
266
                                Process.Start (info.Url);
262
267
                }
263
268
                
264
269
                protected void OnShowInfo (object sender, EventArgs e)
426
431
                        string txt;
427
432
                        string okmessage;
428
433
                        string errmessage;
 
434
                        string warnmessage;
429
435
                        
430
436
                        installMonitor = new InstallMonitor (progressLabel, progressBar, mainProgressBar);
431
437
                        ThreadStart oper;
434
440
                                oper = new ThreadStart (RunInstall);
435
441
                                okmessage = Catalog.GetString ("The installation has been successfully completed.");
436
442
                                errmessage = Catalog.GetString ("The installation failed!");
 
443
                                warnmessage = Catalog.GetString ("The installation has completed with warnings.");
437
444
                        } else {
438
445
                                oper = new ThreadStart (RunUninstall);
439
446
                                okmessage = Catalog.GetString ("The uninstallation has been successfully completed.");
440
447
                                errmessage = Catalog.GetString ("The uninstallation failed!");
 
448
                                warnmessage = Catalog.GetString ("The uninstallation has completed with warnings.");
441
449
                        }
442
450
                        
443
451
                        Thread t = new Thread (oper);
449
457
                        
450
458
                        wizardNotebook.NextPage ();
451
459
 
452
 
                        if (installMonitor.Success) {
 
460
                        if (installMonitor.Success && installMonitor.Warnings.Count == 0) {
 
461
                                imageWarn.Visible = false;
453
462
                                imageError.Visible = false;
454
463
                                imageInfo.Visible = true;
455
464
                                txt = "<b>" + okmessage + "</b>\n\n";
 
465
                        } else if (installMonitor.Success) {
 
466
                                imageWarn.Visible = true;
 
467
                                imageInfo.Visible = false;
 
468
                                imageError.Visible = false;
 
469
                                txt = "<b>" + warnmessage + "</b>\n\n";
 
470
                                foreach (string s in installMonitor.Warnings)
 
471
                                        txt += GLib.Markup.EscapeText (s) + "\n";
456
472
                        } else {
 
473
                                imageWarn.Visible = false;
 
474
                                imageInfo.Visible = false;
457
475
                                imageError.Visible = true;
458
 
                                imageInfo.Visible = false;
459
476
                                txt = "<span foreground=\"red\"><b>" + errmessage + "</b></span>\n\n";
460
477
                                foreach (string s in installMonitor.Errors)
461
 
                                        txt += s + "\n";
 
478
                                        txt += GLib.Markup.EscapeText (s) + "\n";
462
479
                        }
463
480
                        
464
481
                        labelResult.Markup = txt;