@property
def selectedCallback(self):
index = self._callbackSelector.currentIndex()
- data = str(self._callbackSelector.itemData(index).toPyObject())
+ data = str(self._callbackSelector.itemData(index))
return data
def set_callbacks(self, choices, default):
self._update_letter_count()
self._update_target_fields()
self.set_fullscreen(self._app.fullscreenAction.isChecked())
- self.set_orientation(self._app.orientationAction.isChecked())
+ self.update_orientation(self._app.orientation)
def close(self):
if self._window is None:
except RuntimeError:
_moduleLogger.exception("Oh well")
- def set_orientation(self, isPortrait):
- qwrappers.WindowWrapper.set_orientation(self, isPortrait)
+ def update_orientation(self, orientation):
+ qwrappers.WindowWrapper.update_orientation(self, orientation)
self._scroll_to_bottom()
def _update_letter_count(self):
- count = self._smsEntry.toPlainText().size()
+ count = len(self._smsEntry.toPlainText())
numTexts, numCharInText = divmod(count, self.MAX_CHAR)
numTexts += 1
numCharsLeftInText = self.MAX_CHAR - numCharInText
self._dialButton.setEnabled(False)
self._smsButton.setEnabled(False)
elif self._session.draft.get_num_contacts() == 1:
- count = self._smsEntry.toPlainText().size()
+ count = len(self._smsEntry.toPlainText())
if count == 0:
self._dialButton.setEnabled(True)
self._smsButton.setEnabled(False)
self._smsButton.setEnabled(True)
else:
self._dialButton.setEnabled(False)
- count = self._smsEntry.toPlainText().size()
+ count = len(self._smsEntry.toPlainText())
if count == 0:
self._smsButton.setEnabled(False)
else:
@qt_compat.Slot()
@misc_utils.log_exception(_moduleLogger)
- def _on_window_resized(self, checked = True):
+ def _on_window_resized(self):
with qui_utils.notify_error(self._app.errorLog):
self._scroll_to_bottom()