[gnumeric] App: make sure to deregister extra-ui items correctly.



commit 0a813a62ce1f5d9986253696978c20058f86f912
Author: Morten Welinder <terra gnome org>
Date:   Sun Mar 30 17:30:13 2014 -0400

    App: make sure to deregister extra-ui items correctly.

 ChangeLog         |    5 +++++
 src/application.c |    5 +++++
 2 files changed, 10 insertions(+), 0 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 6533010..fd8838f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2014-03-30  Morten Welinder  <terra gnome org>
+
+       * src/application.c (gnm_app_remove_extra_ui): Remove from global
+       list of extra uis.
+
 2014-03-28  Morten Welinder  <terra gnome org>
 
        * src/main-application.c (main): Move Ubuntu hack earlier.
diff --git a/src/application.c b/src/application.c
index db6ba67..bd6185d 100644
--- a/src/application.c
+++ b/src/application.c
@@ -1553,12 +1553,17 @@ gnm_app_add_extra_ui (char const *group_name,
        extra_ui->layout = g_strdup (layout);
        extra_ui->user_data = user_data;
        g_signal_emit (G_OBJECT (app), signals[CUSTOM_UI_ADDED], 0, extra_ui);
+       if (gnm_debug_flag ("extra-ui"))
+               g_printerr ("Adding extra ui [%s] %p\n", group_name, extra_ui);
        return extra_ui;
 }
 
 void
 gnm_app_remove_extra_ui (GnmAppExtraUI *extra_ui)
 {
+       if (gnm_debug_flag ("extra-ui"))
+               g_printerr ("Removing extra ui %p\n", extra_ui);
+       extra_uis = g_slist_remove (extra_uis, extra_ui);
        g_signal_emit (G_OBJECT (app), signals[CUSTOM_UI_REMOVED], 0, extra_ui);
        g_free (extra_ui->group_name);
        g_free (extra_ui->layout);


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