Mercurial > dwindows
diff gtk/dw.c @ 2081:24875681eec5
Added htmlEngine to DWEnv
author | mhessling@81767d24-ef19-dc11-ae90-00e081727c95 |
---|---|
date | Sun, 31 May 2020 05:25:18 +0000 |
parents | c2f13c5eefac |
children | 94ea915bd917 |
line wrap: on
line diff
--- a/gtk/dw.c Mon May 25 13:03:01 2020 +0000 +++ b/gtk/dw.c Sun May 31 05:25:18 2020 +0000 @@ -1254,14 +1254,14 @@ char *location = (char *)webkit_web_view_get_uri(web_view); int status = 0; void **params = data; - + if(params) status = DW_POINTER_TO_INT(params[3]); - + if(status && location && work.window && work.func) { int (*htmlchangedfunc)(HWND, int, char *, void *) = work.func; - + htmlchangedfunc(work.window, status, location, work.data); } } @@ -2111,7 +2111,7 @@ /* Generate an Application ID based on the PID if all else fails. */ snprintf(_dw_app_id, 100, "%s.pid.%d", DW_APP_DOMAIN_DEFAULT, getpid()); } - + /* Initialize the application subsystem on supported versions... * we generate an application ID based on the binary name or PID * instead of passing NULL to enable full application support. @@ -12335,14 +12335,14 @@ * A handle to the notification which can be used to attach a "clicked" event if desired, * or NULL if it fails or notifications are not supported by the system. * Remarks: - * This will create a system notification that will show in the notifaction panel + * This will create a system notification that will show in the notifaction panel * on supported systems, which may be clicked to perform another task. */ HWND dw_notification_new(const char *title, HPIXMAP pixmap, const char *description, ...) { #if GLIB_CHECK_VERSION(2,40,0) GNotification *notification = g_notification_new(title); - + if(notification) { if(description) @@ -12360,7 +12360,7 @@ /* GTK 1.x is not implemented as pixbuf, so only allow icons on 2.x */ if(pixmap && pixmap->pixbuf) g_notification_set_icon(notification, G_ICON(pixmap->pixbuf)); -#endif +#endif } return (HWND)notification; #else @@ -12381,8 +12381,8 @@ if(notification) { char id[101] = {0}; - - /* Generate a unique ID based on the notification handle, + + /* Generate a unique ID based on the notification handle, * so we can use it to remove the notification in dw_window_destroy(). */ snprintf(id, 100, "dw-notification-%llu", (unsigned long long)notification); @@ -12417,6 +12417,11 @@ #else env->DWSubVersion = DW_SUB_VERSION; #endif +#ifdef USE_WEBKIT + strncpy(env->htmlEngine, "WEBKIT", sizeof(env->htmlEngine)-1); +#else + strncpy(env->htmlEngine, "N/A", sizeof(env->htmlEngine)-1); +#endif if((dot = strchr(tempbuf, '.')) != NULL) { @@ -12912,7 +12917,7 @@ if(web_view) { WebKitWebFrame *frame; - + switch(action) { case DW_HTML_GOBACK: @@ -13015,7 +13020,7 @@ #ifdef USE_WEBKIT int _locked_by_me = FALSE; WebKitWebView *web_view; - + DW_MUTEX_LOCK; if((web_view = (WebKitWebView *)gtk_object_get_data(GTK_OBJECT(handle), "_dw_web_view"))) webkit_web_view_execute_script(web_view, script);