aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/ephy-window.c6
-rw-r--r--src/popup-commands.c7
2 files changed, 8 insertions, 5 deletions
diff --git a/src/ephy-window.c b/src/ephy-window.c
index d78d6013c..f2c0479ae 100644
--- a/src/ephy-window.c
+++ b/src/ephy-window.c
@@ -1234,10 +1234,10 @@ static void
popup_menu_at_coords (GtkMenu *menu, gint *x, gint *y, gboolean *push_in,
gpointer user_data)
{
- EphyEmbedEvent *event = user_data;
+ EphyEmbedEvent *event = (EphyEmbedEvent *) user_data;
+
+ ephy_embed_event_get_coords (event, x, y);
- *x = event->x;
- *y = event->y;
*push_in = TRUE;
}
diff --git a/src/popup-commands.c b/src/popup-commands.c
index f145c1d76..666492659 100644
--- a/src/popup-commands.c
+++ b/src/popup-commands.c
@@ -243,19 +243,22 @@ popup_cmd_copy_link_address (GtkAction *action,
EphyWindow *window)
{
EphyEmbedEvent *event;
+ EmbedEventContext context;
const char *address;
const GValue *value;
event = get_event_info (window);
g_return_if_fail (EPHY_IS_EMBED_EVENT (event));
- if (event->context & EMBED_CONTEXT_EMAIL_LINK)
+ context = ephy_embed_event_get_context (event);
+
+ if (context & EMBED_CONTEXT_EMAIL_LINK)
{
ephy_embed_event_get_property (event, "email", &value);
address = g_value_get_string (value);
popup_cmd_copy_to_clipboard (window, address);
}
- else if (event->context & EMBED_CONTEXT_LINK)
+ else if (context & EMBED_CONTEXT_LINK)
{
ephy_embed_event_get_property (event, "link", &value);
address = g_value_get_string (value);