jpfleury / gedit-markdown

Support for Markdown language in gedit
GNU General Public License v3.0
130 stars 29 forks source link

Support for gedit 3.14 #3

Open nashamri opened 10 years ago

nashamri commented 10 years ago

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'
nashamri commented 10 years ago

After looking around it seems that the GeditPanel was present in gedit 3.10.4 but not present in 3.12.2

mashu commented 10 years ago

Can the markdown preview plugin be rewritten for gedit 3.14 ? Syntax highlighting is already there, but previow in side panel would be useful.

fyksen commented 9 years ago

Would love to see this!

bbabel commented 9 years ago

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.

bbabel commented 9 years ago

I assume it won't work in the just released gedit 3.16... Just great!

nielsmde commented 9 years ago

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.

ljoets commented 8 years ago

Hi ! I just tried last version on Gedit 3.14 (Debian Jessie distro), and it still not works. Did you solved the problem ? Thanks ;-)

whbruce commented 8 years ago

@nielsmde - thanks for the fix!

Rat-S commented 8 years ago

Unfortunately, it still doesn't work with Gedit 3.18

nielsmde commented 8 years ago

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.

whbruce commented 8 years ago

@nielsmde. I used the version on your fork and wanted others to know it was there.

nielsmde commented 8 years ago

That I got, my question was directed at @Rat-S, who wrote that it is still not working for him.

lahmann commented 8 years ago

@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'
techping commented 7 years ago

@nielsmde Thanks your pull,it successfully work with my gedit 3.18

iurisegtovich commented 7 years ago

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

darkdragon-001 commented 4 years ago

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!