diff os2/dw.c @ 1322:3f1ac800bf65

Initial fix for being able to do container string comparisons instead of pointer on all platforms. Improved on the GTK2 change earlier... where it would do both comparisons with string enabled.
author bsmith@81767d24-ef19-dc11-ae90-00e081727c95
date Sun, 06 Nov 2011 12:13:13 +0000
parents 3475887f9445
children 552da4dea7d1
line wrap: on
line diff
--- a/os2/dw.c	Sun Nov 06 11:48:24 2011 +0000
+++ b/os2/dw.c	Sun Nov 06 12:13:13 2011 +0000
@@ -8145,10 +8145,11 @@
 {
    RECTL viewport, item;
    PRECORDCORE pCore = WinSendMsg(handle, CM_QUERYRECORD, (MPARAM)0L, MPFROM2SHORT(CMA_FIRST, CMA_ITEMORDER));
+   int textcomp = DW_POINTER_TO_INT(dw_window_get_data(handle, "_dw_textcomp"));
 
    while(pCore)
    {
-      if((char *)pCore->pszIcon == text)
+      if((textcomp && pCore->pszIcon && strcmp(pCore->pszIcon, text) == 0) || (!textcomp && (char *)pCore->pszIcon == text))
       {
          QUERYRECORDRECT qrr;
          int scrollpixels = 0, midway;
@@ -8182,10 +8183,11 @@
 void API dw_container_delete_row(HWND handle, char *text)
 {
    PRECORDCORE pCore = WinSendMsg(handle, CM_QUERYRECORD, (MPARAM)0L, MPFROM2SHORT(CMA_FIRST, CMA_ITEMORDER));
+   int textcomp = DW_POINTER_TO_INT(dw_window_get_data(handle, "_dw_textcomp"));
 
    while(pCore)
    {
-      if((char *)pCore->pszIcon == text)
+      if((textcomp && pCore->pszIcon && strcmp(pCore->pszIcon, text) == 0) || (!textcomp && (char *)pCore->pszIcon == text))
       {
          WinSendMsg(handle, CM_REMOVERECORD, (MPARAM)&pCore, MPFROM2SHORT(1, CMA_FREE | CMA_INVALIDATE));
          return;