[connections/parse-int-values-from-database-file] database: Handle "integer" property type
- From: Felipe Borges <felipeborges src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [connections/parse-int-values-from-database-file] database: Handle "integer" property type
- Date: Wed, 29 Sep 2021 11:32:06 +0000 (UTC)
commit d19b7f0a24d349570ab8ed2458470dafd7e5cdc6
Author: Felipe Borges <felipeborges gnome org>
Date: Wed Sep 29 13:28:48 2021 +0200
database: Handle "integer" property type
src/database.vala | 4 ++++
1 file changed, 4 insertions(+)
---
diff --git a/src/database.vala b/src/database.vala
index 352a4f2..30e10e8 100644
--- a/src/database.vala
+++ b/src/database.vala
@@ -103,6 +103,8 @@ namespace Connections {
value = get_string (connection.uuid, property_name);
if (value.type () == typeof (bool))
value = get_boolean (connection.uuid, property_name);
+ if (value.type () == typeof (int))
+ value = keyfile.get_integer (connection.uuid, property_name);
if (value.type () == typeof (uint64))
value = keyfile.get_uint64 (connection.uuid, property_name);
if (value.type () == typeof (int64))
@@ -125,6 +127,8 @@ namespace Connections {
keyfile.set_string (connection.uuid, property_name, vstring);
} else if (value.type () == typeof (bool))
keyfile.set_boolean (connection.uuid, property_name, value.get_boolean ());
+ else if (value.type () == typeof (int))
+ keyfile.set_integer (connection.uuid, property_name, value.get_int ());
else if (value.type () == typeof (uint64))
keyfile.set_uint64 (connection.uuid, property_name, value.get_uint64 ());
else if (value.type () == typeof (int64))
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]