From 087959c84e4fee1d6b110865d34f32994e1f7822 Mon Sep 17 00:00:00 2001 From: Ivan Dmitrievich Yartsev Date: Wed, 15 Apr 2026 15:57:48 +0600 Subject: [PATCH] Added new function --- source/libublsettings-gtk3-misc.c | 9 +++++++++ source/libublsettings-gtk3.h | 2 ++ 2 files changed, 11 insertions(+) diff --git a/source/libublsettings-gtk3-misc.c b/source/libublsettings-gtk3-misc.c index f3df043..aa9071e 100644 --- a/source/libublsettings-gtk3-misc.c +++ b/source/libublsettings-gtk3-misc.c @@ -553,4 +553,13 @@ gboolean _yon_gtk_combo_box_block_scroll(GtkWidget *self, GdkEvent *event, void* void yon_gtk_combo_box_block_scroll(GtkComboBox *target){ g_signal_connect(G_OBJECT(target),"scroll-event",G_CALLBACK(_yon_gtk_combo_box_block_scroll),NULL); +} + +gboolean __yon_destroy_block(GtkWidget *self){ + gtk_widget_hide(self); + return 1; +} + +void yon_gtk_widget_block_destruction(GtkWidget *target){ + g_signal_connect(G_OBJECT(target),"delete-event",G_CALLBACK(__yon_destroy_block),NULL); } \ No newline at end of file diff --git a/source/libublsettings-gtk3.h b/source/libublsettings-gtk3.h index 966b726..56d3182 100644 --- a/source/libublsettings-gtk3.h +++ b/source/libublsettings-gtk3.h @@ -759,4 +759,6 @@ char *yon_timezone_get_utc(const char *timezone); /// @return A newly allocated string with converted representation of bytes char *yon_size_long_convert_automatic_to_string(unsigned long bytes); +void yon_gtk_widget_block_destruction(GtkWidget *target); + #endif \ No newline at end of file