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

[Git][debian-mate-team/mate-dock-applet][master] debian/patches: Add 0001_fix_adjust_minimise_pos.patch. Fix AttributeError in...



Title: GitLab

Martin Wimpress pushed to branch master at Debian and Ubuntu MATE Packaging Team / mate-dock-applet

Commits:

2 changed files:

Changes:

  • debian/patches/0001_fix_adjust_minimise_pos.patch
    1
    +Author: siddolo <me@pasqualefiorillo.it>
    
    2
    +Subject: Fix AttributeError in adjust_minimise_pos(): NoneType object has no attribute get_value
    
    3
    +
    
    4
    +diff --git a/src/dock.in b/src/dock.in
    
    5
    +index ef46a0b..b77e6d9 100644
    
    6
    +--- a/src/dock.in
    
    7
    ++++ b/src/dock.in
    
    8
    +@@ -4546,24 +4546,27 @@ class Dock(object):
    
    9
    + 
    
    10
    +         dx, dy = self.get_dock_root_coords()
    
    11
    + 
    
    12
    +-        if self.panel_orient in ["top", "bottom"]:
    
    13
    +-            final_x = x - self.scrolled_win.get_hadjustment().get_value()
    
    14
    +-            if self.nice_sizing:
    
    15
    +-                max_w = self.applet.get_allocation().width
    
    16
    +-            else:
    
    17
    +-                max_w = self.scrolled_win.get_max_content_width()
    
    18
    +-            final_x = min(max(final_x, dx), dx + max_w)
    
    19
    +-            final_y = y
    
    20
    +-        else:
    
    21
    +-            final_y = y - self.scrolled_win.get_vadjustment().get_value()
    
    22
    +-            if self.nice_sizing:
    
    23
    +-                max_h = self.applet.get_allocation().height
    
    24
    ++        try:
    
    25
    ++            if self.panel_orient in ["top", "bottom"]:
    
    26
    ++                final_x = x - self.scrolled_win.get_hadjustment().get_value()
    
    27
    ++                if self.nice_sizing:
    
    28
    ++                    max_w = self.applet.get_allocation().width
    
    29
    ++                else:
    
    30
    ++                    max_w = self.scrolled_win.get_max_content_width()
    
    31
    ++                final_x = min(max(final_x, dx), dx + max_w)
    
    32
    ++                final_y = y
    
    33
    +             else:
    
    34
    +-                max_h = self.scrolled_win.get_max_content_height()
    
    35
    +-            final_y = min(max(final_y, dy), dy + max_h)
    
    36
    +-            final_x = x
    
    37
    ++                final_y = y - self.scrolled_win.get_vadjustment().get_value()
    
    38
    ++                if self.nice_sizing:
    
    39
    ++                    max_h = self.applet.get_allocation().height
    
    40
    ++                else:
    
    41
    ++                    max_h = self.scrolled_win.get_max_content_height()
    
    42
    ++                final_y = min(max(final_y, dy), dy + max_h)
    
    43
    ++                final_x = x
    
    44
    + 
    
    45
    +-        return final_x, final_y
    
    46
    ++            return final_x, final_y
    
    47
    ++        except:
    
    48
    ++            return x, y
    
    49
    + 
    
    50
    +     def get_app_icon_size(self):
    
    51
    +         """ Gets the size of a single app icon

  • debian/patches/series
    1
    +0001_fix_adjust_minimise_pos.patch


  • Reply to: