Prevent opening text files

Opening a text file would overwrite the current draft, so for now we'll
disable this.
This commit is contained in:
Matt Baer 2018-09-30 13:06:56 -04:00
parent d19c8aef40
commit d9972636a7
2 changed files with 2 additions and 7 deletions

View File

@ -2,10 +2,10 @@
Type=Application Type=Application
Name=Write.as Name=Write.as
Comment=Publish a thought in seconds. Comment=Publish a thought in seconds.
Exec=writeas-gtk %f Exec=writeas-gtk
Icon=write-as Icon=write-as
Terminal=false Terminal=false
MimeType=text/plain; MimeType=
Categories=GTK;Office;Publishing; Categories=GTK;Office;Publishing;
Keywords=blog;text;editor;publish; Keywords=blog;text;editor;publish;
StartupNotify=true StartupNotify=true

View File

@ -32,11 +32,6 @@ public class WriteAs.Application : Gtk.Application {
public override void open(File[] files, string hint) { public override void open(File[] files, string hint) {
activate(); // ensure we have a window open. activate(); // ensure we have a window open.
try {
(get_windows().data as MainWindow).open_file(files[0]);
} catch (Error e) {
error(e.message);
}
} }
public static int main(string[] args) { public static int main(string[] args) {