[meld/ui-next: 4/35] filediff: Remove diffmaps



commit 47316608b9d1bb53d4828360de06bd610f59e3f3
Author: Kai Willadsen <kai willadsen gmail com>
Date:   Mon Feb 11 07:47:32 2019 +1000

    filediff: Remove diffmaps

 meld/filediff.py              | 27 ++++++++-----------------
 meld/resources/ui/filediff.ui | 46 -------------------------------------------
 2 files changed, 8 insertions(+), 65 deletions(-)
---
diff --git a/meld/filediff.py b/meld/filediff.py
index 67b5f262..1899f84c 100644
--- a/meld/filediff.py
+++ b/meld/filediff.py
@@ -117,10 +117,6 @@ class FileDiff(Gtk.VBox, MeldDoc):
     )
 
     actiongroup = Template.Child('FilediffActions')
-    diffmap0 = Template.Child()
-    diffmap1 = Template.Child()
-    dummy_toolbar_diffmap0 = Template.Child()
-    dummy_toolbar_diffmap1 = Template.Child()
     dummy_toolbar_linkmap0 = Template.Child()
     dummy_toolbar_linkmap1 = Template.Child()
     fileentry0 = Template.Child()
@@ -200,11 +196,11 @@ class FileDiff(Gtk.VBox, MeldDoc):
         bind_settings(self)
 
         widget_lists = [
-            "diffmap", "file_save_button", "file_toolbar", "fileentry",
+            "file_save_button", "file_toolbar", "fileentry",
             "linkmap", "msgarea_mgr", "readonlytoggle",
             "scrolledwindow", "textview", "vbox",
             "dummy_toolbar_linkmap", "filelabel_toolitem", "filelabel",
-            "fileentry_toolitem", "dummy_toolbar_diffmap", "statusbar",
+            "fileentry_toolitem", "statusbar",
         ]
         map_widgets_into_lists(self, widget_lists)
 
@@ -288,9 +284,6 @@ class FileDiff(Gtk.VBox, MeldDoc):
         self.undosequence.connect("checkpointed", self.on_undo_checkpointed)
         self.connect("next-conflict-changed", self.on_next_conflict_changed)
 
-        for diffmap in self.diffmap:
-            self.linediffer.connect('diffs-changed', diffmap.on_diffs_changed)
-
         for statusbar, buf in zip(self.statusbar, self.textbuffer):
             buf.bind_property(
                 'language', statusbar, 'source-language',
@@ -1833,8 +1826,6 @@ class FileDiff(Gtk.VBox, MeldDoc):
             t.queue_draw()
         for i in range(self.num_panes-1):
             self.linkmap[i].queue_draw()
-        self.diffmap0.queue_draw()
-        self.diffmap1.queue_draw()
 
     @Template.Callback()
     def on_action_lock_scrolling_toggled(self, action):
@@ -1938,15 +1929,17 @@ class FileDiff(Gtk.VBox, MeldDoc):
 
         self.num_panes = n
         for widget in (
-                self.vbox[:n] + self.file_toolbar[:n] + self.diffmap[:n] +
+                self.vbox[:n] + self.file_toolbar[:n] +
                 self.linkmap[:n - 1] + self.dummy_toolbar_linkmap[:n - 1] +
-                self.dummy_toolbar_diffmap[:n - 1] + self.statusbar[:n]):
+                self.statusbar[:n]
+                ):
             widget.show()
 
         for widget in (
-                self.vbox[n:] + self.file_toolbar[n:] + self.diffmap[n:] +
+                self.vbox[n:] + self.file_toolbar[n:] +
                 self.linkmap[n - 1:] + self.dummy_toolbar_linkmap[n - 1:] +
-                self.dummy_toolbar_diffmap[n - 1:] + self.statusbar[n:]):
+                self.statusbar[n:]
+                ):
             widget.hide()
 
         self.actiongroup.get_action("MakePatch").set_sensitive(n > 1)
@@ -1985,10 +1978,6 @@ class FileDiff(Gtk.VBox, MeldDoc):
                     yield c[0], y0 / max_y, (y + h) / max_y
             return coords_by_chunk
 
-        for (w, i) in zip(self.diffmap, (0, self.num_panes - 1)):
-            scroll = self.scrolledwindow[i].get_vscrollbar()
-            w.setup(scroll, coords_iter(i))
-
         for (w, i) in zip(self.linkmap, (0, self.num_panes - 2)):
             w.associate(self, self.textview[i], self.textview[i + 1])
 
diff --git a/meld/resources/ui/filediff.ui b/meld/resources/ui/filediff.ui
index 855d5997..7eb14d55 100644
--- a/meld/resources/ui/filediff.ui
+++ b/meld/resources/ui/filediff.ui
@@ -385,29 +385,6 @@
             <property name="top_attach">1</property>
           </packing>
         </child>
-        <child>
-          <object class="GtkToolbar" id="dummy_toolbar_diffmap1">
-            <property name="visible">True</property>
-            <property name="can_focus">False</property>
-            <style>
-              <class name="meld-notebook-toolbar"/>
-            </style>
-          </object>
-          <packing>
-            <property name="left_attach">6</property>
-            <property name="top_attach">0</property>
-          </packing>
-        </child>
-        <child>
-          <object class="DiffMap" id="diffmap1">
-            <property name="visible">True</property>
-            <property name="can_focus">False</property>
-          </object>
-          <packing>
-            <property name="left_attach">6</property>
-            <property name="top_attach">1</property>
-          </packing>
-        </child>
         <child>
           <object class="GtkToolbar" id="dummy_toolbar_linkmap0">
             <property name="visible">True</property>
@@ -434,29 +411,6 @@
             <property name="top_attach">1</property>
           </packing>
         </child>
-        <child>
-          <object class="GtkToolbar" id="dummy_toolbar_diffmap0">
-            <property name="visible">True</property>
-            <property name="can_focus">False</property>
-            <style>
-              <class name="meld-notebook-toolbar"/>
-            </style>
-          </object>
-          <packing>
-            <property name="left_attach">0</property>
-            <property name="top_attach">0</property>
-          </packing>
-        </child>
-        <child>
-          <object class="DiffMap" id="diffmap0">
-            <property name="visible">True</property>
-            <property name="can_focus">False</property>
-          </object>
-          <packing>
-            <property name="left_attach">0</property>
-            <property name="top_attach">1</property>
-          </packing>
-        </child>
         <child>
           <object class="GtkToolbar" id="dummy_toolbar_linkmap1">
             <property name="visible">True</property>


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