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

List:       kde-devel
Subject:    <patch> Support for large history in Klipper
From:       Esben Mose Hansen <kde () mosehansen ! dk>
Date:       2004-10-24 20:42:42
Message-ID: 200410242242.42319.kde () mosehansen ! dk
[Download RAW message or body]

Hi,

Made klipper support large clipboard histories; and quick 
search-while-you-type in the same history. Sort of goes together :)

I have split the patch into three parts, which hopefully makes sense 
individually:

1. Refactor Klipper to use a app-doc-view sort of model (instead of 
toplevel.cpp doing everything.) Instead of maintaining the history inside a 
popupmenu, the history is now maintained independently of the popupmenu. This 
is necessary if (sane) support for large histories.

Get it at: http://www.mosehansen.dk/klipper-history-refactor-2.patch

2. Support for large histories. The popup-menu have gained a more... sub menu. 
When activated, this menu is filled, possibly with a new more menu and so on. 
The limit for the history size has been increased to 2000 items.

Get it at http://www.mosehansen.dk/klipper-large-history-2.patch

3. Support for searching in the clipboard history. If the user types, a line 
edit box appears. This line edit is used as a search string (a regular 
expression). Concurrently, the popupmenu is trimmed to contain only the items 
matching the string. If the expression is invalid, the string turns red, and 
the last valid string is used instead.

Get it at http://www.mosehansen.dk/klipper-history-search-2.patch

The patches must be applied in that order. The entire thing is available as a 
single patch here: http://www.mosehansen.dk/klipper-2.patch.

If anybody wants, I will make an Gentoo ebuild (for overlay) with kdebase 
patched with this patch, for testing, the use of :)

Caveats: 
 - toplevel.cpp was indented partially with 2 spaces and partially with 4 
spaces. Amazingly, XEmacs does not support this style. So I have made some 
whitespace-only changes in the functions I have hacked.:-(
- The search is case sensitive. This should probably be changeable, but I'm 
not sure how, exactly.
 - The actions cannot be reached by typing the letter for obvious reasons. 
Alt-<letter> can be used instead. 
- The documentation is not updated. I will do this if the patch is accepted :)

I hope this patch can be accepted. Please post any changes you feel necessary.

-- 
regards, Esben
 
>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<
[prev in list] [next in list] [prev in thread] [next in thread] 

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