Commit Graph

136 Commits

Author SHA1 Message Date
Jasper St. Pierre
5991c8dca3 messageTray: Hook SourceActor up to source icon changes automatically
Instead of manually tracking source icon changes, or requiring a manual
call to _setSummaryIcon, add a way to emit a signal when we're guaranteed
the icon has been changed, and then the source actor will automatically
update the icon.
_setSummaryIcon is still available for sources such as the notification
daemon, that require special treatment for the summary icon (to be used
with tray icons)

https://bugzilla.gnome.org/show_bug.cgi?id=680426
2012-08-18 00:36:13 +02:00
Jasper St. Pierre
3042e647ff telepathyClient: Pass a proper launch client to launch empathy-accounts
https://bugzilla.gnome.org/show_bug.cgi?id=682045
2012-08-16 20:10:25 -04:00
Jasper St. Pierre
a004ad6088 telepathyClient: Pass the right amount of parameters
https://bugzilla.gnome.org/show_bug.cgi?id=682045
2012-08-16 20:10:24 -04:00
Jasper St. Pierre
addb247c33 telepathyClient: Remove some obsolete wrappers
gjs can handle these cases natively now

https://bugzilla.gnome.org/show_bug.cgi?id=682045
2012-08-16 20:10:24 -04:00
Giovanni Campagna
aa733b5e53 Only show new notifications in the screen shield
Rework the count system in Source, to distinguish between the
normal notification count and the count of unseen/unacknowledged
notification. (A notification is considered unacknowledged until
shown, as a banner or inside the summary box pointer).
Includes some code cleanups and a test for multiple notifications
in the same source.

https://bugzilla.gnome.org/show_bug.cgi?id=681143
2012-08-07 18:10:49 +02:00
Giovanni Campagna
ac6c808124 MessageTray: rework icon handling to split model and view
To allow more than one summary icon actor for a source we split
the model of the source icon (which is iconName, if the default
implementation is used, or a GIcon otherwise) and replace
createNotificationIcon() with a generic createIcon(size). Also,
the actual source actor is split into a separate class, that handles
the notification counter automatically.

https://bugzilla.gnome.org/show_bug.cgi?id=619955
2012-07-21 15:40:28 +02:00
Ana Risteska
4448b65a18 telepathyClient: don't add log messages on presence changes
The log messages about presence changes unnecessarily cluttered the
notification.
Instead, we now present the presence states (online, offline, away, busy)
with an icon placed right next to the avatar. We also no longer show
notifications on presence changes.

https://bugzilla.gnome.org/show_bug.cgi?id=669508
2012-07-05 14:09:09 -04:00
Guillaume Desmottes
ededba0c6d telepathyClient: ignore invalidated channels
There is a race if a channel is invalidated during its preparation: the
'invalidated' signal is already emitted so the Shell will never notice.
We fix this by simply checking if the channel is already invalidated when
receiving it from telepathy-glib.

In the approving case, we reject the full ChannelDispatchOperation as we only
support approving one channel at the time.

https://bugzilla.gnome.org/show_bug.cgi?id=677457
2012-06-18 09:56:12 +02:00
Guillaume Desmottes
e112fa92fe telepathyClient: decline dispatch op when approving unsupported channel type
It shouldn't happen in theory but best to be safe than sorry.

https://bugzilla.gnome.org/show_bug.cgi?id=677457
2012-06-18 09:56:12 +02:00
Jasper St. Pierre
c9296191a8 js: Remove unnecessary versions of clutter_actor_get_children
clutter_actor_get_children requires making a temporary GSList from
a linked list structure, and then creating a JS Array from that GSList.
For simple cases like the number of children, use clutter_actor_get_n_children.

https://bugzilla.gnome.org/show_bug.cgi?id=677426
2012-06-11 13:10:25 -04:00
Jasper St. Pierre
a1f68720e5 telepathyClient: Remove C-based TelepathyLogger wrapper
gjs has matured enough to the point where we don't need this

https://bugzilla.gnome.org/show_bug.cgi?id=676850
2012-06-01 08:59:59 -04:00
Alban Browaeys
ba4b9f229e telepathyClient: fix isChat
As part of commit 9e1a2cf the parent _init was moved before the isChat
was set to true. As the parent set it to false isChat is never true
since this commit.

https://bugzilla.gnome.org/show_bug.cgi?id=676806
2012-05-25 13:14:43 -04:00
Jasper St. Pierre
9e1a2cfeac Start using MessageTray.Source directly instead of having to subclass it
For most subclasses, this is a direct swap -- a lot of the time, the
constructor was a blank class that override createNotificationIcon,
and called _setSummaryIcon in _init.

https://bugzilla.gnome.org/show_bug.cgi?id=661236
2012-05-17 08:32:22 -04:00
Joost Verdoorn
d79e8b84c9 telepathyClient: call this.updated() when a new message is added to a notification
When receiving another message or responding in a new expanded chat
notification that has no prior chat history, the notification moved down
below the edge of the screen instead of expanding up, making part of it
invisible. Avoid this by making sure the notification's position is updated.

https://bugzilla.gnome.org/show_bug.cgi?id=661944
2012-04-16 23:29:07 -04:00
Xavier Claessens
f248aa69dc Support only Call1 channels
Empathy uses to support 2 D-Bus API for calls:
- StreamedMedia: legacy API
- Call.DRAFT: experimental version of the new API

Since 3.3.90, Empathy only supports Call1, the first stable version of the new
API, so the Shell should do the same.

https://bugzilla.gnome.org/show_bug.cgi?id=667694
2012-02-21 17:43:05 +01:00
Jasper St. Pierre
68b7e8437b telepathyClient: Remove extremely outdated comment
The Shell has not been just an "Observer" for a long while now.
2012-02-14 17:29:52 -05:00
Will Thompson
019dd2e1b0 telepathyClient: show connection manager crashes as "Internal error"
We use the same error messages as Empathy; this one was added to Empathy
in commit 756dbf5a7a658ba472fc63ef6034d2c4d90e3260.

https://bugzilla.gnome.org/show_bug.cgi?id=658908
2012-02-10 10:50:45 +00:00
Guillaume Desmottes
61e2e04f13 improve TP_ERROR_STR_ALREADY_CONNECTED displayed error string
'ressource' is XMPP specific and not clear to most users.

https://bugzilla.gnome.org/show_bug.cgi?id=669662
2012-02-08 13:37:30 +01:00
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