aboutsummaryrefslogtreecommitdiffstats
path: root/libempathy-gtk
diff options
context:
space:
mode:
authorDanielle Madeley <danielle.madeley@collabora.co.uk>2011-05-13 11:38:51 +0800
committerEmilio Pozuelo Monfort <emilio.pozuelo@collabora.co.uk>2011-07-26 23:45:58 +0800
commit6cee5de76941076ba103101392de644bee3bd8a6 (patch)
treebc2a2d78c5fd739279e144f3e6d45cc784128ee6 /libempathy-gtk
parentc5c0cd8d6f433896b406287cf5be078670cb734d (diff)
downloadgsoc2013-empathy-6cee5de76941076ba103101392de644bee3bd8a6.tar
gsoc2013-empathy-6cee5de76941076ba103101392de644bee3bd8a6.tar.gz
gsoc2013-empathy-6cee5de76941076ba103101392de644bee3bd8a6.tar.bz2
gsoc2013-empathy-6cee5de76941076ba103101392de644bee3bd8a6.tar.lz
gsoc2013-empathy-6cee5de76941076ba103101392de644bee3bd8a6.tar.xz
gsoc2013-empathy-6cee5de76941076ba103101392de644bee3bd8a6.tar.zst
gsoc2013-empathy-6cee5de76941076ba103101392de644bee3bd8a6.zip
Add letters underneath the numbers on the dialpad
https://bugzilla.gnome.org/show_bug.cgi?id=632874
Diffstat (limited to 'libempathy-gtk')
-rw-r--r--libempathy-gtk/empathy-ui-utils.c52
1 files changed, 39 insertions, 13 deletions
diff --git a/libempathy-gtk/empathy-ui-utils.c b/libempathy-gtk/empathy-ui-utils.c
index 77a13394f..a1d4d95e5 100644
--- a/libempathy-gtk/empathy-ui-utils.c
+++ b/libempathy-gtk/empathy-ui-utils.c
@@ -2022,19 +2022,20 @@ empathy_create_dtmf_dialpad (GObject *self,
GQuark button_quark;
struct {
const gchar *label;
+ const gchar *sublabel;
TpDTMFEvent event;
- } dtmfbuttons[] = { { "1", TP_DTMF_EVENT_DIGIT_1 },
- { "2", TP_DTMF_EVENT_DIGIT_2 },
- { "3", TP_DTMF_EVENT_DIGIT_3 },
- { "4", TP_DTMF_EVENT_DIGIT_4 },
- { "5", TP_DTMF_EVENT_DIGIT_5 },
- { "6", TP_DTMF_EVENT_DIGIT_6 },
- { "7", TP_DTMF_EVENT_DIGIT_7 },
- { "8", TP_DTMF_EVENT_DIGIT_8 },
- { "9", TP_DTMF_EVENT_DIGIT_9 },
- { "#", TP_DTMF_EVENT_HASH },
- { "0", TP_DTMF_EVENT_DIGIT_0 },
- { "*", TP_DTMF_EVENT_ASTERISK },
+ } dtmfbuttons[] = { { "1", "", TP_DTMF_EVENT_DIGIT_1 },
+ { "2", "abc", TP_DTMF_EVENT_DIGIT_2 },
+ { "3", "def", TP_DTMF_EVENT_DIGIT_3 },
+ { "4", "ghi", TP_DTMF_EVENT_DIGIT_4 },
+ { "5", "jkl", TP_DTMF_EVENT_DIGIT_5 },
+ { "6", "mno", TP_DTMF_EVENT_DIGIT_6 },
+ { "7", "pqrs", TP_DTMF_EVENT_DIGIT_7 },
+ { "8", "tuv", TP_DTMF_EVENT_DIGIT_8 },
+ { "9", "wxyz", TP_DTMF_EVENT_DIGIT_9 },
+ { "#", "", TP_DTMF_EVENT_HASH },
+ { "0", "", TP_DTMF_EVENT_DIGIT_0 },
+ { "*", "", TP_DTMF_EVENT_ASTERISK },
{ NULL, } };
button_quark = g_quark_from_static_string (EMPATHY_DTMF_BUTTON_ID);
@@ -2043,7 +2044,32 @@ empathy_create_dtmf_dialpad (GObject *self,
for (i = 0; dtmfbuttons[i].label != NULL; i++)
{
- GtkWidget *button = gtk_button_new_with_label (dtmfbuttons[i].label);
+ GtkWidget *vbox = gtk_vbox_new (FALSE, 0);
+ GtkWidget *button = gtk_button_new ();
+ GtkWidget *label;
+ gchar *str;
+
+ gtk_container_add (GTK_CONTAINER (button), vbox);
+
+ /* main label */
+ label = gtk_label_new ("");
+ str = g_strdup_printf ("<span size='x-large'>%s</span>",
+ dtmfbuttons[i].label);
+ gtk_label_set_markup (GTK_LABEL (label), str);
+ g_free (str);
+
+ gtk_box_pack_start (GTK_BOX (vbox), label, TRUE, TRUE, 3);
+
+ /* sub label */
+ label = gtk_label_new ("");
+ str = g_strdup_printf (
+ "<span foreground='#555555'>%s</span>",
+ dtmfbuttons[i].sublabel);
+ gtk_label_set_markup (GTK_LABEL (label), str);
+ g_free (str);
+
+ gtk_box_pack_start (GTK_BOX (vbox), label, FALSE, TRUE, 0);
+
gtk_table_attach (GTK_TABLE (table), button, i % 3, i % 3 + 1,
i/3, i/3 + 1, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 1, 1);