Commit 12428ea7 authored by Michael Natterer's avatar Michael Natterer 😴

app: add dialogs_destroy_dialog(), destroys an attached dialog by its key

parent c5957f14
......@@ -729,3 +729,18 @@ dialogs_detach_dialog (GObject *attach_object,
dialogs_destroy_dialog (GObject *attach_object,
const gchar *attach_key)
GtkWidget *dialog;
g_return_if_fail (G_IS_OBJECT (attach_object));
g_return_if_fail (attach_key != NULL);
dialog = g_object_get_data (attach_object, attach_key);
if (dialog)
gtk_widget_destroy (dialog);
......@@ -43,6 +43,8 @@ void dialogs_attach_dialog (GObject *attach_object,
GtkWidget *dialog);
void dialogs_detach_dialog (GObject *attach_object,
GtkWidget *dialog);
void dialogs_destroy_dialog (GObject *attach_object,
const gchar *attach_key);
#endif /* __DIALOGS_H__ */
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment