From kfm-devel Fri Aug 08 14:00:19 2003 From: Joseph Wenninger Date: Fri, 08 Aug 2003 14:00:19 +0000 To: kfm-devel Subject: signal khtml->world for on screen keyboards X-MARC-Message: https://marc.info/?l=kfm-devel&m=106035147629196 MIME-Version: 1 Content-Type: multipart/mixed; boundary="--=-hlgqT3DgMl9L4Ai8h/bY" --=-hlgqT3DgMl9L4Ai8h/bY Content-Type: text/plain Content-Transfer-Encoding: 7bit Hi I'm in the need for a signal from khtml, which tells me if it would be usefull to show an on screen keyboard on a mouse/keyboard-less touchscreen terminal. The enclosed patch does that. Would it be possible to add that or something similiar to HEAD ? I think it could be usefull for others which have a similar environment to mine too Kind regards Joseph Wenninger --=-hlgqT3DgMl9L4Ai8h/bY Content-Disposition: attachment; filename=khtmlShowOnScreenKeyboardAction.diff Content-Type: text/plain; name=khtmlShowOnScreenKeyboardAction.diff; charset=ISO-8859-15 Content-Transfer-Encoding: 7bit ? khtmlShowOnScreenKeyboardAction.diff Index: khtml_ext.cpp =================================================================== RCS file: /home/kde/kdelibs/khtml/khtml_ext.cpp,v retrieving revision 1.69 diff -u -3 -p -r1.69 khtml_ext.cpp --- khtml_ext.cpp 25 Jun 2003 22:32:13 -0000 1.69 +++ khtml_ext.cpp 8 Aug 2003 13:55:52 -0000 @@ -81,6 +81,7 @@ void KHTMLPartBrowserExtension::editable m_connectedToClipboard = true; } + showOnScreenKeyboard(); } void KHTMLPartBrowserExtension::editableWidgetBlurred( QWidget *widget ) @@ -111,8 +112,12 @@ void KHTMLPartBrowserExtension::editable void KHTMLPartBrowserExtension::setExtensionProxy( KParts::BrowserExtension *proxy ) { if ( m_extensionProxy ) + { disconnect( m_extensionProxy, SIGNAL( enableAction( const char *, bool ) ), this, SLOT( extensionProxyActionEnabled( const char *, bool ) ) ); + disconnect( m_extensionProxy, SIGNAL( showOnScreenKeyboard() ), + this, SLOT( extensionProxyShowOnScreenKeyboard() ) ); + } m_extensionProxy = proxy; @@ -120,6 +125,8 @@ void KHTMLPartBrowserExtension::setExten { connect( m_extensionProxy, SIGNAL( enableAction( const char *, bool ) ), this, SLOT( extensionProxyActionEnabled( const char *, bool ) ) ); + disconnect( m_extensionProxy, SIGNAL( showOnScreenKeyboard() ), + this, SLOT( extensionProxyShowOnScreenKeyboard() ) ); enableAction( "cut", m_extensionProxy->isActionEnabled( "cut" ) ); enableAction( "copy", m_extensionProxy->isActionEnabled( "copy" ) ); @@ -236,6 +243,10 @@ void KHTMLPartBrowserExtension::updateEd enableAction( "copy", hasSelection ); enableAction( "cut", hasSelection ); +} + +void KHTMLPartBrowserExtension::extensionProxyShowOnScreenKeyboard() { + showOnScreenKeyboard(); } void KHTMLPartBrowserExtension::extensionProxyActionEnabled( const char *action, bool enable ) Index: khtml_ext.h =================================================================== RCS file: /home/kde/kdelibs/khtml/khtml_ext.h,v retrieving revision 1.21 diff -u -3 -p -r1.21 khtml_ext.h --- khtml_ext.h 28 Nov 2002 06:49:20 -0000 1.21 +++ khtml_ext.h 8 Aug 2003 13:55:52 -0000 @@ -46,7 +46,10 @@ public slots: private slots: // connected to a frame's browserextensions enableAction signal void extensionProxyActionEnabled( const char *action, bool enable ); + void extensionProxyShowOnScreenKeyboard(); +signals: + void showOnScreenKeyboard(); private: void callExtensionProxyMethod( const char *method ); --=-hlgqT3DgMl9L4Ai8h/bY--