gedit-markdown
gedit-markdown copied to clipboard
Support for gedit 3.14
The plugin doesn't work under gedit 3.14
Traceback (most recent call last):
File "/home/nasser/.local/share/gedit/plugins/markdown-preview/__init__.py", line 113, in do_activate
self.addMarkdownPreviewTab()
File "/home/nasser/.local/share/gedit/plugins/markdown-preview/__init__.py", line 139, in addMarkdownPreviewTab
panel.add_item(self.scrolledWindow, "MarkdownPreview", _("Markdown Preview"), image)
AttributeError: 'Stack' object has no attribute 'add_item'
Traceback (most recent call last):
File "/home/nasser/.local/share/gedit/plugins/markdown-preview/__init__.py", line 128, in do_update_state
self.actionGroup1.set_sensitive(self.window.get_active_document() != None)
AttributeError: 'MarkdownPreviewPlugin' object has no attribute 'actionGroup1'
Traceback (most recent call last):
File "/home/nasser/.local/share/gedit/plugins/markdown-preview/__init__.py", line 128, in do_update_state
self.actionGroup1.set_sensitive(self.window.get_active_document() != None)
AttributeError: 'MarkdownPreviewPlugin' object has no attribute 'actionGroup1'
Traceback (most recent call last):
File "/home/nasser/.local/share/gedit/plugins/markdown-preview/__init__.py", line 128, in do_update_state
self.actionGroup1.set_sensitive(self.window.get_active_document() != None)
AttributeError: 'MarkdownPreviewPlugin' object has no attribute 'actionGroup1'
Traceback (most recent call last):
File "/home/nasser/.local/share/gedit/plugins/markdown-preview/__init__.py", line 128, in do_update_state
self.actionGroup1.set_sensitive(self.window.get_active_document() != None)
AttributeError: 'MarkdownPreviewPlugin' object has no attribute 'actionGroup1'
After looking around it seems that the GeditPanel
was present in gedit 3.10.4 but not present in 3.12.2
Can the markdown preview plugin be rewritten for gedit 3.14 ? Syntax highlighting is already there, but previow in side panel would be useful.
Would love to see this!
Yes, there's no point in a markdown plug-in if it doesn't have support for the last version of gedit. Would be great to have this fixed.
I assume it won't work in the just released gedit 3.16... Just great!
I've looked into this issue yesterday and I think i figured out the problem.
There are actually two things that need to be rewritten. The easy one is the side-panel. Since gedit 3.12 the panels are represented as GStack
which just has slightly different methods of adding widgets, e.g. GStack.add_titled()
.
The second issue is about the menu entries. UIManager
is deprecated since 3.10 and therefore Gedit.window
has no method get_ui_manager()
anymore. The new way of adding menu items is described here. In short: you need a class that implements Gedit.AppActivatable
that can add menu items.
I will try to fix this issue and submit a pull request hopefully the next days.
Hi ! I just tried last version on Gedit 3.14 (Debian Jessie distro), and it still not works. Did you solved the problem ? Thanks ;-)
@nielsmde - thanks for the fix!
Unfortunately, it still doesn't work with Gedit 3.18
Which branch did you try out? Master or my patches version?
The pull request #9 for the fix is apparently still open. Hence,at the moment the fixed code is only available in this branch.
@nielsmde. I used the version on your fork and wanted others to know it was there.
That I got, my question was directed at @Rat-S, who wrote that it is still not working for him.
@nielsmde I just tried your branch with gedit 3.18.3 (Fedora 23) -- unfortunately it does not work:
Traceback (most recent call last):
File "/home/user/.local/share/gedit/plugins/markdown-preview/__init__.py", line 128, in do_update_state
self.actionGroup1.set_sensitive(self.window.get_active_document() != None)
AttributeError: 'MarkdownPreviewPlugin' object has no attribute 'actionGroup1'
@nielsmde Thanks your pull,it successfully work with my gedit 3.18
thanks @nielsmde I just re-installed from your fork "https://github.com/nielsmde/gedit-markdown/archive/master.zip" and it works in my 3.18 too
Please note my fork (based on @nielsmde's work): https://github.com/darkdragon-001/gedit-markdown/
Please test the latest release. Pull requests are always welcome!