It would be great to be able to click on the desktop, and then use type-ahead find to select files which exist on the desktop, similar to what other desktops do, and similar to what is done in Thunar. Currently: 1. click desktop, 2. Start typing the name of a file which exists on the desktop, 2a. Observe that the typing has no effect on which file is selected. Desired use case: 1. Click desktop, 2. Start typing the name of a file which exists on the desktop, 2a. Observe the selected file moves to match the characters typed. Thanks!
Confirmed and annoying in 4.10.2-3
Still happening on Ubuntu Studio 14.10.
Created attachment 9458 feature implementation Here's what I've managed to implement in my spare time. Type-ahead find for Desktop icons. 1. Click on desktop, 2. Press a letter key, 3. Observe the selection of an icon matched by the typed key, 3a. On pressing the same key select the next matched icon. It supports utf8 labels. Future enhancement may be to track down delay of input and thus several types could be treated as a whole name.
Created attachment 9461 did some cosmetics Thanks alot for that patch, works very well for me ! Regarding the code: I simplified the logic in "xfdesktop_icon_view_type_ahead_find_icon" a bit and made it more readable by using a variable .. fine for you like that ? And I shortened the commit message + added a link to the bug Apart from these cosmetics, from my POV, it's fine to get pushed.
Great, now it's clearer. It seems OK to me.
Boris Astardzhiev referenced this bugreport in commit 27254aae7fe6b1311497001e1c2c4fc8076823b6 Added type-ahead find for Desktop icons (Bug #11149) https://git.xfce.org/xfce/xfdesktop/commit?id=27254aae7fe6b1311497001e1c2c4fc8076823b6
Just pushed it to master, will be available in xfdesktop 4.15 / 4.16 Thanks alot for your contribuition !
Nice Alex, I hope that others will also benefit. Regards.
Nice feature! I noticed that pressing ctrl+c may highlight a different file afterwards (if one starting with C is present). https://git.xfce.org/xfce/xfdesktop/tree/src/xfdesktop-file-icon-manager.c#n2590
(In reply to Theo Linkspfeifer from comment #9) > Nice feature! > > > I noticed that pressing ctrl+c may highlight a different file afterwards (if > one starting with C is present). > > https://git.xfce.org/xfce/xfdesktop/tree/src/xfdesktop-file-icon-manager. > c#n2590 Uh, good point. Probably we should only go for "Type-ahead find" if GTK_SHIFT_MASK and GTK_CONTROL_MASK are disabled
Created attachment 9464 ignore combo/modifier keys Ignore all modifier key events in type-ahead find icons as noted by Theo Linkspfeifer
Created attachment 9465 ignore a set of combo/modifier keys It seems that ignoring all modifier events is not a good idea. For example if Numlock is pressed feature doesn't work since evt->state has GDK_MOD2_MASK set. It's because on my desktop: xmodmap: up to 4 keys per modifier, (keycodes in parentheses): shift Shift_L (0x32), Shift_R (0x3e) lock Caps_Lock (0x42) control Control_L (0x25), Control_R (0x69) mod1 Alt_L (0x40), Alt_R (0x6c), Meta_L (0xcd) mod2 Num_Lock (0x4d) mod3 mod4 Super_L (0x85), Super_R (0x86), Super_L (0xce), Hyper_L (0xcf) mod5 ISO_Level3_Shift (0x5c), Mode_switch (0xcb) I'm posting another patch as Alex suggested to only ignore SHIFT and CTRL. Yet I added GDK_SUPER_MASK, GDK_HYPER_MASK, GDK_META_MASK to the list. I hope it's better now. If you have any precaution against SUPER,HYPER,META give some feedback. Regards
Thanks for the modifier patch ! A possible way to prevent Numlock (and CapsLock) while still checking for all other valid modifiers could be to use gtk_accelerator_get_default_mod_mask() .. though I did not have time to take a try so far. Here more info on it: https://developer.gnome.org/gtk3/stable/checklist-modifiers.html
Created attachment 9466 ignore a set of combo/modifier keys2 You're right Alex. Consider the following patch. On my setup gtk_accelerator_get_default_mod_mask() returns 0x1c00000d. This would be: GDK_SHIFT_MASK GDK_CONTROL_MASK GDK_MOD1_MASK (which I missed with previous patch) GDK_SUPER_MASK GDK_HYPER_MASK GDK_META_MASK Numlock and Caplock are OK now. Regards
Boris Astardzhiev referenced this bugreport in commit 6f85effe2336e4514d41f49ec53df168bca0132d Ignore modifier key events in type-ahead find (Bug #11149) https://git.xfce.org/xfce/xfdesktop/commit?id=6f85effe2336e4514d41f49ec53df168bca0132d
Thanks alot, seems to work fine now! I just used the correct return type for gtk_accelerator_get_default_mod_mask() and shortened the commit message a bit.
Great and thanks for the prompt review. Regards.
*** Bug 16843 has been marked as a duplicate of this bug. ***