diff options
author | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2020-08-08 11:53:00 +0200 |
---|---|---|
committer | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2020-08-08 11:53:00 +0200 |
commit | b623f5953691b2a0614e6f1f4def86bdbb9a4113 (patch) | |
tree | 18102bd36f7e22eb2ba2b9f880e4cb29346f4cb8 /app/wlib/gtklib/splash.c | |
parent | 359b557176b9bb2ff1aed2082641eed39c358d0d (diff) |
New upstream version 5.2.0Beta2.1upstream/5.2.0Beta2.1
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; } |