From: Ed Page Date: Sun, 10 Apr 2011 03:14:08 +0000 (-0500) Subject: Remove a user step: OSK pops up and have to scroll down to then see what text you... X-Git-Url: http://git.maemo.org/git/?p=gc-dialer;a=commitdiff_plain;h=683365e09c5f84849626c2b94793bd7f9de820f1 Remove a user step: OSK pops up and have to scroll down to then see what text you are entering --- diff --git a/src/dialogs.py b/src/dialogs.py index 71002ce..2feb6a2 100644 --- a/src/dialogs.py +++ b/src/dialogs.py @@ -857,6 +857,7 @@ class SMSEntryWindow(qwrappers.WindowWrapper): self._window.setWindowTitle("Contact") self._window.closed.connect(self._on_close_window) self._window.hidden.connect(self._on_close_window) + self._window.resized.connect(self._on_window_resized) self._scrollTimer = QtCore.QTimer() self._scrollTimer.setInterval(100) @@ -1114,6 +1115,12 @@ class SMSEntryWindow(qwrappers.WindowWrapper): self._update_button_state() @QtCore.pyqtSlot() + @misc_utils.log_exception(_moduleLogger) + def _on_window_resized(self, checked = True): + with qui_utils.notify_error(self._app.errorLog): + self._scroll_to_bottom() + + @QtCore.pyqtSlot() @QtCore.pyqtSlot(bool) @misc_utils.log_exception(_moduleLogger) def _on_close_window(self, checked = True): diff --git a/src/util/qui_utils.py b/src/util/qui_utils.py index ada4567..0e6e768 100644 --- a/src/util/qui_utils.py +++ b/src/util/qui_utils.py @@ -267,6 +267,7 @@ class QSignalingMainWindow(QtGui.QMainWindow): closed = QtCore.pyqtSignal() hidden = QtCore.pyqtSignal() shown = QtCore.pyqtSignal() + resized = QtCore.pyqtSignal() def __init__(self, *args, **kwd): QtGui.QMainWindow.__init__(*((self, )+args), **kwd) @@ -286,6 +287,11 @@ class QSignalingMainWindow(QtGui.QMainWindow): self.shown.emit() return val + def resizeEvent(self, event): + val = QtGui.QMainWindow.resizeEvent(self, event) + self.resized.emit() + return val + def _null_set_stackable(window, isStackable): pass