Merge lp:~kaihengfeng/ubiquity/fix-usd-scaling into lp:ubiquity
| Status: | Merged |
|---|---|
| Approved by: | Mathieu Trudel-Lapierre on 2016-07-25 |
| Approved revision: | 6453 |
| Merged at revision: | 6459 |
| Proposed branch: | lp:~kaihengfeng/ubiquity/fix-usd-scaling |
| Merge into: | lp:ubiquity |
| Diff against target: |
33 lines (+19/-0) 1 file modified
bin/ubiquity-dm (+19/-0) |
| To merge this branch: | bzr merge lp:~kaihengfeng/ubiquity/fix-usd-scaling |
| Related bugs: |
| Reviewer | Review Type | Date Requested | Status |
|---|---|---|---|
| Iain Lane | Disapprove on 2016-07-26 | ||
| Mathieu Trudel-Lapierre | 2016-06-24 | Approve on 2016-07-25 | |
|
Review via email:
|
|||
| Kai-Heng Feng (kaihengfeng) wrote : | # |
| Mathieu Trudel-Lapierre (cyphermox) wrote : | # |
Looks generally fine; have you built this locally and tested it on a live image?
| Kai-Heng Feng (kaihengfeng) wrote : | # |
Yes. It depends on the dbus-monitor output format, but I think it won't change anytime soon.
| Iain Lane (laney) wrote : | # |
IMHO calling out to an external program like this is bad form in terms of efficiency and using the right tools for the job (the regex in particular has a bad smell).
There are APIs to talk to DBus directly which you can use from python. I recommend using GDBus via g-i. Something like---
from gi.repository import Gio
loop = Glib.MainLoop()
connection = Gio.bus_get (Gio.BusType.
loop.run()
# on_got_bus
connection.
# add a timeout for safety
# start u-s-d
# on_xsettings_active
# check the signal parameter
loop.quit()
| Kai-Heng Feng (kaihengfeng) wrote : | # |
Yea I think your solution is better. I didn't know that Glib.MainLoop.run() will block until quit() is called, so I came up with current solution.
I'll update one accordingly.
| Kai-Heng Feng (kaihengfeng) wrote : | # |
It can't receive signals even if it does use connection.


This commit needs [1] to behave correctly.
http:// bazaar. launchpad. net/~unity- settings- daemon- team/unity- settings- daemon/ trunk/revision/ 4147