796 lines
34 KiB
Diff
796 lines
34 KiB
Diff
From 1137721a530370a171ea437dafa369384d414348 Mon Sep 17 00:00:00 2001
|
||
From: tangjie02 <tangjie02@kylinsec.com.cn>
|
||
Date: Tue, 16 Aug 2022 17:54:17 +0800
|
||
Subject: [PATCH] feature(display): The scaling rate can only take effect after
|
||
logging out and logging in again.
|
||
MIME-Version: 1.0
|
||
Content-Type: text/plain; charset=UTF-8
|
||
Content-Transfer-Encoding: 8bit
|
||
|
||
- 缩放率改为默认注销后重新登录才能生效
|
||
|
||
Signed-off-by: tangjie02 <tangjie02@kylinsec.com.cn>
|
||
---
|
||
.../com.kylinsec.kiran.display.gschema.xml.in | 4 +
|
||
include/display_i.h | 2 +
|
||
plugins/display/display-manager.cpp | 80 ++++++-----
|
||
plugins/display/display-manager.h | 3 +-
|
||
...kylinsec.Kiran.SessionDaemon.XSettings.xml | 7 +
|
||
plugins/xsettings/xsettings-manager.cpp | 11 +-
|
||
plugins/xsettings/xsettings-manager.h | 1 +
|
||
plugins/xsettings/xsettings-registry.cpp | 18 ++-
|
||
plugins/xsettings/xsettings-registry.h | 9 +-
|
||
po/POTFILES.in | 12 +-
|
||
po/zh_CN.po | 132 ++++++++++--------
|
||
11 files changed, 168 insertions(+), 111 deletions(-)
|
||
|
||
diff --git a/data/schemas/com.kylinsec.kiran.display.gschema.xml.in b/data/schemas/com.kylinsec.kiran.display.gschema.xml.in
|
||
index 536f3c4..ea752a8 100644
|
||
--- a/data/schemas/com.kylinsec.kiran.display.gschema.xml.in
|
||
+++ b/data/schemas/com.kylinsec.kiran.display.gschema.xml.in
|
||
@@ -14,5 +14,9 @@
|
||
<description>Layout of connected monitors in the screen.</description>
|
||
</key>
|
||
|
||
+ <key name="dynamic-scaling-window" type="b">
|
||
+ <default>false</default>
|
||
+ <description>It takes effect immediately when the scaling factor of window is changed.</description>
|
||
+ </key>
|
||
</schema>
|
||
</schemalist>
|
||
diff --git a/include/display_i.h b/include/display_i.h
|
||
index 56ef7b1..0b6bc17 100644
|
||
--- a/include/display_i.h
|
||
+++ b/include/display_i.h
|
||
@@ -39,6 +39,8 @@ extern "C"
|
||
#define DISPLAY_OBJECT_PATH "/com/kylinsec/Kiran/SessionDaemon/Display"
|
||
#define DISPLAY_DBUS_INTERFACE_NAME "com.kylinsec.Kiran.SessionDaemon.Display"
|
||
|
||
+#define DISPLAY_SCHEMA_DYNAMIC_SCALING_WINDOW "dynamic-scaling-window"
|
||
+
|
||
// 显示模式,只有在下列情况会使用显示模式进行设置:
|
||
// 1. 程序第一次启动
|
||
// 2. 有连接设备删除和添加时
|
||
diff --git a/plugins/display/display-manager.cpp b/plugins/display/display-manager.cpp
|
||
index ff9151f..5c7c5b3 100644
|
||
--- a/plugins/display/display-manager.cpp
|
||
+++ b/plugins/display/display-manager.cpp
|
||
@@ -16,6 +16,7 @@
|
||
|
||
#include <fstream>
|
||
|
||
+#include <glib/gi18n.h>
|
||
#include "config.h"
|
||
#include "lib/base/base.h"
|
||
#include "plugins/display/display-util.h"
|
||
@@ -34,6 +35,8 @@ namespace Kiran
|
||
|
||
DisplayManager::DisplayManager(XrandrManager *xrandr_manager) : xrandr_manager_(xrandr_manager),
|
||
default_style_(DisplayStyle::DISPLAY_STYLE_EXTEND),
|
||
+ window_scaling_factor_(0),
|
||
+ dynamic_scaling_window_(false),
|
||
dbus_connect_id_(0),
|
||
object_register_id_(0)
|
||
{
|
||
@@ -180,10 +183,28 @@ void DisplayManager::SetWindowScalingFactor(gint32 window_scaling_factor, Method
|
||
{
|
||
KLOG_PROFILE("");
|
||
|
||
+ if (this->window_scaling_factor_get() == window_scaling_factor)
|
||
+ {
|
||
+ invocation.ret();
|
||
+ return;
|
||
+ }
|
||
+
|
||
+ if (!this->dynamic_scaling_window_)
|
||
+ {
|
||
+ std::string standard_error;
|
||
+ auto command_line = fmt::format("/usr/bin/notify-send \"{0}\"", _("The scaling rate can only take effect after logging out and logging in again"));
|
||
+ Glib::spawn_command_line_sync(command_line, nullptr, &standard_error);
|
||
+ if (!standard_error.empty())
|
||
+ {
|
||
+ KLOG_WARNING("Failed to run notify-send: %s", standard_error.c_str());
|
||
+ }
|
||
+ }
|
||
+
|
||
if (!this->window_scaling_factor_set(window_scaling_factor))
|
||
{
|
||
DBUS_ERROR_REPLY_AND_RET(CCErrorCode::ERROR_DISPLAY_SET_WINDOW_SCALING_FACTOR_2);
|
||
}
|
||
+
|
||
invocation.ret();
|
||
}
|
||
|
||
@@ -222,7 +243,6 @@ void DisplayManager::init()
|
||
this->load_config();
|
||
|
||
this->display_settings_->signal_changed().connect(sigc::mem_fun(this, &DisplayManager::display_settings_changed));
|
||
- this->xsettings_settings_->signal_changed().connect(sigc::mem_fun(this, &DisplayManager::xsettings_settings_changed));
|
||
this->xrandr_manager_->signal_resources_changed().connect(sigc::mem_fun(this, &DisplayManager::resources_changed));
|
||
|
||
this->dbus_connect_id_ = Gio::DBus::own_name(Gio::DBus::BUS_TYPE_SESSION,
|
||
@@ -236,21 +256,25 @@ void DisplayManager::init()
|
||
{
|
||
KLOG_WARNING("%s.", CC_ERROR2STR(error_code).c_str());
|
||
}
|
||
+
|
||
+ /* window_scaling_factor的初始化顺序:
|
||
+ 1. 先读取xsettings中的window-scaling-factor属性; (load_settings)
|
||
+ 2. 读取monitor.xml中维护的window-scaling-factor值 (switch_style_and_save)
|
||
+ 3. 如果第2步和第1步的值不相同,则说明在上一次进入会话时用户修改了缩放率,需要在这一次进入会话时生效,
|
||
+ 因此需要将monitor.xml中的缩放率更新到xsettings中的window-scaling-factor属性中*/
|
||
+ if (this->window_scaling_factor_ != this->xsettings_settings_->get_int(XSETTINGS_SCHEMA_WINDOW_SCALING_FACTOR))
|
||
+ {
|
||
+ this->xsettings_settings_->set_int(XSETTINGS_SCHEMA_WINDOW_SCALING_FACTOR, this->window_scaling_factor_);
|
||
+ }
|
||
}
|
||
|
||
void DisplayManager::load_settings()
|
||
{
|
||
KLOG_PROFILE("settings: %p.", this->display_settings_.get());
|
||
|
||
- if (this->display_settings_)
|
||
- {
|
||
- this->default_style_ = DisplayStyle(this->display_settings_->get_enum(DISPLAY_SCHEMA_STYLE));
|
||
- }
|
||
-
|
||
- if (this->xsettings_settings_)
|
||
- {
|
||
- this->window_scaling_factor_ = this->xsettings_settings_->get_int(XSETTINGS_SCHEMA_WINDOW_SCALING_FACTOR);
|
||
- }
|
||
+ this->default_style_ = DisplayStyle(this->display_settings_->get_enum(DISPLAY_SCHEMA_STYLE));
|
||
+ this->dynamic_scaling_window_ = this->display_settings_->get_boolean(DISPLAY_SCHEMA_DYNAMIC_SCALING_WINDOW);
|
||
+ this->window_scaling_factor_ = this->xsettings_settings_->get_int(XSETTINGS_SCHEMA_WINDOW_SCALING_FACTOR);
|
||
}
|
||
|
||
void DisplayManager::load_monitors()
|
||
@@ -505,12 +529,15 @@ bool DisplayManager::save_config(CCErrorCode &error_code)
|
||
|
||
bool DisplayManager::apply(CCErrorCode &error_code)
|
||
{
|
||
- // 应用缩放因子
|
||
- auto variant_value = Glib::Variant<gint32>::create(this->window_scaling_factor_);
|
||
- if (!this->xsettings_settings_->set_value(XSETTINGS_SCHEMA_WINDOW_SCALING_FACTOR, variant_value))
|
||
+ if (this->dynamic_scaling_window_)
|
||
{
|
||
- error_code = CCErrorCode::ERROR_DISPLAY_SET_WINDOW_SCALING_FACTOR_1;
|
||
- return false;
|
||
+ // 应用缩放因子
|
||
+ auto variant_value = Glib::Variant<gint32>::create(this->window_scaling_factor_);
|
||
+ if (!this->xsettings_settings_->set_value(XSETTINGS_SCHEMA_WINDOW_SCALING_FACTOR, variant_value))
|
||
+ {
|
||
+ error_code = CCErrorCode::ERROR_DISPLAY_SET_WINDOW_SCALING_FACTOR_1;
|
||
+ return false;
|
||
+ }
|
||
}
|
||
|
||
// 应用xrandr
|
||
@@ -652,10 +679,11 @@ ModeInfoVec DisplayManager::monitors_common_modes(const DisplayMonitorVec &monit
|
||
for (uint32_t i = 1; i < monitors.size(); ++i)
|
||
{
|
||
auto monitor = monitors[i];
|
||
- auto iter = std::remove_if(result.begin(), result.end(), [monitor](std::shared_ptr<ModeInfo> mode) -> bool {
|
||
- auto modes = monitor->get_modes_by_size(mode->width, mode->height);
|
||
- return (modes.size() == 0);
|
||
- });
|
||
+ auto iter = std::remove_if(result.begin(), result.end(), [monitor](std::shared_ptr<ModeInfo> mode) -> bool
|
||
+ {
|
||
+ auto modes = monitor->get_modes_by_size(mode->width, mode->height);
|
||
+ return (modes.size() == 0);
|
||
+ });
|
||
|
||
result.erase(iter, result.end());
|
||
}
|
||
@@ -829,20 +857,6 @@ void DisplayManager::display_settings_changed(const Glib::ustring &key)
|
||
}
|
||
}
|
||
|
||
-void DisplayManager::xsettings_settings_changed(const Glib::ustring &key)
|
||
-{
|
||
- KLOG_PROFILE("key: %s.", key.c_str());
|
||
-
|
||
- switch (shash(key.c_str()))
|
||
- {
|
||
- case CONNECT(XSETTINGS_SCHEMA_WINDOW_SCALING_FACTOR, _hash):
|
||
- {
|
||
- this->window_scaling_factor_ = this->xsettings_settings_->get_int(key);
|
||
- }
|
||
- break;
|
||
- }
|
||
-}
|
||
-
|
||
void DisplayManager::on_bus_acquired(const Glib::RefPtr<Gio::DBus::Connection> &connect, Glib::ustring name)
|
||
{
|
||
KLOG_PROFILE("name: %s", name.c_str());
|
||
diff --git a/plugins/display/display-manager.h b/plugins/display/display-manager.h
|
||
index 1dbb50d..773fe90 100644
|
||
--- a/plugins/display/display-manager.h
|
||
+++ b/plugins/display/display-manager.h
|
||
@@ -120,7 +120,6 @@ private:
|
||
void resources_changed();
|
||
|
||
void display_settings_changed(const Glib::ustring& key);
|
||
- void xsettings_settings_changed(const Glib::ustring& key);
|
||
|
||
void on_bus_acquired(const Glib::RefPtr<Gio::DBus::Connection>& connect, Glib::ustring name);
|
||
void on_name_acquired(const Glib::RefPtr<Gio::DBus::Connection>& connect, Glib::ustring name);
|
||
@@ -142,6 +141,8 @@ private:
|
||
std::string primary_;
|
||
// 窗口缩放率
|
||
int32_t window_scaling_factor_;
|
||
+ // 开启动态缩放窗口
|
||
+ bool dynamic_scaling_window_;
|
||
|
||
std::map<uint32_t, std::shared_ptr<DisplayMonitor>> monitors_;
|
||
|
||
diff --git a/plugins/xsettings/com.kylinsec.Kiran.SessionDaemon.XSettings.xml b/plugins/xsettings/com.kylinsec.Kiran.SessionDaemon.XSettings.xml
|
||
index d9a23da..cbe1b43 100644
|
||
--- a/plugins/xsettings/com.kylinsec.Kiran.SessionDaemon.XSettings.xml
|
||
+++ b/plugins/xsettings/com.kylinsec.Kiran.SessionDaemon.XSettings.xml
|
||
@@ -70,5 +70,12 @@
|
||
<description>Set the XSettings Registry value whose type is color.</description>
|
||
</method>
|
||
|
||
+ <signal name="PropertiesChanged">
|
||
+ <arg type="as" name="names">
|
||
+ <summary>The XSettings Registry property name list.</summary>
|
||
+ </arg>
|
||
+ <description>Emit this signal when XSettings Registry property is changed.</description>
|
||
+ </signal>
|
||
+
|
||
</interface>
|
||
</node>
|
||
diff --git a/plugins/xsettings/xsettings-manager.cpp b/plugins/xsettings/xsettings-manager.cpp
|
||
index 9612a85..61c914b 100644
|
||
--- a/plugins/xsettings/xsettings-manager.cpp
|
||
+++ b/plugins/xsettings/xsettings-manager.cpp
|
||
@@ -190,6 +190,7 @@ void XSettingsManager::init()
|
||
screen->signal_size_changed().connect(sigc::mem_fun(this, &XSettingsManager::on_screen_changed));
|
||
screen->signal_monitors_changed().connect(sigc::mem_fun(this, &XSettingsManager::on_screen_changed));
|
||
this->fontconfig_monitor_.signal_timestamp_changed().connect(sigc::mem_fun(this, &XSettingsManager::on_fontconfig_timestamp_changed));
|
||
+ this->registry_.signal_properties_changed().connect(sigc::mem_fun(this, &XSettingsManager::on_properties_changed));
|
||
|
||
this->dbus_connect_id_ = Gio::DBus::own_name(Gio::DBus::BUS_TYPE_SESSION,
|
||
XSETTINGS_DBUS_NAME,
|
||
@@ -207,8 +208,6 @@ void XSettingsManager::load_from_settings()
|
||
// 这里不做通知,等初始化完后统一通知
|
||
this->settings_changed(key, false);
|
||
}
|
||
- // 这里统一通知
|
||
- this->registry_.notify();
|
||
}
|
||
|
||
void XSettingsManager::settings_changed(const Glib::ustring &key, bool is_notify)
|
||
@@ -300,7 +299,6 @@ void XSettingsManager::settings_changed(const Glib::ustring &key, bool is_notify
|
||
if (is_notify)
|
||
{
|
||
this->xsettings_changed_.emit(key.raw());
|
||
- this->registry_.notify();
|
||
}
|
||
}
|
||
|
||
@@ -406,7 +404,6 @@ void XSettingsManager::on_screen_changed()
|
||
{
|
||
this->scale_settings();
|
||
}
|
||
- this->registry_.notify();
|
||
}
|
||
|
||
bool XSettingsManager::delayed_toggle_bg_draw(bool value)
|
||
@@ -423,7 +420,11 @@ void XSettingsManager::on_fontconfig_timestamp_changed()
|
||
{
|
||
int32_t timestamp = time(NULL);
|
||
this->registry_.update(XSETTINGS_REGISTRY_PROP_FONTCONFIG_TIMESTAMP, timestamp);
|
||
- this->registry_.notify();
|
||
+}
|
||
+
|
||
+void XSettingsManager::on_properties_changed(const std::vector<Glib::ustring> &properties)
|
||
+{
|
||
+ this->PropertiesChanged_signal.emit(properties);
|
||
}
|
||
|
||
void XSettingsManager::set_registry_var(std::shared_ptr<XSettingsPropertyBase> var, MethodInvocation &invocation)
|
||
diff --git a/plugins/xsettings/xsettings-manager.h b/plugins/xsettings/xsettings-manager.h
|
||
index 84e5c55..ce69ef9 100644
|
||
--- a/plugins/xsettings/xsettings-manager.h
|
||
+++ b/plugins/xsettings/xsettings-manager.h
|
||
@@ -68,6 +68,7 @@ private:
|
||
void on_screen_changed();
|
||
bool delayed_toggle_bg_draw(bool value);
|
||
void on_fontconfig_timestamp_changed();
|
||
+ void on_properties_changed(const std::vector<Glib::ustring> &properties);
|
||
|
||
void set_registry_var(std::shared_ptr<XSettingsPropertyBase> var, MethodInvocation &invocation);
|
||
|
||
diff --git a/plugins/xsettings/xsettings-registry.cpp b/plugins/xsettings/xsettings-registry.cpp
|
||
index bd95671..13472de 100644
|
||
--- a/plugins/xsettings/xsettings-registry.cpp
|
||
+++ b/plugins/xsettings/xsettings-registry.cpp
|
||
@@ -236,8 +236,15 @@ bool XSettingsRegistry::update(std::shared_ptr<XSettingsPropertyBase> var)
|
||
return true;
|
||
}
|
||
|
||
+ this->changed_properties_.push_back(var->get_name());
|
||
this->properties_.erase(var->get_name());
|
||
auto iter = this->properties_.emplace(var->get_name(), var);
|
||
+
|
||
+ // 空闲时修改,因为update可能会被连续调用多次。
|
||
+ if (!this->notify_handler_)
|
||
+ {
|
||
+ this->notify_handler_ = Glib::signal_idle().connect(sigc::mem_fun(this, &XSettingsRegistry::notify));
|
||
+ }
|
||
return iter.second;
|
||
}
|
||
|
||
@@ -261,9 +268,10 @@ XSettingsPropertyBaseVec XSettingsRegistry::get_properties()
|
||
return retval;
|
||
}
|
||
|
||
-void XSettingsRegistry::notify()
|
||
+bool XSettingsRegistry::notify()
|
||
{
|
||
- KLOG_PROFILE("");
|
||
+ KLOG_DEBUG("Notify properties changed to other client.");
|
||
+
|
||
std::string data;
|
||
|
||
// 注意:填充的相关变量类型不能随意修改
|
||
@@ -276,7 +284,6 @@ void XSettingsRegistry::notify()
|
||
data.append(std::string((char *)&nsettings, 4));
|
||
|
||
// 填充body
|
||
-
|
||
for (const auto &iter : this->properties_)
|
||
{
|
||
data.append(iter.second->serialize());
|
||
@@ -290,6 +297,11 @@ void XSettingsRegistry::notify()
|
||
PropModeReplace,
|
||
(unsigned char *)data.c_str(),
|
||
data.length());
|
||
+
|
||
+ auto changed_properties = std::move(this->changed_properties_);
|
||
+ this->properties_changed_.emit(changed_properties);
|
||
+
|
||
+ return false;
|
||
}
|
||
|
||
char XSettingsRegistry::byte_order()
|
||
diff --git a/plugins/xsettings/xsettings-registry.h b/plugins/xsettings/xsettings-registry.h
|
||
index 8a39051..d8aa238 100644
|
||
--- a/plugins/xsettings/xsettings-registry.h
|
||
+++ b/plugins/xsettings/xsettings-registry.h
|
||
@@ -126,12 +126,13 @@ public:
|
||
bool update(const std::string &name, const XSettingsColor &value);
|
||
bool update(std::shared_ptr<XSettingsPropertyBase> var);
|
||
|
||
- void notify();
|
||
-
|
||
std::shared_ptr<XSettingsPropertyBase> get_property(const std::string &name);
|
||
XSettingsPropertyBaseVec get_properties();
|
||
|
||
+ sigc::signal<void, std::vector<Glib::ustring>> signal_properties_changed() { return this->properties_changed_; };
|
||
+
|
||
private:
|
||
+ bool notify();
|
||
char byte_order();
|
||
|
||
private:
|
||
@@ -146,5 +147,9 @@ private:
|
||
Window xsettings_window_;
|
||
|
||
std::map<std::string, std::shared_ptr<XSettingsPropertyBase>> properties_;
|
||
+ // 记录发生变化的属性,在改变后发送信号
|
||
+ std::vector<Glib::ustring> changed_properties_;
|
||
+ sigc::connection notify_handler_;
|
||
+ sigc::signal<void, std::vector<Glib::ustring>> properties_changed_;
|
||
};
|
||
} // namespace Kiran
|
||
\ No newline at end of file
|
||
diff --git a/po/POTFILES.in b/po/POTFILES.in
|
||
index a12d2d9..5defca8 100644
|
||
--- a/po/POTFILES.in
|
||
+++ b/po/POTFILES.in
|
||
@@ -1,11 +1,11 @@
|
||
# List of source files which contain translatable strings.
|
||
[encoding: UTF-8]
|
||
-[type: gettext/gsettings]data/com.kylinsec.kiran.appearance.gschema.xml.in
|
||
-[type: gettext/gsettings]data/com.kylinsec.kiran.display.gschema.xml.in
|
||
-[type: gettext/gsettings]data/com.kylinsec.kiran.keyboard.gschema.xml.in
|
||
-[type: gettext/gsettings]data/com.kylinsec.kiran.mouse.gschema.xml.in
|
||
-[type: gettext/gsettings]data/com.kylinsec.kiran.touchpad.gschema.xml.in
|
||
-[type: gettext/gsettings]data/com.kylinsec.kiran.xsettings.gschema.xml.in
|
||
+[type: gettext/gsettings]data/schemas/com.kylinsec.kiran.appearance.gschema.xml.in
|
||
+[type: gettext/gsettings]data/schemas/com.kylinsec.kiran.display.gschema.xml.in
|
||
+[type: gettext/gsettings]data/schemas/com.kylinsec.kiran.keyboard.gschema.xml.in
|
||
+[type: gettext/gsettings]data/schemas/com.kylinsec.kiran.mouse.gschema.xml.in
|
||
+[type: gettext/gsettings]data/schemas/com.kylinsec.kiran.touchpad.gschema.xml.in
|
||
+[type: gettext/gsettings]data/schemas/com.kylinsec.kiran.xsettings.gschema.xml.in
|
||
data/com.kylinsec.Kiran.SystemDaemon.Accounts.policy.in
|
||
data/com.kylinsec.Kiran.SystemDaemon.TimeDate.policy.in
|
||
data/com.kylinsec.Kiran.SystemDaemon.Greeter.policy.in
|
||
diff --git a/po/zh_CN.po b/po/zh_CN.po
|
||
index c9f2652..0f3f202 100644
|
||
--- a/po/zh_CN.po
|
||
+++ b/po/zh_CN.po
|
||
@@ -8,7 +8,7 @@ msgid ""
|
||
msgstr ""
|
||
"Project-Id-Version: kiran-cc-daemon 2.0\n"
|
||
"Report-Msgid-Bugs-To: \n"
|
||
-"POT-Creation-Date: 2022-06-08 11:05+0800\n"
|
||
+"POT-Creation-Date: 2022-08-16 17:47+0800\n"
|
||
"PO-Revision-Date: 2020-07-01 17:54+0800\n"
|
||
"Last-Translator: tangjie02 <tangjie02@kylinos.com.cn>\n"
|
||
"Language-Team: Chinese (simplified)\n"
|
||
@@ -17,58 +17,63 @@ msgstr ""
|
||
"Content-Type: text/plain; charset=UTF-8\n"
|
||
"Content-Transfer-Encoding: 8bit\n"
|
||
|
||
-#: ../data/com.kylinsec.kiran.appearance.gschema.xml.in.h:1
|
||
+#: ../data/schemas/com.kylinsec.kiran.appearance.gschema.xml.in.h:1
|
||
msgid "File to use for the desktop background image."
|
||
msgstr "桌面背景图片的文件路径。"
|
||
|
||
-#: ../data/com.kylinsec.kiran.appearance.gschema.xml.in.h:2
|
||
+#: ../data/schemas/com.kylinsec.kiran.appearance.gschema.xml.in.h:2
|
||
msgid "File to use for the lock screen background image."
|
||
msgstr "锁屏背景图片的文件路径。"
|
||
|
||
-#: ../data/com.kylinsec.kiran.display.gschema.xml.in.h:1
|
||
+#: ../data/schemas/com.kylinsec.kiran.display.gschema.xml.in.h:1
|
||
msgid "Layout of connected monitors in the screen."
|
||
msgstr "已连接的显示器在屏幕中的位置布局。"
|
||
|
||
-#: ../data/com.kylinsec.kiran.keyboard.gschema.xml.in.h:1
|
||
+#: ../data/schemas/com.kylinsec.kiran.display.gschema.xml.in.h:2
|
||
+msgid ""
|
||
+"It takes effect immediately when the scaling factor of window is changed."
|
||
+msgstr "当窗口缩放率发生变化时立即生效。"
|
||
+
|
||
+#: ../data/schemas/com.kylinsec.kiran.keyboard.gschema.xml.in.h:1
|
||
msgid ""
|
||
"Whether repeat to trigger KeyPress and KeyRelease event when key is pressed."
|
||
msgstr "当键被长按后是否重复触发按下和弹起事件。"
|
||
|
||
-#: ../data/com.kylinsec.kiran.keyboard.gschema.xml.in.h:2
|
||
+#: ../data/schemas/com.kylinsec.kiran.keyboard.gschema.xml.in.h:2
|
||
msgid ""
|
||
"The delay time in ms after the initial press of an auto-repeating key and "
|
||
"the first generated repeat event."
|
||
msgstr "当键被按下时第一次触发按下事件的延时(毫秒)。"
|
||
|
||
-#: ../data/com.kylinsec.kiran.keyboard.gschema.xml.in.h:3
|
||
+#: ../data/schemas/com.kylinsec.kiran.keyboard.gschema.xml.in.h:3
|
||
msgid "The delay time in ms between all subsequent generated repeat events."
|
||
msgstr "当键被按下后每个按键(按下或者弹起)事件之间的间隔时间。"
|
||
|
||
-#: ../data/com.kylinsec.kiran.keyboard.gschema.xml.in.h:4
|
||
+#: ../data/schemas/com.kylinsec.kiran.keyboard.gschema.xml.in.h:4
|
||
msgid "Keyboard layouts."
|
||
msgstr "键盘布局。"
|
||
|
||
-#: ../data/com.kylinsec.kiran.keyboard.gschema.xml.in.h:5
|
||
+#: ../data/schemas/com.kylinsec.kiran.keyboard.gschema.xml.in.h:5
|
||
msgid "Keyboard options."
|
||
msgstr "键盘选项。"
|
||
|
||
-#: ../data/com.kylinsec.kiran.mouse.gschema.xml.in.h:1
|
||
-#: ../data/com.kylinsec.kiran.touchpad.gschema.xml.in.h:1
|
||
+#: ../data/schemas/com.kylinsec.kiran.mouse.gschema.xml.in.h:1
|
||
+#: ../data/schemas/com.kylinsec.kiran.touchpad.gschema.xml.in.h:1
|
||
msgid "Swap left and right buttons for left-handed."
|
||
msgstr "启动左手模式后,左右键功能进行切换。"
|
||
|
||
-#: ../data/com.kylinsec.kiran.mouse.gschema.xml.in.h:2
|
||
+#: ../data/schemas/com.kylinsec.kiran.mouse.gschema.xml.in.h:2
|
||
msgid "Acceleration multiplier for mouse motion."
|
||
msgstr "鼠标移动加速。"
|
||
|
||
-#: ../data/com.kylinsec.kiran.mouse.gschema.xml.in.h:3
|
||
+#: ../data/schemas/com.kylinsec.kiran.mouse.gschema.xml.in.h:3
|
||
msgid ""
|
||
"Enables middle mouse button emulation through simultaneous left and right "
|
||
"button click."
|
||
msgstr "通过同时左键和右键启用鼠标中键模拟按钮点击。"
|
||
|
||
-#: ../data/com.kylinsec.kiran.mouse.gschema.xml.in.h:4
|
||
-#: ../data/com.kylinsec.kiran.touchpad.gschema.xml.in.h:6
|
||
+#: ../data/schemas/com.kylinsec.kiran.mouse.gschema.xml.in.h:4
|
||
+#: ../data/schemas/com.kylinsec.kiran.touchpad.gschema.xml.in.h:6
|
||
msgid ""
|
||
"Enables or disables natural scroll. Natural scrolling is the terminology for "
|
||
"moving the content in the direction of scrolling, i.e. moving the wheel or "
|
||
@@ -77,22 +82,22 @@ msgstr ""
|
||
"启用或禁用自然滚动。自然滚动是沿滚动方向移动内容,即移动滚轮或手指向下时页面"
|
||
"向下移动。"
|
||
|
||
-#: ../data/com.kylinsec.kiran.touchpad.gschema.xml.in.h:2
|
||
+#: ../data/schemas/com.kylinsec.kiran.touchpad.gschema.xml.in.h:2
|
||
msgid "Indicates if diable while typing is enabled or disabled."
|
||
msgstr "打字时禁用触摸板功能。"
|
||
|
||
-#: ../data/com.kylinsec.kiran.touchpad.gschema.xml.in.h:3
|
||
+#: ../data/schemas/com.kylinsec.kiran.touchpad.gschema.xml.in.h:3
|
||
msgid ""
|
||
"Set this to TRUE to be able to send mouse clicks by tapping on the touchpad."
|
||
msgstr "设置为真则表示轻击触摸板触发对应的鼠标事件,例如双击等同于鼠标右键。"
|
||
|
||
-#: ../data/com.kylinsec.kiran.touchpad.gschema.xml.in.h:4
|
||
+#: ../data/schemas/com.kylinsec.kiran.touchpad.gschema.xml.in.h:4
|
||
msgid ""
|
||
"Enables a click method. Permitted methods are buttonareas and clickfinger, "
|
||
"respectively conreesponding to 0 and 1."
|
||
msgstr "设置单击方法。可通过按下和轻触的方式触发点击事件。"
|
||
|
||
-#: ../data/com.kylinsec.kiran.touchpad.gschema.xml.in.h:5
|
||
+#: ../data/schemas/com.kylinsec.kiran.touchpad.gschema.xml.in.h:5
|
||
msgid ""
|
||
"Enables a scroll method. Permitted methods are twofinger, edge and button, "
|
||
"respectively conrresponding to 0, 1 and 2."
|
||
@@ -100,146 +105,146 @@ msgstr ""
|
||
"设置滚动方法。可通过双指滑动、边缘滑动和按键(键盘中间的红色按钮)的方式触发滚"
|
||
"动操作。"
|
||
|
||
-#: ../data/com.kylinsec.kiran.touchpad.gschema.xml.in.h:7
|
||
+#: ../data/schemas/com.kylinsec.kiran.touchpad.gschema.xml.in.h:7
|
||
msgid "Set this to TRUE to enable all touchpads."
|
||
msgstr "开启或关闭触摸板。"
|
||
|
||
-#: ../data/com.kylinsec.kiran.touchpad.gschema.xml.in.h:8
|
||
+#: ../data/schemas/com.kylinsec.kiran.touchpad.gschema.xml.in.h:8
|
||
msgid "Acceleration multiplier for touchpad motion."
|
||
msgstr "触摸板移动加速。"
|
||
|
||
-#: ../data/com.kylinsec.kiran.xsettings.gschema.xml.in.h:1
|
||
+#: ../data/schemas/com.kylinsec.kiran.xsettings.gschema.xml.in.h:1
|
||
msgid ""
|
||
"Maximum time allowed between two clicks for them to be considered a double "
|
||
"click (in milliseconds)."
|
||
msgstr "触发双击事件时两次单击之间允许的最大时间 (毫秒)。"
|
||
|
||
-#: ../data/com.kylinsec.kiran.xsettings.gschema.xml.in.h:2
|
||
+#: ../data/schemas/com.kylinsec.kiran.xsettings.gschema.xml.in.h:2
|
||
msgid ""
|
||
"Maximum distance allowed between two clicks for them to be considered a "
|
||
"double click (in pixels)."
|
||
msgstr "触发双击事件时两次单击之间允许的最大距离 (像素)。"
|
||
|
||
-#: ../data/com.kylinsec.kiran.xsettings.gschema.xml.in.h:3
|
||
+#: ../data/schemas/com.kylinsec.kiran.xsettings.gschema.xml.in.h:3
|
||
msgid "Number of pixels the cursor can move before dragging."
|
||
msgstr "拖动前光标可以移动的像素数。"
|
||
|
||
-#: ../data/com.kylinsec.kiran.xsettings.gschema.xml.in.h:4
|
||
+#: ../data/schemas/com.kylinsec.kiran.xsettings.gschema.xml.in.h:4
|
||
msgid "Whether the cursor should blink."
|
||
msgstr "光标是否应该闪烁。"
|
||
|
||
-#: ../data/com.kylinsec.kiran.xsettings.gschema.xml.in.h:5
|
||
+#: ../data/schemas/com.kylinsec.kiran.xsettings.gschema.xml.in.h:5
|
||
msgid "Length of the cursor blink cycle, in milleseconds."
|
||
msgstr "光标闪烁周期的长度 (毫秒)。"
|
||
|
||
-#: ../data/com.kylinsec.kiran.xsettings.gschema.xml.in.h:6
|
||
+#: ../data/schemas/com.kylinsec.kiran.xsettings.gschema.xml.in.h:6
|
||
msgid "Name of gtk theme to use."
|
||
msgstr "系统使用的主题。"
|
||
|
||
-#: ../data/com.kylinsec.kiran.xsettings.gschema.xml.in.h:7
|
||
+#: ../data/schemas/com.kylinsec.kiran.xsettings.gschema.xml.in.h:7
|
||
msgid "Name of icon theme to use for icons."
|
||
msgstr "系统使用的图标主题。"
|
||
|
||
-#: ../data/com.kylinsec.kiran.xsettings.gschema.xml.in.h:8
|
||
+#: ../data/schemas/com.kylinsec.kiran.xsettings.gschema.xml.in.h:8
|
||
msgid "Whether to play sounds on user events."
|
||
msgstr "是否在用户事件中播放声音。"
|
||
|
||
-#: ../data/com.kylinsec.kiran.xsettings.gschema.xml.in.h:9
|
||
+#: ../data/schemas/com.kylinsec.kiran.xsettings.gschema.xml.in.h:9
|
||
msgid "The XDG sound theme to use for event sounds."
|
||
msgstr "用于事件声音的XDG声音主题。"
|
||
|
||
-#: ../data/com.kylinsec.kiran.xsettings.gschema.xml.in.h:10
|
||
+#: ../data/schemas/com.kylinsec.kiran.xsettings.gschema.xml.in.h:10
|
||
msgid "Whether to play sounds on input events."
|
||
msgstr "是否在输入事件上播放声音。"
|
||
|
||
-#: ../data/com.kylinsec.kiran.xsettings.gschema.xml.in.h:11
|
||
+#: ../data/schemas/com.kylinsec.kiran.xsettings.gschema.xml.in.h:11
|
||
msgid "Whether to antialias Xft fonts; 0=no, 1=yes, -1=default."
|
||
msgstr "是否开启Xft字体抗锯齿;-1表示默认值。"
|
||
|
||
-#: ../data/com.kylinsec.kiran.xsettings.gschema.xml.in.h:12
|
||
+#: ../data/schemas/com.kylinsec.kiran.xsettings.gschema.xml.in.h:12
|
||
msgid "Whether to hint Xft fonts; 0=no, 1=yes, -1=default."
|
||
msgstr "是否开启Xft字体微调;-1表示默认值。"
|
||
|
||
-#: ../data/com.kylinsec.kiran.xsettings.gschema.xml.in.h:13
|
||
+#: ../data/schemas/com.kylinsec.kiran.xsettings.gschema.xml.in.h:13
|
||
msgid ""
|
||
"What degree of hinting to use; \"hintnone\", \"hintslight\", \"hintmedium\", "
|
||
"or \"hintfull\"."
|
||
msgstr "使用什么程度的微调。"
|
||
|
||
-#: ../data/com.kylinsec.kiran.xsettings.gschema.xml.in.h:14
|
||
+#: ../data/schemas/com.kylinsec.kiran.xsettings.gschema.xml.in.h:14
|
||
msgid ""
|
||
"Type of subpixel antialiasing; \"none\", \"rgb\", \"bgr\", \"vrgb\", \"vbgr"
|
||
"\"."
|
||
msgstr "抗锯齿次像素顺序。"
|
||
|
||
-#: ../data/com.kylinsec.kiran.xsettings.gschema.xml.in.h:15
|
||
+#: ../data/schemas/com.kylinsec.kiran.xsettings.gschema.xml.in.h:15
|
||
msgid ""
|
||
"Resolution for Xft, in 1024 * dots/inch. -1 to use default value. Do not "
|
||
"modify it manually."
|
||
msgstr "字体分辨率,请不要手动修改。"
|
||
|
||
-#: ../data/com.kylinsec.kiran.xsettings.gschema.xml.in.h:16
|
||
+#: ../data/schemas/com.kylinsec.kiran.xsettings.gschema.xml.in.h:16
|
||
msgid "Name of the cursor theme."
|
||
msgstr "光标主题。"
|
||
|
||
-#: ../data/com.kylinsec.kiran.xsettings.gschema.xml.in.h:17
|
||
+#: ../data/schemas/com.kylinsec.kiran.xsettings.gschema.xml.in.h:17
|
||
msgid "Size of the cursor referenced by cursor_theme."
|
||
msgstr "光标大小。"
|
||
|
||
-#: ../data/com.kylinsec.kiran.xsettings.gschema.xml.in.h:18
|
||
+#: ../data/schemas/com.kylinsec.kiran.xsettings.gschema.xml.in.h:18
|
||
msgid "Name of default font to use."
|
||
msgstr "GTK默认字体。"
|
||
|
||
-#: ../data/com.kylinsec.kiran.xsettings.gschema.xml.in.h:19
|
||
+#: ../data/schemas/com.kylinsec.kiran.xsettings.gschema.xml.in.h:19
|
||
msgid "Name of key theme RC file to load."
|
||
msgstr "GTK要加载的关键主题的名称。"
|
||
|
||
-#: ../data/com.kylinsec.kiran.xsettings.gschema.xml.in.h:20
|
||
+#: ../data/schemas/com.kylinsec.kiran.xsettings.gschema.xml.in.h:20
|
||
msgid ""
|
||
"Whether default toolbars have text only, text and icons, icons only, etc."
|
||
msgstr "默认工具栏是否只有文本、文本和图标、图标。"
|
||
|
||
-#: ../data/com.kylinsec.kiran.xsettings.gschema.xml.in.h:21
|
||
+#: ../data/schemas/com.kylinsec.kiran.xsettings.gschema.xml.in.h:21
|
||
msgid "Size of icons in default toolbars."
|
||
msgstr "默认工具栏中图标的大小。"
|
||
|
||
-#: ../data/com.kylinsec.kiran.xsettings.gschema.xml.in.h:22
|
||
+#: ../data/schemas/com.kylinsec.kiran.xsettings.gschema.xml.in.h:22
|
||
msgid "How to draw the input method preedit string."
|
||
msgstr "如何绘制输入法预编辑字符串。"
|
||
|
||
-#: ../data/com.kylinsec.kiran.xsettings.gschema.xml.in.h:23
|
||
+#: ../data/schemas/com.kylinsec.kiran.xsettings.gschema.xml.in.h:23
|
||
msgid "How to draw the input method statusbar."
|
||
msgstr "如何绘制输入法状态栏。"
|
||
|
||
-#: ../data/com.kylinsec.kiran.xsettings.gschema.xml.in.h:24
|
||
+#: ../data/schemas/com.kylinsec.kiran.xsettings.gschema.xml.in.h:24
|
||
msgid "Name of the input method module used by GTK+."
|
||
msgstr "GTK使用的输入法模块的名称。"
|
||
|
||
-#: ../data/com.kylinsec.kiran.xsettings.gschema.xml.in.h:25
|
||
+#: ../data/schemas/com.kylinsec.kiran.xsettings.gschema.xml.in.h:25
|
||
msgid "Whether images should be shown in menus."
|
||
msgstr "是否应在菜单中显示图像。"
|
||
|
||
-#: ../data/com.kylinsec.kiran.xsettings.gschema.xml.in.h:26
|
||
+#: ../data/schemas/com.kylinsec.kiran.xsettings.gschema.xml.in.h:26
|
||
msgid "Whether stock icons should be shown in buttons."
|
||
msgstr "图像是否显示在按钮中。"
|
||
|
||
-#: ../data/com.kylinsec.kiran.xsettings.gschema.xml.in.h:27
|
||
+#: ../data/schemas/com.kylinsec.kiran.xsettings.gschema.xml.in.h:27
|
||
msgid "The accelerator for moving the focus to the menubar."
|
||
msgstr "将焦点移动到菜单栏的加速器"
|
||
|
||
-#: ../data/com.kylinsec.kiran.xsettings.gschema.xml.in.h:28
|
||
+#: ../data/schemas/com.kylinsec.kiran.xsettings.gschema.xml.in.h:28
|
||
msgid ""
|
||
"A '\\n' separated list of \"name:color\" as defined by the 'gtk-color-"
|
||
"scheme' setting"
|
||
msgstr "颜色主题"
|
||
|
||
-#: ../data/com.kylinsec.kiran.xsettings.gschema.xml.in.h:29
|
||
+#: ../data/schemas/com.kylinsec.kiran.xsettings.gschema.xml.in.h:29
|
||
msgid ""
|
||
"Module to use as the filesystem model for the GtkFileChooser widget. "
|
||
"Possible values are \"gio\" and \"gtk+\"."
|
||
msgstr "用作GtkFileChooser小部件的文件系统模型的模块"
|
||
|
||
-#: ../data/com.kylinsec.kiran.xsettings.gschema.xml.in.h:30
|
||
+#: ../data/schemas/com.kylinsec.kiran.xsettings.gschema.xml.in.h:30
|
||
msgid ""
|
||
"This setting determines which buttons should be put in the titlebar of "
|
||
"client-side decorated windows, and whether they should be placed at the left "
|
||
@@ -247,48 +252,48 @@ msgid ""
|
||
msgstr ""
|
||
"此设置确定哪些按钮应放在客户端装饰窗口的标题栏中,以及是否应放在右侧的左侧。"
|
||
|
||
-#: ../data/com.kylinsec.kiran.xsettings.gschema.xml.in.h:31
|
||
+#: ../data/schemas/com.kylinsec.kiran.xsettings.gschema.xml.in.h:31
|
||
msgid ""
|
||
"This setting determines where application menu will be displayed - in a "
|
||
"window or on a panel with MenuModel protocol."
|
||
msgstr ""
|
||
"此设置确定应用程序菜单的显示位置,在窗口中或使用MenuModel协议的面板上。"
|
||
|
||
-#: ../data/com.kylinsec.kiran.xsettings.gschema.xml.in.h:32
|
||
+#: ../data/schemas/com.kylinsec.kiran.xsettings.gschema.xml.in.h:32
|
||
msgid ""
|
||
"This setting determines where window menubars will be displayed - in a "
|
||
"window or on a panel with MenuModel protocol."
|
||
msgstr "此设置确定窗口菜单栏的显示位置,在窗口中或使用MenuModel协议的面板上"
|
||
|
||
-#: ../data/com.kylinsec.kiran.xsettings.gschema.xml.in.h:33
|
||
+#: ../data/schemas/com.kylinsec.kiran.xsettings.gschema.xml.in.h:33
|
||
msgid ""
|
||
"Whether the context menus of entries and text views should offer to change "
|
||
"the input method."
|
||
msgstr "条目和文本视图的上下文菜单是否应提供更改输入法的功能。"
|
||
|
||
-#: ../data/com.kylinsec.kiran.xsettings.gschema.xml.in.h:34
|
||
+#: ../data/schemas/com.kylinsec.kiran.xsettings.gschema.xml.in.h:34
|
||
msgid ""
|
||
"Whether the context menus of entries and text views should offer to insert "
|
||
"control characters."
|
||
msgstr "条目和文本视图的上下文菜单是否应提供更改输入法的功能。"
|
||
|
||
-#: ../data/com.kylinsec.kiran.xsettings.gschema.xml.in.h:35
|
||
+#: ../data/schemas/com.kylinsec.kiran.xsettings.gschema.xml.in.h:35
|
||
msgid ""
|
||
"Whether mnemonics should be automatically shown and hidden when the user "
|
||
"presses the Alt key."
|
||
msgstr "当用户按Alt键时,助记符是否应自动显示和隐藏。"
|
||
|
||
-#: ../data/com.kylinsec.kiran.xsettings.gschema.xml.in.h:36
|
||
+#: ../data/schemas/com.kylinsec.kiran.xsettings.gschema.xml.in.h:36
|
||
msgid ""
|
||
"If true, gtk+ uses the primary paste selection, usually triggered by a "
|
||
"middle mouse button click."
|
||
msgstr "如果为true,gtk+将使用主粘贴选择,通常由鼠标中键单击触发。"
|
||
|
||
-#: ../data/com.kylinsec.kiran.xsettings.gschema.xml.in.h:37
|
||
+#: ../data/schemas/com.kylinsec.kiran.xsettings.gschema.xml.in.h:37
|
||
msgid "Whether to enable toolkit-wide animations."
|
||
msgstr "是否启用工具箱范围的动画。"
|
||
|
||
-#: ../data/com.kylinsec.kiran.xsettings.gschema.xml.in.h:38
|
||
+#: ../data/schemas/com.kylinsec.kiran.xsettings.gschema.xml.in.h:38
|
||
msgid ""
|
||
"Whether builtin GTK+ dialogs such as the file chooser, the color chooser or "
|
||
"the font chooser will use a header bar at the top to show action widgets, or "
|
||
@@ -297,13 +302,13 @@ msgstr ""
|
||
"无论是内置的GTK+对话框、文件选择器、颜色选择器或字体选择器,都将使用顶部的标"
|
||
"题栏或者底部的操作区域来显示操作小部件。"
|
||
|
||
-#: ../data/com.kylinsec.kiran.xsettings.gschema.xml.in.h:39
|
||
+#: ../data/schemas/com.kylinsec.kiran.xsettings.gschema.xml.in.h:39
|
||
msgid ""
|
||
"This controls the GTK scale factor that maps from window coordinates to the "
|
||
"actual device pixels."
|
||
msgstr "控制从窗口坐标映射到实际设备像素的GTK比例因子。"
|
||
|
||
-#: ../data/com.kylinsec.kiran.xsettings.gschema.xml.in.h:40
|
||
+#: ../data/schemas/com.kylinsec.kiran.xsettings.gschema.xml.in.h:40
|
||
msgid ""
|
||
"This setting determines whether MATE controls the scale factor for QT "
|
||
"applications."
|
||
@@ -836,6 +841,11 @@ msgstr "({0},错误码:0x{1:x})"
|
||
msgid "%b %d %Y"
|
||
msgstr "%Y年%m月%d日"
|
||
|
||
+#: ../plugins/display/display-manager.cpp:195
|
||
+msgid ""
|
||
+"The scaling rate can only take effect after logging out and logging in again"
|
||
+msgstr "缩放率需要注销后重新登录才能生效"
|
||
+
|
||
#: ../plugins/keybinding/custom-shortcut.h:25
|
||
msgid "Custom"
|
||
msgstr "自定义"
|
||
--
|
||
2.33.0
|
||
|