gnome-control-center/panels/system/meson.build
Felipe Borges 8da25aaef5 system: Replace dynamic System row subtitles with static text
Row subtitles in Settings are typically a description of the main label or setting.
You can see this in Mouse & Touchpad, Privacy, Sharing, and Wi-Fi.
For the System panel we did something a bit different and used the subtitle to show
the status of each panel.

Given the standard use of subtitles elsewhere, this feels a bit surprising which,
as a result, makes the panel harder to read. I think that a standard description
would probably also be more useful than the current labels.

Mockups https://gitlab.gnome.org/Teams/Design/settings-mockups/-/blob/master/system/system-panel.png?ref_type=heads

This also removes the thin CcSystemPage abstract class because it was
only introduced to add the support for dynamic System row subtitle. Now
this abstraction is no longer necessary.

Fixes #2776
2024-01-04 11:38:47 +00:00

115 lines
3.1 KiB
Meson

panels_list += cappletname
desktop = 'gnome-@0@-panel.desktop'.format(cappletname)
i18n.merge_file(
type: 'desktop',
input: desktop + '.in',
output: desktop,
po_dir: po_dir,
install: true,
install_dir: control_center_desktopdir
)
sources = files(
'cc-system-panel.c',
'about/cc-about-page.c',
'about/cc-system-details-window.c',
'about/cc-info-entry.c',
'about/info-cleanup.c',
'datetime/cc-datetime-page.c',
'datetime/cc-tz-item.c',
'datetime/cc-tz-dialog.c',
'datetime/date-endian.c',
'datetime/tz.c',
'region/cc-region-page.c',
'region/cc-format-chooser.c',
'region/cc-format-preview.c',
'remote-desktop/cc-gnome-remote-desktop.c',
'remote-desktop/cc-remote-desktop-page.c',
'remote-desktop/cc-tls-certificate.c',
'remote-desktop/cc-systemd-service.c',
)
sources += gnome.compile_resources(
'cc-' + cappletname + '-resources',
cappletname + '.gresource.xml',
c_name : 'cc_' + cappletname,
export : true
)
enums = 'gdesktop-enums-types'
enums_header = files(
gsettings_desktop_dep.get_variable(pkgconfig: 'prefix') + '/include/gsettings-desktop-schemas/gdesktop-enums.h',
'datetime/cc-datetime-page.h'
)
sources += gnome.mkenums(
enums + '.h',
sources: enums_header,
fhead: '#pragma once\n\n#include <glib-object.h>\n\nG_BEGIN_DECLS\n',
fprod: '/* enumerations from "@filename@" */\n',
vhead: 'GType @enum_name@_get_type (void) G_GNUC_CONST;\n#define G_DESKTOP_TYPE_@ENUMSHORT@ (@enum_name@_get_type())\n',
ftail: 'G_END_DECLS\n'
)
sources += gnome.mkenums(
enums + '.c',
sources: enums_header,
fhead: '#include <gdesktop-enums.h>\n#include "gdesktop-enums-types.h"\n#include "datetime/cc-datetime-page.h"',
fprod: '\n/* enumerations from "@filename@" */',
vhead: 'GType\n@enum_name@_get_type (void)\n{\n static GType etype = 0;\n if (etype == 0) {\n static const G@Type@Value values[] = {',
vprod: ' { @VALUENAME@, "@VALUENAME@", "@valuenick@" },',
vtail: ' { 0, NULL, NULL }\n };\n etype = g_@type@_register_static ("@EnumName@", values);\n }\n return etype;\n}\n'
)
libsecret_dep = dependency('libsecret-1')
gnutls_dep = dependency('gnutls')
libgtop2 = dependency('libgtop-2.0')
udisks2 = dependency('udisks2', version: '>= 2.8.2')
deps = common_deps + [
accounts_dep,
gcr_dep,
gdk_pixbuf_dep,
gnome_desktop_dep,
gnutls_dep,
gudev_dep,
libgtop2,
liblanguage_dep,
libsecret_dep,
polkit_gobject_dep,
pwquality_dep,
udisks2,
]
if enable_ibus
deps += ibus_dep
endif
settings_daemon = 'org.gnome.SettingsDaemon'
gsd_gdbus = settings_daemon + '.Sharing'
sources += gnome.gdbus_codegen(
gsd_gdbus,
gsd_gdbus + '.xml',
interface_prefix: settings_daemon + '.',
namespace: 'Gsd'
)
cflags += [
'-DDATADIR="@0@"'.format(control_center_datadir),
'-DLIBEXECDIR="@0@"'.format(control_center_libexecdir),
'-DGNOMECC_DATA_DIR="@0@"'.format(control_center_pkgdatadir)
]
subdir('about')
subdir('datetime')
subdir('region')
panels_libs += static_library(
cappletname,
sources: sources,
include_directories: [ top_inc, common_inc, include_directories('.')],
dependencies: deps,
c_args: cflags
)