summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSeif Lotfy <seif@lotfy.com>2013-03-17 16:27:37 +0100
committerSeif Lotfy <seif@lotfy.com>2013-03-17 16:27:37 +0100
commit6a8ed03b8a39dc4fc3c6b3818db22cc0e8cfc566 (patch)
tree5057d6ab94395d38b4dcf2c87003e63c7fc0642c
parent079167a9fe73d938dba4a9ee6bcc08d900abcd58 (diff)
downloadzeitgeist-6a8ed03b8a39dc4fc3c6b3818db22cc0e8cfc566.tar.gz
Remove unreachable catch and unused modules
-rw-r--r--datahub/Makefile.am1
-rw-r--r--datahub/configuration.vala30
-rw-r--r--datahub/utils.vala20
3 files changed, 7 insertions, 44 deletions
diff --git a/datahub/Makefile.am b/datahub/Makefile.am
index 7dead02b..9629baa7 100644
--- a/datahub/Makefile.am
+++ b/datahub/Makefile.am
@@ -27,7 +27,6 @@ BUILT_SOURCES = \
$(NULL)
zeitgeist_datahub_VALASOURCES = \
- configuration.vala \
data-provider.vala \
desktop-launch-listener.vala \
downloads-directory-provider.vala \
diff --git a/datahub/configuration.vala b/datahub/configuration.vala
deleted file mode 100644
index 747bdd6b..00000000
--- a/datahub/configuration.vala
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
- * Zeitgeist
- *
- * Copyright (C) 2010 Michal Hruby <michal.mhr@gmail.com>
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser 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 Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- *
- * Authored by Michal Hruby <michal.mhr@gmail.com>
- *
- */
-
-using Zeitgeist;
-
-[DBus (name = "org.gnome.zeitgeist.datahub")]
-interface DataProviderService : Object
-{
- public abstract string[] get_data_providers () throws DBusError;
-}
-
diff --git a/datahub/utils.vala b/datahub/utils.vala
index 998eb2b4..bd14e45d 100644
--- a/datahub/utils.vala
+++ b/datahub/utils.vala
@@ -236,25 +236,19 @@ public class Utils : Object
{
var desktop_file = Path.build_filename (p, fi.get_name (), null);
var f = File.new_for_path (desktop_file);
- try
+
+ string? contents = Utils.get_file_contents (f);
+ if (contents != null)
{
- string? contents = Utils.get_file_contents (f);
- if (contents != null)
+ if ("Exec=%s".printf (app_name) in contents)
{
- if ("Exec=%s".printf (app_name) in contents)
+ if (mimetype == null || mimetype in contents)
{
- if (mimetype == null || mimetype in contents)
- {
- app_to_desktop_file.insert (hash_name, desktop_file);
- return desktop_file;
- }
+ app_to_desktop_file.insert (hash_name, desktop_file);
+ return desktop_file;
}
}
}
- catch (GLib.Error err)
- {
- warning ("%s", err.message);
- }
}
fi = enumerator.next_file (null);
}