signal khtml->world for on screen keyboards
Joseph Wenninger
jowenn at jowenn.at
Fri Aug 8 15:00:19 BST 2003
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
-------------- next part --------------
? 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 );
More information about the kfm-devel
mailing list