diff options
author | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2020-08-22 14:05:41 +0200 |
---|---|---|
committer | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2020-08-22 14:05:41 +0200 |
commit | b55285a77da0e0b829e4ce8d7e09debaabc68e15 (patch) | |
tree | f622559ef65bbdd3e1c5bdb06098a8f89eec0563 /app/wlib/gtklib/splash.c | |
parent | d3897ce090dbeb220ed2c782f095597e417cf3cc (diff) | |
parent | d1ae75703e1ed81d65ea16946dcdb77e7a13adc9 (diff) |
Merge branch 'feature/upstream' into develop
Diffstat (limited to 'app/wlib/gtklib/splash.c')
-rw-r--r-- | app/wlib/gtklib/splash.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/app/wlib/gtklib/splash.c b/app/wlib/gtklib/splash.c index 0d5be50..5d56e9f 100644 --- a/app/wlib/gtklib/splash.c +++ b/app/wlib/gtklib/splash.c @@ -63,7 +63,7 @@ wCreateSplash(char *appName, char *appVer) gtk_window_set_position(GTK_WINDOW(window), GTK_WIN_POS_CENTER); gtk_window_set_resizable(GTK_WINDOW(window), FALSE); gtk_window_set_type_hint(GTK_WINDOW(window), GDK_WINDOW_TYPE_HINT_SPLASHSCREEN); -#if GTK_MINOR_VERSION > 5 +#if GTK_MAJOR_VERSION > 1 || GTK_MINOR_VERSION > 5 gtk_window_set_focus_on_map(GTK_WINDOW(window), FALSE); #endif @@ -108,7 +108,6 @@ wCreateSplash(char *appName, char *appVer) message = label; gtk_widget_show(window); - return (TRUE); } @@ -121,8 +120,9 @@ wCreateSplash(char *appName, char *appVer) int wSetSplashInfo(char *msg) { - if (msg) { - gtk_label_set_text((GtkLabel *)message, msg); + if (!window) return FALSE; + if (msg && message) { + gtk_label_set_text(GTK_LABEL(message), msg); wFlush(); return TRUE; } @@ -139,6 +139,8 @@ void wDestroySplash(void) { /* kill window */ - gtk_widget_destroy(window); + if (window) gtk_widget_destroy(window); + window = NULL; + return; } |