#14 gtk3 port fails to load when installed into system

open
nobody
None
5
2011-07-01
2011-07-01
Anonymous
No

If you install rgedit (gtk3 ALPHA version) into the system (instead of into the user home), loading the plugin in gedit 3 fails like this:

Error opening userprefs.xml!
Traceback (most recent call last):
File "/usr/lib64/gedit/plugins/RCtrl.py", line 2780, in do_activate
self._instances[self.window] = RCtrlWindowHelper(self, self.window)
File "/usr/lib64/gedit/plugins/RCtrl.py", line 1374, in __init__
self._insert_menu()
File "/usr/lib64/gedit/plugins/RCtrl.py", line 1490, in _insert_menu
pixbuf = GdkPixbuf.Pixbuf.new_from_file_at_size(self.datadir+"/run_line.png" , 24, 24)
File "/usr/lib64/python2.7/site-packages/gi/types.py", line 68, in constructor
return info.invoke(cls, *args)
glib.GError: Failed to open file '/home/foobar/.local/share/gedit/plugins/RCtrl/run_line.png': No such file or directory

This is a regression as installing rgedit into the system worked with the gtk2 version (and gedit 2).

Actual paths:
/usr/lib64/gedit/plugins/RCtrl.plugin
/usr/lib64/gedit/plugins/RCtrl.py
/usr/share/gedit/plugins/RCtrl/
...those 2 paths (/usr/lib64/gedit/plugins and /usr/share/gedit/plugins) are used by all plugins, so they're proved to be correct. At least they are on Fedora 15 x86_64 :)

Please fix :) As soon as this is working, I'll try to get rgedit into the official Fedora repositories.

-- red

PS. installing the plugin into the user home works, i.e. loads (haven't really done anything with it yet).

Discussion

  • Nobody/Anonymous

    Okay, the plugin API has obviously changed to libpeas in gedit 3. The patch below seems to fix the problem above.

    -- red

    --- /usr/lib64/gedit/plugins/RCtrl.py.orig 2011-07-14 14:02:48.655724910 +0200
    +++ /usr/lib64/gedit/plugins/RCtrl.py 2011-07-14 14:03:03.107564732 +0200
    @@ -2766,7 +2766,7 @@

    def get_data_dir(self):
    try:
    - return gedit.Plugin.get_data_dir(self)
    + return self.plugin_info.get_data_dir()
    except:
    return self.get_data_directory()

     
  • Nobody/Anonymous

    Sorry, but it doesn't work yet for me

     

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks