Skip to content

Revert "Splash 2" #2

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 10 commits into
base: _expand-collapse_modules_darkroom
Choose a base branch
from
32 changes: 0 additions & 32 deletions data/noiseprofiles.json
Original file line number Diff line number Diff line change
Expand Up @@ -3249,38 +3249,6 @@
{"name": "X100V iso 12800", "iso": 12800, "a": [0.000321490100417519, 0.000140744217280993, 0.000260722740054755], "b": [3.26173914450377e-07, 3.93263963321113e-07, 3.70884217191373e-07]}
]
},
{
"comment": "x100vi contributed by prama",
"model": "X100VI",
"profiles": [
{"name": "X100VI iso 64", "iso": 64, "a": [6.56951328260695e-06, 2.35091212000446e-06, 4.11986816690801e-06], "b": [1.15519832304968e-08, 1.7769256275406e-09, 4.35065785520004e-09]},
{"name": "X100VI iso 80", "iso": 80, "a": [8.16123214784975e-06, 2.95008126261748e-06, 5.09379087455284e-06], "b": [1.5250163198859e-08, 2.50215484248149e-09, 6.15928440385305e-09]},
{"name": "X100VI iso 100", "iso": 100, "a": [1.00749276410493e-05, 3.68010521518993e-06, 6.37592707869885e-06], "b": [1.94026756358824e-08, 3.56420950852585e-09, 7.94492851617552e-09]},
{"name": "X100VI iso 125", "iso": 125, "a": [7.73118446682305e-06, 2.53998856427485e-06, 3.75684222286484e-06], "b": [1.00279154331384e-08, 2.07442585565483e-09, 7.08293059856131e-09]},
{"name": "X100VI iso 160", "iso": 160, "a": [9.29962110332268e-06, 3.09003184927668e-06, 4.63897807858611e-06], "b": [1.2863969296073e-08, 3.19122465231949e-09, 9.07807549132952e-09]},
{"name": "X100VI iso 200", "iso": 200, "a": [1.13334573819434e-05, 3.80139745169572e-06, 5.72844747185529e-06], "b": [1.6443756846124e-08, 4.30635047208411e-09, 1.17482708808263e-08]},
{"name": "X100VI iso 250", "iso": 250, "a": [7.98098278818611e-06, 2.62310992684099e-06, 3.96695806147666e-06], "b": [6.799126812565e-09, 3.75013311650086e-09, 6.13083908779481e-09]},
{"name": "X100VI iso 320", "iso": 320, "a": [9.66745723555539e-06, 3.19099807938009e-06, 4.89847578645924e-06], "b": [8.92128707624313e-09, 4.80473220184476e-09, 7.80991302174013e-09]},
{"name": "X100VI iso 400", "iso": 400, "a": [1.16473438892116e-05, 3.89732147758804e-06, 6.01679267047134e-06], "b": [1.11369325933258e-08, 6.34965399543634e-09, 1.01074306285294e-08]},
{"name": "X100VI iso 500", "iso": 500, "a": [7.991894740851e-06, 2.71650738672953e-06, 3.98442501623907e-06], "b": [3.44640979594526e-09, 2.55184315767142e-09, 3.71290280855236e-09]},
{"name": "X100VI iso 640", "iso": 640, "a": [9.73386042243406e-06, 3.31363754628611e-06, 4.95768290868136e-06], "b": [4.45222865985421e-09, 3.42934545497372e-09, 4.75307648517812e-09]},
{"name": "X100VI iso 800", "iso": 800, "a": [1.19163512699227e-05, 4.03146358181001e-06, 6.05065463150951e-06], "b": [5.43382982522256e-09, 4.43352930371186e-09, 5.92250067807038e-09]},
{"name": "X100VI iso 1000", "iso": 1000, "a": [1.44793789355487e-05, 4.95198926236959e-06, 7.50591050255305e-06], "b": [7.01327726247248e-09, 5.71639524528997e-09, 7.73626457610633e-09]},
{"name": "X100VI iso 1250", "iso": 1250, "a": [1.79903916816055e-05, 6.14104022984162e-06, 9.38887998128298e-06], "b": [9.16868921527565e-09, 7.6723263589748e-09, 1.01967160208927e-08]},
{"name": "X100VI iso 1600", "iso": 1600, "a": [2.2224755801356e-05, 7.6646685331593e-06, 1.16771571904976e-05], "b": [1.2051101940653e-08, 1.03062100299685e-08, 1.36880229396431e-08]},
{"name": "X100VI iso 2000", "iso": 2000, "a": [2.77630435254764e-05, 9.50437325311189e-06, 1.46838186023507e-05], "b": [1.13961360235976e-08, 1.01168016603667e-08, 1.34521541934228e-08]},
{"name": "X100VI iso 2500", "iso": 2500, "a": [3.44031705223493e-05, 1.17749806380441e-05, 1.84570575855124e-05], "b": [1.41104801813589e-08, 1.31328468005234e-08, 1.66407830621279e-08]},
{"name": "X100VI iso 3200", "iso": 3200, "a": [4.26782053053495e-05, 1.47268616781985e-05, 2.30427264830385e-05], "b": [1.68470340880815e-08, 1.65536481715599e-08, 2.04543754454681e-08]},
{"name": "X100VI iso 4000", "iso": 4000, "a": [5.29243544233581e-05, 1.81201641567885e-05, 2.84352567382226e-05], "b": [2.18458816022173e-08, 2.15422817972405e-08, 2.66018391239557e-08]},
{"name": "X100VI iso 5000", "iso": 5000, "a": [6.6560835739553e-05, 2.28305690968372e-05, 3.59678613892833e-05], "b": [2.78409609534655e-08, 2.85139680170025e-08, 3.39136321802757e-08]},
{"name": "X100VI iso 6400", "iso": 6400, "a": [8.23632371403399e-05, 2.82772903786275e-05, 4.4579032853723e-05], "b": [3.27219409499641e-08, 3.61735269892318e-08, 4.09201880116357e-08]},
{"name": "X100VI iso 8000", "iso": 8000, "a": [0.000102785810640211, 3.53926215964227e-05, 5.57946815876197e-05], "b": [4.32311095937854e-08, 4.72470157604045e-08, 5.26213986307088e-08]},
{"name": "X100VI iso 10000", "iso": 10000, "a": [0.000128300124337336, 4.4186965336221e-05, 7.0049660276037e-05], "b": [5.61498631486799e-08, 6.13443621859559e-08, 6.68397050862821e-08]},
{"name": "X100VI iso 12800", "iso": 12800, "a": [0.000158235634061307, 5.459951669755e-05, 8.67916025708252e-05], "b": [6.40045900079618e-08, 7.27779909132234e-08, 7.59383885299704e-08]},
{"name": "X100VI iso 25600", "iso": 25600, "a": [0.000519695228021285, 0.000196685999171664, 0.000311324958275022], "b": [3.57010043473498e-07, 5.15931390891423e-07, 4.85155162655835e-07]},
{"name": "X100VI iso 51200", "iso": 51200, "a": [0.000537181851474428, 0.000194393490379855, 0.00030762609275018], "b": [2.88839890986485e-07, 4.12832900392008e-07, 3.62191556998363e-07]}
]
},
{
"comment": "gfx100s contributed by nick",
"model": "GFX100S",
Expand Down
25 changes: 14 additions & 11 deletions src/common/darktable.c
Original file line number Diff line number Diff line change
Expand Up @@ -1618,8 +1618,6 @@ int dt_init(int argc, char *argv[], const gboolean init_gui, const gboolean load
darktable_splash_screen_create(NULL, TRUE); // force the splash screen for the crawl even if user-disabled
// scan for cases where the database and xmp files have different timestamps
changed_xmp_files = dt_control_crawler_run();
if(!dt_conf_get_bool("show_splash_screen"))
darktable_splash_screen_destroy();
}
}

Expand Down Expand Up @@ -1815,20 +1813,26 @@ int dt_init(int argc, char *argv[], const gboolean init_gui, const gboolean load

if(init_gui)
{
darktable_splash_screen_set_progress(_("loading utility modules"));
darktable.lib = (dt_lib_t *)calloc(1, sizeof(dt_lib_t));
dt_lib_init(darktable.lib);

// init the gui part of views
darktable_splash_screen_set_progress(_("loading views"));
dt_view_manager_gui_init(darktable.view_manager);

// now that other initialization is complete, we can show the main window
// we need to do this before Lua is started or we'll either get a hang, or
// the module groups don't get set up correctly

// start by restoring the main window position as stored in the config file
dt_gui_gtk_load_config();
gtk_widget_show_all(dt_ui_main_window(darktable.gui->ui));
// give Gtk a chance to actually process the resizing
dt_gui_process_events();
}

/* init lua last, since it's user made stuff it must be in the real environment */
#ifdef USE_LUA
darktable_splash_screen_set_progress(_("initializing Lua"));
// after the following Lua startup call, we can no longer use dt_gui_process_events() or we hang;
// this also means no more calls to darktable_splash_screen_set_progress()
dt_lua_init(darktable.lua_state.state, lua_command);
#else
darktable_splash_screen_set_progress(_(""));
Expand Down Expand Up @@ -1907,6 +1911,8 @@ int dt_init(int argc, char *argv[], const gboolean init_gui, const gboolean load
if(changed_xmp_files)
dt_control_crawler_show_image_list(changed_xmp_files);

darktable_splash_screen_destroy();

if(!dt_gimpmode())
dt_start_backtumbs_crawler();
}
Expand All @@ -1924,13 +1930,10 @@ int dt_init(int argc, char *argv[], const gboolean init_gui, const gboolean load
dt_capabilities_add("nonapple");
#endif

// if we hid the main window by iconifying it, make sure to restore its geometry
if(init_gui)
{
darktable_splash_screen_destroy();
// unhide the main window and restore its geometry to that saved in the config file
gtk_widget_set_visible(dt_ui_main_window(darktable.gui->ui), TRUE);
dt_gui_gtk_load_config();
// gtk_widget_show_all(dt_ui_main_window(darktable.gui->ui));
gtk_window_deiconify(GTK_WINDOW(dt_ui_main_window(darktable.gui->ui)));
}

dt_print(DT_DEBUG_CONTROL,
Expand Down
19 changes: 9 additions & 10 deletions src/gui/gtk.c
Original file line number Diff line number Diff line change
Expand Up @@ -880,10 +880,7 @@ static gboolean _gui_quit_callback(GtkWidget *widget,
dt_dev_write_history(darktable.develop);

if(dt_check_gimpmode_ok("file"))
{
darktable.gimp.error = !dt_export_gimp_file(darktable.gimp.imgid);
dt_image_write_sidecar_file(darktable.gimp.imgid);
}

dt_control_quit();
}
Expand All @@ -908,10 +905,7 @@ static void _quit_callback(dt_action_t *action)
{
dt_dev_write_history(darktable.develop);
if(dt_check_gimpmode_ok("file"))
{
darktable.gimp.error = !dt_export_gimp_file(darktable.gimp.imgid);
dt_image_write_sidecar_file(darktable.gimp.imgid);
}
}

dt_control_quit();
Expand Down Expand Up @@ -1723,13 +1717,20 @@ static void _init_widgets(dt_gui_gtk_t *gui)

// Showing everything, to ensure proper instantiation and initialization
// then we hide the scroll bars and popup messages again
// before doing this, request that the window be minimized (some WMs
// don't support this, so we can hide it below, but that had issues)
// gtk_window_iconify(GTK_WINDOW(dt_ui_main_window(gui->ui)));
// unfortunately, on some systems the above results in a window which can only be manually deiconified....
gtk_widget_show_all(dt_ui_main_window(gui->ui));
gtk_widget_set_visible(dt_ui_log_msg(gui->ui), FALSE);
gtk_widget_set_visible(dt_ui_toast_msg(gui->ui), FALSE);
gtk_widget_set_visible(gui->scrollbars.hscrollbar, FALSE);
gtk_widget_set_visible(gui->scrollbars.vscrollbar, FALSE);
// hide the main window, so that it doesn't cover up the splash screen
gtk_widget_set_visible(dt_ui_main_window(gui->ui), FALSE);

// if the WM doesn't support minimization, we want to hide the
// window so that we don't actually see it until the rest of the
// initialization is complete
// gtk_widget_hide(dt_ui_main_window(gui->ui)); //FIXME: on some systems, the main window never un-hides later...

// finally, process all accumulated GUI events so that everything is properly
// set up before proceeding
Expand Down Expand Up @@ -4388,7 +4389,6 @@ void dt_gui_cursor_set_busy()
GtkWidget *toplevel = darktable.gui->ui->main_window;
GdkWindow *window = gtk_widget_get_window(toplevel);
busy_prev_cursor = gdk_window_get_cursor(window);
g_object_ref(busy_prev_cursor);
GdkCursor *watch = gdk_cursor_new_for_display(gtk_widget_get_display(toplevel), GDK_WATCH);
gdk_window_set_cursor(window, watch);
g_object_unref(watch);
Expand All @@ -4413,7 +4413,6 @@ void dt_gui_cursor_clear_busy()
GdkWindow *window = gtk_widget_get_window(toplevel);
gdk_window_set_cursor(window, busy_prev_cursor);
dt_gui_process_events();
g_object_unref(busy_prev_cursor);
busy_prev_cursor = NULL;
dt_control_allow_change_cursor();
gtk_grab_remove(darktable.control->progress_system.proxy.module->widget);
Expand Down
3 changes: 2 additions & 1 deletion src/gui/splash.c
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
This file is part of darktable,
Copyright (C) 2024-2025 darktable developers.
Copyright (C) 2024 darktable developers.

darktable is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
Expand Down Expand Up @@ -257,6 +257,7 @@ void darktable_splash_screen_create(GtkWindow *parent_window,
gtk_window_set_decorated(GTK_WINDOW(splash_screen), FALSE);
gtk_widget_show_all(splash_screen);
gtk_widget_hide(GTK_WIDGET(remaining_box));
gtk_window_set_keep_above(GTK_WINDOW(splash_screen), TRUE);
_process_all_gui_events();
}

Expand Down
2 changes: 0 additions & 2 deletions src/libs/lib.c
Original file line number Diff line number Diff line change
Expand Up @@ -976,7 +976,6 @@ static gboolean _lib_plugin_arrow_button_press(GtkWidget *w,
!dt_modifier_is(e->state, GDK_SHIFT_MASK))
{
const dt_view_t *v = dt_view_manager_get_current_view(darktable.view_manager);
const uint32_t side = dt_lib_get_container(module);
gboolean all_other_closed = TRUE;
uint32_t side = dt_lib_get_container(module);
for(const GList *it = darktable.lib->plugins; it; it = g_list_next(it))
Expand Down Expand Up @@ -1038,7 +1037,6 @@ static void show_module_callback(dt_lib_module_t *module)
if(dt_conf_get_bool("lighttable/ui/single_module"))
{
const dt_view_t *v = dt_view_manager_get_current_view(darktable.view_manager);
const uint32_t side = dt_lib_get_container(module);
gboolean all_other_closed = TRUE;
uint32_t side = dt_lib_get_container(module);
for(const GList *it = darktable.lib->plugins; it; it = g_list_next(it))
Expand Down
49 changes: 13 additions & 36 deletions src/libs/styles.c
Original file line number Diff line number Diff line change
Expand Up @@ -225,8 +225,9 @@ static void _styles_row_activated_callback(GtkTreeView *view,
dt_lib_styles_t *d)
{
// This works on double click, so it's for single style
GtkTreeModel *model = gtk_tree_view_get_model(d->tree);
GtkTreeModel *model;
GtkTreeIter iter;
model = gtk_tree_view_get_model(d->tree);

if(!gtk_tree_model_get_iter(model, &iter, path)) return;

Expand All @@ -235,24 +236,15 @@ static void _styles_row_activated_callback(GtkTreeView *view,

if(name)
{
// When module is on darkroom, use specific apply routine
if(dt_view_get_current() == DT_VIEW_DARKROOM)
GList *imgs = dt_act_on_get_images(TRUE, TRUE, FALSE);
if(imgs)
{
dt_styles_apply_to_dev(name, darktable.develop->image_storage.id);
GList *styles = g_list_prepend(NULL, g_strdup(name));
gboolean duplicate = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(d->duplicate));
dt_control_apply_styles(imgs, styles, duplicate);
}
else
{
GList *imgs = dt_act_on_get_images(TRUE, TRUE, FALSE);
if(imgs)
{
GList *styles = g_list_prepend(NULL, g_strdup(name));
const gboolean duplicate =
gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(d->duplicate));
dt_control_apply_styles(imgs, styles, duplicate);
}
else
dt_control_log(_("no images selected"));
}
dt_control_log(_("no images selected"));
}
}

Expand Down Expand Up @@ -287,29 +279,14 @@ static void _apply_clicked(GtkWidget *w, dt_lib_styles_t *d)

if(style_names == NULL) return;

// When module is on darkroom, use specific apply routine
if(dt_view_get_current() == DT_VIEW_DARKROOM)
GList *imgs = dt_act_on_get_images(TRUE, TRUE, FALSE);
if(!g_list_is_empty(imgs))
{
for(GList *s = g_list_first(style_names);
s;
s = g_list_next(s))
{
const char *name = (char *)s->data;
dt_styles_apply_to_dev(name, darktable.develop->image_storage.id);
}
gboolean duplicate = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(d->duplicate));
dt_control_apply_styles(imgs, style_names, duplicate);
}
else
{
GList *imgs = dt_act_on_get_images(TRUE, TRUE, FALSE);
if(!g_list_is_empty(imgs))
{
const gboolean duplicate =
gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(d->duplicate));
dt_control_apply_styles(imgs, style_names, duplicate);
}
else
g_list_free_full(style_names, g_free);
}
g_list_free_full(style_names, g_free);
}

static void _create_clicked(GtkWidget *w, dt_lib_styles_t *d)
Expand Down