예제 #1
0
		void RunInstall (Gtk.Alignment commandBox, Update update)
		{
			installing = true;
			
			ProgressBarMonitor monitorBar = new ProgressBarMonitor ();
			monitorBar.ShowErrorsDialog = true;
			monitorBar.Show ();
			commandBox.Child.Destroy ();
			commandBox.Add (monitorBar);
			
			IAsyncOperation oper = update.InstallAction (monitorBar.CreateProgressMonitor ());
			oper.Completed += delegate {
				DispatchService.GuiDispatch (delegate {
					monitorBar.Hide ();
					Gtk.Label result = new Gtk.Label ();
					if (oper.Success)
						result.Text = GettextCatalog.GetString ("Completed");
					else
						result.Text = GettextCatalog.GetString ("Failed");
					commandBox.Child.Destroy ();
					commandBox.Add (result);
					result.Show ();
					installing = false;
					
					if (installQueue.Count > 0)
						installQueue.Dequeue ()();
				});
			};
		}
예제 #2
0
		void RunInstall (HBox labelBox, Update update)
		{
			installing = true;
			
			ProgressBarMonitor monitorBar = new ProgressBarMonitor ();
			monitorBar.ShowErrorsDialog = true;
			monitorBar.Show ();
			labelBox.PackStart (monitorBar, false, false, 0);
			
			IAsyncOperation oper = update.InstallAction (monitorBar.CreateProgressMonitor ());
			oper.Completed += delegate {
				DispatchService.GuiDispatch (delegate {
					monitorBar.Hide ();
					Gtk.Label result = new Gtk.Label ();
					if (oper.Success)
						result.Text = GettextCatalog.GetString ("Completed");
					else
						result.Text = GettextCatalog.GetString ("Failed");
					labelBox.PackStart (result, false, false, 0);
					result.Show ();
					installing = false;
					
					if (installQueue.Count > 0)
						installQueue.Dequeue ()();
				});
			};
		}
예제 #3
0
		void Install (Gtk.Alignment commandBox, Button installButton, Update update)
		{
			if (update.InstallAction == null) {
				DesktopService.ShowUrl (update.Url);
				return;
			}
			
			installButton.Hide ();
			
			if (installing) {
				Gtk.Label lab = new Gtk.Label (GettextCatalog.GetString ("Waiting"));
				commandBox.Child.Destroy ();
				commandBox.Add (lab);
				lab.Show ();
				installQueue.Enqueue (delegate {
					lab.Hide ();
					RunInstall (commandBox, update);
				});
				return;
			}
			
			RunInstall (commandBox, update);
		}
예제 #4
0
		void Install (HBox labelBox, Button installButton, Update update)
		{
			if (update.InstallAction == null) {
				DesktopService.ShowUrl (update.Url);
				return;
			}
			
			installButton.Hide ();
			
			if (installing) {
				Gtk.Label lab = new Gtk.Label (GettextCatalog.GetString ("Waiting"));
				labelBox.PackStart (lab, false, false, 0);
				lab.Show ();
				installQueue.Enqueue (delegate {
					lab.Hide ();
					RunInstall (labelBox, update);
				});
				return;
			}
			
			RunInstall (labelBox, update);
		}