! Please note that this is a snapshot of our old Bugzilla server, which is read only since May 29, 2020. Please go to gitlab.xfce.org for our new server !
emit error signal from file creation job
Status:
RESOLVED: FIXED
Product:
Xfdesktop
Component:
General

Comments

Description Jani Monoses 2006-05-10 14:42:44 CEST
User-Agent:       Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.0.1) Gecko/20060413 Ubuntu/dapper Firefox/1.5.0.1
Build Identifier: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.0.1) Gecko/20060413 Ubuntu/dapper Firefox/1.5.0.1

not sure if this shoiuld be fixed in otherwise or in thunar at all, but since this create new document from xfdesktop rigth click menu silently fails when there's an error (same filename), unlike with directories. The file create job does not emit a signal on error, and thunar does not create new files using the job in the way xfdesktop does.



Reproducible: Always
Comment 1 Jani Monoses 2006-05-10 14:44:35 CEST
Created attachment 543 
this makes xfdesktop creation work

and does not seem to affect thunar's behaviour in any way in my limited testing
Comment 2 Benedikt Meurer editbugs 2006-05-11 08:51:16 CEST
Hm, I'm not sure about the patch. Why does xfdesktop need the error? The job will already popup a message dialog saying that the file could not be created.
Comment 3 Jani Monoses 2006-05-11 08:57:52 CEST
I'm not sure about the patch either, but the other way is to make xfdesktop create files as thunar does. xfdesktop makes a file create job directly while thunar calls it via a thunar_application. Not sure why but this makes xfdesktop not get the error popup.
Comment 4 Benedikt Meurer editbugs 2006-05-11 08:59:31 CEST
I guess xfdesktop does not connect the interactive job signals for the creat job. CC'ing Brian.
Comment 5 Brian J. Tarricone (not reading bugmail) 2006-05-11 16:57:07 CEST
Yeah, it's possible I left some of the error handling for later, since a failed creation isn't really that big a deal.  I'll look into it when I get a chance.
Comment 6 Benedikt Meurer editbugs 2006-05-15 21:28:48 CEST
I'd say xfdesktop should connect the interaction signals, so it's consistent with Thunar wrt the user interaction on file creation. BTW: Why should file creation in xfdesktop fail? ~/Desktop does not exist?
Comment 7 Brian J. Tarricone (not reading bugmail) 2006-05-15 21:34:21 CEST
(In reply to comment #6)
> I'd say xfdesktop should connect the interaction signals, so it's consistent
> with Thunar wrt the user interaction on file creation. BTW: Why should file
> creation in xfdesktop fail? ~/Desktop does not exist?

No idea why.  If ~/Desktop doesn't exist, it gets created.  If that fails, we give an error message on startup.  Though I guess if you went and deleted ~/Desktop while xfdesktop is running, it wouldn't be so thrilled.

Otherwise, the only reasons I can think of it failing are... um... if the FS got corrupted and the kernel remounted read-only.  Or if the FS filled up.  Or if it's NFS-mounted, and the network died.  Or if you tried to put invalid chars in the filename.  I dunno.  Regardless, I should check the error return, so that's an oversight on my part.

Comment 8 Jani Monoses 2006-05-16 06:21:23 CEST
as I mentioned in the orginal entry - same filename. IOW just create new document and don't bother changing the name from New Empty File, then repeat :) There could be other reasons though as well...
So probably xfdesktop should connect to the ask signal as thunar does. Although
it is weird not getting the error signal too on error, are interactive and error signal supposed to be exclusive? Not sure if every job is supposed to emit the error signal or just noninteractive ones...
Comment 9 Benedikt Meurer editbugs 2006-05-20 16:38:47 CEST
The error signal is only emitted on errors that cannot be skipped or don't make sense to be skipped, as the error signal handlers are supposed to cancel the job. I have to document that.
Comment 10 Brian J. Tarricone (not reading bugmail) 2006-05-20 23:30:02 CEST
Not sure what's wrong here.  Xfdesktop already is connecting to the job's 'error' signal.  It was originally ignoring the GError return val of thunar_vfs_create_file(), but I fixed that, and it still shows no error.

Benny, feel free to look at xfdesktop-file-icon-manager.c:1720 if you want.
Comment 11 Jani Monoses 2006-05-21 07:10:07 CEST
The cause is that thunar-vfs does not emit an 'error' signal in this case. As Benedikt said in a previous comment it is only emmitted for non-cancellable errors I think. In  thunar-vfs-creat-job for this error rather the interactive jobs' 'ask' signal is emmited so the connecting app gets error messages which it can create dialogs from. My patch worked around this by emmitting an 'error' along with the interactive signals but apparently that's not the way to do it, and needs to be documented.
Comment 12 Brian J. Tarricone (not reading bugmail) 2006-05-21 08:31:20 CEST
Ok, should be fixed.
Comment 13 Benedikt Meurer editbugs 2006-05-23 14:36:02 CEST
Yep, looks good.

Bug #1796

Reported by:
Jani Monoses
Reported on: 2006-05-10
Last modified on: 2009-07-14

People

Assignee:
Brian J. Tarricone (not reading bugmail)
CC List:
1 user

Version

Attachments

this makes xfdesktop creation work (493 bytes, patch)
2006-05-10 14:44 CEST , Jani Monoses
no flags

Additional information