rename TagClientLink to tag_client_node_t

This commit is contained in:
Julien Danjou 2008-01-13 15:29:46 +01:00
parent 6fc766a847
commit f700e483d6
2 changed files with 12 additions and 12 deletions

View File

@ -234,16 +234,16 @@ struct Tag
DO_SLIST(Tag, tag, p_delete);
/** TagClientLink type */
typedef struct TagClientLink TagClientLink;
struct TagClientLink
/** tag_client_node type */
typedef struct tag_client_node_t tag_client_node_t;
struct tag_client_node_t
{
Tag *tag;
Client *client;
TagClientLink *next;
tag_client_node_t *next;
};
DO_SLIST(TagClientLink, tcl, p_delete);
DO_SLIST(tag_client_node_t, tag_client_node, p_delete);
/** Padding type */
typedef struct
@ -330,7 +330,7 @@ struct AwesomeConf
/** Selected clients history */
client_node_t *focus;
/** Link between tags and clients */
TagClientLink *tclink;
tag_client_node_t *tclink;
/** Command line passed to awesome */
char *argv;
};

12
tag.c
View File

@ -35,16 +35,16 @@ extern AwesomeConf globalconf;
void
tag_client(Client *c, Tag *t)
{
TagClientLink *tc;
tag_client_node_t *tc;
/* don't tag twice */
if(is_client_tagged(c, t))
return;
tc = p_new(TagClientLink, 1);
tc = p_new(tag_client_node_t, 1);
tc->client = c;
tc->tag = t;
tcl_list_push(&globalconf.tclink, tc);
tag_client_node_list_push(&globalconf.tclink, tc);
widget_invalidate_cache(c->screen, WIDGET_CACHE_CLIENTS);
}
@ -52,12 +52,12 @@ tag_client(Client *c, Tag *t)
void
untag_client(Client *c, Tag *t)
{
TagClientLink *tc;
tag_client_node_t *tc;
for(tc = globalconf.tclink; tc; tc = tc->next)
if(tc->client == c && tc->tag == t)
{
tcl_list_detach(&globalconf.tclink, tc);
tag_client_node_list_detach(&globalconf.tclink, tc);
p_delete(&tc);
break;
}
@ -68,7 +68,7 @@ untag_client(Client *c, Tag *t)
Bool
is_client_tagged(Client *c, Tag *t)
{
TagClientLink *tc;
tag_client_node_t *tc;
if(!c)
return False;