Jussi Kukkonen [Tue, 6 Sep 2011 08:50:35 +0000 (11:50 +0300)]
log-window: sort "Who" list store alphabetically
Currently "Who"-list is sorted with "g_strcmp0 (name)" which
is not what we want (e.g. "Chris" becomes before "bob" because of
the initial capital letter).
Will Thompson [Tue, 6 Sep 2011 10:25:26 +0000 (11:25 +0100)]
ContactSelector: mark standard action as the default.
This allows Gtk+ to style the button differently to indicate that it
will be pressed when the user hits Enter; it also fixes hitting enter in
the New Conversation dialog, which does not consider GTK_RESPONSE_ACCEPT
to be a reasonable response and ignores it. So we get a bug fix and
better styling in exchange for less code!
Will Thompson [Tue, 6 Sep 2011 10:06:30 +0000 (11:06 +0100)]
IndividualManager: disconnect handler from aggregator
Previously, the handler for
FolksIndividualAggregator::individuals-changed was never disconnected;
thus it could be called after EmpathyIndividualManager dies (if its
aggregator outlives it), and crash us.
Will Thompson [Tue, 6 Sep 2011 14:52:34 +0000 (15:52 +0100)]
TpChat: don't crash with broken TpProperties implementations
I forgot to take the Telepathy.Properties interface out of Gabble when I
removed Telepathy.Properties support from it. So Empathy called
ListProperties() on it anyway: fine, you might think, except the
callback set priv->had_properties_list to TRUE even if the method
returned an error. empathy_tp_chat_set_property() and
empathy_tp_chat_get_property() assume that if priv->had_properties_list is
TRUE, priv->properties is not NULL.
While I hope that we can delete this code entirely pretty soon, getting
this crash fix in seems like a good idea.
Will Thompson [Thu, 25 Aug 2011 15:02:14 +0000 (16:02 +0100)]
Preferences: remove Appearance label in Themes tab.
This label doesn't add anything, so I removed it. The indentation is
weird because I hand-edited the Glade file to show that nothing's really
changed: I'll reindent it in the next patch.
Changed "desktop viewing application" to "desktop sharing application"
when talking about a VNC server. Simplified language, improved grammar
and word order.
Cosimo Alfarano [Wed, 31 Aug 2011 16:28:35 +0000 (17:28 +0100)]
Fixes a segfault in empathy-individual-store.c
When a contact cannot be obtained from an individual, icon_name and
contact will be NULL, leading to g_hash_table_lookup for a NULL-value,
segfaulting.
Although there's probably an underlying error somewhere, the NULL case
should be handled, being a valid return value for the method;
Danielle Madeley [Wed, 31 Aug 2011 03:13:16 +0000 (13:13 +1000)]
Use g_date_time_new_from_unix_local() to read timestamps from logger
g_date_time_new_from_unix_local() reads a Unix timestamp (which is defined
to be in UTC) and sets the timezone for the GDateTime to be the local timezone.
Thus when we format it, we get times in local time.
g_date_time_new_from_unix_utc() is not correct, because it sets the timezone
to UTC.
Alban Crequy [Thu, 25 Aug 2011 15:46:25 +0000 (16:46 +0100)]
contact list: optimize loading contacts
The previous algorithm was O(n^2) with the number of contacts. Each contact can
be in several groups, so when a contact is added or updated, we iterated over
all the contact list to find the rows representing the contact. When connecting
to an account and getting all the contacts, this was too slow.
The groups are stored in the GtkTreeStore and suffer from the same problem: to
look for a group, it needed to iterate on all contacts.
The new algorithm maintains a hash from the contact to the list of rows
representing it, and another hash from the group to the row representing it.
On Empathy 2.30.2 when tested on MeeGo with 300 contacts, loading the contacts
is faster: roughly 9 seconds before the patch, 3 seconds after.
On Empathy 3.1.5, it seems to load in background so I don't know how to measure
the time lost in GtkTreeStore. But before the patch, GProf says 23% is lost in
individual_store_find_contact_foreach(), and after the patch it is not visible
anymore. And "time" says we win 5s of CPU when starting+quitting Empathy:
Before the patch: After the patch:
real 0m23.485s real 0m23.460s
user 0m13.805s user 0m8.305s
sys 0m0.308s sys 0m0.316s