[balsa/gtk3] Simplify BalsaMailboxConfView destruction



commit c63a2dbce0bdf6e66379ca01c4702c0ffcdb0c2f
Author: Peter Bloomfield <PeterBloomfield bellsouth net>
Date:   Tue Feb 3 17:27:13 2015 -0500

    Simplify BalsaMailboxConfView destruction
    
        * src/mailbox-conf.c (mailbox_conf_view_new_full): use g_free as
        a weak-ref-notify instead of a wrapper.

 ChangeLog          |    7 +++++++
 src/mailbox-conf.c |   10 +---------
 2 files changed, 8 insertions(+), 9 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 14a00d4..2f2d580 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2015-02-03  Peter Bloomfield  <pbloomfield bellsouth net>
+
+       Simplify BalsaMailboxConfView destruction
+
+       * src/mailbox-conf.c (mailbox_conf_view_new_full): use g_free as
+       a weak-ref-notify instead of a wrapper.
+
 2015-02-02  Peter Bloomfield  <pbloomfield bellsouth net>
 
        Simplify notebook-label destruction
diff --git a/src/mailbox-conf.c b/src/mailbox-conf.c
index ce8f89c..a3beb34 100644
--- a/src/mailbox-conf.c
+++ b/src/mailbox-conf.c
@@ -1396,13 +1396,6 @@ create_imap_mailbox_dialog(MailboxConfWindow *mcw)
  * Other aspects like sort column and sort order are just remembered
  * when the user changes them with the GtkTreeView controls. */
 
-/* Free a BalsaMailboxConfView. */
-static void
-mailbox_conf_view_free(BalsaMailboxConfView *view_info)
-{
-    g_free(view_info);
-}
-
 /* Create the dialog items in the dialog's grid, and allocate and
  * populate a BalsaMailboxConfView with the info that needs to be passed
  * around. The memory is deallocated when the window is finalized. 
@@ -1430,8 +1423,7 @@ mailbox_conf_view_new_full(LibBalsaMailbox * mailbox,
     gint active;
 
     view_info = g_new(BalsaMailboxConfView, 1);
-    g_object_weak_ref(G_OBJECT(window),
-                      (GWeakNotify) mailbox_conf_view_free, view_info);
+    g_object_weak_ref(G_OBJECT(window), (GWeakNotify) g_free, view_info);
     view_info->window = window;
 
     label = libbalsa_create_grid_label(_("_Identity:"), grid, row);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]