diff --git a/data/writeas-gtk.desktop b/data/writeas-gtk.desktop index d60c52a..6d5e10b 100644 --- a/data/writeas-gtk.desktop +++ b/data/writeas-gtk.desktop @@ -1,12 +1,12 @@ [Desktop Entry] 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 diff --git a/src/application.vala b/src/application.vala index 40506df..7ca83ef 100644 --- a/src/application.vala +++ b/src/application.vala @@ -1,45 +1,40 @@ /* Copyright © 2018 Write.as This file is part of the Write.as GTK desktop app. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ public class WriteAs.Application : Gtk.Application { construct { this.flags |= ApplicationFlags.HANDLES_OPEN; Intl.setlocale(LocaleCategory.ALL, ""); Intl.textdomain("write.as"); application_id = "writeas-gtk.desktop"; } public override void activate() { if (get_windows().length() == 0) new WriteAs.MainWindow(this).show_all(); } 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) { return new WriteAs.Application().run(args); } }