[tracker] tracker-needle: Launch apps correctly
- From: Martyn James Russell <mr src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker] tracker-needle: Launch apps correctly
- Date: Thu, 24 Mar 2011 23:18:12 +0000 (UTC)
commit e6bbcdf9e55bc180012121b7b627328fe99207b5
Author: Carlos Garnacho <carlosg gnome org>
Date: Mon Mar 21 19:04:51 2011 +0100
tracker-needle: Launch apps correctly
src/tracker-needle/tracker-needle.vala | 13 +++++++++----
1 files changed, 9 insertions(+), 4 deletions(-)
---
diff --git a/src/tracker-needle/tracker-needle.vala b/src/tracker-needle/tracker-needle.vala
index e5b515f..e2c9a96 100644
--- a/src/tracker-needle/tracker-needle.vala
+++ b/src/tracker-needle/tracker-needle.vala
@@ -606,10 +606,15 @@ public class Tracker.Needle {
private void launch_selected (TreeModel model, TreePath path, int col) {
TreeIter iter;
model.get_iter (out iter, path);
-
+
weak string uri;
model.get (iter, col, out uri);
- debug ("Selected uri:'%s'", uri);
+
+ if (uri == null) {
+ return;
+ }
+
+ debug ("Selected uri:'%s'", uri);
// Bit of a hack for now if there is no URI scheme, we assume that
// the uri is actually a command line to launch.
@@ -647,12 +652,12 @@ public class Tracker.Needle {
private void view_row_selected (TreeView view, TreePath path, TreeViewColumn column) {
var model = view.get_model ();
- launch_selected (model, path, 3);
+ launch_selected (model, path, 1);
}
private void icon_item_selected (IconView view, TreePath path) {
var model = view.get_model ();
- launch_selected (model, path, 3);
+ launch_selected (model, path, 1);
}
private void show_tags_clicked () {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]