changeset 1463:77f530f95826

Fixed error in _dw_msleep on Solaris... fix was already in dwcompat. Also removed some incorrect code in dwtest screwing up the tree page.
author bsmith@81767d24-ef19-dc11-ae90-00e081727c95
date Sat, 17 Dec 2011 11:34:25 +0000
parents 677ca99a8700
children e325f98a2792
files dwtest.c gtk/dw.c gtk3/dw.c
diffstat 3 files changed, 13 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/dwtest.c	Thu Dec 15 23:51:39 2011 +0000
+++ b/dwtest.c	Sat Dec 17 11:34:25 2011 +0000
@@ -100,7 +100,6 @@
     container,
     container_mle,
     pagebox,
-    treebox,
     containerbox,
     textbox1, textbox2, textboxA,
     gap_box,
@@ -1054,13 +1053,9 @@
     dw_listbox_append(listbox, "Test 4");
     dw_listbox_append(listbox, "Test 5");
 
-    /* create a box to pack into the notebook page */
-    treebox = dw_box_new(BOXHORZ, 2);
-    dw_box_pack_start( notebookbox3, treebox, 500, 200, TRUE, TRUE, 0);
-
     /* now a tree area under this box */
     tree = dw_tree_new(101);
-    dw_box_pack_start( notebookbox3, tree, 500, 200, TRUE, FALSE, 1);
+    dw_box_pack_start( notebookbox3, tree, 500, 200, TRUE, TRUE, 1);
 
     /* and a status area to see whats going on */
     tree_status = dw_status_text_new("", 0);
--- a/gtk/dw.c	Thu Dec 15 23:51:39 2011 +0000
+++ b/gtk/dw.c	Sat Dec 17 11:34:25 2011 +0000
@@ -1199,8 +1199,13 @@
    struct timespec req;
 
    req.tv_sec = 0;
+   if(period >= 1000)
+   {
+      req.tv_sec = (int)(period / 1000);
+      period -= (req.tv_sec * 1000);
+   }
    req.tv_nsec = period * 10000000;
-
+	
    nanosleep(&req, NULL);
 #else
    usleep(period * 1000);
--- a/gtk3/dw.c	Thu Dec 15 23:51:39 2011 +0000
+++ b/gtk3/dw.c	Sat Dec 17 11:34:25 2011 +0000
@@ -1057,8 +1057,13 @@
    struct timespec req;
 
    req.tv_sec = 0;
+   if(period >= 1000)
+   {
+      req.tv_sec = (int)(period / 1000);
+      period -= (req.tv_sec * 1000);
+   }
    req.tv_nsec = period * 10000000;
-
+	
    nanosleep(&req, NULL);
 #else
    usleep(period * 1000);