Use border name wrapper function some more

This commit is contained in:
Kim Woelders 2013-06-06 22:26:28 +02:00
parent 00f4a27d93
commit 2dad8c5f29
2 changed files with 9 additions and 8 deletions

View File

@ -1,5 +1,5 @@
/*
* Copyright (C) 2003-2015 Kim Woelders
* Copyright (C) 2003-2020 Kim Woelders
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to
@ -385,7 +385,7 @@ EHintsSetInfo(const EWin * ewin)
(unsigned int *)c, ENL_DATA_ITEMS);
ex_window_prop_string_set(EwinGetClientXwin(ewin), E16_ATOM_WIN_BORDER,
ewin->normal_border->name);
BorderGetName(ewin->normal_border));
if (EDebug(EDBUG_TYPE_SNAPS))
Eprintf("Snap set einf %#x: %4d+%4d %4dx%4d: %s\n",

View File

@ -458,6 +458,7 @@ MenuCreateFromBorders(const char *name, MenuStyle * ms)
Border **lst;
int i, num;
MenuItem *mi;
const char *bname;
m = MenuCreate(name, _("Border"), NULL, ms);
@ -467,13 +468,13 @@ MenuCreateFromBorders(const char *name, MenuStyle * ms)
for (i = 0; i < num; i++)
{
bname = BorderGetName(lst[i]);
if (*bname == '_')
continue;
/* if its not internal (ie doesnt start with _ ) */
if (lst[i]->name[0] != '_')
{
Esnprintf(s, sizeof(s), "wop * bo %s", lst[i]->name);
mi = MenuItemCreate(lst[i]->name, NULL, s, NULL);
MenuAddItem(m, mi);
}
Esnprintf(s, sizeof(s), "wop * bo %s", bname);
mi = MenuItemCreate(bname, NULL, s, NULL);
MenuAddItem(m, mi);
}
Efree(lst);