mirror of
https://github.com/0intro/wmii
synced 2025-01-21 01:22:07 +03:00
fixed /tags directory
This commit is contained in:
parent
f53fdddf8a
commit
cb3997262d
@ -304,6 +304,8 @@ name2type(char *name, unsigned char dir_type)
|
||||
return FsFtag;
|
||||
if((dir_type == FsDbar) && name2label(name))
|
||||
return FsDlabel;
|
||||
if((dir_type == FsDtags) && istag(ctag, name, nctag))
|
||||
return FsDlabel;
|
||||
if(!strncmp(name, "sel", 4))
|
||||
goto dyndir;
|
||||
i = (unsigned short) cext_strtonum(name, 0, 0xffff, &err);
|
||||
|
10
cmd/wm/tag.c
10
cmd/wm/tag.c
@ -140,7 +140,7 @@ get_tag(char *name)
|
||||
unsigned int i, n = 0;
|
||||
Tag *t;
|
||||
|
||||
if(!has_tag(ctag, name, nctag))
|
||||
if(!istag(ctag, name, nctag))
|
||||
return nil;
|
||||
for(i = 0; i < ntag; i++) {
|
||||
t = tag[i];
|
||||
@ -187,7 +187,7 @@ select_tag(char *arg)
|
||||
}
|
||||
|
||||
Bool
|
||||
has_tag(char **tags, char *tag, unsigned int ntags)
|
||||
istag(char **tags, char *tag, unsigned int ntags)
|
||||
{
|
||||
unsigned int i;
|
||||
for(i = 0; i < ntags; i++)
|
||||
@ -227,7 +227,7 @@ update_tags()
|
||||
t++;
|
||||
if(!*t) /* should not happen, but some user might try */
|
||||
continue;
|
||||
if(!has_tag(newctag, t, nnewctag)) {
|
||||
if(!istag(newctag, t, nnewctag)) {
|
||||
newctag = (char **)cext_array_attach((void **)newctag, strdup(t),
|
||||
sizeof(char *), &newctagsz);
|
||||
nnewctag++;
|
||||
@ -237,12 +237,12 @@ update_tags()
|
||||
|
||||
/* propagate tagging events */
|
||||
for(i = 0; i < nnewctag; i++)
|
||||
if(!has_tag(ctag, newctag[i], nctag)) {
|
||||
if(!istag(ctag, newctag[i], nctag)) {
|
||||
snprintf(buf, sizeof(buf), "NewTag %s\n", newctag[i]);
|
||||
write_event(buf);
|
||||
}
|
||||
for(i = 0; i < nctag; i++) {
|
||||
if(!has_tag(newctag, ctag[i], nnewctag)) {
|
||||
if(!istag(newctag, ctag[i], nnewctag)) {
|
||||
snprintf(buf, sizeof(buf), "RemoveTagT %s\n", ctag[i]);
|
||||
write_event(buf);
|
||||
}
|
||||
|
@ -296,7 +296,7 @@ XRectangle *rectangles(unsigned int *num);
|
||||
int tid2index(unsigned short id);
|
||||
void select_tag(char *arg);
|
||||
int tag2index(Tag *t);
|
||||
Bool has_tag(char **tags, char *tag, unsigned int ntags);
|
||||
Bool istag(char **tags, char *tag, unsigned int ntags);
|
||||
void update_tags();
|
||||
Bool clientoftag(Tag *t, Client *c);
|
||||
void detach_fromtag(Tag *t, Client *c);
|
||||
|
Loading…
Reference in New Issue
Block a user