[easytag/wip/musicbrainz-support-merge: 51/69] Use et_music_brainz_dialog_clear()
- From: David King <davidk src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [easytag/wip/musicbrainz-support-merge: 51/69] Use et_music_brainz_dialog_clear()
- Date: Mon, 1 Sep 2014 19:33:13 +0000 (UTC)
commit 816c2727a9253fa91729426aa2b12c1915b98497
Author: Abhinav <abhijangda hotmail com>
Date: Tue Aug 12 16:38:23 2014 +0530
Use et_music_brainz_dialog_clear()
et_music_brainz_dialog_clear will unref and set dialog to NULL. Now
IS_ET_MUSICBRAINZ_DIALOG check is not required.
src/musicbrainz_dialog.c | 22 ++++++++++++++++++++--
1 files changed, 20 insertions(+), 2 deletions(-)
---
diff --git a/src/musicbrainz_dialog.c b/src/musicbrainz_dialog.c
index 89b3116..30e263b 100644
--- a/src/musicbrainz_dialog.c
+++ b/src/musicbrainz_dialog.c
@@ -2011,6 +2011,24 @@ et_apply_track_tag_to_et_file (Mb5Recording recording, ET_File *et_file)
}
/*
+ * et_music_brainz_dialog_clear:
+ * @widget: MusicBrainz Dialog
+ *
+ * Clears a MusicBrainz Object and set it to NULL
+ */
+static void
+et_music_brainz_dialog_clear (GtkWidget **widget)
+{
+ if (!widget || !*widget)
+ {
+ return;
+ }
+
+ et_music_brainz_dialog_destroy (*widget);
+ *widget = NULL;
+}
+
+/*
* et_music_brainz_dialog_destroy:
* @widget: MusicBrainz Dialog to destroy
*
@@ -2243,7 +2261,7 @@ mb5_search_error_callback (GObject *source, GAsyncResult *res,
if (mb_dialog_priv->exit_on_complete)
{
- et_music_brainz_dialog_destroy (mbDialog);
+ et_music_brainz_dialog_clear (&mbDialog);
}
}
@@ -2443,7 +2461,7 @@ et_open_musicbrainz_dialog ()
}
else
{
- et_music_brainz_dialog_destroy (mbDialog);
+ et_music_brainz_dialog_clear (&mbDialog);
}
}
#endif /* ENABLE_MUSICBRAINZ */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]