diff options
author | Danielle Madeley <danielle.madeley@collabora.co.uk> | 2011-08-17 13:44:22 +0800 |
---|---|---|
committer | Danielle Madeley <danielle.madeley@collabora.co.uk> | 2011-08-17 13:44:22 +0800 |
commit | dc7080f5071a9130bbd9288b50f807b41a5f9864 (patch) | |
tree | a2662d69dd47b15fc02e9a0d6f7fb5ef3215cc40 /libempathy-gtk | |
parent | 1ba7c298c282b4775c29c80214009876e943648d (diff) | |
download | gsoc2013-empathy-dc7080f5071a9130bbd9288b50f807b41a5f9864.tar gsoc2013-empathy-dc7080f5071a9130bbd9288b50f807b41a5f9864.tar.gz gsoc2013-empathy-dc7080f5071a9130bbd9288b50f807b41a5f9864.tar.bz2 gsoc2013-empathy-dc7080f5071a9130bbd9288b50f807b41a5f9864.tar.lz gsoc2013-empathy-dc7080f5071a9130bbd9288b50f807b41a5f9864.tar.xz gsoc2013-empathy-dc7080f5071a9130bbd9288b50f807b41a5f9864.tar.zst gsoc2013-empathy-dc7080f5071a9130bbd9288b50f807b41a5f9864.zip |
Use context menu utility in log viewer
Diffstat (limited to 'libempathy-gtk')
-rw-r--r-- | libempathy-gtk/empathy-log-window.c | 30 |
1 files changed, 25 insertions, 5 deletions
diff --git a/libempathy-gtk/empathy-log-window.c b/libempathy-gtk/empathy-log-window.c index c4a260889..219d0cc11 100644 --- a/libempathy-gtk/empathy-log-window.c +++ b/libempathy-gtk/empathy-log-window.c @@ -2502,13 +2502,12 @@ who_row_is_separator (GtkTreeModel *model, return (type == COL_TYPE_SEPARATOR); } -static gboolean -log_window_events_button_press_event (GtkWidget *webview, - GdkEventButton *event, - EmpathyLogWindow *self) +static void +log_window_find_row (EmpathyLogWindow *self, + GdkEventButton *event) { WebKitHitTestResult *hit = webkit_web_view_get_hit_test_result ( - WEBKIT_WEB_VIEW (webview), event); + WEBKIT_WEB_VIEW (self->priv->webview), event); WebKitDOMNode *inner_node; tp_clear_object (&self->priv->events_contact); @@ -2563,6 +2562,27 @@ log_window_events_button_press_event (GtkWidget *webview, g_object_unref (hit); log_window_update_buttons_sensitivity (self); +} + +static gboolean +log_window_events_button_press_event (GtkWidget *webview, + GdkEventButton *event, + EmpathyLogWindow *self) +{ + switch (event->button) + { + case 1: + log_window_find_row (self, event); + break; + + case 3: + empathy_webkit_context_menu_for_event ( + WEBKIT_WEB_VIEW (webview), event, 0); + return TRUE; + + default: + break; + } return FALSE; } |