1
0
Fork 0
mirror of git://git.code.sf.net/p/cdesktopenv/code synced 2025-02-15 04:32:24 +00:00

Merge branch 'master' into multi-monitor

This commit is contained in:
Jon Trulson 2013-05-26 17:50:12 -06:00
commit fae50f7b98
2 changed files with 42 additions and 15 deletions

View file

@ -118,15 +118,11 @@ XCOMM binutils: (LinuxBinUtilsMajorVersion)
#define LinuxLocaleDefines /**/
XCOMM If you have the tirpc library on your system, and you have the
XCOMM libtirpc-dev installed, then define HasTIRPCLib to YES in either
XCOMM your host.def or site.def file. Using the tirpc lib should
XCOMM allow running rpcbind in secure mode (ie: without the -i option).
XCOMM The default is NO.
XCOMM Using the tirpc lib should allow running rpcbind in secure
XCOMM mode (ie: without the -i option). Make sure you install the
XCOMM libtirpc-dev package or equivalent.
#ifndef HasTIRPCLib
# define HasTIRPCLib NO
#endif
#define HasTIRPCLib YES
#if HasTIRPCLib
TIRPCLIB = -ltirpc

View file

@ -361,26 +361,57 @@ ReadPalette(
*/
if (add == TRUE)
{
/* set the item_position for the scrolled list */
new_palette->item_position = NumOfPalettes + 1;
/* set the next pointer to NULL*/
new_palette->next = NULL;
/* increment the total number of palettes in the customizer */
NumOfPalettes++;
if( pHeadPalette == NULL )
if( pHeadPalette == NULL /* First entry */
|| (pHeadPalette != NULL && strcmp(pHeadPalette->name, new_palette->name) > 0)) /* Earlier entry than current list head */
{
new_palette->item_position = 1;
if(pHeadPalette)
{
new_palette->next = pHeadPalette;
/* Increment position poineter of other items in the list */
tmp_palette = pHeadPalette;
while( tmp_palette != NULL)
{
tmp_palette->item_position += 1;
tmp_palette = tmp_palette->next;
}
}
pHeadPalette = new_palette;
}
else
{
tmp_palette = pHeadPalette;
while( tmp_palette->next != NULL)
tmp_palette = tmp_palette->next;
/* Search through the linked list to find the first entry with a
name > new entries name, new item will be inserted after it */
while(tmp_palette->next && strcmp(tmp_palette->next->name, new_palette->name) < 0)
{
tmp_palette = tmp_palette->next;
}
/* Insert the new palette */
new_palette->next = tmp_palette->next;
tmp_palette->next = new_palette;
new_palette->item_position = tmp_palette->item_position + 1;
/* Now continue incrementing through the list increasing the position
count of all items following the new entry */
tmp_palette = new_palette->next;
while( tmp_palette != NULL)
{
tmp_palette->item_position += 1;
tmp_palette = tmp_palette->next;
}
}
}
/* done with filename so XtFree it */
XtFree(filename);