Mailinglist Archive: yast-commit (1922 mails)

< Previous Next >
[yast-commit] <rest-service> dmacvicar_log_viewer : Simplify xml creation, fix loop->dbusloop renames
  • From: Klaus Kämpf <kkaempf@xxxxxxx>
  • Date: Thu, 10 Sep 2009 14:34:03 +0200
  • Message-id: <E1MlmpM-0005jD-12@xxxxxxxxxxxxxxxx>
ref: refs/heads/dmacvicar_log_viewer
commit a4fc418469d05a3de7cca7a30a302e3b8820b5de
Author: Klaus Kämpf <kkaempf@xxxxxxx>
Date: Thu Sep 10 14:34:03 2009 +0200

Simplify xml creation, fix loop->dbusloop renames
---
plugins/patches/app/models/resolvable.rb | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/plugins/patches/app/models/resolvable.rb
b/plugins/patches/app/models/resolvable.rb
index f96a77e..645a25e 100644
--- a/plugins/patches/app/models/resolvable.rb
+++ b/plugins/patches/app/models/resolvable.rb
@@ -58,7 +58,7 @@ public
xml = options[:builder] ||= Builder::XmlMarkup.new(options)
xml.instruct! unless options[:skip_instruct]

- xml.__send__ tag.to_sym do
+ xml.tag! tag do
xml.tag!(:resolvable_id, @resolvable_id, {:type => "integer"} )
xml.tag!(:kind, @kind )
xml.tag!(:name, @name )
@@ -94,8 +94,8 @@ public
dbusloop, obj_tid, obj_with_iface, obj_tid_with_iface =
self.packagekit_connect

obj_tid.on_signal(signal.to_s, &block)
- obj_tid.on_signal("Error") {|u1,u2| loop.quit }
- obj_tid.on_signal("Finished") {|u1,u2| loop.quit }
+ obj_tid.on_signal("Error") {|u1,u2| dbusloop.quit }
+ obj_tid.on_signal("Finished") {|u1,u2| dbusloop.quit }

obj_tid_with_iface.send(method.to_sym, *args)
dbusloop.run
@@ -108,7 +108,7 @@ public
# id
def self.package_kit_install(pkkit_id)
ok = true
- mainloop, obj_tid, obj_with_iface, obj_tid_with_iface =
self.packagekit_connect
+ dbusloop, obj_tid, obj_with_iface, obj_tid_with_iface =
self.packagekit_connect

obj_tid.on_signal("Package") do |line1,line2,line3|
Rails.logger.debug " update package: #{line2}"
@@ -117,7 +117,7 @@ public
dbusloop = DBus::Main.new
dbusloop << system_bus

- obj_tid.on_signal("Finished") {|u1,u2| loop.quit }
+ obj_tid.on_signal("Finished") {|u1,u2| dbusloop.quit }
obj_tid.on_signal("Error") do |u1,u2|
ok = false
dbusloop.quit
--
To unsubscribe, e-mail: yast-commit+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: yast-commit+help@xxxxxxxxxxxx

< Previous Next >
This Thread
  • No further messages