[gnome-commander] Moved gnome_cmd_file_selector_start_editor() from gnome-cmd-file-selector.cc to gnome-cmd-user-actio
- From: Piotr Eljasiak <epiotr src gnome org>
- To: svn-commits-list gnome org
- Subject: [gnome-commander] Moved gnome_cmd_file_selector_start_editor() from gnome-cmd-file-selector.cc to gnome-cmd-user-actio
- Date: Wed, 15 Jul 2009 20:33:53 +0000 (UTC)
commit acde8a358f9474c61ca947f3e657a3b397f50b76
Author: Piotr Eljasiak <epiotr src gnome org>
Date: Wed Jul 15 22:32:35 2009 +0200
Moved gnome_cmd_file_selector_start_editor() from gnome-cmd-file-selector.cc to gnome-cmd-user-actions.cc
src/gnome-cmd-file-selector.cc | 19 -------------------
src/gnome-cmd-file-selector.h | 2 --
src/gnome-cmd-user-actions.cc | 23 +++++++++++++++++++++--
3 files changed, 21 insertions(+), 23 deletions(-)
---
diff --git a/src/gnome-cmd-file-selector.cc b/src/gnome-cmd-file-selector.cc
index 4607d76..4401671 100644
--- a/src/gnome-cmd-file-selector.cc
+++ b/src/gnome-cmd-file-selector.cc
@@ -1320,25 +1320,6 @@ GtkWidget *gnome_cmd_file_selector_new ()
}
-void gnome_cmd_file_selector_start_editor (GnomeCmdFileSelector *fs)
-{
- g_return_if_fail (GNOME_CMD_IS_FILE_SELECTOR (fs));
- g_return_if_fail (GNOME_CMD_IS_DIR (fs->file_list()->cwd));
-
- if (!fs->is_local())
- return;
-
- // create a command with an empty argument to the editor
- gchar *cmd = g_strdup_printf (gnome_cmd_data.get_editor(), "");
- gchar *dpath = gnome_cmd_file_get_real_path (GNOME_CMD_FILE (fs->file_list()->cwd));
-
- run_command_indir (cmd, dpath, FALSE);
-
- g_free (dpath);
- g_free (cmd);
-}
-
-
void GnomeCmdFileSelector::first()
{
if (!priv->dir_history->can_back())
diff --git a/src/gnome-cmd-file-selector.h b/src/gnome-cmd-file-selector.h
index 2ed3ab6..5ce11d6 100644
--- a/src/gnome-cmd-file-selector.h
+++ b/src/gnome-cmd-file-selector.h
@@ -107,8 +107,6 @@ GtkWidget *gnome_cmd_file_selector_new ();
void gnome_cmd_file_selector_set_directory_to_opposite (GnomeCmdMainWin *mw, FileSelectorID fsID);
-void gnome_cmd_file_selector_start_editor (GnomeCmdFileSelector *fs);
-
gboolean gnome_cmd_file_selector_is_local (FileSelectorID fsID);
void gnome_cmd_file_selector_show_new_textfile_dialog (GnomeCmdFileSelector *fs);
diff --git a/src/gnome-cmd-user-actions.cc b/src/gnome-cmd-user-actions.cc
index 4005960..8a2a5b4 100644
--- a/src/gnome-cmd-user-actions.cc
+++ b/src/gnome-cmd-user-actions.cc
@@ -618,6 +618,25 @@ inline void get_file_list (string &s, GList *sfl, F f, T t)
}
+inline void start_editor (GnomeCmdFileList *fl)
+{
+ g_return_if_fail (GNOME_CMD_IS_FILE_LIST (fl));
+ g_return_if_fail (GNOME_CMD_IS_DIR (fl->cwd));
+
+ if (!gnome_cmd_con_is_local (fl->con))
+ return;
+
+ // create a command with an empty argument to the editor
+ gchar *cmd = g_strdup_printf (gnome_cmd_data.get_editor(), "");
+ gchar *dpath = gnome_cmd_file_get_real_path (GNOME_CMD_FILE (fl->cwd));
+
+ run_command_indir (cmd, dpath, FALSE);
+
+ g_free (dpath);
+ g_free (cmd);
+}
+
+
/***************************************/
void no_action (GtkMenuItem *menuitem, gpointer not_used)
{
@@ -676,7 +695,7 @@ void file_edit (GtkMenuItem *menuitem, gpointer not_used)
gdk_window_get_pointer (NULL, NULL, NULL, &mask);
if (mask & GDK_SHIFT_MASK)
- gnome_cmd_file_selector_start_editor (get_fs (ACTIVE));
+ start_editor (get_fl (ACTIVE));
else
gnome_cmd_file_list_edit (get_fl (ACTIVE));
}
@@ -684,7 +703,7 @@ void file_edit (GtkMenuItem *menuitem, gpointer not_used)
void file_edit_new_doc (GtkMenuItem *menuitem, gpointer not_used)
{
- gnome_cmd_file_selector_start_editor (get_fs (ACTIVE));
+ start_editor (get_fl (ACTIVE));
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]