Commit graph

82 commits

Author SHA1 Message Date
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
Robert Ancell
67a94dfee9 notifications: Replace GObject boilerplace with G_DECLARE_TYPE 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
Piotr Drąg
7265bd53a0 Add translator comments to .desktop files
Icons are confusing translators, and gettext
is unlikely to get fixed any time soon.
2018-02-23 18:49:35 +01:00
Iñigo Martínez
0dd386f405 build: Migrate from Intltool to Gettext
Recent versions of Gettext are able to translate several formats
that are used in GNOME applications. This patch migrates from
Intltool to Gettext by using meson's i18n features.

https://bugzilla.gnome.org/show_bug.cgi?id=787588
2018-01-23 10:49:31 +01:00
Iñigo Martínez
dc0988d47c build: Remove autotools
To avoid the burden of maintaining multiple build systems, this
patch removes autotools support.

https://bugzilla.gnome.org/show_bug.cgi?id=785414
2018-01-18 12:20:08 +01:00
Piotr Drąg
b65e31323a panels: Remove soft hyphens from .desktop files
With the old shell gone, there is no need to work around cut off panel
names (bug #647087). As it stands now, it only confuses translators
(invisible characters are hard to, well, see).

https://bugzilla.gnome.org/show_bug.cgi?id=792629
2018-01-18 00:12:04 -02:00
Iñigo Martínez
32edd6789e build: Port to meson build system
Meson is a build system focused on speed an ease of use, which
helps speeding up the software development. This patch adds meson
support along autotools.

https://bugzilla.gnome.org/show_bug.cgi?id=785414
2018-01-17 20:09:35 -02:00
Georges Basile Stavracas Neto
b23ef59926 shell-model: Remove old categories
Since we don't maintain two different shells anymore, there
is no need to maintain the two different sets of categories
in the desktop files.

This commit also drops the "#ifdef CC_ENABLE_ALT_CATEGORIES"
blocks, since the previous commit removed that define.

https://bugzilla.gnome.org/show_bug.cgi?id=790923
2017-11-28 17:03:51 -02: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
8a8e53ab8a Standardize vertical spacing of panels
Ensure that the vertical spacing inside each panel is similar.
This makes the transition between each panel smoother and makes
the control center feel more cohesive.

Settings panels are given 32px above and below their content
and 32px vertical space between major sections. 12px space is
placed below headings.

Bluetooth, displays and printers are not addressed.

https://bugzilla.gnome.org/show_bug.cgi?id=786384
2017-08-20 18:38:42 +02: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
Georges Basile Stavracas Neto
f7bdd3c969 panels: Minor adjustments for the new shell 2017-08-09 19:31:41 +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
Martin Hatina
0c9657c0ed notifications: replace unclear Banner term in UI
Users are not familiar with term 'banner', so it is replaced with
term 'popup'. Also description has been added to the notifications
and popups switches, which explains why someone might want to disable
popups but leave notifications enabled.

https://bugzilla.gnome.org/show_bug.cgi?id=751369
2017-01-11 12:32:47 +01:00
Georges Basile Stavracas Neto
2777fd583d panels: use the new categories
Following the previous patch, this patch adds the new alternative
categories to the panels' Desktop files. These alternative categories
are only relevant for the alternative Shell, and do not break the
current Shell in any way.

https://bugzilla.gnome.org/show_bug.cgi?id=767301
2016-06-14 12:16:43 -03:00
Bastien Nocera
5c10ce45b8 panels: Fix translators comments being truncated
Commit b3be076 added soft hyphens along with a comment for translators
to use those soft hyphens. Except that gettext would only grab the one
line out of the four we wrote for translators to read. Put them all on
the same line so that gettext actually extracts those.

https://bugzilla.gnome.org/show_bug.cgi?id=765778
2016-04-28 23:38:00 +02:00
Bastien Nocera
b3be07609a panels: Fix truncated panel names for larger fonts
Note that this fix will not automatically fix translations, which will
need to add soft-hyphens (U+00AD) to their translations themselves, and
will not fix larger fonts for which the split up syllables end up
being bigger than the maximum text width.

It's the best we can do without redesigning the Settings shell, which is
already something planned.

https://bugzilla.gnome.org/show_bug.cgi?id=647087#c13
2016-04-07 16:06:35 +02:00
Jiro Matsuzawa
472fd9d33d notifications: Give mnemonic to labelled widgets
https://bugzilla.gnome.org/show_bug.cgi?id=736606
2016-01-18 17:21:17 +01: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