[gitg/wip/remove-webkit] Destroy previous file widgets when updating the diff



commit 02ef845d9e2d2246f8e198b9ebebee71ea97d410
Author: Ignacio Casal Quinteiro <icq gnome org>
Date:   Thu Aug 27 11:34:39 2015 +0200

    Destroy previous file widgets when updating the diff

 libgitg/gitg-diff-view.vala |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)
---
diff --git a/libgitg/gitg-diff-view.vala b/libgitg/gitg-diff-view.vala
index 763fcc9..213aa75 100644
--- a/libgitg/gitg-diff-view.vala
+++ b/libgitg/gitg-diff-view.vala
@@ -269,6 +269,12 @@ public class Gitg.DiffView : Gtk.Grid
 
                var maxlines = 0;
 
+               var file_widgets = d_grid_files.get_children();
+               foreach (var file in file_widgets)
+               {
+                       file.destroy();
+               }
+
                Anon add_hunk = () => {
                        if (current_hunk != null)
                        {


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]