Commit graph

107 commits

Author SHA1 Message Date
Marco Melorio
b75bb10bb6 misc: Replace usage of CcListRow + switch with AdwSwitchRow
That feature will be removed in the next commit.
2023-06-30 09:06:56 +00:00
Robert Ancell
73e63225e2 notifications: Use self for object variable name 2023-06-06 07:54:38 +00:00
Robert Ancell
dc988e476b notifications: Fix panel object reference never being dereferenced 2023-05-31 08:17:01 +00:00
Robert Ancell
b041c9df6d notifications: Do signal handlers in swapped form 2023-05-30 08:36:22 +00:00
Pablo Correa Gómez
7f7b65545c all: meson: do not specify resources from gresource files as dependencies
Meson extracts them by itself and add them as dependencies for the target.
It means one less location to keep track of files, and a lot less boilerplate
around the meson files
2023-05-24 08:34:14 +00:00
Automeris naranja
5ec6538c4d notifications: Change "Apps" header to "App Notifications"
With this change, the header will clearly indicate that the user
will tweak app notification settings, specially when using a screen reader.

This is aligned with the following mockup:
https://gitlab.gnome.org/Teams/Design/settings-mockups/-/blob/master/notifications/notifications.png
2023-03-27 23:25:52 +00:00
Jake Dane
1ccade9481 notifications: Replace "Applications" with "Apps"
This is part of an initiative to use "app" instead of "applications",
see: https://gitlab.gnome.org/Teams/Design/initiatives/-/issues/123

!1637 missed replacing one occurrence of "Applications" on the
notifications panel. This does that last replacement with "Apps".
2023-03-14 19:49:54 +00:00
Jake Dane
37a579b6b0 Replace "application" with "app"
This is part of an initiative to use "app" instead of "applications",
see: https://gitlab.gnome.org/Teams/Design/initiatives/-/issues/123

Redo of !1539 that was closed by a ghosting user.

Replaces "application" with "app" in user facing strings in these
panels:

- applications
- camera, location, microphone
- default-apps
- multitasking
- notifications
- removable-media
- search
- usage
- user-accounts

Fixes: #2208.
2023-01-23 11:10:28 +00:00
Felipe Borges
294156c0f9 Drop most uses of deprecated gtk_style_context_add/remove_class
GtkStyleContext will be deprecated in gtk 4.10.
https://docs.gtk.org/gtk4/class.StyleContext.html

This preserves code blocks where additional GtkStyleContext operations
were used, such as gtk_style_context_save/restore.
2023-01-05 18:55:51 +00:00
Marco Melorio
d39f9e5efc notifications: Remove usage of deprecated gtk_widget_show 2023-01-02 22:10:39 +00:00
Andre Klapper
d47ec1c2d0 Privacy/Notifications: Sync Lock screen notifications setting string
Fixes #2157
2022-12-02 11:10:15 +01:00
Jake Dane
89443fe550 desktop: Remove obsolete Bugzilla entries
The `X-GNOME-Bugzilla-*` entries were for use by bug-buddy, a GNOME 2
technology that's been gone for over a decade. These entries are
obsolete and can be removed from all desktop files.

The `X-GNOME-Settings-Panel` entry is also obsolete as far as I can
tell and only these panels had it in their desktop file: notifications,
sharing, sound and user-accounts. These entries can also be removed.

After removing the `X-GNOME-Bugzilla-*` entries, the desktop files have
no more variables in them. The meson `configure_file` step is therefor
pointless—there are no variables to configure. As such the
`*.desktop.in.in` files are renamed to `*.desktop.in` to reflect this
and `meson.build` files are modified to remove `configure_file` step.
2022-10-20 13:20:09 +00:00
Andy Holmes
3d5be3b1fd
notifications: fix potential null dereference in app_info_get_id()
Although apparently unlikely, `strlen()` is called on the return value
of `desktop_id` instead of `ret`, which may result in a null
dereference.
2022-06-30 11:11:06 -07:00
Christopher Davis
770da3788a notifications: Remove redundant haligns 2022-02-09 14:33:17 +00:00
Christopher Davis
a8bc1a222e notifications: Make dialog resizeable, adjust default size
We can't use flat headerbars here because we need to
be able to scroll the dialog at smaller sizes. We
also need for the dialog to be able to reach smaller
sizes.
2022-02-09 14:33:17 +00:00
Christopher Davis
17d3a297ae notifications: Handle keynav-failed on app list
Fixes keyboard navigation with arrow keys
2022-02-09 14:33:17 +00:00
Christopher Davis
2f00725af8 notifications: Remove options_listbox
Since CcListRow is now an AdwActionRow subclass,
we don't need to have a custom listbox for the top
group.
2022-02-09 14:33:17 +00:00
Jakub Steiner
13376ecb8b Add individual app icons 2022-01-31 14:08:22 +00:00
Georges Basile Stavracas Neto
0831e41fb0 notifications: Use AdwActionRow in the dialog
Reduces code and makes it more consistent with other panels.
2022-01-21 16:13:21 +00:00
Georges Basile Stavracas Neto
f23d876dc2 notifications: Adjust style of notifications dialog
Add margins around it, make the titlebar flat.

See https://gitlab.gnome.org/GNOME/gnome-control-center/-/issues/1587
2022-01-21 16:13:21 +00:00
Georges Basile Stavracas Neto
ca7ba70047 notifications: Add go-next-symbolic icon to rows
As per design feedback.

See https://gitlab.gnome.org/GNOME/gnome-control-center/-/issues/1587
2022-01-21 16:13:21 +00:00
Georges Basile Stavracas Neto
0ab20af9ba panels: Switch to CcPanel content
Start porting panels to the new panel format. This commit
temporarily makes panels have two titlebar, which will be
fixed soon.
2022-01-20 02:23:42 +00:00
Jan Beich
37b29c32cb meson: drop unused argument for i18n.merge_file()
Ignored in Meson < 0.60.0, deprecated since 0.60.1 and fatal since 0.61.0.

panels/applications/meson.build:10:5: ERROR: Function does not take positional arguments.
panels/background/meson.build:10:5: ERROR: Function does not take positional arguments.
panels/camera/meson.build:10:5: ERROR: Function does not take positional arguments.
[...]
2022-01-07 17:22:43 +00:00
Christopher Davis
161e096667 cc-notifications-panel: Use AdwActionRow
AdwActionRow handles most of what we were building
a custom row for, and what it doesn't handle we
can simply use its API for.
2022-01-06 00:51:36 +00:00
Christopher Davis
d61b5bb0b0 cc-notifications-panel: Use AdwPreferences{Page,Group}
libadwaita provides nice pre-built widgets for preferences
pages and groups. We should use them where possible.
2022-01-06 00:51:36 +00:00
Christopher Davis
981a8cea7b panels: Use .boxed-list instead of .content
The `.content` style class is deprecated in favor
of the `.boxed-list` style class, which is named
after the design pattern it's used for.
2021-12-16 12:52:44 -08:00
Georges Basile Stavracas Neto
75f6566a91 notifications: Port to GTK4
This one was relatively easy, since most of the brokenness came
from using deprecated properties that can just be dropped, and
packaging that can also just be dropped.
2021-12-14 22:34:21 -03:00
Mohammed Sadiq
7f4703d7ad notifications: Use content style for listboxes 2021-05-19 03:25:47 +00:00
Robert Ancell
ba80822797 notifications: Move adjustment widget into GtkBuilder file 2020-12-11 18:41:22 +00:00
Robert Ancell
1306a73e8b notifications: Remove thread loading applications
Stop the app list being loaded in a thread. This is complicated and dangerous as
it accesses a hash table that can also be accessed from the main thread. The
operation is not expensive enough to warrant a thread, and similar code in the
application panel doesn't use one here.
2020-11-03 18:14:00 +00:00
Adrien Plazas
f06379e30c Replace HdyColumn by HdyClamp
In libhandy 1, HdyClamp replaces HdyColumn. This stops setting values
when they match HdyClamp's defaults.
2020-07-20 08:04:28 +02:00
Adrien Plazas
9e2a2836d9 Use GtkDialog instead of HdyDialog
HdyDialog has been dropped in libhandy 1.
2020-07-20 08:04:28 +02:00
Mohammed Sadiq
70ded401b0 notifications: Use CcListRow for list box rows
This will reduce the amount of code used and let the user change
the item value clicking on the row.
2020-05-12 22:24:00 +00:00
Felipe Borges
36db009819 notifications: Invert the "Do not disturb" switch
The switch is binded to the "show-banners" gsetting. When DnD is
ON, users don't want banners, therefore "show-banners" is OFF.

For this reason we need to invert the switch.

Fixes #878
2020-02-20 15:05:09 +00:00
Robert Ancell
93b14a4339 panel: Move shared GCancellable code into panel class
Make the panel class provide a cancellable that will be cancelled when the panel
is destroyed. Panel implementations can use this and not have to mangage the
cancellable themselves. Consolidate cases where panels had multiple cancellables
that were all being used for this behaviour.
2020-02-03 09:36:24 +13:00
Allan Day
90e0774a19 notifications: Change switch label to Do Not Disturb
!97 added a do not disturb switch to GNOME Shell. This works by
changing the org.gnome.desktop.notifications.show-banners setting.
The switch that controls this setting in the control center should
therefore use the same Do Not Disturb label as the switch in the
shell.
2020-01-27 17:58:17 +00:00
Robert Ancell
97985a664e Remove unused GNOMELOCALEDIR defines 2019-09-09 21:45:53 +00:00
Mohammed Sadiq
ed6ddf162a notifications-dialog: Make dialog adaptive 2019-07-26 01:13:20 +00:00
Felipe Borges
7e17e308af notifications: Add shadow to application icons
The new GNOME application icons need a shadow when placed on top
of a light background.

See https://gitlab.gnome.org/GNOME/Initiatives/issues/2
2019-03-13 13:46:23 +01:00
Adrien Plazas
cccb12a6de notifications: Do not vertically expand the listbox
This avoids the list box to not look stupidly long and empty and matches
the design of the other list boxes.
2019-01-10 16:43:36 +00:00
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
Adrien Plazas
42d64e3baf notifications: Use a HdyColumn
This better adapts the panel's size to the window's size, allowing it to
look good on both large and narrow windows.
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
Georges Basile Stavracas Neto
4627e847af notifications: Remove unused variable 2018-05-30 17:45:28 -03:00
Robert Ancell
7e4c1e3eae nofications: Use g_auto for variables 2018-05-29 18:29:45 +00:00
Robert Ancell
fceac14a2c notifications: Replace ifdefs with #pragma once 2018-05-29 18:29:45 +00:00