def _min_sizes_init(self, group): self._m_save = self._edje.size_min_calc() self._min_size_collapsed = self._m_save self._edje.signal_emit("cl,extra,activate", "") edje.message_signal_process() self._m_save_extra = self._edje.size_min_calc() self._edje.signal_emit("cl,extra,deactivate", "") self._min_size = self._min_size_collapsed
def __init__(self, parent, editable_grp, operation_stack_cb, img_new_img_cb=None, img_list_get_cb=None, img_id_get_cb=None, workfile_name_get_cb=None): Wizard.__init__(self, parent) self._parent = parent self._edit_grp = editable_grp self._operation_stack_cb = operation_stack_cb self._new_img_cb = img_new_img_cb self._img_list_get_cb = img_list_get_cb self._img_id_get_cb = img_id_get_cb self._workfile_name_get_cb = workfile_name_get_cb self._part_name = None self._type = None self.page_add("default", "New Part", "Name the new part to be inserted and choose its type.") self._part_name_entry = NameEntry( self, changed_cb=self._name_changed_cb, weight_hints=(evas.EVAS_HINT_EXPAND, 0.0), align_hints=(evas.EVAS_HINT_FILL, evas.EVAS_HINT_FILL)) self.content_add("default", self._part_name_entry) self._part_name_entry.show() self._types_list = TypesList(self, self._type_select) self.content_add("default", self._types_list) self._types_list.show() self._ext_list = ExternalSelector(self, self._default_name_set) self._ext_list.size_hint_weight_set(0.0, 0.0) self.content_add("default", self._ext_list) self._ext_list.show() self.action_add("default", "Cancel", self._cancel, key="Escape") self.action_add("default", "Add", self._sizing_go, key="Return") self.action_disabled_set("default", "Add", True) edje.message_signal_process() self._name_changed = False self.page_add("sizing", "New Part", "Position and size of new part.") self._partsetup = PartSetup(self) self._partsetup.size_hint_weight_set(evas.EVAS_HINT_EXPAND, evas.EVAS_HINT_EXPAND) self._partsetup.size_hint_align_set(evas.EVAS_HINT_FILL, evas.EVAS_HINT_FILL) self._partsetup.show() self.action_add("sizing", "Cancel", self._default_go, key="Escape") self.action_add("sizing", "Add", self._add, key="Return") self.content_add("sizing", self._partsetup) self.goto("default")
def _playback_state_update(self): if not self.parts: return # got to fetch the exact state we're at edje.message_signal_process() p = self.parts.keys()[0] st = self._edit_grp.part_get(p).state_selected_get()[0] time = re_anim_program_time.match(st).group(2) if time: self.state = float(time)
def _default_name_set(self, label): if self._name_changed and self._part_name_entry.entry or not label: self._check_name_and_type() return max_num = 0 for p in self._edit_grp.parts: name = re.match("^%s(\d{2,})$" % label, p) if name: num = int(name.group(1)) if num > max_num: max_num = num self._part_name_entry.entry = label + "%.2d" % (max_num + 1) edje.message_signal_process() self._name_changed = False