diff --git a/configure.ac b/configure.ac index 573b7d8..cbdb232 100644 --- a/configure.ac +++ b/configure.ac @@ -1,6 +1,6 @@ AC_PREREQ([2.64]) AC_INIT(roxenlauncher, - 2.0.4, + 2.0.5, [pontus@poppa.se], [roxenlauncher], [https://github.com/poppa/Roxen-Application-Launcher]) diff --git a/data/Makefile.am b/data/Makefile.am index 8b9f9a8..dfe5def 100644 --- a/data/Makefile.am +++ b/data/Makefile.am @@ -24,11 +24,24 @@ desktop_in_files=roxen-launcher.desktop.in desktop_DATA=roxen-launcher.desktop @INTLTOOL_DESKTOP_RULE@ +mimedir = ${datadir}/mime/packages +mime_DATA = xrl2-mime.xml EXTRA_DIST = \ $(roxenlauncherextra_DATA) \ $(roxenlauncherpixmaps_DATA) \ $(gsettings_SCHEMAS) \ $(desktop_in_files) \ + $(mime_DATA) \ $(NULL) +install-data-local: install-mimeDATA + if which update-mime-database>/dev/null 2>&1; then \ + update-mime-database $(DESTDIR)$(datadir)/mime; \ + fi + +uninstall-local: + if which update-mime-database>/dev/null 2>&1; then \ + update-mime-database $(DESTDIR)$(datadir)/mime; \ + fi + diff --git a/data/mainwindow.ui b/data/mainwindow.ui index d2b103d..2e59674 100644 --- a/data/mainwindow.ui +++ b/data/mainwindow.ui @@ -75,9 +75,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. False + False True False - False _File True @@ -87,9 +87,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. gtk-quit + False True False - False True True @@ -100,9 +100,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. + False True False - False _Help True @@ -112,9 +112,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. gtk-about + False True False - False True True @@ -191,6 +191,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. gtk-edit + False True False True @@ -207,6 +208,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. gtk-remove + False True False True @@ -223,6 +225,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. gtk-clear + False True False True @@ -309,6 +312,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. gtk-edit + False True False True @@ -325,6 +329,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. gtk-add + False True True True @@ -340,6 +345,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. gtk-remove + False True False True @@ -404,10 +410,12 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. Enable notifications + False True True False False + 0 True @@ -419,11 +427,13 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. Minimize to tray + False True True False Window close button minimizes the application to the tray False + 0 True @@ -449,13 +459,16 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. False - True + False 1 + + + False @@ -532,6 +545,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. Clear log + False True False True @@ -581,6 +595,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. Enable logging + False True True False @@ -649,23 +664,26 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. + + Add the mimetype for Roxen Launcher files (.xrl2) to your mimetype database + True False + False True False - False _View in Sitebuilder True + False True False - False V_iew directory in Sitebuilder True @@ -678,18 +696,18 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. + False True False - False _Edit True + False True False - False _Delete True diff --git a/src/launcherfile.vala b/src/launcherfile.vala index 675fe71..1e13358 100644 --- a/src/launcherfile.vala +++ b/src/launcherfile.vala @@ -556,7 +556,6 @@ public class Roxenlauncher.LauncherFile : Object var app = ContentType.get_by_ct (content_type); if (app == null) { - application = window.ct_new (content_type); if (application == null) @@ -754,7 +753,7 @@ public class Roxenlauncher.LauncherFile : Object yield; } catch (GLib.Error e) { - log_warning (_("Unable to upload file: %s").printf(e.message)); + log_warning (_("Unable to upload file: %s").printf (e.message)); win_set_status (Statuses.NOT_UPLOADED); window.show_notification (NotifyType.ERROR, _("Upload failed"), diff --git a/src/main.vala b/src/main.vala index a4dc2dd..32e7b3f 100644 --- a/src/main.vala +++ b/src/main.vala @@ -57,11 +57,6 @@ class Roxenlauncher.Main : Gtk.Application window = new MainWindow (); window.set_application (this); - /* - tray = new Tray (); - tray.hookup (); - */ - if (window.setup_ui ()) { window.show_all (); log_message (_("Application launcher started")); @@ -95,9 +90,10 @@ class Roxenlauncher.Main : Gtk.Application if (d != null) { LauncherFile lf; - try { if (LauncherFile.handle_file (d, out lf)) { if - (App.do_debug) message ("Incomming file is new...%s", lf.get_uri - ()); + try { + if (LauncherFile.handle_file (d, out lf)) { + if (App.do_debug) + message ("Incomming file is new...%s", lf.get_uri ()); lf.download.begin (); } @@ -108,6 +104,16 @@ class Roxenlauncher.Main : Gtk.Application window.set_file_selection (lf); lf.download.begin (); } + + if (App.do_debug) + message ("Delete incomming file \"%s\"", args[i]); + + try { + File.new_for_path (args[i]).delete (null); + } + catch (GLib.Error ex) { + message ("Unable to delete incomming file!"); + } } catch (GLib.Error e) { log_warning (_("Failed to handle incomming file: %s") diff --git a/src/mainwindow.vala b/src/mainwindow.vala index 53b3b29..5d7f3e1 100644 --- a/src/mainwindow.vala +++ b/src/mainwindow.vala @@ -418,7 +418,9 @@ public class Roxenlauncher.MainWindow : Gtk.Window */ public void on_cb_notify_toggled (Object cb) { - message ("notify toggled"); + if (App.do_debug) + message ("notify toggled"); + App.do_notifications = !App.do_notifications; } @@ -429,7 +431,9 @@ public class Roxenlauncher.MainWindow : Gtk.Window */ public void on_cb_minimize_toggled (Object cb) { - message ("notify toggled"); + if (App.do_debug) + message ("notify toggled"); + App.do_minimize = !App.do_minimize; }