Esempio n. 1
0
/*		void FileSelectionChanged (object sender, EventArgs e)
 *              {
 *                      Revision rev = SelectedRevision;
 *                      if (rev == null) {
 *                              diffWidget.ComparisonWidget.OriginalEditor.Text = "";
 *                              diffWidget.ComparisonWidget.DiffEditor.Text = "";
 *                              return;
 *                      }
 *                      TreeIter iter;
 *                      if (!treeviewFiles.Selection.GetSelected (out iter))
 *                              return;
 *                      string path = (string)changedpathstore.GetValue (iter, colPath);
 *                      ThreadPool.QueueUserWorkItem (delegate {
 *                              string text = info.Repository.GetTextAtRevision (path, rev);
 *                              string prevRevision = text; // info.Repository.GetTextAtRevision (path, rev.GetPrevious ());
 *
 *                              Application.Invoke (delegate {
 *                                      diffWidget.ComparisonWidget.MimeType = IdeServices.DesktopService.GetMimeTypeForUri (path);
 *                                      diffWidget.ComparisonWidget.OriginalEditor.Text = prevRevision;
 *                                      diffWidget.ComparisonWidget.DiffEditor.Text = text;
 *                                      diffWidget.ComparisonWidget.CreateDiff ();
 *                              });
 *                      });
 *              }*/

        protected override void OnDestroyed()
        {
            IsDestroyed = true;
            selectionCancellationTokenSource.Cancel();

            textviewDetails.ButtonPressEvent -= TextviewDetails_ButtonPressEvent;
            labelDate.ButtonPressEvent       -= LabelDate_ButtonPressEvent;

            labelAuthor.ButtonPressEvent   -= LabelAuthor_ButtonPressEvent;
            labelRevision.ButtonPressEvent -= LabelRevision_ButtonPressEvent;

            revertButton.Clicked   -= RevertRevisionClicked;
            revertToButton.Clicked -= RevertToRevisionClicked;
            refreshButton.Clicked  -= RefreshClicked;
            Ide.Gui.Styles.Changed -= HandleStylesChanged;

            diffRenderer.Dispose();
            messageRenderer.Dispose();
            textRenderer.Dispose();
            treeviewFiles.Dispose();

            popupMenu.Dispose();

            base.OnDestroyed();
        }
        protected override void OnDestroyed()
        {
            if (popupMenu != null)
            {
                popupMenu.Dispose();
                popupMenu = null;
            }

            if (!controller.IsFirstPage)
            {
                templatesHBox.Destroy();
            }

            if (!controller.IsLastPage)
            {
                projectConfigurationWidget.Destroy();
            }

            base.OnDestroyed();
        }