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:
parent
d19c8aef40
commit
d9972636a7
@ -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
|
||||||
|
@ -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) {
|
||||||
|
Loading…
Reference in New Issue
Block a user