Hello community,

here is the log from the commit of package meld for openSUSE:Factory checked in 
at 2016-04-28 16:56:34
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/meld (Old)
 and      /work/SRC/openSUSE:Factory/.meld.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "meld"

Changes:
--------
--- /work/SRC/openSUSE:Factory/meld/meld.changes        2016-04-01 
13:03:19.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.meld.new/meld.changes   2016-04-28 
17:01:13.000000000 +0200
@@ -1,0 +2,16 @@
+Sat Apr 23 22:45:55 UTC 2016 - zai...@opensuse.org
+
+- Update to version 3.15.3:
+  + Handle unicode dates in non-UTF8 locales in folder comparison.
+  + Try to auto-detect when to use our dark theme highlighting.
+  + After undo/redo actions in file comparisons, place the cursor
+    at the natural edit position and scroll it back onscreen.
+
+-------------------------------------------------------------------
+Sat Apr 23 22:45:54 UTC 2016 - mich...@stroeder.com
+
+- Require python-gobject-Gdk: pygobject was further split in order
+  to be able to install it without X-dependencies. As meld is a
+  GUI application, the dependency on the X-stack is no issue.
+
+-------------------------------------------------------------------

Old:
----
  meld-3.15.2.tar.xz

New:
----
  meld-3.15.3.tar.xz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ meld.spec ++++++
--- /var/tmp/diff_new_pack.ON9Tn2/_old  2016-04-28 17:01:16.000000000 +0200
+++ /var/tmp/diff_new_pack.ON9Tn2/_new  2016-04-28 17:01:16.000000000 +0200
@@ -17,7 +17,7 @@
 
 
 Name:           meld
-Version:        3.15.2
+Version:        3.15.3
 Release:        0
 Summary:        Visual diff and merge tool
 License:        GPL-2.0+
@@ -44,6 +44,7 @@
 # needed for VCS diffs
 Requires:       patch
 Requires:       python-gconf
+Requires:       python-gobject-Gdk
 Requires:       python-gtk >= 2.8.0
 Recommends:     %{name}-lang
 Recommends:     python-gtksourceview

++++++ meld-3.15.2.tar.xz -> meld-3.15.3.tar.xz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/meld-3.15.2/NEWS new/meld-3.15.3/NEWS
--- old/meld-3.15.2/NEWS        2016-03-27 23:38:57.000000000 +0200
+++ new/meld-3.15.3/NEWS        2016-04-19 21:47:52.000000000 +0200
@@ -1,4 +1,16 @@
 
+2016-04-20 meld 3.15.3
+======================
+
+  Fixes:
+
+   * Handle unicode dates in non-UTF8 locales in folder comparison (Kai
+     Willadsen)
+   * Try to auto-detect when to use our dark theme highlighting (Kai Willadsen)
+   * After undo/redo actions in file comparisons, place the cursor at the
+     natural edit position and scroll it back onscreen (Kai Willadsen)
+
+
 2016-03-28 meld 3.15.2
 ======================
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/meld-3.15.2/PKG-INFO new/meld-3.15.3/PKG-INFO
--- old/meld-3.15.2/PKG-INFO    2016-03-27 23:39:15.000000000 +0200
+++ new/meld-3.15.3/PKG-INFO    2016-04-19 21:48:18.000000000 +0200
@@ -1,6 +1,6 @@
 Metadata-Version: 1.1
 Name: meld
-Version: 3.15.2
+Version: 3.15.3
 Summary: Visual diff and merge tool
 Home-page: http://meldmerge.org
 Author: Kai Willadsen
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/meld-3.15.2/meld/conf.py new/meld-3.15.3/meld/conf.py
--- old/meld-3.15.2/meld/conf.py        2016-03-05 23:51:32.000000000 +0100
+++ new/meld-3.15.3/meld/conf.py        2016-04-15 22:43:53.000000000 +0200
@@ -3,7 +3,7 @@
 import sys
 
 __package__ = "meld"
-__version__ = "3.15.2"
+__version__ = "3.15.3"
 
 # START; these paths are clobbered on install by meld.build_helpers
 DATADIR = os.path.join(sys.prefix, "share", "meld")
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/meld-3.15.2/meld/dirdiff.py 
new/meld-3.15.3/meld/dirdiff.py
--- old/meld-3.15.2/meld/dirdiff.py     2016-03-14 22:02:55.000000000 +0100
+++ new/meld-3.15.3/meld/dirdiff.py     2016-04-16 00:48:51.000000000 +0200
@@ -21,6 +21,7 @@
 import datetime
 import errno
 import functools
+import locale
 import os
 import re
 import shutil
@@ -1319,6 +1320,7 @@
             all_present_same = self.file_compare(lof, regexes)
         different = 1
         one_isdir = [None for i in range(self.model.ntree)]
+        locale_encoding = locale.getpreferredencoding()
         for j in range(self.model.ntree):
             if mod_times[j]:
                 isdir = os.path.isdir( files[j] )
@@ -1346,6 +1348,7 @@
                 TIME = self.model.column_index(COL_TIME, j)
                 mod_datetime = datetime.datetime.fromtimestamp(mod_times[j])
                 time_str = mod_datetime.strftime("%a %d %b %Y %H:%M:%S")
+                time_str = time_str.decode(locale_encoding, errors='replace')
                 self.model.set_value(it, TIME, time_str)
 
                 def natural_size(bytes):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/meld-3.15.2/meld/filediff.py 
new/meld-3.15.3/meld/filediff.py
--- old/meld-3.15.2/meld/filediff.py    2016-03-14 22:02:55.000000000 +0100
+++ new/meld-3.15.3/meld/filediff.py    2016-04-15 22:43:53.000000000 +0200
@@ -211,11 +211,9 @@
         self._cached_match = CachedSequenceMatcher()
 
         for buf in self.textbuffer:
+            buf.undo_sequence = self.undosequence
             buf.connect("notify::has-selection",
                         self.update_text_actions_sensitivity)
-            buf.connect('begin_user_action',
-                        self.on_textbuffer_begin_user_action)
-            buf.connect('end_user_action', self.on_textbuffer_end_user_action)
             buf.data.connect('file-changed', self.notify_file_changed)
 
         self.ui_file = gnomeglade.ui_file("filediff-ui.xml")
@@ -573,9 +571,9 @@
         for mergedfile in merger.merge_2_files(src, dst):
             pass
         self._sync_vscroll_lock = True
-        self.on_textbuffer_begin_user_action()
+        self.textbuffer[dst].begin_user_action()
         self.textbuffer[dst].set_text(mergedfile)
-        self.on_textbuffer_end_user_action()
+        self.textbuffer[dst].end_user_action()
 
         def resync():
             self._sync_vscroll_lock = False
@@ -598,9 +596,9 @@
         for mergedfile in merger.merge_3_files(False):
             pass
         self._sync_vscroll_lock = True
-        self.on_textbuffer_begin_user_action()
+        self.textbuffer[dst].begin_user_action()
         self.textbuffer[dst].set_text(mergedfile)
-        self.on_textbuffer_end_user_action()
+        self.textbuffer[dst].end_user_action()
         def resync():
             self._sync_vscroll_lock = False
             self._sync_vscroll(self.scrolledwindow[0].get_vadjustment(), 0)
@@ -862,19 +860,24 @@
             self.emit('close', 0)
         return response
 
+    def _scroll_to_actions(self, actions):
+        """Scroll all views affected by *actions* to the current cursor"""
+
+        affected_buffers = set(a.buffer for a in actions)
+        for buf in affected_buffers:
+            buf_index = self.textbuffer.index(buf)
+            view = self.textview[buf_index]
+            view.scroll_mark_onscreen(buf.get_insert())
+
     def on_undo_activate(self):
         if self.undosequence.can_undo():
-            self.undosequence.undo()
+            actions = self.undosequence.undo()
+        self._scroll_to_actions(actions)
 
     def on_redo_activate(self):
         if self.undosequence.can_redo():
-            self.undosequence.redo()
-
-    def on_textbuffer_begin_user_action(self, *buffer):
-        self.undosequence.begin_group()
-
-    def on_textbuffer_end_user_action(self, *buffer):
-        self.undosequence.end_group()
+            actions = self.undosequence.redo()
+        self._scroll_to_actions(actions)
 
     def on_text_insert_text(self, buf, it, text, textlen):
         text = text_type(text, 'utf8')
@@ -1817,10 +1820,10 @@
         dst_end = b1.get_iter_at_line_or_eof(chunk[4])
         t0 = text_type(b0.get_text(src_start, src_end, False), 'utf8')
         mark0 = b1.create_mark(None, dst_start, True)
-        self.on_textbuffer_begin_user_action()
+        self.textbuffer[dst].begin_user_action()
         b1.delete(dst_start, dst_end)
         new_end = b1.insert_at_line(chunk[3], t0)
-        self.on_textbuffer_end_user_action()
+        self.textbuffer[dst].end_user_action()
         mark1 = b1.create_mark(None, new_end, True)
         if chunk[1] == chunk[2]:
             # TODO: Need a more specific colour here; conflict is wrong
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/meld-3.15.2/meld/meldbuffer.py 
new/meld-3.15.3/meld/meldbuffer.py
--- old/meld-3.15.2/meld/meldbuffer.py  2016-03-05 23:51:32.000000000 +0100
+++ new/meld-3.15.3/meld/meldbuffer.py  2016-04-15 22:43:53.000000000 +0200
@@ -42,6 +42,7 @@
         bind_settings(self)
         self.data = MeldBufferData()
         self.user_action_count = 0
+        self.undo_sequence = None
         meldsettings.connect('changed', self.on_setting_changed)
         self.set_style_scheme(meldsettings.style_scheme)
 
@@ -51,8 +52,12 @@
 
     def do_begin_user_action(self, *args):
         self.user_action_count += 1
+        if self.undo_sequence:
+            self.undo_sequence.begin_group()
 
     def do_end_user_action(self, *args):
+        if self.undo_sequence:
+            self.undo_sequence.end_group()
         self.user_action_count -= 1
 
     def do_apply_tag(self, tag, start, end):
@@ -303,10 +308,14 @@
         start = self.buffer.get_iter_at_offset(self.offset)
         end = self.buffer.get_iter_at_offset(self.offset + len(self.text))
         self.buffer.delete(start, end)
+        self.buffer.place_cursor(end)
+        return [self]
 
     def insert(self):
         start = self.buffer.get_iter_at_offset(self.offset)
+        self.buffer.place_cursor(start)
         self.buffer.insert(start, self.text)
+        return [self]
 
 
 class BufferInsertionAction(BufferAction):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/meld-3.15.2/meld/misc.py new/meld-3.15.3/meld/misc.py
--- old/meld-3.15.2/meld/misc.py        2016-03-14 22:02:55.000000000 +0100
+++ new/meld-3.15.3/meld/misc.py        2016-04-16 00:44:17.000000000 +0200
@@ -25,6 +25,7 @@
 import subprocess
 
 from gi.repository import Gdk
+from gi.repository import GLib
 from gi.repository import GObject
 from gi.repository import Gtk
 from gi.repository import GtkSource
@@ -144,7 +145,30 @@
     return hbox
 
 
-MELD_STYLE_SCHEME = "meld-base"
+def get_base_style_scheme():
+    MELD_STYLE_SCHEME = "meld-base"
+    MELD_STYLE_SCHEME_DARK = "meld-dark"
+
+    global base_style_scheme
+
+    if base_style_scheme:
+        return base_style_scheme
+
+    env_theme = GLib.getenv('GTK_THEME')
+    if env_theme:
+        use_dark = env_theme.endswith(':dark')
+    else:
+        gtk_settings = Gtk.Settings.get_default()
+        use_dark = gtk_settings.props.gtk_application_prefer_dark_theme
+    base_scheme_name = (
+        MELD_STYLE_SCHEME_DARK if use_dark else MELD_STYLE_SCHEME)
+
+    manager = GtkSource.StyleSchemeManager.get_default()
+    base_style_scheme = manager.get_scheme(base_scheme_name)
+
+    return base_style_scheme
+
+base_style_scheme = None
 
 
 def parse_rgba(string):
@@ -165,10 +189,9 @@
     style = source_style.get_style(name)
     style_attr = getattr(style.props, attribute) if style else None
     if not style or not style_attr:
-        manager = GtkSource.StyleSchemeManager.get_default()
-        source_style = manager.get_scheme(MELD_STYLE_SCHEME)
+        base_style = get_base_style_scheme()
         try:
-            style = source_style.get_style(name)
+            style = base_style.get_style(name)
             style_attr = getattr(style.props, attribute)
         except AttributeError:
             pass
@@ -506,7 +529,7 @@
                 span = match.span(i + 1)
                 if span != (-1, -1) and span[0] != span[1]:
                     filter_ranges.append(span)
-                    
+
     filter_ranges = merge_intervals(filter_ranges)
 
     for (start, end) in reversed(filter_ranges):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/meld-3.15.2/meld/undo.py new/meld-3.15.3/meld/undo.py
--- old/meld-3.15.2/meld/undo.py        2016-02-26 21:43:53.000000000 +0100
+++ new/meld-3.15.3/meld/undo.py        2016-04-15 22:43:53.000000000 +0200
@@ -44,12 +44,16 @@
         self.buffer = seq.actions[0].buffer
 
     def undo(self):
+        actions = []
         while self.seq.can_undo():
-            self.seq.undo()
+            actions.extend(self.seq.undo())
+        return actions
 
     def redo(self):
+        actions = []
         while self.seq.can_redo():
-            self.seq.redo()
+            actions.extend(self.seq.redo())
+        return actions
 
 
 class UndoSequence(GObject.GObject):
@@ -144,7 +148,7 @@
             self.emit('checkpointed', buf, False)
         could_redo = self.can_redo()
         self.next_redo -= 1
-        self.actions[self.next_redo].undo()
+        actions = self.actions[self.next_redo].undo()
         self.busy = False
         if not self.can_undo():
             self.emit('can-undo', 0)
@@ -152,6 +156,7 @@
             self.emit('can-redo', 1)
         if self.checkpointed(buf):
             self.emit('checkpointed', buf, True)
+        return actions
 
     def redo(self):
         """Redo an action.
@@ -166,7 +171,7 @@
         could_undo = self.can_undo()
         a = self.actions[self.next_redo]
         self.next_redo += 1
-        a.redo()
+        actions = a.redo()
         self.busy = False
         if not could_undo:
             self.emit('can-undo', 1)
@@ -174,6 +179,7 @@
             self.emit('can-redo', 0)
         if self.checkpointed(buf):
             self.emit('checkpointed', buf, True)
+        return actions
 
     def checkpoint(self, buf):
         start = self.next_redo


Reply via email to