Correctly read a textbox' ellipsize and wrap properties

The old code used the wrong constants which meant we always returned "word" for
wrap and "end" for ellipsize.

Signed-off-by: Uli Schlachter <psychon@znc.in>
This commit is contained in:
Uli Schlachter 2010-07-30 14:17:27 +02:00
parent ce4088bbf7
commit 8cbfd442a0
1 changed files with 4 additions and 4 deletions

View File

@ -301,10 +301,10 @@ luaA_textbox_index(lua_State *L, awesome_token_t token)
default: default:
lua_pushliteral(L, "word"); lua_pushliteral(L, "word");
break; break;
case A_TK_CHAR: case PANGO_WRAP_CHAR:
lua_pushliteral(L, "char"); lua_pushliteral(L, "char");
break; break;
case A_TK_WORD_CHAR: case PANGO_WRAP_WORD_CHAR:
lua_pushliteral(L, "word_char"); lua_pushliteral(L, "word_char");
break; break;
} }
@ -312,10 +312,10 @@ luaA_textbox_index(lua_State *L, awesome_token_t token)
case A_TK_ELLIPSIZE: case A_TK_ELLIPSIZE:
switch(d->ellip) switch(d->ellip)
{ {
case A_TK_START: case PANGO_ELLIPSIZE_START:
lua_pushliteral(L, "start"); lua_pushliteral(L, "start");
break; break;
case A_TK_MIDDLE: case PANGO_ELLIPSIZE_MIDDLE:
lua_pushliteral(L, "middle"); lua_pushliteral(L, "middle");
break; break;
default: default: