2007-04-26 Murray Cumming <murrayc@murrayc.com>
authorMurray Cumming <murrayc@murrayc.com>
Thu, 26 Apr 2007 09:47:08 +0000 (09:47 +0000)
committerMurray Cumming <murrayc@murrayc.com>
Thu, 26 Apr 2007 09:47:08 +0000 (09:47 +0000)
* src/maemo/easysetup/modest-easysetup-wizard.c:
        (create_page_custom_incoming): Add the checkbox to the caption instead of adding the
        combo twice, to avoid an g_warning and to make it visible again.
        * src/maemo/modest-main-window.c: (on_account_update): Check whether the popup_menu is
        attached before detaching it, to avoid a g_warning, and add comment about the implicit
        (already intended) dereference when detaching, because we then recreate the menu.
        But I am not sure why the warning was happening, and it is possible that this is a memory
        leak.

pmo-trunk-r1675

ChangeLog2
src/maemo/easysetup/modest-easysetup-wizard.c
src/maemo/modest-main-window.c

index 4a0c6f2..ae43b6a 100644 (file)
@@ -1,3 +1,14 @@
+2007-04-26  Murray Cumming  <murrayc@murrayc.com>
+
+       * src/maemo/easysetup/modest-easysetup-wizard.c:
+       (create_page_custom_incoming): Add the checkbox to the caption instead of adding the 
+       combo twice, to avoid an g_warning and to make it visible again.
+       * src/maemo/modest-main-window.c: (on_account_update): Check whether the popup_menu is 
+       attached before detaching it, to avoid a g_warning, and add comment about the implicit 
+       (already intended) dereference when detaching, because we then recreate the menu.
+       But I am not sure why the warning was happening, and it is possible that this is a memory 
+       leak.
+
 2007-04-25  Murray Cumming  <murrayc@murrayc.com>
 
        * src/dbus_api/modest-dbus-callbacks.c: Added uri_unescape(),
index 7d294de..22d156d 100644 (file)
@@ -579,7 +579,7 @@ static GtkWidget* create_page_custom_incoming (ModestEasysetupWizardDialog *self
        if(!self->checkbox_incoming_auth)
                self->checkbox_incoming_auth = gtk_check_button_new ();
        caption = hildon_caption_new (sizegroup, _("mcen_li_emailsetup_secure_authentication"), 
-               self->combo_incoming_security, NULL, HILDON_CAPTION_OPTIONAL);
+               self->checkbox_incoming_auth, NULL, HILDON_CAPTION_OPTIONAL);
        gtk_widget_show (self->checkbox_incoming_auth);
        gtk_box_pack_start (GTK_BOX (box), caption, FALSE, FALSE, MODEST_MARGIN_HALF);
        gtk_widget_show (caption);
index 013b49b..f600969 100644 (file)
@@ -734,8 +734,13 @@ on_account_update (TnyAccountStore *account_store,
        if (!parent_priv->toolbar)
                return;
 
-       if (priv->accounts_popup)
+       if (priv->accounts_popup && gtk_menu_get_attach_widget (GTK_MENU (priv->accounts_popup)) ) {
+               /* gtk_menu_detach will also unreference the popup, 
+                * so we can forget about this instance, and create a new one later:
+                */
                gtk_menu_detach (GTK_MENU (priv->accounts_popup));
+               priv->accounts_popup = NULL;
+       }
 
        /* Get accounts */
        account_list = tny_simple_list_new ();