Does what Vitor wrote have a chance of being merged? If not, may I suggest
the attached patch which adds increment and decrement functions. I wanted
this for my volume widget so when I increase and decrease the volume I would
have these convenient functions.

On Tue, Apr 12, 2011 at 7:52 AM, Vitor Eiji Justus Sakaguti <
[email protected]> wrote:

> On Sat, Apr 2, 2011 at 2:26 PM, Vitor Eiji Justus Sakaguti
> <[email protected]> wrote:
> > About the "get the value from progress bar" issue, I tried adding the
> > following to
> > /usr/share/awesome/lib/awful/widget/progressbar.lua
> >
> > --- Get the progressbar value.
> > -- @param pbar The progress bar.
> > function get_value(pbar)
> >    return data[pbar].value
> > end
> >
> > But that doesn't work. What am I missing here?
>
> OK, I got it, just had to add this line to the "new" method:
>    pbar["get_value"] = _M["get_value"]
>
> I added it right after the Set methods loop.
>
> Now I can remove that ugly getVolume() workaround I added to the pulse
> widget.
> This was fun :)
>
> --
> To unsubscribe, send mail to [email protected].
>

Attachment: 0001-add-increment-and-decrement-functions.patch
Description: Binary data

Reply via email to