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:
commit
fae50f7b98
2 changed files with 42 additions and 15 deletions
|
@ -118,15 +118,11 @@ XCOMM binutils: (LinuxBinUtilsMajorVersion)
|
||||||
|
|
||||||
#define LinuxLocaleDefines /**/
|
#define LinuxLocaleDefines /**/
|
||||||
|
|
||||||
XCOMM If you have the tirpc library on your system, and you have the
|
XCOMM Using the tirpc lib should allow running rpcbind in secure
|
||||||
XCOMM libtirpc-dev installed, then define HasTIRPCLib to YES in either
|
XCOMM mode (ie: without the -i option). Make sure you install the
|
||||||
XCOMM your host.def or site.def file. Using the tirpc lib should
|
XCOMM libtirpc-dev package or equivalent.
|
||||||
XCOMM allow running rpcbind in secure mode (ie: without the -i option).
|
|
||||||
XCOMM The default is NO.
|
|
||||||
|
|
||||||
#ifndef HasTIRPCLib
|
#define HasTIRPCLib YES
|
||||||
# define HasTIRPCLib NO
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if HasTIRPCLib
|
#if HasTIRPCLib
|
||||||
TIRPCLIB = -ltirpc
|
TIRPCLIB = -ltirpc
|
||||||
|
|
|
@ -361,26 +361,57 @@ ReadPalette(
|
||||||
*/
|
*/
|
||||||
if (add == TRUE)
|
if (add == TRUE)
|
||||||
{
|
{
|
||||||
/* set the item_position for the scrolled list */
|
|
||||||
new_palette->item_position = NumOfPalettes + 1;
|
|
||||||
|
|
||||||
/* set the next pointer to NULL*/
|
/* set the next pointer to NULL*/
|
||||||
new_palette->next = NULL;
|
new_palette->next = NULL;
|
||||||
|
|
||||||
/* increment the total number of palettes in the customizer */
|
/* increment the total number of palettes in the customizer */
|
||||||
NumOfPalettes++;
|
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;
|
pHeadPalette = new_palette;
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
tmp_palette = pHeadPalette;
|
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;
|
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 */
|
/* done with filename so XtFree it */
|
||||||
XtFree(filename);
|
XtFree(filename);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue