changeset 2105:10c22853b479

Add dw_app_id_set() dwtest call to set application name and ID for sending notifications. Fix header typo and a warning in the dwtest notification callback.
author bsmith@81767d24-ef19-dc11-ae90-00e081727c95
date Tue, 16 Jun 2020 02:42:01 +0000
parents 6e55c6f8d816
children 50196f67a129
files dw.h dwtest.c
diffstat 2 files changed, 5 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/dw.h	Tue Jun 16 00:16:59 2020 +0000
+++ b/dw.h	Tue Jun 16 02:42:01 2020 +0000
@@ -1819,7 +1819,7 @@
 char * API dw_file_browse(const char *title, const char *defpath, const char *ext, int flags);
 char * API dw_user_dir(void);
 char * API dw_app_dir(void);
-int API dw_app_id_set(const char *appid, const char *appguid);
+int API dw_app_id_set(const char *appid, const char *appname);
 DWDialog * API dw_dialog_new(void *data);
 int API dw_dialog_dismiss(DWDialog *dialog, void *result);
 void * API dw_dialog_wait(DWDialog *dialog);
--- a/dwtest.c	Tue Jun 16 00:16:59 2020 +0000
+++ b/dwtest.c	Tue Jun 16 02:42:01 2020 +0000
@@ -590,6 +590,7 @@
 int DWSIGNAL notification_clicked_callback(HWND notification, void *data)
 {
     dw_debug("Notification clicked\n");
+    return TRUE;
 }
 
 int DWSIGNAL browse_file_callback(HWND window, void *data)
@@ -1800,6 +1801,9 @@
     ULONG notebookpage9;
     DWFEATURE feat;
 
+    /* Setup the Application ID for sending notifications */
+    dw_app_id_set("org.dbsoft.dwindows.dwtest", "Dynamic Windows Test");
+
     /* Enable full dark mode on platforms that support it */
     dw_feature_set(DW_FEATURE_DARK_MODE, 2);