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

[Git][debian-mate-team/mozo][master] 3 commits: rename patch file: 0001_DnD_undo_redo_copies_fixes.patch -> 0002_...



Title: GitLab

Mike Gabriel pushed to branch master at Debian and Ubuntu MATE Packaging Team / mozo

Commits:

4 changed files:

Changes:

  • debian/changelog
    1
    +mozo (1.22.1-2) unstable; urgency=medium
    
    2
    +
    
    3
    +  [ Martin Wimpress ]
    
    4
    +  * debian/patches:
    
    5
    +    + Add 0002_DnD_undo_redo_copies_fixes.patch. Fix item drag & drop creating
    
    6
    +      copies, fix undo, fix redo and prevent a crash when refreshing.
    
    7
    +
    
    8
    +  [ Mike Gabriel ]
    
    9
    +  * debian/patches:
    
    10
    +    + Cherry-pick 0001_fix-drag-and-drop-of-desktop-files.patch from upstream.
    
    11
    +
    
    12
    + -- Mike Gabriel <sunweaver@debian.org>  Thu, 08 Aug 2019 12:56:44 +0200
    
    13
    +
    
    1 14
     mozo (1.22.1-1) unstable; urgency=medium
    
    2 15
     
    
    3 16
       [ Martin Wimpress ]
    

  • debian/patches/0001_fix-drag-and-drop-of-desktop-files.patch
    1
    +From 38232679bf89add784cbadfa5196440b20115ae5 Mon Sep 17 00:00:00 2001
    
    2
    +From: Sam Tygier <sam.tygier@manchester.ac.uk>
    
    3
    +Date: Tue, 14 May 2019 19:34:34 +0100
    
    4
    +Subject: [PATCH] Fix drag and drop of .desktop file
    
    5
    +
    
    6
    +Update for gtk3 API changes in SelectionData, Gio.File, Gio.InputStream
    
    7
    +and urllib.
    
    8
    +---
    
    9
    + Mozo/MainWindow.py | 12 ++++++------
    
    10
    + 1 file changed, 6 insertions(+), 6 deletions(-)
    
    11
    +
    
    12
    +diff --git a/Mozo/MainWindow.py b/Mozo/MainWindow.py
    
    13
    +index 4ca5b84..01639b9 100644
    
    14
    +--- a/Mozo/MainWindow.py
    
    15
    ++++ b/Mozo/MainWindow.py
    
    16
    +@@ -28,7 +28,7 @@
    
    17
    + import gettext
    
    18
    + import subprocess
    
    19
    + import shutil
    
    20
    +-import urllib
    
    21
    ++import urllib.parse
    
    22
    + try:
    
    23
    +     from Mozo import config
    
    24
    +     gettext.bindtextdomain(config.GETTEXT_PACKAGE,config.localedir)
    
    25
    +@@ -543,7 +543,7 @@ def on_item_tree_drag_data_received(self, treeview, context, x, y, selection, in
    
    26
    +                 self.editor.moveSeparator(item, destination, before, after)
    
    27
    +             context.finish(True, True, etime)
    
    28
    +         elif str(selection.get_target()) == 'text/plain':
    
    29
    +-            if selection.data is None:
    
    30
    ++            if selection.get_data() is None:
    
    31
    +                 return False
    
    32
    +             menus, iter = self.tree.get_object('menu_tree').get_selection().get_selected()
    
    33
    +             parent = menus[iter][2]
    
    34
    +@@ -559,16 +559,16 @@ def on_item_tree_drag_data_received(self, treeview, context, x, y, selection, in
    
    35
    +             else:
    
    36
    +                 path = (len(items) - 1,)
    
    37
    +                 after = items[path][3]
    
    38
    +-            file_path = urllib.unquote(selection.data).strip()
    
    39
    ++            file_path = urllib.parse.unquote(selection.get_data().decode("utf-8")).strip()
    
    40
    +             if not file_path.startswith('file:'):
    
    41
    +                 return
    
    42
    +-            myfile = Gio.File(uri=file_path)
    
    43
    +-            file_info = myfile.query_info(Gio.FILE_ATTRIBUTE_STANDARD_CONTENT_TYPE)
    
    44
    ++            myfile = Gio.File.new_for_uri(uri=file_path)
    
    45
    ++            file_info = myfile.query_info(Gio.FILE_ATTRIBUTE_STANDARD_CONTENT_TYPE, Gio.FileQueryInfoFlags.NONE)
    
    46
    +             content_type = file_info.get_content_type()
    
    47
    +             if content_type == 'application/x-desktop':
    
    48
    +                 input_stream = myfile.read()
    
    49
    +                 keyfile = GLib.KeyFile()
    
    50
    +-                keyfile.load_from_data(input_stream.read())
    
    51
    ++                keyfile.load_from_bytes(input_stream.read_bytes(1024*1024), GLib.KeyFileFlags.NONE)
    
    52
    +                 self.editor.createItem(parent, before, after, KeyFile=keyfile)
    
    53
    +             elif content_type in ('application/x-shellscript', 'application/x-executable'):
    
    54
    +                 self.editor.createItem(parent, before, after,
    
    55
    +

  • debian/patches/0001_DnD_undo_redo_copies_fixes.patchdebian/patches/0002_DnD_undo_redo_copies_fixes.patch

  • debian/patches/series
    1
    -0001_DnD_undo_redo_copies_fixes.patch
    \ No newline at end of file
    1
    +0001_fix-drag-and-drop-of-desktop-files.patch
    
    2
    +0002_DnD_undo_redo_copies_fixes.patch


  • Reply to: