! Please note that this is a snapshot of our old Bugzilla server, which is read only since May 29, 2020. Please go to gitlab.xfce.org for our new server !
[PATCH] Toggle the show desktop button when drag a file over there
Status:
RESOLVED: FIXED
Product:
Xfce4-panel
Component:
Show Desktop

Comments

Description Matias De lellis 2019-06-29 03:35:59 CEST
Created attachment 8702 
[PATCH] Toggle the show desktop button when drag a file over there

Hi All,
This is something that I wanted to do a long time ago.
Attached a patch to implement a new behavior to the "show desktop" plugin. The idea is that having many windows open, you can drag a file from thunar, drag it to the plugin to show the desktop, and then drop it on the desktop..

Regards,
Matias
Comment 1 Simon Steinbeiss editbugs 2019-07-03 23:18:39 CEST
Hey, awesome idea - I like the feature!

When testing it a bit I noticed that the 1sec may be a bit ample, but alright.

1) But what I really miss is visual feedback of the hover. I think that would help make this a little more intuitive.
2) The button is easily activated again and the state reverted if one hovers too long over the button. I guess that's an issue with the general design of the plugin (that it's a toggle) and not so easily fixable.

If you could tackle 1) that'd be awesome, I'm happy to merge it in before 4.14 because I feel the plugin should have always been doing this ;)
Comment 2 Matias De lellis 2019-07-04 01:49:12 CEST
Created attachment 8721 
[PATCH] Toggle the show desktop button when drag a file over there. V2
Comment 3 Matias De lellis 2019-07-04 01:49:34 CEST
Hi Simon,

> When testing it a bit I noticed that the 1sec may be a bit ample, but alright.

It gave me the same impression, but it is difficult to establish an adequate value.. Now I did it with 500 ms, in line with the tasklist plugin that have a similar behavior. This seems fast, but at least it's consistent.. 

> 1) But what I really miss is visual feedback of the hover. I think that would help make this a little more intuitive.

Done.. However there is some conflict with the CSS of greybird, testing it with adwaita works.

> 2) The button is easily activated again and the state reverted if one hovers too long over the button. I guess that's an issue with the general design of the plugin (that it's a toggle) and not so easily fixable.

In general I do not like saying this, but it's a feature. haha.
GTK emits drag_motion again when you move the mouse over the widget even if you have not come out on it.

> If you could tackle 1) that'd be awesome, I'm happy to merge it in before 4.14 because I feel the plugin should have always been doing this ;)

Greats,
By the way, congratulations for all the work you are doing in this release. ;)
Comment 4 Matias De lellis 2019-07-04 01:55:13 CEST
p.s: I want to do something similar with xfce4-places-plugin -that opens the menu, and with the open menu, you can activate a bookmark to launch thunar.- but it's a more complicated patch.
Comment 5 Simon Steinbeiss editbugs 2019-07-04 23:18:12 CEST
Ok, this looks good!

The drag highlight missing in Greybird is a theming bug, I'll try to take care of it.

> By the way, congratulations for all the work you are doing in this release. ;)
Thanks! Much appreciated.

And looking forward to your places-menu patch! :)
Comment 6 Git Bot editbugs 2019-07-04 23:41:10 CEST
Matias De lellis referenced this bugreport in commit 120ed6d766b2ada4beda0d96e69a0e18f629e561

show-desktop: Toggle also when DND-ing (Bug #15654)

https://git.xfce.org/xfce/xfce4-panel/commit?id=120ed6d766b2ada4beda0d96e69a0e18f629e561
Comment 7 Simon Steinbeiss editbugs 2019-07-04 23:41:58 CEST
Just FYI, I fixed the indentation to align with the rest of the code.

Bug #15654

Reported by:
Matias De lellis
Reported on: 2019-06-29
Last modified on: 2019-07-04

People

Assignee:
Xfce Bug Triage
CC List:
1 user

Version

Version:
Unspecified

Attachments

Additional information