=?windows-1252?Q?Re=3A_=5BPATCHES=5D=5BRFC=5D_Bug_458372_=96_explicit_message_i?= =?windows-1252?Q?f_files=2Fdirectories_are_the_same?=



Rediffed pass-meldapp-to-melddocs.patch
with a missed call to vcview constructor fix

This patch will be needed for a fix for another
bug...

-- 
Vincent Legoll
Index: vcview.py
===================================================================
--- vcview.py	(revision 1351)
+++ vcview.py	(working copy)
@@ -116,8 +116,8 @@
                          "VcRevert": ("revert_command", ()),
                          }
 
-    def __init__(self, prefs):
-        melddoc.MeldDoc.__init__(self, prefs)
+    def __init__(self, prefs, app):
+        melddoc.MeldDoc.__init__(self, prefs, app)
         gnomeglade.Component.__init__(self, paths.share_dir("glade2/vcview.glade"), "vcview")
 
         actions = (
Index: dirdiff.py
===================================================================
--- dirdiff.py	(revision 1351)
+++ dirdiff.py	(working copy)
@@ -165,8 +165,8 @@
 class DirDiff(melddoc.MeldDoc, gnomeglade.Component):
     """Two or three way diff of directories"""
 
-    def __init__(self, prefs, num_panes):
-        melddoc.MeldDoc.__init__(self, prefs)
+    def __init__(self, prefs, num_panes, app):
+        melddoc.MeldDoc.__init__(self, prefs, app=app)
         gnomeglade.Component.__init__(self, paths.share_dir("glade2/dirdiff.glade"), "dirdiff")
 
         actions = (
Index: melddoc.py
===================================================================
--- melddoc.py	(revision 1351)
+++ melddoc.py	(working copy)
@@ -35,7 +35,7 @@
         'status-changed': (gobject.SIGNAL_RUN_FIRST, gobject.TYPE_NONE, (gobject.TYPE_PYOBJECT,))
     }
 
-    def __init__(self, prefs):
+    def __init__(self, prefs, app):
         gobject.GObject.__init__(self)
         self.undosequence = undo.UndoSequence()
         self.undosequence_busy = 0
@@ -44,6 +44,7 @@
         self.prefs.notify_add(self.on_preference_changed)
         self.num_panes = 0
         self.label_text = _("untitled")
+        self.app = app
 
     def save(self):
         pass
Index: filediff.py
===================================================================
--- filediff.py	(revision 1351)
+++ filediff.py	(working copy)
@@ -54,10 +54,10 @@
                  gtk.keysyms.Shift_R : MASK_SHIFT,
                  gtk.keysyms.Control_R : MASK_CTRL}
 
-    def __init__(self, prefs, num_panes):
+    def __init__(self, prefs, num_panes, app):
         """Start up an filediff with num_panes empty contents.
         """
-        melddoc.MeldDoc.__init__(self, prefs)
+        melddoc.MeldDoc.__init__(self, prefs, app=app)
         gnomeglade.Component.__init__(self, paths.share_dir("glade2/filediff.glade"), "filediff", srcviewer.override)
         self.map_widgets_into_lists( ["textview", "fileentry", "diffmap", "scrolledwindow", "linkmap", "statusimage"] )
         self._update_regexes()
Index: meldapp.py
===================================================================
--- meldapp.py	(revision 1351)
+++ meldapp.py	(working copy)
@@ -830,7 +830,7 @@
 
     def append_dirdiff(self, dirs, auto_compare=False):
         assert len(dirs) in (1,2,3)
-        doc = dirdiff.DirDiff(self.prefs, len(dirs))
+        doc = dirdiff.DirDiff(self.prefs, len(dirs), app=self)
         self._append_page(doc, "tree-folder-normal.png")
         doc.set_locations(dirs)
         # FIXME: This doesn't work, as dirdiff behaves differently to vcview
@@ -840,7 +840,7 @@
 
     def append_filediff(self, files):
         assert len(files) in (1,2,3)
-        doc = filediff.FileDiff(self.prefs, len(files))
+        doc = filediff.FileDiff(self.prefs, len(files), app=self)
         seq = doc.undosequence
         seq.clear()
         seq.connect("can-undo", self.on_can_undo)
@@ -864,7 +864,7 @@
     def append_vcview(self, locations, auto_compare=False):
         assert len(locations) in (1,)
         location = locations[0]
-        doc = vcview.VcView(self.prefs)
+        doc = vcview.VcView(self.prefs, app=self)
         self._append_page(doc, "vc-icon.png")
         doc.set_location(location)
         if auto_compare:
@@ -939,7 +939,7 @@
                 tab.set_labels(options.label)
 
     def _single_file_open(self, path):
-        doc = vcview.VcView(self.prefs)
+        doc = vcview.VcView(self.prefs, app=self)
         def cleanup():
             self.scheduler.remove_scheduler(doc.scheduler)
         self.scheduler.add_task(cleanup)


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