aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian Persch <chpe@cvs.gnome.org>2005-10-01 15:38:27 +0800
committerChristian Persch <chpe@src.gnome.org>2005-10-01 15:38:27 +0800
commit292b22cfc4fb1e6e3a9a7c2b07c88319e94ff1b4 (patch)
tree3525ff182c41d8d2a02ebc41e2c4b79d5538ff80
parent337111c6344cc95028968f138b43fd6065be576d (diff)
downloadgsoc2013-epiphany-292b22cfc4fb1e6e3a9a7c2b07c88319e94ff1b4.tar
gsoc2013-epiphany-292b22cfc4fb1e6e3a9a7c2b07c88319e94ff1b4.tar.gz
gsoc2013-epiphany-292b22cfc4fb1e6e3a9a7c2b07c88319e94ff1b4.tar.bz2
gsoc2013-epiphany-292b22cfc4fb1e6e3a9a7c2b07c88319e94ff1b4.tar.lz
gsoc2013-epiphany-292b22cfc4fb1e6e3a9a7c2b07c88319e94ff1b4.tar.xz
gsoc2013-epiphany-292b22cfc4fb1e6e3a9a7c2b07c88319e94ff1b4.tar.zst
gsoc2013-epiphany-292b22cfc4fb1e6e3a9a7c2b07c88319e94ff1b4.zip
Reset the IM context before activating the entry.
2005-10-01 Christian Persch <chpe@cvs.gnome.org> * lib/widgets/ephy-location-entry.c: (entry_key_press_cb): Reset the IM context before activating the entry. * lib/widgets/ephy-node-view.c: (ephy_node_view_key_press_cb): * src/ephy-find-toolbar.c: (tab_search_key_press_cb): Add GDK_ISO_Enter to recognised keyvals.
-rw-r--r--ChangeLog11
-rw-r--r--lib/widgets/ephy-location-entry.c12
-rw-r--r--lib/widgets/ephy-node-view.c3
-rw-r--r--src/ephy-find-toolbar.c3
4 files changed, 23 insertions, 6 deletions
diff --git a/ChangeLog b/ChangeLog
index 02c073df5..ad12ec2c9 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+2005-10-01 Christian Persch <chpe@cvs.gnome.org>
+
+ * lib/widgets/ephy-location-entry.c: (entry_key_press_cb):
+
+ Reset the IM context before activating the entry.
+
+ * lib/widgets/ephy-node-view.c: (ephy_node_view_key_press_cb):
+ * src/ephy-find-toolbar.c: (tab_search_key_press_cb):
+
+ Add GDK_ISO_Enter to recognised keyvals.
+
2005-09-26 Christian Persch <chpe@cvs.gnome.org>
* embed/mozilla/EphyAboutModule.cpp:
diff --git a/lib/widgets/ephy-location-entry.c b/lib/widgets/ephy-location-entry.c
index 483361704..9a670df2e 100644
--- a/lib/widgets/ephy-location-entry.c
+++ b/lib/widgets/ephy-location-entry.c
@@ -297,16 +297,20 @@ entry_key_press_cb (GtkEntry *entry,
GdkEventKey *event,
EphyLocationEntry *lentry)
{
- guint mask = gtk_accelerator_get_default_mod_mask ();
+ guint state = event->state & gtk_accelerator_get_default_mod_mask ();
- if ((event->keyval == GDK_Return || event->keyval == GDK_ISO_Enter) &&
- (event->state & mask) == GDK_CONTROL_MASK)
+ if ((event->keyval == GDK_Return ||
+ event->keyval == GDK_KP_Enter ||
+ event->keyval == GDK_ISO_Enter) &&
+ state == GDK_CONTROL_MASK)
{
+ gtk_im_context_reset (entry->im_context);
+
g_signal_emit_by_name (entry, "activate");
return TRUE;
}
- else if (event->keyval == GDK_Escape && (event->state & mask) == 0)
+ else if (event->keyval == GDK_Escape && state == 0)
{
ephy_location_entry_reset (lentry);
/* don't return TRUE since we want to cancel the autocompletion popup too */
diff --git a/lib/widgets/ephy-node-view.c b/lib/widgets/ephy-node-view.c
index 010195e48..6d48b1ddf 100644
--- a/lib/widgets/ephy-node-view.c
+++ b/lib/widgets/ephy-node-view.c
@@ -570,7 +570,8 @@ ephy_node_view_key_press_cb (GtkTreeView *treeview,
if (event->keyval == GDK_space ||
event->keyval == GDK_Return ||
- event->keyval == GDK_KP_Enter)
+ event->keyval == GDK_KP_Enter ||
+ event->keyval == GDK_ISO_Enter)
{
if (view->priv->toggle_column >= 0)
{
diff --git a/src/ephy-find-toolbar.c b/src/ephy-find-toolbar.c
index 15e4978b7..3e9ac57ac 100644
--- a/src/ephy-find-toolbar.c
+++ b/src/ephy-find-toolbar.c
@@ -200,7 +200,8 @@ tab_search_key_press_cb (EphyEmbed *embed,
/* don't do anything if the find toolbar is hidden */
if (GTK_WIDGET_VISIBLE (widget) == FALSE ||
event->keyval == GDK_Return ||
- event->keyval == GDK_KP_Enter)
+ event->keyval == GDK_KP_Enter ||
+ event->keyval == GDK_ISO_Enter)
{
return FALSE;
}