Compare commits
71 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ddfd4343e2 | ||
|
|
608aac8fff | ||
|
|
6f6fcb463c | ||
|
|
2145e0d8de | ||
|
|
19d95a72fa | ||
|
|
9d7d3d1781 | ||
|
|
0fbe64d6d9 | ||
|
|
ae9f9df102 | ||
|
|
8052e1bc89 | ||
|
|
55b09def37 | ||
|
|
7ac1301b26 | ||
|
|
2ca936f0e8 | ||
|
|
8a3cc50ed6 | ||
|
|
086aaacab2 | ||
|
|
210d11b974 | ||
|
|
9cafaf0606 | ||
|
|
3eba181d7b | ||
|
|
7e726c0c46 | ||
|
|
1f28814b88 | ||
|
|
00c3fad3b1 | ||
|
|
9c864bf34a | ||
|
|
28af0f16d3 | ||
|
|
4a20dcb2ed | ||
|
|
a8c1b82ed8 | ||
|
|
8ae2d124c7 | ||
|
|
f794b14bc9 | ||
|
|
51fc40a60e | ||
|
|
aad990ed17 | ||
|
|
41e2f537e6 | ||
|
|
bf0e6ccff2 | ||
|
|
7d884a6e9b | ||
|
|
fe26b96b14 | ||
|
|
afadaf363c | ||
|
|
ed5693624b | ||
|
|
cbcb717f68 | ||
|
|
3005d4abc1 | ||
|
|
ff5ab8f715 | ||
|
|
0151a0ac25 | ||
|
|
e6cc73fd1d | ||
|
|
b068891cf3 | ||
|
|
063d89abe8 | ||
|
|
8e6b89dbbd | ||
|
|
a8b62b25e0 | ||
|
|
b593dc4e64 | ||
|
|
0d0504aea1 | ||
|
|
c928bd14b8 | ||
|
|
107685efdc | ||
|
|
0bbcc3b8b3 | ||
|
|
099948e3ff | ||
|
|
c6a111c15e | ||
|
|
3b8fb9c0f3 | ||
|
|
f185cda349 | ||
|
|
af469c99b6 | ||
|
|
60e3f003bb | ||
|
|
3b9e94a03f | ||
|
|
79c2c4578b | ||
|
|
44bd8b4d9b | ||
|
|
0a64988649 | ||
|
|
c1520aac66 | ||
|
|
a23cd79762 | ||
|
|
8df3f8c9e5 | ||
|
|
d39ec251af | ||
|
|
4ed667e4e5 | ||
|
|
01a42dfea1 | ||
|
|
49f5fd9b78 | ||
|
|
d8aaec6a98 | ||
|
|
3481206fa9 | ||
|
|
da2f0e52c7 | ||
|
|
f8a05fe2dc | ||
|
|
946919c850 | ||
|
|
2d263f5ea9 |
@@ -222,7 +222,6 @@ test:
|
||||
- build
|
||||
|
||||
script:
|
||||
- dnf -y install setxkbmap
|
||||
- *environment_information
|
||||
- *run_tests
|
||||
|
||||
@@ -248,7 +247,7 @@ coverage:
|
||||
BUILD_OPTS: "-Db_coverage=true"
|
||||
coverage: '/^Lines:.\d+.\d+.(\d+\.\d+\%)/'
|
||||
only:
|
||||
- main@GNOME/gnome-control-center
|
||||
- master@GNOME/gnome-control-center
|
||||
|
||||
script:
|
||||
- *environment_information
|
||||
@@ -288,7 +287,7 @@ pages:
|
||||
paths:
|
||||
- public
|
||||
only:
|
||||
- main@GNOME/gnome-control-center
|
||||
- master@GNOME/gnome-control-center
|
||||
|
||||
except:
|
||||
variables:
|
||||
@@ -302,7 +301,7 @@ pages:
|
||||
##
|
||||
flatpak:
|
||||
stage: manual
|
||||
image: quay.io/gnome_infrastructure/gnome-runtime-images:gnome-master
|
||||
image: registry.gitlab.gnome.org/gnome/gnome-runtime-images/gnome:master
|
||||
artifacts:
|
||||
name: package
|
||||
paths:
|
||||
@@ -354,7 +353,7 @@ flatpak:
|
||||
except:
|
||||
- tags
|
||||
- gnome-3-.*
|
||||
- main@GNOME/gnome-control-center
|
||||
- master@GNOME/gnome-control-center
|
||||
|
||||
|
||||
# Runs the sanitizers [address, thread, undefined, and memory].
|
||||
|
||||
@@ -4,7 +4,7 @@ Not following the communication guidelines [1] will mean your issue or comment
|
||||
will be removed. Read it carefully before submitting this issue.
|
||||
|
||||
|
||||
[1] https://gitlab.gnome.org/GNOME/gnome-control-center/blob/main/docs/CONTRIBUTING.md#communication-guideline
|
||||
[1] https://gitlab.gnome.org/GNOME/gnome-control-center/blob/master/docs/CONTRIBUTING.md#communication-guideline
|
||||
|
||||
-->
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ Not following the communication guidelines [1] will mean your issue or comment
|
||||
will be removed. Read it carefully before submitting this issue.
|
||||
|
||||
|
||||
[1] https://gitlab.gnome.org/GNOME/gnome-control-center/blob/main/docs/CONTRIBUTING.md#communication-guideline
|
||||
[1] https://gitlab.gnome.org/GNOME/gnome-control-center/blob/master/docs/CONTRIBUTING.md#communication-guideline
|
||||
|
||||
-->
|
||||
|
||||
|
||||
132
NEWS
@@ -1,108 +1,74 @@
|
||||
================
|
||||
Version 43.1
|
||||
Version 42.4
|
||||
================
|
||||
|
||||
- Updated translations
|
||||
|
||||
Network
|
||||
- Fix crashes editing networks
|
||||
|
||||
Power
|
||||
- Don't assert if we can't find the widget for a profile
|
||||
|
||||
Printers
|
||||
- Small visual improvements
|
||||
|
||||
================
|
||||
Version 43.0
|
||||
================
|
||||
|
||||
- Updated translations
|
||||
|
||||
================
|
||||
Version 43.rc
|
||||
================
|
||||
|
||||
- Fix initial AM/PM label value
|
||||
- Remove no longer used icon
|
||||
- Select panel only if non-folded when search is canceled
|
||||
- Updated translations
|
||||
|
||||
Appearance
|
||||
- Allow backgrounds to use any image format
|
||||
|
||||
Device Security
|
||||
- Several UI improvements
|
||||
Background
|
||||
- Restore support for multiple file selection
|
||||
- Allow more image formats
|
||||
|
||||
Display
|
||||
- Fix primary monitor selection
|
||||
|
||||
Info
|
||||
- Improve dark theme support
|
||||
|
||||
Keyboard
|
||||
- Fix activation of input source toggle button
|
||||
- Improve handling of Shift shortcuts
|
||||
Network
|
||||
- Fix network profiles shown on wrong device
|
||||
- Various crash fixes
|
||||
|
||||
Power
|
||||
- Fix blank screen and power button behavior settings
|
||||
|
||||
Printers
|
||||
- Show empty state after removing last printer
|
||||
|
||||
Search
|
||||
- Fix Move Up and Move Down actions
|
||||
|
||||
Sound
|
||||
- Fix sound alert selection
|
||||
|
||||
Wacom
|
||||
- Better support Wacom Express Key Remote
|
||||
|
||||
================
|
||||
Version 43.beta
|
||||
================
|
||||
|
||||
- Updated translations
|
||||
|
||||
Cellular
|
||||
- Add WWAN 5G connection support
|
||||
|
||||
Device Security
|
||||
- Polish failure messages
|
||||
- Various style updates
|
||||
|
||||
Display
|
||||
- Support privacy screens
|
||||
|
||||
Info
|
||||
- Show build id in a separate row
|
||||
|
||||
Network
|
||||
- Fix VPN empty state
|
||||
|
||||
Sound
|
||||
- Update default sounds
|
||||
- Fix blank-screen settings not applying
|
||||
- Fix "Power Button Behavior" setting not applying
|
||||
|
||||
User Accounts
|
||||
- Fix back button not appearing sometimes
|
||||
- Disconnect fingerprint reading devices when closing dialog
|
||||
|
||||
Sharing
|
||||
- Don't set remote-desktop password entry if pw_generate fails
|
||||
- Don't assert if we can't find the widget for a profile
|
||||
|
||||
================
|
||||
Version 43.alpha
|
||||
Version 42.3
|
||||
================
|
||||
|
||||
- Improved accessibility in various panels
|
||||
- New Device Security panel
|
||||
- Updated translations
|
||||
|
||||
Date & Time
|
||||
- Update visual style of the timezone map
|
||||
|
||||
Display
|
||||
- Various visual improvements
|
||||
- Use virtual clone modes when mirroring
|
||||
|
||||
Network
|
||||
- Prevent crash by disconnecting device.
|
||||
- Fix Wi-Fi network with "&" in name not appearing.
|
||||
- Fix warning when panel closed.
|
||||
|
||||
================
|
||||
Version 42.2
|
||||
================
|
||||
|
||||
- Updated translations
|
||||
|
||||
Applications
|
||||
- Fix Snap permissions support failing to compile
|
||||
- Fix CcInfoRow having the wrong parent
|
||||
- Fix crash crash when switching between two apps
|
||||
|
||||
Background
|
||||
- Make sure the size of the light/dark previews are the same
|
||||
|
||||
Keyboard
|
||||
- Fix crash resetting all keyboard shortcuts
|
||||
|
||||
Network:
|
||||
- Stop freeze when closing wired connection properties with Escape
|
||||
|
||||
Sharing
|
||||
- Fix close button on Verify Encryption dialog
|
||||
- Turn off RDP gsettings key when turning off RDP
|
||||
|
||||
Shell
|
||||
- Initialise locale early
|
||||
|
||||
Sound
|
||||
- Remove dog barking sounds
|
||||
- Update theme correctly so other apps respond to change
|
||||
|
||||
================
|
||||
Version 42.1
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
[](https://gitlab.gnome.org/GNOME/gnome-control-center/pipelines)
|
||||
[](https://gnome.pages.gitlab.gnome.org/gnome-control-center/)
|
||||
[](https://gitlab.gnome.org/GNOME/gnome-control-center/blob/main/COPYING)
|
||||
[](https://gitlab.gnome.org/GNOME/gnome-control-center/pipelines)
|
||||
[](https://gnome.pages.gitlab.gnome.org/gnome-control-center/)
|
||||
[](https://gitlab.gnome.org/GNOME/gnome-control-center/blob/master/COPYING)
|
||||
|
||||
GNOME Settings
|
||||
====================
|
||||
@@ -60,4 +60,4 @@ Note that GNOME Settings Flatpak will only work if you are running
|
||||
the latest GNOME version in your host system.
|
||||
|
||||
|
||||
[communication-guidelines]: https://gitlab.gnome.org/GNOME/gnome-control-center/blob/main/docs/CONTRIBUTING.md#communication-guidelines
|
||||
[communication-guidelines]: https://gitlab.gnome.org/GNOME/gnome-control-center/blob/master/docs/CONTRIBUTING.md#communication-guidelines
|
||||
|
||||
1
build-aux/meson.build
Normal file
@@ -0,0 +1 @@
|
||||
meson.add_install_script('meson/meson_post_install.py', control_center_datadir)
|
||||
15
build-aux/meson/meson_post_install.py
Normal file
@@ -0,0 +1,15 @@
|
||||
#!/usr/bin/env python3
|
||||
|
||||
import os
|
||||
import subprocess
|
||||
import sys
|
||||
|
||||
gsettingsschemadir = os.path.join(sys.argv[1], 'glib-2.0', 'schemas')
|
||||
icondir = os.path.join(sys.argv[1], 'icons', 'hicolor')
|
||||
|
||||
if not os.environ.get('DESTDIR'):
|
||||
print('Compiling gsettings schemas...')
|
||||
subprocess.call(['glib-compile-schemas', gsettingsschemadir])
|
||||
|
||||
print('Update icon cache...')
|
||||
subprocess.call(['gtk-update-icon-cache', '-f', '-t', icondir])
|
||||
@@ -209,4 +209,4 @@ available at [http://contributor-covenant.org/version/1/4][version]
|
||||
|
||||
[homepage]: http://contributor-covenant.org
|
||||
[version]: http://contributor-covenant.org/version/1/4/
|
||||
[maintainers]: https://gitlab.gnome.org/GNOME/gnome-control-center/blob/main/docs/MAINTAINERS.md
|
||||
[maintainers]: https://gitlab.gnome.org/GNOME/gnome-control-center/blob/master/docs/MAINTAINERS.md
|
||||
|
||||
@@ -50,7 +50,7 @@ by being explicit. Suggested acceptance phrase:
|
||||
Urgency commits should never happen, but in case they're needed, they are defined by the following
|
||||
criteria:
|
||||
|
||||
* On stable branches (or `main` right after a stable release)
|
||||
* On stable branches (or master right after a stable release)
|
||||
* Symptoms:
|
||||
* Always OR often reproducible; AND
|
||||
* Crash; OR
|
||||
@@ -59,4 +59,4 @@ criteria:
|
||||
* Quickly followed by an emergency release (at most 2 days after the commit)
|
||||
|
||||
|
||||
[doap]: https://gitlab.gnome.org/GNOME/gnome-control-center/blob/main/gnome-control-center.doap
|
||||
[doap]: https://gitlab.gnome.org/GNOME/gnome-control-center/blob/master/gnome-control-center.doap
|
||||
|
||||
25
meson.build
@@ -1,8 +1,8 @@
|
||||
project(
|
||||
'gnome-control-center', 'c',
|
||||
version : '43.1',
|
||||
version : '42.4',
|
||||
license : 'GPL2+',
|
||||
meson_version : '>= 0.57.0'
|
||||
meson_version : '>= 0.53.0'
|
||||
)
|
||||
|
||||
control_center_prefix = get_option('prefix')
|
||||
@@ -50,17 +50,6 @@ foreach define: set_defines
|
||||
config_h.set_quoted(define[0], define[1])
|
||||
endforeach
|
||||
|
||||
distributor_logo = get_option('distributor_logo')
|
||||
if (distributor_logo != '')
|
||||
config_h.set_quoted('DISTRIBUTOR_LOGO', distributor_logo,
|
||||
description: 'Define to absolute path of distributor logo')
|
||||
dark_mode_distributor_logo = get_option('dark_mode_distributor_logo')
|
||||
if (dark_mode_distributor_logo != '')
|
||||
config_h.set_quoted('DARK_MODE_DISTRIBUTOR_LOGO', dark_mode_distributor_logo,
|
||||
description: 'Define to absolute path of distributor logo for use in dark mode')
|
||||
endif
|
||||
endif
|
||||
|
||||
# meson does not support octal values, so it must be handled as a
|
||||
# string. See: https://github.com/mesonbuild/meson/issues/2047
|
||||
config_h.set('USER_DIR_MODE', '0700',
|
||||
@@ -115,7 +104,7 @@ pulse_req_version = '>= 2.0'
|
||||
|
||||
libadwaita_dep = dependency(
|
||||
'libadwaita-1',
|
||||
version: '>= 1.2.alpha',
|
||||
version: '>= 1.1',
|
||||
fallback: ['libadwaita', 'libadwaita_dep'],
|
||||
default_options: ['examples=false', 'introspection=disabled', 'tests=false', 'vapi=false'],
|
||||
)
|
||||
@@ -124,7 +113,7 @@ accounts_dep = dependency('accountsservice', version: '>= 0.6.39')
|
||||
colord_dep = dependency('colord', version: '>= 0.1.34')
|
||||
gdk_pixbuf_dep = dependency('gdk-pixbuf-2.0', version: '>= 2.23.0')
|
||||
gio_dep = dependency('gio-2.0')
|
||||
glib_dep = dependency('glib-2.0', version: '>= 2.70.0')
|
||||
glib_dep = dependency('glib-2.0', version: '>= 2.68.0')
|
||||
gnome_desktop_dep = dependency('gnome-desktop-4')
|
||||
gnome_bg_dep = dependency('gnome-bg-4')
|
||||
gnome_rr_dep = dependency('gnome-rr-4')
|
||||
@@ -281,6 +270,7 @@ install_subdir(
|
||||
top_inc = include_directories('.')
|
||||
shell_inc = include_directories('shell')
|
||||
|
||||
subdir('build-aux')
|
||||
subdir('data/icons')
|
||||
subdir('po')
|
||||
subdir('panels')
|
||||
@@ -295,11 +285,6 @@ if get_option('documentation')
|
||||
subdir('man')
|
||||
endif
|
||||
|
||||
gnome.post_install(
|
||||
glib_compile_schemas: true,
|
||||
gtk_update_icon_cache: true,
|
||||
)
|
||||
|
||||
configure_file(
|
||||
output: 'config.h',
|
||||
configuration: config_h
|
||||
|
||||
@@ -7,5 +7,3 @@ option('tracing', type: 'boolean', value: false, description: 'add extra debuggi
|
||||
option('wayland', type: 'boolean', value: true, description: 'build with Wayland support')
|
||||
option('profile', type: 'combo', choices: ['default','development'], value: 'default')
|
||||
option('malcontent', type: 'boolean', value: false, description: 'build with malcontent support')
|
||||
option('distributor_logo', type: 'string', description: 'absolute path to distributor logo for the About panel')
|
||||
option('dark_mode_distributor_logo', type: 'string', description: 'absolute path to distributor logo dark mode variant')
|
||||
|
||||
@@ -96,7 +96,6 @@ struct _CcApplicationsPanel
|
||||
CcToggleRow *notification;
|
||||
CcToggleRow *background;
|
||||
CcToggleRow *wallpaper;
|
||||
CcToggleRow *screenshot;
|
||||
CcToggleRow *sound;
|
||||
CcInfoRow *no_sound;
|
||||
CcToggleRow *search;
|
||||
@@ -516,37 +515,6 @@ wallpaper_cb (CcApplicationsPanel *self)
|
||||
set_wallpaper_allowed (self, cc_toggle_row_get_allowed (self->wallpaper));
|
||||
}
|
||||
|
||||
/* --- screenshot --- */
|
||||
|
||||
static void
|
||||
get_screenshot_allowed (CcApplicationsPanel *self,
|
||||
const gchar *app_id,
|
||||
gboolean *set,
|
||||
gboolean *allowed)
|
||||
{
|
||||
g_auto(GStrv) perms = get_portal_permissions (self, "screenshot", "screenshot", app_id);
|
||||
|
||||
*set = perms != NULL;
|
||||
*allowed = perms == NULL || strcmp (perms[0], "no") != 0;
|
||||
}
|
||||
|
||||
static void
|
||||
set_screenshot_allowed (CcApplicationsPanel *self,
|
||||
gboolean allowed)
|
||||
{
|
||||
const gchar *perms[2] = { NULL, NULL };
|
||||
|
||||
perms[0] = allowed ? "yes" : "no";
|
||||
set_portal_permissions (self, "screenshot", "screenshot", self->current_app_id, perms);
|
||||
}
|
||||
|
||||
static void
|
||||
screenshot_cb (CcApplicationsPanel *self)
|
||||
{
|
||||
if (self->current_app_id)
|
||||
set_screenshot_allowed (self, cc_toggle_row_get_allowed (self->screenshot));
|
||||
}
|
||||
|
||||
/* --- shortcuts permissions (flatpak) --- */
|
||||
|
||||
static void
|
||||
@@ -576,7 +544,7 @@ set_shortcuts_allowed (CcApplicationsPanel *self,
|
||||
|
||||
/* "GRANTED" and "DENIED" here match the values set by the "inhibit shortcut
|
||||
* dialog" is GNOME Shell:
|
||||
* https://gitlab.gnome.org/GNOME/gnome-shell/-/blob/main/js/ui/inhibitShortcutsDialog.js
|
||||
* https://gitlab.gnome.org/GNOME/gnome-shell/-/blob/master/js/ui/inhibitShortcutsDialog.js
|
||||
*/
|
||||
perms[0] = granted ? "GRANTED" : "DENIED";
|
||||
perms[1] = NULL;
|
||||
@@ -926,11 +894,6 @@ update_integration_section (CcApplicationsPanel *self,
|
||||
gtk_widget_set_visible (GTK_WIDGET (self->wallpaper), set);
|
||||
has_any |= set;
|
||||
|
||||
get_screenshot_allowed (self, portal_app_id, &set, &allowed);
|
||||
cc_toggle_row_set_allowed (self->screenshot, allowed);
|
||||
gtk_widget_set_visible (GTK_WIDGET (self->screenshot), set);
|
||||
has_any |= set;
|
||||
|
||||
disabled = g_settings_get_boolean (self->privacy_settings, "disable-sound-output");
|
||||
get_device_allowed (self, "speakers", portal_app_id, &set, &allowed);
|
||||
cc_toggle_row_set_allowed (self->sound, allowed);
|
||||
@@ -972,7 +935,6 @@ update_integration_section (CcApplicationsPanel *self,
|
||||
|
||||
gtk_widget_hide (GTK_WIDGET (self->background));
|
||||
gtk_widget_hide (GTK_WIDGET (self->wallpaper));
|
||||
gtk_widget_hide (GTK_WIDGET (self->screenshot));
|
||||
gtk_widget_hide (GTK_WIDGET (self->sound));
|
||||
gtk_widget_hide (GTK_WIDGET (self->no_sound));
|
||||
gtk_widget_hide (GTK_WIDGET (self->camera));
|
||||
@@ -1248,7 +1210,7 @@ update_total_size (CcApplicationsPanel *self)
|
||||
g_object_set (self->total, "info", formatted_size, NULL);
|
||||
|
||||
/* Translators: '%s' is the formatted size, e.g. "26.2 MB" */
|
||||
subtitle = g_strdup_printf (_("%s of disk space used."), formatted_size);
|
||||
subtitle = g_strdup_printf (_("%s of disk space used"), formatted_size);
|
||||
g_object_set (self->storage, "subtitle", subtitle, NULL);
|
||||
}
|
||||
|
||||
@@ -1782,7 +1744,6 @@ cc_applications_panel_class_init (CcApplicationsPanelClass *klass)
|
||||
gtk_widget_class_bind_template_child (widget_class, CcApplicationsPanel, notification);
|
||||
gtk_widget_class_bind_template_child (widget_class, CcApplicationsPanel, background);
|
||||
gtk_widget_class_bind_template_child (widget_class, CcApplicationsPanel, wallpaper);
|
||||
gtk_widget_class_bind_template_child (widget_class, CcApplicationsPanel, screenshot);
|
||||
gtk_widget_class_bind_template_child (widget_class, CcApplicationsPanel, shortcuts);
|
||||
gtk_widget_class_bind_template_child (widget_class, CcApplicationsPanel, sidebar_box);
|
||||
gtk_widget_class_bind_template_child (widget_class, CcApplicationsPanel, sidebar_listbox);
|
||||
@@ -1804,7 +1765,6 @@ cc_applications_panel_class_init (CcApplicationsPanelClass *klass)
|
||||
gtk_widget_class_bind_template_callback (widget_class, notification_cb);
|
||||
gtk_widget_class_bind_template_callback (widget_class, background_cb);
|
||||
gtk_widget_class_bind_template_callback (widget_class, wallpaper_cb);
|
||||
gtk_widget_class_bind_template_callback (widget_class, screenshot_cb);
|
||||
gtk_widget_class_bind_template_callback (widget_class, shortcuts_cb);
|
||||
gtk_widget_class_bind_template_callback (widget_class, privacy_link_cb);
|
||||
gtk_widget_class_bind_template_callback (widget_class, sound_cb);
|
||||
|
||||
@@ -130,18 +130,11 @@
|
||||
</child>
|
||||
<child>
|
||||
<object class="CcToggleRow" id="background">
|
||||
<property name="title" translatable="yes">Run in Background</property>
|
||||
<property name="title" translatable="yes">Run in background</property>
|
||||
<property name="subtitle" translatable="yes">Allow activity when the app is closed.</property>
|
||||
<signal name="notify::allowed" handler="background_cb" swapped="yes"/>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="CcToggleRow" id="screenshot">
|
||||
<property name="title" translatable="yes">Screenshots</property>
|
||||
<property name="subtitle" translatable="yes">Take pictures of the screen at any time.</property>
|
||||
<signal name="notify::allowed" handler="screenshot_cb" object="CcApplicationsPanel" swapped="yes"/>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="CcToggleRow" id="wallpaper">
|
||||
<property name="title" translatable="yes">Change Wallpaper</property>
|
||||
|
||||
@@ -11,6 +11,6 @@ NoDisplay=true
|
||||
StartupNotify=true
|
||||
Categories=GNOME;GTK;Settings;DesktopSettings;X-GNOME-Settings-Panel;X-GNOME-AccountSettings;
|
||||
OnlyShowIn=GNOME;Unity;
|
||||
# Translators: Search terms to find the Applications panel. Do NOT translate or localize the semicolons! The list MUST also end with a semicolon!
|
||||
# Translators: Search terms to find the Privacy panel. Do NOT translate or localize the semicolons! The list MUST also end with a semicolon!
|
||||
Keywords=application;flatpak;permission;setting;
|
||||
X-GNOME-ControlCenter-HasSidebar=true
|
||||
|
||||
@@ -35,32 +35,6 @@ struct _BgWallpapersSource
|
||||
|
||||
G_DEFINE_TYPE (BgWallpapersSource, bg_wallpapers_source, BG_TYPE_SOURCE)
|
||||
|
||||
static int
|
||||
sort_func (gconstpointer a,
|
||||
gconstpointer b,
|
||||
gpointer user_data)
|
||||
{
|
||||
CcBackgroundItem *item_a;
|
||||
CcBackgroundItem *item_b;
|
||||
const char *name_a;
|
||||
const char *name_b;
|
||||
|
||||
item_a = (CcBackgroundItem *) a;
|
||||
item_b = (CcBackgroundItem *) b;
|
||||
|
||||
name_a = cc_background_item_get_name (item_a);
|
||||
name_b = cc_background_item_get_name (item_b);
|
||||
|
||||
if (name_a && strcmp (name_a, "Default Background") == 0)
|
||||
return -1;
|
||||
if (name_b && strcmp (name_b, "Default Background") == 0)
|
||||
return 1;
|
||||
|
||||
|
||||
return strcmp (cc_background_item_get_name (item_a),
|
||||
cc_background_item_get_name (item_b));
|
||||
}
|
||||
|
||||
static void
|
||||
load_wallpapers (gchar *key,
|
||||
CcBackgroundItem *item,
|
||||
@@ -74,7 +48,7 @@ load_wallpapers (gchar *key,
|
||||
if (deleted)
|
||||
return;
|
||||
|
||||
g_list_store_insert_sorted (store, item, sort_func, NULL);
|
||||
g_list_store_append (store, item);
|
||||
}
|
||||
|
||||
static void
|
||||
|
||||
@@ -157,11 +157,6 @@ create_widget_func (gpointer model_item,
|
||||
gtk_overlay_add_overlay (GTK_OVERLAY (overlay), check);
|
||||
if (button)
|
||||
gtk_overlay_add_overlay (GTK_OVERLAY (overlay), button);
|
||||
gtk_accessible_update_property (GTK_ACCESSIBLE (overlay),
|
||||
GTK_ACCESSIBLE_PROPERTY_LABEL,
|
||||
cc_background_item_get_name (item),
|
||||
-1);
|
||||
|
||||
|
||||
child = gtk_flow_box_child_new ();
|
||||
gtk_widget_set_halign (child, GTK_ALIGN_CENTER);
|
||||
|
||||
@@ -63,9 +63,9 @@ struct _CcBackgroundPanel
|
||||
CcBackgroundItem *current_background;
|
||||
|
||||
CcBackgroundChooser *background_chooser;
|
||||
CcBackgroundPreview *default_preview;
|
||||
CcBackgroundPreview *light_preview;
|
||||
CcBackgroundPreview *dark_preview;
|
||||
GtkToggleButton *default_toggle;
|
||||
GtkToggleButton *light_toggle;
|
||||
GtkToggleButton *dark_toggle;
|
||||
};
|
||||
|
||||
@@ -84,7 +84,7 @@ load_custom_css (CcBackgroundPanel *self)
|
||||
}
|
||||
|
||||
static void
|
||||
reload_color_scheme_toggles (CcBackgroundPanel *self)
|
||||
reload_light_dark_toggles (CcBackgroundPanel *self)
|
||||
{
|
||||
GDesktopColorScheme scheme;
|
||||
|
||||
@@ -92,7 +92,7 @@ reload_color_scheme_toggles (CcBackgroundPanel *self)
|
||||
|
||||
if (scheme == G_DESKTOP_COLOR_SCHEME_DEFAULT)
|
||||
{
|
||||
gtk_toggle_button_set_active (self->default_toggle, TRUE);
|
||||
gtk_toggle_button_set_active (self->light_toggle, TRUE);
|
||||
}
|
||||
else if (scheme == G_DESKTOP_COLOR_SCHEME_PREFER_DARK)
|
||||
{
|
||||
@@ -100,7 +100,7 @@ reload_color_scheme_toggles (CcBackgroundPanel *self)
|
||||
}
|
||||
else
|
||||
{
|
||||
gtk_toggle_button_set_active (self->default_toggle, FALSE);
|
||||
gtk_toggle_button_set_active (self->light_toggle, FALSE);
|
||||
gtk_toggle_button_set_active (self->dark_toggle, FALSE);
|
||||
}
|
||||
}
|
||||
@@ -149,9 +149,9 @@ set_color_scheme (CcBackgroundPanel *self,
|
||||
/* Color schemes */
|
||||
|
||||
static void
|
||||
on_color_scheme_toggle_active_cb (CcBackgroundPanel *self)
|
||||
on_light_dark_toggle_active_cb (CcBackgroundPanel *self)
|
||||
{
|
||||
if (gtk_toggle_button_get_active (self->default_toggle))
|
||||
if (gtk_toggle_button_get_active (self->light_toggle))
|
||||
set_color_scheme (self, G_DESKTOP_COLOR_SCHEME_DEFAULT);
|
||||
else if (gtk_toggle_button_get_active (self->dark_toggle))
|
||||
set_color_scheme (self, G_DESKTOP_COLOR_SCHEME_PREFER_DARK);
|
||||
@@ -182,7 +182,7 @@ update_preview (CcBackgroundPanel *panel)
|
||||
CcBackgroundItem *current_background;
|
||||
|
||||
current_background = panel->current_background;
|
||||
cc_background_preview_set_item (panel->default_preview, current_background);
|
||||
cc_background_preview_set_item (panel->light_preview, current_background);
|
||||
cc_background_preview_set_item (panel->dark_preview, current_background);
|
||||
}
|
||||
|
||||
@@ -389,12 +389,12 @@ cc_background_panel_class_init (CcBackgroundPanelClass *klass)
|
||||
gtk_widget_class_set_template_from_resource (widget_class, "/org/gnome/control-center/background/cc-background-panel.ui");
|
||||
|
||||
gtk_widget_class_bind_template_child (widget_class, CcBackgroundPanel, background_chooser);
|
||||
gtk_widget_class_bind_template_child (widget_class, CcBackgroundPanel, default_preview);
|
||||
gtk_widget_class_bind_template_child (widget_class, CcBackgroundPanel, light_preview);
|
||||
gtk_widget_class_bind_template_child (widget_class, CcBackgroundPanel, dark_preview);
|
||||
gtk_widget_class_bind_template_child (widget_class, CcBackgroundPanel, default_toggle);
|
||||
gtk_widget_class_bind_template_child (widget_class, CcBackgroundPanel, light_toggle);
|
||||
gtk_widget_class_bind_template_child (widget_class, CcBackgroundPanel, dark_toggle);
|
||||
|
||||
gtk_widget_class_bind_template_callback (widget_class, on_color_scheme_toggle_active_cb);
|
||||
gtk_widget_class_bind_template_callback (widget_class, on_light_dark_toggle_active_cb);
|
||||
gtk_widget_class_bind_template_callback (widget_class, on_chooser_background_chosen_cb);
|
||||
gtk_widget_class_bind_template_callback (widget_class, on_add_picture_button_clicked_cb);
|
||||
}
|
||||
@@ -433,11 +433,11 @@ cc_background_panel_init (CcBackgroundPanel *panel)
|
||||
g_signal_connect_object (panel->settings, "changed", G_CALLBACK (on_settings_changed), panel, G_CONNECT_SWAPPED);
|
||||
|
||||
/* Interface settings */
|
||||
reload_color_scheme_toggles (panel);
|
||||
reload_light_dark_toggles (panel);
|
||||
|
||||
g_signal_connect_object (panel->interface_settings,
|
||||
"changed::" INTERFACE_COLOR_SCHEME_KEY,
|
||||
G_CALLBACK (reload_color_scheme_toggles),
|
||||
G_CALLBACK (reload_light_dark_toggles),
|
||||
panel,
|
||||
G_CONNECT_SWAPPED);
|
||||
|
||||
|
||||
@@ -27,13 +27,10 @@
|
||||
<property name="margin-bottom">12</property>
|
||||
<property name="hexpand">True</property>
|
||||
<child>
|
||||
<object class="GtkToggleButton" id="default_toggle">
|
||||
<accessibility>
|
||||
<relation name="labelled-by">default_label</relation>
|
||||
</accessibility>
|
||||
<signal name="notify::active" handler="on_color_scheme_toggle_active_cb" swapped="true"/>
|
||||
<object class="GtkToggleButton" id="light_toggle">
|
||||
<signal name="notify::active" handler="on_light_dark_toggle_active_cb" swapped="true"/>
|
||||
<child>
|
||||
<object class="CcBackgroundPreview" id="default_preview"/>
|
||||
<object class="CcBackgroundPreview" id="light_preview"/>
|
||||
</child>
|
||||
<style>
|
||||
<class name="background-preview-button"/>
|
||||
@@ -45,8 +42,8 @@
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel" id="default_label">
|
||||
<property name="label" translatable="yes">Default</property>
|
||||
<object class="GtkLabel">
|
||||
<property name="label" translatable="yes">Light</property>
|
||||
<layout>
|
||||
<property name="column">0</property>
|
||||
<property name="row">1</property>
|
||||
@@ -55,11 +52,8 @@
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkToggleButton" id="dark_toggle">
|
||||
<property name="group">default_toggle</property>
|
||||
<accessibility>
|
||||
<relation name="labelled-by">dark_label</relation>
|
||||
</accessibility>
|
||||
<signal name="notify::active" handler="on_color_scheme_toggle_active_cb" swapped="true"/>
|
||||
<property name="group">light_toggle</property>
|
||||
<signal name="notify::active" handler="on_light_dark_toggle_active_cb" swapped="true"/>
|
||||
<child>
|
||||
<object class="CcBackgroundPreview" id="dark_preview">
|
||||
<property name="is-dark">True</property>
|
||||
@@ -75,7 +69,7 @@
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel" id="dark_label">
|
||||
<object class="GtkLabel">
|
||||
<property name="label" translatable="yes">Dark</property>
|
||||
<layout>
|
||||
<property name="column">1</property>
|
||||
|
||||
@@ -11,4 +11,4 @@ StartupNotify=true
|
||||
Categories=GNOME;GTK;Settings;DesktopSettings;X-GNOME-Settings-Panel;X-GNOME-PersonalizationSettings;
|
||||
OnlyShowIn=GNOME;
|
||||
# Translators: Search terms to find the Appearance panel. Do NOT translate or localize the semicolons! The list MUST also end with a semicolon!
|
||||
Keywords=Background;Wallpaper;Screen;Desktop;Style;Light;Dark;Appearance;
|
||||
Keywords=Background;Wallpaper;Screen;Desktop;Style;Light;Dark;
|
||||
|
||||
@@ -12,6 +12,7 @@ background-preview .window {
|
||||
|
||||
background-preview .window .header-bar {
|
||||
min-height: 15px;
|
||||
box-shadow: inset 0 -1px @borders;
|
||||
}
|
||||
|
||||
background-preview .window.light {
|
||||
@@ -19,10 +20,6 @@ background-preview .window.light {
|
||||
color: alpha(black, .8);
|
||||
}
|
||||
|
||||
background-preview .window.light .header-bar {
|
||||
box-shadow: inset 0 -1px alpha(black, .07);
|
||||
}
|
||||
|
||||
background-preview .window.front.light .header-bar {
|
||||
background-color: #ebebeb;
|
||||
}
|
||||
@@ -32,10 +29,6 @@ background-preview .window.dark {
|
||||
color: white;
|
||||
}
|
||||
|
||||
background-preview .window.dark .header-bar {
|
||||
box-shadow: inset 0 -1px alpha(black, .36);
|
||||
}
|
||||
|
||||
background-preview .window.front.dark .header-bar {
|
||||
background-color: #303030;
|
||||
}
|
||||
|
||||
@@ -117,8 +117,8 @@ class GccDBusTestCase(DBusTestCase):
|
||||
adapter.UpdateProperties('org.bluez.Adapter1',
|
||||
{'Powered': dbus.Boolean(self.hci0_powered, variant_level=1)})
|
||||
self.devices = []
|
||||
self.add_device('hci0', '22:33:44:55:66:77', "Bastienʼs mouse", True, 0x580, 'input-mouse')
|
||||
self.add_device('hci0', '22:33:44:55:66:78', 'Bloutouf keyboard & keys', True, 0x540, 'input-keyboard')
|
||||
self.add_device('hci0', '22:33:44:55:66:77', "Bastien's mouse", True, 0x580, 'input-mouse')
|
||||
self.add_device('hci0', '22:33:44:55:66:78', 'Bloutouf keyboard', True, 0x540, 'input-keyboard')
|
||||
self.add_device('hci0', '60:8B:0E:55:66:79', 'iPhoone 19S', True, 0x20C, 'phone')
|
||||
# Uncategorised audio device
|
||||
self.add_device('hci0', '22:33:44:55:66:79', 'MEGA Speakers', True, 0x200400, 'audio-card')
|
||||
|
||||
@@ -7,9 +7,6 @@
|
||||
<child>
|
||||
<object class="GtkSwitch" id="enable_switch">
|
||||
<property name="valign">center</property>
|
||||
<accessibility>
|
||||
<property name="label" translatable="yes">Enable</property>
|
||||
</accessibility>
|
||||
<signal name="state-set" handler="enable_switch_state_set_cb" object="CcBluetoothPanel" swapped="yes"/>
|
||||
</object>
|
||||
</child>
|
||||
|
||||
@@ -4,9 +4,6 @@
|
||||
|
||||
<child type="titlebar-end">
|
||||
<object class="GtkSwitch" id="main_switch">
|
||||
<accessibility>
|
||||
<property name="label" translatable="yes">Enable</property>
|
||||
</accessibility>
|
||||
<property name="valign">center</property>
|
||||
</object>
|
||||
</child>
|
||||
|
||||
@@ -15,5 +15,5 @@ X-GNOME-Bugzilla-Bugzilla=GNOME
|
||||
X-GNOME-Bugzilla-Product=gnome-control-center
|
||||
X-GNOME-Bugzilla-Component=privacy
|
||||
X-GNOME-Bugzilla-Version=@VERSION@
|
||||
# Translators: Search terms to find the Camera panel. Do NOT translate or localize the semicolons! The list MUST also end with a semicolon!
|
||||
Keywords=camera;photos;video;webcam;lock;private;privacy;
|
||||
# Translators: Search terms to find the Privacy panel. Do NOT translate or localize the semicolons! The list MUST also end with a semicolon!
|
||||
Keywords=screen;lock;diagnostics;crash;private;recent;temporary;tmp;index;name;network;identity;
|
||||
|
||||
@@ -603,6 +603,96 @@ cc_color_calibrate_cancel (CcColorCalibrate *calibrate)
|
||||
g_main_loop_quit (calibrate->loop);
|
||||
}
|
||||
|
||||
static gboolean
|
||||
cc_color_calibrate_move_and_resize_window (GtkWindow *window,
|
||||
CdDevice *device,
|
||||
GError **error)
|
||||
{
|
||||
g_autoptr(GListModel) monitors = NULL;
|
||||
g_autoptr(GdkMonitor) monitor = NULL;
|
||||
const gchar *xrandr_name;
|
||||
gboolean ret = TRUE;
|
||||
GdkRectangle rect;
|
||||
GdkDisplay *display;
|
||||
gint i;
|
||||
gint monitor_num = -1;
|
||||
gint num_monitors;
|
||||
|
||||
/* find the monitor num of the device output */
|
||||
display = gdk_display_get_default ();
|
||||
monitors = gdk_display_get_monitors (display);
|
||||
num_monitors = g_list_model_get_n_items (monitors);
|
||||
xrandr_name = cd_device_get_metadata_item (device, CD_DEVICE_METADATA_XRANDR_NAME);
|
||||
for (i = 0; i < num_monitors; i++)
|
||||
{
|
||||
g_autoptr(GdkMonitor) m = NULL;
|
||||
const gchar *plug_name;
|
||||
|
||||
m = g_list_model_get_item (monitors, i);
|
||||
plug_name = gdk_monitor_get_model (m);
|
||||
|
||||
if (g_strcmp0 (plug_name, xrandr_name) == 0)
|
||||
monitor_num = i;
|
||||
}
|
||||
if (monitor_num == -1)
|
||||
{
|
||||
ret = FALSE;
|
||||
g_set_error (error,
|
||||
CD_SESSION_ERROR,
|
||||
CD_SESSION_ERROR_INTERNAL,
|
||||
"failed to find output %s",
|
||||
xrandr_name);
|
||||
goto out;
|
||||
}
|
||||
|
||||
/* move the window, and set it to the right size */
|
||||
monitor = g_list_model_get_item (monitors, monitor_num);
|
||||
gdk_monitor_get_geometry (monitor, &rect);
|
||||
g_debug ("Setting window to %ix%i with size %ix%i",
|
||||
rect.x, rect.y, rect.width, rect.height);
|
||||
out:
|
||||
return ret;
|
||||
}
|
||||
#if 0
|
||||
static void
|
||||
cc_color_calibrate_window_realize_cb (CcColorCalibrate *self)
|
||||
{
|
||||
GtkWidget *widget;
|
||||
|
||||
widget = GTK_WIDGET (gtk_builder_get_object (self->builder,
|
||||
"dialog_calibrate"));
|
||||
gtk_window_fullscreen (GTK_WINDOW (widget));
|
||||
gtk_window_maximize (GTK_WINDOW (widget));
|
||||
}
|
||||
|
||||
static gboolean
|
||||
cc_color_calibrate_window_state_cb (CcColorCalibrate *calibrate,
|
||||
GdkEvent *event)
|
||||
{
|
||||
gboolean ret;
|
||||
g_autoptr(GError) error = NULL;
|
||||
GdkEventWindowState *event_state = (GdkEventWindowState *) event;
|
||||
GtkWindow *window;
|
||||
|
||||
window = GTK_WINDOW (gtk_builder_get_object (calibrate->builder,
|
||||
"dialog_calibrate"));
|
||||
|
||||
/* check event */
|
||||
if (event->type != GDK_WINDOW_STATE)
|
||||
return TRUE;
|
||||
if (event_state->changed_mask != GDK_WINDOW_STATE_FULLSCREEN)
|
||||
return TRUE;
|
||||
|
||||
/* resize to the correct screen */
|
||||
ret = cc_color_calibrate_move_and_resize_window (window,
|
||||
calibrate->device,
|
||||
&error);
|
||||
if (!ret)
|
||||
g_warning ("Failed to resize window: %s", error->message);
|
||||
return TRUE;
|
||||
}
|
||||
#endif
|
||||
|
||||
static void
|
||||
cc_color_calibrate_button_done_cb (CcColorCalibrate *calibrate)
|
||||
{
|
||||
@@ -899,6 +989,14 @@ cc_color_calibrate_start (CcColorCalibrate *calibrate,
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
cc_color_calibrate_delete_event_cb (CcColorCalibrate *calibrate)
|
||||
{
|
||||
/* do not destroy the window */
|
||||
cc_color_calibrate_cancel (calibrate);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static void
|
||||
cc_color_calibrate_finalize (GObject *object)
|
||||
{
|
||||
@@ -981,6 +1079,19 @@ cc_color_calibrate_init (CcColorCalibrate *calibrate)
|
||||
/* setup the specialist calibration window */
|
||||
window = GTK_WINDOW (gtk_builder_get_object (calibrate->builder,
|
||||
"dialog_calibrate"));
|
||||
/*
|
||||
g_signal_connect_object (window, "draw",
|
||||
G_CALLBACK (cc_color_calibrate_alpha_window_draw), calibrate, G_CONNECT_SWAPPED);
|
||||
g_signal_connect_object (window, "realize",
|
||||
G_CALLBACK (cc_color_calibrate_window_realize_cb), calibrate, G_CONNECT_SWAPPED);
|
||||
g_signal_connect_object (window, "window-state-event",
|
||||
G_CALLBACK (cc_color_calibrate_window_state_cb), calibrate, G_CONNECT_SWAPPED);
|
||||
g_signal_connect_object (window, "delete-event",
|
||||
G_CALLBACK (cc_color_calibrate_delete_event_cb), calibrate, G_CONNECT_SWAPPED);
|
||||
cc_color_calibrate_alpha_screen_changed_cb (calibrate);
|
||||
g_signal_connect_object (window, "screen-changed",
|
||||
G_CALLBACK (cc_color_calibrate_alpha_screen_changed_cb), calibrate, G_CONNECT_SWAPPED);
|
||||
*/
|
||||
calibrate->window = window;
|
||||
}
|
||||
|
||||
|
||||
@@ -112,17 +112,9 @@ cc_language_row_new (const gchar *locale_id)
|
||||
self->language_local = get_language_label (language_code, modifier, NULL);
|
||||
gtk_label_set_label (self->language_label, self->language);
|
||||
|
||||
if (country_code == NULL)
|
||||
{
|
||||
self->country = NULL;
|
||||
self->country_local = NULL;
|
||||
}
|
||||
else
|
||||
{
|
||||
self->country = gnome_get_country_from_code (country_code, locale_id);
|
||||
self->country_local = gnome_get_country_from_code (country_code, NULL);
|
||||
gtk_label_set_label (self->country_label, self->country);
|
||||
}
|
||||
self->country = gnome_get_country_from_code (country_code, locale_id);
|
||||
self->country_local = gnome_get_country_from_code (country_code, NULL);
|
||||
gtk_label_set_label (self->country_label, self->country);
|
||||
|
||||
return self;
|
||||
}
|
||||
|
||||
@@ -27,7 +27,6 @@
|
||||
<child>
|
||||
<object class="GtkLabel" id="title">
|
||||
<property name="halign">start</property>
|
||||
<property name="wrap">True</property>
|
||||
<!-- Actual string set in code -->
|
||||
<property name="label"></property>
|
||||
<attributes>
|
||||
@@ -38,7 +37,6 @@
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="halign">start</property>
|
||||
<property name="wrap">True</property>
|
||||
<property name="label" translatable="yes">Some settings must be unlocked before they can be changed.</property>
|
||||
</object>
|
||||
</child>
|
||||
@@ -57,7 +55,6 @@
|
||||
<object class="GtkLockButton" id="lock_button">
|
||||
<property name="receives-default">True</property>
|
||||
<property name="label" translatable="yes">Unlock…</property>
|
||||
<property name="valign">GTK_ALIGN_CENTER</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
|
||||
@@ -108,7 +108,6 @@ time_editor_time_changed_cb (CcTimeEditor *self)
|
||||
{
|
||||
g_assert (CC_IS_TIME_EDITOR (self));
|
||||
|
||||
time_editor_clock_changed_cb (self);
|
||||
g_signal_emit (self, signals[TIME_CHANGED], 0);
|
||||
}
|
||||
|
||||
|
||||
@@ -568,8 +568,6 @@ cc_time_entry_set_time (CcTimeEntry *self,
|
||||
self->minute = CLAMP (minute, 0, 59);
|
||||
|
||||
cc_time_entry_set_am_pm (self, is_am_pm);
|
||||
|
||||
g_signal_emit (self, signals[TIME_CHANGED], 0);
|
||||
time_entry_fill_time (self);
|
||||
}
|
||||
|
||||
|
||||
@@ -168,9 +168,6 @@
|
||||
<child>
|
||||
<object class="GtkSwitch" id="network_time_switch">
|
||||
<property name="valign">center</property>
|
||||
<accessibility>
|
||||
<property name="label" translatable="yes">Enable</property>
|
||||
</accessibility>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
@@ -208,9 +205,6 @@
|
||||
<child>
|
||||
<object class="GtkSwitch" id="auto_timezone_switch">
|
||||
<property name="valign">center</property>
|
||||
<accessibility>
|
||||
<property name="label" translatable="yes">Enabled</property>
|
||||
</accessibility>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
|
||||
@@ -48,8 +48,11 @@ struct _CcTimezoneMap
|
||||
GdkTexture *orig_background_dim;
|
||||
|
||||
GdkTexture *background;
|
||||
GdkTexture *color_map;
|
||||
GdkTexture *pin;
|
||||
|
||||
gdouble selected_offset;
|
||||
|
||||
TzDB *tzdb;
|
||||
TzLocation *location;
|
||||
|
||||
@@ -82,6 +85,7 @@ cc_timezone_map_dispose (GObject *object)
|
||||
{
|
||||
CcTimezoneMap *self = CC_TIMEZONE_MAP (object);
|
||||
|
||||
g_clear_object (&self->color_map);
|
||||
g_clear_object (&self->orig_background);
|
||||
g_clear_object (&self->orig_background_dim);
|
||||
g_clear_object (&self->background);
|
||||
@@ -282,8 +286,12 @@ cc_timezone_map_snapshot (GtkWidget *widget,
|
||||
GtkSnapshot *snapshot)
|
||||
{
|
||||
CcTimezoneMap *map = CC_TIMEZONE_MAP (widget);
|
||||
g_autoptr(GdkTexture) orig_highlight = NULL;
|
||||
g_autofree gchar *file = NULL;
|
||||
g_autoptr(GError) err = NULL;
|
||||
gdouble pointx, pointy;
|
||||
gint width, height;
|
||||
char buf[16];
|
||||
|
||||
width = gtk_widget_get_width (widget);
|
||||
height = gtk_widget_get_height (widget);
|
||||
@@ -293,6 +301,35 @@ cc_timezone_map_snapshot (GtkWidget *widget,
|
||||
map->background,
|
||||
&GRAPHENE_RECT_INIT (0, 0, width, height));
|
||||
|
||||
/* paint highlight */
|
||||
if (gtk_widget_is_sensitive (widget))
|
||||
{
|
||||
file = g_strdup_printf (DATETIME_RESOURCE_PATH "/timezone_%s.png",
|
||||
g_ascii_formatd (buf, sizeof (buf),
|
||||
"%g", map->selected_offset));
|
||||
}
|
||||
else
|
||||
{
|
||||
file = g_strdup_printf (DATETIME_RESOURCE_PATH "/timezone_%s_dim.png",
|
||||
g_ascii_formatd (buf, sizeof (buf),
|
||||
"%g", map->selected_offset));
|
||||
|
||||
}
|
||||
|
||||
orig_highlight = texture_from_resource (file, &err);
|
||||
|
||||
if (!orig_highlight)
|
||||
{
|
||||
g_warning ("Could not load highlight: %s",
|
||||
(err) ? err->message : "Unknown Error");
|
||||
}
|
||||
else
|
||||
{
|
||||
gtk_snapshot_append_texture (snapshot,
|
||||
orig_highlight,
|
||||
&GRAPHENE_RECT_INIT (0, 0, width, height));
|
||||
}
|
||||
|
||||
if (map->location)
|
||||
{
|
||||
pointx = convert_longitude_to_x (map->location->longitude, width);
|
||||
@@ -389,6 +426,8 @@ set_location (CcTimezoneMap *map,
|
||||
|
||||
info = tz_info_from_location (map->location);
|
||||
|
||||
map->selected_offset = tz_location_get_base_utc_offset (map->location)
|
||||
/ (60.0*60.0);
|
||||
gtk_widget_queue_draw (GTK_WIDGET (map));
|
||||
|
||||
g_signal_emit (map, signals[LOCATION_CHANGED], 0, map->location);
|
||||
@@ -460,6 +499,14 @@ cc_timezone_map_init (CcTimezoneMap *map)
|
||||
g_clear_error (&err);
|
||||
}
|
||||
|
||||
map->color_map = texture_from_resource (DATETIME_RESOURCE_PATH "/cc.png", &err);
|
||||
if (!map->color_map)
|
||||
{
|
||||
g_warning ("Could not load background image: %s",
|
||||
(err) ? err->message : "Unknown error");
|
||||
g_clear_error (&err);
|
||||
}
|
||||
|
||||
map->pin = texture_from_resource (DATETIME_RESOURCE_PATH "/pin.png", &err);
|
||||
if (!map->pin)
|
||||
{
|
||||
|
||||
|
Before Width: | Height: | Size: 83 KiB After Width: | Height: | Size: 208 KiB |
|
Before Width: | Height: | Size: 61 KiB After Width: | Height: | Size: 94 KiB |
BIN
panels/datetime/data/cc.png
Normal file
|
After Width: | Height: | Size: 50 KiB |
|
Before Width: | Height: | Size: 447 B After Width: | Height: | Size: 666 B |
BIN
panels/datetime/data/timezone_-1.png
Normal file
|
After Width: | Height: | Size: 7.8 KiB |
BIN
panels/datetime/data/timezone_-10.png
Normal file
|
After Width: | Height: | Size: 7.6 KiB |
BIN
panels/datetime/data/timezone_-10_dim.png
Normal file
|
After Width: | Height: | Size: 5.0 KiB |
BIN
panels/datetime/data/timezone_-11.png
Normal file
|
After Width: | Height: | Size: 8.2 KiB |
BIN
panels/datetime/data/timezone_-11_dim.png
Normal file
|
After Width: | Height: | Size: 4.7 KiB |
BIN
panels/datetime/data/timezone_-1_dim.png
Normal file
|
After Width: | Height: | Size: 4.8 KiB |
BIN
panels/datetime/data/timezone_-2.png
Normal file
|
After Width: | Height: | Size: 4.2 KiB |
BIN
panels/datetime/data/timezone_-2_dim.png
Normal file
|
After Width: | Height: | Size: 2.6 KiB |
BIN
panels/datetime/data/timezone_-3.5.png
Normal file
|
After Width: | Height: | Size: 740 B |
BIN
panels/datetime/data/timezone_-3.5_dim.png
Normal file
|
After Width: | Height: | Size: 995 B |
BIN
panels/datetime/data/timezone_-3.png
Normal file
|
After Width: | Height: | Size: 13 KiB |
BIN
panels/datetime/data/timezone_-3_dim.png
Normal file
|
After Width: | Height: | Size: 8.6 KiB |
BIN
panels/datetime/data/timezone_-4.png
Normal file
|
After Width: | Height: | Size: 16 KiB |
BIN
panels/datetime/data/timezone_-4_dim.png
Normal file
|
After Width: | Height: | Size: 9.6 KiB |
BIN
panels/datetime/data/timezone_-5.5.png
Normal file
|
After Width: | Height: | Size: 437 B |
BIN
panels/datetime/data/timezone_-5.5_dim.png
Normal file
|
After Width: | Height: | Size: 859 B |
BIN
panels/datetime/data/timezone_-5.png
Normal file
|
After Width: | Height: | Size: 19 KiB |
BIN
panels/datetime/data/timezone_-5_dim.png
Normal file
|
After Width: | Height: | Size: 12 KiB |
BIN
panels/datetime/data/timezone_-6.png
Normal file
|
After Width: | Height: | Size: 13 KiB |
BIN
panels/datetime/data/timezone_-6_dim.png
Normal file
|
After Width: | Height: | Size: 8.6 KiB |
BIN
panels/datetime/data/timezone_-7.png
Normal file
|
After Width: | Height: | Size: 12 KiB |
BIN
panels/datetime/data/timezone_-7_dim.png
Normal file
|
After Width: | Height: | Size: 7.7 KiB |
BIN
panels/datetime/data/timezone_-8.png
Normal file
|
After Width: | Height: | Size: 6.6 KiB |
BIN
panels/datetime/data/timezone_-8_dim.png
Normal file
|
After Width: | Height: | Size: 4.2 KiB |
BIN
panels/datetime/data/timezone_-9.5.png
Normal file
|
After Width: | Height: | Size: 437 B |
BIN
panels/datetime/data/timezone_-9.5_dim.png
Normal file
|
After Width: | Height: | Size: 859 B |
BIN
panels/datetime/data/timezone_-9.png
Normal file
|
After Width: | Height: | Size: 7.7 KiB |
BIN
panels/datetime/data/timezone_-9_dim.png
Normal file
|
After Width: | Height: | Size: 4.9 KiB |
BIN
panels/datetime/data/timezone_0.png
Normal file
|
After Width: | Height: | Size: 11 KiB |
BIN
panels/datetime/data/timezone_0_dim.png
Normal file
|
After Width: | Height: | Size: 6.9 KiB |
BIN
panels/datetime/data/timezone_1.png
Normal file
|
After Width: | Height: | Size: 15 KiB |
BIN
panels/datetime/data/timezone_10.5.png
Normal file
|
After Width: | Height: | Size: 421 B |
BIN
panels/datetime/data/timezone_10.5_dim.png
Normal file
|
After Width: | Height: | Size: 844 B |
BIN
panels/datetime/data/timezone_10.png
Normal file
|
After Width: | Height: | Size: 12 KiB |
BIN
panels/datetime/data/timezone_10_dim.png
Normal file
|
After Width: | Height: | Size: 8.2 KiB |
BIN
panels/datetime/data/timezone_11.5.png
Normal file
|
After Width: | Height: | Size: 446 B |
BIN
panels/datetime/data/timezone_11.5_dim.png
Normal file
|
After Width: | Height: | Size: 868 B |
BIN
panels/datetime/data/timezone_11.png
Normal file
|
After Width: | Height: | Size: 12 KiB |
BIN
panels/datetime/data/timezone_11_dim.png
Normal file
|
After Width: | Height: | Size: 6.6 KiB |
BIN
panels/datetime/data/timezone_12.75.png
Normal file
|
After Width: | Height: | Size: 409 B |
BIN
panels/datetime/data/timezone_12.75_dim.png
Normal file
|
After Width: | Height: | Size: 846 B |
BIN
panels/datetime/data/timezone_12.png
Normal file
|
After Width: | Height: | Size: 7.0 KiB |
BIN
panels/datetime/data/timezone_12_dim.png
Normal file
|
After Width: | Height: | Size: 3.8 KiB |
BIN
panels/datetime/data/timezone_13.png
Normal file
|
After Width: | Height: | Size: 621 B |
BIN
panels/datetime/data/timezone_13_dim.png
Normal file
|
After Width: | Height: | Size: 876 B |
BIN
panels/datetime/data/timezone_14.png
Normal file
|
After Width: | Height: | Size: 7.5 KiB |
BIN
panels/datetime/data/timezone_14_dim.png
Normal file
|
After Width: | Height: | Size: 4.1 KiB |
BIN
panels/datetime/data/timezone_1_dim.png
Normal file
|
After Width: | Height: | Size: 9.9 KiB |
BIN
panels/datetime/data/timezone_2.png
Normal file
|
After Width: | Height: | Size: 13 KiB |
BIN
panels/datetime/data/timezone_2_dim.png
Normal file
|
After Width: | Height: | Size: 8.5 KiB |
BIN
panels/datetime/data/timezone_3.5.png
Normal file
|
After Width: | Height: | Size: 2.1 KiB |
BIN
panels/datetime/data/timezone_3.5_dim.png
Normal file
|
After Width: | Height: | Size: 1.7 KiB |
BIN
panels/datetime/data/timezone_3.png
Normal file
|
After Width: | Height: | Size: 17 KiB |
BIN
panels/datetime/data/timezone_3_dim.png
Normal file
|
After Width: | Height: | Size: 9.6 KiB |
BIN
panels/datetime/data/timezone_4.5.png
Normal file
|
After Width: | Height: | Size: 1.7 KiB |
BIN
panels/datetime/data/timezone_4.5_dim.png
Normal file
|
After Width: | Height: | Size: 1.4 KiB |
BIN
panels/datetime/data/timezone_4.png
Normal file
|
After Width: | Height: | Size: 4.8 KiB |
BIN
panels/datetime/data/timezone_4_dim.png
Normal file
|
After Width: | Height: | Size: 2.7 KiB |
BIN
panels/datetime/data/timezone_5.5.png
Normal file
|
After Width: | Height: | Size: 5.6 KiB |
BIN
panels/datetime/data/timezone_5.5_dim.png
Normal file
|
After Width: | Height: | Size: 3.4 KiB |
BIN
panels/datetime/data/timezone_5.75.png
Normal file
|
After Width: | Height: | Size: 2.8 KiB |
BIN
panels/datetime/data/timezone_5.75_dim.png
Normal file
|
After Width: | Height: | Size: 1.6 KiB |
BIN
panels/datetime/data/timezone_5.png
Normal file
|
After Width: | Height: | Size: 14 KiB |
BIN
panels/datetime/data/timezone_5_dim.png
Normal file
|
After Width: | Height: | Size: 7.9 KiB |
BIN
panels/datetime/data/timezone_6.5.png
Normal file
|
After Width: | Height: | Size: 1.6 KiB |