[patch] Switch opened files

M Breugelmans mbr.nxi at gmail.com
Thu Oct 16 15:34:03 UTC 2008


On Sun, Oct 12, 2008 at 3:35 PM, David Nolden <zwabel at googlemail.com> wrote:
> Am Sonntag, 12. Oktober 2008 15:24:37 schrieb Vladimir Prus:
>> On Sunday 12 October 2008 17:08:48 M Breugelmans wrote:
>> > Currently it is a pain to switch between opened files. I use the
>> > project wide quick-open all the time, which kind of defeats the idea
>> > behind tracking which files have been opened. Attached is a fix. It
>> > uses the quick open framework but limits items to open files.
>> >
>> > When would you use this instead of project wide?
>> >
>> > (a) the file you want to switch to does not belong to a project
>> > (b) name of the file temporarily slips your mind but you know it's opened
>> > (c) fewer keystrokes to get to the right file, especially true for
>> > partially or fully identical names (eg 'config')
>> >
>> > Any objections against this? I don't think it's feature creep for the
>> > reasons mentioned above, plus it doesn't add any new UI which is good.
>> > More importantly quick-open scales extremely well.
>>
>> Why don't we have a single command to switch to a file, with already opened
>> files shown at the top, and all files in the project below them? This way,
>> you don't have to remember if the file you need is opened or not.
>>
>> - Volodya
>
> Yeah right that would probably be even better, because it would be just one
> shortcut for both.
>
> @Manuel: To achieve that, you just need to add the data-provider you wrote to
> the normal list of data-providers for files, enable it by default, make sure
> it's at the top of the list, and give other icons and maybe a text
> like "Currently open, last edited at ..." as htmlDescription to the items.
>

The attached version implements this suggestion and fixes a couple of
bugs in quickopenmodel. Most are minor with the exception of a wrong
index for the cache update in getItems. Open files now have an
'emblem-important' icon. Do change it if you feel like anything else
fits better ;)


Manuel
-------------- next part --------------
A non-text attachment was scrubbed...
Name: quickOpenCurrentFiles2.patch
Type: text/x-patch
Size: 9551 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20081016/40fdcc94/attachment.patch>


More information about the KDevelop-devel mailing list