After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 594485 - Ask for confirmation when overwriting a file when rendering
Ask for confirmation when overwriting a file when rendering
Status: RESOLVED FIXED
Product: pitivi
Classification: Other
Component: User interface
Git
Other Linux
: Normal normal
: 0.14.1
Assigned To: Pitivi maintainers
Pitivi maintainers
: 609970 637817 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2009-09-08 12:02 UTC by yeKcim
Modified: 2011-06-22 18:49 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
patch (3.06 KB, patch)
2011-06-19 01:27 UTC, Jean-François Fortin Tam
needs-work Details | Review
reworked patch (3.06 KB, patch)
2011-06-20 02:29 UTC, Jean-François Fortin Tam
none Details | Review

Description yeKcim 2009-09-08 12:02:38 UTC
When i erase a file with pitivi rendering, pitivi don't ask me if i'm sure to want to use the same name like a already existing file.
Comment 1 Jean-François Fortin Tam 2010-02-05 23:28:40 UTC
I'm not 100% sure I would like this as I render a *lot* with file names such as "test.ogv", but I guess for usability's/safety's sake, it makes sense to prompt the user.
Comment 2 Stephen Griffiths 2010-02-15 10:41:30 UTC
*** Bug 609970 has been marked as a duplicate of this bug. ***
Comment 3 Jean-François Fortin Tam 2010-12-22 19:31:55 UTC
*** Bug 637817 has been marked as a duplicate of this bug. ***
Comment 4 Jean-François Fortin Tam 2011-06-19 01:27:11 UTC
Created attachment 190186 [details] [review]
patch

Here's a fix. I'm using a warning icon + tooltip instead of a dialog prompt:
- Users tend to automatically click Yes/Ok/Overwrite/whatever
- When doing video editing and testing rendering settings, you often render over the same file over and over again. Needing to acknowledge a warning dialog everytime would be irritating.
Comment 5 Alex Băluț 2011-06-19 21:04:56 UTC
Review of attachment 190186 [details] [review]:

In the if-else blocks you execute the same commands with different parameters. I suggest to set the "tooltip_text" and "icon" local variables inside these blocks, so they can be used by the two commands afterwards.

The final "if" condition should be set to "filename and os.path.exists(os.path.join(path, filename)):", otherwise it will show the error icon when the directory exists and the file name box is empty.

Let's use the handler for the "changed" signal instead of the "activate" and "focus-out-event" signals. It's cheap and useful.
Comment 6 Alex Băluț 2011-06-19 21:04:58 UTC
Review of attachment 190186 [details] [review]:

In the if-else blocks you execute the same commands with different parameters. I suggest to set the "tooltip_text" and "icon" local variables inside these blocks, so they can be used by the two commands afterwards.

The final "if" condition should be set to "filename and os.path.exists(os.path.join(path, filename)):", otherwise it will show the error icon when the directory exists and the file name box is empty.

Let's use the handler for the "changed" signal instead of the "activate" and "focus-out-event" signals. It's cheap and useful.
Comment 7 Jean-François Fortin Tam 2011-06-19 21:56:16 UTC
The specific reason why I used "activate" and "focus-out-event" signals instead of the standard "changed" signal is because I don't want to cause a hard drive access/path check everytime the use types a character.

If-else blocks: good idea
Comment 8 Jean-François Fortin Tam 2011-06-20 02:29:15 UTC
Created attachment 190243 [details] [review]
reworked patch
Comment 9 Jean-François Fortin Tam 2011-06-20 05:04:41 UTC
Note that the reworked patch uses the "changed" signal, which feels more natural to users and has a negligible impact on a "normal" desktop system, but may be a performance problem for networked filesystems or hard drives that "sleep".
Comment 10 Jean-François Fortin Tam 2011-06-22 18:49:43 UTC
commit c7d458eaf872a1b7a39e423da727da053e5ee0e7
Author: Jean-François Fortin Tam <nekohayo@gmail.com>
Date:   Sun Jun 19 21:51:23 2011 -0400

    encodingdialog: Show a warning icon and tooltip when the output file 
    already exists
    
    Fixes bug #594485