From a4b9e4c4dbc89c463b6c9a99af69062fe0b22cce Mon Sep 17 00:00:00 2001 From: Alx Sa Date: Sat, 7 Feb 2026 00:47:55 +0000 Subject: [PATCH] app: Don't show Welcome Dialog if images loaded... ...on start. Users who open GIMP with images (such as via the command line or drag & drop) may not want the Welcome Dialog to appear over their image. This patch moves the check for files to be above the code that loads the Welcome Dialog, so that we can pass that information to gimp_update_auto_check (). If files are being loaded, we don't display the Welcome Dialog (with the exception of on first update, so users don't miss the update information). --- app/app.c | 8 ++++++-- app/gimp-update.c | 8 ++++++-- app/gimp-update.h | 3 ++- 3 files changed, 14 insertions(+), 5 deletions(-) diff --git a/app/app.c b/app/app.c index 4ebf157545..056d368f90 100644 --- a/app/app.c +++ b/app/app.c @@ -461,10 +461,15 @@ app_activate_callback (GimpCoreApp *app, } #endif + /* Get possible files first, so that we can check if the + * welcome dialog should be displayed + */ + filenames = gimp_core_app_get_filenames (app); + /* check for updates *after* enabling config autosave, so that the timestamp * is saved */ - gimp_update_auto_check (gimp->edit_config, gimp); + gimp_update_auto_check (gimp->edit_config, gimp, (filenames != NULL)); /* Setting properties to be used for the next run. */ g_object_set (gimp->edit_config, @@ -475,7 +480,6 @@ app_activate_callback (GimpCoreApp *app, NULL); /* Load the images given on the command-line. */ - filenames = gimp_core_app_get_filenames (app); if (filenames != NULL) { gint i; diff --git a/app/gimp-update.c b/app/gimp-update.c index 69cc07e2a6..708af827cd 100644 --- a/app/gimp-update.c +++ b/app/gimp-update.c @@ -522,7 +522,8 @@ gimp_check_updates_process_idle (gpointer data) */ gboolean gimp_update_auto_check (GimpCoreConfig *config, - Gimp *gimp) + Gimp *gimp, + gboolean files_loaded) { gboolean is_update; gint64 prev_update_timestamp; @@ -539,8 +540,11 @@ gimp_update_auto_check (GimpCoreConfig *config, * version is run, display a welcome dialog and do not check for * updates right now. Otherwise, if the user has set the welcome * dialog to always appear on load, show the Create page on start. + * The only exception is if they intentionally opened GIMP with + * images on start. */ - if (! gimp->no_interface) + if (! gimp->no_interface && + (is_update || ! files_loaded)) gtk_widget_set_visible (welcome_dialog_create (gimp, is_update), TRUE); diff --git a/app/gimp-update.h b/app/gimp-update.h index c6056731ba..7226d15c7b 100644 --- a/app/gimp-update.h +++ b/app/gimp-update.h @@ -22,7 +22,8 @@ gboolean gimp_update_auto_check (GimpCoreConfig *config, - Gimp *gimp); + Gimp *gimp, + gboolean files_loaded); void gimp_update_check (GimpCoreConfig *config); void gimp_update_refresh (GimpCoreConfig *config);