diff dwtest.c @ 1798:9fb8339ae458

Add simple test of dw_window_set_focus()
author mhessling@81767d24-ef19-dc11-ae90-00e081727c95
date Wed, 26 Sep 2012 06:19:06 +0000
parents 9304241b7b33
children 69f9aa1e1b1e
line wrap: on
line diff
--- a/dwtest.c	Tue Sep 25 17:15:42 2012 +0000
+++ b/dwtest.c	Wed Sep 26 06:19:06 2012 +0000
@@ -606,6 +606,7 @@
         current_col = current_row = 0;
         update_render();
     }
+    dw_window_set_focus(copypastefield);
     return 0;
 }
 
@@ -843,12 +844,13 @@
 int DWSIGNAL copy_clicked_callback(HWND button, void *data)
 {
     char *test = dw_window_get_text(copypastefield);
-    
+
     if(test)
     {
         dw_clipboard_set_text(test, (int)strlen(test));
         dw_free(test);
     }
+    dw_window_set_focus(entryfield);
     return TRUE;
 }
 
@@ -889,7 +891,7 @@
     pastebutton = dw_button_new("Paste", 0);
 
     dw_box_pack_start(browsebox, pastebutton, -1, -1, FALSE, FALSE, 0);
-    
+
     /* Archive Name */
     stext = dw_text_new("File to browse", 0);
 
@@ -1768,7 +1770,7 @@
 
     /* Set the default field */
     dw_window_default(mainwindow, copypastefield);
-    
+
     dw_signal_connect(mainwindow, DW_SIGNAL_DELETE, DW_SIGNAL_FUNC(exit_callback), DW_POINTER(mainwindow));
     timerid = dw_timer_connect(2000, DW_SIGNAL_FUNC(timer_callback), 0);
     dw_window_set_size(mainwindow, 640, 550);