[gtk+/gtk-2-22] Clarify the name of a callback



commit 2c133ef76e7eceb1e0d980b15fb7d139c14047e4
Author: Stephen Shaw <sshaw decriptor com>
Date:   Tue Oct 5 12:59:45 2010 -0500

    Clarify the name of a callback
    
    The old save_entry_get_info_cb() was misnamed; it is actually used
    to see if a file's presumed parent *is* a folder.  So we rename
    it to name_entry_get_parent_info_cb().
    
    Signed-off-by: Federico Mena Quintero <federico novell com>
    (cherry picked from commit b6f4b7dbce1b1128296240fd95536ed69224cdad)

 gtk/gtkfilechooserdefault.c |   14 ++++++++------
 1 files changed, 8 insertions(+), 6 deletions(-)
---
diff --git a/gtk/gtkfilechooserdefault.c b/gtk/gtkfilechooserdefault.c
index 0499f3e..e8078a9 100644
--- a/gtk/gtkfilechooserdefault.c
+++ b/gtk/gtkfilechooserdefault.c
@@ -8314,10 +8314,10 @@ struct FileExistsData
 };
 
 static void
-save_entry_get_info_cb (GCancellable *cancellable,
-			GFileInfo    *info,
-			const GError *error,
-			gpointer      user_data)
+name_entry_get_parent_info_cb (GCancellable *cancellable,
+			       GFileInfo    *info,
+			       const GError *error,
+			       gpointer      user_data)
 {
   gboolean parent_is_folder;
   gboolean cancelled = g_cancellable_is_cancelled (cancellable);
@@ -8361,7 +8361,7 @@ save_entry_get_info_cb (GCancellable *cancellable,
 	  else
 	    g_signal_emit_by_name (data->impl, "response-requested");
 	}
-      else /* GTK_FILE_CHOOSER_ACTION_CREATE_FOLDER */
+      else if (data->impl->action == GTK_FILE_CHOOSER_ACTION_CREATE_FOLDER)
         {
 	  GError *error = NULL;
 
@@ -8374,6 +8374,8 @@ save_entry_get_info_cb (GCancellable *cancellable,
 	  else
 	    error_creating_folder_dialog (data->impl, data->file, error);
         }
+      else
+	g_assert_not_reached ();
     }
   else
     {
@@ -8475,7 +8477,7 @@ file_exists_get_info_cb (GCancellable *cancellable,
 	_gtk_file_system_get_info (data->impl->file_system,
 				   data->parent_file,
 				   "standard::type",
-				   save_entry_get_info_cb,
+				   name_entry_get_parent_info_cb,
 				   data);
       set_busy_cursor (data->impl, TRUE);
     }



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