Commit 761ef25a authored by Guillaume Desmottes's avatar Guillaume Desmottes

add empathy_dialpad_widget_press_key()

https://bugzilla.gnome.org/show_bug.cgi?id=679396
parent 7a2248d5
......@@ -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);
}
......@@ -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
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment