aboutsummaryrefslogtreecommitdiff
path: root/awesompd.lua
diff options
context:
space:
mode:
authorAlexander Yakushev <yakushev.alex@gmail.com>2011-10-23 02:03:05 +0300
committerAlexander Yakushev <yakushev.alex@gmail.com>2011-10-23 02:03:05 +0300
commit25a1b198ae7ad94b020e023b8dc9bfd3e3557785 (patch)
tree9f115fff1c80b7daade5f570b2febad26331de35 /awesompd.lua
parent445e63ee42c5cee54a930139e71d48ce52745b2f (diff)
downloadawesompd-25a1b198ae7ad94b020e023b8dc9bfd3e3557785.tar.gz
awesompd-25a1b198ae7ad94b020e023b8dc9bfd3e3557785.tar.bz2
Improve UTF symbol transformation from Jamendo responses
Awesompd was working with 1 or 2-byte symbols (up to \u7ff). This commit fixes that, allowing UTF symbols up to 4 bytes. Also a change was made to be able to replace on search box with other. It is useful when search crashes (it still happens sometimes) and the searchbox is just hanging there.
Diffstat (limited to 'awesompd.lua')
-rw-r--r--awesompd.lua7
1 files changed, 5 insertions, 2 deletions
diff --git a/awesompd.lua b/awesompd.lua
index 1a1e0aa..f59d77d 100644
--- a/awesompd.lua
+++ b/awesompd.lua
@@ -30,6 +30,7 @@ local beautiful = require('beautiful')
local naughty = naughty
local awful = awful
local format = string.format
+local keygrabber = keygrabber
-- Debug stuff
@@ -921,8 +922,10 @@ end
-- Use it like this:
-- self:display_inputbox("Search music on Jamendo", "Artist", print)
function awesompd:display_inputbox(title_text, prompt_text, hook)
- if self.inputbox then -- Inputbox already exists, do nothing
- return
+ if self.inputbox then -- Inputbox already exists, replace it
+ keygrabber.stop()
+ self.inputbox.screen = nil
+ self.inputbox = nil
end
local width = 200
local height = 30