changeset 1745:7dd1659c2693

Fixes for the new localization function on OS/2 and GTK3.
author bsmith@81767d24-ef19-dc11-ae90-00e081727c95
date Mon, 04 Jun 2012 22:44:51 +0000
parents 535e8c19a13d
children 76b24619f6fa
files dwtest.c gtk3/dw.c os2/dw.c readme.txt
diffstat 4 files changed, 10 insertions(+), 11 deletions(-) [+]
line wrap: on
line diff
--- a/dwtest.c	Mon Jun 04 22:18:56 2012 +0000
+++ b/dwtest.c	Mon Jun 04 22:44:51 2012 +0000
@@ -1135,7 +1135,7 @@
     titles[2] = "Time";
     titles[3] = "Date";
 
-	dw_filesystem_set_column_title(container, "Test");
+    dw_filesystem_set_column_title(container, "Test");
     dw_filesystem_setup(container, flags, titles, 4);
     dw_container_set_stripe(container, DW_CLR_DEFAULT, DW_CLR_DEFAULT);
     containerinfo = dw_container_alloc(container, 3);
--- a/gtk3/dw.c	Mon Jun 04 22:18:56 2012 +0000
+++ b/gtk3/dw.c	Mon Jun 04 22:44:51 2012 +0000
@@ -5631,7 +5631,7 @@
 {
 	char *newtitle = strdup(title ? title : "");
 	
-	dw_window_set_data(handle, "_dw_coltitle", newtitle);
+	g_object_set_data(G_OBJECT(handle), "_dw_coltitle", newtitle);
 }
 
 /*
@@ -5646,7 +5646,7 @@
 {
    char **newtitles = malloc(sizeof(char *) * (count + 1));
    unsigned long *newflags = malloc(sizeof(unsigned long) * (count + 1));
-   char *coltitle = (char *)dw_window_get_data(handle, "_dw_coltitle");
+   char *coltitle = (char *)g_object_get_data(G_OBJECT(handle), "_dw_coltitle");
 
    newtitles[0] = coltitle ? coltitle : "Filename";
    newflags[0] = DW_CFA_STRINGANDICON | DW_CFA_LEFT | DW_CFA_HORZSEPARATOR;
@@ -5658,7 +5658,7 @@
 
    if(coltitle)
    {
-	  dw_window_set_data(handle, "_dw_coltitle", NULL);
+	  g_object_set_data(G_OBJECT(handle), "_dw_coltitle", NULL);
 	  free(coltitle);
    }
    if ( newtitles) free(newtitles);
--- a/os2/dw.c	Mon Jun 04 22:18:56 2012 +0000
+++ b/os2/dw.c	Mon Jun 04 22:44:51 2012 +0000
@@ -495,14 +495,17 @@
          }
          else if(strncmp(tmpbuf, "#37", 4)==0)
          {
+            char *coltitle = (char *)dw_window_get_data(handle, "_dw_coltitle");
+
             dw_container_clear(handle, FALSE);
             if(wd && dw_window_get_data(handle, "_dw_container"))
             {
                void *oldflags = wd->data;
-
                wd->data = NULL;
                free(oldflags);
             }
+            if(coltitle)
+               free(coltitle);
          }
 
          if(wd->oldproc)
@@ -8985,11 +8988,6 @@
 
    dw_container_setup(handle, newflags, newtitles, count + 2, count ? 2 : 0);
 
-   if(coltitle)
-   {
-	  dw_window_set_data(handle, "_dw_coltitle", NULL);
-	  free(coltitle);
-   }
    free(newtitles);
    free(newflags);
    return DW_ERROR_NONE;
--- a/readme.txt	Mon Jun 04 22:18:56 2012 +0000
+++ b/readme.txt	Mon Jun 04 22:44:51 2012 +0000
@@ -37,7 +37,8 @@
    It is also available at http://hobbes.nmsu.edu
 Added resizing HICNs to 24x24 max size on platforms which do not 
    do it automatically (Mac and GTK). OS/2 and Windows limit the size.
-Added toolbar control support to replace existing bitmap buttons on Windows.   
+Added toolbar control support to replace existing bitmap buttons on Windows.
+Added dw_filesystem_set_column_title() to fill a hole in localization.   
 Fixed dwindows-config --version not returning the version at all.
 Fixed value changed events not working for spinbuttons on OS/2 and Windows.
 Fixed issues drawing arcs on GTK2, GTK3 and Mac.