comparison frontends/src/quick_frontend/quick_widgets.py @ 1321:e9888db0eb0c frontends_multi_profiles

quick frontends (quick widgets): doesn't force anymore "on_new_widget" to None for on_existing_widget=C.WIDGET_RECREATE: the original behaviour for on_new_widget need to be kept
author Goffi <goffi@goffi.org>
date Tue, 10 Feb 2015 19:08:01 +0100
parents 9e904f8a094e
children 1f13a837e4b2
comparison
equal deleted inserted replaced
1320:3012c2f15dae 1321:e9888db0eb0c
193 pass 193 pass
194 else: 194 else:
195 raise ValueError("force_hash option can't be used with on_existing_widget=RECREATE") 195 raise ValueError("force_hash option can't be used with on_existing_widget=RECREATE")
196 196
197 # XXX: keep up-to-date if new special kwargs are added (i.e.: delete these keys here) 197 # XXX: keep up-to-date if new special kwargs are added (i.e.: delete these keys here)
198 new_kwargs['on_new_widget'] = None
199 new_kwargs['on_existing_widget'] = C.WIDGET_RAISE 198 new_kwargs['on_existing_widget'] = C.WIDGET_RAISE
200 hash_idx = 1 199 hash_idx = 1
201 while True: 200 while True:
202 new_kwargs['force_hash'] = "{}_new_instance_{}".format(hash_, hash_idx) 201 new_kwargs['force_hash'] = "{}_new_instance_{}".format(hash_, hash_idx)
203 try: 202 try: