[tag] Make static and remove useless functions
Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
parent
680944d583
commit
1c4acbe38c
44
tag.c
44
tag.c
|
@ -37,6 +37,19 @@
|
||||||
|
|
||||||
extern AwesomeConf globalconf;
|
extern AwesomeConf globalconf;
|
||||||
|
|
||||||
|
/** View or unview a tag.
|
||||||
|
* \param tag the tag
|
||||||
|
* \param view set visible or not
|
||||||
|
*/
|
||||||
|
static void
|
||||||
|
tag_view(tag_t *tag, bool view)
|
||||||
|
{
|
||||||
|
tag->selected = view;
|
||||||
|
ewmh_update_net_current_desktop(screen_virttophys(tag->screen));
|
||||||
|
widget_invalidate_cache(tag->screen, WIDGET_CACHE_TAGS);
|
||||||
|
globalconf.screens[tag->screen].need_arrange = true;
|
||||||
|
}
|
||||||
|
|
||||||
/** Create a new tag. Parameteres values are checked.
|
/** Create a new tag. Parameteres values are checked.
|
||||||
* \param name tag name
|
* \param name tag name
|
||||||
* \param layout layout to use
|
* \param layout layout to use
|
||||||
|
@ -206,24 +219,6 @@ tag_view_only(tag_t *target)
|
||||||
tag_view(tag, tag == target);
|
tag_view(tag, tag == target);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Use an index to set a tag viewable.
|
|
||||||
* \param screen the screen id
|
|
||||||
* \param dindex the index
|
|
||||||
* \param view the view value
|
|
||||||
*/
|
|
||||||
void
|
|
||||||
tag_view_byindex(int screen, int dindex, bool view)
|
|
||||||
{
|
|
||||||
tag_t *tag;
|
|
||||||
|
|
||||||
if(dindex < 0)
|
|
||||||
return;
|
|
||||||
|
|
||||||
for(tag = globalconf.screens[screen].tags; tag && dindex > 0;
|
|
||||||
tag = tag->next, dindex--);
|
|
||||||
tag_view(tag, view);
|
|
||||||
}
|
|
||||||
|
|
||||||
/** View only a tag, selected by its index.
|
/** View only a tag, selected by its index.
|
||||||
* \param screen screen id
|
* \param screen screen id
|
||||||
* \param dindex the index
|
* \param dindex the index
|
||||||
|
@ -241,19 +236,6 @@ tag_view_only_byindex(int screen, int dindex)
|
||||||
tag_view_only(tag);
|
tag_view_only(tag);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** View or unview a tag.
|
|
||||||
* \param tag the tag
|
|
||||||
* \param view set visible or not
|
|
||||||
*/
|
|
||||||
void
|
|
||||||
tag_view(tag_t *tag, bool view)
|
|
||||||
{
|
|
||||||
tag->selected = view;
|
|
||||||
ewmh_update_net_current_desktop(screen_virttophys(tag->screen));
|
|
||||||
widget_invalidate_cache(tag->screen, WIDGET_CACHE_TAGS);
|
|
||||||
globalconf.screens[tag->screen].need_arrange = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
static int
|
static int
|
||||||
luaA_tag_eq(lua_State *L)
|
luaA_tag_eq(lua_State *L)
|
||||||
{
|
{
|
||||||
|
|
2
tag.h
2
tag.h
|
@ -38,8 +38,6 @@ tag_delete(tag_t **tag)
|
||||||
p_delete(tag);
|
p_delete(tag);
|
||||||
}
|
}
|
||||||
|
|
||||||
void tag_view(tag_t *, bool);
|
|
||||||
void tag_view_byindex(int, int, bool);
|
|
||||||
tag_t ** tags_get_current(int);
|
tag_t ** tags_get_current(int);
|
||||||
void tag_client(client_t *, tag_t *);
|
void tag_client(client_t *, tag_t *);
|
||||||
void untag_client(client_t *, tag_t *);
|
void untag_client(client_t *, tag_t *);
|
||||||
|
|
Loading…
Reference in New Issue