Re: [gedit-list] Determining successfully loaded files



On Sun, Apr 13, 2014 at 10:35 AM, Sébastien Wilmet <swilmet gnome org> wrote:
Hi,

On Sun, Apr 13, 2014 at 10:24:41AM -0400, Dustin Oprea wrote:
> I'd like to be able to determine if a document is a text-file or a binary
> file. I'd also like to know if there's a way to know whether the file was
> successfully loaded, or it's waiting on some prompt from the user (as in
> the case of a binary file, accidentally loading a path, or having IO
> errors). Are either of these possible?

GeditDocument have signals for that: "load", "loading" and "loaded".
But it is currently not possible to know if the file is a binary file.
Note that this API will probably be deprecated or removed soon, to have
a better API in GtkSourceView.


What about files that were already loaded, and are stopped on an error-prompt in one of the tabs?



Dustin

 
The relevant bugs in GtkSourceView:
https://bugzilla.gnome.org/show_bug.cgi?id=721016
https://bugzilla.gnome.org/show_bug.cgi?id=724247

Best regards,
Sébastien



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]