aboutsummaryrefslogtreecommitdiffstats
path: root/src/empathy-call-window.c
diff options
context:
space:
mode:
authorDanielle Madeley <danielle.madeley@collabora.co.uk>2011-10-19 13:40:22 +0800
committerDanielle Madeley <danielle.madeley@collabora.co.uk>2011-10-19 13:40:22 +0800
commitc68091255ef12850aade51ce317292179515377f (patch)
tree86eb70ee78214f07e0d0c80c8a073991c1e9c0a7 /src/empathy-call-window.c
parent4df0759871f6539af24a5e88650f0c219cd0505a (diff)
downloadgsoc2013-empathy-c68091255ef12850aade51ce317292179515377f.tar
gsoc2013-empathy-c68091255ef12850aade51ce317292179515377f.tar.gz
gsoc2013-empathy-c68091255ef12850aade51ce317292179515377f.tar.bz2
gsoc2013-empathy-c68091255ef12850aade51ce317292179515377f.tar.lz
gsoc2013-empathy-c68091255ef12850aade51ce317292179515377f.tar.xz
gsoc2013-empathy-c68091255ef12850aade51ce317292179515377f.tar.zst
gsoc2013-empathy-c68091255ef12850aade51ce317292179515377f.zip
Move dialpad into a widget of its own
Let's face it, the whole thing was getting a little unwieldly there in the UI utils, and if we're going to be using it in more places, let's start by abstracting it into a widget.
Diffstat (limited to 'src/empathy-call-window.c')
-rw-r--r--src/empathy-call-window.c23
1 files changed, 6 insertions, 17 deletions
diff --git a/src/empathy-call-window.c b/src/empathy-call-window.c
index 2a92e9471..d2e32a10a 100644
--- a/src/empathy-call-window.c
+++ b/src/empathy-call-window.c
@@ -47,6 +47,7 @@
#include <libempathy/empathy-utils.h>
#include <libempathy-gtk/empathy-avatar-image.h>
+#include <libempathy-gtk/empathy-dialpad-widget.h>
#include <libempathy-gtk/empathy-ui-utils.h>
#include <libempathy-gtk/empathy-sound-manager.h>
#include <libempathy-gtk/empathy-geometry.h>
@@ -397,29 +398,17 @@ empathy_call_window_tones_stopped_cb (TpChannel *proxy,
}
static void
-dtmf_button_pressed_cb (GtkButton *button,
+dtmf_start_tone_cb (EmpathyDialpadWidget *dialpad,
+ TpDTMFEvent event,
EmpathyCallWindow *self)
{
EmpathyCallWindowPriv *priv = GET_PRIV (self);
- GQuark button_quark;
- TpDTMFEvent event;
-
- button_quark = g_quark_from_static_string (EMPATHY_DTMF_BUTTON_ID);
- event = GPOINTER_TO_UINT (g_object_get_qdata (G_OBJECT (button),
- button_quark));
g_string_append_c (priv->tones, tp_dtmf_event_to_char (event));
empathy_call_window_maybe_emit_tones (self);
}
-/* empathy_create_dtmf_dialpad() requires a callback, even if empty */
-static void
-dtmf_button_released_cb (GtkButton *button,
- EmpathyCallWindow *self)
-{
-}
-
static void
empathy_call_window_mic_volume_changed (EmpathyCallWindow *self)
{
@@ -1819,9 +1808,9 @@ empathy_call_window_init (EmpathyCallWindow *self)
/* The call will be started as soon the pipeline is playing */
priv->start_call_when_playing = TRUE;
- priv->dtmf_panel = empathy_create_dtmf_dialpad (G_OBJECT (self),
- G_CALLBACK (dtmf_button_pressed_cb),
- G_CALLBACK (dtmf_button_released_cb));
+ priv->dtmf_panel = empathy_dialpad_widget_new ();
+ g_signal_connect (priv->dtmf_panel, "start-tone",
+ G_CALLBACK (dtmf_start_tone_cb), self);
priv->tones = g_string_new ("");