Bug 1300391 - gedit folding AttributeError: 'Window' object has no attribute 'get_ui_manager'
gedit folding AttributeError: 'Window' object has no attribute 'get_ui_manager'
Status: CLOSED NOTABUG
Product: Fedora
Classification: Fedora
Component: gedit-plugins (Show other bugs)
23
x86_64 Linux
unspecified Severity medium
: ---
: ---
Assigned To: Ignacio Casal Quinteiro (nacho)
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2016-01-20 11:11 EST by Jiri Prajzner
Modified: 2016-07-27 14:01 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-07-27 14:01:55 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Jiri Prajzner 2016-01-20 11:11:12 EST
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 14:01:55 EDT
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.