[ekiga] Call History: Added "call" action on double-click or Return.
- From: Damien Sandras <dsandras src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [ekiga] Call History: Added "call" action on double-click or Return.
- Date: Thu, 12 Nov 2015 18:39:20 +0000 (UTC)
commit 233271deca8d2bda1da513b206202af87d9e4ef0
Author: Damien Sandras <dsandras seconix com>
Date: Sun Nov 1 15:08:54 2015 +0100
Call History: Added "call" action on double-click or Return.
We know the engine will provide a call action for most (if not all)
presentities. We can safely use it as default.
.../gui/gtk-frontend/call-history-view-gtk.cpp | 14 +++++++++-----
1 files changed, 9 insertions(+), 5 deletions(-)
---
diff --git a/lib/engine/gui/gtk-frontend/call-history-view-gtk.cpp
b/lib/engine/gui/gtk-frontend/call-history-view-gtk.cpp
index e237c6c..afb444e 100644
--- a/lib/engine/gui/gtk-frontend/call-history-view-gtk.cpp
+++ b/lib/engine/gui/gtk-frontend/call-history-view-gtk.cpp
@@ -229,14 +229,18 @@ on_clicked (G_GNUC_UNUSED GtkWidget *tree,
{
CallHistoryViewGtk *self = CALL_HISTORY_VIEW_GTK (data);
- /* Ignore no click events */
- if (event->type != GDK_BUTTON_PRESS && event->type != GDK_2BUTTON_PRESS)
- return TRUE;
+ // take into account only clicks and Enter keys
+ if (event->type != GDK_BUTTON_PRESS && event->type != GDK_2BUTTON_PRESS && event->type != GDK_KEY_PRESS)
+ return FALSE;
+ if (event->type == GDK_KEY_PRESS && ((GdkEventKey*)event)->keyval != GDK_KEY_Return &&
((GdkEventKey*)event)->keyval != GDK_KEY_KP_Enter)
+ return FALSE;
- if (event->type == GDK_BUTTON_PRESS && event->button == 3 && self->priv->contact_menu) {
+ if (event->type == GDK_BUTTON_PRESS && event->button == 3 && self->priv->contact_menu)
gtk_menu_popup (GTK_MENU (self->priv->contact_menu->get_menu (boost::assign::list_of
(self->priv->menu))),
NULL, NULL, NULL, NULL, event->button, event->time);
- }
+
+ if ((event->type == GDK_2BUTTON_PRESS && event->button == 1) || (event->type == GDK_KEY_PRESS))
+ g_action_group_activate_action (G_ACTION_GROUP (g_application_get_default ()), "call", NULL);
return TRUE;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]