Browse Source

Prevent opening text files

Opening a text file would overwrite the current draft, so for now we'll
disable this.
tags/v1.0.0
Matt Baer 5 years ago
parent
commit
d9972636a7
2 changed files with 2 additions and 7 deletions
  1. +2
    -2
      data/writeas-gtk.desktop
  2. +0
    -5
      src/application.vala

+ 2
- 2
data/writeas-gtk.desktop View File

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


+ 0
- 5
src/application.vala View File

@@ -32,11 +32,6 @@ public class WriteAs.Application : Gtk.Application {

public override void open(File[] files, string hint) {
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) {


Loading…
Cancel
Save