Bug 1300391 - gedit folding AttributeError: 'Window' object has no attribute 'get_ui_manager'
Summary: gedit folding AttributeError: 'Window' object has no attribute 'get_ui_manager'
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: gedit-plugins
Version: 23
Hardware: x86_64
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Ignacio Casal Quinteiro (nacho)
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-01-20 16:11 UTC by Jiri Prajzner
Modified: 2018-04-11 07:54 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-07-27 18:01:55 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Jiri Prajzner 2016-01-20 16:11:12 UTC
Description of problem:
gedit folding plugin reports an unhandled exception.

Version-Release number of selected component (if applicable):
3.18.2

How reproducible:
Always

Steps to Reproduce:
1. execute gnome-text-editor
2. 
3.

Actual results:
Traceback (most recent call last):
  File "/home/jprajzne/.local/share/gedit/plugins/gedit-folding/folding.py", line 29, in do_activate
    self._insert_menu()
  File "/home/jprajzne/.local/share/gedit/plugins/gedit-folding/folding.py", line 53, in _insert_menu
    manager = self.window.get_ui_manager()
AttributeError: 'Window' object has no attribute 'get_ui_manager'
Traceback (most recent call last):
  File "/home/jprajzne/.local/share/gedit/plugins/gedit-folding/folding.py", line 38, in do_update_state
    action_group = self._action_group
AttributeError: 'FoldingPyPlugin' object has no attribute '_action_group'
Traceback (most recent call last):
  File "/home/jprajzne/.local/share/gedit/plugins/gedit-folding/folding.py", line 38, in do_update_state
    action_group = self._action_group
AttributeError: 'FoldingPyPlugin' object has no attribute '_action_group'
Traceback (most recent call last):
  File "/home/jprajzne/.local/share/gedit/plugins/gedit-folding/folding.py", line 38, in do_update_state
    action_group = self._action_group
AttributeError: 'FoldingPyPlugin' object has no attribute '_action_group'
Traceback (most recent call last):
  File "/home/jprajzne/.local/share/gedit/plugins/gedit-folding/folding.py", line 38, in do_update_state
    action_group = self._action_group
AttributeError: 'FoldingPyPlugin' object has no attribute '_action_group'

gedit[18402]: detected unhandled Python exception in 'gedit' in journal

Expected results:
no errors

Additional info:
The "AttributeError: 'FoldingPyPlugin' object has no attribute '_action_group'" is reported every time when opening a new tab in gedit.

Comment 1 Matěj Cepl 2016-07-27 18:01:55 UTC
My suggestion is NOTABUG ... apparently the folding plugin has not been rewritten to 3.12+ API. I have rewritten number of plugins, so you can take some motivation from (for example) https://gitlab.com/mcepl/gedit-reflow-plugin/commit/f3f8273095cbd5edd91f27dd5ffc9be9d7f8c593

The documentation for the all versions of API is https://wiki.gnome.org/Apps/Gedit/PluginsHowTos and http://web.archive.org/web/20150908135443/http://www.micahcarrick.com/writing-plugins-for-gedit-3-in-python.html


Note You need to log in before you can comment on or make changes to this bug.