Commit Graph

9 Commits

Author SHA1 Message Date
Uli Schlachter b7eb233aee imagebox: Use a different entry for saving the image
In 3.4, an imagebox' image is set via "box.image = foo". Since widgets are just
ordinary tables in 3.5, this will actually mess with the imagebox' image without
setting it correctly.

Fix this by renaming the entry to "_image".

A similar patch was applied to the textbox widget ages ago.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2012-11-27 17:24:54 +01:00
Uli Schlachter fa6d996c41 widgets: Add some constructor arguments
This saves space when constructing widgets, because some common cases can now be
done in a single line of code.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2012-11-25 19:16:31 +01:00
Uli Schlachter 90f7f55348 wibox: Make the functions a little more object-y
This replaces lots of function foo.bar(this, ...) with function foo:bar(...).
There should be no other changes in this commit.

The point is to make it easier for api documentation tools to figure out that
these are methods on objects.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2012-11-18 20:44:03 +01:00
Arvydas Sidorenko f73e0b44c0 Ported wibox.widget to lua 5.2
Tested with 5.1: all good

Signed-off-by: Arvydas Sidorenko <asido4@gmail.com>
2012-06-16 17:37:30 +02:00
Uli Schlachter 4f30dfd198 Switch from oocairo to lgi.cairo
Signed-off-by: Uli Schlachter <psychon@znc.in>
2012-05-27 19:20:34 +02:00
Arvydas Sidorenko e052bd99b0 oocairo.image_surface_create_from_png TO awesome.load_image
Replaced all references to image_surface_create_from_png to
awesome.load_image

Signed-off-by: Arvydas Sidorenko <asido4@gmail.com>
Signed-off-by: Uli Schlachter <psychon@znc.in>
2012-01-29 16:18:18 +01:00
Gregor Best c2ea920ca0 remove encoding=utf-8 from modelines
This option is no longer valid in modelines, so it has been removed from
all modelines using the following shellscript:

    #!/bin/ksh

    git ls-tree -r HEAD | cut -f2 | while read f; do
        egrep -e '^(//|--) vim: .*encoding=' $f >/dev/null || continue
        sed -E -e '/^(\/\/|--) vim:/s/:encoding=utf-8//' $f > /tmp/foo
        mv /tmp/foo $f
    done

Signed-off-by: Gregor Best <gbe@ring0.de>
Signed-off-by: Uli Schlachter <psychon@znc.in>
2011-09-11 17:34:09 +02:00
Uli Schlachter 01e6e2a07b imagebox: Refuse invalid images
This makes the imagebox widget refuse images which have a zero or negative width
or height. A zero size causes problems where a division by zero results in inf
which makes various stuff fail in weird ways later on.

Additionally, cairo's "error surfaces" have a negative size. Displaying those
would cause all sorts of weird problems, too, so we better reject those.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2011-03-04 22:03:42 +01:00
Uli Schlachter 2eae7e5cf4 Import lib/wibox/, a new widget system in lua
Signed-off-by: Uli Schlachter <psychon@znc.in>
2010-10-06 12:42:56 +02:00