aboutsummaryrefslogtreecommitdiffstats
path: root/src/window-commands.c
diff options
context:
space:
mode:
authorChristian Persch <chpe@cvs.gnome.org>2006-08-08 04:42:44 +0800
committerChristian Persch <chpe@src.gnome.org>2006-08-08 04:42:44 +0800
commitff5debba3755465eaeb4766b213cd5d37ffe8e01 (patch)
tree268f4e62901c6dc5433802974cf4e60760ca8d9d /src/window-commands.c
parent148a755f7a9ed405ac89f92d8add5804efd664c3 (diff)
downloadgsoc2013-epiphany-ff5debba3755465eaeb4766b213cd5d37ffe8e01.tar.gz
gsoc2013-epiphany-ff5debba3755465eaeb4766b213cd5d37ffe8e01.tar.zst
gsoc2013-epiphany-ff5debba3755465eaeb4766b213cd5d37ffe8e01.zip
Add "delete text" command.
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.
Diffstat (limited to 'src/window-commands.c')
-rw-r--r--src/window-commands.c22
1 files changed, 22 insertions, 0 deletions
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)
{