Exemplo 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();
        }
Exemplo n.º 2
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 = DesktopService.GetMimeTypeForUri (path);
 *                                      diffWidget.ComparisonWidget.OriginalEditor.Text = prevRevision;
 *                                      diffWidget.ComparisonWidget.DiffEditor.Text = text;
 *                                      diffWidget.ComparisonWidget.CreateDiff ();
 *                              });
 *                      });
 *              }*/

        public override void Destroy()
        {
            base.Destroy();
            logstore.Dispose();
            changedpathstore.Dispose();

            diffRenderer.Dispose();
            messageRenderer.Dispose();
            textRenderer.Dispose();
            treeviewFiles.Dispose();
        }
Exemplo n.º 3
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 = DesktopService.GetMimeTypeForUri (path);
 *                                      diffWidget.ComparisonWidget.OriginalEditor.Text = prevRevision;
 *                                      diffWidget.ComparisonWidget.DiffEditor.Text = text;
 *                                      diffWidget.ComparisonWidget.CreateDiff ();
 *                              });
 *                      });
 *              }*/

        protected override void OnDestroyed()
        {
            revertButton.Clicked   -= RevertRevisionClicked;
            revertToButton.Clicked -= RevertToRevisionClicked;
            refreshButton.Clicked  -= RefreshClicked;
            Ide.Gui.Styles.Changed -= HandleStylesChanged;

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

            base.OnDestroyed();
        }
Exemplo n.º 4
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 = DesktopService.GetMimeTypeForUri (path);
 *                                      diffWidget.ComparisonWidget.OriginalEditor.Text = prevRevision;
 *                                      diffWidget.ComparisonWidget.DiffEditor.Text = text;
 *                                      diffWidget.ComparisonWidget.CreateDiff ();
 *                              });
 *                      });
 *              }*/

        protected override void OnDestroyed()
        {
            revertButton.Clicked   -= RevertRevisionClicked;
            revertToButton.Clicked -= RevertToRevisionClicked;
            refreshButton.Clicked  -= RefreshClicked;

            logstore.Dispose();
            changedpathstore.Dispose();

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

            base.OnDestroyed();
        }
Exemplo n.º 5
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 = DesktopService.GetMimeTypeForUri (path);
 *                                      diffWidget.ComparisonWidget.OriginalEditor.Text = prevRevision;
 *                                      diffWidget.ComparisonWidget.DiffEditor.Text = text;
 *                                      diffWidget.ComparisonWidget.CreateDiff ();
 *                              });
 *                      });
 *              }*/

        protected override void OnDestroyed()
        {
            revertButton.Clicked   -= RevertRevisionClicked;
            revertToButton.Clicked -= RevertToRevisionClicked;
            refreshButton.Clicked  -= RefreshClicked;
            Ide.Gui.Styles.Changed -= HandleStylesChanged;
            IdeApp.Preferences.CustomPadFont.Changed       -= OnFontChanged;
            IdeApp.Preferences.CustomOutputPadFont.Changed -= OnFontChanged;

            logstore.Dispose();
            changedpathstore.Dispose();

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

            base.OnDestroyed();
        }