[baobab/wip/vala: 25/53] Adjust to gio vapi changes
- From: Stefano Facchini <sfacchini src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [baobab/wip/vala: 25/53] Adjust to gio vapi changes
- Date: Thu, 5 Apr 2012 21:35:50 +0000 (UTC)
commit 3186aeaaa15057deef1facf4ab8432c966fdf679
Author: Ryan Lortie <desrt desrt ca>
Date: Thu Jan 26 12:43:07 2012 -0500
Adjust to gio vapi changes
A bunch of stuff was deprecated. Stop using it.
src/baobab-application.vala | 2 +-
src/baobab-scanner.vala | 22 +++++++++++-----------
src/baobab-sync-scanner.vala | 12 ++++++------
src/baobab-threaded-scanner.vala | 12 ++++++------
src/baobab-window.vala | 2 +-
5 files changed, 25 insertions(+), 25 deletions(-)
---
diff --git a/src/baobab-application.vala b/src/baobab-application.vala
index c8e3007..06ea0a5 100644
--- a/src/baobab-application.vala
+++ b/src/baobab-application.vala
@@ -20,7 +20,7 @@ namespace Baobab {
public static HashTable<File, unowned File> get_excluded_locations () {
var app = baobab;
- var excluded_locations = new HashTable<File, unowned File> (file_hash, file_equal);
+ var excluded_locations = new HashTable<File, unowned File> (File.hash, File.equal);
excluded_locations.add (File.new_for_path ("/proc"));
excluded_locations.add (File.new_for_path ("/sys"));
excluded_locations.add (File.new_for_path ("/selinux"));
diff --git a/src/baobab-scanner.vala b/src/baobab-scanner.vala
index 22a379b..41d3cb6 100644
--- a/src/baobab-scanner.vala
+++ b/src/baobab-scanner.vala
@@ -23,8 +23,8 @@ namespace Baobab {
uint32 device;
public HardLink (FileInfo info) {
- this.inode = info.get_attribute_uint64 (FILE_ATTRIBUTE_UNIX_INODE);
- this.device = info.get_attribute_uint32 (FILE_ATTRIBUTE_UNIX_DEVICE);
+ this.inode = info.get_attribute_uint64 (FileAttribute.UNIX_INODE);
+ this.device = info.get_attribute_uint32 (FileAttribute.UNIX_DEVICE);
}
}
@@ -33,15 +33,15 @@ namespace Baobab {
protected HardLink[] hardlinks;
protected static const string ATTRIBUTES =
- FILE_ATTRIBUTE_STANDARD_NAME + "," +
- FILE_ATTRIBUTE_STANDARD_DISPLAY_NAME + "," +
- FILE_ATTRIBUTE_STANDARD_TYPE + "," +
- FILE_ATTRIBUTE_STANDARD_SIZE + "," +
- FILE_ATTRIBUTE_STANDARD_ALLOCATED_SIZE + "," +
- FILE_ATTRIBUTE_UNIX_NLINK + "," +
- FILE_ATTRIBUTE_UNIX_INODE + "," +
- FILE_ATTRIBUTE_UNIX_DEVICE + "," +
- FILE_ATTRIBUTE_ACCESS_CAN_READ;
+ FileAttribute.STANDARD_NAME + "," +
+ FileAttribute.STANDARD_DISPLAY_NAME + "," +
+ FileAttribute.STANDARD_TYPE + "," +
+ FileAttribute.STANDARD_SIZE + "," +
+ FileAttribute.STANDARD_ALLOCATED_SIZE + "," +
+ FileAttribute.UNIX_NLINK + "," +
+ FileAttribute.UNIX_INODE + "," +
+ FileAttribute.UNIX_DEVICE + "," +
+ FileAttribute.ACCESS_CAN_READ;
public File directory { get; protected set; }
diff --git a/src/baobab-sync-scanner.vala b/src/baobab-sync-scanner.vala
index fc0fb6e..2083a8e 100644
--- a/src/baobab-sync-scanner.vala
+++ b/src/baobab-sync-scanner.vala
@@ -24,8 +24,8 @@ namespace Baobab {
Columns.PARSE_NAME, parse_name);
results.size = info.get_size ();
- if (info.has_attribute (FILE_ATTRIBUTE_STANDARD_ALLOCATED_SIZE)) {
- results.alloc_size = info.get_attribute_uint64 (FILE_ATTRIBUTE_STANDARD_ALLOCATED_SIZE);
+ if (info.has_attribute (FileAttribute.STANDARD_ALLOCATED_SIZE)) {
+ results.alloc_size = info.get_attribute_uint64 (FileAttribute.STANDARD_ALLOCATED_SIZE);
}
results.elements = 1;
@@ -49,8 +49,8 @@ namespace Baobab {
break;
case FileType.REGULAR:
- if (child_info.has_attribute (FILE_ATTRIBUTE_UNIX_NLINK)) {
- if (child_info.get_attribute_uint32 (FILE_ATTRIBUTE_UNIX_NLINK) > 1) {
+ if (child_info.has_attribute (FileAttribute.UNIX_NLINK)) {
+ if (child_info.get_attribute_uint32 (FileAttribute.UNIX_NLINK) > 1) {
var hl = HardLink (child_info);
/* check if we've already encountered this file */
@@ -63,8 +63,8 @@ namespace Baobab {
}
results.size += child_info.get_size ();
- if (child_info.has_attribute (FILE_ATTRIBUTE_STANDARD_ALLOCATED_SIZE)) {
- results.alloc_size += child_info.get_attribute_uint64 (FILE_ATTRIBUTE_STANDARD_ALLOCATED_SIZE);
+ if (child_info.has_attribute (FileAttribute.STANDARD_ALLOCATED_SIZE)) {
+ results.alloc_size += child_info.get_attribute_uint64 (FileAttribute.STANDARD_ALLOCATED_SIZE);
}
results.elements++;
break;
diff --git a/src/baobab-threaded-scanner.vala b/src/baobab-threaded-scanner.vala
index 58e668a..ac7174d 100644
--- a/src/baobab-threaded-scanner.vala
+++ b/src/baobab-threaded-scanner.vala
@@ -77,8 +77,8 @@ namespace Baobab {
results.parent = parent;
results.size = info.get_size ();
- if (info.has_attribute (FILE_ATTRIBUTE_STANDARD_ALLOCATED_SIZE)) {
- results.alloc_size = info.get_attribute_uint64 (FILE_ATTRIBUTE_STANDARD_ALLOCATED_SIZE);
+ if (info.has_attribute (FileAttribute.STANDARD_ALLOCATED_SIZE)) {
+ results.alloc_size = info.get_attribute_uint64 (FileAttribute.STANDARD_ALLOCATED_SIZE);
}
results.elements = 1;
@@ -105,8 +105,8 @@ namespace Baobab {
break;
case FileType.REGULAR:
- if (child_info.has_attribute (FILE_ATTRIBUTE_UNIX_NLINK)) {
- if (child_info.get_attribute_uint32 (FILE_ATTRIBUTE_UNIX_NLINK) > 1) {
+ if (child_info.has_attribute (FileAttribute.UNIX_NLINK)) {
+ if (child_info.get_attribute_uint32 (FileAttribute.UNIX_NLINK) > 1) {
var hl = HardLink (child_info);
// check if we've already encountered this file
@@ -119,8 +119,8 @@ namespace Baobab {
}
results.size += child_info.get_size ();
- if (child_info.has_attribute (FILE_ATTRIBUTE_STANDARD_ALLOCATED_SIZE)) {
- results.alloc_size += child_info.get_attribute_uint64 (FILE_ATTRIBUTE_STANDARD_ALLOCATED_SIZE);
+ if (child_info.has_attribute (FileAttribute.STANDARD_ALLOCATED_SIZE)) {
+ results.alloc_size += child_info.get_attribute_uint64 (FileAttribute.STANDARD_ALLOCATED_SIZE);
}
results.elements++;
break;
diff --git a/src/baobab-window.vala b/src/baobab-window.vala
index b1e0276..d02899b 100644
--- a/src/baobab-window.vala
+++ b/src/baobab-window.vala
@@ -181,7 +181,7 @@ namespace Baobab {
//}
try {
- var info = directory.query_info (FILE_ATTRIBUTE_STANDARD_TYPE, FileQueryInfoFlags.NONE, null);
+ var info = directory.query_info (FileAttribute.STANDARD_TYPE, FileQueryInfoFlags.NONE, null);
if (info.get_file_type () != FileType.DIRECTORY/* || is_virtual_filesystem ()*/) {
var primary = _("\"%s\" is not a valid folder").printf (directory.get_parse_name ());
message (primary, _("Could not analyze disk usage."), Gtk.MessageType.ERROR);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]