minor UI layout tweaks

This commit is contained in:
Daniel Pavel 2013-06-29 19:02:19 +02:00
parent c2a549c114
commit 1d305db29e
2 changed files with 7 additions and 5 deletions

View File

@ -16,7 +16,7 @@ try:
from Queue import Queue as _Queue
except ImportError:
from queue import Queue as _Queue
_apply_queue = _Queue(4)
_apply_queue = _Queue(8)
def _process_apply_queue():
def _write_start(sbox):
@ -160,16 +160,17 @@ _items = {}
def create():
global _box
assert _box is None
_box = Gtk.VBox(homogeneous=False, spacing=4)
# _box.set_property('margin', 8)
_box = Gtk.VBox(homogeneous=False, spacing=8)
_box._last_device = None
return _box
def update(device, is_online):
def update(device, is_online=None):
assert _box is not None
assert device
device_id = (device.receiver.path, device.number)
if is_online is None:
is_online = bool(device.online)
# if the device changed since last update, clear the box first
if device_id != _box._last_device:
@ -196,6 +197,7 @@ def update(device, is_online):
_box.set_visible(True)
def clean(device):
"""Remove the controls for a given device serial.
Needed after the device has been unpaired.

View File

@ -135,7 +135,7 @@ def _create_device_panel():
p.pack_start(p._lux, False, False, 0)
p._config = _config_panel.create()
p.pack_end(p._config, False, False, 8)
p.pack_end(p._config, False, False, 4)
return p