Skip to content

Commit

Permalink
unregister signal handlers
Browse files Browse the repository at this point in the history
  • Loading branch information
zisoft committed Dec 17, 2024
1 parent 3fdc491 commit 1b303b6
Show file tree
Hide file tree
Showing 8 changed files with 11 additions and 11 deletions.
7 changes: 1 addition & 6 deletions src/common/exif.cc
Original file line number Diff line number Diff line change
Expand Up @@ -420,12 +420,7 @@ const char *dt_xmp_keys[]
"Xmp.darktable.change_timestamp", "Xmp.darktable.export_timestamp",
"Xmp.darktable.print_timestamp", "Xmp.darktable.version_name",
"Xmp.darktable.harmony_guide_type", "Xmp.darktable.harmony_guide_rotation",
"Xmp.darktable.harmony_guide_width",
"Xmp.acdsee.notes", "Xmp.dc.creator",
"Xmp.dc.publisher", "Xmp.dc.title",
"Xmp.dc.description", "Xmp.dc.rights",
"Xmp.dc.format", "Xmp.xmpMM.DerivedFrom",
"Xmp.xmpMM.PreservedFileName" };
"Xmp.darktable.harmony_guide_width" };

// The number of XmpBag XmpSeq keys that dt uses
static const guint dt_xmp_keys_n = G_N_ELEMENTS(dt_xmp_keys);
Expand Down
3 changes: 3 additions & 0 deletions src/gui/gtkentry.c
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,9 @@ static gboolean _on_match_func(GtkEntryCompletion *completion, const gchar *key,
*/
void dt_gtkentry_setup_variables_completion(GtkEntry *entry)
{
if(!entry)
return;

GtkEntryCompletion *completion = gtk_entry_get_completion(entry);
if(completion)
{
Expand Down
1 change: 1 addition & 0 deletions src/imageio/storage/disk.c
Original file line number Diff line number Diff line change
Expand Up @@ -299,6 +299,7 @@ void gui_init(dt_imageio_module_storage_t *self)

void gui_cleanup(dt_imageio_module_storage_t *self)
{
DT_CONTROL_SIGNAL_DISCONNECT(_setup_variables_completion, self);
free(self->gui_data);
}

Expand Down
1 change: 1 addition & 0 deletions src/imageio/storage/gallery.c
Original file line number Diff line number Diff line change
Expand Up @@ -236,6 +236,7 @@ void gui_init(dt_imageio_module_storage_t *self)

void gui_cleanup(dt_imageio_module_storage_t *self)
{
DT_CONTROL_SIGNAL_DISCONNECT(_setup_variables_completion, self);
free(self->gui_data);
}

Expand Down
1 change: 1 addition & 0 deletions src/imageio/storage/latex.c
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,7 @@ void gui_init(dt_imageio_module_storage_t *self)

void gui_cleanup(dt_imageio_module_storage_t *self)
{
DT_CONTROL_SIGNAL_DISCONNECT(_setup_variables_completion, self);
free(self->gui_data);
}

Expand Down
1 change: 1 addition & 0 deletions src/imageio/storage/piwigo.c
Original file line number Diff line number Diff line change
Expand Up @@ -1199,6 +1199,7 @@ void gui_init(dt_imageio_module_storage_t *self)

void gui_cleanup(dt_imageio_module_storage_t *self)
{
DT_CONTROL_SIGNAL_DISCONNECT(_setup_variables_completion, self);
g_free(self->gui_data);
}

Expand Down
7 changes: 2 additions & 5 deletions src/iop/watermark.c
Original file line number Diff line number Diff line change
Expand Up @@ -1294,13 +1294,9 @@ void init(dt_iop_module_t *self)

static void _setup_variables_completion(gpointer instance, int type, dt_iop_module_t *self)
{
if(type != DT_METADATA_SIGNAL_PREF_CHANGED)
return;

dt_iop_watermark_gui_data_t *g = self->gui_data;

if(g)
{
if(type == DT_METADATA_SIGNAL_PREF_CHANGED) {
++darktable.gui->reset;
dt_gtkentry_setup_variables_completion(GTK_ENTRY(g->text));
--darktable.gui->reset;
Expand Down Expand Up @@ -1452,6 +1448,7 @@ void gui_init(dt_iop_module_t *self)

void gui_cleanup(dt_iop_module_t *self)
{
DT_CONTROL_SIGNAL_DISCONNECT(_setup_variables_completion, self);
dt_iop_watermark_gui_data_t *g = self->gui_data;
g_list_free_full(g->watermarks_filenames, g_free);
g->watermarks_filenames = NULL;
Expand Down
1 change: 1 addition & 0 deletions src/libs/collect.c
Original file line number Diff line number Diff line change
Expand Up @@ -3835,6 +3835,7 @@ void gui_cleanup(dt_lib_module_t *self)
DT_CONTROL_SIGNAL_DISCONNECT(filmrolls_removed, self);
DT_CONTROL_SIGNAL_DISCONNECT(tag_changed, self);
DT_CONTROL_SIGNAL_DISCONNECT(_geotag_changed, self);
DT_CONTROL_SIGNAL_DISCONNECT(_metadata_changed, self);
DT_CONTROL_SIGNAL_DISCONNECT(view_set_click, self);
darktable.view_manager->proxy.module_collect.module = NULL;
free(d->params);
Expand Down

0 comments on commit 1b303b6

Please sign in to comment.