Re: Can g_file_monitor_file () report events from before it was created?
- From: Peter Clifton <pcjc2 cam ac uk>
- To: gtk-app-devel-list gnome org
- Subject: Re: Can g_file_monitor_file () report events from before it was created?
- Date: Wed, 07 Sep 2011 13:36:32 +0100
On Wed, 2011-09-07 at 03:18 +0100, Peter Clifton wrote:
Content-Type: text/plain; charset="UTF-8"
On Tue, 2011-09-06 at 01:42 +0100, Peter Clifton wrote:
Content-Type: text/plain; charset=3D"UTF-8"
I'm working on some code to monitor for file changes in our application,
and ran into a bit of a problem today with the Save-As case.
The order of operations is something like:
1. File monitor exists on the document file which was loaded last
2. User hits File->Save as.. (and enters a filename)
^__ Just as an interesting (and probably critical note), I don't see
this bug if I hard-code a Save-as filename.
I only get unexpected file-monitor events if I use a
gtk_file_chooser_dialog to select the new filename to save into.
Futhermore - it only breaks if the dialog is set to an initial location
with something like:
gtk_file_chooser_set_current_folder (GTK_FILE_CHOOSER (dialog), *path);
(Or left to pick the current working directory, where the file is).
If I set the current folder to "/", e.g.:
gtk_file_chooser_set_current_folder (GTK_FILE_CHOOSER (dialog), "/");
Then navigate to the directory I'm going to save into from within the
GUI, the problem does not occur.
Electrical Engineering Division,
University of Cambridge,
9, JJ Thomson Avenue,
Tel: +44 (0)7729 980173 - (No signal in the lab!)
Tel: +44 (0)1223 748328 - (Shared lab phone, ask for me)
] [Thread Prev