Exemplo n.º 1
0
            void UpdateTranslationsAsync(object ob)
            {
                object[]           data        = (object[])ob;
                IProgressMonitor   monitor     = (IProgressMonitor)data [0];
                TranslationProject project     = (TranslationProject)data [1];
                Translation        translation = (Translation)data [2];

                try
                {
                    project.UpdateTranslations(monitor, translation);
                    Gtk.Application.Invoke(delegate
                    {
                        POEditorWidget.ReloadWidgets();
                    });
                }
                catch (Exception ex)
                {
                    monitor.ReportError(GettextCatalog.GetString("Translation update failed."), ex);
                }
                finally
                {
                    monitor.Log.WriteLine();
                    monitor.Log.WriteLine(GettextCatalog.GetString("---------------------- Done ----------------------"));
                    monitor.Dispose();
                }
            }
 void UpdateTranslationsAsync(ProgressMonitor monitor, TranslationProject project)
 {
     try {
         project.UpdateTranslations(monitor);
         Gtk.Application.Invoke((o, args) => {
             POEditorWidget.ReloadWidgets();
         });
     } catch (Exception ex) {
         monitor.ReportError(GettextCatalog.GetString("Translation update failed."), ex);
     } finally {
         monitor.Log.WriteLine();
         monitor.Log.WriteLine(GettextCatalog.GetString("---------------------- Done ----------------------"));
         monitor.Dispose();
     }
 }
			void UpdateTranslationsAsync (ProgressMonitor monitor, TranslationProject project, Translation translation)
			{
				try {
					project.UpdateTranslations (monitor, translation);
					Gtk.Application.Invoke (delegate {
						POEditorWidget.ReloadWidgets ();
					});
				} catch (Exception ex) {
					monitor.ReportError (GettextCatalog.GetString ("Translation update failed."), ex);
				} finally {
					monitor.Log.WriteLine ();
					monitor.Log.WriteLine (GettextCatalog.GetString ("---------------------- Done ----------------------"));
					monitor.Dispose ();
				}
			}