Commit Graph

118 Commits

Author SHA1 Message Date
Jasper St. Pierre
0c19f71c96 telepathyClient: Fix fallout from Lang.Class port
this.parent was ported from calling the parent class's method like
MessageTray.Notification.prototype._init.call(this, ...);. When
porting to Lang.Class, the 'this' parameter is now passed automatically, but
removing it was forgot in a few places. Fix these places.

https://bugzilla.gnome.org/show_bug.cgi?id=665017
2012-01-25 02:13:37 -05:00
Guillaume Desmottes
6cdb1bd60c telepathyClient: handle ExtendedAway as Away and not Offline
https://bugzilla.gnome.org/show_bug.cgi?id=667813
2012-01-13 11:18:35 +01:00
Xavier Claessens
5cf06fe9a7 telepathyClient: No need to prepare channel contacts
tp-glib does it for us since version 0.15.6

https://bugzilla.gnome.org/show_bug.cgi?id=658817
2012-01-12 20:55:40 +01:00
Jonny Lamb
69e26c6dee telepathyClient: only notify on new channels when asked to do so
We need to notify when the channel dispatcher calls HandleChannels on
us with a channel we already handle. However, we don't want to notify
if we claim a new incoming channel which doesn't actually have
anything interesting in it yet.

For example, a new channel pops up just to give a delivery
notification. We want (or, need) to handle it but don't want to notify
for it.

Fixes: https://bugzilla.gnome.org/show_bug.cgi?id=666243

Signed-off-by: Jonny Lamb <jonnylamb@gnome.org>
2011-12-15 16:04:45 +00:00
Marina Zhurakhinskaya
efe6d06ddd telepathyClient: reset badge as soon as the summary notification is shown
That way the user will not see an outdated pending messages count while
they are viewing them or chatting with the sender.

https://bugzilla.gnome.org/show_bug.cgi?id=659272
2011-12-09 11:48:38 -05:00
Giovanni Campagna
17c46c2452 Port everything to class framework
The last patch in the sequence. Every place that was previously
setting prototype has been ported to Lang.Class, to make code more
concise and allow for better toString().

https://bugzilla.gnome.org/show_bug.cgi?id=664436
2011-11-24 09:50:04 +01:00
Giovanni Campagna
b356aa8e3b Port message tray sources and notifications to class framework
Third step in the class framework port, now it's the turn of
MessageTray.Source and MessageTray.Notification, as well as
the various implementations around the shell.

https://bugzilla.gnome.org/show_bug.cgi?id=664436
2011-11-24 09:50:04 +01:00
Jasper St. Pierre
463e0919d4 Remove all stray imports to imports.dbus
Some modules were importing DBus without actually using it.

https://bugzilla.gnome.org/show_bug.cgi?id=648651
2011-11-09 13:56:42 -05:00
Florian Müllner
b62f5ef07d telepathy-client: Replace shell_util_new_from_string
The function has been removed in commit 786cfbd397, but one user
was overlooked when replacing it.

https://bugzilla.gnome.org/show_bug.cgi?id=661231
2011-10-24 16:37:15 +02:00
Adel Gadllah
668920cec4 Small coding style fixes 2011-10-20 22:42:30 +02:00
Dan Winship
75b824d032 *.js: Make emacs modelines consistent
js2-mode is no longer developed and we recommend js-mode these days,
so switch the modelines to specify that, and make them consistent
across all files.

https://bugzilla.gnome.org/show_bug.cgi?id=660358
2011-10-11 08:05:12 -04:00
Jasper St. Pierre
786cfbd397 shell-util: Remove shell_util_icon_from_string
GJS doesn't need to be able to represent interfaces for you to be able to
access an interface method, so Gio.icon_new_for_string works fine.

https://bugzilla.gnome.org/show_bug.cgi?id=661231
2011-10-11 00:07:31 -04:00
Wouter Bolsterlee
61b8af2252 Add translator comment for button label 2011-10-08 01:50:20 +02:00
Jasper St. Pierre
d862c0879b telepathyClient: Check for a no-op before pushing an alias change message
tp-glib can sometimes emit a notify::alias signal when the alias doesn't
actually change. Bail out early instead of pushing an alias change message.

https://bugzilla.gnome.org/show_bug.cgi?id=660774
2011-10-05 15:34:40 -04:00
Jasper St. Pierre
f13f5bc1bb Use '' for non-translated strings
Pay attention to the style guidelines.

https://bugzilla.gnome.org/show_bug.cgi?id=660600
2011-10-04 16:47:53 -04:00
Guillaume Desmottes
00384ccb47 telepathyClient: call delay on context when approving a FT or call
Not doing so is considered as a bug as we don't accept the context right away.
It leads to tp-glib returning directly from the AddDispatchOperation() D-Bus
call and so automatically approve the channel if the Shell is the only
approver running.

https://bugzilla.gnome.org/show_bug.cgi?id=660084
2011-09-26 14:49:21 +02:00
Marina Zhurakhinskaya
131da5f523 telepathyClient: update the avatar correctly when it changes
Previously, when the avatar changed, we would not update the summary icon
for the source at all and would only update the notification icon when the
next message was received. Instead, we should update both immediately upon
recieving the signal that the avatar has changed.

https://bugzilla.gnome.org/show_bug.cgi?id=659768
2011-09-22 13:25:35 -04:00
Xavier Claessens
1d14488a4f telepathyClient: notify only once per account for connection error
https://bugzilla.gnome.org/show_bug.cgi?id=659050
2011-09-15 10:10:22 +02:00
Jasper St. Pierre
8af4fd64c1 telepathyClient: Fix undefined variable
https://bugzilla.gnome.org/show_bug.cgi?id=658624
2011-09-09 10:50:11 -04:00
Dan Winship
88f2bbba61 telepathyClient: don't try to translate concatenations of strings
xgettext doesn't recognize it

https://bugzilla.gnome.org/show_bug.cgi?id=657759
2011-09-01 09:20:11 -04:00
Jasper St. Pierre
bd9455ec8e telepathyClient: Add notification for account connection errors
Based on initial work from Alban Crequy and Xavier Claessens

https://bugzilla.gnome.org/show_bug.cgi?id=654159
2011-08-29 10:35:09 -04:00
Xavier Claessens
fefee3b49e telepathyClient: Add IM subscription request support
Based on initial work from Guillaume Desmottes

https://bugzilla.gnome.org/show_bug.cgi?id=653941
2011-08-29 10:35:09 -04:00
Jasper St. Pierre
06d906b962 telepathyClient: Add direction containers
Direction containers group all contiguous messages in the same direction into
their own parent container, allowing for smarter styling of similar messages.

https://bugzilla.gnome.org/show_bug.cgi?id=640271
2011-08-24 15:32:15 -04:00
Jasper St. Pierre
712ea9b9b6 telepathyClient: Use sent timestamp instead of received timestamp
It's generally more useful to see when a person sent a message instead of when
we received it. Also, a recent change in Telepathy made the received timestamp
be 0 for messages we send.

https://bugzilla.gnome.org/show_bug.cgi?id=640271
2011-08-24 11:18:58 -04:00
Xavier Claessens
11c8405879 telepathyClient: Delay notification in case it gets acked
The shell should only notify in case no other client handles the message.
Empathy will ack the message if focused, so we don't want to step on its
toes.
2011-08-22 19:18:31 +02:00
Guillaume Desmottes
7458d3ef39 Approve file transfer channels
https://bugzilla.gnome.org/show_bug.cgi?id=653940
2011-08-18 12:35:57 +02:00
Guillaume Desmottes
52c5f9b144 ApproverSource: takes a gicon rather than an icon name
https://bugzilla.gnome.org/show_bug.cgi?id=653940
2011-08-18 12:35:17 +02:00
Guillaume Desmottes
cb1966612e Don't save unacked messages
Don't bother tracking which messages we need to ACK, just tell Telepathy to
ACK them all.

https://bugzilla.gnome.org/show_bug.cgi?id=654398
2011-08-04 10:53:48 +02:00
Jasper St. Pierre
7780c99de6 telepathyClient: Use markup for timestamps
Commit aa1405e4ea introduced <b> tags for timestamps, but forgot to enable
markup with them.
2011-08-03 21:53:15 -04:00
Jasper St. Pierre
aa1405e4ea telepathyClient: Add our own translations for timestamps
As an effort to prevent a string freeze to land timestamps on 3.0, we reused
translations for the calendar. Now that the string freeze is long gone, make
some proper strings.

https://bugzilla.gnome.org/show_bug.cgi?id=640271
2011-08-03 18:14:34 -04:00
Jasper St. Pierre
80b98d8787 telepathyClient: Code cleanup
Move a function to where it's used and rename "_createSource"
to reflect that it creates *chat* sources.

https://bugzilla.gnome.org/show_bug.cgi?id=654791
2011-07-17 15:26:52 -04:00
Jasper St. Pierre
bf2ba83cd5 telepathyClient: Fix undefined variable
https://bugzilla.gnome.org/show_bug.cgi?id=654791
2011-07-17 15:26:52 -04:00
Guillaume Desmottes
cecba0269f Approve audio/video channels
Support the old (StreamedMedia) and new (Call) API for now as the latter is
still used.

https://bugzilla.gnome.org/show_bug.cgi?id=653939
2011-07-15 17:12:41 +01:00
Guillaume Desmottes
90db743cc9 Turn RoomInviteSource to a more generic source
All the approving source will be basically the same.

https://bugzilla.gnome.org/show_bug.cgi?id=653939
2011-07-14 09:47:36 +02:00
Guillaume Desmottes
09f3c87d20 Allow other clients to preempt the channels we are handling
This is needed if we are handling an incoming text channel and then user tries
to open a chat with the same contact using Empathy. In this case, the Shell
should delegate the channel back to Empathy and just continue observing it as
it does for usual outgoing channels.

Depends on telepathy-glib 0.15.3 as
tp_base_client_set_delegated_channels_callback() has been added in this
version.

https://bugzilla.gnome.org/show_bug.cgi?id=654237
2011-07-11 14:43:14 +02:00
Jonny Lamb
de348a4c49 telepathyClient: send typing notifications
If we're typing we want to send composing. If we empty the entry we
want to send active. If we're typing but don't type any more for
COMPOSING_STOP_TIMEOUT seconds, we want to send paused. Simple.

This behaviour was stolen from Empathy where it has won many awards.

https://bugzilla.gnome.org/show_bug.cgi?id=650196

Based on patch from Jonny Lamb <jonnylamb@gnome.org>
Signed-off-by: Alban Crequy <alban.crequy@collabora.co.uk>
2011-07-07 16:31:22 +01:00
Guillaume Desmottes
fda8ffd9ef Display the number of unread messages in the notification icon
https://bugzilla.gnome.org/show_bug.cgi?id=654139
2011-07-07 15:48:33 +02:00
Guillaume Desmottes
998c5f17fc Approve room invitations
We use to rely on Empathy for this but as we plan to allow users to be
connected on IM without having Empathy running the Shell should do it now.

https://bugzilla.gnome.org/show_bug.cgi?id=653740
2011-07-07 11:18:46 +02:00
Guillaume Desmottes
8c40b6f9a7 rename Source and Notification to make clear they are about chats
We are going to support more Telepathy events hence more Source and
Notification types.

https://bugzilla.gnome.org/show_bug.cgi?id=653740
2011-07-01 08:14:55 +02:00
Guillaume Desmottes
2e8654b96c telepathyClient.js: ack pending messages (#644297) 2011-06-29 10:02:40 +02:00
Jasper St. Pierre
6f515f2327 telepathyClient: Add another GAsyncReadyCallback
This is better for memory management, and we'll see any errors this
way, which we may eventually want to do something with.

We need to make this change because gjs recently started checking
(allow-none) on callbacks.
2011-06-28 13:22:26 -04:00
Jasper St. Pierre
cbb9a7ab96 telepathyClient: Fix GAsyncReadyCallback
This caused a minor error.
2011-06-28 11:58:41 -04:00
Colin Walters
5c6e5ef6d0 telepathyClient: Don't ignore GAsyncReadyCallback
This is better for memory management, and we'll see any errors this
way, which we may eventually want to do something with.

We need to make this change because gjs recently started checking
(allow-none) on callbacks.
2011-06-23 19:28:21 -04:00
Florian Müllner
42adc38609 telepathy-client: Minor coding style fix
Use camelCase for JS properties.
2011-06-24 00:57:48 +02:00
Florian Müllner
e5fadb3b42 telepathy-client: Adjust to gjs array changes
Since bug 646632 was fixed, array lengths are no longer passed as
separate parameters. Adjust to that change.
2011-06-24 00:57:11 +02:00
Jasper St. Pierre
890efa787a messageTray: update the SummaryItem's label based on Source title changes
https://bugzilla.gnome.org/show_bug.cgi?id=643513
2011-06-09 17:07:06 -04:00
Guillaume Desmottes
60c88612f7 Implement a Telepathy Approver and Handler (#643594)
As the Shell does more than observing channels (users can interact with them),
it has to be an Handler as well. We have to make sure that all the new
incoming text channels are handled by the Shell by default, so we make it an
Approver as well.

From an user point of view, the only difference is that Empathy's tray icon
will stop blicking when receiving new channels.

We rely on ChannelDispatcher.DelegateChannels() and PresentChannel() to
interact with Empathy. Those methods have been implemented in
telepathy-mission-control 5.9.0 and telepathy-glib 0.15.0.
2011-06-09 13:57:18 +02:00
Jasper St. Pierre
8c2a290d09 telepathyClient: Make sure to filter messages at all times
When timestamps or presence or alias changes were appended before,
the _history could grow unbounded, leaving behind an unfruitful chat
log of:

  Jasper has gone offline.
  Jasper has gone online.
  Jasper has gone offline.
  Jasper has gone online.

ad nausem.

https://bugzilla.gnome.org/show_bug.cgi?id=651086
2011-06-07 03:04:52 -04:00
Jasper St. Pierre
8e661c3780 telepathyContact: Fix presence information
An incorrect signal handler signature broke presence handling in master.

https://bugzilla.gnome.org/show_bug.cgi?id=651138
2011-06-06 07:56:44 -04:00
Guillaume Desmottes
7b65735cc9 skip delivery reports in pending messages (#651227)
We already ignore them in _messageReceived but have to ignore them as well
when displaying pending messages.
2011-06-01 10:22:44 +02:00