mate-desktop / mozo

Menu editor for MATE using the freedesktop.org menu specification
http://www.mate-desktop.org
GNU Lesser General Public License v2.1
28 stars 12 forks source link

Fix menu entry can not move #49

Closed yetist closed 5 years ago

yetist commented 5 years ago

Menu entry can't move, and got the error:

Traceback (most recent call last):
  File "/usr/lib/python3.7/dist-packages/Mozo/MainWindow.py", line 596, in on_move_up_button_clicked
    self.editor.moveItem(item, item.get_parent(), before=before)
  File "/usr/lib/python3.7/dist-packages/Mozo/MenuEditor.py", line 756, in moveItem
    self.__positionItem(parent, item, before=before, after=after)
  File "/usr/lib/python3.7/dist-packages/Mozo/MenuEditor.py", line 760, in __positionItem
    contents = self.getContents(parent)
  File "/usr/lib/python3.7/dist-packages/Mozo/MenuEditor.py", line 243, in getContents
    item_iter = item.iter()
AttributeError: 'TreeEntry' object has no attribute 'iter'
raveit65 commented 5 years ago

@yetist @lukefromdc Should this be merged before 1.22 as bugfix or is something missing? And what about https://github.com/mate-desktop/mozo/pull/47 ?

lukefromdc commented 5 years ago

I think we really do need this, as otherwise we would be shipping mozo with one of its primary tasks broken

On 2/23/2019 at 10:31 AM, "raveit65" notifications@github.com wrote:

@yetist @lukefromdc Should this be merged before 1.22 as bugfix or is something missing? And what about https://github.com/mate-desktop/mozo/pull/47 ?

-- You are receiving this because you were mentioned. Reply to this email directly or view it on GitHub: https://github.com/mate-desktop/mozo/pull/49#issuecomment- 466662254

yetist commented 5 years ago

@raveit65

This PR is also required on 1.20, so we should cherry-pick ae480e9fb7237e6c2d0608d4491ba4a6617c64f9 to 1.20 branch.

raveit65 commented 5 years ago

Bug fixes can always back ported to a stable branch until the branch isn't EOL, but a cherry-pick doesn't clean apply.

yetist commented 5 years ago

Sorry, I remember, 1.20 uses the old api, I modified mate-menus api on 1.21. So, this PR can't be directly applied to mozo 1.20.