[gnome-commander] Killed dead code



commit 3a49d86d70c48fa95247c4a93df1f9579f7f95cf
Author: Piotr Eljasiak <epiotr src gnome org>
Date:   Tue Oct 27 22:46:23 2009 +0100

    Killed dead code

 src/gnome-cmd-prepare-copy-dialog.cc |   12 +++---------
 src/gnome-cmd-prepare-move-dialog.cc |   11 ++---------
 2 files changed, 5 insertions(+), 18 deletions(-)
---
diff --git a/src/gnome-cmd-prepare-copy-dialog.cc b/src/gnome-cmd-prepare-copy-dialog.cc
index ff6c610..0fd41d2 100644
--- a/src/gnome-cmd-prepare-copy-dialog.cc
+++ b/src/gnome-cmd-prepare-copy-dialog.cc
@@ -77,15 +77,11 @@ void gnome_cmd_prepare_copy_dialog_show (GnomeCmdFileSelector *from, GnomeCmdFil
     PrepareCopyData *data = g_new0 (PrepareCopyData, 1);
     gchar *dest_dir_frame_msg, *text;
     GtkWidget *label;
-    GList *tmp = from->file_list()->get_selected_files();
-
-    if (!tmp)
-    {
-        g_list_free (tmp);
-        return;
-    }
 
     data->dialog = GNOME_CMD_PREPARE_XFER_DIALOG (gnome_cmd_prepare_xfer_dialog_new (from, to));
+
+    g_return_if_fail (data->dialog->src_files != NULL);
+
     gtk_window_set_title (GTK_WINDOW (data->dialog), _("Copy"));
     gtk_widget_ref (GTK_WIDGET (data->dialog));
 
@@ -135,8 +131,6 @@ void gnome_cmd_prepare_copy_dialog_show (GnomeCmdFileSelector *from, GnomeCmdFil
     gtk_label_set_markup (GTK_LABEL (label), text);
     g_free (text);
 
-    g_return_if_fail (data->dialog->src_files != NULL);
-
     gint num_files = g_list_length (data->dialog->src_files);
 
     if (num_files == 1)
diff --git a/src/gnome-cmd-prepare-move-dialog.cc b/src/gnome-cmd-prepare-move-dialog.cc
index b129ecb..bbf0b6a 100644
--- a/src/gnome-cmd-prepare-move-dialog.cc
+++ b/src/gnome-cmd-prepare-move-dialog.cc
@@ -71,15 +71,10 @@ void gnome_cmd_prepare_move_dialog_show (GnomeCmdFileSelector *from, GnomeCmdFil
     gchar *dest_dir_frame_msg, *text;
     GtkWidget *label;
 
-    GList *tmp = from->file_list()->get_selected_files();
+    data->dialog = GNOME_CMD_PREPARE_XFER_DIALOG (gnome_cmd_prepare_xfer_dialog_new (from, to));
 
-    if (!tmp)
-    {
-        g_list_free (tmp);
-        return;
-    }
+    g_return_if_fail (data->dialog->src_files != NULL);
 
-    data->dialog = GNOME_CMD_PREPARE_XFER_DIALOG (gnome_cmd_prepare_xfer_dialog_new (from, to));
     gtk_window_set_title (GTK_WINDOW (data->dialog), _("Move"));
     gtk_widget_ref (GTK_WIDGET (data->dialog));
 
@@ -122,8 +117,6 @@ void gnome_cmd_prepare_move_dialog_show (GnomeCmdFileSelector *from, GnomeCmdFil
     gtk_label_set_markup (GTK_LABEL (label), text);
     g_free (text);
 
-    g_return_if_fail (data->dialog->src_files != NULL);
-
     gint num_files = g_list_length (data->dialog->src_files);
 
     if (num_files == 1)



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