mirror of
https://github.com/gryf/wmaker.git
synced 2026-02-01 13:35:51 +01:00
fixed a memleak in the font panel in WINGs
This commit is contained in:
@@ -44,6 +44,7 @@ Changes since wmaker 0.80.1:
|
|||||||
- Fixed a bug with empty frame titles (Alexey Voinov <voins@voins.program.ru>)
|
- Fixed a bug with empty frame titles (Alexey Voinov <voins@voins.program.ru>)
|
||||||
- Added WMGetWidgetBackgroundColor()
|
- Added WMGetWidgetBackgroundColor()
|
||||||
- Code cleanup in wtext.c
|
- Code cleanup in wtext.c
|
||||||
|
- Fixed a memory leak in wfontpanel.c
|
||||||
|
|
||||||
|
|
||||||
Changes since wmaker 0.80.0:
|
Changes since wmaker 0.80.0:
|
||||||
|
|||||||
@@ -1304,41 +1304,26 @@ main(int argc, char **argv)
|
|||||||
|
|
||||||
|
|
||||||
testTextField(scr);
|
testTextField(scr);
|
||||||
|
testText(scr);
|
||||||
|
|
||||||
testFontPanel(scr);
|
testFontPanel(scr);
|
||||||
|
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
testText(scr);
|
|
||||||
testDragAndDrop(scr);
|
|
||||||
testColorPanel(scr);
|
|
||||||
testScrollView(scr);
|
|
||||||
testTabView(scr);
|
|
||||||
testBox(scr);
|
testBox(scr);
|
||||||
testText(scr);
|
|
||||||
testList(scr);
|
|
||||||
|
|
||||||
testProgressIndicator(scr);
|
|
||||||
|
|
||||||
testColorWell(scr);
|
|
||||||
|
|
||||||
|
|
||||||
testDragAndDrop(scr);
|
|
||||||
testFontPanel(scr);
|
|
||||||
|
|
||||||
testButton(scr);
|
testButton(scr);
|
||||||
|
testColorPanel(scr);
|
||||||
|
testColorWell(scr);
|
||||||
|
testDragAndDrop(scr);
|
||||||
testFrame(scr);
|
testFrame(scr);
|
||||||
|
|
||||||
testSplitView(scr);
|
|
||||||
|
|
||||||
testGradientButtons(scr);
|
testGradientButtons(scr);
|
||||||
|
testList(scr);
|
||||||
testOpenFilePanel(scr);
|
testOpenFilePanel(scr);
|
||||||
|
testProgressIndicator(scr);
|
||||||
testSlider(scr);
|
|
||||||
testPullDown(scr);
|
testPullDown(scr);
|
||||||
|
testScrollView(scr);
|
||||||
|
testSlider(scr);
|
||||||
|
testSplitView(scr);
|
||||||
|
testTabView(scr);
|
||||||
#endif
|
#endif
|
||||||
/*
|
/*
|
||||||
* The main event loop.
|
* The main event loop.
|
||||||
|
|||||||
@@ -573,7 +573,6 @@ addTypefaceToFamily(Family *family, char fontFields[NUM_FIELDS][256])
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* families (same family name) (Hashtable of family -> array)
|
* families (same family name) (Hashtable of family -> array)
|
||||||
* registries (same family but different registries)
|
* registries (same family but different registries)
|
||||||
@@ -695,13 +694,12 @@ static void
|
|||||||
listFamilies(WMScreen *scr, WMFontPanel *panel)
|
listFamilies(WMScreen *scr, WMFontPanel *panel)
|
||||||
{
|
{
|
||||||
char **fontList;
|
char **fontList;
|
||||||
int count;
|
WMHashTable *families;
|
||||||
int i;
|
|
||||||
WMHashTable *families = WMCreateHashTable(WMStringPointerHashCallbacks);
|
|
||||||
char fields[NUM_FIELDS][256];
|
char fields[NUM_FIELDS][256];
|
||||||
WMHashEnumerator enumer;
|
WMHashEnumerator enumer;
|
||||||
WMArray *array;
|
WMArray *array;
|
||||||
|
int i, count;
|
||||||
|
|
||||||
fontList = XListFonts(scr->display, ALL_FONTS_MASK, MAX_FONTS_TO_RETRIEVE,
|
fontList = XListFonts(scr->display, ALL_FONTS_MASK, MAX_FONTS_TO_RETRIEVE,
|
||||||
&count);
|
&count);
|
||||||
if (!fontList) {
|
if (!fontList) {
|
||||||
@@ -710,6 +708,8 @@ listFamilies(WMScreen *scr, WMFontPanel *panel)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
families = WMCreateHashTable(WMStringPointerHashCallbacks);
|
||||||
|
|
||||||
for (i = 0; i < count; i++) {
|
for (i = 0; i < count; i++) {
|
||||||
int fname_len;
|
int fname_len;
|
||||||
|
|
||||||
@@ -757,7 +757,6 @@ listFamilies(WMScreen *scr, WMFontPanel *panel)
|
|||||||
|
|
||||||
item->clientData = fam;
|
item->clientData = fam;
|
||||||
}
|
}
|
||||||
/* Isn't this going to memleak since items weren't released? --Dan */
|
|
||||||
WMFreeArray(array);
|
WMFreeArray(array);
|
||||||
}
|
}
|
||||||
WMSortListItems(panel->famLs);
|
WMSortListItems(panel->famLs);
|
||||||
|
|||||||
@@ -1070,7 +1070,7 @@ WMSetWidgetBackgroundColor(WMWidget *w, WMColor *color)
|
|||||||
WMColor*
|
WMColor*
|
||||||
WMGetWidgetBackgroundColor(WMWidget *w)
|
WMGetWidgetBackgroundColor(WMWidget *w)
|
||||||
{
|
{
|
||||||
// shoul retain?
|
// should retain?
|
||||||
return W_VIEW(w)->backColor;
|
return W_VIEW(w)->backColor;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ AC_INIT(src/WindowMaker.h)
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
AM_INIT_AUTOMAKE(WindowMaker, 0.81.2)
|
AM_INIT_AUTOMAKE(WindowMaker, 0.81.0)
|
||||||
|
|
||||||
AC_PROG_LIBTOOL
|
AC_PROG_LIBTOOL
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user