oliver / gedit-file-search

Gedit plugin to search a text in all files in a directory
https://oliver.github.io/gedit-file-search/
43 stars 11 forks source link

bugs in gedit3 port #14

Closed lpietsch closed 11 years ago

lpietsch commented 12 years ago

Thanks a bunch for making the gedit3 version available! Here are some bug reports

(Tested: version at https://github.com/adam-yorba/gedit-file-search/tree/gedit-3/file-search from July 6, 2011, with Gedit 3.2.1 running on Xubuntu 11.10)

1) Error message on activating plugin: "TypeError: on_search_files_activate() takes exactly 3 arguments (2 given)" Apparently relates to: ui.py, line 442: "def on_search_files_activate(self, action, user_data)" Probably needs to be changed to: "def on_search_files_activate(self, action)" Plugin loads properly with this change.

2) Gedit exits with error message "segmentation fault" on executing search command. (Reason unclear.)

3) after re-starting Gedit after this crash, I get another error already on opening the search-files dialog (presumably during execution of openSearchDialog): "TypeError: metaclass conflict: the metaclass of a derived class must be a (non-strict) subclass of the metaclasses of all its bases"

rystraum commented 12 years ago

Tried debugging this one: Commenting out lines 461-468 in ui.py (see below) removes the metaclass conflict error and manages to open the dialog. Seg fault still happens. More investigation needed.

    currentDocDir = None
    #if self._window.get_active_tab():
    #    gFilePath = self._window.get_active_tab().get_document().get_location()
    #    if gFilePath != None:
    #        if onlyLocalPathes:
    #            if gFilePath.is_native():
    #                currentDocDir = gFilePath.get_path()
    #        else:
    #            currentDocDir = gFilePath.get_parent().get_path()
oliver commented 11 years ago

In the branch at https://github.com/oliver/gedit-file-search/tree/gedit3 these problems should be fixed. That branch has been tested with Gedit 3.4.1 under Ubuntu 12.04. It will probably not work under newer Gedit versions which use Python3 instead of Python2, though.

Btw. the segmentation fault was probably due to mixing old-style and new-style GTK bindings (ie. using "from gi.repository import..." and "import gobject" in the same application).

oliver commented 11 years ago

This should be fixed with release 1.0 now - http://olivergerlich.wordpress.com/2013/09/10/gedit-file-search-plugin-1-0-available-now-for-gedit-3/