[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[gcmd-dev] [PATCH] Remove F10 assignment to 'Quit'
From: |
Thomas Jost |
Subject: |
[gcmd-dev] [PATCH] Remove F10 assignment to 'Quit' |
Date: |
Fri, 19 Nov 2010 11:48:13 +0100 |
The current behavior is incoherent: F10 should close the window, but it
currently gives focus to the menu bar (#352024). Since this is the expected
behavior according to the GNOME HIG, removing the F10 assignment is probably a
good idea.
---
doc/C/gnome-commander.xml | 5 -----
src/dialogs/gnome-cmd-key-shortcuts-dialog.cc | 2 --
src/gnome-cmd-main-win.cc | 6 +-----
src/gnome-cmd-user-actions.cc | 5 -----
4 files changed, 1 insertions(+), 17 deletions(-)
diff --git a/doc/C/gnome-commander.xml b/doc/C/gnome-commander.xml
index 2d07658..1c74fa5 100644
--- a/doc/C/gnome-commander.xml
+++ b/doc/C/gnome-commander.xml
@@ -5388,11 +5388,6 @@
<entry><para></para></entry>
</row>
<row valign="top">
-
<entry><para><keycombo><keycap>F10</keycap></keycombo></para></entry>
- <entry><para>Quit</para></entry>
- <entry><para></para></entry>
- </row>
- <row valign="top">
<entry><para></para></entry>
<entry><para></para></entry>
<entry><para></para></entry>
diff --git a/src/dialogs/gnome-cmd-key-shortcuts-dialog.cc
b/src/dialogs/gnome-cmd-key-shortcuts-dialog.cc
index 8c00a22..a62d1f1 100644
--- a/src/dialogs/gnome-cmd-key-shortcuts-dialog.cc
+++ b/src/dialogs/gnome-cmd-key-shortcuts-dialog.cc
@@ -134,7 +134,6 @@ static void response_callback (GnomeCmdKeyShortcutsDialog
*dialog, int response_
dialog->user_actions->unregister(GDK_F7);
dialog->user_actions->unregister(GDK_F8);
dialog->user_actions->unregister(GDK_F9);
- dialog->user_actions->unregister(GDK_F10);
dialog->user_actions->register_action(GDK_F3, "file.view");
dialog->user_actions->register_action(GDK_F4, "file.edit");
@@ -143,7 +142,6 @@ static void response_callback (GnomeCmdKeyShortcutsDialog
*dialog, int response_
dialog->user_actions->register_action(GDK_F7, "file.mkdir");
dialog->user_actions->register_action(GDK_F8, "file.delete");
dialog->user_actions->register_action(GDK_F9, "edit.search");
- dialog->user_actions->register_action(GDK_F10, "file.exit");
}
break;
diff --git a/src/gnome-cmd-main-win.cc b/src/gnome-cmd-main-win.cc
index 9ec9af6..a4d02f9 100644
--- a/src/gnome-cmd-main-win.cc
+++ b/src/gnome-cmd-main-win.cc
@@ -442,7 +442,7 @@ void GnomeCmdMainWin::create_buttonbar()
gtk_box_pack_start (GTK_BOX (priv->buttonbar), create_separator (TRUE),
FALSE, TRUE, 0);
priv->find_btn = add_buttonbar_button(_("F9 Search"), this, "find_btn",
priv->accel_group, 0);
gtk_box_pack_start (GTK_BOX (priv->buttonbar), create_separator (TRUE),
FALSE, TRUE, 0);
- priv->quit_btn = add_buttonbar_button(_("F10 Quit"), this, "quit_btn",
priv->accel_group, 0);
+ priv->quit_btn = add_buttonbar_button(_("Quit"), this, "quit_btn",
priv->accel_group, 0);
g_signal_connect (priv->view_btn, "clicked", G_CALLBACK (on_view_clicked),
this);
g_signal_connect (priv->edit_btn, "clicked", G_CALLBACK (on_edit_clicked),
this);
@@ -1083,10 +1083,6 @@ gboolean GnomeCmdMainWin::key_pressed(GdkEventKey *event)
case GDK_F9:
on_search_clicked (NULL, this);
return TRUE;
-
- case GDK_F10:
- on_quit_clicked (NULL, this);
- return TRUE;
}
if (fs(ACTIVE)->key_pressed(event))
diff --git a/src/gnome-cmd-user-actions.cc b/src/gnome-cmd-user-actions.cc
index 85a1df6..1a7d308 100644
--- a/src/gnome-cmd-user-actions.cc
+++ b/src/gnome-cmd-user-actions.cc
@@ -238,7 +238,6 @@ void GnomeCmdUserActions::init()
register_action(GDK_F7, "file.mkdir");
register_action(GDK_F8, "file.delete");
// register_action(GDK_F9, "edit.search"); // do not register F9
here, as edit.search action wouldn't be checked for registration later
- // register_action(GDK_F10, "file.exit"); // do not register F10
here, as file.exit action wouldn't be checked for registration later
}
@@ -399,9 +398,6 @@ void GnomeCmdUserActions::init()
unregister(GDK_F9); // unregister F9 if
defined in [key-bindings]
register_action(GDK_F9, "edit.search"); // and overwrite it
with edit.search action
-
- unregister(GDK_F10); // unregister F10 if
defined in [key-bindings]
- register_action(GDK_F10, "file.exit"); // and overwrite it
with file.exit action
}
@@ -416,7 +412,6 @@ void GnomeCmdUserActions::shutdown()
unregister(GDK_F7);
unregister(GDK_F8);
unregister(GDK_F9);
- unregister(GDK_F10);
}
--
1.7.3.2