aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog8
-rw-r--r--src/ephy-window.c3
-rw-r--r--src/window-commands.c22
-rw-r--r--src/window-commands.h3
4 files changed, 36 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 780eda001..9463c7102 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,14 @@
2006-08-07 Christian Persch <chpe@cvs.gnome.org>
* src/ephy-window.c:
+ * src/window-commands.c:
+ * src/window-commands.h:
+
+ Add "delete text" command.
+
+2006-08-07 Christian Persch <chpe@cvs.gnome.org>
+
+ * src/ephy-window.c:
Also recognise keypad keys for navigation. Bug #337089.
diff --git a/src/ephy-window.c b/src/ephy-window.c
index 8f4678d99..aeff35da7 100644
--- a/src/ephy-window.c
+++ b/src/ephy-window.c
@@ -171,6 +171,9 @@ static const GtkActionEntry ephy_menu_entries [] = {
{ "EditPaste", GTK_STOCK_PASTE, N_("_Paste"), "<control>V",
N_("Paste clipboard"),
G_CALLBACK (window_cmd_edit_paste) },
+ { "EditDelete", GTK_STOCK_DELETE, NULL, NULL,
+ N_("Delete text"),
+ G_CALLBACK (window_cmd_edit_delete) },
{ "EditSelectAll", NULL, N_("Select _All"), "<control>A",
N_("Select the entire page"),
G_CALLBACK (window_cmd_edit_select_all) },
diff --git a/src/window-commands.c b/src/window-commands.c
index 46dee486b..b3391491c 100644
--- a/src/window-commands.c
+++ b/src/window-commands.c
@@ -464,6 +464,28 @@ window_cmd_edit_paste (GtkAction *action,
}
void
+window_cmd_edit_delete (GtkAction *action,
+ EphyWindow *window)
+{
+ GtkWidget *widget = gtk_window_get_focus (GTK_WINDOW (window));
+
+ if (GTK_IS_EDITABLE (widget))
+ {
+ gtk_editable_delete_text (GTK_EDITABLE (widget), 0, -1);
+ }
+ else
+ {
+ EphyEmbed *embed;
+
+ embed = ephy_window_get_active_embed (window);
+ g_return_if_fail (embed != NULL);
+
+ ephy_command_manager_do_command (EPHY_COMMAND_MANAGER (embed),
+ "cmd_delete");
+ }
+}
+
+void
window_cmd_edit_select_all (GtkAction *action,
EphyWindow *window)
{
diff --git a/src/window-commands.h b/src/window-commands.h
index 1bafbc460..30026ee9c 100644
--- a/src/window-commands.h
+++ b/src/window-commands.h
@@ -94,6 +94,9 @@ void window_cmd_edit_copy (GtkAction *action,
void window_cmd_edit_paste (GtkAction *action,
EphyWindow *window);
+void window_cmd_edit_delete (GtkAction *action,
+ EphyWindow *window);
+
void window_cmd_edit_select_all (GtkAction *action,
EphyWindow *window);