[recipes/todoist: 3/12] Fix fatal warnings introduced in the previous commit



commit 5f927e8178452999fe13c90f33047d726e9cab94
Author: Ekta Nandwani <mailnandwaniekta gmail com>
Date:   Fri Aug 18 07:08:57 2017 +0530

    Fix fatal warnings introduced in the previous commit

 src/gr-shopping-list-exporter.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/src/gr-shopping-list-exporter.c b/src/gr-shopping-list-exporter.c
index 68e9f28..65352ed 100644
--- a/src/gr-shopping-list-exporter.c
+++ b/src/gr-shopping-list-exporter.c
@@ -489,6 +489,7 @@ file_chooser_response (GtkNativeDialog  *self,
                recipes = gr_recipe_store_get_shopping_list (store);
 
                items = exporter->ingredients;
+               exporter->ingredients = NULL;
 
                text = gr_shopping_list_format (recipes, items);
 
@@ -527,6 +528,7 @@ mail_done (GObject      *source,
                 gtk_native_dialog_show (GTK_NATIVE_DIALOG (file_chooser));
                 return;
         }
+        close_dialog (exporter);
 }
 
 static void
@@ -542,7 +544,7 @@ share_list (GrShoppingListExporter *exporter)
         items = exporter->ingredients;
 
         text = gr_shopping_list_format (recipes, items);
-        window = gtk_widget_get_ancestor (GTK_WIDGET (exporter->dialog), GTK_TYPE_APPLICATION_WINDOW);
+        window = GTK_WIDGET (exporter->window);
 
         gr_send_mail (GTK_WINDOW (window),
                       NULL, _("Shopping List"), text, NULL,


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