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



commit 86f25fa79ae935de5cc0bba3fe7c3534f21e6317
Author: Ekta Nandwani <mailnandwaniekta gmail com>
Date:   Tue Aug 15 20:05:12 2017 +0530

    Fix fatal warnings introduced in the previous commit

 src/gr-shopping-list-exporter.c |   10 ++++++++--
 1 files changed, 8 insertions(+), 2 deletions(-)
---
diff --git a/src/gr-shopping-list-exporter.c b/src/gr-shopping-list-exporter.c
index bd269b1..50151a3 100644
--- a/src/gr-shopping-list-exporter.c
+++ b/src/gr-shopping-list-exporter.c
@@ -491,11 +491,12 @@ 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);
 
                g_list_free_full (recipes, g_object_unref);
-               g_list_free_full (items, item_free);
+               //g_list_free_full (items, item_free);
 
                file = gtk_file_chooser_get_file (GTK_FILE_CHOOSER (self));
                g_file_replace_contents (file, text, -1, NULL, FALSE, 0, NULL, NULL, NULL);
@@ -529,6 +530,7 @@ mail_done (GObject      *source,
                 gtk_native_dialog_show (GTK_NATIVE_DIALOG (file_chooser));
                 return;
         }
+        close_dialog(exporter);
 }
 
 static void
@@ -544,7 +546,11 @@ 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);
+        if (!window)
+        {
+               g_print("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]