aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorXavier Claessens <xclaesse@gmail.com>2007-09-21 21:19:33 +0800
committerXavier Claessens <xclaesse@src.gnome.org>2007-09-21 21:19:33 +0800
commitdf79acf5765374714dd018519152a203291f1e5a (patch)
tree4563d61028874c31a9671a7184b2c1cdcf6f47f7
parent944d3f383305b6cf50ee8a7995a1daf9a72ece20 (diff)
downloadgsoc2013-empathy-df79acf5765374714dd018519152a203291f1e5a.tar
gsoc2013-empathy-df79acf5765374714dd018519152a203291f1e5a.tar.gz
gsoc2013-empathy-df79acf5765374714dd018519152a203291f1e5a.tar.bz2
gsoc2013-empathy-df79acf5765374714dd018519152a203291f1e5a.tar.lz
gsoc2013-empathy-df79acf5765374714dd018519152a203291f1e5a.tar.xz
gsoc2013-empathy-df79acf5765374714dd018519152a203291f1e5a.tar.zst
gsoc2013-empathy-df79acf5765374714dd018519152a203291f1e5a.zip
Tooltip for subscription request shouldn't display "Message:" if the
2007-09-21 Xavier Claessens <xclaesse@gmail.com> * libempathy-gtk/empathy-status-icon.c: Tooltip for subscription request shouldn't display "Message:" if the message is empty. Fixes bug #459538 (Cosimo Cecchi). Do not update tooltip each time the icon change. svn path=/trunk/; revision=306
-rw-r--r--ChangeLog7
-rw-r--r--libempathy-gtk/empathy-status-icon.c18
2 files changed, 17 insertions, 8 deletions
diff --git a/ChangeLog b/ChangeLog
index 3b91ca5a9..53e764d49 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,12 @@
2007-09-21 Xavier Claessens <xclaesse@gmail.com>
+ * libempathy-gtk/empathy-status-icon.c: Tooltip for subscription request
+ shouldn't display "Message:" if the message is empty. Fixes bug #459538
+ (Cosimo Cecchi).
+ Do not update tooltip each time the icon change.
+
+2007-09-21 Xavier Claessens <xclaesse@gmail.com>
+
* libempathy-gtk/empathy-chat-window.c: Do not set "new message" in
the title of conversation windows, it's useless. Fixes bug #459523.
diff --git a/libempathy-gtk/empathy-status-icon.c b/libempathy-gtk/empathy-status-icon.c
index 4fc1ca055..39c4bcfe6 100644
--- a/libempathy-gtk/empathy-status-icon.c
+++ b/libempathy-gtk/empathy-status-icon.c
@@ -552,7 +552,7 @@ status_icon_pendings_changed_cb (EmpathyContactManager *manager,
{
EmpathyStatusIconPriv *priv;
StatusIconEvent *event;
- gchar *str;
+ GString *str;
GList *l;
priv = GET_PRIV (icon);
@@ -568,16 +568,18 @@ status_icon_pendings_changed_cb (EmpathyContactManager *manager,
}
}
- str = g_strdup_printf (_("Subscription requested for %s\n"
- "Message: %s"),
- empathy_contact_get_name (contact),
- message);
+ str = g_string_new (NULL);
+ g_string_printf (str, _("Subscription requested by %s"),
+ empathy_contact_get_name (contact));
+ if (!G_STR_EMPTY (message)) {
+ g_string_append_printf (str, _("\nMessage: %s"), message);
+ }
- event = status_icon_event_new (icon, GTK_STOCK_DIALOG_QUESTION, str);
+ event = status_icon_event_new (icon, GTK_STOCK_DIALOG_QUESTION, str->str);
event->user_data = g_object_ref (contact);
event->func = status_icon_event_subscribe_cb;
- g_free (str);
+ g_string_free (str, TRUE);
}
static void
@@ -639,6 +641,7 @@ status_icon_event_new (EmpathyStatusIcon *icon,
(GSourceFunc) status_icon_event_timeout_cb,
icon);
status_icon_event_timeout_cb (icon);
+ status_icon_update_tooltip (icon);
}
return event;
@@ -688,7 +691,6 @@ status_icon_event_timeout_cb (EmpathyStatusIcon *icon)
event = priv->events->data;
gtk_status_icon_set_from_icon_name (priv->icon, event->icon_name);
}
- status_icon_update_tooltip (icon);
return TRUE;
}