changeset 1047:5dbb931bac5a

Changed the data names from _dw_entry/_dw_group to _dw_buddy on OS/2. This allows dw_window_set/get_text and dw_window_set/get_text to work on both spinbuttons and groupboxes.
author bsmith@81767d24-ef19-dc11-ae90-00e081727c95
date Sat, 28 May 2011 10:41:57 +0000
parents 80cd7fed4995
children 70bad8a91370
files os2/dw.c
diffstat 1 files changed, 6 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/os2/dw.c	Fri May 27 09:20:19 2011 +0000
+++ b/os2/dw.c	Sat May 28 10:41:57 2011 +0000
@@ -4081,7 +4081,7 @@
  */
 int API dw_window_set_font(HWND handle, char *fontname)
 {
-   HWND group = (HWND)dw_window_get_data(handle, "_dw_group");
+   HWND group = (HWND)dw_window_get_data(handle, "_dw_buddy");
    return WinSetPresParam(group ? group : handle, PP_FONTNAMESIZE, strlen(fontname)+1, fontname);
 }
 
@@ -4094,7 +4094,7 @@
 char * API dw_window_get_font(HWND handle)
 {
    char *str = (char *)alloca(50);
-   HWND group = (HWND)dw_window_get_data(handle, "_dw_group");
+   HWND group = (HWND)dw_window_get_data(handle, "_dw_buddy");
    if(str && WinQueryPresParam(group ? group : handle, PP_FONTNAMESIZE, 0, NULL, 50, str, QPF_NOINHERIT))
       return strdup(str);
    return NULL;
@@ -4415,7 +4415,7 @@
    dw_window_set_color(newbox->hwnd, DW_CLR_PALEGRAY, DW_CLR_PALEGRAY);
    dw_window_set_color(newbox->grouphwnd, DW_CLR_BLACK, DW_CLR_PALEGRAY);
    dw_window_set_font(newbox->grouphwnd, DefaultFont);
-   dw_window_set_data(newbox->hwnd, "_dw_group", newbox->grouphwnd);
+   dw_window_set_data(newbox->hwnd, "_dw_buddy", newbox->grouphwnd);
    return newbox->hwnd;
 }
 
@@ -5347,7 +5347,7 @@
    WinSetWindowPtr(entry, QWP_USER, blah);
    dw_window_set_font(tmp, DefaultFont);
    dw_window_set_color(entry, DW_CLR_BLACK, DW_CLR_WHITE);
-   dw_window_set_data(tmp, "_dw_entry", (void *)entry);
+   dw_window_set_data(tmp, "_dw_buddy", (void *)entry);
    return tmp;
 }
 
@@ -5771,7 +5771,7 @@
  */
 void API dw_window_set_text(HWND handle, char *text)
 {
-   HWND entryfield = (HWND)dw_window_get_data(handle, "_dw_entry");
+   HWND entryfield = (HWND)dw_window_get_data(handle, "_dw_buddy");
    WinSetWindowText(entryfield ? entryfield : handle, text);
 }
 
@@ -5784,7 +5784,7 @@
  */
 char * API dw_window_get_text(HWND handle)
 {
-   HWND entryfield = (HWND)dw_window_get_data(handle, "_dw_entry");
+   HWND entryfield = (HWND)dw_window_get_data(handle, "_dw_buddy");
    int len = WinQueryWindowTextLength(entryfield ? entryfield : handle);
    char *tempbuf = calloc(1, len + 2);