Compare commits
49 Commits
startup-no
...
3.29.2
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
cf61ee5812 | ||
|
|
da1b2f9d5d | ||
|
|
17a0ec01b3 | ||
|
|
0f81ea3924 | ||
|
|
844b847a38 | ||
|
|
ba3797aafe | ||
|
|
b2746fe0db | ||
|
|
053d3e0ed5 | ||
|
|
a8a6dc0f88 | ||
|
|
01edbf3f9e | ||
|
|
ef71156732 | ||
|
|
5ab9e645ee | ||
|
|
017643dbf9 | ||
|
|
9b32898cee | ||
|
|
72732dd1db | ||
|
|
fcc33b74ca | ||
|
|
baaf9e45aa | ||
|
|
136e0d5687 | ||
|
|
0ade0fa08c | ||
|
|
2acb520fc9 | ||
|
|
f4433b3766 | ||
|
|
4a5a2c7280 | ||
|
|
50094b45a6 | ||
|
|
7322cdc45b | ||
|
|
e2a18bec49 | ||
|
|
9460babd1e | ||
|
|
66668676fc | ||
|
|
057610e982 | ||
|
|
8ae16f34f6 | ||
|
|
c5417d8916 | ||
|
|
e7d79d8d1b | ||
|
|
f4b1fb66a4 | ||
|
|
949f8cb227 | ||
|
|
ffcd5b15f2 | ||
|
|
f9b65046e9 | ||
|
|
f3257ce82a | ||
|
|
1d26f63b18 | ||
|
|
6ec0bcde15 | ||
|
|
eea231dc1c | ||
|
|
8404f526b6 | ||
|
|
c23e8f3547 | ||
|
|
0b854910bb | ||
|
|
197ed1ed55 | ||
|
|
2da5fd3b3d | ||
|
|
8fa0f6eecd | ||
|
|
283bc92335 | ||
|
|
7b74bfbbe6 | ||
|
|
3d134b93b4 | ||
|
|
2efd5442d5 |
2
.gitignore
vendored
2
.gitignore
vendored
@@ -1 +1,3 @@
|
||||
__pycache__
|
||||
_build/
|
||||
**/*~
|
||||
119
.gitlab-ci.yml
119
.gitlab-ci.yml
@@ -1,25 +1,8 @@
|
||||
image: fedora:rawhide
|
||||
image: claudioandre/settings:fedora.dev
|
||||
stages:
|
||||
- build
|
||||
- test
|
||||
- deploy
|
||||
|
||||
variables:
|
||||
DEPENDENCIES: accountsservice-devel cheese-libs-devel chrpath clutter-gtk-devel colord-devel
|
||||
colord-gtk-devel cups-devel desktop-file-utils docbook-style-xsl gdk-pixbuf2-devel
|
||||
gettext git glib2-devel gnome-bluetooth-libs-devel gnome-desktop3-devel
|
||||
gnome-online-accounts-devel gnome-settings-daemon-devel grilo-devel
|
||||
gsettings-desktop-schemas-devel gtk3-devel ibus-devel intltool libcanberra-devel
|
||||
libgtop2-devel libgudev-devel libnma-devel libpwquality-devel libsmbclient-devel
|
||||
libsoup-devel libwacom-devel libX11-devel libXi-devel libxml2-devel libxslt
|
||||
libXxf86misc-devel meson ModemManager-glib-devel NetworkManager-libnm-devel
|
||||
polkit-devel pulseaudio-libs-devel upower-devel
|
||||
python3-dbusmock xorg-x11-server-Xvfb mesa-dri-drivers
|
||||
|
||||
|
||||
before_script:
|
||||
- dnf update -y --nogpgcheck && dnf install -y --nogpgcheck $DEPENDENCIES
|
||||
|
||||
- delivery
|
||||
|
||||
##
|
||||
# Stage: Build
|
||||
@@ -30,11 +13,25 @@ before_script:
|
||||
##
|
||||
build:
|
||||
stage: build
|
||||
artifacts:
|
||||
name: builded
|
||||
untracked: true
|
||||
expire_in: 3h30min
|
||||
|
||||
script:
|
||||
- echo "== Info =="
|
||||
- build-aux/ci/ci-helper.sh "INFO"
|
||||
- build-aux/ci/ci-helper.sh "GIT_INFO"
|
||||
|
||||
- echo "== Building =="
|
||||
- meson . _build
|
||||
- ninja -C _build
|
||||
- ninja -C _build 2>&1 | tee compilation.log
|
||||
|
||||
- echo "== Installing =="
|
||||
- ninja -C _build install
|
||||
|
||||
- echo "== Report =="
|
||||
- build-aux/ci/ci-helper.sh "WARNINGS"
|
||||
|
||||
##
|
||||
# Stage: Test
|
||||
@@ -43,23 +40,77 @@ build:
|
||||
##
|
||||
test:
|
||||
stage: test
|
||||
script:
|
||||
- meson . _build
|
||||
- ninja -C _build
|
||||
- meson test -C _build --verbose --no-stdsplit
|
||||
artifacts:
|
||||
name: log
|
||||
when: always
|
||||
paths:
|
||||
- $(pwd)/*.log
|
||||
|
||||
dependencies:
|
||||
- build
|
||||
|
||||
script:
|
||||
- echo "== Info =="
|
||||
- build-aux/ci/ci-helper.sh "INFO"
|
||||
- build-aux/ci/ci-helper.sh "GIT_INFO"
|
||||
|
||||
- |
|
||||
if [[ -n "${CI_COMMIT_TAG}" ]]; then
|
||||
echo "== Distro Test =="
|
||||
meson test -C _build
|
||||
ninja dist -C _build
|
||||
else
|
||||
echo "== Testing =="
|
||||
meson test -C _build --verbose --no-stdsplit
|
||||
fi
|
||||
|
||||
##
|
||||
# Stage: Deploy
|
||||
# Stage: Delivery
|
||||
#
|
||||
# Checks if the released version is in a good shape.
|
||||
# Create a flatpak
|
||||
##
|
||||
deploy:
|
||||
stage: deploy
|
||||
packaging:
|
||||
stage: delivery
|
||||
image: registry.gitlab.gnome.org/gnome/gnome-nightly-oci/nightly:master
|
||||
artifacts:
|
||||
name: package
|
||||
paths:
|
||||
- $(pwd)/*.flatpak
|
||||
|
||||
variables:
|
||||
APPID: "org.gnome.SettingsDevel"
|
||||
BUNDLE: "org.gnome.SettingsDevel.flatpak"
|
||||
MANIFEST_PATH: "org.gnome.Settings.json"
|
||||
PATCHES: "build-aux/flatpak/*.patch"
|
||||
PROJECT_FILE: "build-aux/flatpak/org.gnome.Settings.json"
|
||||
PROJECT_ID: "org.gnome.Settings"
|
||||
PROJECT_NAME: "gnome-control-center.git"
|
||||
RUNTIME_REPO: "https://sdk.gnome.org/gnome-nightly.flatpakrepo"
|
||||
|
||||
script:
|
||||
- meson . _build
|
||||
- ninja -C _build
|
||||
- meson test -C _build
|
||||
- ninja dist -C _build
|
||||
only:
|
||||
- tags
|
||||
- echo "== Flatpak packaging =="
|
||||
|
||||
# Move needed files to the root folder
|
||||
- cp ${PATCHES} . || true
|
||||
- cp ${PROJECT_FILE} ${MANIFEST_PATH}
|
||||
|
||||
# Make it a develoment manifest
|
||||
- sed -i -n "p; s/$PROJECT_NAME//p" ${MANIFEST_PATH}
|
||||
- >
|
||||
sed -i "s,\"app-id\" : \"$PROJECT_ID\",\"app-id\" : \"<<ID>>\",g" ${MANIFEST_PATH}
|
||||
- >
|
||||
sed -i "s,\"url\" : \"https://gitlab.gnome.org/GNOME/$PROJECT_NAME\",\"branch\" : \"<<current>>\"\,,g" ${MANIFEST_PATH}
|
||||
- >
|
||||
sed -i "s,\"url\" : \"https://gitlab.gnome.org/GNOME/\",\"path\" : \".\",g" ${MANIFEST_PATH}
|
||||
|
||||
# Adjust the manifest to HEAD
|
||||
- sed -i "s,<<ID>>,$APPID,g" ${MANIFEST_PATH}
|
||||
- sed -i "s,<<current>>,origin/$CI_COMMIT_REF_NAME,g" ${MANIFEST_PATH}
|
||||
|
||||
- flatpak-builder --bundle-sources --repo=devel build ${MANIFEST_PATH}
|
||||
- flatpak build-bundle devel ${BUNDLE} --runtime-repo=${RUNTIME_REPO} ${APPID}
|
||||
|
||||
environment:
|
||||
name: review/$CI_COMMIT_REF_NAME
|
||||
url: https://gitlab.gnome.org/$CI_PROJECT_PATH/-/jobs/$CI_JOB_ID/artifacts/raw/${BUNDLE}
|
||||
when: manual
|
||||
|
||||
@@ -1,2 +0,0 @@
|
||||
The ChangeLog is auto-generated when releasing. If you are seeing this, use
|
||||
'git log' for a detailed list of changes.
|
||||
@@ -1 +0,0 @@
|
||||
See gnome-control-center.doap file
|
||||
25
NEWS
25
NEWS
@@ -1,3 +1,28 @@
|
||||
==============
|
||||
Version 3.29.2
|
||||
==============
|
||||
|
||||
- Improve logging engine
|
||||
- Add an object caching mechanism
|
||||
- Add a development Flatpak manifest
|
||||
- Vastly improve CI
|
||||
- Organize tests
|
||||
- Add Network tests
|
||||
- Translation updates
|
||||
|
||||
Display:
|
||||
- Fix a few crashers
|
||||
|
||||
Power:
|
||||
- Fix showing approximate percentages
|
||||
|
||||
Thunderbolt:
|
||||
- Introduce new Thunderbolt panel
|
||||
|
||||
User Accounts:
|
||||
- Port to GTask
|
||||
- Fix hint for wrong enterprise user/password
|
||||
|
||||
===============
|
||||
Version 3.27.92
|
||||
===============
|
||||
|
||||
16
README.md
16
README.md
@@ -1,3 +1,6 @@
|
||||
[](https://gitlab.gnome.org/GNOME/gnome-control-center/pipelines)
|
||||
[](https://gitlab.gnome.org/GNOME/gnome-control-center/blob/master/COPYING)
|
||||
|
||||
GNOME Settings
|
||||
====================
|
||||
|
||||
@@ -9,10 +12,19 @@ your desktop.
|
||||
See `docs/CONTRIBUTING.md` for details on the contribution process, and `docs/HACKING.md`
|
||||
for the coding style guidelines.
|
||||
|
||||
## Testing Unstable Settings
|
||||
|
||||
It is quite easy to test and give feedback about the development version of GNOME
|
||||
Settings. Just access https://gitlab.gnome.org/GNOME/gnome-control-center/environments,
|
||||
get the latest version, download it, double-click the file, install and run.
|
||||
|
||||
Note that GNOME Settings Flatpak will only work if you are running
|
||||
the latest GNOME version in your host system.
|
||||
|
||||
## Reporting Bugs
|
||||
|
||||
Bugs should be reported to the GNOME bug tracking system under the product
|
||||
gnome-control-center. It is available at https://gitlab.gnome.org.
|
||||
gnome-control-center. It is available at [GitLab Issues](https://gitlab.gnome.org/GNOME/gnome-control-center/issues).
|
||||
|
||||
In the report please include the following information -
|
||||
|
||||
@@ -37,4 +49,4 @@ stack trace -
|
||||
ie. (gdb) bt full
|
||||
|
||||
Once you have the backtrace, copy and paste this either into the
|
||||
'Comments' field or attach a file with it included.
|
||||
'Comments' field or attach a file with it included.
|
||||
|
||||
61
build-aux/ci/ci-helper.sh
Executable file
61
build-aux/ci/ci-helper.sh
Executable file
@@ -0,0 +1,61 @@
|
||||
#!/bin/bash -e
|
||||
|
||||
function do_print_labels(){
|
||||
|
||||
if [[ -n "${1}" ]]; then
|
||||
label_len=${#1}
|
||||
span=$(((54 - $label_len) / 2))
|
||||
|
||||
echo
|
||||
echo "= ======================================================== ="
|
||||
printf "%s %${span}s %s %${span}s %s\n" "=" "" "$1" "" "="
|
||||
echo "= ======================================================== ="
|
||||
else
|
||||
echo "= ========================= Done ========================= ="
|
||||
echo
|
||||
fi
|
||||
}
|
||||
|
||||
function do_show_info(){
|
||||
|
||||
local compiler=gcc
|
||||
|
||||
echo -n "Processors: "; grep -c ^processor /proc/cpuinfo
|
||||
grep ^MemTotal /proc/meminfo
|
||||
id; uname -a
|
||||
printenv
|
||||
echo '-----------------------------------------'
|
||||
cat /etc/*-release
|
||||
echo '-----------------------------------------'
|
||||
|
||||
if [[ ! -z $CC ]]; then
|
||||
compiler=$CC
|
||||
fi
|
||||
echo 'Compiler version'
|
||||
$compiler --version
|
||||
echo '-----------------------------------------'
|
||||
$compiler -dM -E -x c /dev/null
|
||||
echo '-----------------------------------------'
|
||||
}
|
||||
|
||||
function do_check_warnings(){
|
||||
|
||||
cat compilation.log | grep "warning:" | awk '{total+=1}END{print "Total number of warnings: "total}'
|
||||
}
|
||||
|
||||
# ----------- -----------
|
||||
if [[ $1 == "INFO" ]]; then
|
||||
do_print_labels 'Build environment '
|
||||
do_show_info
|
||||
do_print_labels
|
||||
|
||||
elif [[ $1 == "GIT_INFO" ]]; then
|
||||
do_print_labels 'Commit'
|
||||
git log --pretty=format:"%h %cd %s" -1; echo
|
||||
do_print_labels
|
||||
|
||||
elif [[ $1 == "WARNINGS" ]]; then
|
||||
do_print_labels 'Warning Report '
|
||||
do_check_warnings
|
||||
do_print_labels
|
||||
fi
|
||||
449
build-aux/flatpak/org.gnome.Settings.json
Normal file
449
build-aux/flatpak/org.gnome.Settings.json
Normal file
@@ -0,0 +1,449 @@
|
||||
{
|
||||
"app-id" : "org.gnome.Settings",
|
||||
"runtime" : "org.gnome.Platform",
|
||||
"runtime-version" : "3.28",
|
||||
"sdk" : "org.gnome.Sdk",
|
||||
"command" : "gnome-control-center",
|
||||
"rename-desktop-file" : "gnome-control-center.desktop",
|
||||
"rename-icon" : "gnome-control-center",
|
||||
"tags" : [
|
||||
"devel"
|
||||
],
|
||||
"desktop-file-name-prefix" : "(Development) ",
|
||||
"finish-args" : [
|
||||
"--device=dri",
|
||||
"--env=DCONF_USER_CONFIG_DIR=.config/dconf",
|
||||
"--filesystem=host",
|
||||
"--own-name=org.gnome.ControlCenter",
|
||||
"--own-name=org.gnome.SessionManager",
|
||||
"--share=ipc",
|
||||
"--share=network",
|
||||
"--socket=x11",
|
||||
"--socket=pulseaudio",
|
||||
"--socket=session-bus",
|
||||
"--socket=system-bus",
|
||||
"--socket=wayland"
|
||||
],
|
||||
"build-options" : {
|
||||
"cflags" : "-O2 -g",
|
||||
"cxxflags" : "-O2 -g",
|
||||
"env" : {
|
||||
"V" : "1"
|
||||
}
|
||||
},
|
||||
"x-run-args" : [
|
||||
"--verbose"
|
||||
],
|
||||
"cleanup" : [
|
||||
"/include",
|
||||
"/share/aclocal",
|
||||
"/man",
|
||||
"/share/man",
|
||||
"/share/gtk-doc",
|
||||
"/share/vala",
|
||||
"*.la",
|
||||
"*.a"
|
||||
],
|
||||
"modules" : [
|
||||
{
|
||||
"name" : "pwquality",
|
||||
"buildsystem" : "autotools",
|
||||
"config-opts" : [
|
||||
],
|
||||
"sources" : [
|
||||
{
|
||||
"type" : "git",
|
||||
"url" : "https://github.com/libpwquality/libpwquality.git"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name" : "polkit",
|
||||
"buildsystem" : "autotools",
|
||||
"config-opts" : [
|
||||
"--disable-introspection",
|
||||
"--disable-libelogind"
|
||||
],
|
||||
"sources" : [
|
||||
{
|
||||
"type" : "git",
|
||||
"url" : "git://anongit.freedesktop.org/polkit"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name" : "accountservice",
|
||||
"buildsystem" : "autotools",
|
||||
"config-opts" : [
|
||||
"--disable-systemd",
|
||||
"--disable-elogind"
|
||||
],
|
||||
"sources" : [
|
||||
{
|
||||
"type" : "git",
|
||||
"url" : "git://anongit.freedesktop.org/accountsservice"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name" : "libusb1",
|
||||
"buildsystem" : "autotools",
|
||||
"config-opts" : [
|
||||
"--disable-udev"
|
||||
],
|
||||
"sources" : [
|
||||
{
|
||||
"type" : "git",
|
||||
"url" : "git://github.com/libusb/libusb.git"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name" : "gusb",
|
||||
"buildsystem" : "meson",
|
||||
"config-opts" : [
|
||||
"-Ddocs=false",
|
||||
"-Dtests=false",
|
||||
"-Dvapi=false"
|
||||
],
|
||||
"sources" : [
|
||||
{
|
||||
"type" : "git",
|
||||
"url" : "git://github.com/hughsie/libgusb.git"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name" : "udev",
|
||||
"config-opts" : [
|
||||
"--disable-hwdb",
|
||||
"--disable-logging",
|
||||
"--disable-gudev",
|
||||
"--disable-introspection",
|
||||
"--disable-keymap",
|
||||
"--disable-mtd_probe"
|
||||
],
|
||||
"cleanup" : [
|
||||
"/include",
|
||||
"/etc",
|
||||
"/libexec",
|
||||
"/sbin",
|
||||
"/lib/pkgconfig",
|
||||
"/man",
|
||||
"/share/aclocal",
|
||||
"/share/doc",
|
||||
"/share/gtk-doc",
|
||||
"/share/man",
|
||||
"/share/pkgconfig",
|
||||
"*.la",
|
||||
"*.a"
|
||||
],
|
||||
"sources" : [
|
||||
{
|
||||
"type" : "git",
|
||||
"url" : "git://github.com/gentoo/eudev.git"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name" : "gudev",
|
||||
"buildsystem" : "autotools",
|
||||
"config-opts" : [
|
||||
"--disable-umockdev"
|
||||
],
|
||||
"sources" : [
|
||||
{
|
||||
"type" : "git",
|
||||
"url" : "git://git.gnome.org/libgudev"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name" : "colord",
|
||||
"buildsystem" : "meson",
|
||||
"config-opts" : [
|
||||
"-Dargyllcms_sensor=false",
|
||||
"-Dbash_completion=false",
|
||||
"-Dman=false",
|
||||
"-Dudev_rules=false",
|
||||
"-Dsystemd=false"
|
||||
],
|
||||
"sources" : [
|
||||
{
|
||||
"type" : "git",
|
||||
"url" : "git://github.com/hughsie/colord.git"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name" : "colord-gtk",
|
||||
"buildsystem" : "autotools",
|
||||
"config-opts" : [
|
||||
],
|
||||
"sources" : [
|
||||
{
|
||||
"type" : "git",
|
||||
"url" : "git://github.com/hughsie/colord-gtk.git"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name" : "rest",
|
||||
"buildsystem" : "autotools",
|
||||
"sources" : [
|
||||
{
|
||||
"type" : "git",
|
||||
"branch" : "librest-0-7",
|
||||
"url" : "https://git.gnome.org/browse/librest"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name" : "gnome-online-accounts",
|
||||
"buildsystem" : "autotools",
|
||||
"config-opts" : [
|
||||
"--disable-telepathy",
|
||||
"--disable-documentation"
|
||||
],
|
||||
"sources" : [
|
||||
{
|
||||
"type" : "git",
|
||||
"url" : "git://git.gnome.org/gnome-online-accounts"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name" : "gnome-desktop",
|
||||
"sources" : [
|
||||
{
|
||||
"type" : "git",
|
||||
"url" : "git://git.gnome.org/gnome-desktop"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name" : "geocode-glib",
|
||||
"buildsystem" : "meson",
|
||||
"sources" : [
|
||||
{
|
||||
"type" : "git",
|
||||
"url" : "git://git.gnome.org/geocode-glib"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name" : "libgweather",
|
||||
"buildsystem" : "meson",
|
||||
"sources" : [
|
||||
{
|
||||
"type" : "git",
|
||||
"url" : "https://gitlab.gnome.org/GNOME/libgweather.git"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name" : "upower",
|
||||
"buildsystem" : "autotools",
|
||||
"sources" : [
|
||||
{
|
||||
"type" : "git",
|
||||
"url" : "git://anongit.freedesktop.org/upower"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name" : "libwacom",
|
||||
"buildsystem" : "autotools",
|
||||
"sources" : [
|
||||
{
|
||||
"type" : "git",
|
||||
"url" : "https://github.com/linuxwacom/libwacom.git"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name" : "libndp",
|
||||
"buildsystem" : "autotools",
|
||||
"sources" : [
|
||||
{
|
||||
"type" : "archive",
|
||||
"url" : " http://libndp.org/files/libndp-1.6.tar.gz",
|
||||
"sha256" : "0c7dfa84e013bd5e569ef2c6292a6f72cfaf14f4ff77a77425e52edc33ffac0e"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name" : "NetworkManager",
|
||||
"buildsystem" : "meson",
|
||||
"config-opts" : [
|
||||
"-Dlibaudit=no",
|
||||
"-Ddbus_conf_dir=/app/etc/dbus-1/system.d",
|
||||
"-Ddbus_ifaces_dir=/app/share/dbus-1/interfaces",
|
||||
"-Ddbus_sys_dir=/app/share/dbus-1/system.d",
|
||||
"-Ddnsmasq=/usr/bin/true",
|
||||
"-Ddocs=false",
|
||||
"-Dintrospection=false",
|
||||
"-Diptables=/usr/bin/true",
|
||||
"-Djson_validation=false",
|
||||
"-Dlibnm_glib=false",
|
||||
"-Dlibpsl=false",
|
||||
"-Dmodem_manager=false",
|
||||
"-Dnmtui=false",
|
||||
"-Dovs=false",
|
||||
"-Dppp=false",
|
||||
"-Dqt=false",
|
||||
"-Dselinux=false",
|
||||
"-Dsession_tracking=no",
|
||||
"-Dsystemdsystemunitdir='no'",
|
||||
"-Dsystemd_journal=false",
|
||||
"-Dtests=no",
|
||||
"-Dvapi=false"
|
||||
],
|
||||
"sources" : [
|
||||
{
|
||||
"type" : "git",
|
||||
"url" : "git://anongit.freedesktop.org/NetworkManager/NetworkManager"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name" : "network-manager-applet",
|
||||
"buildsystem" : "meson",
|
||||
"config-opts" : [
|
||||
"-Dgtk_doc=false",
|
||||
"-Dintrospection=false",
|
||||
"-Dlibnm_gtk=false",
|
||||
"-Dselinux=false",
|
||||
"-Dteam=false",
|
||||
"-Dwwan=false"
|
||||
],
|
||||
"sources" : [
|
||||
{
|
||||
"type" : "git",
|
||||
"url" : "git://git.gnome.org/network-manager-applet"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name" : "ModemManager",
|
||||
"buildsystem" : "autotools",
|
||||
"config-opts" : [
|
||||
"--disable-introspection",
|
||||
"--disable-vala",
|
||||
"--with-udev-base-dir=/app/lib",
|
||||
"--without-mbim",
|
||||
"--without-qmi"
|
||||
],
|
||||
"sources" : [
|
||||
{
|
||||
"type" : "git",
|
||||
"url" : "git://anongit.freedesktop.org/ModemManager/ModemManager"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name" : "gnome-settings-daemon",
|
||||
"buildsystem" : "meson",
|
||||
"sources" : [
|
||||
{
|
||||
"type" : "git",
|
||||
"url" : "https://gitlab.gnome.org/GNOME/gnome-settings-daemon.git"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name" : "gnome-bluetooth",
|
||||
"buildsystem" : "meson",
|
||||
"config-opts" : [
|
||||
"-Dintrospection=false"
|
||||
],
|
||||
"sources" : [
|
||||
{
|
||||
"type" : "git",
|
||||
"url" : "git://git.gnome.org/gnome-bluetooth"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name" : "grilo",
|
||||
"buildsystem" : "meson",
|
||||
"config-opts" : [
|
||||
"-Denable-grl-pls=false",
|
||||
"-Denable-gtk-doc=false",
|
||||
"-Denable-introspection=false",
|
||||
"-Denable-test-ui=false",
|
||||
"-Denable-vala=false"
|
||||
],
|
||||
"sources" : [
|
||||
{
|
||||
"type" : "git",
|
||||
"url" : "git://git.gnome.org/grilo"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name" : "openldap",
|
||||
"buildsystem" : "autotools",
|
||||
"config-opts" : [
|
||||
"--disable-slapd"
|
||||
],
|
||||
"sources" : [
|
||||
{
|
||||
"type" : "archive",
|
||||
"url" : "https://www.openldap.org/software/download/OpenLDAP/openldap-release/openldap-2.4.46.tgz",
|
||||
"sha256" : "9a90dcb86b99ae790ccab93b7585a31fbcbeec8c94bf0f7ab0ca0a87ea0c4b2d"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name" : "samba",
|
||||
"buildsystem" : "autotools",
|
||||
"sources" : [
|
||||
{
|
||||
"type" : "archive",
|
||||
"url" : "https://download.samba.org/pub/samba/stable/samba-4.8.1.tar.gz",
|
||||
"sha256" : "8ef7367507f16b7a5e2f6aed5bcdbd1143feca79aa2a07c9b21292b17d7f789d"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name" : "libgtop2",
|
||||
"buildsystem" : "autotools",
|
||||
"config-opts" : [
|
||||
"--disable-introspection"
|
||||
],
|
||||
"sources" : [
|
||||
{
|
||||
"type" : "git",
|
||||
"url" : "https://gitlab.gnome.org/GNOME/libgtop.git"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name" : "cheese",
|
||||
"buildsystem" : "autotools",
|
||||
"config-opts" : [
|
||||
"--disable-introspection"
|
||||
],
|
||||
"sources" : [
|
||||
{
|
||||
"type" : "git",
|
||||
"url" : "git://git.gnome.org/cheese"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name" : "gnome-control-center",
|
||||
"buildsystem" : "meson",
|
||||
"sources" : [
|
||||
{
|
||||
"type" : "git",
|
||||
"url" : "https://gitlab.gnome.org/GNOME/gnome-control-center.git"
|
||||
}
|
||||
],
|
||||
"config-opts" : [
|
||||
"-Dtracing=true"
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
5
build-aux/meson.build
Normal file
5
build-aux/meson.build
Normal file
@@ -0,0 +1,5 @@
|
||||
update_from_gsd = find_program('meson/update-from-gsd.sh')
|
||||
update_from_gsd_in = files('meson/update-from-gsd.in')
|
||||
update_from_nma_in = files('meson/update-from-nma.in')
|
||||
|
||||
meson.add_install_script('meson/meson_post_install.py', control_center_datadir)
|
||||
@@ -10,6 +10,19 @@ The most important rule is: **see the surrounding code, and copy its style**.
|
||||
Another rule that applies to function declarations is that all parameters are
|
||||
aligned by the last '*'. There are plenty of examples below.
|
||||
|
||||
## Comments
|
||||
|
||||
Comment blocks should be formatted as following:
|
||||
|
||||
```c
|
||||
/* Single line comment */
|
||||
|
||||
/* Multiline comments start at the first line of the comment block,
|
||||
* but have the closing slash a line after. Every line starts with
|
||||
* an asterisk that is aligned with every the rest of the block.
|
||||
*/
|
||||
```
|
||||
|
||||
## Header (.h) files
|
||||
|
||||
It is organized by the following structure:
|
||||
|
||||
14
meson.build
14
meson.build
@@ -1,6 +1,6 @@
|
||||
project(
|
||||
'gnome-control-center', 'c',
|
||||
version : '3.29.0',
|
||||
version : '3.29.2',
|
||||
license : 'GPL2+',
|
||||
meson_version : '>= 0.43.0'
|
||||
)
|
||||
@@ -249,10 +249,7 @@ install_subdir(
|
||||
top_inc = include_directories('.')
|
||||
shell_inc = include_directories('shell')
|
||||
|
||||
update_from_gsd = find_program('update-from-gsd.sh')
|
||||
update_from_gsd_in = files('update-from-gsd.in')
|
||||
update_from_nma_in = files('update-from-nma.in')
|
||||
|
||||
subdir('build-aux')
|
||||
subdir('data/icons')
|
||||
subdir('po')
|
||||
subdir('panels')
|
||||
@@ -269,11 +266,6 @@ configure_file(
|
||||
configuration: config_h
|
||||
)
|
||||
|
||||
meson.add_install_script(
|
||||
'meson_post_install.py',
|
||||
control_center_datadir
|
||||
)
|
||||
|
||||
output = ''
|
||||
output += '\n ' + meson.project_name() + ' - ' + meson.project_version() + '\n'
|
||||
output += ' ===================================\n'
|
||||
@@ -290,4 +282,4 @@ output += ' NetworkManager (Network panel) ............. ' + host_is_linux.t
|
||||
output += ' Wacom (Wacom tablet panel) ................. ' + host_is_linux_not_s390.to_string() + '\n'
|
||||
output += ' Wayland .................................... ' + enable_wayland.to_string() + '\n'
|
||||
|
||||
message(output)
|
||||
message(output)
|
||||
@@ -3,4 +3,4 @@ option('documentation', type: 'boolean', value: false, description: 'build docum
|
||||
option('gnome_session_libexecdir', type: 'string', value: '', description: 'Directory for gnome-session\'s libexecdir')
|
||||
option('ibus', type: 'boolean', value: true, description: 'build with IBus support')
|
||||
option('tracing', type: 'boolean', value: false, description: 'add extra debugging information')
|
||||
option('wayland', type: 'boolean', value: true, description: 'build with Wayland support')
|
||||
option('wayland', type: 'boolean', value: true, description: 'build with Wayland support')
|
||||
@@ -143,7 +143,6 @@ set_bg_properties (CcBackgroundItem *item)
|
||||
{
|
||||
GdkRGBA pcolor = { 0, 0, 0, 0 };
|
||||
GdkRGBA scolor = { 0, 0, 0, 0 };
|
||||
GdkColor p, s;
|
||||
|
||||
if (item->uri) {
|
||||
g_autoptr(GFile) file = NULL;
|
||||
|
||||
@@ -7,6 +7,7 @@ Icon=preferences-desktop-wallpaper
|
||||
Terminal=false
|
||||
Type=Application
|
||||
NoDisplay=true
|
||||
StartupNotify=true
|
||||
Categories=GNOME;GTK;Settings;DesktopSettings;X-GNOME-Settings-Panel;X-GNOME-PersonalizationSettings;
|
||||
OnlyShowIn=GNOME;
|
||||
# Translators: Search terms to find the Background panel. Do NOT translate or localize the semicolons! The list MUST also end with a semicolon!
|
||||
|
||||
@@ -9,6 +9,7 @@ Type=Application
|
||||
NoDisplay=true
|
||||
Categories=GTK;GNOME;Settings;X-GNOME-NetworkSettings;HardwareSettings;X-GNOME-Settings-Panel;X-GNOME-ConnectivitySettings;
|
||||
OnlyShowIn=GNOME;Unity;
|
||||
StartupNotify=true
|
||||
X-GNOME-Bugzilla-Bugzilla=GNOME
|
||||
X-GNOME-Bugzilla-Product=gnome-bluetooth
|
||||
X-GNOME-Bugzilla-Component=properties
|
||||
|
||||
@@ -7,6 +7,7 @@ Icon=preferences-color
|
||||
Terminal=false
|
||||
Type=Application
|
||||
NoDisplay=true
|
||||
StartupNotify=true
|
||||
Categories=GNOME;GTK;Settings;X-GNOME-Settings-Panel;HardwareSettings;X-GNOME-DevicesSettings;
|
||||
OnlyShowIn=GNOME;Unity;
|
||||
X-GNOME-Bugzilla-Bugzilla=GNOME
|
||||
|
||||
@@ -1,13 +1,12 @@
|
||||
# <pre>
|
||||
# @(#)backward 8.9
|
||||
# This file is in the public domain, so clarified as of
|
||||
# 2009-05-17 by Arthur David Olson.
|
||||
|
||||
# This file provides links between current names for time zones
|
||||
# and their old names. Many names changed in late 1993.
|
||||
|
||||
Link Africa/Asmara Africa/Asmera
|
||||
Link Africa/Bamako Africa/Timbuktu
|
||||
# Link TARGET LINK-NAME
|
||||
Link Africa/Nairobi Africa/Asmera
|
||||
Link Africa/Abidjan Africa/Timbuktu
|
||||
Link America/Argentina/Catamarca America/Argentina/ComodRivadavia
|
||||
Link America/Adak America/Atka
|
||||
Link America/Argentina/Buenos_Aires America/Buenos_Aires
|
||||
@@ -21,17 +20,25 @@ Link America/Argentina/Jujuy America/Jujuy
|
||||
Link America/Indiana/Knox America/Knox_IN
|
||||
Link America/Kentucky/Louisville America/Louisville
|
||||
Link America/Argentina/Mendoza America/Mendoza
|
||||
Link America/Toronto America/Montreal
|
||||
Link America/Rio_Branco America/Porto_Acre
|
||||
Link America/Argentina/Cordoba America/Rosario
|
||||
Link America/St_Thomas America/Virgin
|
||||
Link America/Tijuana America/Santa_Isabel
|
||||
Link America/Denver America/Shiprock
|
||||
Link America/Port_of_Spain America/Virgin
|
||||
Link Pacific/Auckland Antarctica/South_Pole
|
||||
Link Asia/Ashgabat Asia/Ashkhabad
|
||||
Link Asia/Chongqing Asia/Chungking
|
||||
Link Asia/Dhaka Asia/Dacca
|
||||
Link Asia/Kathmandu Asia/Katmandu
|
||||
Link Asia/Kolkata Asia/Calcutta
|
||||
Link Asia/Shanghai Asia/Chongqing
|
||||
Link Asia/Shanghai Asia/Chungking
|
||||
Link Asia/Dhaka Asia/Dacca
|
||||
Link Asia/Shanghai Asia/Harbin
|
||||
Link Asia/Urumqi Asia/Kashgar
|
||||
Link Asia/Kathmandu Asia/Katmandu
|
||||
Link Asia/Macau Asia/Macao
|
||||
Link Asia/Jerusalem Asia/Tel_Aviv
|
||||
Link Asia/Yangon Asia/Rangoon
|
||||
Link Asia/Ho_Chi_Minh Asia/Saigon
|
||||
Link Asia/Jerusalem Asia/Tel_Aviv
|
||||
Link Asia/Thimphu Asia/Thimbu
|
||||
Link Asia/Makassar Asia/Ujung_Pandang
|
||||
Link Asia/Ulaanbaatar Asia/Ulan_Bator
|
||||
@@ -54,7 +61,9 @@ Link America/Sao_Paulo Brazil/East
|
||||
Link America/Manaus Brazil/West
|
||||
Link America/Halifax Canada/Atlantic
|
||||
Link America/Winnipeg Canada/Central
|
||||
Link America/Regina Canada/East-Saskatchewan
|
||||
# This line is commented out, as the name exceeded the 14-character limit
|
||||
# and was an unused misnomer.
|
||||
#Link America/Regina Canada/East-Saskatchewan
|
||||
Link America/Toronto Canada/Eastern
|
||||
Link America/Edmonton Canada/Mountain
|
||||
Link America/St_Johns Canada/Newfoundland
|
||||
@@ -89,10 +98,11 @@ Link Pacific/Auckland NZ
|
||||
Link Pacific/Chatham NZ-CHAT
|
||||
Link America/Denver Navajo
|
||||
Link Asia/Shanghai PRC
|
||||
Link Pacific/Pago_Pago Pacific/Samoa
|
||||
Link Pacific/Chuuk Pacific/Yap
|
||||
Link Pacific/Chuuk Pacific/Truk
|
||||
Link Pacific/Honolulu Pacific/Johnston
|
||||
Link Pacific/Pohnpei Pacific/Ponape
|
||||
Link Pacific/Pago_Pago Pacific/Samoa
|
||||
Link Pacific/Chuuk Pacific/Truk
|
||||
Link Pacific/Chuuk Pacific/Yap
|
||||
Link Europe/Warsaw Poland
|
||||
Link Europe/Lisbon Portugal
|
||||
Link Asia/Taipei ROC
|
||||
@@ -115,4 +125,4 @@ Link Pacific/Pago_Pago US/Samoa
|
||||
Link Etc/UTC UTC
|
||||
Link Etc/UTC Universal
|
||||
Link Europe/Moscow W-SU
|
||||
Link Etc/UTC Zulu
|
||||
Link Etc/UTC Zulu
|
||||
@@ -7,6 +7,7 @@ Icon=preferences-system-time
|
||||
Terminal=false
|
||||
Type=Application
|
||||
NoDisplay=true
|
||||
StartupNotify=true
|
||||
Categories=GNOME;GTK;Settings;X-GNOME-Settings-Panel;X-GNOME-DetailsSettings;
|
||||
OnlyShowIn=GNOME;
|
||||
# Translators: Search terms to find the Date and Time panel. Do NOT translate or localize the semicolons! The list MUST also end with a semicolon!
|
||||
|
||||
@@ -79,11 +79,11 @@ cc_night_light_dialog_finalize (GObject *object)
|
||||
self->main_window = NULL;
|
||||
}
|
||||
|
||||
g_object_unref (self->builder);
|
||||
g_object_unref (self->proxy_color);
|
||||
g_object_unref (self->proxy_color_props);
|
||||
g_object_unref (self->settings_display);
|
||||
g_object_unref (self->settings_clock);
|
||||
g_clear_object (&self->builder);
|
||||
g_clear_object (&self->proxy_color);
|
||||
g_clear_object (&self->proxy_color_props);
|
||||
g_clear_object (&self->settings_display);
|
||||
g_clear_object (&self->settings_clock);
|
||||
if (self->timer_id > 0)
|
||||
g_source_remove (self->timer_id);
|
||||
|
||||
@@ -386,13 +386,19 @@ static void
|
||||
dialog_got_proxy_cb (GObject *source_object, GAsyncResult *res, gpointer user_data)
|
||||
{
|
||||
CcNightLightDialog *self = (CcNightLightDialog *) user_data;
|
||||
GDBusProxy *proxy;
|
||||
g_autoptr(GError) error = NULL;
|
||||
self->proxy_color = cc_object_storage_create_dbus_proxy_finish (res, &error);
|
||||
if (self->proxy_color == NULL)
|
||||
|
||||
proxy = cc_object_storage_create_dbus_proxy_finish (res, &error);
|
||||
if (proxy == NULL)
|
||||
{
|
||||
g_warning ("failed to connect to g-s-d: %s", error->message);
|
||||
if (!g_error_matches (error, G_IO_ERROR, G_IO_ERROR_CANCELLED))
|
||||
g_warning ("failed to connect to g-s-d: %s", error->message);
|
||||
return;
|
||||
}
|
||||
|
||||
self->proxy_color = proxy;
|
||||
|
||||
g_signal_connect_object (self->proxy_color, "g-properties-changed",
|
||||
G_CALLBACK (dialog_color_properties_changed_cb), self, 0);
|
||||
dialog_update_state (self);
|
||||
@@ -403,13 +409,18 @@ static void
|
||||
dialog_got_proxy_props_cb (GObject *source_object, GAsyncResult *res, gpointer user_data)
|
||||
{
|
||||
CcNightLightDialog *self = (CcNightLightDialog *) user_data;
|
||||
GDBusProxy *proxy;
|
||||
g_autoptr(GError) error = NULL;
|
||||
self->proxy_color_props = cc_object_storage_create_dbus_proxy_finish (res, &error);
|
||||
if (self->proxy_color_props == NULL)
|
||||
|
||||
proxy = cc_object_storage_create_dbus_proxy_finish (res, &error);
|
||||
if (proxy == NULL)
|
||||
{
|
||||
g_warning ("failed to connect to g-s-d: %s", error->message);
|
||||
if (!g_error_matches (error, G_IO_ERROR, G_IO_ERROR_CANCELLED))
|
||||
g_warning ("failed to connect to g-s-d: %s", error->message);
|
||||
return;
|
||||
}
|
||||
|
||||
self->proxy_color_props = proxy;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
|
||||
@@ -7,6 +7,7 @@ Icon=preferences-desktop-display
|
||||
Terminal=false
|
||||
Type=Application
|
||||
NoDisplay=true
|
||||
StartupNotify=true
|
||||
Categories=GNOME;GTK;Settings;HardwareSettings;X-GNOME-Settings-Panel;X-GNOME-DevicesSettings;
|
||||
OnlyShowIn=GNOME;Unity;
|
||||
X-GNOME-Bugzilla-Bugzilla=GNOME
|
||||
|
||||
@@ -7,6 +7,7 @@ Icon=starred
|
||||
Terminal=false
|
||||
Type=Application
|
||||
NoDisplay=true
|
||||
StartupNotify=true
|
||||
Categories=GNOME;GTK;Settings;X-GNOME-Settings-Panel;X-GNOME-DetailsSettings;
|
||||
OnlyShowIn=GNOME;Unity;
|
||||
X-GNOME-Bugzilla-Bugzilla=GNOME
|
||||
|
||||
@@ -7,6 +7,7 @@ Icon=help-about
|
||||
Terminal=false
|
||||
Type=Application
|
||||
NoDisplay=true
|
||||
StartupNotify=true
|
||||
Categories=GNOME;GTK;Settings;X-GNOME-Settings-Panel;X-GNOME-DetailsSettings;
|
||||
OnlyShowIn=GNOME;Unity;
|
||||
X-GNOME-Bugzilla-Bugzilla=GNOME
|
||||
|
||||
@@ -7,6 +7,7 @@ Icon=media-removable
|
||||
Terminal=false
|
||||
Type=Application
|
||||
NoDisplay=true
|
||||
StartupNotify=true
|
||||
Categories=GNOME;GTK;Settings;X-GNOME-Settings-Panel;X-GNOME-DevicesSettings;
|
||||
OnlyShowIn=GNOME;Unity;
|
||||
X-GNOME-Bugzilla-Bugzilla=GNOME
|
||||
|
||||
@@ -7,6 +7,7 @@ Icon=input-keyboard
|
||||
Terminal=false
|
||||
Type=Application
|
||||
NoDisplay=true
|
||||
StartupNotify=true
|
||||
Categories=GNOME;GTK;Settings;HardwareSettings;X-GNOME-Settings-Panel;X-GNOME-DevicesSettings;
|
||||
OnlyShowIn=GNOME;Unity;
|
||||
X-GNOME-Bugzilla-Bugzilla=GNOME
|
||||
|
||||
@@ -7,6 +7,7 @@ Icon=input-mouse
|
||||
Terminal=false
|
||||
Type=Application
|
||||
NoDisplay=true
|
||||
StartupNotify=true
|
||||
Categories=GNOME;GTK;Settings;HardwareSettings;X-GNOME-Settings-Panel;X-GNOME-DevicesSettings;
|
||||
OnlyShowIn=GNOME;Unity;
|
||||
X-GNOME-Bugzilla-Bugzilla=GNOME
|
||||
|
||||
@@ -7,6 +7,7 @@ Icon=network-workgroup
|
||||
Terminal=false
|
||||
Type=Application
|
||||
NoDisplay=true
|
||||
StartupNotify=true
|
||||
Categories=GNOME;GTK;Settings;HardwareSettings;X-GNOME-Settings-Panel;
|
||||
OnlyShowIn=GNOME;Unity;
|
||||
X-GNOME-Bugzilla-Bugzilla=GNOME
|
||||
|
||||
@@ -7,6 +7,7 @@ Icon=network-wireless
|
||||
Terminal=false
|
||||
Type=Application
|
||||
NoDisplay=true
|
||||
StartupNotify=true
|
||||
Categories=GNOME;GTK;Settings;HardwareSettings;X-GNOME-Settings-Panel;X-GNOME-ConnectivitySettings;
|
||||
OnlyShowIn=GNOME;Unity;
|
||||
X-GNOME-Bugzilla-Bugzilla=GNOME
|
||||
|
||||
@@ -7,6 +7,7 @@ Icon=preferences-system-notifications
|
||||
Terminal=false
|
||||
Type=Application
|
||||
NoDisplay=true
|
||||
StartupNotify=true
|
||||
Categories=GNOME;GTK;Settings;DesktopSettings;X-GNOME-Settings-Panel;X-GNOME-PersonalizationSettings;
|
||||
OnlyShowIn=GNOME;Unity;
|
||||
X-GNOME-Bugzilla-Bugzilla=GNOME
|
||||
|
||||
@@ -7,6 +7,7 @@ Icon=goa-panel
|
||||
Terminal=false
|
||||
Type=Application
|
||||
NoDisplay=true
|
||||
StartupNotify=true
|
||||
Categories=GNOME;GTK;Settings;DesktopSettings;X-GNOME-Settings-Panel;X-GNOME-AccountSettings;
|
||||
OnlyShowIn=GNOME;Unity;
|
||||
X-GNOME-Bugzilla-Bugzilla=GNOME
|
||||
|
||||
@@ -7,6 +7,7 @@ Icon=gnome-power-manager
|
||||
Terminal=false
|
||||
Type=Application
|
||||
NoDisplay=true
|
||||
StartupNotify=true
|
||||
Categories=GNOME;GTK;Settings;DesktopSettings;X-GNOME-Settings-Panel;HardwareSettings;
|
||||
OnlyShowIn=GNOME;Unity;
|
||||
X-GNOME-Bugzilla-Bugzilla=GNOME
|
||||
|
||||
@@ -7,6 +7,7 @@ Icon=printer
|
||||
Terminal=false
|
||||
Type=Application
|
||||
NoDisplay=true
|
||||
StartupNotify=true
|
||||
# The X-GNOME-Settings-Panel is necessary to show in the main shell UI
|
||||
Categories=GNOME;GTK;Settings;HardwareSettings;X-GNOME-Settings-Panel;X-GNOME-DevicesSettings;
|
||||
OnlyShowIn=GNOME;Unity;
|
||||
|
||||
@@ -153,6 +153,7 @@
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="transition-type">none</property>
|
||||
<property name="has_focus">True</property>
|
||||
<style>
|
||||
<class name="view"/>
|
||||
</style>
|
||||
|
||||
@@ -506,6 +506,20 @@ authenticate_samba_server (GtkButton *button,
|
||||
}
|
||||
}
|
||||
|
||||
static gboolean
|
||||
stack_key_press_cb (GtkWidget *widget,
|
||||
GdkEvent *event,
|
||||
gpointer user_data)
|
||||
{
|
||||
PpNewPrinterDialog *dialog = (PpNewPrinterDialog *) user_data;
|
||||
PpNewPrinterDialogPrivate *priv = dialog->priv;
|
||||
|
||||
gtk_widget_grab_focus (WID ("search-entry"));
|
||||
gtk_main_do_event (event);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static void
|
||||
pp_new_printer_dialog_init (PpNewPrinterDialog *dialog)
|
||||
{
|
||||
@@ -556,6 +570,8 @@ pp_new_printer_dialog_init (PpNewPrinterDialog *dialog)
|
||||
widget = WID ("unlock-button");
|
||||
g_signal_connect (widget, "clicked", G_CALLBACK (authenticate_samba_server), dialog);
|
||||
|
||||
g_signal_connect (WID ("stack"), "key-press-event", G_CALLBACK (stack_key_press_cb), dialog);
|
||||
|
||||
/* Authentication form widgets */
|
||||
g_signal_connect (WID ("username-entry"), "changed", G_CALLBACK (auth_entries_changed), dialog);
|
||||
g_signal_connect (WID ("password-entry"), "changed", G_CALLBACK (auth_entries_changed), dialog);
|
||||
|
||||
@@ -8,6 +8,7 @@ Icon=preferences-system-privacy
|
||||
Terminal=false
|
||||
Type=Application
|
||||
NoDisplay=true
|
||||
StartupNotify=true
|
||||
Categories=GNOME;GTK;Settings;DesktopSettings;X-GNOME-Settings-Panel;X-GNOME-AccountSettings;
|
||||
OnlyShowIn=GNOME;Unity;
|
||||
X-GNOME-Bugzilla-Bugzilla=GNOME
|
||||
|
||||
@@ -7,6 +7,7 @@ Icon=preferences-desktop-locale
|
||||
Terminal=false
|
||||
Type=Application
|
||||
NoDisplay=true
|
||||
StartupNotify=true
|
||||
Categories=GNOME;GTK;Settings;DesktopSettings;X-GNOME-Settings-Panel;X-GNOME-PersonalizationSettings;
|
||||
OnlyShowIn=GNOME;Unity;
|
||||
X-GNOME-Bugzilla-Bugzilla=GNOME
|
||||
|
||||
@@ -7,6 +7,7 @@ Icon=preferences-system-search
|
||||
Terminal=false
|
||||
Type=Application
|
||||
NoDisplay=true
|
||||
StartupNotify=true
|
||||
Categories=GNOME;GTK;Settings;DesktopSettings;X-GNOME-Settings-Panel;X-GNOME-PersonalizationSettings;
|
||||
OnlyShowIn=GNOME;Unity;
|
||||
X-GNOME-Bugzilla-Bugzilla=GNOME
|
||||
|
||||
@@ -7,6 +7,7 @@ Icon=preferences-system-sharing
|
||||
Terminal=false
|
||||
Type=Application
|
||||
NoDisplay=true
|
||||
StartupNotify=true
|
||||
Categories=GNOME;GTK;Settings;DesktopSettings;X-GNOME-Settings-Panel;X-GNOME-AccountSettings;
|
||||
OnlyShowIn=GNOME;Unity;
|
||||
X-GNOME-Settings-Panel=sharing
|
||||
|
||||
@@ -7,6 +7,7 @@ Icon=multimedia-volume-control
|
||||
Terminal=false
|
||||
Type=Application
|
||||
NoDisplay=true
|
||||
StartupNotify=true
|
||||
Categories=GNOME;GTK;Settings;HardwareSettings;X-GNOME-Settings-Panel;
|
||||
OnlyShowIn=GNOME;Unity;
|
||||
X-GNOME-Bugzilla-Bugzilla=GNOME
|
||||
|
||||
@@ -25,8 +25,10 @@
|
||||
|
||||
#include <gio/gio.h>
|
||||
|
||||
#if !GLIB_CHECK_VERSION(2, 57, 0)
|
||||
G_DEFINE_AUTOPTR_CLEANUP_FUNC (GEnumClass, g_type_class_unref);
|
||||
G_DEFINE_AUTOPTR_CLEANUP_FUNC (GFlagsClass, g_type_class_unref);
|
||||
#endif
|
||||
|
||||
gboolean
|
||||
bolt_enum_class_validate (GEnumClass *enum_class,
|
||||
|
||||
@@ -7,6 +7,7 @@ Icon=thunderbolt
|
||||
Terminal=false
|
||||
Type=Application
|
||||
NoDisplay=true
|
||||
StartupNotify=true
|
||||
Categories=GNOME;GTK;Settings;X-GNOME-Settings-Panel;HardwareSettings;X-GNOME-DevicesSettings;
|
||||
OnlyShowIn=GNOME;Unity;
|
||||
X-GNOME-Bugzilla-Bugzilla=GNOME
|
||||
|
||||
@@ -7,6 +7,7 @@ Icon=preferences-desktop-accessibility
|
||||
Terminal=false
|
||||
Type=Application
|
||||
NoDisplay=true
|
||||
StartupNotify=true
|
||||
Categories=GNOME;GTK;Settings;X-GNOME-Settings-Panel;X-GNOME-PersonalizationSettings;
|
||||
OnlyShowIn=GNOME;Unity;
|
||||
X-GNOME-Bugzilla-Bugzilla=GNOME
|
||||
|
||||
@@ -538,7 +538,7 @@
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel" id="enterprise-hint">
|
||||
<object class="GtkLabel" id="enterprise_hint">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="yalign">0</property>
|
||||
@@ -810,7 +810,7 @@
|
||||
<widget name="enterprise_domain_hint"/>
|
||||
<widget name="enterprise_login"/>
|
||||
<widget name="enterprise_password"/>
|
||||
<widget name="enterprise-hint"/>
|
||||
<widget name="enterprise_hint"/>
|
||||
</widgets>
|
||||
</object>
|
||||
<object class="GtkSizeGroup">
|
||||
|
||||
@@ -7,6 +7,7 @@ Icon=system-users
|
||||
Terminal=false
|
||||
Type=Application
|
||||
NoDisplay=true
|
||||
StartupNotify=true
|
||||
Categories=System;Settings;X-GNOME-Settings-Panel;X-GNOME-DetailsSettings;
|
||||
OnlyShowIn=GNOME;Unity;
|
||||
X-GNOME-Bugzilla-Bugzilla=GNOME
|
||||
|
||||
@@ -1580,6 +1580,7 @@ um_account_dialog_class_init (UmAccountDialogClass *klass)
|
||||
gtk_widget_class_bind_template_child (widget_class, UmAccountDialog, enterprise_login);
|
||||
gtk_widget_class_bind_template_child (widget_class, UmAccountDialog, enterprise_password);
|
||||
gtk_widget_class_bind_template_child (widget_class, UmAccountDialog, enterprise_domain_hint);
|
||||
gtk_widget_class_bind_template_child (widget_class, UmAccountDialog, enterprise_hint);
|
||||
}
|
||||
|
||||
UmAccountDialog *
|
||||
|
||||
@@ -7,6 +7,7 @@ Icon=input-tablet
|
||||
Terminal=false
|
||||
Type=Application
|
||||
NoDisplay=true
|
||||
StartupNotify=true
|
||||
Categories=GNOME;GTK;Settings;HardwareSettings;X-GNOME-Settings-Panel;X-GNOME-DevicesSettings;
|
||||
OnlyShowIn=GNOME;Unity;
|
||||
X-GNOME-Bugzilla-Bugzilla=GNOME
|
||||
|
||||
140
po/es.po
140
po/es.po
@@ -20,8 +20,8 @@ msgstr ""
|
||||
"Project-Id-Version: gnome-control-center master\n"
|
||||
"Report-Msgid-Bugs-To: https://gitlab.gnome.org/GNOME/gnome-control-center/"
|
||||
"issues\n"
|
||||
"POT-Creation-Date: 2018-04-19 13:00+0000\n"
|
||||
"PO-Revision-Date: 2018-04-23 15:03+0200\n"
|
||||
"POT-Creation-Date: 2018-05-16 18:05+0000\n"
|
||||
"PO-Revision-Date: 2018-05-22 12:10+0200\n"
|
||||
"Last-Translator: Daniel Mustieles <daniel.mustieles@gmail.com>\n"
|
||||
"Language-Team: es <gnome-es-list@gnome.org>\n"
|
||||
"Language: es\n"
|
||||
@@ -218,7 +218,7 @@ msgstr "Apague el modo avión para activar el Bluetooth."
|
||||
|
||||
#. Translators: The found device is a printer connected via Bluetooth
|
||||
#: panels/bluetooth/gnome-bluetooth-panel.desktop.in.in:3
|
||||
#: panels/network/network.ui:101 panels/printers/pp-new-printer-dialog.c:1816
|
||||
#: panels/network/network.ui:101 panels/printers/pp-new-printer-dialog.c:1832
|
||||
msgid "Bluetooth"
|
||||
msgstr "Bluetooth"
|
||||
|
||||
@@ -1707,8 +1707,8 @@ msgstr "Lanzadores"
|
||||
msgid "Launch help browser"
|
||||
msgstr "Lanzar el visor de ayuda"
|
||||
|
||||
#: panels/keyboard/01-launchers.xml.in:6 shell/cc-window.c:237
|
||||
#: shell/cc-window.c:773 shell/gnome-control-center.desktop.in.in:3
|
||||
#: panels/keyboard/01-launchers.xml.in:6 shell/cc-window.c:279
|
||||
#: shell/cc-window.c:847 shell/gnome-control-center.desktop.in.in:3
|
||||
#: shell/window.ui:125
|
||||
msgid "Settings"
|
||||
msgstr "Configuración"
|
||||
@@ -2126,7 +2126,7 @@ msgid "Single click, secondary button"
|
||||
msgstr "Una sola pulsación, botón secundario"
|
||||
|
||||
#. add proxy to device list
|
||||
#: panels/network/cc-network-panel.c:581
|
||||
#: panels/network/cc-network-panel.c:583
|
||||
msgid "Network proxy"
|
||||
msgstr "Proxy de la red"
|
||||
|
||||
@@ -2134,17 +2134,17 @@ msgstr "Proxy de la red"
|
||||
#. * window for vpn connections, it is also used to display
|
||||
#. * vpn connections in the device list.
|
||||
#.
|
||||
#: panels/network/cc-network-panel.c:717 panels/network/net-vpn.c:167
|
||||
#: panels/network/cc-network-panel.c:719 panels/network/net-vpn.c:167
|
||||
#: panels/network/net-vpn.c:296
|
||||
#, c-format
|
||||
msgid "%s VPN"
|
||||
msgstr "VPN «%s»"
|
||||
|
||||
#: panels/network/cc-network-panel.c:781 panels/network/wifi.ui:282
|
||||
#: panels/network/cc-network-panel.c:783 panels/network/wifi.ui:282
|
||||
msgid "Oops, something has gone wrong. Please contact your software vendor."
|
||||
msgstr "Algo ha fallado. Contacte con el fabricante del software."
|
||||
|
||||
#: panels/network/cc-network-panel.c:787
|
||||
#: panels/network/cc-network-panel.c:789
|
||||
msgid "NetworkManager needs to be running."
|
||||
msgstr "NetworkManager debe estar en ejecución."
|
||||
|
||||
@@ -2295,7 +2295,7 @@ msgid "Remove VPN"
|
||||
msgstr "Quitar VPN"
|
||||
|
||||
#: panels/network/connection-editor/ce-page-details.c:334
|
||||
#: panels/network/network-wifi.ui:1456 shell/cc-window.c:229
|
||||
#: panels/network/network-wifi.ui:1456 shell/cc-window.c:271
|
||||
#: shell/panel-list.ui:103
|
||||
msgid "Details"
|
||||
msgstr "Detalles"
|
||||
@@ -4051,8 +4051,6 @@ msgstr "Baterías"
|
||||
|
||||
#: panels/power/cc-power-panel.c:1206
|
||||
#, c-format
|
||||
#| msgid "%i hour"
|
||||
#| msgid_plural "%i hours"
|
||||
msgid "%d hour"
|
||||
msgid_plural "%d hours"
|
||||
msgstr[0] "%d hora"
|
||||
@@ -4060,8 +4058,6 @@ msgstr[1] "%d horas"
|
||||
|
||||
#: panels/power/cc-power-panel.c:1208
|
||||
#, c-format
|
||||
#| msgid "%i minute"
|
||||
#| msgid_plural "%i minutes"
|
||||
msgid "%d minute"
|
||||
msgid_plural "%d minutes"
|
||||
msgstr[0] "%d minuto"
|
||||
@@ -4069,7 +4065,6 @@ msgstr[1] "%d minutos"
|
||||
|
||||
#: panels/power/cc-power-panel.c:1211
|
||||
#, c-format
|
||||
#| msgid "30 seconds"
|
||||
msgid "%d second"
|
||||
msgid_plural "%d seconds"
|
||||
msgstr[0] "%d segundo"
|
||||
@@ -4078,7 +4073,6 @@ msgstr[1] "%d segundos"
|
||||
#. 5 hours 2 minutes 12 seconds
|
||||
#: panels/power/cc-power-panel.c:1217
|
||||
#, c-format
|
||||
#| msgid "%i %s %i %s"
|
||||
msgctxt "time"
|
||||
msgid "%s %s %s"
|
||||
msgstr "%s %s %s"
|
||||
@@ -4086,14 +4080,12 @@ msgstr "%s %s %s"
|
||||
#. 2 minutes 12 seconds
|
||||
#: panels/power/cc-power-panel.c:1220
|
||||
#, c-format
|
||||
#| msgid "%i %s %i %s"
|
||||
msgctxt "time"
|
||||
msgid "%s %s"
|
||||
msgstr "%s %s"
|
||||
|
||||
#. 0 seconds
|
||||
#: panels/power/cc-power-panel.c:1226
|
||||
#| msgid "30 seconds"
|
||||
msgid "0 seconds"
|
||||
msgstr "0 seconds"
|
||||
|
||||
@@ -4191,7 +4183,7 @@ msgid "_When the Power Button is pressed"
|
||||
msgstr "Al pulsar el b_otón de encendido"
|
||||
|
||||
#: panels/power/cc-power-panel.c:2533 panels/thunderbolt/cc-bolt-panel.ui:466
|
||||
#: panels/thunderbolt/cc-bolt-panel.ui:525 shell/cc-window.c:233
|
||||
#: panels/thunderbolt/cc-bolt-panel.ui:525 shell/cc-window.c:275
|
||||
#: shell/panel-list.ui:45
|
||||
msgid "Devices"
|
||||
msgstr "Dispositivos"
|
||||
@@ -4310,19 +4302,19 @@ msgstr "Autenticar"
|
||||
|
||||
#. Translators: This is a username on a print server.
|
||||
#: panels/printers/authentication-dialog.ui:80
|
||||
#: panels/printers/jobs-dialog.ui:57 panels/printers/new-printer-dialog.ui:361
|
||||
#: panels/printers/jobs-dialog.ui:57 panels/printers/new-printer-dialog.ui:362
|
||||
msgid "Username"
|
||||
msgstr "Nombre de usuario"
|
||||
|
||||
#. Translators: This is a password needed for printing.
|
||||
#: panels/printers/authentication-dialog.ui:96
|
||||
#: panels/printers/jobs-dialog.ui:70 panels/printers/new-printer-dialog.ui:382
|
||||
#: panels/printers/jobs-dialog.ui:70 panels/printers/new-printer-dialog.ui:383
|
||||
#: panels/user-accounts/data/account-dialog.ui:240
|
||||
msgid "Password"
|
||||
msgstr "Contraseña"
|
||||
|
||||
#: panels/printers/authentication-dialog.ui:139
|
||||
#: panels/printers/new-printer-dialog.ui:336
|
||||
#: panels/printers/new-printer-dialog.ui:337
|
||||
msgid "Authentication Required"
|
||||
msgstr "Se requiere autenticación"
|
||||
|
||||
@@ -4429,16 +4421,16 @@ msgid "_Unlock"
|
||||
msgstr "Desbloq_uear"
|
||||
|
||||
#. Translators: No printers were detected
|
||||
#: panels/printers/new-printer-dialog.ui:210
|
||||
#: panels/printers/new-printer-dialog.ui:211
|
||||
msgid "No Printers Found"
|
||||
msgstr "No se han encontrado impresoras"
|
||||
|
||||
#. Translators: The entered text should contain network address of a printer or a text which will filter found devices (their names and locations)
|
||||
#: panels/printers/new-printer-dialog.ui:283
|
||||
#: panels/printers/new-printer-dialog.ui:284
|
||||
msgid "Enter a network address or search for a printer"
|
||||
msgstr "Introduzca una dirección de red o busque una impresora"
|
||||
|
||||
#: panels/printers/new-printer-dialog.ui:352
|
||||
#: panels/printers/new-printer-dialog.ui:353
|
||||
msgid "Enter username and password to view printers on Print Server."
|
||||
msgstr ""
|
||||
"Introduzca su nombre de usuario y su contraseña para ver las impresoras "
|
||||
@@ -4622,39 +4614,39 @@ msgstr ""
|
||||
"Introduzca su nombre de usuario y su contraseña para ver las impresoras en "
|
||||
"%s."
|
||||
|
||||
#: panels/printers/pp-new-printer-dialog.c:876
|
||||
#: panels/printers/pp-new-printer-dialog.c:892
|
||||
msgid "Searching for Printers"
|
||||
msgstr "Buscando impresoras"
|
||||
|
||||
#. Translators: The found device is a printer connected via USB
|
||||
#: panels/printers/pp-new-printer-dialog.c:1799
|
||||
#: panels/printers/pp-new-printer-dialog.c:1815
|
||||
msgid "USB"
|
||||
msgstr "USB"
|
||||
|
||||
#. Translators: The found device is a printer connected via serial port
|
||||
#: panels/printers/pp-new-printer-dialog.c:1804
|
||||
#: panels/printers/pp-new-printer-dialog.c:1820
|
||||
msgid "Serial Port"
|
||||
msgstr "Puerto serie"
|
||||
|
||||
#. Translators: The found device is a printer connected via parallel port
|
||||
#: panels/printers/pp-new-printer-dialog.c:1811
|
||||
#: panels/printers/pp-new-printer-dialog.c:1827
|
||||
msgid "Parallel Port"
|
||||
msgstr "Puerto paralelo"
|
||||
|
||||
#. Translators: Location of found network printer (e.g. Kitchen, Reception)
|
||||
#: panels/printers/pp-new-printer-dialog.c:1853
|
||||
#: panels/printers/pp-new-printer-dialog.c:1869
|
||||
#, c-format
|
||||
msgid "Location: %s"
|
||||
msgstr "Ubicación: %s"
|
||||
|
||||
#. Translators: Network address of found printer
|
||||
#: panels/printers/pp-new-printer-dialog.c:1858
|
||||
#: panels/printers/pp-new-printer-dialog.c:1874
|
||||
#, c-format
|
||||
msgid "Address: %s"
|
||||
msgstr "Dirección: %s"
|
||||
|
||||
#. Translators: This item is a server which needs authentication to show its printers
|
||||
#: panels/printers/pp-new-printer-dialog.c:1887
|
||||
#: panels/printers/pp-new-printer-dialog.c:1903
|
||||
msgid "Server requires authentication"
|
||||
msgstr "El servidor requiere autenticación"
|
||||
|
||||
@@ -5476,7 +5468,7 @@ msgid "Preferences"
|
||||
msgstr "Preferencias"
|
||||
|
||||
#. Label
|
||||
#: panels/sharing/cc-sharing-networks.c:305
|
||||
#: panels/sharing/cc-sharing-networks.c:307
|
||||
msgid "No networks selected for sharing"
|
||||
msgstr "No se han seleccionado redes para compartir"
|
||||
|
||||
@@ -5860,14 +5852,12 @@ msgstr "Personalizado"
|
||||
|
||||
#: panels/thunderbolt/cc-bolt-device-dialog.c:86
|
||||
#: panels/thunderbolt/cc-bolt-device-entry.c:119
|
||||
#| msgid "Disconnected"
|
||||
msgctxt "Thunderbolt Device Status"
|
||||
msgid "Disconnected"
|
||||
msgstr "Desconectado"
|
||||
|
||||
#: panels/thunderbolt/cc-bolt-device-dialog.c:89
|
||||
#: panels/thunderbolt/cc-bolt-device-entry.c:122
|
||||
#| msgid "Connecting"
|
||||
msgctxt "Thunderbolt Device Status"
|
||||
msgid "Connecting"
|
||||
msgstr "Conectando"
|
||||
@@ -5875,13 +5865,11 @@ msgstr "Conectando"
|
||||
#: panels/thunderbolt/cc-bolt-device-dialog.c:92
|
||||
#: panels/thunderbolt/cc-bolt-device-entry.c:126
|
||||
#: panels/thunderbolt/cc-bolt-device-entry.c:138
|
||||
#| msgid "Connected"
|
||||
msgctxt "Thunderbolt Device Status"
|
||||
msgid "Connected"
|
||||
msgstr "Conectado"
|
||||
|
||||
#: panels/thunderbolt/cc-bolt-device-dialog.c:95
|
||||
#| msgid "Authentication required"
|
||||
msgctxt "Thunderbolt Device Status"
|
||||
msgid "Authorization Error"
|
||||
msgstr "Error de autorización"
|
||||
@@ -5898,14 +5886,12 @@ msgid "Reduced Functionality"
|
||||
msgstr "Funcionalidad reducida"
|
||||
|
||||
#: panels/thunderbolt/cc-bolt-device-dialog.c:107
|
||||
#| msgid "Connected Devices"
|
||||
msgctxt "Thunderbolt Device Status"
|
||||
msgid "Connected & Authorized"
|
||||
msgstr "Conectado y autorizado"
|
||||
|
||||
#: panels/thunderbolt/cc-bolt-device-dialog.c:113
|
||||
#: panels/thunderbolt/cc-bolt-device-entry.c:146
|
||||
#| msgid "Unknown"
|
||||
msgctxt "Thunderbolt Device Status"
|
||||
msgid "Unknown"
|
||||
msgstr "Desconocido"
|
||||
@@ -5917,29 +5903,24 @@ msgstr "Autorizado a las:"
|
||||
|
||||
#. Translators: The time point the device was connected.
|
||||
#: panels/thunderbolt/cc-bolt-device-dialog.c:175
|
||||
#| msgid "Connected"
|
||||
msgid "Connected at:"
|
||||
msgstr "Conectado a las:"
|
||||
|
||||
#. Translators: The time point the device was enrolled,
|
||||
#. * i.e. authorized and stored in the device database.
|
||||
#: panels/thunderbolt/cc-bolt-device-dialog.c:182
|
||||
#| msgid "_Enroll"
|
||||
msgid "Enrolled at:"
|
||||
msgstr "Unido a las:"
|
||||
|
||||
#: panels/thunderbolt/cc-bolt-device-dialog.c:250
|
||||
#| msgid "Failed to upload file: %s"
|
||||
msgid "Failed to authorize device: "
|
||||
msgstr "Falló al autorizar el dispositivo: "
|
||||
|
||||
#: panels/thunderbolt/cc-bolt-device-dialog.c:327
|
||||
#| msgid "Failed to upload file: %s"
|
||||
msgid "Failed to forget device: "
|
||||
msgstr "Falló al olvidar el dispositivo: "
|
||||
|
||||
#: panels/thunderbolt/cc-bolt-device-dialog.ui:109
|
||||
#| msgid "_Name:"
|
||||
msgid "Name:"
|
||||
msgstr "Nombre:"
|
||||
|
||||
@@ -5952,23 +5933,19 @@ msgid "UUID:"
|
||||
msgstr "UUID:"
|
||||
|
||||
#: panels/thunderbolt/cc-bolt-device-dialog.ui:280
|
||||
#| msgid "Automatic _Connect"
|
||||
msgid "Authorize and Connect"
|
||||
msgstr "Autorizar y conectar"
|
||||
|
||||
#: panels/thunderbolt/cc-bolt-device-dialog.ui:303
|
||||
#| msgid "Remove Device"
|
||||
msgid "Forget Device"
|
||||
msgstr "Olvidar dispositivo"
|
||||
|
||||
#: panels/thunderbolt/cc-bolt-device-entry.c:129
|
||||
#| msgid "Mirror"
|
||||
msgctxt "Thunderbolt Device Status"
|
||||
msgid "Error"
|
||||
msgstr "Error"
|
||||
|
||||
#: panels/thunderbolt/cc-bolt-device-entry.c:140
|
||||
#| msgid "Authenticated"
|
||||
msgctxt "Thunderbolt Device Status"
|
||||
msgid "Authorized"
|
||||
msgstr "Autorizado"
|
||||
@@ -5996,7 +5973,6 @@ msgstr "El soporte de Thunderbolt se ha desactivado en la BIOS."
|
||||
|
||||
#: panels/thunderbolt/cc-bolt-panel.c:613
|
||||
#, c-format
|
||||
#| msgid "Error setting default mailer: %s"
|
||||
msgid "Error switching direct mode: %s"
|
||||
msgstr "Error al cambiar al modo directo: %s"
|
||||
|
||||
@@ -6005,7 +5981,6 @@ msgid "No Thunderbolt support"
|
||||
msgstr "Si soporte para Thunderbolt"
|
||||
|
||||
#: panels/thunderbolt/cc-bolt-panel.ui:246
|
||||
#| msgid "Universal Access"
|
||||
msgid "Direct Access"
|
||||
msgstr "Acceso directo"
|
||||
|
||||
@@ -6018,7 +5993,6 @@ msgid "Only USB and Display Port devices can attach."
|
||||
msgstr "Sólo se pueden conectar dispositivos USB y Display Port"
|
||||
|
||||
#: panels/thunderbolt/cc-bolt-panel.ui:397
|
||||
#| msgid "Getting devices..."
|
||||
msgid "Pending Devices"
|
||||
msgstr "Dispositivos pendientes"
|
||||
|
||||
@@ -6027,7 +6001,6 @@ msgid "No devices attached"
|
||||
msgstr "No hay dispositivos conectados"
|
||||
|
||||
#: panels/thunderbolt/gnome-thunderbolt-panel.desktop.in.in:3
|
||||
#| msgid "Thunderbird"
|
||||
msgid "Thunderbolt"
|
||||
msgstr "Thunderbolt"
|
||||
|
||||
@@ -6037,13 +6010,11 @@ msgstr "Gestionar dispositivos Thunderbolt"
|
||||
|
||||
#. Translators: Do NOT translate or transliterate this text (this is an icon file name)!
|
||||
#: panels/thunderbolt/gnome-thunderbolt-panel.desktop.in.in:7
|
||||
#| msgid "Thunderbird"
|
||||
msgid "thunderbolt"
|
||||
msgstr "thunderbolt"
|
||||
|
||||
#. Translators: those are keywords for the thunderbolt control-center panel. Do NOT translate or localize the semicolons! The list MUST also end with a semicolon!
|
||||
#: panels/thunderbolt/gnome-thunderbolt-panel.desktop.in.in:19
|
||||
#| msgid "Thunderbird"
|
||||
msgid "Thunderbolt;"
|
||||
msgstr "Thunderbolt;"
|
||||
|
||||
@@ -7005,29 +6976,29 @@ msgstr "Error desconocido"
|
||||
msgid "Should match the web address of your login provider."
|
||||
msgstr "Debe coincidir con la dirección web del proveedor de la cuenta."
|
||||
|
||||
#: panels/user-accounts/um-account-dialog.c:229
|
||||
#: panels/user-accounts/um-account-dialog.c:228
|
||||
msgid "Failed to add account"
|
||||
msgstr "Falló al añadir la cuenta"
|
||||
|
||||
#: panels/user-accounts/um-account-dialog.c:462
|
||||
#: panels/user-accounts/um-account-dialog.c:461
|
||||
msgid "Passwords do not match."
|
||||
msgstr "Las contraseñas no coinciden."
|
||||
|
||||
#: panels/user-accounts/um-account-dialog.c:717
|
||||
#: panels/user-accounts/um-account-dialog.c:763
|
||||
#: panels/user-accounts/um-account-dialog.c:784
|
||||
#: panels/user-accounts/um-account-dialog.c:716
|
||||
#: panels/user-accounts/um-account-dialog.c:762
|
||||
#: panels/user-accounts/um-account-dialog.c:783
|
||||
msgid "Failed to register account"
|
||||
msgstr "Falló al registrar la cuenta"
|
||||
|
||||
#: panels/user-accounts/um-account-dialog.c:907
|
||||
#: panels/user-accounts/um-account-dialog.c:906
|
||||
msgid "No supported way to authenticate with this domain"
|
||||
msgstr "No hay una manera soportada de autenticar con este dominio"
|
||||
|
||||
#: panels/user-accounts/um-account-dialog.c:980
|
||||
#: panels/user-accounts/um-account-dialog.c:979
|
||||
msgid "Failed to join domain"
|
||||
msgstr "Falló al unirse al dominio"
|
||||
|
||||
#: panels/user-accounts/um-account-dialog.c:1041
|
||||
#: panels/user-accounts/um-account-dialog.c:1040
|
||||
msgid ""
|
||||
"That login name didn’t work.\n"
|
||||
"Please try again."
|
||||
@@ -7035,7 +7006,7 @@ msgstr ""
|
||||
"El nombre de inicio de sesión no ha funcionado.\n"
|
||||
"Inténtelo de nuevo."
|
||||
|
||||
#: panels/user-accounts/um-account-dialog.c:1048
|
||||
#: panels/user-accounts/um-account-dialog.c:1047
|
||||
msgid ""
|
||||
"That login password didn’t work.\n"
|
||||
"Please try again."
|
||||
@@ -7043,11 +7014,11 @@ msgstr ""
|
||||
"La contraseña de inicio de sesión no ha funcionado.\n"
|
||||
"Inténtelo de nuevo."
|
||||
|
||||
#: panels/user-accounts/um-account-dialog.c:1056
|
||||
#: panels/user-accounts/um-account-dialog.c:1055
|
||||
msgid "Failed to log into domain"
|
||||
msgstr "Falló al iniciar sesión en el dominio"
|
||||
|
||||
#: panels/user-accounts/um-account-dialog.c:1114
|
||||
#: panels/user-accounts/um-account-dialog.c:1113
|
||||
msgid "Unable to find the domain. Maybe you misspelled it?"
|
||||
msgstr "No se pudo encontrar el dominio. ¿Está bien escrito?"
|
||||
|
||||
@@ -7232,26 +7203,25 @@ msgstr "Las contraseñas no coinciden."
|
||||
msgid "Browse for more pictures"
|
||||
msgstr "Examinar para buscar más imágenes"
|
||||
|
||||
#: panels/user-accounts/um-realm-manager.c:350
|
||||
#: panels/user-accounts/um-realm-manager.c:310
|
||||
msgid "Cannot automatically join this type of domain"
|
||||
msgstr "No se puede unir automáticamente a este tipo de dominio"
|
||||
|
||||
#: panels/user-accounts/um-realm-manager.c:413
|
||||
#, c-format
|
||||
#: panels/user-accounts/um-realm-manager.c:313
|
||||
msgid "No such domain or realm found"
|
||||
msgstr "No existe el dominio o no se ha encontrado el reino"
|
||||
|
||||
#: panels/user-accounts/um-realm-manager.c:815
|
||||
#: panels/user-accounts/um-realm-manager.c:829
|
||||
#: panels/user-accounts/um-realm-manager.c:735
|
||||
#: panels/user-accounts/um-realm-manager.c:749
|
||||
#, c-format
|
||||
msgid "Cannot log in as %s at the %s domain"
|
||||
msgstr "No se puede iniciar sesión como %s en el dominio %s"
|
||||
|
||||
#: panels/user-accounts/um-realm-manager.c:821
|
||||
#: panels/user-accounts/um-realm-manager.c:741
|
||||
msgid "Invalid password, please try again"
|
||||
msgstr "Contraseña no válida, inténtelo de nuevo"
|
||||
|
||||
#: panels/user-accounts/um-realm-manager.c:834
|
||||
#: panels/user-accounts/um-realm-manager.c:754
|
||||
#, c-format
|
||||
msgid "Couldn’t connect to the %s domain: %s"
|
||||
msgstr "No se pudo conectar al dominio %s: %s"
|
||||
@@ -7743,6 +7713,18 @@ msgstr ""
|
||||
"El identificador del último panel de Configuración que abrir. Los valores no "
|
||||
"reconocidos se ignorarán y se seleccionará el primer panel de la lista."
|
||||
|
||||
#: shell/org.gnome.ControlCenter.gschema.xml:13
|
||||
msgid "Show warning when running a development build of Settings"
|
||||
msgstr ""
|
||||
"Mostrar advertencia al ejecutar una versión de desarrollo de Configuración"
|
||||
|
||||
#: shell/org.gnome.ControlCenter.gschema.xml:14
|
||||
msgid ""
|
||||
"Whether Settings should show a warning when running a development build."
|
||||
msgstr ""
|
||||
"Indica si Configuración debe mostrar advertencia al ejecutar una versión de "
|
||||
"desarrollo de Configuración."
|
||||
|
||||
#: shell/panel-list.ui:195
|
||||
msgid "No results found"
|
||||
msgstr "No se han encontrado resultados"
|
||||
@@ -7751,6 +7733,20 @@ msgstr "No se han encontrado resultados"
|
||||
msgid "All Settings"
|
||||
msgstr "Todas las configuraciones"
|
||||
|
||||
#: shell/window.ui:235
|
||||
msgid "Warning: Development Version"
|
||||
msgstr "Advertencia: versión de desarrollo"
|
||||
|
||||
#: shell/window.ui:236
|
||||
msgid ""
|
||||
"This version of Settings should only be used for development purposes. You "
|
||||
"may experience incorrect system behavior, data loss, and other unexpected "
|
||||
"issues. "
|
||||
msgstr ""
|
||||
"Esta versión de Configuración sólo debe usarse con propósitos de desarrollo. "
|
||||
"Puede experimentar un comportamiento incorrecto del sistema, pérdida de "
|
||||
"datos y otros problemas inesperados."
|
||||
|
||||
#. translators:
|
||||
#. * The number of sound outputs on a particular device
|
||||
#: subprojects/gvc/gvc-mixer-control.c:1873
|
||||
|
||||
@@ -256,7 +256,7 @@ cc_object_storage_create_dbus_proxy_sync (GBusType bus_type,
|
||||
|
||||
if (local_error)
|
||||
{
|
||||
g_propagate_error (error, local_error);
|
||||
g_propagate_error (error, g_steal_pointer (&local_error));
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@@ -385,7 +385,7 @@ cc_object_storage_create_dbus_proxy_finish (GAsyncResult *result,
|
||||
/* If the proxy is not cached, do the normal caching routine */
|
||||
if (local_error)
|
||||
{
|
||||
g_propagate_error (error, local_error);
|
||||
g_propagate_error (error, g_steal_pointer (&local_error));
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
@@ -65,6 +65,7 @@ struct _CcWindow
|
||||
GtkWidget *search_entry;
|
||||
GtkWidget *lock_button;
|
||||
GtkWidget *current_panel_box;
|
||||
GtkWidget *development_warning_dialog;
|
||||
GtkWidget *current_panel;
|
||||
char *current_panel_id;
|
||||
GQueue *previous_panels;
|
||||
@@ -91,6 +92,47 @@ enum
|
||||
};
|
||||
|
||||
/* Auxiliary methods */
|
||||
static gboolean
|
||||
in_flatpak_sandbox (void)
|
||||
{
|
||||
return g_file_test ("/.flatpak-info", G_FILE_TEST_EXISTS);
|
||||
}
|
||||
|
||||
static void
|
||||
add_development_build_css (CcWindow *self)
|
||||
{
|
||||
g_autoptr(GtkCssProvider) provider = NULL;
|
||||
g_autoptr(GError) error = NULL;
|
||||
|
||||
/* This CSS snipped is added on development builds of GNOME Settings. It is
|
||||
* not meant to be beautiful (althout it is) and is only supposed to integrate
|
||||
* with Adwaita light (although it integrates well with dark too).
|
||||
*/
|
||||
|
||||
const gchar *development_build_css =
|
||||
"window.development-version headerbar {\n"
|
||||
" background: @theme_bg_color linear-gradient(to top,\n"
|
||||
" alpha(@theme_selected_bg_color, 0.34),\n"
|
||||
" alpha(@theme_selected_bg_color, 0.27) 2px,\n"
|
||||
" alpha(@theme_selected_bg_color, 0.20) 3px);\n"
|
||||
"}";
|
||||
|
||||
gtk_style_context_add_class (gtk_widget_get_style_context (GTK_WIDGET (self)), "development-version");
|
||||
|
||||
provider = gtk_css_provider_new ();
|
||||
gtk_css_provider_load_from_data (provider, development_build_css, -1, &error);
|
||||
|
||||
if (error)
|
||||
{
|
||||
g_error ("Failed to load CSS: %s", error->message);
|
||||
return;
|
||||
}
|
||||
|
||||
gtk_style_context_add_provider_for_screen (gtk_widget_get_screen (GTK_WIDGET (self)),
|
||||
GTK_STYLE_PROVIDER (provider),
|
||||
GTK_STYLE_PROVIDER_PRIORITY_APPLICATION);
|
||||
}
|
||||
|
||||
static gchar *
|
||||
get_symbolic_icon_name_from_g_icon (GIcon *gicon)
|
||||
{
|
||||
@@ -580,6 +622,17 @@ split_decorations_cb (GtkSettings *settings,
|
||||
gtk_header_bar_set_decoration_layout (GTK_HEADER_BAR (self->panel_headerbar), layout_end);
|
||||
}
|
||||
|
||||
static void
|
||||
on_development_warning_dialog_responded_cb (GtkWidget *dialog,
|
||||
gint response,
|
||||
CcWindow *self)
|
||||
{
|
||||
g_debug ("Disabling development build warning dialog");
|
||||
g_settings_set_boolean (self->settings, "show-development-warning", FALSE);
|
||||
|
||||
gtk_widget_hide (dialog);
|
||||
}
|
||||
|
||||
/* CcShell implementation */
|
||||
static gboolean
|
||||
cc_window_set_active_panel_from_id (CcShell *shell,
|
||||
@@ -618,6 +671,19 @@ cc_shell_iface_init (CcShellInterface *iface)
|
||||
iface->get_toplevel = cc_window_get_toplevel;
|
||||
}
|
||||
|
||||
/* GtkWidget overrides */
|
||||
static void
|
||||
cc_window_map (GtkWidget *widget)
|
||||
{
|
||||
CcWindow *self = (CcWindow *) widget;
|
||||
|
||||
GTK_WIDGET_CLASS (cc_window_parent_class)->map (widget);
|
||||
|
||||
/* Show a warning for Flatpak builds */
|
||||
if (in_flatpak_sandbox () && g_settings_get_boolean (self->settings, "show-development-warning"))
|
||||
gtk_window_present (GTK_WINDOW (self->development_warning_dialog));
|
||||
}
|
||||
|
||||
/* GObject Implementation */
|
||||
static void
|
||||
cc_window_get_property (GObject *object,
|
||||
@@ -695,10 +761,13 @@ cc_window_class_init (CcWindowClass *klass)
|
||||
object_class->dispose = cc_window_dispose;
|
||||
object_class->finalize = cc_window_finalize;
|
||||
|
||||
widget_class->map = cc_window_map;
|
||||
|
||||
g_object_class_override_property (object_class, PROP_ACTIVE_PANEL, "active-panel");
|
||||
|
||||
gtk_widget_class_set_template_from_resource (widget_class, "/org/gnome/ControlCenter/gtk/window.ui");
|
||||
|
||||
gtk_widget_class_bind_template_child (widget_class, CcWindow, development_warning_dialog);
|
||||
gtk_widget_class_bind_template_child (widget_class, CcWindow, header);
|
||||
gtk_widget_class_bind_template_child (widget_class, CcWindow, header_box);
|
||||
gtk_widget_class_bind_template_child (widget_class, CcWindow, header_sizegroup);
|
||||
@@ -714,6 +783,7 @@ cc_window_class_init (CcWindowClass *klass)
|
||||
gtk_widget_class_bind_template_child (widget_class, CcWindow, top_right_box);
|
||||
|
||||
gtk_widget_class_bind_template_callback (widget_class, gdk_window_set_cb);
|
||||
gtk_widget_class_bind_template_callback (widget_class, on_development_warning_dialog_responded_cb);
|
||||
gtk_widget_class_bind_template_callback (widget_class, panel_list_view_changed_cb);
|
||||
gtk_widget_class_bind_template_callback (widget_class, previous_button_clicked_cb);
|
||||
gtk_widget_class_bind_template_callback (widget_class, search_entry_activate_cb);
|
||||
@@ -760,6 +830,10 @@ cc_window_init (CcWindow *self)
|
||||
cc_panel_list_set_active_panel (CC_PANEL_LIST (self->panel_list), id);
|
||||
else
|
||||
cc_panel_list_activate (CC_PANEL_LIST (self->panel_list));
|
||||
|
||||
/* Add a custom CSS class on development builds */
|
||||
if (in_flatpak_sandbox ())
|
||||
add_development_build_css (self);
|
||||
}
|
||||
|
||||
CcWindow *
|
||||
|
||||
@@ -8,5 +8,12 @@
|
||||
will be ignored and the first panel in the list selected.
|
||||
</description>
|
||||
</key>
|
||||
<key name="show-development-warning" type="b">
|
||||
<default>true</default>
|
||||
<summary>Show warning when running a development build of Settings</summary>
|
||||
<description>
|
||||
Whether Settings should show a warning when running a development build.
|
||||
</description>
|
||||
</key>
|
||||
</schema>
|
||||
</schemalist>
|
||||
|
||||
@@ -224,4 +224,17 @@
|
||||
<widget name="sidebar_box"/>
|
||||
</widgets>
|
||||
</object>
|
||||
|
||||
<!-- Warning dialog for development builds -->
|
||||
<object class="GtkMessageDialog" id="development_warning_dialog">
|
||||
<property name="message-type">warning</property>
|
||||
<property name="transient-for">CcWindow</property>
|
||||
<property name="resizable">false</property>
|
||||
<property name="modal">true</property>
|
||||
<property name="buttons">ok</property>
|
||||
<property name="text" translatable="yes">Warning: Development Version</property>
|
||||
<property name="secondary-text" translatable="yes">This version of Settings should only be used for development purposes. You may experience incorrect system behavior, data loss, and other unexpected issues. </property>
|
||||
<signal name="response" handler="on_development_warning_dialog_responded_cb" object="CcWindow" swapped="no" />
|
||||
</object>
|
||||
|
||||
</interface>
|
||||
|
||||
@@ -6,6 +6,11 @@ test_units = [
|
||||
]
|
||||
|
||||
includes = [top_inc, include_directories('../../panels/datetime')]
|
||||
env = [
|
||||
'G_MESSAGES_DEBUG=all',
|
||||
'BUILDDIR=' + meson.current_build_dir(),
|
||||
'TOP_BUILDDIR=' + meson.build_root()
|
||||
]
|
||||
cflags = [
|
||||
'-DTEST_SRCDIR="@0@"'.format(meson.current_source_dir()),
|
||||
'-DSRCDIR="@0@"'.format(meson.source_root() + '/panels/datetime')
|
||||
@@ -20,7 +25,11 @@ foreach unit: test_units
|
||||
link_with : [datetime_panel_lib],
|
||||
c_args : cflags
|
||||
)
|
||||
|
||||
test(unit, exe)
|
||||
endforeach
|
||||
|
||||
test(
|
||||
'test-datetime',
|
||||
find_program('test-datetime.py'),
|
||||
env : env,
|
||||
timeout : 10
|
||||
)
|
||||
54
tests/datetime/test-datetime.py
Normal file
54
tests/datetime/test-datetime.py
Normal file
@@ -0,0 +1,54 @@
|
||||
#!/usr/bin/python3
|
||||
# Copyright © 2018 Red Hat, Inc
|
||||
# 2018 Endless Mobile, Inc
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
# Authors: Benjamin Berg <bberg@redhat.com>
|
||||
# Georges Basile Stavracas Neto <georges@endlessm.com>
|
||||
|
||||
import os
|
||||
import sys
|
||||
import unittest
|
||||
|
||||
try:
|
||||
import dbusmock
|
||||
except ImportError:
|
||||
sys.stderr.write('You need python-dbusmock (http://pypi.python.org/pypi/python-dbusmock) for this test suite.\n')
|
||||
sys.exit(1)
|
||||
|
||||
# Add the shared directory to the search path
|
||||
sys.path.append(os.path.join(os.path.dirname(__file__), '..', 'shared'))
|
||||
|
||||
from gtest import GTest
|
||||
from x11session import X11SessionTestCase
|
||||
|
||||
BUILDDIR = os.environ.get('BUILDDIR', os.path.join(os.path.dirname(__file__)))
|
||||
|
||||
|
||||
class EndianessTestCase(X11SessionTestCase, GTest):
|
||||
g_test_exe = os.path.join(BUILDDIR, 'test-endianess')
|
||||
|
||||
|
||||
class TimezoneTestCase(X11SessionTestCase, GTest):
|
||||
g_test_exe = os.path.join(BUILDDIR, 'test-timezone')
|
||||
|
||||
|
||||
class TimezoneGfxTestCase(X11SessionTestCase, GTest):
|
||||
g_test_exe = os.path.join(BUILDDIR, 'test-timezone-gfx')
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
_test = unittest.TextTestRunner(stream=sys.stdout, verbosity=2)
|
||||
unittest.main(testRunner=_test)
|
||||
@@ -1,5 +1,6 @@
|
||||
#include <config.h>
|
||||
#include <locale.h>
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
#include "cc-datetime-resources.h"
|
||||
#include "tz.h"
|
||||
@@ -7,58 +8,67 @@
|
||||
static void
|
||||
test_timezone_gfx (gconstpointer data)
|
||||
{
|
||||
const char *pixmap_dir = data;
|
||||
g_autoptr(TzDB) db = NULL;
|
||||
GPtrArray *locs;
|
||||
guint i;
|
||||
g_autoptr(TzDB) db = NULL;
|
||||
GPtrArray *locs;
|
||||
const char *pixmap_dir;
|
||||
guint i;
|
||||
|
||||
db = tz_load_db ();
|
||||
locs = tz_get_locations (db);
|
||||
for (i = 0; i < locs->len ; i++) {
|
||||
TzLocation *loc = locs->pdata[i];
|
||||
TzInfo *info;
|
||||
g_autofree gchar *filename = NULL;
|
||||
g_autofree gchar *path = NULL;
|
||||
gdouble selected_offset;
|
||||
char buf[16];
|
||||
pixmap_dir = data;
|
||||
db = tz_load_db ();
|
||||
locs = tz_get_locations (db);
|
||||
|
||||
info = tz_info_from_location (loc);
|
||||
selected_offset = tz_location_get_utc_offset (loc)
|
||||
/ (60.0*60.0) + ((info->daylight) ? -1.0 : 0.0);
|
||||
for (i = 0; i < locs->len ; i++)
|
||||
{
|
||||
g_autofree gchar *filename = NULL;
|
||||
g_autofree gchar *path = NULL;
|
||||
TzLocation *location;
|
||||
TzInfo *info;
|
||||
gdouble selected_offset;
|
||||
gchar buf[16];
|
||||
|
||||
filename = g_strdup_printf ("timezone_%s.png",
|
||||
g_ascii_formatd (buf, sizeof (buf),
|
||||
"%g", selected_offset));
|
||||
path = g_build_filename (pixmap_dir, filename, NULL);
|
||||
location = locs->pdata[i];
|
||||
info = tz_info_from_location (location);
|
||||
selected_offset = tz_location_get_utc_offset (location) / (60.0 * 60.0) + (info->daylight ? -1.0 : 0.0);
|
||||
|
||||
if (g_file_test (path, G_FILE_TEST_IS_REGULAR) == FALSE) {
|
||||
g_message ("File '%s' missing for zone '%s'", filename, loc->zone);
|
||||
g_test_fail ();
|
||||
}
|
||||
}
|
||||
filename = g_strdup_printf ("timezone_%s.png", g_ascii_formatd (buf, sizeof (buf), "%g", selected_offset));
|
||||
path = g_build_filename (pixmap_dir, filename, NULL);
|
||||
|
||||
if (!g_file_test (path, G_FILE_TEST_IS_REGULAR))
|
||||
{
|
||||
g_message ("File '%s' missing for zone '%s'", filename, location->zone);
|
||||
g_test_fail ();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
int main (int argc, char **argv)
|
||||
gint
|
||||
main (gint argc,
|
||||
gchar **argv)
|
||||
{
|
||||
char *pixmap_dir;
|
||||
gchar *pixmap_dir;
|
||||
|
||||
setlocale (LC_ALL, "");
|
||||
g_test_init (&argc, &argv, NULL);
|
||||
setlocale (LC_ALL, "");
|
||||
g_test_init (&argc, &argv, NULL);
|
||||
|
||||
g_setenv ("G_DEBUG", "fatal_warnings", FALSE);
|
||||
g_setenv ("G_DEBUG", "fatal_warnings", FALSE);
|
||||
|
||||
g_resources_register (cc_datetime_get_resource ());
|
||||
g_resources_register (cc_datetime_get_resource ());
|
||||
|
||||
if (argc == 2) {
|
||||
pixmap_dir = g_strdup (argv[1]);
|
||||
} else if (argc == 1) {
|
||||
pixmap_dir = g_strdup (SRCDIR "/data/");
|
||||
} else {
|
||||
g_message ("Usage: %s [PIXMAP DIRECTORY]", argv[0]);
|
||||
return 1;
|
||||
}
|
||||
if (argc == 2)
|
||||
{
|
||||
pixmap_dir = g_strdup (argv[1]);
|
||||
}
|
||||
else if (argc == 1)
|
||||
{
|
||||
pixmap_dir = g_strdup (SRCDIR "/data/");
|
||||
}
|
||||
else
|
||||
{
|
||||
g_message ("Usage: %s [PIXMAP DIRECTORY]", argv[0]);
|
||||
return 1;
|
||||
}
|
||||
|
||||
g_test_add_data_func ("/datetime/timezone-gfx", pixmap_dir, test_timezone_gfx);
|
||||
g_test_add_data_func ("/datetime/timezone-gfx", pixmap_dir, test_timezone_gfx);
|
||||
|
||||
return g_test_run ();
|
||||
return g_test_run ();
|
||||
}
|
||||
|
||||
@@ -3,109 +3,63 @@
|
||||
#include "cc-datetime-resources.h"
|
||||
#include "cc-timezone-map.h"
|
||||
|
||||
#define TZ_DIR "/usr/share/zoneinfo/"
|
||||
|
||||
static GList *
|
||||
get_timezone_list (GList *tzs,
|
||||
const char *top_path,
|
||||
const char *subpath)
|
||||
{
|
||||
GDir *dir;
|
||||
char *fullpath;
|
||||
const char *name;
|
||||
|
||||
if (subpath == NULL)
|
||||
fullpath = g_strdup (top_path);
|
||||
else
|
||||
fullpath = g_build_filename (top_path, subpath, NULL);
|
||||
dir = g_dir_open (fullpath, 0, NULL);
|
||||
if (dir == NULL) {
|
||||
g_warning ("Could not open %s", fullpath);
|
||||
return NULL;
|
||||
}
|
||||
while ((name = g_dir_read_name (dir)) != NULL) {
|
||||
g_autofree gchar *path = NULL;
|
||||
|
||||
if (g_str_has_suffix (name, ".tab"))
|
||||
continue;
|
||||
|
||||
if (subpath != NULL)
|
||||
path = g_build_filename (top_path, subpath, name, NULL);
|
||||
else
|
||||
path = g_build_filename (top_path, name, NULL);
|
||||
if (g_file_test (path, G_FILE_TEST_IS_DIR)) {
|
||||
if (subpath == NULL) {
|
||||
tzs = get_timezone_list (tzs, top_path, name);
|
||||
} else {
|
||||
g_autofree gchar *new_subpath = NULL;
|
||||
new_subpath = g_strdup_printf ("%s/%s", subpath, name);
|
||||
tzs = get_timezone_list (tzs, top_path, new_subpath);
|
||||
}
|
||||
} else if (g_file_test (path, G_FILE_TEST_IS_REGULAR)) {
|
||||
if (subpath == NULL)
|
||||
tzs = g_list_prepend (tzs, g_strdup (name));
|
||||
else {
|
||||
char *tz;
|
||||
tz = g_strdup_printf ("%s/%s", subpath, name);
|
||||
tzs = g_list_prepend (tzs, tz);
|
||||
}
|
||||
}
|
||||
}
|
||||
g_dir_close (dir);
|
||||
|
||||
return tzs;
|
||||
}
|
||||
|
||||
static void
|
||||
test_timezone (void)
|
||||
{
|
||||
CcTimezoneMap *map;
|
||||
TzDB *tz_db;
|
||||
GList *tzs, *l;
|
||||
GHashTable *ht;
|
||||
g_autoptr(GHashTable) ht = NULL;
|
||||
CcTimezoneMap *map;
|
||||
TzDB *tz_db;
|
||||
guint i;
|
||||
|
||||
ht = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, NULL);
|
||||
map = cc_timezone_map_new ();
|
||||
tz_db = tz_load_db ();
|
||||
tzs = get_timezone_list (NULL, TZ_DIR, NULL);
|
||||
for (l = tzs; l != NULL; l = l->next) {
|
||||
const gchar *timezone = l->data;
|
||||
g_autofree gchar *clean_tz = NULL;
|
||||
ht = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, NULL);
|
||||
map = cc_timezone_map_new ();
|
||||
tz_db = tz_load_db ();
|
||||
|
||||
clean_tz = tz_info_get_clean_name (tz_db, timezone);
|
||||
g_assert_nonnull (tz_db);
|
||||
g_assert_nonnull (tz_db->locations);
|
||||
|
||||
if (cc_timezone_map_set_timezone (map, clean_tz) == FALSE) {
|
||||
if (g_hash_table_lookup (ht, clean_tz) == NULL) {
|
||||
if (g_strcmp0 (clean_tz, timezone) == 0)
|
||||
g_print ("Failed to locate timezone '%s'\n", timezone);
|
||||
else
|
||||
g_print ("Failed to locate timezone '%s' (original name: '%s')\n", clean_tz, timezone);
|
||||
g_hash_table_insert (ht, g_strdup (clean_tz), GINT_TO_POINTER (TRUE));
|
||||
g_test_fail ();
|
||||
}
|
||||
/* We don't warn for those two, we'll just fallback
|
||||
* in the panel code */
|
||||
if (!g_str_equal (clean_tz, "posixrules") &&
|
||||
!g_str_equal (clean_tz, "Factory"))
|
||||
g_test_fail ();
|
||||
}
|
||||
}
|
||||
g_list_free_full (tzs, g_free);
|
||||
tz_db_free (tz_db);
|
||||
g_hash_table_destroy (ht);
|
||||
for (i = 0; tz_db->locations && i < tz_db->locations->len; i++)
|
||||
{
|
||||
g_autofree gchar *clean_tz = NULL;
|
||||
TzLocation *location = NULL;
|
||||
|
||||
location = g_ptr_array_index (tz_db->locations, i);
|
||||
clean_tz = tz_info_get_clean_name (tz_db, location->zone);
|
||||
|
||||
if (!cc_timezone_map_set_timezone (map, location->zone))
|
||||
{
|
||||
if (!g_hash_table_contains (ht, clean_tz))
|
||||
{
|
||||
if (g_strcmp0 (clean_tz, location->zone) == 0)
|
||||
g_printerr ("Failed to locate timezone '%s'\n", location->zone);
|
||||
else
|
||||
g_printerr ("Failed to locate timezone '%s' (original name: '%s')\n", clean_tz, location->zone);
|
||||
g_hash_table_insert (ht, g_strdup (clean_tz), GINT_TO_POINTER (TRUE));
|
||||
}
|
||||
|
||||
/* We don't warn for those, we'll just fallback
|
||||
* in the panel code */
|
||||
if (!g_str_equal (clean_tz, "posixrules") && !g_str_equal (clean_tz, "Factory"))
|
||||
g_test_fail ();
|
||||
}
|
||||
}
|
||||
|
||||
tz_db_free (tz_db);
|
||||
}
|
||||
|
||||
int main (int argc, char **argv)
|
||||
gint
|
||||
main (gint argc,
|
||||
gchar **argv)
|
||||
{
|
||||
setlocale (LC_ALL, "");
|
||||
gtk_init (NULL, NULL);
|
||||
g_test_init (&argc, &argv, NULL);
|
||||
setlocale (LC_ALL, "");
|
||||
gtk_init (NULL, NULL);
|
||||
g_test_init (&argc, &argv, NULL);
|
||||
|
||||
g_resources_register (cc_datetime_get_resource ());
|
||||
g_resources_register (cc_datetime_get_resource ());
|
||||
|
||||
g_setenv ("G_DEBUG", "fatal_warnings", FALSE);
|
||||
g_setenv ("G_DEBUG", "fatal_warnings", FALSE);
|
||||
|
||||
g_test_add_func ("/datetime/timezone", test_timezone);
|
||||
g_test_add_func ("/datetime/timezone", test_timezone);
|
||||
|
||||
return g_test_run ();
|
||||
return g_test_run ();
|
||||
}
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
subdir('common')
|
||||
subdir('datetime')
|
||||
subdir('network')
|
||||
if host_is_linux
|
||||
subdir('network')
|
||||
endif
|
||||
subdir('printers')
|
||||
subdir('info')
|
||||
|
||||
Reference in New Issue
Block a user