gnome-commander r1478 - in branches/gcmd-1-3: . doc doc/C src



Author: epiotr
Date: Mon Jan  7 18:43:23 2008
New Revision: 1478
URL: http://svn.gnome.org/viewvc/gnome-commander?rev=1478&view=rev

Log:
Define SHIFT+F4 binding as user definable (file.edit_new_doc)

Modified:
   branches/gcmd-1-3/ChangeLog
   branches/gcmd-1-3/doc/C/gnome-commander.xml
   branches/gcmd-1-3/doc/keys.txt
   branches/gcmd-1-3/src/gnome-cmd-file-selector.cc
   branches/gcmd-1-3/src/gnome-cmd-user-actions.cc
   branches/gcmd-1-3/src/gnome-cmd-user-actions.h

Modified: branches/gcmd-1-3/doc/C/gnome-commander.xml
==============================================================================
--- branches/gcmd-1-3/doc/C/gnome-commander.xml	(original)
+++ branches/gcmd-1-3/doc/C/gnome-commander.xml	Mon Jan  7 18:43:23 2008
@@ -3577,7 +3577,7 @@
         </row>
         <row valign="top">
             <entry><para><keycombo><keycap>F4</keycap></keycombo></para></entry>
-            <entry><para>Edit files</para></entry>
+            <entry><para>Edit file</para></entry>
             <entry><para></para></entry>
         </row>
         <row valign="top">
@@ -3663,7 +3663,7 @@
         <row valign="top">
             <entry><keycombo><keycap>SHIFT</keycap><keycap>F4</keycap></keycombo></entry>
             <entry><para>Edit a new file</para></entry>
-            <entry><para></para></entry>
+            <entry><para>yes</para></entry>
         </row>
         <row valign="top">
             <entry><keycombo><keycap>SHIFT</keycap><keycap>F5</keycap></keycombo></entry>
@@ -4271,10 +4271,15 @@
                     </row>
                     <row valign="top">
                         <entry><para>file.edit</para></entry>
-                        <entry><para>Edit files</para></entry>
+                        <entry><para>Edit file</para></entry>
                         <entry><para></para></entry>
                     </row>
                     <row valign="top">
+                        <entry><para>file.edit_new_doc</para></entry>
+                        <entry><para>Edit a new file</para></entry>
+                        <entry><para><keycombo><keycap>SHIFT</keycap><keycap>F4</keycap></keycombo></para></entry>
+                    </row>
+                    <row valign="top">
                         <entry><para>file.exit</para></entry>
                         <entry><para>Exit &app;</para></entry>
                         <entry><para></para></entry>

Modified: branches/gcmd-1-3/doc/keys.txt
==============================================================================
--- branches/gcmd-1-3/doc/keys.txt	(original)
+++ branches/gcmd-1-3/doc/keys.txt	Mon Jan  7 18:43:23 2008
@@ -4,7 +4,7 @@
 F1              Help
 F2              Refresh files in the active file list
 F3              View files
-F4              Edit files
+F4              Edit file
 F5              Copy files
 F6              Rename or move files
 F7              Create directory

Modified: branches/gcmd-1-3/src/gnome-cmd-file-selector.cc
==============================================================================
--- branches/gcmd-1-3/src/gnome-cmd-file-selector.cc	(original)
+++ branches/gcmd-1-3/src/gnome-cmd-file-selector.cc	Mon Jan  7 18:43:23 2008
@@ -1952,10 +1952,6 @@
     {
         switch (event->keyval)
         {
-            case GDK_F4:
-                gnome_cmd_file_selector_start_editor (fs);
-                return TRUE;
-
             case GDK_F5:
                 gnome_cmd_file_list_show_make_copy_dialog (fs);
                 return TRUE;

Modified: branches/gcmd-1-3/src/gnome-cmd-user-actions.cc
==============================================================================
--- branches/gcmd-1-3/src/gnome-cmd-user-actions.cc	(original)
+++ branches/gcmd-1-3/src/gnome-cmd-user-actions.cc	Mon Jan  7 18:43:23 2008
@@ -227,6 +227,7 @@
     actions.add(file_delete, "file.delete");
     actions.add(file_diff, "file.diff");
     actions.add(file_edit, "file.edit");
+    actions.add(file_edit_new_doc, "file.edit_new_doc");
     actions.add(file_exit, "file.exit");
     actions.add(file_external_view, "file.external_view");
     actions.add(file_internal_view, "file.internal_view");
@@ -269,7 +270,7 @@
     actions.add(view_up, "view.up");
 
     register_action(GDK_F3, "file.view");
-    register_action(GDK_F4, "file.mkdir");
+    register_action(GDK_F4, "file.edit");
     register_action(GDK_F5, "file.copy");
     register_action(GDK_F6, "file.rename");
     register_action(GDK_F7, "file.mkdir");
@@ -309,6 +310,9 @@
     if (!registered("file.create_symlink"))
         register_action(GDK_CONTROL_MASK | GDK_SHIFT_MASK, GDK_F5, "file.create_symlink");
 
+    if (!registered("file.edit_new_doc"))
+        register_action(GDK_SHIFT_MASK, GDK_F4, "file.edit_new_doc");
+
     if (!registered("file.external_view"))
         register_action(GDK_MOD1_MASK, GDK_F3, "file.external_view");
 
@@ -640,6 +644,12 @@
 }
 
 
+void file_edit_new_doc (GtkMenuItem *menuitem, gpointer not_used)
+{
+    gnome_cmd_file_selector_start_editor (get_fs (ACTIVE));
+}
+
+
 void file_chmod (GtkMenuItem *menuitem, gpointer not_used)
 {
     gnome_cmd_file_list_show_chmod_dialog (get_fl (ACTIVE));

Modified: branches/gcmd-1-3/src/gnome-cmd-user-actions.h
==============================================================================
--- branches/gcmd-1-3/src/gnome-cmd-user-actions.h	(original)
+++ branches/gcmd-1-3/src/gnome-cmd-user-actions.h	Mon Jan  7 18:43:23 2008
@@ -95,6 +95,7 @@
 GNOME_CMD_USER_ACTION(file_internal_view);
 GNOME_CMD_USER_ACTION(file_external_view);
 GNOME_CMD_USER_ACTION(file_edit);
+GNOME_CMD_USER_ACTION(file_edit_new_doc);
 GNOME_CMD_USER_ACTION(file_chmod);
 GNOME_CMD_USER_ACTION(file_chown);
 GNOME_CMD_USER_ACTION(file_mkdir);



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