Commit Graph

67 Commits

Author SHA1 Message Date
Dan Winship
898b2b903d environment: put gettext stuff into global environment
Rather than defining _() as a local function in every module, put it
into the global environment (along with C_() and ngettext()).

https://bugzilla.gnome.org/show_bug.cgi?id=649203
2011-05-16 14:57:21 -04:00
Jonny Lamb
2244b6ff1b telepathyClient: don't notify for delivery reports
Signed-off-by: Jonny Lamb <jonnylamb@gnome.org>
2011-05-12 11:28:43 +01:00
Guillaume Desmottes
2028f33e38 telepathyClient.js: use ShellTpClient instead of TpSimpleObserver
https://bugzilla.gnome.org/show_bug.cgi?id=645585
2011-04-27 10:43:17 +02:00
Dan Winship
72bee6d7ca Revert "telepathyClient: remove alias-change messages, to unbreak string freeze"
Add this message back, now that master is no longer in string freeze.

This reverts commit f6cb215042db1404a8e5a3f694d23670ee23e370.

https://bugzilla.gnome.org/show_bug.cgi?id=642793
2011-04-26 08:17:32 -04:00
Adel Gadllah
57a332bb08 telepathyClient: Fix JS warning triggered by undeclared variable
https://bugzilla.gnome.org/show_bug.cgi?id=646205
2011-04-08 20:32:56 +02:00
Jasper St. Pierre
f117d9bfd3 telepathyClient: give a separate style to TpLogger messages
Sometimes, log messages are hard to differentiate from normal,
unread recent messages, so give a separate style to messages
retrieved from the TelepathyLogger service.

https://bugzilla.gnome.org/show_bug.cgi?id=645609
2011-03-28 23:05:55 -04:00
Owen W. Taylor
b470736246 telepathyClient: Do a better job with old chat timestamps
If we have a date that's not within the last week, it's really
confusing to display it as "Sent at 9:23 on Tuesday". Steal
some strings from calendar.js for displaying older dates to
avoid a string-freeze break.

https://bugzilla.gnome.org/show_bug.cgi?id=645609
2011-03-28 23:05:55 -04:00
Jasper St. Pierre
b2a2a00cd8 telepathyClient: insert a timestamp between log messages and pending messages
This will give a visual break, giving a bit of clarity when a message
is received from a new contact.

https://bugzilla.gnome.org/show_bug.cgi?id=645609
2011-03-28 23:05:55 -04:00
Dan Winship
d2de0865bf telepathyClient: fix duplicate copy of first message in a chat
The chat-history-fill-in code had logic to avoid appending two
messages when a message appeared in both the log and the pending
messages. But it wasn't working because of an incorrect object field
name.

Additionally, the code was previously keeping the copy of the message
from the log, and suppressing the copy from pending. But that meant
that once the previous bug was fixed, it would think it had only shown
old messages, and so it would create a source but not notify it. So
fix it to suppress the log message and show the pending message.

https://bugzilla.gnome.org/show_bug.cgi?id=645612
2011-03-25 18:47:01 -04:00
Dan Winship
4d804c2a29 telepathyClient: remove alias-change messages, to unbreak string freeze
https://bugzilla.gnome.org/show_bug.cgi?id=642793
2011-03-15 13:12:15 -04:00
Jasper St. Pierre
5a269db9d5 telepathyClient: Add messages from TelepathyLogger
This allows users to see chat history from other contacts with
the inline message tray replies.

https://bugzilla.gnome.org/show_bug.cgi?id=643377
2011-03-14 18:49:31 -04:00
Jasper St. Pierre
e6aee5d7ea telepathyClient: Add support for the ACTION message type
This message type is usually supported by the '/me' command
in IRC and IM clients.

https://bugzilla.gnome.org/show_bug.cgi?id=642793
2011-03-14 18:48:18 -04:00
Jasper St. Pierre
6ff69da0de telepathyClient: Add support for aliases on the self-contact
Upgrade the connection's self contact to allow aliases, so that we
don't show the internal telepathy identifier anywhere user-visible.

https://bugzilla.gnome.org/show_bug.cgi?id=642793
2011-03-14 18:48:18 -04:00
Jasper St. Pierre
79d9df9bb1 telepathyClient: Add history navigation to entry
This adds a non-saving history to each notification entry,
like runDialog and lookingGlass.

https://bugzilla.gnome.org/show_bug.cgi?id=642793
2011-03-14 18:42:55 -04:00
Jasper St. Pierre
8c40c2086a telepathyClient: Add alias change notifiers
Update the Source title when an contact's alias changes, and
also also add a minor meta message like the current timestamps.

Updating the alias of a 'presenced' contact will overwrite the
current title, and it will also not update the summary item title
right now due to limitations of the message tray.

https://bugzilla.gnome.org/show_bug.cgi?id=642793
2011-03-14 18:42:55 -04:00
Jasper St. Pierre
f4a000cb59 telepathyClient: Re-open existing chat sources on Shell restart
This allows users to continue a chat they were having after
the shell is restarted.

https://bugzilla.gnome.org/show_bug.cgi?id=642793
2011-03-14 18:42:55 -04:00
Adel Gadllah
a0a83428cf telepathyClient: Pin the scrollbar to the bottom
When new messages come in we want to scroll down so that the user
sees the incoming messages. The current implementation does not work
because it relies on a synchronous allocation hack which does not work
for unmapped notifications.

Fix that by connecting to adjustment::changed and scroll whenever the
adjustment changes which equals "new messages", "new timestamp" or
"presense change", but don't interference with the user's scroll actions
i.e when the user scrolls back to read something don't scroll to the bottom.

https://bugzilla.gnome.org/show_bug.cgi?id=614977
2011-03-09 19:38:17 +01:00
Hellyna Ng
868bf5838d MessageTray: add right click menu for summary items
This provides straight forward controls for opening the corresponding
application or removing the summary item.

https://bugzilla.gnome.org/show_bug.cgi?id=617224
2011-03-07 11:14:11 -05:00
Jasper St. Pierre
97bb5b6680 telepathyClient: Fix two minor typos
https://bugzilla.gnome.org/show_bug.cgi?id=642793
2011-02-23 15:08:45 -05:00
Hellyna Ng
1779f662b1 telepathyClient: changed default icon for contacts without an avatar
The original icon doesn't exist, which results in empathy summary
items in the tray showing no icons (invisible) at all. With this fix
users can now at least see where the icons are (they are no longer
invisible).

https://bugzilla.gnome.org/show_bug.cgi?id=639468
2011-02-17 08:08:53 -05:00
Guillaume Desmottes
ccd2fec890 factor out _createSource 2011-02-16 10:10:26 +01:00
Guillaume Desmottes
02bcce07bd index Source objects using the associated channel path 2011-02-16 10:10:26 +01:00
Guillaume Desmottes
2b91ef7833 use TpTextChannel 2011-02-16 10:10:26 +01:00
Guillaume Desmottes
0285e62516 remove unused ContactManager 2011-02-16 10:10:26 +01:00
Guillaume Desmottes
4ef1923573 get presence changes from TpContact 2011-02-16 10:10:25 +01:00
Guillaume Desmottes
370c596fbf use TpContact to get the avatar 2011-02-16 10:09:43 +01:00
Guillaume Desmottes
e97c15e01e pass a TpContact object to Source
This is based on a patch from Morten Mjelva.
2011-02-16 10:09:43 +01:00
Guillaume Desmottes
69d3aad080 use TpAccountChannelRequest to re-ensure the channel 2011-02-16 10:09:43 +01:00
Guillaume Desmottes
2fd5371de7 Source: store proper Telepathy objects 2011-02-16 10:09:43 +01:00
Guillaume Desmottes
b750dde05b stop looking for existing channels manually
Mission-control will give them to you as we have Recover=True on the Observer.
2011-02-16 10:09:42 +01:00
Guillaume Desmottes
9f310b6773 use constants from tp-glib 2011-02-16 10:09:41 +01:00
Guillaume Desmottes
067e3f2075 Use TpSimpleObserver rather than our own Observer implementation 2011-02-16 10:08:41 +01:00
Jasper St. Pierre
ed6af523cb telepathyClient: Support markup in the title of presence changes
Follow-up to commit 09717aae58 so
title changes also support markup instead of the ugly "<i></i>"
status.

Additionally, make sure to escape the contact's title as that
may accidentally contain unsafe markup or characters.

https://bugzilla.gnome.org/show_bug.cgi?id=642209
2011-02-14 12:12:14 -05:00
Jasper St. Pierre
09717aae58 telepathyClient: allow pango markup in presence changes
We were adding pango markup to the message in ContactManager.setPresence,
but weren't correctly marking the message as containing pango markup,
allowing for uglyness such as "User is <i>away</i>." being shown to the
user.

https://bugzilla.gnome.org/show_bug.cgi?id=642209
2011-02-13 08:44:18 -05:00
Marina Zhurakhinskaya
de3ae87199 MessageTray: factor out focus grabbing from Notification into a separate class
That way it can be used when other components of the message tray need to
grab focus, such as the summary bubble with multiple notifications or the
summary item's right click menu.

https://bugzilla.gnome.org/show_bug.cgi?id=641810
2011-02-10 11:50:29 -05:00
Hellyna Ng
6c55ca59b0 Group chat sources on the left in the message tray
This will make it easier for users to get back to their chats.

https://bugzilla.gnome.org/show_bug.cgi?id=617234
2011-02-01 15:29:14 -05:00
Hellyna Ng
f60b995236 Chats should jump to the top of the notification queue.
This is to ensure users get notified as soon as chats are received.
Notifications with critical urgency still have the highest priority.

https://bugzilla.gnome.org/show_bug.cgi?id=630934
2011-01-05 17:23:01 -05:00
Marina Zhurakhinskaya
53f53c5a91 TelepathyClient: make chat notifications resident
This ensures that chat notifications don't get removed from
the message tray when clicked.

https://bugzilla.gnome.org/show_bug.cgi?id=637810
2010-12-22 15:27:46 -05:00
Luca Ferretti
26f395bb84 [l10n] force no-c-format for "sent at ..." message
"Sent at %X on %A" was incorrectly marked as c-format in PO files;
forcing the no-c-format to allow custom format in translations.
2010-12-13 23:12:51 +01:00
Jasper St. Pierre
b9eca84d34 telepathyClient: Implement Sent signals.
This will allow us to update our notifications when
someone uses a different Telepathy client to send
messages.

https://bugzilla.gnome.org/show_bug.cgi?id=635991
2010-12-01 13:46:07 -05:00
Giovanni Campagna
926ddc2bdf Show timestamp in expanded chat
When the last message is older than SCROLLBACK_IMMEDIATE_TIME (1
minutes), show a timestamp in the middle, indicating the time it
was sent.
Use the same style for presence changes, but show them on the left.

https://bugzilla.gnome.org/show_bug.cgi?id=617228
2010-11-25 15:31:46 +01:00
Dan Winship
c224e019fe telepathyClient: add a missing "new" 2010-11-16 14:08:52 -05:00
Owen W. Taylor
0e3431ac47 Use St.Icon for named icons
Switch from St.TextureCache.load_named_icon() to using St.Icon for named
icons. Along with the advantage of getting colorization right for symbolic
icons, this allows moving some icon sizes into the CSS.

In the CSS, the system status icon size is changed to be 1em (=16px for the
default font size), at the request of the artists. See bug 613448.

https://bugzilla.gnome.org/show_bug.cgi?id=633865
2010-11-12 17:36:26 -05:00
Dan Winship
de16108dff MessageTray: untangle click notifications
Previously, when you clicked on a notification, it would call
this.source.clicked(), which would emit a 'clicked' signal on the
source, and then various other stuff would happen from there. This
used to make a little bit of sense, when clicking on a notification
was supposed to do the same thing as clicking on its source, but makes
less sense now, when clicking on the source itself *doesn't* call
source.clicked()...

Change it so that when you click on a notification, the notification
emits 'clicked' itself, and the source notices that and calls its
notificationClicked() method, and the various source subclasses do
what they need to do with that, and Source no longer has a clicked
method/signal.

https://bugzilla.gnome.org/show_bug.cgi?id=631042
2010-10-12 17:21:58 -04:00
Owen W. Taylor
734d93087a Remove use of octal constants
New spidermonkey warns on octal constants, so we can't
even use them for file permissions. Switch to hex plus a comment.
2010-09-30 12:43:12 -04:00
Dan Winship
a6e4bab990 Add symbolic icons to TextureCache's load_icon_name()
Icons can be loaded as St.Icon.SYMBOLIC, FULLCOLOR, APPLICATION or
DOCUMENT. The first will look for a symbolic equivalent, the second
looks for a full-color version (and does fallback, eg, from
"drive-harddisk-usb" to "drive-harddisk"). APPLICATION and DOCUMENT do
full-color icons without fallback (as specified by the icon spec).

And update various callers to use the right flags.

Based on a patch from Matt Novenstern.

https://bugzilla.gnome.org/show_bug.cgi?id=621311
2010-09-24 10:57:27 -04:00
Marina Zhurakhinskaya
f8dc3b88f8 Use 'customContent' flag instead of 'bannerBody'
We used 'bannerBody' flag to differentiate the case when we move the banner to
the body when the notification is expanded from the one when we don't do that
and only use the custom content set for the notification, as is the case for
Telepathy notifications. We also always cleared the content of the notification
on update when bannerBody was set to true.

Flag named 'customContent' reflects the use case for it more clearly. The
comments that accompany it were also updated and improved.

We now always add the banner text as the first element in the expanded
notification unless 'customContent' flag is set to true.

If the 'body' parameter is specified, we use it in addition to the banner
text. The earlier version of the code had a bug that resulted in the 'body'
parameter not being set only in the case when the 'bannerBody' was set to
true and the banner text had newlines in it.

https://bugzilla.gnome.org/show_bug.cgi?id=623970
2010-08-31 13:47:10 -04:00
Dan Winship
6f57f07214 [MessageTray] Clean up source-vs-notification icon handling
A Source needs exactly one summary icon (which in the case of a
trayicon-based source won't even be just an image), but possibly many
notification icons, which may vary for successive notifications
(particularly in the case of NotificationDaemon notifications). So
differentiate these cases in the API.

https://bugzilla.gnome.org/show_bug.cgi?id=627303
2010-08-26 11:00:54 -04:00
Dan Winship
8f6a7f393d [MessageTray] remove Notification IDs
Notification daemon notifications have IDs, but other kinds don't
necessarily, and the generic code doesn't need to bother with it.

https://bugzilla.gnome.org/show_bug.cgi?id=627303
2010-08-26 10:52:01 -04:00
Dan Winship
d3031b406a [MessageTray] remove Source IDs
The tray itself does not actually need them, and to make status icon
sources work correctly the NotificationDaemon will need to be tracking
its sources by two separate IDs, so the existing system won't work.

Also remove MessageTray.removeSourceByApp(), which is
NotificationDaemon-specific, and implement the functionality in
notificationDaemon.js instead.

https://bugzilla.gnome.org/show_bug.cgi?id=627303
2010-08-26 10:52:01 -04:00