rename get_current_tags to tags_get_current()

This commit is contained in:
Julien Danjou 2008-01-29 08:31:13 +01:00
parent 3d66b0c7d0
commit d9298f6edb
9 changed files with 17 additions and 17 deletions

View File

@ -799,7 +799,7 @@ uicb_client_moveresize(int screen, char *arg)
Window dummy; Window dummy;
Area area; Area area;
Client *sel = globalconf.focus->client; Client *sel = globalconf.focus->client;
Tag **curtags = get_current_tags(screen); Tag **curtags = tags_get_current(screen);
if(curtags[0]->layout->arrange != layout_floating) if(curtags[0]->layout->arrange != layout_floating)
if(!sel || !sel->isfloating || sel->isfixed || !arg) if(!sel || !sel->isfloating || sel->isfixed || !arg)

2
ewmh.c
View File

@ -183,7 +183,7 @@ void
ewmh_update_net_current_desktop(int phys_screen) ewmh_update_net_current_desktop(int phys_screen)
{ {
CARD32 count = 0; CARD32 count = 0;
Tag *tag, **curtags = get_current_tags(phys_screen); Tag *tag, **curtags = tags_get_current(phys_screen);
for(tag = globalconf.screens[phys_screen].tags; tag != curtags[0]; tag = tag->next) for(tag = globalconf.screens[phys_screen].tags; tag != curtags[0]; tag = tag->next)
count++; count++;

View File

@ -91,7 +91,7 @@ focus_get_latest_client_for_tags(Tag **t, int nindex)
Client * Client *
focus_get_current_client(int screen) focus_get_current_client(int screen)
{ {
Tag **curtags = get_current_tags(screen); Tag **curtags = tags_get_current(screen);
Client *sel = focus_get_latest_client_for_tags(curtags, 0); Client *sel = focus_get_latest_client_for_tags(curtags, 0);
p_delete(&curtags); p_delete(&curtags);
@ -116,7 +116,7 @@ uicb_focus_history(int screen, char *arg)
if(i < 0) if(i < 0)
{ {
curtags = get_current_tags(screen); curtags = tags_get_current(screen);
c = focus_get_latest_client_for_tags(curtags, i); c = focus_get_latest_client_for_tags(curtags, i);
p_delete(&curtags); p_delete(&curtags);
if(c) if(c)
@ -133,7 +133,7 @@ uicb_focus_client_byname(int screen, char *arg)
if(arg) if(arg)
{ {
curtags = get_current_tags(screen); curtags = tags_get_current(screen);
if((c = client_get_byname(globalconf.clients, arg))) if((c = client_get_byname(globalconf.clients, arg)))
for(tag = curtags; *tag; tag++) for(tag = curtags; *tag; tag++)
if(is_client_tagged(c, *tag)) if(is_client_tagged(c, *tag))

View File

@ -108,7 +108,7 @@ layout_refresh(void)
Layout * Layout *
get_current_layout(int screen) get_current_layout(int screen)
{ {
Tag **curtags = get_current_tags(screen); Tag **curtags = tags_get_current(screen);
Layout *l = curtags[0]->layout; Layout *l = curtags[0]->layout;
p_delete(&curtags); p_delete(&curtags);
return l; return l;
@ -172,7 +172,7 @@ uicb_tag_setlayout(int screen, char *arg)
if(arg) if(arg)
{ {
curtags = get_current_tags(screen); curtags = tags_get_current(screen);
for(i = 0; l && l != curtags[0]->layout; i++, l = l->next); for(i = 0; l && l != curtags[0]->layout; i++, l = l->next);
p_delete(&curtags); p_delete(&curtags);

View File

@ -34,7 +34,7 @@ extern AwesomeConf globalconf;
void void
uicb_tag_setnmaster(int screen, char * arg) uicb_tag_setnmaster(int screen, char * arg)
{ {
Tag **curtags = get_current_tags(screen); Tag **curtags = tags_get_current(screen);
Layout *curlay = curtags[0]->layout; Layout *curlay = curtags[0]->layout;
if(!arg || (curlay->arrange != layout_tile if(!arg || (curlay->arrange != layout_tile
@ -54,7 +54,7 @@ uicb_tag_setnmaster(int screen, char * arg)
void void
uicb_tag_setncol(int screen, char * arg) uicb_tag_setncol(int screen, char * arg)
{ {
Tag **curtags = get_current_tags(screen); Tag **curtags = tags_get_current(screen);
Layout *curlay = curtags[0]->layout; Layout *curlay = curtags[0]->layout;
if(!arg || (curlay->arrange != layout_tile if(!arg || (curlay->arrange != layout_tile
@ -75,7 +75,7 @@ void
uicb_tag_setmwfact(int screen, char *arg) uicb_tag_setmwfact(int screen, char *arg)
{ {
char *newarg; char *newarg;
Tag **curtags = get_current_tags(screen); Tag **curtags = tags_get_current(screen);
Layout *curlay = curtags[0]->layout; Layout *curlay = curtags[0]->layout;
if(!arg || (curlay->arrange != layout_tile if(!arg || (curlay->arrange != layout_tile
@ -114,7 +114,7 @@ _tile(int screen, const Position position)
int real_ncol = 1, win_by_col = 1, current_col = 0; int real_ncol = 1, win_by_col = 1, current_col = 0;
Area area, geometry; Area area, geometry;
Client *c; Client *c;
Tag **curtags = get_current_tags(screen); Tag **curtags = tags_get_current(screen);
area = get_screen_area(screen, area = get_screen_area(screen,
globalconf.screens[screen].statusbar, globalconf.screens[screen].statusbar,

View File

@ -151,7 +151,7 @@ uicb_client_resizemouse(int screen, char *arg __attribute__ ((unused)))
int ocx = 0, ocy = 0, n; int ocx = 0, ocy = 0, n;
XEvent ev; XEvent ev;
Client *c = globalconf.focus->client; Client *c = globalconf.focus->client;
Tag **curtags = get_current_tags(screen); Tag **curtags = tags_get_current(screen);
Layout *layout = curtags[0]->layout; Layout *layout = curtags[0]->layout;
Area area = { 0, 0, 0, 0 , NULL}, geometry; Area area = { 0, 0, 0, 0 , NULL}, geometry;
double mwfact; double mwfact;

6
tag.c
View File

@ -153,7 +153,7 @@ tag_client_with_rule(Client *c, Rule *r)
} }
Tag ** Tag **
get_current_tags(int screen) tags_get_current(int screen)
{ {
Tag *tag, **tags = NULL; Tag *tag, **tags = NULL;
int n = 1; int n = 1;
@ -373,7 +373,7 @@ uicb_tag_prev_selected(int screen, char *arg __attribute__ ((unused)))
void void
uicb_tag_viewnext(int screen, char *arg __attribute__ ((unused))) uicb_tag_viewnext(int screen, char *arg __attribute__ ((unused)))
{ {
Tag *tag, **curtags = get_current_tags(screen); Tag *tag, **curtags = tags_get_current(screen);
tag = tag_list_next_cycle(&globalconf.screens[screen].tags, curtags[0]); tag = tag_list_next_cycle(&globalconf.screens[screen].tags, curtags[0]);
@ -391,7 +391,7 @@ uicb_tag_viewnext(int screen, char *arg __attribute__ ((unused)))
void void
uicb_tag_viewprev(int screen, char *arg __attribute__ ((unused))) uicb_tag_viewprev(int screen, char *arg __attribute__ ((unused)))
{ {
Tag *tag, **curtags = get_current_tags(screen); Tag *tag, **curtags = tags_get_current(screen);
tag = tag_list_prev_cycle(&globalconf.screens[screen].tags, curtags[0]); tag = tag_list_prev_cycle(&globalconf.screens[screen].tags, curtags[0]);

2
tag.h
View File

@ -31,7 +31,7 @@ Tag * tag_new(const char *, Layout *, double, int, int);
void tag_view(Tag *, Bool); void tag_view(Tag *, Bool);
void tag_view_byindex(int, int, Bool); void tag_view_byindex(int, int, Bool);
void tag_push_to_screen(Tag *, int); void tag_push_to_screen(Tag *, int);
Tag ** get_current_tags(int); Tag ** tags_get_current(int);
void tag_client(Client *, Tag *); void tag_client(Client *, Tag *);
void untag_client(Client *, Tag *); void untag_client(Client *, Tag *);
Bool is_client_tagged(Client *, Tag *); Bool is_client_tagged(Client *, Tag *);

View File

@ -33,7 +33,7 @@ layoutinfo_draw(Widget *widget,
int offset, int offset,
int used __attribute__ ((unused))) int used __attribute__ ((unused)))
{ {
Tag **curtags = get_current_tags(widget->statusbar->screen); Tag **curtags = tags_get_current(widget->statusbar->screen);
Area area = draw_get_image_size(curtags[0]->layout->image); Area area = draw_get_image_size(curtags[0]->layout->image);
if(!widget->user_supplied_x) if(!widget->user_supplied_x)