Skip to content

Commit

Permalink
fix open URL command
Browse files Browse the repository at this point in the history
  • Loading branch information
DevAlien committed Aug 20, 2020
1 parent 15f33b1 commit 4a9383c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
4 changes: 4 additions & 0 deletions src/Models/Item.vala
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,10 @@ public class Workspaces.Models.Item : Object {

switch (item_type) {
case "URL" :
if (command != null && command.length > 0) {
c = "xdg-open " + command;
}
break;
case "Directory" :
if (directory != null && directory.length > 0) {
c = "xdg-open " + directory;
Expand Down
5 changes: 3 additions & 2 deletions src/Widgets/ShortcutEntry.vala
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,8 @@ public class Workspaces.Widgets.ShortcutEntry : Gtk.TreeView {
Gtk.TreeIter iter;

model.get_iter (out iter, new Gtk.TreePath.from_string (path));

(model as Gtk.ListStore).set (iter, 0, shortcut.to_readable ());
if (model != null) {
(model as Gtk.ListStore).set (iter, 0, shortcut.to_readable ());
}
}
}

0 comments on commit 4a9383c

Please sign in to comment.