Here is an implementation of KDE FormUrl. The patch should apply
maybe with a little fuzz, the other files go in the obvious places.
I have some design queries and comments.
1) As I pointed out, layout isn't handled by kdlgedit. So this
doesn't use it. Is this OK ?
2) The source is split into two files, FormUrl implementation, and
the Qt FormUrlDialog. FormUrl needs to set/get widget properties,
and FormUrlDialog needs to apply and close (for "OK","Cancel"
and WM Close). So I made the relevant methods public. A better way ?
should they be friends instead ?
3) moc only needs to be run on formurldialog as it should be. However
this means I needed "gate" slots in formurldialog to Qt::connect with,
which then call the relevant FormUrl methods. OK ?
4) I wasn't sure about using ButtonPolicies as i've not examined that code
yet (STL still looks like line noise to me i'm afraid :()
5) I think that some of xforms/gtk update() and apply() are incorrect.
Consider :
b) open read-write document A
a) open readonly document B
c) click on a URL in B, readonly dialog opens up
d) switch to A
e) now updateBufferDependent calls our slot.
f) this slot should set ro/rw parameters of the dialog
as per the current inset being edited (if any), NOT
the isReadOnly of lv_->buffer().
The solution is to store on showInset()/createInset() a readonly bool.
Both gnome/ and xforms/ frontends need this fix in multiple files ...
Changelog:
2000-08-16 John Levon ([EMAIL PROTECTED])
* src/frontends/kde/Makefile.am:
* src/frontends/kde/FormUrl.C:
* src/frontends/kde/FormUrl.h:
* src/frontends/kde/formurldialog.h:
* src/frontends/kde/formurldialog.C: Add KDE URL dialog
Comments/flames ?
thanks
john
p.s.
I noticed that LyXAction is complaining :
LyXAction::funcHasFlag: No info about kb_action: 251
about LFUN_INSET_URL; but this was last friday's CVS
formurl.tar.gz