[empathy] add empathy_dialpad_widget_press_key()
- From: Guillaume Desmottes <gdesmott src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [empathy] add empathy_dialpad_widget_press_key()
- Date: Mon, 9 Jul 2012 08:16:57 +0000 (UTC)
commit 761ef25a05361cdc8ec484e12898b3aedda94fe5
Author: Guillaume Desmottes <guillaume desmottes collabora co uk>
Date: Fri Jul 6 14:29:25 2012 +0200
add empathy_dialpad_widget_press_key()
https://bugzilla.gnome.org/show_bug.cgi?id=679396
libempathy-gtk/empathy-dialpad-widget.c | 18 ++++++++++++++++++
libempathy-gtk/empathy-dialpad-widget.h | 3 +++
2 files changed, 21 insertions(+), 0 deletions(-)
---
diff --git a/libempathy-gtk/empathy-dialpad-widget.c b/libempathy-gtk/empathy-dialpad-widget.c
index 4ffd5ac..6361c25 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 f4cb830..ccf5ac4 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
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]