aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2012-07-06 20:29:25 +0800
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2012-07-09 15:48:32 +0800
commit761ef25a05361cdc8ec484e12898b3aedda94fe5 (patch)
tree8de078e83cd74f927d0de17a86743f75b35ad8e5
parent7a2248d5a003ca685116076abb898857a8b40a60 (diff)
downloadgsoc2013-empathy-761ef25a05361cdc8ec484e12898b3aedda94fe5.tar
gsoc2013-empathy-761ef25a05361cdc8ec484e12898b3aedda94fe5.tar.gz
gsoc2013-empathy-761ef25a05361cdc8ec484e12898b3aedda94fe5.tar.bz2
gsoc2013-empathy-761ef25a05361cdc8ec484e12898b3aedda94fe5.tar.lz
gsoc2013-empathy-761ef25a05361cdc8ec484e12898b3aedda94fe5.tar.xz
gsoc2013-empathy-761ef25a05361cdc8ec484e12898b3aedda94fe5.tar.zst
gsoc2013-empathy-761ef25a05361cdc8ec484e12898b3aedda94fe5.zip
add empathy_dialpad_widget_press_key()
https://bugzilla.gnome.org/show_bug.cgi?id=679396
-rw-r--r--libempathy-gtk/empathy-dialpad-widget.c18
-rw-r--r--libempathy-gtk/empathy-dialpad-widget.h3
2 files changed, 21 insertions, 0 deletions
diff --git a/libempathy-gtk/empathy-dialpad-widget.c b/libempathy-gtk/empathy-dialpad-widget.c
index 4ffd5ac7b..6361c25f6 100644
--- a/libempathy-gtk/empathy-dialpad-widget.c
+++ b/libempathy-gtk/empathy-dialpad-widget.c
@@ -215,3 +215,21 @@ empathy_dialpad_widget_new (void)
{
return g_object_new (EMPATHY_TYPE_DIALPAD_WIDGET, NULL);
}
+
+void
+empathy_dialpad_widget_press_key (EmpathyDialpadWidget *self,
+ gchar key)
+{
+ GtkWidget *button;
+
+ button = g_hash_table_lookup (self->priv->buttons, GUINT_TO_POINTER (key));
+
+ if (button == NULL)
+ return;
+
+ /* gtk_widget_activate() just does the button-pressed animation, it doesn't
+ * fire the callbacks so we do it manually. */
+ dtmf_dialpad_button_pressed_cb (button, NULL, self);
+ gtk_widget_activate (button);
+ dtmf_dialpad_button_released_cb (button, NULL, self);
+}
diff --git a/libempathy-gtk/empathy-dialpad-widget.h b/libempathy-gtk/empathy-dialpad-widget.h
index f4cb83052..ccf5ac40a 100644
--- a/libempathy-gtk/empathy-dialpad-widget.h
+++ b/libempathy-gtk/empathy-dialpad-widget.h
@@ -52,6 +52,9 @@ struct _EmpathyDialpadWidgetClass
GType empathy_dialpad_widget_get_type (void);
GtkWidget *empathy_dialpad_widget_new (void);
+void empathy_dialpad_widget_press_key (EmpathyDialpadWidget *self,
+ gchar key);
+
G_END_DECLS
#endif