Beispiel #1
0
 def on_home_button_clicked(self, widget):
     '''
     '''
     bauble.command_handler('home', None)
Beispiel #2
0
        self.add_to_history(text)
        tokens = self.cmd_parser.parseString(text)
        cmd = None
        arg = None
        try:
            cmd = tokens['cmd']
        except KeyError, e:
            pass

        try:
            arg = tokens['arg']
        except KeyError, e:
            logger.debug(e)
            pass

        bauble.command_handler(cmd, arg)

    def on_query_button_clicked(self, widget):
        qb = search.QueryBuilder()
        if qb.start() == gtk.RESPONSE_OK:
            query = qb.get_query()
            self.widgets.main_comboentry.child.set_text(query)
            self.widgets.go_button.emit("clicked")

    def add_to_history(self, text, index=0):
        """
        add text to history, if text is already in the history then set its
        index to index parameter
        """
        if index < 0 or index > self.history_size:
            raise ValueError(
Beispiel #3
0
        self.add_to_history(text)
        tokens = self.cmd_parser.parseString(text)
        cmd = None
        arg = None
        try:
            cmd = tokens['cmd']
        except KeyError, e:
            pass

        try:
            arg = tokens['arg']
        except KeyError, e:
            logger.debug(e)
            pass

        bauble.command_handler(cmd, arg)

    def on_query_button_clicked(self, widget):
        qb = search.QueryBuilder()
        if qb.start() == gtk.RESPONSE_OK:
            query = qb.get_query()
            self.widgets.main_comboentry.child.set_text(query)
            self.widgets.go_button.emit("clicked")

    def add_to_history(self, text, index=0):
        """
        add text to history, if text is already in the history then set its
        index to index parameter
        """
        if index < 0 or index > self.history_size:
            raise ValueError(_('history size must be greater than zero and '
Beispiel #4
0
 def on_home_button_clicked(self, widget):
     '''
     '''
     bauble.command_handler('home', None)