zeitgeist team mailing list archive
-
zeitgeist team
-
Mailing list archive
-
Message #04073
[Branch ~zeitgeist/zeitgeist/bluebird] Rev 244: replaced some asaasay with Utils.SIG_EVENT
------------------------------------------------------------
revno: 244
committer: Seif Lotfy <seif@xxxxxxxxx>
branch nick: bluebird
timestamp: Fri 2011-09-16 11:15:06 +0200
message:
replaced some asaasay with Utils.SIG_EVENT
modified:
extensions/blacklist.vala
extensions/ds-registry.vala
src/datamodel.vala
src/utils.vala
--
lp:~zeitgeist/zeitgeist/bluebird
https://code.launchpad.net/~zeitgeist/zeitgeist/bluebird
Your team Zeitgeist Framework Team is subscribed to branch lp:~zeitgeist/zeitgeist/bluebird.
To unsubscribe from this branch go to https://code.launchpad.net/~zeitgeist/zeitgeist/bluebird/+edit-subscription
=== modified file 'extensions/blacklist.vala'
--- extensions/blacklist.vala 2011-09-14 18:37:44 +0000
+++ extensions/blacklist.vala 2011-09-16 09:15:06 +0000
@@ -126,14 +126,14 @@
public Variant get_templates ()
{
- var vb = new VariantBuilder (new VariantType ("a{s(asaasay)}"));
+ var vb = new VariantBuilder (new VariantType ("a{s("+Utils.SIG_EVENT+")}"));
{
var iter = HashTableIter<string, Event> (blacklist);
string template_id;
Event event_template;
while (iter.next (out template_id, out event_template))
{
- vb.open (new VariantType ("{s(asaasay)}"));
+ vb.open (new VariantType ("{s("+Utils.SIG_EVENT+")}"));
vb.add ("s", template_id);
vb.add_value (event_template.to_variant ());
vb.close ();
=== modified file 'extensions/ds-registry.vala'
--- extensions/ds-registry.vala 2011-09-15 22:15:58 +0000
+++ extensions/ds-registry.vala 2011-09-16 09:15:06 +0000
@@ -71,8 +71,8 @@
public DataSource.from_variant (Variant variant)
{
// we expect (sssa(asaasay)bxb)
- warn_if_fail (variant.get_type_string () == "(sssa(asaasay)bxb)"
- || variant.get_type_string () == "sssa(asaasay)");
+ warn_if_fail (variant.get_type_string () == "(sssa("+Utils.SIG_EVENT+")bxb)"
+ || variant.get_type_string () == "sssa("+Utils.SIG_EVENT+")");
var iter = variant.iterator ();
assert (iter.n_children () >= 4);
@@ -93,7 +93,7 @@
public Variant to_variant ()
{
var vb = new VariantBuilder (new VariantType (
- "(sssa(asaasay)bxb)"));
+ "(sssa("+Utils.SIG_EVENT+")bxb)"));
vb.add ("s", unique_id);
vb.add ("s", name);
@@ -104,7 +104,7 @@
}
else
{
- vb.open (new VariantType ("a(asaasay)"));
+ vb.open (new VariantType ("a("+Utils.SIG_EVENT+")"));
vb.close ();
}
@@ -222,7 +222,7 @@
public Variant get_data_sources ()
{
var array = new VariantBuilder (new VariantType (
- "a(sssa(asaasay)bxb)"));
+ "a(sssa("+Utils.SIG_EVENT+")bxb)"));
List<unowned DataSource> data_sources = sources.get_values ();
data_sources.sort ((a, b) =>
{
=== modified file 'src/datamodel.vala'
--- src/datamodel.vala 2011-09-15 13:07:53 +0000
+++ src/datamodel.vala 2011-09-16 09:15:06 +0000
@@ -310,8 +310,9 @@
subjects.add (subject);
}
- public Event.from_variant (Variant event_variant) { // (asaasay)
- assert (event_variant.get_type_string () == "(asaasay)");
+ public Event.from_variant (Variant event_variant) {
+ assert (event_variant.get_type_string () == "(" +
+ Utils.SIG_EVENT + ")");
VariantIter iter = event_variant.iterator();
@@ -356,7 +357,7 @@
public Variant to_variant ()
{
- var vb = new VariantBuilder (new VariantType ("(asaasay)"));
+ var vb = new VariantBuilder (new VariantType ("("+Utils.SIG_EVENT+")"));
vb.open (new VariantType ("as"));
vb.add ("s", id.to_string ());
@@ -464,7 +465,7 @@
{
GenericArray<Event> events = new GenericArray<Event> ();
- assert (vevents.get_type_string () == "a(asaasay)");
+ assert (vevents.get_type_string () == "a("+Utils.SIG_EVENT+")");
foreach (Variant event in vevents)
{
@@ -476,7 +477,7 @@
public static Variant to_variant (GenericArray<Event?> events)
{
- var vb = new VariantBuilder(new VariantType("a(asaasay)"));
+ var vb = new VariantBuilder(new VariantType("a("+Utils.SIG_EVENT+")"));
for (int i = 0; i < events.length; ++i)
{
@@ -495,7 +496,7 @@
private static Variant get_null_event_variant ()
{
- var vb = new VariantBuilder (new VariantType ("(asaasay)"));
+ var vb = new VariantBuilder (new VariantType ("("+Utils.SIG_EVENT+")"));
vb.open (new VariantType ("as"));
vb.close ();
vb.open (new VariantType ("aas"));
=== modified file 'src/utils.vala'
--- src/utils.vala 2011-09-15 22:15:58 +0000
+++ src/utils.vala 2011-09-16 09:15:06 +0000
@@ -36,6 +36,7 @@
// D-Bus
public const string DBUS_INTERFACE = "";
+ public const string SIG_EVENT = "asaasay";
// Required version of DB schema
public const string CORE_SCHEMA = "core";