From 36b55dc1e650dbc42c25e44640515e9fd2181cdd Mon Sep 17 00:00:00 2001 From: dan Date: Thu, 14 Oct 2004 18:04:18 +0000 Subject: [PATCH] - removed some obsoleted function definitions - made font name comparison case insensitive --- WPrefs.app/FontSimple.c | 20 ++++++++++---------- src/funcs.h | 8 -------- 2 files changed, 10 insertions(+), 18 deletions(-) diff --git a/WPrefs.app/FontSimple.c b/WPrefs.app/FontSimple.c index 11ce249c..8c777099 100644 --- a/WPrefs.app/FontSimple.c +++ b/WPrefs.app/FontSimple.c @@ -206,7 +206,7 @@ lookup_available_fonts(_Panel *panel) found = -1; 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; if (found < 0) @@ -419,7 +419,7 @@ static void selectedOption(WMWidget *w, void *data) { _Panel *panel= (_Panel*)data; - int index= WMGetPopUpButtonSelectedItem(panel->optionP); + int index = WMGetPopUpButtonSelectedItem(panel->optionP); WMMenuItem *item= WMGetPopUpButtonMenuItem(panel->optionP, index); char *font; @@ -440,7 +440,7 @@ selectedOption(WMWidget *w, void *data) FcDefaultSubstitute(pat); if (FcPatternGetString(pat, FC_FAMILY, 0, &name) != FcResultMatch) - name= "sans"; + name= "sans"; found= 0; // select family @@ -458,19 +458,19 @@ selectedOption(WMWidget *w, void *data) } } if (!found) - WMSelectListItem(panel->familyL, -1); + WMSelectListItem(panel->familyL, -1); selectedFamily(panel->familyL, panel); // select style if (FcPatternGetInteger(pat, FC_WEIGHT, 0, &weight) != FcResultMatch) - weight= FC_WEIGHT_NORMAL; + weight= FC_WEIGHT_NORMAL; if (FcPatternGetInteger(pat, FC_WIDTH, 0, &width) != FcResultMatch) - width= FC_WIDTH_NORMAL; + width= FC_WIDTH_NORMAL; 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) - size= 10.0; + size= 10.0; found= 0; for (i= 0; i < WMGetListNumberOfRows(panel->styleL); i++) @@ -488,7 +488,7 @@ selectedOption(WMWidget *w, void *data) } } if (!found) - WMSelectListItem(panel->styleL, -1); + WMSelectListItem(panel->styleL, -1); found= 0; { @@ -513,7 +513,7 @@ selectedOption(WMWidget *w, void *data) selected(NULL, panel); } else - wwarning("Can't parse font '%s'", font); + wwarning("Can't parse font '%s'", font); } updateSampleFont(panel); diff --git a/src/funcs.h b/src/funcs.h index 6395a41d..899d8344 100644 --- a/src/funcs.h +++ b/src/funcs.h @@ -158,12 +158,4 @@ char* GetProgramNameForWindow(Window win); 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