in-place-editing patch for konqueror bookmarks

David Faure faure at kde.org
Wed Jan 15 00:40:00 GMT 2003


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Sunday 29 December 2002 00:16, Oelewapperke wrote:
> hi,
> 
> my name is Christophe Devriese
> 
> I have written a patch to kdelibs to give one the option of right-clicking on
> a bookmark and selecting "delete" (implemented), or "add" (to be added to the
> patch, this one is a proof of concept), etc. This patch works without
> requiring any modifications to konqueror itself.

Why does the patch seem to affect only KBookmarkBar?
That's the "bookmark toolbar", but if all the code is there, then it means this feature
isn't available in the normal bookmark menu....

> I have a number of options to proceed
> -> make kbookmark an abstract class, and force anyone wanting to use it to
> create a subclass, then include the events on them as pure virtuals in the
> abstract class
> 	pro : 	-> this is, imho, the way it should be done

Not IMHO. KBookmark is the _data_ only (a wrapper around QDomElement).
All events and stuff are above it.

> 			-> not binary compatible (but I don't know any app other than konq that
> uses bookmarks)

I think there are. Keeping BC is a no brainer anyway.

> -> add a routine (or signal) to kbookmarkowner à la MouseEvent(QMouseEvent qm,
> KBookmark bm)
> 	pro :		-> "the quick hack", doesn't require changes to any other app (that is
> kdelibs and konq need some changes)
> 			-> one more commit will do it
> 			-> binary compatible
> 			-> I can (but it would be even uglier) avoid making any changes at all to
> konqueror

Changes in konq are fine.

> 	con : 	-> slower
> 			-> not extensible
> 			-> complicated semantics without a very good reason (like having to call
> QPopupMenu::exec and not QPopupMenu::popup)

There are a lot of things in the patch that don't look very clean... e.g.
+ m_toolBar->insertWidget( 0, 25, new KIPEToolBarButton( m_toolBar, bm, m_pOwner ) );
25? Why not 17 or 42? :)

Is the drawButton() stuff really necessary? What do those changes have to do with
the way things are drawn? Can you explain the whole idea?

PS: please post diffs with "cvs diff -b" when they include lots of whitespace changes.
Also, the diff doesn't include the contents of kipebookmarkmenu.h ...

- -- 
David FAURE, faure at kde.org, dfaure at klaralvdalens-datakonsult.se
Contributing to: http://www.konqueror.org/, http://www.koffice.org/
KOffice-1.2.1 is available - http://download.kde.org/stable/koffice-1.2.1/
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.7 (GNU/Linux)

iD8DBQE+JK3g72KcVAmwbhARAqmqAJ9nzexCXiDI6vMFo8/w+E9LUVWP3QCfUqWc
8l9ex0hfh0OcNXo/YCh7org=
=+s1V
-----END PGP SIGNATURE-----





More information about the kde-core-devel mailing list