Blank window when attempting to open file that doesn't exist

Bug #1334494 reported by Cassidy James Blaede
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Scratch
Fix Released
Medium
elementary UX

Bug Description

If I point Scratch (2.0.1, Freya build) to a file that doesn't exist (via the command line, like `scratch-text-editor foo.txt`), it simply opens a blank window with neither an editor nor a welcome screen. Instead, it'd probably make sense to create a new document with the given name or to at least display a message that the file doesn't exist.

Here's what Scratch throws:

[_LOG_LEVEL_WARN 21:28:29.619717] Scratch.vala:192: Error when getting information for file '/home/cassidyjames/foo.text': No such file or directory

Tags: ux

Related branches

Revision history for this message
Cassidy James Blaede (cassidyjames) wrote :
description: updated
Changed in scratch:
status: New → Confirmed
Revision history for this message
Harvey Cabaguio (harveycabaguio) wrote :

I don't know if this will annoy heavy terminal users, but I think I'd like if it scratch didn't care if the file exists or not and made the file then opened it and when you start writing stuff down on it bam auto save, life is easy.

Revision history for this message
Danielle Foré (danrabbit) wrote :

Is there any way to know if we're actually launching from the terminal or not? If so, I think probably the thing to do would be to error at the terminal and say "file not found".

Of course if we're not at the terminal and this is in a .desktop or something that would be a silent fail which would suck. So maybe we should open scratch at the welcome and error there with the option to create foo.txt

Changed in scratch:
status: Confirmed → In Progress
Changed in scratch:
status: In Progress → Fix Committed
milestone: none → loki-alpha1
Cody Garver (codygarver)
Changed in scratch:
importance: Undecided → Medium
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.