mirror of
https://github.com/gryf/wmaker.git
synced 2025-12-19 20:38:08 +01:00
- removed some obsoleted function definitions
- made font name comparison case insensitive
This commit is contained in:
@@ -206,7 +206,7 @@ lookup_available_fonts(_Panel *panel)
|
|||||||
|
|
||||||
found = -1;
|
found = -1;
|
||||||
for (j = 0; j < panel->fonts->familyn && found<0; j++)
|
for (j = 0; j < panel->fonts->familyn && found<0; j++)
|
||||||
if (strcmp(panel->fonts->families[j].name, name)==0)
|
if (strcasecmp(panel->fonts->families[j].name, name)==0)
|
||||||
found= j;
|
found= j;
|
||||||
|
|
||||||
if (found < 0)
|
if (found < 0)
|
||||||
@@ -419,7 +419,7 @@ static void
|
|||||||
selectedOption(WMWidget *w, void *data)
|
selectedOption(WMWidget *w, void *data)
|
||||||
{
|
{
|
||||||
_Panel *panel= (_Panel*)data;
|
_Panel *panel= (_Panel*)data;
|
||||||
int index= WMGetPopUpButtonSelectedItem(panel->optionP);
|
int index = WMGetPopUpButtonSelectedItem(panel->optionP);
|
||||||
WMMenuItem *item= WMGetPopUpButtonMenuItem(panel->optionP, index);
|
WMMenuItem *item= WMGetPopUpButtonMenuItem(panel->optionP, index);
|
||||||
char *font;
|
char *font;
|
||||||
|
|
||||||
@@ -440,7 +440,7 @@ selectedOption(WMWidget *w, void *data)
|
|||||||
FcDefaultSubstitute(pat);
|
FcDefaultSubstitute(pat);
|
||||||
|
|
||||||
if (FcPatternGetString(pat, FC_FAMILY, 0, &name) != FcResultMatch)
|
if (FcPatternGetString(pat, FC_FAMILY, 0, &name) != FcResultMatch)
|
||||||
name= "sans";
|
name= "sans";
|
||||||
|
|
||||||
found= 0;
|
found= 0;
|
||||||
// select family
|
// select family
|
||||||
@@ -458,19 +458,19 @@ selectedOption(WMWidget *w, void *data)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!found)
|
if (!found)
|
||||||
WMSelectListItem(panel->familyL, -1);
|
WMSelectListItem(panel->familyL, -1);
|
||||||
selectedFamily(panel->familyL, panel);
|
selectedFamily(panel->familyL, panel);
|
||||||
|
|
||||||
// select style
|
// select style
|
||||||
if (FcPatternGetInteger(pat, FC_WEIGHT, 0, &weight) != FcResultMatch)
|
if (FcPatternGetInteger(pat, FC_WEIGHT, 0, &weight) != FcResultMatch)
|
||||||
weight= FC_WEIGHT_NORMAL;
|
weight= FC_WEIGHT_NORMAL;
|
||||||
if (FcPatternGetInteger(pat, FC_WIDTH, 0, &width) != FcResultMatch)
|
if (FcPatternGetInteger(pat, FC_WIDTH, 0, &width) != FcResultMatch)
|
||||||
width= FC_WIDTH_NORMAL;
|
width= FC_WIDTH_NORMAL;
|
||||||
if (FcPatternGetInteger(pat, FC_SLANT, 0, &slant) != FcResultMatch)
|
if (FcPatternGetInteger(pat, FC_SLANT, 0, &slant) != FcResultMatch)
|
||||||
slant= FC_SLANT_ROMAN;
|
slant= FC_SLANT_ROMAN;
|
||||||
|
|
||||||
if (FcPatternGetDouble(pat, FC_PIXEL_SIZE, 0, &size) != FcResultMatch)
|
if (FcPatternGetDouble(pat, FC_PIXEL_SIZE, 0, &size) != FcResultMatch)
|
||||||
size= 10.0;
|
size= 10.0;
|
||||||
|
|
||||||
found= 0;
|
found= 0;
|
||||||
for (i= 0; i < WMGetListNumberOfRows(panel->styleL); i++)
|
for (i= 0; i < WMGetListNumberOfRows(panel->styleL); i++)
|
||||||
@@ -488,7 +488,7 @@ selectedOption(WMWidget *w, void *data)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!found)
|
if (!found)
|
||||||
WMSelectListItem(panel->styleL, -1);
|
WMSelectListItem(panel->styleL, -1);
|
||||||
|
|
||||||
found= 0;
|
found= 0;
|
||||||
{
|
{
|
||||||
@@ -513,7 +513,7 @@ selectedOption(WMWidget *w, void *data)
|
|||||||
selected(NULL, panel);
|
selected(NULL, panel);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
wwarning("Can't parse font '%s'", font);
|
wwarning("Can't parse font '%s'", font);
|
||||||
}
|
}
|
||||||
|
|
||||||
updateSampleFont(panel);
|
updateSampleFont(panel);
|
||||||
|
|||||||
@@ -158,12 +158,4 @@ char* GetProgramNameForWindow(Window win);
|
|||||||
|
|
||||||
Bool GetCommandForPid(int pid, char ***argv, int *argc);
|
Bool GetCommandForPid(int pid, char ***argv, int *argc);
|
||||||
|
|
||||||
#ifdef NETWM_HINTS
|
|
||||||
#include "wmspec.h"
|
|
||||||
#define GetPidForWindow(win) wNETWMGetPidForWindow(win)
|
|
||||||
#else
|
|
||||||
int GetPidForWindow(Window win);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
Reference in New Issue
Block a user