aboutsummaryrefslogtreecommitdiffstats
path: root/src/ephy-window.c
diff options
context:
space:
mode:
authorMarco Pesenti Gritti <marco@it.gnome.org>2003-06-23 07:03:43 +0800
committerMarco Pesenti Gritti <mpeseng@src.gnome.org>2003-06-23 07:03:43 +0800
commitca789c035a4c74bfaf25b52d8d73c4685d4eb91f (patch)
treec3b680c5f273a0e3d3475c0820ee33a971b79515 /src/ephy-window.c
parent250fa48d8848faf5741544fe3e9a083119ba0309 (diff)
downloadgsoc2013-epiphany-ca789c035a4c74bfaf25b52d8d73c4685d4eb91f.tar
gsoc2013-epiphany-ca789c035a4c74bfaf25b52d8d73c4685d4eb91f.tar.gz
gsoc2013-epiphany-ca789c035a4c74bfaf25b52d8d73c4685d4eb91f.tar.bz2
gsoc2013-epiphany-ca789c035a4c74bfaf25b52d8d73c4685d4eb91f.tar.lz
gsoc2013-epiphany-ca789c035a4c74bfaf25b52d8d73c4685d4eb91f.tar.xz
gsoc2013-epiphany-ca789c035a4c74bfaf25b52d8d73c4685d4eb91f.tar.zst
gsoc2013-epiphany-ca789c035a4c74bfaf25b52d8d73c4685d4eb91f.zip
Correct translations dir (leftover from galeon)
2003-06-23 Marco Pesenti Gritti <marco@it.gnome.org> * configure.in: Correct translations dir (leftover from galeon) * embed/ephy-history.c: Lower expire to 10 days, similar to phoenix. Current interface and perf make this a better default. * lib/ephy-dialog.c: (ephy_dialog_init), (setup_default_size): Make sure to not state_add more than one time * lib/widgets/ephy-location-entry.c: (insert_text_cb): Do not show autocompletion on not focused window. This is to work around problems with gnome-entry. * src/ephy-window.c: (popup_menu_at_coords), (show_embed_popup), (tab_context_menu_cb): Do not use custom func to show mouse popups. Fix costum func to be smarter with screen limits.
Diffstat (limited to 'src/ephy-window.c')
-rw-r--r--src/ephy-window.c34
1 files changed, 17 insertions, 17 deletions
diff --git a/src/ephy-window.c b/src/ephy-window.c
index cf876af8b..b27cdaef3 100644
--- a/src/ephy-window.c
+++ b/src/ephy-window.c
@@ -1031,7 +1031,7 @@ popup_menu_at_coords (GtkMenu *menu, gint *x, gint *y, gboolean *push_in,
*x = event->x;
*y = event->y;
- *push_in = FALSE;
+ *push_in = TRUE;
}
static void
@@ -1056,6 +1056,7 @@ show_embed_popup (EphyWindow *window, EphyTab *tab, EphyEmbedEvent *event)
const GValue *value;
gboolean framed, has_background;
GtkWidget *widget;
+ EphyEmbedEventType type;
ephy_embed_event_get_property (event, "framed_page", &value);
framed = g_value_get_int (value);
@@ -1103,8 +1104,20 @@ show_embed_popup (EphyWindow *window, EphyTab *tab, EphyEmbedEvent *event)
g_object_set_data (G_OBJECT (window), "context_event", event);
g_signal_connect (widget, "destroy",
G_CALLBACK (popup_destroy_cb), window);
- gtk_menu_popup (GTK_MENU (widget), NULL, NULL, popup_menu_at_coords, event, 2,
- gtk_get_current_event_time ());
+
+ ephy_embed_event_get_event_type (event, &type);
+ if (type == EPHY_EMBED_EVENT_KEY)
+ {
+ gtk_menu_popup (GTK_MENU (widget), NULL, NULL,
+ popup_menu_at_coords, event, 2,
+ gtk_get_current_event_time ());
+ }
+ else
+ {
+ gtk_menu_popup (GTK_MENU (widget), NULL, NULL,
+ NULL, NULL, 2,
+ gtk_get_current_event_time ());
+ }
}
static gint
@@ -1113,7 +1126,6 @@ tab_context_menu_cb (EphyEmbed *embed,
EphyWindow *window)
{
EphyTab *tab;
- EphyEmbedEventType type;
g_return_val_if_fail (IS_EPHY_WINDOW (window), FALSE);
g_return_val_if_fail (IS_EPHY_EMBED (embed), FALSE);
@@ -1126,19 +1138,7 @@ tab_context_menu_cb (EphyEmbed *embed,
window = ephy_tab_get_window (tab);
g_return_val_if_fail (window != NULL, FALSE);
- ephy_embed_event_get_event_type (event, &type);
-
- if (type == EPHY_EMBED_EVENT_MOUSE_BUTTON3)
- {
- show_embed_popup (window, tab, event);
- }
- else
- {
- int x, y;
-
- ephy_embed_event_get_coords (event, &x, &y); // Why?
- show_embed_popup (window, tab, event);
- }
+ show_embed_popup (window, tab, event);
return FALSE;
}