aboutsummaryrefslogtreecommitdiffstats
path: root/libempathy-gtk
diff options
context:
space:
mode:
authorJovanka Gulicoska <jovanka.gulicoska@gmail.com>2011-10-25 07:23:24 +0800
committerDanielle Madeley <danielle.madeley@collabora.co.uk>2011-10-25 07:50:56 +0800
commitb23a0b7ee30e2847f0b317e2e7b61adcf545a322 (patch)
tree99c472785021be37167015c2ec02cbb9d3500b9b /libempathy-gtk
parent766f6b5254ab2a1aa78b311e6d0dd00eca7f7cc7 (diff)
downloadgsoc2013-empathy-b23a0b7ee30e2847f0b317e2e7b61adcf545a322.tar
gsoc2013-empathy-b23a0b7ee30e2847f0b317e2e7b61adcf545a322.tar.gz
gsoc2013-empathy-b23a0b7ee30e2847f0b317e2e7b61adcf545a322.tar.bz2
gsoc2013-empathy-b23a0b7ee30e2847f0b317e2e7b61adcf545a322.tar.lz
gsoc2013-empathy-b23a0b7ee30e2847f0b317e2e7b61adcf545a322.tar.xz
gsoc2013-empathy-b23a0b7ee30e2847f0b317e2e7b61adcf545a322.tar.zst
gsoc2013-empathy-b23a0b7ee30e2847f0b317e2e7b61adcf545a322.zip
[presence-chooser] Set status message as the tooltip
Fixes: https://bugzilla.gnome.org/show_bug.cgi?id=640846 Signed-off-by: Danielle Madeley <danielle.madeley@collabora.co.uk>
Diffstat (limited to 'libempathy-gtk')
-rw-r--r--libempathy-gtk/empathy-presence-chooser.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/libempathy-gtk/empathy-presence-chooser.c b/libempathy-gtk/empathy-presence-chooser.c
index 65ec2f62f..948a0a7bd 100644
--- a/libempathy-gtk/empathy-presence-chooser.c
+++ b/libempathy-gtk/empathy-presence-chooser.c
@@ -441,6 +441,7 @@ ui_set_custom_state (EmpathyPresenceChooser *self,
EmpathyPresenceChooserPriv *priv = GET_PRIV (self);
GtkWidget *entry;
const char *icon_name;
+ const gchar *status_tooltip;
entry = gtk_bin_get_child (GTK_BIN (self));
@@ -451,7 +452,9 @@ ui_set_custom_state (EmpathyPresenceChooser *self,
gtk_entry_set_icon_from_icon_name (GTK_ENTRY (entry),
GTK_ENTRY_ICON_PRIMARY,
icon_name);
- gtk_entry_set_text (GTK_ENTRY (entry), status == NULL ? "" : status);
+ status_tooltip = status == NULL ? "" : status;
+ gtk_entry_set_text (GTK_ENTRY (entry), status_tooltip);
+ gtk_widget_set_tooltip_text (GTK_WIDGET (entry), status_tooltip);
presence_chooser_set_favorite_icon (self);
priv->block_changed--;
@@ -859,6 +862,7 @@ presence_chooser_constructed (GObject *object)
EmpathyPresenceChooserPriv *priv = chooser->priv;
GtkWidget *entry;
GtkCellRenderer *renderer;
+ const gchar *status_tooltip;
tp_g_signal_connect_object (gtk_icon_theme_get_default (), "changed",
G_CALLBACK (icon_theme_changed_cb),
@@ -938,9 +942,8 @@ presence_chooser_constructed (GObject *object)
G_CALLBACK (presence_chooser_account_manager_account_changed_cb),
chooser, 0);
- /* FIXME: this string sucks */
- gtk_widget_set_tooltip_text (GTK_WIDGET (chooser),
- _("Set your presence and current status"));
+ status_tooltip = gtk_entry_get_text (GTK_ENTRY (entry));
+ gtk_widget_set_tooltip_text (GTK_WIDGET (chooser), status_tooltip);
priv->connectivity = empathy_connectivity_dup_singleton ();
tp_g_signal_connect_object (priv->connectivity,
@@ -1075,6 +1078,7 @@ presence_chooser_presence_changed_cb (EmpathyPresenceChooser *chooser)
gtk_entry_set_icon_from_icon_name (GTK_ENTRY (entry),
GTK_ENTRY_ICON_PRIMARY,
empathy_icon_name_for_presence (state));
+ gtk_widget_set_tooltip_text (GTK_WIDGET (entry), status);
entry = gtk_bin_get_child (GTK_BIN (chooser));
gtk_editable_set_editable (GTK_EDITABLE (entry),