[empathy: 4/10] add tooltips giving a bit more context about the candidate
- From: Guillaume Desmottes <gdesmott src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [empathy: 4/10] add tooltips giving a bit more context about the candidate
- Date: Thu, 5 Aug 2010 10:07:21 +0000 (UTC)
commit 2b7aea94f1db089bb9f3fee62fd924f7a2c27c63
Author: Guillaume Desmottes <guillaume desmottes collabora co uk>
Date: Wed Aug 4 10:56:28 2010 +0200
add tooltips giving a bit more context about the candidate
src/empathy-call-window.c | 23 +++++++++++++++++++++++
1 files changed, 23 insertions(+), 0 deletions(-)
---
diff --git a/src/empathy-call-window.c b/src/empathy-call-window.c
index 1d2b0f5..61be794 100644
--- a/src/empathy-call-window.c
+++ b/src/empathy-call-window.c
@@ -1478,6 +1478,27 @@ candidate_type_to_str (FsCandidate *candidate)
return NULL;
}
+static const gchar *
+candidate_type_to_desc (FsCandidate *candidate)
+{
+ switch (candidate->type)
+ {
+ case FS_CANDIDATE_TYPE_HOST:
+ return _("The IP address as seen by the machine");
+ case FS_CANDIDATE_TYPE_SRFLX:
+ return _("The IP address as seen by a server on the Internet");
+ case FS_CANDIDATE_TYPE_PRFLX:
+ return _("The IP address of the peer as seen by the other side");
+ case FS_CANDIDATE_TYPE_RELAY:
+ return _("The IP address of a relay server");
+ case FS_CANDIDATE_TYPE_MULTICAST:
+ return _("The IP address of the multicast group");
+ }
+
+ return NULL;
+}
+
+
static void
update_candidate (EmpathyCallWindow *self,
gboolean video,
@@ -1528,6 +1549,8 @@ update_candidate (EmpathyCallWindow *self,
candidate->port, candidate_type_to_str (candidate));
gtk_label_set_text (GTK_LABEL (widget), str);
+ gtk_widget_set_tooltip_text (widget, candidate_type_to_desc (candidate));
+
g_free (str);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]