Set the text on the status bar to a new value. If permanent is True, the new value will be permanent. If that status bar is in prompt mode, the prompt will be aborted.
(self, s, permanent=False)
| 227 | self.widget.set_focus_column(0) |
| 228 | |
| 229 | def settext(self, s, permanent=False): |
| 230 | """Set the text on the status bar to a new value. If permanent is True, |
| 231 | the new value will be permanent. If that status bar is in prompt mode, |
| 232 | the prompt will be aborted.""" |
| 233 | |
| 234 | self._reset_timer() |
| 235 | |
| 236 | # hide the edit and display the text widget |
| 237 | if self.edit in self.widget.widget_list: |
| 238 | self.widget.widget_list.remove(self.edit) |
| 239 | if self.text not in self.widget.widget_list: |
| 240 | self.widget.widget_list.append(self.text) |
| 241 | |
| 242 | self.text.set_text(("main", s)) |
| 243 | if permanent: |
| 244 | self.s = s |
| 245 | |
| 246 | def clear(self): |
| 247 | """Clear the status bar.""" |
no test coverage detected