[Xfce4-commits] <xfdesktop:danielm/port-to-gio> - Rename two variables(after the port), so we don't get confused by using XfdesktopRegularFileIcon and XfdesktopFileIcon

Jannis Pohlmann noreply at xfce.org
Sun Aug 29 21:14:08 CEST 2010


Updating branch refs/heads/danielm/port-to-gio
         to e69bb9e3d5a991dc417443f3835515a951c2cb94 (commit)
       from 8ff41c3f9a734486b38f64ba936b2ed13c9f0922 (commit)

commit e69bb9e3d5a991dc417443f3835515a951c2cb94
Author: Daniel Morales <daniel at daniel.com.uy>
Date:   Tue Feb 16 17:25:52 2010 -0200

    - Rename two variables(after the port), so we don't get
     confused by using XfdesktopRegularFileIcon and XfdesktopFileIcon

 src/xfdesktop-regular-file-icon.c |   32 ++++++++++++++++----------------
 1 files changed, 16 insertions(+), 16 deletions(-)

diff --git a/src/xfdesktop-regular-file-icon.c b/src/xfdesktop-regular-file-icon.c
index f5478ab..a0dbe25 100644
--- a/src/xfdesktop-regular-file-icon.c
+++ b/src/xfdesktop-regular-file-icon.c
@@ -357,11 +357,11 @@ static void
 xfdesktop_regular_file_icon_drag_job_finished(XfdesktopJob *job,
                                               gpointer user_data)
 {
-    XfdesktopRegularFileIcon *regular_file_icon = XFDESKTOP_REGULAR_FILE_ICON(user_data);
+    XfdesktopFileIcon *file_icon = XFDESKTOP_FILE_ICON(user_data);
     XfdesktopFileIcon *src_file_icon = g_object_get_data(G_OBJECT(job),
                                                          "--xfdesktop-src-file-icon");
     
-    if(!xfdesktop_file_icon_remove_active_job(XFDESKTOP_FILE_ICON(regular_file_icon), job))
+    if(!xfdesktop_file_icon_remove_active_job(file_icon, job))
         g_critical("XfdesktopJob 0x%p not found in active jobs list", job);
     
     if(!xfdesktop_file_icon_remove_active_job(src_file_icon, job))
@@ -370,7 +370,7 @@ xfdesktop_regular_file_icon_drag_job_finished(XfdesktopJob *job,
     g_object_unref(G_OBJECT(job));
     
     g_object_unref(G_OBJECT(src_file_icon));
-    g_object_unref(G_OBJECT(regular_file_icon));
+    g_object_unref(G_OBJECT(file_icon));
 }
 
 static gboolean
@@ -378,26 +378,26 @@ xfdesktop_regular_file_icon_do_drop_dest(XfdesktopIcon *icon,
                                          XfdesktopIcon *src_icon,
                                          GdkDragAction action)
 {
-    XfdesktopFileIcon *regular_file_icon = XFDESKTOP_FILE_ICON(icon);
+    XfdesktopFileIcon *file_icon = XFDESKTOP_FILE_ICON(icon);
     XfdesktopFileIcon *src_file_icon = XFDESKTOP_FILE_ICON(src_icon);
     
     DBG("entering");
     
-    g_return_val_if_fail(regular_file_icon && src_file_icon, FALSE);
+    g_return_val_if_fail(file_icon && src_file_icon, FALSE);
     g_return_val_if_fail(xfdesktop_regular_file_icon_get_allowed_drop_actions(icon) != 0,
                          FALSE);
     
-    g_return_val_if_fail(G_IS_FILE(regular_file_icon->gfile), FALSE);
+    g_return_val_if_fail(G_IS_FILE(file_icon->gfile), FALSE);
     g_return_val_if_fail(G_IS_FILE(src_file_icon->gfile), FALSE);
     
-    if(xfdesktop_file_utils_is_executable(regular_file_icon)) {
+    if(xfdesktop_file_utils_is_executable(file_icon)) {
 #if 0
         GList *path_list = g_list_prepend(NULL, src_info->path);
         GError *error = NULL;
         gboolean succeeded;
         
-        succeeded = thunar_vfs_info_execute(regular_file_icon->priv->info,
-                                            regular_file_icon->priv->gscreen,
+        succeeded = thunar_vfs_info_execute(file_icon->priv->info,
+                                            file_icon->priv->gscreen,
                                             path_list,
                                             xfce_get_homedir(),
                                             &error);
@@ -405,7 +405,7 @@ xfdesktop_regular_file_icon_do_drop_dest(XfdesktopIcon *icon,
         
         if(!succeeded) {
             gchar *primary = g_markup_printf_escaped(_("Failed to run \"%s\":"),
-                                                     regular_file_icon->priv->info->display_name);
+                                                     file_icon->priv->info->display_name);
             xfce_message_dialog(NULL, _("Run Error"), GTK_STOCK_DIALOG_ERROR,
                                 primary, error->message,
                                 GTK_STOCK_CLOSE, GTK_RESPONSE_ACCEPT, NULL);
@@ -428,7 +428,7 @@ xfdesktop_regular_file_icon_do_drop_dest(XfdesktopIcon *icon,
         if(!name)
             return FALSE;
         
-        dest_path = g_file_resolve_relative_path(regular_file_icon->gfile,
+        dest_path = g_file_resolve_relative_path(file_icon->gfile,
                                                  name);
         g_free(name);
 
@@ -462,12 +462,12 @@ xfdesktop_regular_file_icon_do_drop_dest(XfdesktopIcon *icon,
             
             /* ensure they aren't destroyed until the job is finished */
             g_object_ref(G_OBJECT(src_file_icon));
-            g_object_ref(G_OBJECT(regular_file_icon));
+            g_object_ref(G_OBJECT(file_icon));
             
             g_object_set_data(G_OBJECT(job), "--xfdesktop-file-icon-callback",
                               G_CALLBACK(xfdesktop_regular_file_icon_drag_job_finished));
             g_object_set_data(G_OBJECT(job), "--xfdesktop-file-icon-data", icon);
-            xfdesktop_file_icon_add_active_job(XFDESKTOP_FILE_ICON(regular_file_icon),
+            xfdesktop_file_icon_add_active_job(XFDESKTOP_FILE_ICON(file_icon),
                                                job);
             xfdesktop_file_icon_add_active_job(src_file_icon, job);
             
@@ -481,15 +481,15 @@ xfdesktop_regular_file_icon_do_drop_dest(XfdesktopIcon *icon,
                                                  : XFDESKTOP_FILE_UTILS_FILEOP_LINK)));
             g_signal_connect(G_OBJECT(job), "error",
                              G_CALLBACK(xfdesktop_regular_file_icon_drag_job_error),
-                             regular_file_icon);
+                             file_icon);
 #if 0
             g_signal_connect(G_OBJECT(job), "ask",
                              G_CALLBACK(xfdesktop_regular_file_icon_interactive_job_ask),
-                             regular_file_icon);
+                             file_icon);
 #endif
             g_signal_connect(G_OBJECT(job), "finished",
                              G_CALLBACK(xfdesktop_regular_file_icon_drag_job_finished),
-                             regular_file_icon);
+                             file_icon);
             
             return TRUE;
         } else



More information about the Xfce4-commits mailing list