Commit graph

35 commits

Author SHA1 Message Date
Adrien Plazas
587ca5ce98 notifications: Ellipsize the labels
This will help the window to fit narrow screens even with long
application names.
2018-11-29 00:48:16 +00:00
Robert Ancell
9fa1e73da8 notifications: Use GtkTemplate
Switch from GtkBuilder to using GtkTemplate.
Rename widget IDs to be more readable.
Drop widget IDs that are not used.
Move code into the .ui file that can be.
Connect signals in swapped form.
2018-10-15 20:42:45 +00:00
Robert Ancell
2a6c151483 notifications: Don't use gtk_widget_show_all
It is removed in GTK+ 4
2018-10-11 22:21:34 +00:00
Georges Basile Stavracas Neto
a2e166d0d6 Revert "notification: Cache D-Bus proxy"
This reverts commit 77ac09aa04.
2018-08-27 12:56:20 +00:00
Robert Ancell
17dbce362e notifications: Refactor app notifications dialog
The current widget has a very generic name "EditDialog" - rename it to something
that reflects better what it is for.

Implement it is as a full GtkWidget using GtkTemplate.

Move some of the logic from inside the dialog to the code that creates the dialog
so less data is passed around.

Store properties using functions instead of g_object_set_data - that passes
everything as a gpointer which is easy to make a mistake with.
2018-07-16 19:36:19 +00:00
Robert Ancell
b3ea72735a notifications: Use g_signal_connect_object to ensure handlers are not run after object destroyed
Fixes specific crash:
https://gitlab.gnome.org/GNOME/gnome-control-center/issues/75
2018-07-03 11:42:00 +12:00
Robert Ancell
7e4c1e3eae nofications: Use g_auto for variables 2018-05-29 18:29:45 +00:00
Benjamin Berg
c2f601a9d4 Move common panel code from shell/ to panel/common
This creates a new static library called libwidget which the shell links
against.
2018-04-17 15:26:59 +02:00
Georges Basile Stavracas Neto
77ac09aa04 notification: Cache D-Bus proxy 2018-04-06 22:23:39 -03:00
Jeremy Bicha
eefc10dbe5 notifications: Add help link
https://bugzilla.gnome.org/show_bug.cgi?id=789321
2017-10-24 11:42:31 -04:00
Allan Day
c7fea8894f Give search and notifications consistent row layouts
The search and notification panels have similar list rows,
as they both list applications. This gives the list rows more
consistent layouts - application icons are made to be 32px
throughout and row heights are made to be the same.

Note that the row widths are unfortunately still different.

https://bugzilla.gnome.org/show_bug.cgi?id=786384
2017-08-20 18:38:23 +02:00
Matthias Clasen
8b9be45cba notifications: Forward notification settings to portal
The flatpak notification portal reads permissions out
of the permission store, so forward the notification
permissions there in order to prevent sandboxed
applications from sending notifications.

The difference is a bit cosmetic, since the shell would
not show the notification anyway in this case, but it
is nicer to just cut off the calls and not let them
through the portal in the first place.

https://bugzilla.gnome.org/show_bug.cgi?id=778851
2017-03-02 16:40:33 -05:00
Marek Kasik
087c4ff208 notifications: Don't crash because of zero-length string
Check whether given application child is at least 1 character
long to avoid crash which can happen as a result of creating
of GDesktopAppInfo with NULL desktop file id.
To reproduce this run "gnome-control-center notifications" and
"gsettings set org.gnome.desktop.notifications application-children "['']"".

https://bugzilla.gnome.org/show_bug.cgi?id=752525
2015-07-27 16:23:19 +02:00
Martin Hatina
75df3ebe87 notifications: Align icons
Icons are now aligned even when they don't have same size.

https://bugzilla.gnome.org/show_bug.cgi?id=711389
2015-05-11 18:30:18 +02:00
Martin Hatina
ed37aa2cae notifications: Do not show nameless apps
Apps with no name are not added to list.

https://bugzilla.gnome.org/show_bug.cgi?id=693622
2015-05-11 18:05:39 +02:00
Martin Hatina
3c710f1f32 notifications: Make section headings accessible
The section headings are useful to understand the content of this panel.

https://bugzilla.gnome.org/show_bug.cgi?id=746757
2015-05-11 17:23:10 +02:00
Marek Kasik
e923c5d5c7 notifications: Shrink application icons
Shrink application icons and add some margin to them so
the overall size is the same.

https://bugzilla.gnome.org/show_bug.cgi?id=742522
2015-01-20 15:17:20 +01:00
Marek Kasik
9407015730 notifications: Place switches into GtkListBox
Place panel switches into GtkListBox and change their
behaviour so that:

When "Notifications" switch is off, all other switches in the dialog are
insensitive.
"Notifications Banners" switch is off and insensitive when corresponding
panel switch is off.
"Show Message Content in Banners" switch is off and insensitive when switch
above is off.
"Lock Screen Notifications" switch is off and insensitive when corresponding
panel switch is off.
"Show Message Content on Lock Screen" switch is off and insensitive when switch
above is off.

https://bugzilla.gnome.org/show_bug.cgi?id=742521
2015-01-20 15:17:20 +01:00
Marek Kasik
1a4fdd47dc notifications: Move switches to a GtkListBox
Place the "Show Pop Up Banners" and "Show in Lock Screen" labels
in a list. This makes the UI easier to read.
Add frame around the list box.

https://bugzilla.gnome.org/show_bug.cgi?id=742521
2015-01-20 15:17:20 +01:00
Marek Kasik
5641299a2a notifications: Scroll the view not just the list
Scrolling the view gives more room for viewing the list and
provides a larger scroll area, making the list easier to use.
Set height of content of the panel to 400 pixels.
Add frame around the list box.

https://bugzilla.gnome.org/show_bug.cgi?id=742520
2015-01-20 15:17:20 +01:00
Bastien Nocera
db756d7b58 notifications: Force smaller icons
To work-around application icons that would be too big.

https://bugzilla.gnome.org/show_bug.cgi?id=742116
2015-01-07 19:03:11 +01:00
Bastien Nocera
ea66f828eb notifications: Fix duplicates in application list
When saving applications in the "application-children" list, gnome-shell
will lower-case the whole canonical application ID in _canonicalizeId().

Match _canonicalizeId()'s behaviour, and lower-case the canonical
application ID so we don't try to load "org-gnome-Software" from
GNOME-Software's desktop file in addition to the already saved
"org-gnome-software".

https://bugzilla.gnome.org/show_bug.cgi?id=729447
2014-07-01 16:26:25 +02:00
Bastien Nocera
45183a89b5 notifications: Add better debug for saved apps
So we can see the apps for which there already are saved settings.
2014-07-01 16:26:24 +02:00
Bastien Nocera
3f75672f2d notifications: Use new listbox helpers
https://bugzilla.gnome.org/show_bug.cgi?id=732106
2014-06-24 11:35:31 +02:00
Daniel Mustieles
2c5951819d Updated FSF's address 2014-01-29 11:27:38 +01:00
Michael Catanzaro
1a1b1a5c6f notifications: fix invalid format string
GLib-GIO-CRITICAL **: g_settings_get: the format string may not contain
'&' (key 'application-children' from schema
'org.gnome.desktop.notifications'). This call will probably stop working
with a future version of glib.

This is fallout from https://bugzilla.gnome.org/show_bug.cgi?id=719979

https://bugzilla.gnome.org/show_bug.cgi?id=721430
2014-01-07 09:39:19 -06:00
Yosef Or Boczko
a9829a11cf notifications: Use margin-start/end instead of margin-left/right
https://bugzilla.gnome.org/show_bug.cgi?id=712661
2013-11-19 22:27:57 +02:00
Rui Matos
f83c66154e notifications: Remove unused toplevel window from .ui file
https://bugzilla.gnome.org/show_bug.cgi?id=708286
2013-10-01 10:05:03 +02:00
Alexander Larsson
41b04d551f notifications: Convert to GtkListBox
https://bugzilla.gnome.org/show_bug.cgi?id=702164
2013-07-02 16:19:09 +01:00
Giovanni Campagna
e6e35a2cc9 notifications: don't fail if a referenced application does not exist
If we have settings for an app, but we don't have a desktop file, it
is likely the app was uninstalled, so just ignore it and avoid the
criticals.

https://bugzilla.gnome.org/show_bug.cgi?id=696665
2013-03-27 14:53:32 +01:00
William Jon McCann
5eb05d153a Fix spacing
https://bugzilla.gnome.org/show_bug.cgi?id=693985
2013-02-16 15:45:23 -05:00
Cosimo Cecchi
5975b1773a notifications: use a GResource for GtkBuilder UI definition
https://bugzilla.gnome.org/show_bug.cgi?id=691132
2013-01-07 10:57:06 +01:00
Bastien Nocera
2c4210c1be notifications: Add some debug to the app processing 2013-01-04 15:22:46 +01:00
Bastien Nocera
593f340ad3 notifications: Fix compile-time warning
Due to the way I split off the cc-edit-dialog's header.
2012-12-20 16:22:01 +01:00
Giovanni Campagna
e8cd35edce notifications: Add panel
Show applications using the message tray, and
allow configuring in what way the shell presents them.

The set of applications shown include all applications that ever
showed a notification in gnome-shell and all applications that have
a boolean X-GNOME-UsesNotifications key set to true in their desktop file.

https://bugzilla.gnome.org/show_bug.cgi?id=685928
2012-12-20 09:25:22 +01:00