Ejemplo n.º 1
0
 def __init__(self, store, title='', hide_footer=True):
     self.title = title or self.title
     SearchEditor.__init__(self,
                           store,
                           self.editor_class,
                           interface=self.interface,
                           hide_footer=hide_footer)
Ejemplo n.º 2
0
 def __init__(self,
              store,
              initial_string=None,
              hide_toolbar=False,
              hide_footer=False,
              double_click_confirm=False):
     SearchEditor.__init__(self,
                           store,
                           search_spec=self.search_spec,
                           editor_class=self.editor_class,
                           initial_string=initial_string,
                           hide_toolbar=hide_toolbar,
                           hide_footer=hide_footer,
                           double_click_confirm=double_click_confirm)
 def __init__(self, store, client=None, reuse_store=False):
     """
     :param store: a store
     :param client: If not None, the search will show only call made to
         this client.
     :param reuse_store: When False, a new transaction will be
         created/commited when creating a new call. When True, no transaction
         will be created. In this case, I{store} will be utilized.
     """
     self.store = store
     self.client = client
     self._reuse_store = reuse_store
     SearchEditor.__init__(self, store)
     self.set_edit_button_label(_('Details'), Gtk.STOCK_INFO)
Ejemplo n.º 4
0
    def __init__(self,
                 store,
                 hide_footer=False,
                 hide_toolbar=True,
                 selection_mode=None,
                 search_str=None,
                 search_spec=None,
                 search_query=None,
                 double_click_confirm=True,
                 info_message=None,
                 show_closed_items=False):
        """
        :param store: a store
        :param hide_footer: do I have to hide the dialog footer?
        :param hide_toolbar: do I have to hide the dialog toolbar?
        :param selection_mode: the kiwi list selection mode
        :param search_str: If this search should already filter for some string
        :param double_click_confirm: If double click a item in the list should
            automatically confirm
        :param show_closed_items: if this parameter is True, shows sellable with
            status closed
        """
        if selection_mode is None:
            selection_mode = Gtk.SelectionMode.BROWSE

        self._image_viewer = None
        self._first_search = True
        self._first_search_string = search_str
        self._search_query = search_query
        self._show_closed_items = show_closed_items
        self._delivery_sellable = sysparam.get_object(
            store, 'DELIVERY_SERVICE').sellable

        SearchEditor.__init__(self,
                              store,
                              search_spec=search_spec,
                              editor_class=self.editor_class,
                              hide_footer=hide_footer,
                              hide_toolbar=hide_toolbar,
                              selection_mode=selection_mode,
                              double_click_confirm=double_click_confirm)

        if info_message:
            self.set_message(info_message)

        if search_str:
            self.set_searchbar_search_string(search_str)
            self.search.refresh()
Ejemplo n.º 5
0
 def __init__(self, store, person=None, date=None, reuse_store=False):
     """
     :param store: a store
     :param person: If not None, the search will show only call made to
         this person.
     :param date: If not None, the search will be filtered using this date by
         default
     :param reuse_store: When False, a new store will be
         created/commited when creating a new call. When True, no store
         will be created. In this case, I{store} will be utilized.
     """
     self.store = store
     self.person = person
     self._date = date
     self._reuse_store = reuse_store
     SearchEditor.__init__(self, store)
Ejemplo n.º 6
0
 def __init__(self, store, birth_date=None, **kwargs):
     self._birth_date = birth_date
     self.company_doc_l10n = api.get_l10n_field('company_document')
     self.person_doc_l10n = api.get_l10n_field('person_document')
     SearchEditor.__init__(self, store, **kwargs)
Ejemplo n.º 7
0
 def __init__(self, store, **kwargs):
     self.company_doc_l10n = api.get_l10n_field('company_document')
     SearchEditor.__init__(self, store, **kwargs)
Ejemplo n.º 8
0
 def __init__(self, store):
     SearchEditor.__init__(self, store, hide_footer=True, hide_toolbar=True)
Ejemplo n.º 9
0
 def __init__(self, store):
     SearchEditor.__init__(self, store)
     self.set_details_button_sensitive(False)
     self.hide_new_button()