Re: [gedit-list] I need help
- From: Frederic Back <fredericback gmail com>
- To: "yarel.contrib" <yarel contrib tiscali fr>
- Cc: gedit-list gnome org
- Subject: Re: [gedit-list] I need help
- Date: Thu, 20 Apr 2006 19:02:52 +0200
Hello,
I can confirm that there is a bug when loading a document from a python
plugin. If you try to run the following in the python console (with an
existing file), it will work:
encoding = gedit.gedit_encoding_get_current()
uri = "file:///tmp/a_file_that_does_exist"
tab = window.create_tab_from_uri(uri,encoding,0,False,False)
However, if you paste the same code in a python plugin and run it, gedit
will crash. This is strange, since the python console itself is also a
python plugin. Opening the tab is not the problem here, but loading the
document.
I created a sample plugin to reproduce the bug and put it here:
http://www.stambouliote.de/pastebin/gedit-bug.tar.gz
Note that gedit will only crash if the file exists. Before running the
plugin, you should create this file: "/tmp/a_file_that_does_exist".
Any ideas? Am I doing something wrong?
If not, I'll go ahead and file a bug.
Cheers,
Frederic
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]