[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kfm-devel
Subject:    Re: khtml/khtmlw and getSelected()/getSelectedText()
From:       Waldo Bastian <bastian () ens ! ascom ! ch>
Date:       1999-06-16 9:23:22
[Download RAW message or body]

Dawit Alemayehu wrote:
> 
> Hello all,
> 
> How can I tell the difference between URL's being selected and just normal text
> being selected on a web page ?  The reason I ask this is because a text selected
> signal is emitted everytime a URL is selected.  This causes both getSelected()
> and getSelectedText() to return values.  Shouldn't the URLSelected() and TextSelected()
> events be separated so that each one can be trapped to decide which is what ??
> 
> Also a text selected signal is not emitted when a call is made to setSelectedText() in
> the HTMLwidget.  I was trying to fix the problem of selecting everything when
> viewing a web page in kfm when the user selects Edit->Select All ( CTRL-A ).

I had a look at this the other day. The problem seems to be that select() isn't
working correctly for HTMLText objects. You might have noted that Ctrl-A does
select all other objects (e.g. images, links) on a page.

I think that we should add a select(...) method to HTMLText which takes into
account the selStart and selEnd fields of the HTMLText object. 

The text-selected signal is only used to indicate the user has selected any text.
It might indeed be usefull to emit this signal in the select() call used for
"Select All" as well.

The text-selected signal is normally emitted on a mouseButtonUp (or whatever it
is called) event.

You might want to inhibit text-selection once an URL has been selected.

Cheers,
Waldo
-- 
KDE, A New Millenium, A New Desktop                      http://www.kde.org

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic