[gnome-usage/tracker-powered-storage-view-wip] storage: Fix build warnings
- From: Felipe Borges <felipeborges src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-usage/tracker-powered-storage-view-wip] storage: Fix build warnings
- Date: Tue, 31 Jul 2018 16:46:32 +0000 (UTC)
commit f49fd665118a519715df35c8f8048e2e336d71af
Author: Petr Štětka <pstetka redhat com>
Date: Mon Jun 11 16:50:54 2018 +0200
storage: Fix build warnings
src/storage/storage-view-item.vala | 9 +++++----
src/storage/storage-view.vala | 4 ++--
src/storage/tracker-controller.vala | 9 ++-------
3 files changed, 9 insertions(+), 13 deletions(-)
---
diff --git a/src/storage/storage-view-item.vala b/src/storage/storage-view-item.vala
index 54e0a52..7ed76f5 100644
--- a/src/storage/storage-view-item.vala
+++ b/src/storage/storage-view-item.vala
@@ -48,10 +48,11 @@ public class Usage.StorageViewItem : GLib.Object {
uri = file.get_uri ();
try {
- var info = file.query_info (FileAttribute.STANDARD_SIZE + "," + FileAttribute.STANDARD_NAME + "," +
FileAttribute.STANDARD_TYPE + "," + FileAttribute.TRASH_ORIG_PATH, FileQueryInfoFlags.NOFOLLOW_SYMLINKS);
- name = info.get_name ();
- size = info.get_size ();
- type = info.get_file_type ();
+ var info = file.query_info (FileAttribute.STANDARD_SIZE + "," + FileAttribute.STANDARD_NAME +
"," + FileAttribute.STANDARD_TYPE + "," + FileAttribute.TRASH_ORIG_PATH,
FileQueryInfoFlags.NOFOLLOW_SYMLINKS);
+
+ name = info.get_name ();
+ size = info.get_size ();
+ type = info.get_file_type ();
} catch (GLib.Error error) {
warning (error.message);
}
diff --git a/src/storage/storage-view.vala b/src/storage/storage-view.vala
index 4704743..c0af07e 100644
--- a/src/storage/storage-view.vala
+++ b/src/storage/storage-view.vala
@@ -71,14 +71,14 @@ public class Usage.NewStorageView : Usage.View {
setup_header_label ();
setup_mount_sizes ();
- populate_view ();
+ populate_view.begin ();
}
private void on_row_activated (Gtk.ListBoxRow row) {
var storage_row = row as StorageViewRow;
if (storage_row.item.type == FileType.DIRECTORY) {
- present_dir (storage_row.item.uri);
+ present_dir.begin (storage_row.item.uri);
} else {
graph.queue_draw ();
}
diff --git a/src/storage/tracker-controller.vala b/src/storage/tracker-controller.vala
index d57d33c..34e1d92 100644
--- a/src/storage/tracker-controller.vala
+++ b/src/storage/tracker-controller.vala
@@ -110,13 +110,8 @@ public class Usage.TrackerController : GLib.Object {
var worker = yield new TrackerWorker (connection, query);
string n_uri = null;
- while (yield worker.fetch_next (out n_uri, null)) {
- try {
- total += get_g_file_size (n_uri);
- } catch (GLib.Error error) {
- warning (error.message);
- }
- }
+ while (yield worker.fetch_next (out n_uri, null))
+ total += get_g_file_size (n_uri);
return total;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]