diff options
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; } |