[tepl] File saving: rename internal function save() to save_async_simple()



commit 6ffeff66f4d01ce5adbd9a5384fbd0cf6e664480
Author: Sébastien Wilmet <swilmet gnome org>
Date:   Sat Oct 28 11:01:12 2017 +0200

    File saving: rename internal function save() to save_async_simple()
    
    Better name, it permits to remove a comment.

 tepl/tepl-application-window.c |    4 ++--
 tepl/tepl-tab-saving.c         |   17 ++++++++++-------
 tepl/tepl-tab-saving.h         |   16 ++++++++--------
 3 files changed, 20 insertions(+), 17 deletions(-)
---
diff --git a/tepl/tepl-application-window.c b/tepl/tepl-application-window.c
index 43f74f5..a92f9ac 100644
--- a/tepl/tepl-application-window.c
+++ b/tepl/tepl-application-window.c
@@ -223,7 +223,7 @@ save_cb (GSimpleAction *save_action,
                TeplFileSaver *saver;
 
                saver = tepl_file_saver_new (buffer, file);
-               _tepl_tab_saving_save (tab, saver);
+               _tepl_tab_saving_save_async_simple (tab, saver);
                g_object_unref (saver);
        }
        else
@@ -251,7 +251,7 @@ save_file_chooser_response_cb (GtkFileChooserDialog *file_chooser_dialog,
                location = gtk_file_chooser_get_file (GTK_FILE_CHOOSER (file_chooser_dialog));
 
                saver = tepl_file_saver_new_with_target (buffer, file, location);
-               _tepl_tab_saving_save (tab, saver);
+               _tepl_tab_saving_save_async_simple (tab, saver);
                g_object_unref (saver);
 
                g_object_unref (location);
diff --git a/tepl/tepl-tab-saving.c b/tepl/tepl-tab-saving.c
index 0478af1..ebae7c1 100644
--- a/tepl/tepl-tab-saving.c
+++ b/tepl/tepl-tab-saving.c
@@ -123,9 +123,9 @@ _tepl_tab_saving_save_finish (TeplTab      *tab,
 }
 
 static void
-save_cb (GObject      *source_object,
-        GAsyncResult *result,
-        gpointer      user_data)
+save_async_simple_cb (GObject      *source_object,
+                     GAsyncResult *result,
+                     gpointer      user_data)
 {
        TeplTab *tab = TEPL_TAB (source_object);
 
@@ -133,17 +133,20 @@ save_cb (GObject      *source_object,
        g_object_unref (tab);
 }
 
-/* It's also an async function. Useful when we don't care about:
+/* Useful when we don't care about:
  * - when the operation is finished.
  * - the result.
  */
 void
-_tepl_tab_saving_save (TeplTab       *tab,
-                      TeplFileSaver *saver)
+_tepl_tab_saving_save_async_simple (TeplTab       *tab,
+                                   TeplFileSaver *saver)
 {
        g_return_if_fail (TEPL_IS_TAB (tab));
        g_return_if_fail (TEPL_IS_FILE_SAVER (saver));
 
        g_object_ref (tab);
-       _tepl_tab_saving_save_async (tab, saver, save_cb, NULL);
+       _tepl_tab_saving_save_async (tab,
+                                    saver,
+                                    save_async_simple_cb,
+                                    NULL);
 }
diff --git a/tepl/tepl-tab-saving.h b/tepl/tepl-tab-saving.h
index 61e2ae5..e6cd4ea 100644
--- a/tepl/tepl-tab-saving.h
+++ b/tepl/tepl-tab-saving.h
@@ -26,18 +26,18 @@
 G_BEGIN_DECLS
 
 G_GNUC_INTERNAL
-void           _tepl_tab_saving_save_async     (TeplTab             *tab,
-                                                TeplFileSaver       *saver,
-                                                GAsyncReadyCallback  callback,
-                                                gpointer             user_data);
+void           _tepl_tab_saving_save_async             (TeplTab             *tab,
+                                                        TeplFileSaver       *saver,
+                                                        GAsyncReadyCallback  callback,
+                                                        gpointer             user_data);
 
 G_GNUC_INTERNAL
-gboolean       _tepl_tab_saving_save_finish    (TeplTab      *tab,
-                                                GAsyncResult *result);
+gboolean       _tepl_tab_saving_save_finish            (TeplTab      *tab,
+                                                        GAsyncResult *result);
 
 G_GNUC_INTERNAL
-void           _tepl_tab_saving_save           (TeplTab       *tab,
-                                                TeplFileSaver *saver);
+void           _tepl_tab_saving_save_async_simple      (TeplTab       *tab,
+                                                        TeplFileSaver *saver);
 
 G_END_DECLS
 


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