Commit Graph

112 Commits

Author SHA1 Message Date
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
Julien Danjou f2872190d5 naughty: remove score system, merge presets
Scoring is broken, it's more useful to merge all presets, and declares that
order matters.
2011-12-27 11:24:35 +01:00
Majic 75ad861c7a Private naughty.getIcon() -> public awful.util.geticonpath()
Signed-off-by: Uli Schlachter <psychon@znc.in>
2011-11-01 19:45:17 +01:00
Julien Danjou c1d0dee20d naughty: fix image data copy
Signed-off-by: Julien Danjou <julien@danjou.info>
2011-10-04 15:23:27 +02: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 f3f01b82d9 naughty: Fix replaces_id
Replacing a popup only worked when it wasn't the newest notification we had. Fix
this to also work if no new notification showed up in between.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2011-09-07 21:41:47 +02:00
Anurag Priyam d9e4c1e866 naughty: add helper function, toggle() - suspend/resume notifications
Signed-off-by: Anurag Priyam <anurag08priyam@gmail.com>
Signed-off-by: Uli Schlachter <psychon@znc.in>
2011-07-24 19:31:18 +02:00
Radu Andries 97709a4b3e naughty: escape title too
Signed-off-by: Uli Schlachter <psychon@znc.in>
2011-05-01 15:20:56 +02:00
dodo b530da1861 add set_font to wibox.widget.textbox
Signed-off-by: Uli Schlachter <psychon@znc.in>
2011-04-14 22:37:44 +02:00
Uli Schlachter ca5337e731 naughty: Fix for removal of screen property
Signed-off-by: Uli Schlachter <psychon@znc.in>
2011-03-27 16:36:01 +02:00
André Aparício 3b0a20ca3b Fix default naughty preset for dbus notifications
Signed-off-by: Uli Schlachter <psychon@znc.in>
2011-02-03 18:08:04 +01:00
jpike 4972a280b0 Add naughty.config.notify_callback
This optional callback can be used for filtering and/or editing
notifications.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2011-01-28 21:05:09 +01:00
Uli Schlachter 78a1788c6f Fix a stupid typo, sorry
Signed-off-by: Uli Schlachter <psychon@znc.in>
2011-01-14 19:06:54 +01:00
Uli Schlachter ecb8376c44 naughty: Try ignoring all markup before giving up
naughty now tries to ignore all pango markup by using :set_text() instead of
:set_markup(). If this fails, too, we must have been fed invalid utf8 which we
cannot do anything about.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2011-01-14 16:16:04 +01:00
Uli Schlachter ec72ee1b43 Fix naughty
I removed textbox' check() function, but forgot to see if anything actually
calls it. Just removing the call fixes all problems here.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2011-01-14 16:12:05 +01:00
Radu Andries 66aa5beaf7 Improve naughty's dbus interface
Evil spec from galago project.
image_data should be read too as in http://www.galago-project.org/specs/notification/0.9/x344.html

Signed-off-by: Uli Schlachter <psychon@znc.in>
2010-12-10 17:20:47 +01:00
Matthias e75186701e Fixed oocairo.image_surface_create_... typo
its oocairo.image_surface_create_from_data not oocairo.image.surface...

Signed-off-by: Matthias <ms@softimpulse.de>
Signed-off-by: Uli Schlachter <psychon@znc.in>
2010-11-12 17:13:33 +01:00
Uli Schlachter 38d4602425 margin: Accept individual margins
Signed-off-by: Uli Schlachter <psychon@znc.in>
2010-10-08 17:22:00 +02:00
Uli Schlachter 52e678a8c7 Naughty: Port to new widget system
Signed-off-by: Uli Schlachter <psychon@znc.in>
2010-10-06 14:19:20 +02:00
Uli Schlachter f4d37f74d3 naughty: Use oocairo instead of image
Signed-off-by: Uli Schlachter <psychon@znc.in>
2010-09-29 16:15:11 +02:00
Uli Schlachter 51068f5cdf naughty: Set the window type to "notification"
Signed-off-by: Uli Schlachter <psychon@znc.in>
2010-09-28 13:14:27 +02:00
Uli Schlachter 825efd21b3 Naughty: Add a missing "local"
Signed-off-by: Uli Schlachter <psychon@znc.in>
2010-09-18 16:34:31 +02:00
Julien Danjou 6d332f07a0 lua{class,object}: rename signals functions
I knew this was wrong at the beginning, f*ck.

Signed-off-by: Julien Danjou <julien@danjou.info>
2010-08-25 20:28:20 +02:00
Uli Schlachter fae5dfcd08 Naughty: Handle invalid UTF-8 more sanely
Previously, if setting the textbox's text failed this caused more problems later
on. This commit makes sure that an invalid text never breaks pango.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2010-08-06 19:53:34 +02:00
Uli Schlachter 6fa27c7b48 Naughty: Catch invalid markup in notifications
Previously, an invalid markup caused an empty popup. Since the C core now throws
a lua error on invalid markup, we have a way to notice that something is wrong.

This patch first tries to set the notification's text the same way we did
previously. If that fails, everything is escaped and the result is used as the
text for the notification.

Thanks to farhaven/Gregor Best for the initial version of this and for the
string.gsub() call I stole from him. :)

Signed-off-by: Uli Schlachter <psychon@znc.in>
2010-07-16 19:35:51 +02:00
Julien Danjou e0c259406e naughty: return nothing, not nil
This is not a valid return value for a D-Bus method.

Signed-off-by: Julien Danjou <julien@danjou.info>
2010-06-06 10:39:16 +02:00
Gregor Best b04a75c697 naughty: add suspend() and resume()
This commit adds naughty.suspend() and naughy.resume() which allow
suspension of notifications, which is useful e.g. when watching a movie,
where notifications popping up all the time would be disturbing.

While suspended, notifications are collected and displayed after
naughty.resume() is called.

Signed-off-by: Gregor Best <gbe@ring0.de>
Signed-off-by: Julien Danjou <julien@danjou.info>
2010-02-17 16:23:47 +01:00
Andrei 'Garoth' Thorp 11963175bc Fix naughty.destroy parameter documentation
Signed-off-by: Julien Danjou <julien@danjou.info>
2010-02-17 16:23:47 +01:00
Uli Schlachter 8857f73ce6 Implement the GetCapabilities call in naughty
This call is required by the freedesktop specification.

Signed-off-by: Uli Schlachter <psychon@znc.in>
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-12-28 10:41:57 +01:00
Robert Lehmann fcee5fb828 naughty: fix CloseNotification argument usage
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-12-01 14:13:52 +01:00
Julien Danjou f3509f745a naughty: convert <br> tag to \n
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-11-06 12:45:46 +01:00
Lukas Hrazky f2800d96fd naughty: update to new widget layouts
Signed-off-by: Lukas Hrazky <lukkash@email.cz>
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-10-27 09:34:29 +01:00
dmitriy 9a9c3d12d7 naughty: upgrade to notification spec 1.0 (FS#652)
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-10-07 19:57:01 +02:00
koniu 105a4ce41f naughty: fix margin when using icon
Signed-off-by: koniu <gkusnierz@gmail.com>
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-08-26 09:14:57 +02:00
koniu 58eb27a99b naughty: port sizing to the new widget margin code
Signed-off-by: koniu <gkusnierz@gmail.com>
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-08-25 19:17:18 +02:00
koniu 194f6b2050 naughty: fix hover_timeout
Fixes regression since e899ca7696.

Signed-off-by: koniu <gkusnierz@gmail.com>
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-08-25 09:48:44 +02:00
Julien Danjou 2fda9f5a2e naughty: fix timeout = 0
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-08-21 15:30:48 +02:00
Julien Danjou d6fd7f1116 awful.wibox: update strut on wibox attachement
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-08-21 15:30:48 +02:00
Julien Danjou 85b3dedb60 naughty: remove useless hooks
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-08-21 15:30:47 +02:00
Julien Danjou 9c40168f02 widget: emit signals on mouse enter and leave
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-08-21 15:30:47 +02:00
Julien Danjou e899ca7696 naughty: use timer
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-08-17 17:50:04 +02:00
Julien Danjou 073e0377dd Revert "key, button: use as simple table"
This reverts commit d7454f4307.

Conflicts:

	button.h
	key.h
	lib/awful/titlebar.lua.in
	lib/naughty.lua.in
	wibox.c
	wibox.h
	widget.c
2009-08-14 16:48:52 +02:00
koniu cebf7bc762 naughty: fix size/position messup on arrange
Signed-off-by: koniu <gkusnierz@gmail.com>
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-08-08 13:09:03 +02:00
Julien Danjou ec5ae3dfb8 imagebox: remove valign
This is not used anymore in rendering.

Signed-off-by: Julien Danjou <julien@danjou.info>
2009-08-04 14:31:21 +02:00
Julien Danjou 299bc00286 dbus: move to signal
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-07-29 16:10:29 +02:00
Uli Schlachter 51dc458fb9 Naughty: Remove some code duplication
2b69d333f8 added some code duplication here. I guess this was a
mis-rebase or something like that. Anyway, the width and height of the wibox is
already calculated right before this code snippet and the existing calculation
is even correct (now that the calculation for a wibox' geometry with
border_width was fixed up).

Tested via notify-send with and without icon.

Signed-off-by: Uli Schlachter <psychon@znc.in>
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-07-29 15:19:48 +02:00
Uli Schlachter 1de7fdfe60 Naughty: Fix the text margin
No idea where this comes from or why it worked before, but it's obviously wrong.

Signed-off-by: Uli Schlachter <psychon@znc.in>
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-07-29 15:19:44 +02:00
Julien Danjou d7454f4307 key, button: use as simple table
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-07-28 10:44:54 +02:00
Gregor Best 2b69d333f8 naughty: add support for widget layouts
Signed-off-by: Gregor Best <farhaven@googlemail.com>
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-07-17 16:46:53 +02:00