sunaku / wmiirc

Ruby configuration for WMII window manager
ISC License
82 stars 26 forks source link

Some problems with my spacer barlet #18

Closed nougad closed 13 years ago

nougad commented 13 years ago

Hi,

nice! You take some of my changes. Thanks

But I have to warn you: There are some problems if you take only this commit[1]. I want the spacer between my rbar and the tabs. But if a notification is displayed this space is used by the notification and my spacer for switching tabs is only some pixels in width. Everytime I switch Tags with my wheel and a notification occurs I get an exception because the notify barlet have no mouse action for wheel (perhaps this is fixed, I doesn't test everything with your changes recent changes).

I changed my spacer into the notification barlet. So always the notify barlet is displayed and reacts on mouse actions but only if a notification occurs it shows some text.

So I renamed the barlet[2] and prevent it from removing if it exists in Status-Hash [3]. But I have some problems to get the Button in Notice#display: button = StatusBarlet.new('!notice')

Solution 1: Doesn't add a position number to button filename if name starts with "!" [4]. This will prevent "StatusBarlet.new" to create a new field (without the number) and the existing is used.

Solution 2: Make Status#button accessible so I can use: button = Status['!notice'].button || StatusBarlet.new('!notice')

What do you think? Is this a useful change? Should I make you a pretty commit?

[1] http://github.com/sunaku/wmiirc/commit/88a3d79291e5a2b08c714e4ec6e59d3762346cef

[2] http://github.com/nougad/wmiirc/commit/2faea8b17f489aae73e7628902ff2d190cf7cd61

[3] http://github.com/nougad/wmiirc/commit/39de6a6e98322311df535561e2e4411f6da7548a

[4] http://github.com/nougad/wmiirc/commit/a45fd52260cdda9e29a5164840a4794051ead778

sunaku commented 13 years ago

nougad wrote:

I changed my spacer into the notification barlet. So always the notify barlet is displayed and reacts on mouse actions but only if a notification occurs it shows some text.

I like this approach. Let us remove the spacer applet in favor of always keeping the notify applet on the screen. Then we can add the mouse-wheel hooks to the notify applet as you suggested.

nougad commented 13 years ago

Finally I created a new branch with the changes1. I hope you can merge this easily into master.

sunaku commented 13 years ago

Merged, thank you!