Commit Graph

85 Commits

Author SHA1 Message Date
Piotr Drąg
022376dd56 Added contexts to various Unknown strings
Fixes bug https://bugzilla.gnome.org/show_bug.cgi?id=659968
2012-06-01 14:44:40 +02:00
Guillaume Desmottes
934e5aacab notificationDaemon.js: convert the hints dict at the beginning of the function
It's used right away to discard some Empathy notifications.

This regression has been introduced during the 3.4 cycle when 'hints' has been
turned to a GVariant.

https://bugzilla.gnome.org/show_bug.cgi?id=675370
2012-06-01 09:40:32 +02:00
Jasper St. Pierre
ec4a2aae95 notificationDaemon: Fix copy-paste typo
Since this line was introduced in 7458d3e, "Approve file transfer channels",
it's quite obvious that the line was meant to filter out transfer channel
notifications.

https://bugzilla.gnome.org/show_bug.cgi?id=676175
2012-05-18 14:08:12 -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
Jasper St. Pierre
2e8881b77c notificationDaemon: Match app based on WM_CLASS
Most tray applets won't have an associated window in the same PID. We
need to fall back to the WM_CLASS in this case.

https://bugzilla.gnome.org/show_bug.cgi?id=673761
2012-04-27 15:49:18 -04:00
Owen W. Taylor
29da720e6a notificationDaemon: fix order of arguments to _lookupSource()
The order of arguments passed to _lookupSource() was wrong, causing
problems when tray icons were removed.

https://bugzilla.gnome.org/show_bug.cgi?id=664138
2012-01-20 00:03:07 -05:00
Marina Zhurakhinskaya
936b1b5638 notificationDaemon: group sources based on a combination of pid and title
That way different system notifications, such as the ones about battery power
and the ones about software updates, are shown with separate message tray
sources.

https://bugzilla.gnome.org/show_bug.cgi?id=664138
2012-01-03 15:15:33 -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
Giovanni Campagna
827bf506a7 notificationDaemon, magnifierDBus: port to GDBus
Move /org/freedesktop/Notifications and /org/gnome/Magnifier to the
GDBus connection, so they're matched with the appropriate DBus name.

https://bugzilla.gnome.org/show_bug.cgi?id=648651
2011-11-11 11:15:38 -05:00
Marina Zhurakhinskaya
9593ff3582 notificationDaemon: only display a large image if an icon is also specified
Historically, when applications set "image-data" they expect it to show up
as an icon. So we display it as such if an icon is not specified with an
"app_icon" argument to Notify(). We also use "image-path" for an icon if
an icon is not specified.

We only display a large image specified with "image-data" or "image-path"
if an icon is also specified.

https://bugzilla.gnome.org/show_bug.cgi?id=659158
2011-10-17 17:53:16 -04: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
Neha Doijode
aabe56ba79 messageTray: implement showing images in notifications
Images are part of the notification spec, so we should support them.

Marina Zhurakhinskaya provided some code for getting the layout right
for this patch.

https://bugzilla.gnome.org/show_bug.cgi?id=621009
2011-08-29 13:46:47 -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
Colin Walters
b76efe17d6 notificationDaemon: Work around JS interpreter bug
The "id" variable was being sporadically reset to null, and as far as
Florian and I could determine, this is actually a Spidermonkey bug.

The issue has something to do with:

1) use of "let" for the variable
2) Nesting a dynamic closure inside of a for() loop

Work around it here for now - I tried to create a minimized test case
to hand to the Spidermonkey developers, but failed.  A big part of
the problem is it's only sporadically reproducible.
2011-08-25 09:20:00 -04: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
Dan Winship
3850edced5 notificationDaemon: fix syntax error 2011-08-03 15:21:00 -04:00
Florian Müllner
ddd59f2e76 notification-daemon: Add support for 'default' actions
The notification spec supports the concept of a 'default' action:
  "The default action (usually invoked my clicking the notification)
   should have a key named "default". The name can be anything, though
   implementations are free not to display it."
Support this by invoking the 'default' action rather than a emitting
the 'clicked' signal when clicking notifications which specifie a
default action.
Also don't add an action button for the default action.

https://bugzilla.gnome.org/show_bug.cgi?id=655818
2011-08-03 20:07:50 +02:00
Marina Zhurakhinskaya
0366e320af NotificationDaemon: only remove the source if notification sender is removed from DBus and the application is set
This ensures that we don't remove "notify-send" sources, senders of which are
removed from DBus immediately.
2011-07-27 17:16:05 -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
Giovanni Campagna
67736642f3 Fix methods that take array arguments
Length parameter is no longer required in current GJS. Fix that.

https://bugzilla.gnome.org/show_bug.cgi?id=654349
2011-07-11 20:13:35 +02:00
Neha Doijode
153768ef7f NotificationDaemon: remove source if notification sender is removed from DBus
We don't want sources that are no longer associated with a running application
to stick around in the message tray.

Message tray sources were removed when the associated application’s state
changed to Shell.AppState.STOPPED . This caused sources for applications
that were still running, but did not have any open windows to be removed.
Instead, we should use the notification’s sender removal from DBus as an
indicator for when to remove the associated source from the message tray.

https://bugzilla.gnome.org/show_bug.cgi?id=645764
2011-07-08 21:24:42 -04: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
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
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
Guillaume Desmottes
9396d736f2 notificationDaemon: only ignore 'chat' and 'presence' notifications from Empathy (#645932) 2011-04-02 00:05:10 +02:00
Giovanni Campagna
96c2b5ef32 MessageTray: don't forward click on sources with notifications
When a source has an associated tray icon, we would forward all clicks
to the X11 window, meaning that the summary notification could not
be opened. Instead, restore normal event flow for clicks, when the
source has notifications in the queue.

https://bugzilla.gnome.org/show_bug.cgi?id=645753
2011-03-28 23:05:56 -04:00
Giovanni Campagna
9530048867 NotificationDaemon: fix typo in dealing with TrayIcon
Source was failing to determine if it was a tray icon, destroying
itself when the associated application was closed.

https://bugzilla.gnome.org/show_bug.cgi?id=645625
2011-03-23 22:58:28 +01:00
Marina Zhurakhinskaya
812812d817 MessageTray: show multiple notifications per source
Add an ability to show multple notifications per source, so that
the user doesn't miss seeing any notifications.

https://bugzilla.gnome.org/show_bug.cgi?id=611611
2011-03-22 18:18:11 -04:00
Neha Doijode
8798ec653d NotificationDaemon: don't notify for resident notifications when application is focused
The applications have to have a way of keeping resident notifications
updated without unnecessarily notifying the user with the information
the user is already seeing in the application window.

https://bugzilla.gnome.org/show_bug.cgi?id=630847
2011-03-21 21:58:29 -04:00
Dan Winship
22bfd4f7c3 notificationDaemon: handle trayicon clicks in the overview
If the user clicks a trayicon in the overview, drop out of the
overview before passing the click on to the icon. (We have to actually
wait for the overview animation to complete, in case the icon wants to
get a pointer grab, which it would not be able to do with the overview
active.)

https://bugzilla.gnome.org/show_bug.cgi?id=641853
2011-03-21 14:58:10 -04:00
Dan Winship
7f17fcfafc messageTray: forward clicks on trayicon SummaryItems to the icon
If the user clicks on the title of a trayicon's SummaryItem, forward
that click to the trayicon. Also adjust
gnome_shell_plugin_xevent_filter() so that if the trayicon takes a
grab as a result of this, we don't hide the message tray.

https://bugzilla.gnome.org/show_bug.cgi?id=630842
2011-03-21 14:56:53 -04:00
Neha Doijode
c4dad3d2c1 MessageTray: remove source if associated application exits
We don't want sources that are no longer associated with a running
application to stick around in the message tray.

https://bugzilla.gnome.org/show_bug.cgi?id=642659
2011-03-07 17:37:31 -05: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
Colin Walters
474ff2e997 Claim DBus names (Shell, Notifictions) *very* early
See commit f2158218bef0c51 in mutter.  Basically, we need
to grab org.freedesktop.Notifications before anything else
in the session gets started.

Note: I intentionally removed the Util.killall bits.  I believe that
for notification-daemon at least, if we specify
DBUS_NAME_FLAG_REPLACE_EXISTING, we'll take over the name.  Not sure
about notify-osd; if that's still a problem, then what we need to do
is add killing (and possibly respawning) of notify-osd to
"gnome-shell --replace", and not have it embedded randomly in a JS file.

https://bugzilla.gnome.org/show_bug.cgi?id=642666
2011-02-28 13:53:44 -05:00
Marina Zhurakhinskaya
e9613b0340 Emit NotificationClosed for a notification iff we destroy it
This fixes emitting NotificationClosed for resident notifications
that are clicked, but are not actually destroyed.

This also ensures that we emit NotificationClosed in all cases when
a notification is destroyed, which can happen when:
- a non-resident notification is clicked
- an action is invoked on a non-resident notification
- an application the notification was associated with is focused
- a transient notification is done showing
- a notification was requested to be closed by the application
- a tray icon the notification was associated with is removed

https://bugzilla.gnome.org/show_bug.cgi?id=638071
2011-01-28 13:02:20 -05:00
Cosimo Cecchi
68c482ec32 notification: be compatible with various names of the icon data hint
The hint changed its name during various iterations of the
notification daemon spec; be compatible with all of them.

https://bugzilla.gnome.org/show_bug.cgi?id=639959
2011-01-19 17:31:23 +01:00
Dan Winship
23353fb77a Util.killall: add utility for killing unwanted processes
Since we have to use pkill, kludgily, for the right combination of
portability and featurefulness, put the code in one place rather than
duplicating it everywhere.

https://bugzilla.gnome.org/show_bug.cgi?id=635089
2011-01-13 12:14:40 -05:00
Giovanni Campagna
6200daa5bb Propagate version to Javascript files
Add an entry in config.js.in for PACKAGE_VERSION and GJS_VERSION,
to be used by the notification daemon and in the future by the
extension system.

https://bugzilla.gnome.org/show_bug.cgi?id=639255
2011-01-12 20:32:30 +01:00
Adel Gadllah
5322e9a643 notificationDaemon: Fix trayIcon check
Correctly detect non tray icons and use the ShellApp's icon in that case.
2011-01-07 16:24:44 +01: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
22f4aabadf NotificationDaemon: add support for transient notifications
Transient notifications are removed after being shown. If the summary
is being shown while they appear, they are represented in it by a new
source icon.

We always create a new source for new transient notifications to
ensure that they don't replace the latest persistent notification
associated with the source. Because we generally don't want any
new or resident notifications to be replaced by others, associating
multiple notifications with a source is the next thing we will
implement.

https://bugzilla.gnome.org/show_bug.cgi?id=633412
2010-12-16 15:50:29 -05:00
Marina Zhurakhinskaya
2a19d5f143 NotificationDaemon: add support for resident notifications
Resident notifications don't get removed when they are clicked or
one of their actions is invoked, and are only removed when the app
that created them requests them to be removed or sends another
notification.

Remove the source when a notification associated with it is removed.
Except if the source is a tray icon.

Make sure that we pop down the tray when a notification is clicked
or one of the actions of a non-resident notification is selected.

Based on the initial patch by Jonathan Matthew.

https://bugzilla.gnome.org/show_bug.cgi?id=633412
2010-12-16 15:49:47 -05:00
Dan Winship
b25bad9995 notificationDaemon: fix escaping in xchat rewrite rules
https://bugzilla.gnome.org/show_bug.cgi?id=635712
2010-11-29 14:31:20 -05:00
Dan Winship
d6f1c10b1b messageTray: fix handling of markup vs non-markup notifications
NotificationDaemon-based notifications have markup in the banner/body,
but Telepathy-based notifications don't. (Eg, an XMPP message
containing "<b>foo</b>" should show up angle brackets and all, not as
bold.) Fix MessageTray.Notification to allow explicitly specifying
where there should and shouldn't be markup, and use that
appropriately.

https://bugzilla.gnome.org/show_bug.cgi?id=610219
2010-11-24 02:38:17 +03: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
Jonathan Matthew
9585c823d5 MessageTray: only create icon buttons if specifically requested
Action names sometimes unintentionally overlap with icon names, so
we should only create icon buttons if the message tray source requests
it.  For the notification daemon, this is done by setting the
'action-icons' hint on the notification.

The previous notification server capability used to advertise this
feature, "x-gnome-icon-buttons", has been removed in favour of the
new capability described in the notification spec, "action-icons".

https://bugzilla.gnome.org/show_bug.cgi?id=624584
2010-11-02 19:17:29 +10:00
Dan Winship
5d9b109f06 notificationDaemon: add missing gettext import 2010-10-27 16:00:51 -04:00
Giovanni Campagna
c48c80e4e9 Allow for empty WM_CLASS and _NET_WM_NAME in tray icons
The system tray specification says the hint should be set, but some
icons leave it empty anyway. Don't throw exceptions in that case.

https://bugzilla.gnome.org/show_bug.cgi?id=633028
2010-10-25 16:01:32 +02:00
Dan Winship
bbdf88cf94 NotificationDaemon: don't destroy trayicons when dismissing their notifications
Tray icons control their own lifespan; they're not supposed to
disappear when you dismiss their notifications like non-trayicon
notification sources do.

https://bugzilla.gnome.org/show_bug.cgi?id=631042
2010-10-12 17:21:58 -04:00