[gnome-commander/gcmd-1-3] Moved gnome_cmd_file_list_show_chown_dialog() and gnome_cmd_file_list_show_chmod_dialog() to gnome-c



commit f28b478392fb70f7e8a9fd2b93e6bb75621126e9
Author: Piotr Eljasiak <epiotr src gnome org>
Date:   Mon Jul 27 18:37:45 2009 +0200

    Moved gnome_cmd_file_list_show_chown_dialog() and gnome_cmd_file_list_show_chmod_dialog() to gnome-cmd-user-actions.cc

 src/gnome-cmd-file-list.cc    |   36 ------------------------------------
 src/gnome-cmd-file-list.h     |    2 --
 src/gnome-cmd-user-actions.cc |   24 ++++++++++++++++++++++--
 3 files changed, 22 insertions(+), 40 deletions(-)
---
diff --git a/src/gnome-cmd-file-list.cc b/src/gnome-cmd-file-list.cc
index 7abecff..8a516af 100644
--- a/src/gnome-cmd-file-list.cc
+++ b/src/gnome-cmd-file-list.cc
@@ -34,8 +34,6 @@
 #include "gnome-cmd-style.h"
 #include "gnome-cmd-file-popmenu.h"
 #include "gnome-cmd-rename-dialog.h"
-#include "gnome-cmd-chown-dialog.h"
-#include "gnome-cmd-chmod-dialog.h"
 #include "gnome-cmd-delete-dialog.h"
 #include "gnome-cmd-quicksearch-popup.h"
 #include "gnome-cmd-file-collection.h"
@@ -1955,40 +1953,6 @@ void gnome_cmd_file_list_show_delete_dialog (GnomeCmdFileList *fl)
 }
 
 
-void gnome_cmd_file_list_show_chown_dialog (GnomeCmdFileList *fl)
-{
-    g_return_if_fail (GNOME_CMD_IS_FILE_LIST (fl));
-
-    GList *files = fl->get_selected_files();
-
-    if (files)
-    {
-        GtkWidget *dialog = gnome_cmd_chown_dialog_new (files);
-
-        gtk_widget_ref (dialog);
-        gtk_widget_show (dialog);
-        g_list_free (files);
-    }
-}
-
-
-void gnome_cmd_file_list_show_chmod_dialog (GnomeCmdFileList *fl)
-{
-    g_return_if_fail (GNOME_CMD_IS_FILE_LIST (fl));
-
-    GList *files = fl->get_selected_files();
-
-    if (files)
-    {
-        GtkWidget *dialog = gnome_cmd_chmod_dialog_new (files);
-
-        gtk_widget_ref (dialog);
-        gtk_widget_show (dialog);
-        g_list_free (files);
-    }
-}
-
-
 void gnome_cmd_file_list_show_properties_dialog (GnomeCmdFileList *fl)
 {
     g_return_if_fail (GNOME_CMD_IS_FILE_LIST (fl));
diff --git a/src/gnome-cmd-file-list.h b/src/gnome-cmd-file-list.h
index 45193d7..34ebf81 100644
--- a/src/gnome-cmd-file-list.h
+++ b/src/gnome-cmd-file-list.h
@@ -207,8 +207,6 @@ inline GnomeCmdFile *GnomeCmdFileList::get_selected_file()
 
 void gnome_cmd_file_list_compare_directories (GnomeCmdFileList *fl1, GnomeCmdFileList *fl2);
 
-void gnome_cmd_file_list_show_chmod_dialog (GnomeCmdFileList *fl);
-void gnome_cmd_file_list_show_chown_dialog (GnomeCmdFileList *fl);
 void gnome_cmd_file_list_show_delete_dialog (GnomeCmdFileList *fl);
 void gnome_cmd_file_list_show_properties_dialog (GnomeCmdFileList *fl);
 void gnome_cmd_file_list_show_rename_dialog (GnomeCmdFileList *fl);
diff --git a/src/gnome-cmd-user-actions.cc b/src/gnome-cmd-user-actions.cc
index 5c7df2e..52f3938 100644
--- a/src/gnome-cmd-user-actions.cc
+++ b/src/gnome-cmd-user-actions.cc
@@ -42,6 +42,8 @@
 #include "gnome-cmd-search-dialog.h"
 #include "gnome-cmd-advrename-dialog.h"
 #include "gnome-cmd-key-shortcuts-dialog.h"
+#include "gnome-cmd-chmod-dialog.h"
+#include "gnome-cmd-chown-dialog.h"
 #include "gnome-cmd-user-actions.h"
 #include "plugin_manager.h"
 #include "cap.h"
@@ -713,13 +715,31 @@ void file_edit_new_doc (GtkMenuItem *menuitem, gpointer not_used)
 
 void file_chmod (GtkMenuItem *menuitem, gpointer not_used)
 {
-    gnome_cmd_file_list_show_chmod_dialog (get_fl (ACTIVE));
+    GList *files = get_fl (ACTIVE)->get_selected_files();
+
+    if (files)
+    {
+        GtkWidget *dialog = gnome_cmd_chmod_dialog_new (files);
+
+        gtk_widget_ref (dialog);
+        gtk_widget_show (dialog);
+        g_list_free (files);
+    }
 }
 
 
 void file_chown (GtkMenuItem *menuitem, gpointer not_used)
 {
-    gnome_cmd_file_list_show_chown_dialog (get_fl (ACTIVE));
+    GList *files = get_fl (ACTIVE)->get_selected_files();
+
+    if (files)
+    {
+        GtkWidget *dialog = gnome_cmd_chown_dialog_new (files);
+
+        gtk_widget_ref (dialog);
+        gtk_widget_show (dialog);
+        g_list_free (files);
+    }
 }
 
 



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