[msitools] wixl: two-stage visit for components
- From: Paolo Bonzini <pbonzini src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [msitools] wixl: two-stage visit for components
- Date: Fri, 25 Jan 2013 08:47:13 +0000 (UTC)
commit 42e457fb52a35893e4a63cce42774dbf6d2fb3d6
Author: Paolo Bonzini <pbonzini redhat com>
Date: Fri Jan 25 09:16:03 2013 +0100
wixl: two-stage visit for components
tools/wixl/builder.vala | 4 +++-
tools/wixl/wix.vala | 5 +++--
2 files changed, 6 insertions(+), 3 deletions(-)
---
diff --git a/tools/wixl/builder.vala b/tools/wixl/builder.vala
index 43a8542..8b3d994 100644
--- a/tools/wixl/builder.vala
+++ b/tools/wixl/builder.vala
@@ -347,8 +347,10 @@ namespace Wixl {
buffer[12], buffer[13], buffer[14], buffer[15]);
}
- public override void visit_component (WixComponent comp) throws GLib.Error {
+ public override void visit_component (WixComponent comp, VisitState state) throws GLib.Error {
var attr = 0;
+ if (state == VisitState.ENTER)
+ return;
if (comp.key is WixRegistryValue)
attr |= ComponentAttribute.REGISTRY_KEY_PATH;
diff --git a/tools/wixl/wix.vala b/tools/wixl/wix.vala
index dee6947..a7cf3c9 100644
--- a/tools/wixl/wix.vala
+++ b/tools/wixl/wix.vala
@@ -37,7 +37,7 @@ namespace Wixl {
public abstract void visit_property (WixProperty prop) throws GLib.Error;
public abstract void visit_media (WixMedia media) throws GLib.Error;
public abstract void visit_directory (WixDirectory dir) throws GLib.Error;
- public abstract void visit_component (WixComponent comp) throws GLib.Error;
+ public abstract void visit_component (WixComponent comp, VisitState state) throws GLib.Error;
public abstract void visit_feature (WixFeature feature, VisitState state) throws GLib.Error;
public abstract void visit_component_ref (WixComponentRef ref) throws GLib.Error;
public abstract void visit_remove_folder (WixRemoveFolder rm) throws GLib.Error;
@@ -995,8 +995,9 @@ namespace Wixl {
public List<WixFeature> in_feature;
public override void accept (WixNodeVisitor visitor) throws GLib.Error {
+ visitor.visit_component (this, VisitState.ENTER);
base.accept (visitor);
- visitor.visit_component (this);
+ visitor.visit_component (this, VisitState.LEAVE);
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]