Lines Matching +full:text +full:- +full:edit
1 # Copyright © 2019-2020 Intel Corporation
57 def keypress(self, size: int, key: str) -> typing.Optional[str]:
69 class CommitWidget(urwid.Text):
71 # urwid.Text is normally not interactable, this is required to tell urwid
81 async def apply(self) -> None:
89 async def denominate(self) -> None:
94 async def backport(self) -> None:
99 def keypress(self, size: int, key: str) -> typing.Optional[str]:
111 class FocusAwareEdit(urwid.Edit):
113 """An Edit type that signals when it comes into and leaves focus."""
115 signals = urwid.Edit.signals + ['focus_changed']
121 def render(self, size: typing.Tuple[int], focus: bool = False) -> urwid.Canvas:
138 …feedback_box: typing.List['urwid.Text'] = attr.ib(factory=lambda: urwid.SimpleFocusListWalker([]),…
140 …header: 'urwid.Text' = attr.ib(factory=lambda: urwid.Text('Mesa Stable Picker', align='center'), i…
150 def _get_current_commit(self) -> typing.Optional['core.Commit']:
154 def _change_notes_cb(self) -> None:
161 def _change_notes_focus_cb(self, notes: 'FocusAwareEdit', focus: 'bool') -> 'None':
168 text: str = notes.get_edit_text()
169 if text != commit.notes:
170 asyncio.ensure_future(commit.update_notes(self, text))
172 def _make_body(self) -> 'urwid.Columns':
181 def _make_footer(self) -> 'urwid.Columns':
183 urwid.Text('[U]pdate'),
184 urwid.Text('[Q]uit'),
185 urwid.Text('[C]herry Pick'),
186 urwid.Text('[D]enominate'),
187 urwid.Text('[B]ackport'),
188 urwid.Text('[A]pply additional patch'),
192 def _make_root(self) -> 'RootWidget':
195 def render(self) -> 'WidgetType':
199 def load(self) -> None:
202 async def update(self) -> None:
209 sha = f'{version}-branchpoint'
229 async def feedback(self, text: str) -> None:
230 self.feedback_box.append(urwid.AttrMap(urwid.Text(text), None))
231 latest_item_index = len(self.feedback_box) - 1
234 def remove_commit(self, commit: CommitWidget) -> None:
243 def add(self) -> None:
247 def reset_cb(_) -> None:
250 async def apply_cb(edit: urwid.Edit) -> None: argument
251 text: str = edit.get_edit_text()
253 # In case the text is empty
254 if not text:
257 sha = await core.full_sha(text)
267 q = urwid.Edit("Commit sha\n")
283 def chp_failed(self, commit: 'CommitWidget', err: str) -> None:
286 def reset_cb(_) -> None:
289 t = urwid.Text(textwrap.dedent(f"""
295 cherry-pick (`git cherry-pick --continue`) and select ok."""))