Mercurial > dwindows
comparison dwtest.c @ 2066:2c2530f8cbef
Initial design for system notification support on GTK.
Windows, Mac and possibly OS/2 Support will follow.
GTK support requires Glib 2.40 or higher.
author | bsmith@81767d24-ef19-dc11-ae90-00e081727c95 |
---|---|
date | Thu, 14 May 2020 01:52:27 +0000 |
parents | 466cf00f409f |
children | 24875681eec5 |
comparison
equal
deleted
inserted
replaced
2065:2dacac5e4023 | 2066:2c2530f8cbef |
---|---|
590 { | 590 { |
591 char *tmp; | 591 char *tmp; |
592 tmp = dw_file_browse("Pick a file", "dwtest.c", "c", DW_FILE_OPEN ); | 592 tmp = dw_file_browse("Pick a file", "dwtest.c", "c", DW_FILE_OPEN ); |
593 if ( tmp ) | 593 if ( tmp ) |
594 { | 594 { |
595 HWND notification = dw_notification_new("New file loaded", NULL, "dwtest loaded \"%s\" into the file browser on the Render tab, with \"File Display\" selected from the drop down list.", tmp); | |
596 | |
595 if ( current_file ) | 597 if ( current_file ) |
596 { | 598 { |
597 dw_free( current_file ); | 599 dw_free( current_file ); |
598 } | 600 } |
599 current_file = tmp; | 601 current_file = tmp; |
600 dw_window_set_text( entryfield, current_file ); | 602 dw_window_set_text( entryfield, current_file ); |
601 read_file(); | 603 read_file(); |
602 current_col = current_row = 0; | 604 current_col = current_row = 0; |
603 update_render(); | 605 update_render(); |
606 dw_notification_send(notification); | |
604 } | 607 } |
605 dw_window_set_focus(copypastefield); | 608 dw_window_set_focus(copypastefield); |
606 return 0; | 609 return 0; |
607 } | 610 } |
608 | 611 |