[gnome-commander] Use focused file name for new text document (SHIFT+F4)



commit 37fa932b9a6fd931ed5ecda2e71d0bf381e461f7
Author: Piotr Eljasiak <epiotr src gnome org>
Date:   Sat Jun 5 12:07:29 2010 +0200

    Use focused file name for new text document (SHIFT+F4)

 src/gnome-cmd-file-selector.cc |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)
---
diff --git a/src/gnome-cmd-file-selector.cc b/src/gnome-cmd-file-selector.cc
index 559f486..3386594 100644
--- a/src/gnome-cmd-file-selector.cc
+++ b/src/gnome-cmd-file-selector.cc
@@ -1650,6 +1650,11 @@ void gnome_cmd_file_selector_show_new_textfile_dialog (GnomeCmdFileSelector *fs)
                                           (GnomeCmdStringDialogCallback) on_new_textfile_ok, fs);
     g_return_if_fail (GNOME_CMD_IS_DIALOG (dialog));
 
+    GnomeCmdFile *f = fs->file_list()->get_selected_file();
+
+    if (f)
+        gnome_cmd_string_dialog_set_value (GNOME_CMD_STRING_DIALOG (dialog), 0, f->info->name);
+
     gtk_widget_ref (dialog);
     gtk_widget_show (dialog);
 }



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