[file-roller/wip/jtojnar/gtk4] dlg-extract: Use meaningful names for the split callback funcs



commit ccd935625c1b1668a1ec32bb2a0e84dfa0ec8f01
Author: Jan Tojnar <jtojnar gmail com>
Date:   Fri Dec 17 00:21:38 2021 +0100

    dlg-extract: Use meaningful names for the split callback funcs

 src/dlg-extract.c | 28 ++++++++++++++--------------
 1 file changed, 14 insertions(+), 14 deletions(-)
---
diff --git a/src/dlg-extract.c b/src/dlg-extract.c
index c6ffdb25..ef643f86 100644
--- a/src/dlg-extract.c
+++ b/src/dlg-extract.c
@@ -63,10 +63,10 @@ file_selector_destroy_cb (GtkWidget  *widget,
        g_free (data);
 }
 
-static void extract_cb1 (GtkWidget *w, DialogData *data);
-static void extract_cb2 (GtkWidget *w, DialogData *data);
-static void extract_cb3 (GtkWidget *w, DialogData *data);
-static void extract_cb4 (GtkWidget *w, DialogData *data);
+static void extract_cb_possibly_try_to_create_destination_directory (GtkWidget *w, DialogData *data);
+static void extract_cb_check_whether_preparing_destination_failed (GtkWidget *w, DialogData *data);
+static void extract_cb_check_permissions (GtkWidget *w, DialogData *data);
+static void extract_cb_start_extracting (GtkWidget *w, DialogData *data);
 static void create_destination_response_cb (GtkWidget *widget, int response, DialogData *data);
 
 static void
@@ -102,10 +102,10 @@ extract_cb (GtkWidget   *w,
                        g_signal_connect (d, "response", G_CALLBACK (create_destination_response_cb), data);
                        gtk_widget_show (d);
                } else {
-                       extract_cb1 (w, data);
+                       extract_cb_possibly_try_to_create_destination_directory (w, data);
                }
        } else {
-               extract_cb2 (w, data);
+               extract_cb_check_whether_preparing_destination_failed (w, data);
        }
 }
 
@@ -121,12 +121,12 @@ create_destination_response_cb (GtkWidget    *widget,
                data->do_not_extract = TRUE;
        }
 
-       extract_cb1 (widget, data);
+       extract_cb_possibly_try_to_create_destination_directory (widget, data);
 }
 
 
 static void
-extract_cb1 (GtkWidget   *w,
+extract_cb_possibly_try_to_create_destination_directory (GtkWidget   *w,
            DialogData  *data)
 {
        g_autofree GError *error = NULL;
@@ -142,7 +142,7 @@ extract_cb1 (GtkWidget   *w,
                g_signal_connect (d, "response", G_CALLBACK (gtk_widget_destroy), NULL);
                gtk_widget_show (d);
        } else {
-               extract_cb2 (w, data);
+               extract_cb_check_whether_preparing_destination_failed (w, data);
        }
 }
 
@@ -161,7 +161,7 @@ extraction_not_performed_cb (GtkWidget    *widget,
 
 
 static void
-extract_cb2 (GtkWidget   *w,
+extract_cb_check_whether_preparing_destination_failed (GtkWidget   *w,
            DialogData  *data)
 {
        if (data->do_not_extract) {
@@ -177,13 +177,13 @@ extract_cb2 (GtkWidget   *w,
                g_signal_connect (d, "response", G_CALLBACK (extraction_not_performed_cb), data);
                gtk_widget_show (d);
        } else {
-               extract_cb3 (w, data);
+               extract_cb_check_permissions (w, data);
        }
 }
 
 
 static void
-extract_cb3 (GtkWidget   *w,
+extract_cb_check_permissions (GtkWidget   *w,
            DialogData  *data)
 {
        /* check extraction directory permissions. */
@@ -205,13 +205,13 @@ extract_cb3 (GtkWidget   *w,
                g_signal_connect (d, "response", G_CALLBACK (gtk_widget_destroy), NULL);
                gtk_widget_show (d);
        } else {
-               extract_cb4 (w, data);
+               extract_cb_start_extracting (w, data);
        }
 }
 
 
 static void
-extract_cb4 (GtkWidget   *w,
+extract_cb_start_extracting (GtkWidget   *w,
            DialogData  *data)
 {
        FrWindow   *window = data->window;


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