Opened 12 years ago

Closed 9 years ago

#8156 closed enhancement (fixed)

Installing Workspaces into Deskbar should be easier

Reported by: rq Owned by: axeld
Priority: normal Milestone: R1
Component: Applications/Workspaces Version: R1/Development
Keywords: Cc:
Blocked By: Blocking:
Platform: All

Description

I just figured out today that I actually can install a Workspaces replicant into Deskbar. But it's quite cumbersome: one has to manually resize the Workspaces window and then drag a replicant. I would like to suggest adding a context menu item which would automatically create a replicant of optimum height in the Deskbar.

One possible caveat is that this should probably only be enabled when all workspaces are arranged in a horizontal strip, because Deskbar only accepts replicants up to certain height.

Attachments (3)

Workspaces.patch (3.4 KB ) - added by rq 12 years ago.
Patch adding the "Live in the Deskbar" item to the context menu
workspaces2.patch (5.6 KB ) - added by rq 12 years ago.
Alternative patch, also removes any "About" functionality
workspaces-deskbar-correct-width.patch (1.5 KB ) - added by rq 12 years ago.
Additional patch, which implements smarter calculation of the replicant size.

Download all attachments as: .zip

Change History (20)

by rq, 12 years ago

Attachment: Workspaces.patch added

Patch adding the "Live in the Deskbar" item to the context menu

comment:1 by rq, 12 years ago

patch: 01

comment:2 by rq, 12 years ago

The attached patch adds a "Live in the Deskbar" item to the context menu. It's not ideal though: I hardcoded the size of the deskbar replicant instead of calculating it properly, since I have no idea how to implement it. I'd say idealy its dimentions would be calculated somewhat like this:

Height = 15px
Width = (ScreenWidth / ScreenHeight * numDesktops * 14 + 1) px
(note I multiplied by 14 instead of 15 to account for borders between and around the desktop previews)

Version 0, edited 12 years ago by rq (next)

by rq, 12 years ago

Attachment: workspaces2.patch added

Alternative patch, also removes any "About" functionality

comment:3 by rq, 12 years ago

mmadia suggested that I also get rid of the "About Workspaces" menu item. Second patch does that, but with a little caveat: a replicant will still have this non-functional About menu item.

in reply to:  3 ; comment:4 by mmadia, 12 years ago

Replying to rq:

mmadia suggested that I also get rid of the "About Workspaces" menu item. Second patch does that, but with a little caveat: a replicant will still have this non-functional About menu item.

It's best to move the removal of About Workspaces to a new ticket. Even better to have the patch independant from this ticket's patch.

in reply to:  4 comment:5 by rq, 12 years ago

Replying to mmadia:

It's best to move the removal of About Workspaces to a new ticket. Even better to have the patch independant from this ticket's patch.

These being two separate enhancements is the reason why I didn't mark the first patch as obsolete. The two patches would likely be conflicting though, or depend on each other. In any case, I'm happy to create a separate ticket and a new patch for it once this gets reviewed and approved.

Bare in mind though, that I'm not a skilled coder, so if the patch here will need improvements, it's quite likely that I won't be able to add them.

comment:6 by mmu_man, 12 years ago

Committed a reworked version as hrev43367. I left the about issue out though.

comment:7 by rq, 12 years ago

I've spun off the About issue into #8165.

by rq, 12 years ago

Additional patch, which implements smarter calculation of the replicant size.

comment:8 by mmu_man, 12 years ago

Applied as hrev43430, Thanks. I suppose we can close it now?

comment:9 by rq, 12 years ago

Yep, thank you!

comment:10 by rq, 12 years ago

hm, I see you made another checkin, which decreases both width and height by 1 (hrev43432). Why would you do that? The replicant works correctly without it.

comment:11 by mmu_man, 12 years ago

Because the rect was actually created with 1 more pixel height and width than advertised. If you want 17 as height then use 17. It actually works but it's larger than others like ProcessController. OTOH it looks better with 2-rows workspaces setup but well...

in reply to:  11 comment:12 by rq, 12 years ago

Replying to mmu_man:

Because the rect was actually created with 1 more pixel height and width than advertised. If you want 17 as height then use 17. It actually works but it's larger than others like ProcessController. OTOH it looks better with 2-rows workspaces setup but well...

weird... 1) I was pretty sure that Deskbar would simply not accept replicants higher than 16px. Does it accept them for you? 2) so (0,0,100,16) actually means that the replicant is 17px tall? Is that because the first arguments are zero?

in reply to:  11 ; comment:13 by rq, 12 years ago

Replying to mmu_man:

Because the rect was actually created with 1 more pixel height and width than advertised. If you want 17 as height then use 17. It actually works but it's larger than others like ProcessController. OTOH it looks better with 2-rows workspaces setup but well...

Actually, I think you should probably fix my comment and initial constants too then (to state that a replicant can be 17x130). My goal was to have the replicant as tall as possible, and not exceed width allowed in Deskbar's vertical mode.

Should I attach another followup patch, or can you change the constants yourself?

PS. I have no idea why ProcessController would use a replicant that is 1px smaller than it can be. Perhaps it (and other applications, if any) should be fixed too.

comment:14 by Disreali, 12 years ago

Any progress?

comment:15 by mmadia, 11 years ago

patch: 10

in reply to:  13 comment:16 by mmadia, 11 years ago

Replying to rq:

Replying to mmu_man:

Because the rect was actually created with 1 more pixel height and width than advertised. If you want 17 as height then use 17. It actually works but it's larger than others like ProcessController. OTOH it looks better with 2-rows workspaces setup but well...

Actually, I think you should probably fix my comment and initial constants too then (to state that a replicant can be 17x130). My goal was to have the replicant as tall as possible, and not exceed width allowed in Deskbar's vertical mode.

Should I attach another followup patch, or can you change the constants yourself?

A followup patch would be appreciated -- ideally one that is made with git format-patch. This will give you a better level of recognition for your contribution.  Thanks!

comment:17 by pulkomandy, 9 years ago

Resolution: fixed
Status: newclosed

Nothing to do here, patches were applied already.

Note: See TracTickets for help on using tickets.