diff --git a/Makefile b/Makefile index 411c4c84..02a5fa1b 100644 --- a/Makefile +++ b/Makefile @@ -49,6 +49,9 @@ install: mkdir -p $(DESTDIR)$(PREFIX)/share/glib-2.0/schemas install -v -m0644 misc/schemas/*.xml $(DESTDIR)$(PREFIX)/share/glib-2.0/schemas/ + mkdir -p $(DESTDIR)$(PREFIX)/share/dsg/configs/org.deepin.startdde/ + install -v -m0644 misc/dsettings/*.json $(DESTDIR)$(PREFIX)/share/dsg/configs/org.deepin.startdde/ + mkdir -pv ${DESTDIR}${PREFIX}/share/locale cp -r out/locale/* ${DESTDIR}${PREFIX}/share/locale diff --git a/go.mod b/go.mod index 1040d6c9..f13b0657 100644 --- a/go.mod +++ b/go.mod @@ -5,11 +5,11 @@ go 1.20 require ( github.com/davecgh/go-spew v1.1.1 github.com/godbus/dbus/v5 v5.1.0 - github.com/linuxdeepin/dde-api v0.0.0-20230427024816-e46a1f75f190 - github.com/linuxdeepin/go-dbus-factory v0.0.0-20231107015654-3237acc2c551 + github.com/linuxdeepin/dde-api v0.0.0-20241128100002-d1fb4aa471f5 + github.com/linuxdeepin/go-dbus-factory v0.0.0-20241205055755-b43db97ea584 github.com/linuxdeepin/go-gir v0.0.0-20230413065249-b60cd1aca477 - github.com/linuxdeepin/go-lib v0.0.0-20240104021143-cce3c07f84f6 - github.com/linuxdeepin/go-x11-client v0.0.0-20230329071904-56c906e1ab5d + github.com/linuxdeepin/go-lib v0.0.0-20230406092403-b4b4282fc513 + github.com/linuxdeepin/go-x11-client v0.0.0-20230131052004-7503e2337ee1 github.com/stretchr/testify v1.8.2 golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c diff --git a/go.sum b/go.sum index 7f91c63a..7500793e 100644 --- a/go.sum +++ b/go.sum @@ -1,241 +1,72 @@ -github.com/PuerkitoBio/goquery v1.5.1/go.mod h1:GsLWisAFVj4WgDibEWF4pvYnkVQBpKBKeU+7zCJoLcc= github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/units v0.0.0-20211218093645-b94a6e3cc137/go.mod h1:OMCwj8VM1Kc9e19TLln2VL61YJF0x1XFtfdL4JdbSyE= -github.com/andybalholm/cascadia v1.1.0/go.mod h1:GsXiBklL0woXo1j/WYWtSYYC4ouU9PqHO0sqidkEA4Y= -github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= -github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= -github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/denisenkom/go-mssqldb v0.0.0-20191124224453-732737034ffd/go.mod h1:xbL0rPBG9cCiLr28tMa8zpbdarY27NDyej4t/EjAShU= -github.com/disintegration/imaging v1.6.2/go.mod h1:44/5580QXChDfwIclfc/PCwrr44amcmDAg8hxG0Ewe4= -github.com/erikstmartin/go-testdb v0.0.0-20160219214506-8d10e4a1bae5/go.mod h1:a2zkGnVExMxdzMo3M0Hi/3sEU+cWnZpSni0O6/Yb/P0= -github.com/fogleman/gg v1.3.0/go.mod h1:R/bRT+9gY/C5z7JzPU0zXsXHKM4/ayA+zqcVNZzPa1k= -github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= -github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= github.com/fsnotify/fsnotify v1.5.4/go.mod h1:OVB6XrOHzAwXMpEM7uPOzcehqUV2UqJxmVXmkdnm1bU= github.com/fsnotify/fsnotify v1.6.0 h1:n+5WquG0fcWoWp6xPWfHdbskMCQaFnG6PfBrh1Ky4HY= github.com/fsnotify/fsnotify v1.6.0/go.mod h1:sl3t1tCWJFWoRz9R8WJCbQihKKwmorjAbSClcnxKAGw= -github.com/go-logr/logr v1.2.3/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= -github.com/go-sql-driver/mysql v1.5.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg= -github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0/go.mod h1:fyg7847qk6SyHyPtNmDHnmrv/HOrqktSC+C9fM+CJOE= github.com/godbus/dbus/v5 v5.1.0 h1:4KLkAxT3aOY8Li4FRJe/KvhoNFFxo0m6fNuFUO8QJUk= github.com/godbus/dbus/v5 v5.1.0/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= -github.com/golang-sql/civil v0.0.0-20190719163853-cb61b32ac6fe/go.mod h1:8vg3r2VgvsThLBIFL93Qb5yWzgyZWhEmBwUJWevAkK0= -github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0/go.mod h1:E/TSTwGwJL78qG/PmXZO1EjYhfJinVAhrmmHX6Z8B9k= -github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= -github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA= -github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs= -github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w= -github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= -github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= -github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= -github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= -github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= -github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= -github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.8/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= -github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= -github.com/google/pprof v0.0.0-20210407192527-94a9f03dee38/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= -github.com/gosexy/gettext v0.0.0-20160830220431-74466a0a0c4a/go.mod h1:IEJaV4/6J0VpoQ33kFCUUP6umRjrcBVEbOva6XCub/Q= -github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= -github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= -github.com/jinzhu/gorm v1.9.16/go.mod h1:G3LB3wezTOWM2ITLzPxEXgSkOXAntiLHS7UdBefADcs= -github.com/jinzhu/inflection v1.0.0/go.mod h1:h+uFLlag+Qp1Va5pdKtLDYj+kHp5pxUVkryuEj+Srlc= -github.com/jinzhu/now v1.0.1/go.mod h1:d3SSVoowX0Lcu0IBviAWJpolVfI5UJVZZ7cO71lE/z8= github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= github.com/kr/pretty v0.2.1 h1:Fmg33tUaq4/8ym9TJN1x7sLJnHVwhP33CNkpYV/7rwI= github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= -github.com/lib/pq v1.1.1/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= -github.com/linuxdeepin/dde-api v0.0.0-20230427024816-e46a1f75f190 h1:o3qpI7XTA4bX9aqFp/bvPc1UvmVwvaYfikFZUNZZeIc= -github.com/linuxdeepin/dde-api v0.0.0-20230427024816-e46a1f75f190/go.mod h1:plHSVHmj6Uvkp2QGQEnc+kZFV/AUZcA2LM5FU8CYvy4= -github.com/linuxdeepin/go-dbus-factory v0.0.0-20230407013947-6ff704a21ca7/go.mod h1:iIlTR50SA8MJ9ORPyMOpKWMF4g+AUorbER5AX0RD9Jk= -github.com/linuxdeepin/go-dbus-factory v0.0.0-20231107015654-3237acc2c551 h1:9JXWCYNjoW/Q99Ytd2bpgaYyn3m3JHtB0hwHM5ubjkc= -github.com/linuxdeepin/go-dbus-factory v0.0.0-20231107015654-3237acc2c551/go.mod h1:iIlTR50SA8MJ9ORPyMOpKWMF4g+AUorbER5AX0RD9Jk= +github.com/linuxdeepin/dde-api v0.0.0-20241128100002-d1fb4aa471f5 h1:0OFQ7rwwGOAo45rluOYH7cOMBoBdXis4h1oFNyLteO4= +github.com/linuxdeepin/dde-api v0.0.0-20241128100002-d1fb4aa471f5/go.mod h1:Ms92CRDOjzkDmX1x0x6+b0vQSYHJ7Ab9jQMY2JYWiio= +github.com/linuxdeepin/go-dbus-factory v0.0.0-20241205055755-b43db97ea584 h1:LA2Nnk+rFgw1cSTpFLVpZk1o9VxYjLz9w8pVXGgDwVU= +github.com/linuxdeepin/go-dbus-factory v0.0.0-20241205055755-b43db97ea584/go.mod h1:iIlTR50SA8MJ9ORPyMOpKWMF4g+AUorbER5AX0RD9Jk= github.com/linuxdeepin/go-gir v0.0.0-20230331033513-a8d7a9e89f9b/go.mod h1:a0tox5vepTQu5iO6rdKc4diGT+fkyXZlRROM8ULEvaI= github.com/linuxdeepin/go-gir v0.0.0-20230413065249-b60cd1aca477 h1:IJkQFx4mLZPX9STHJ9XV3vIW8mwL8GrQcnK38a323R8= github.com/linuxdeepin/go-gir v0.0.0-20230413065249-b60cd1aca477/go.mod h1:a0tox5vepTQu5iO6rdKc4diGT+fkyXZlRROM8ULEvaI= +github.com/linuxdeepin/go-lib v0.0.0-20230406092403-b4b4282fc513 h1:4qux/rKQwaJSuEp9Vq2UN47cS9oM5JQZ84ajBv3m2uk= github.com/linuxdeepin/go-lib v0.0.0-20230406092403-b4b4282fc513/go.mod h1:KwMO4bz9iFACoMIIawtpx5S23T0uaYxr9uLcKZ37Y6E= -github.com/linuxdeepin/go-lib v0.0.0-20231107015720-6018bdcd69dd h1:ax5ac8oFSYZQqe7nDwcwlBIkVCSulOpZ/XeFhsEEJVc= -github.com/linuxdeepin/go-lib v0.0.0-20231107015720-6018bdcd69dd/go.mod h1:KwMO4bz9iFACoMIIawtpx5S23T0uaYxr9uLcKZ37Y6E= -github.com/linuxdeepin/go-lib v0.0.0-20240104021143-cce3c07f84f6 h1:91UegMf/Am7kGaTPmXaQAnCWzA2iHgVtSuB9Fcu3bpg= -github.com/linuxdeepin/go-lib v0.0.0-20240104021143-cce3c07f84f6/go.mod h1:yNoMFao1mE45M8zW6i83eaGpT9eriCWsXEdcVNQswpw= github.com/linuxdeepin/go-x11-client v0.0.0-20220830090948-78fe92b727bb/go.mod h1:KwpmRZ47A/0a2l9V0V6aTlkuNaqy5j1fOqMFJONuIMY= +github.com/linuxdeepin/go-x11-client v0.0.0-20230131052004-7503e2337ee1 h1:UZo2ftrgFtf5O4jtG0dJ+i/AeFy8LXjNewBRDhwzFxA= github.com/linuxdeepin/go-x11-client v0.0.0-20230131052004-7503e2337ee1/go.mod h1:KwpmRZ47A/0a2l9V0V6aTlkuNaqy5j1fOqMFJONuIMY= -github.com/linuxdeepin/go-x11-client v0.0.0-20230329071904-56c906e1ab5d h1:FYvSF95wgsMpah80xtLCOMqompAbjkaMRmn9RBMBzo8= -github.com/linuxdeepin/go-x11-client v0.0.0-20230329071904-56c906e1ab5d/go.mod h1:KwpmRZ47A/0a2l9V0V6aTlkuNaqy5j1fOqMFJONuIMY= -github.com/mattn/go-sqlite3 v1.14.0/go.mod h1:JIl7NbARA7phWnGvh0LKTyg7S9BA+6gx71ShQilpsus= -github.com/mattn/go-sqlite3 v1.14.16/go.mod h1:2eHXhiwb8IkHr+BDWZGa96P6+rkvnG63S2DGjv9HUNg= -github.com/mattn/goveralls v0.0.11/go.mod h1:gU8SyhNswsJKchEV93xRQxX6X3Ei4PJdQk/6ZHvrvRk= github.com/mozillazg/go-pinyin v0.19.0/go.mod h1:iR4EnMMRXkfpFVV5FMi4FNB6wGq9NV6uDWbUuPhP4Yc= -github.com/nfnt/resize v0.0.0-20180221191011-83c6a9932646/go.mod h1:jpp1/29i3P1S/RLdc7JQKbRpFeM1dOBd8T9ki5s+AY8= -github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A= -github.com/nxadm/tail v1.4.8/go.mod h1:+ncqLTQzXmGhMZNUePPaPqPvBxHAIsmXswZKocGu+AU= -github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= -github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk= -github.com/onsi/ginkgo v1.16.4/go.mod h1:dX+/inL/fNMqNlz0e9LfyB9TswhZpCVdJM/Z6Vvnwo0= -github.com/onsi/ginkgo/v2 v2.1.3/go.mod h1:vw5CSIxN1JObi/U8gcbwft7ZxR2dgaR70JSE3/PpL4c= -github.com/onsi/ginkgo/v2 v2.1.4/go.mod h1:um6tUpWM/cxCK3/FK8BXqEiUMUwRgSM4JXG47RKZmLU= -github.com/onsi/ginkgo/v2 v2.1.6/go.mod h1:MEH45j8TBi6u9BMogfbp0stKC5cdGjumZj5Y7AG4VIk= -github.com/onsi/ginkgo/v2 v2.3.0/go.mod h1:Eew0uilEqZmIEZr8JrvYlvOM7Rr6xzTmMV8AyFNU9d0= -github.com/onsi/ginkgo/v2 v2.4.0/go.mod h1:iHkDK1fKGcBoEHT5W7YBq4RFWaQulw+caOMkAt4OrFo= -github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= -github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= -github.com/onsi/gomega v1.17.0/go.mod h1:HnhC7FXeEQY45zxNK3PPoIUhzk/80Xly9PcubAlGdZY= -github.com/onsi/gomega v1.19.0/go.mod h1:LY+I3pBVzYsTBU1AnDwOSxaYi9WoWiqgwooUqq9yPro= -github.com/onsi/gomega v1.20.1/go.mod h1:DtrZpjmvpn2mPm4YWQa0/ALMDj9v4YxLgojwPeREyVo= -github.com/onsi/gomega v1.21.1/go.mod h1:iYAIXgPSaDHak0LCMA+AWBpIKBr8WZicMxnE8luStNc= -github.com/onsi/gomega v1.22.1/go.mod h1:x6n7VNe4hw0vkyYUM4mjIXx3JbLiPaBPNgB7PRQ1tuM= -github.com/onsi/gomega v1.24.0/go.mod h1:Z/NWtiqwBrwUt4/2loMmHL63EDLnYHmVbuBpDr2vQAg= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/rickb777/date v1.20.1/go.mod h1:9MqjVxT6a/AQTA4nxj9E6G3ksQiMESTn9/9kfE+CvwU= -github.com/rickb777/plural v1.4.1/go.mod h1:kdmXUpmKBJTS0FtG/TFumd//VBWsNTD7zOw7x4umxNw= github.com/smartystreets/assertions v1.2.0/go.mod h1:tcbTF8ujkAEcZ8TElKY+i30BzYlVhC/LOxJk7iOWnoo= github.com/smartystreets/goconvey v1.7.2/go.mod h1:Vw0tHAZW6lzCRk3xgdin6fKYcG+G3Pg9vgXWeJpQFMM= -github.com/sqs/goreturns v0.0.0-20181028201513-538ac6014518/go.mod h1:CKI4AZ4XmGV240rTHfO0hfE83S6/a3/Q1siZJ/vXf7A= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= github.com/stretchr/objx v0.5.0 h1:1zr/of2m5FGMsad5YfcqgdqdWrIhu+EBEJRhR1U7z/c= github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= -github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= -github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= github.com/stretchr/testify v1.8.2 h1:+h33VjcLVPDHtOdpUCuF+7gSuG3yGIftsP1YvFihtJ8= github.com/stretchr/testify v1.8.2/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= github.com/youpy/go-riff v0.1.0/go.mod h1:83nxdDV4Z9RzrTut9losK7ve4hUnxUR8ASSz4BsKXwQ= github.com/youpy/go-wav v0.3.2/go.mod h1:0FCieAXAeSdcxFfwLpRuEo0PFmAoc+8NU34h7TUvk50= -github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= -github.com/yuin/goldmark v1.4.1/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= -github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= github.com/zaf/g711 v0.0.0-20190814101024-76a4a538f52b/go.mod h1:T2h1zV50R/q0CVYnsQOQ6L7P4a2ZxH47ixWcMXFGyx8= -github.com/zaf/g711 v0.0.0-20220109202201-cf0017bf0359/go.mod h1:ySLGJD8AQluMQuu5JDvfJrwsBra+8iX1jFsKS8KfB2I= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= -golang.org/x/crypto v0.0.0-20190325154230-a5d413f7728c/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= -golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20191205180655-e7c4368fe9dd/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= -golang.org/x/crypto v0.1.0/go.mod h1:RecgLatLF4+eUMCP1PoPZQb+cVrJcOPbHkTkbkB9sbw= -golang.org/x/image v0.0.0-20191009234506-e7c1f5e7dbb8/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= golang.org/x/image v0.0.0-20220902085622-e7cb96979f69/go.mod h1:doUCurBvlfPMKfmIpRIywoHmhN3VyhnoFDbvIEWF4hY= -golang.org/x/image v0.10.0/go.mod h1:jtrku+n79PfroUbvDdeUWMAI+heR786BofxrbiSF+J0= -golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.6.0-dev.0.20220106191415-9b9b3d81d5e3/go.mod h1:3p9vT2HGsQu2K1YbXdKPJLVgG5VJdoTa1poYQBtP1AY= -golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= -golang.org/x/mod v0.6.0/go.mod h1:4mET923SAdbXp2ki8ey+zGs1SLqsuM2Y0uvdZR/fUNI= -golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= -golang.org/x/net v0.0.0-20180218175443-cbe0f9307d01/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200520004742-59133d7f0dd7/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= -golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= -golang.org/x/net v0.0.0-20210428140749-89ef3d95e781/go.mod h1:OJAsFXCWl8Ukc7SiCT/9KSuxbyM7479/AVlXFRxuMCk= -golang.org/x/net v0.0.0-20211015210444-4f30a5c0130f/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= -golang.org/x/net v0.0.0-20220425223048-2871e0cb64e4/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= -golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= -golang.org/x/net v0.1.0/go.mod h1:Cx3nUiGt4eDBEyega/BKRp+/AlGL8hYe7U9odMt2Cco= -golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= -golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190904154756-749cb33beabd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210112080510-489259a85091/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20211019181941-9d821ace8654/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220319134239-a9b59b0215f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220412211240-33da011f77ad/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220422013727-9388b58f7150/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.3.0 h1:w8ZOecv6NaNa/zC8944JTU3vz4u6Lagfk4RPQxv92NQ= -golang.org/x/sys v0.3.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.5.0 h1:MUK/U/4lj1t1oPg0HfuXDN/Z1wv31ZJ/YcPiGccS4DU= golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= -golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= -golang.org/x/term v0.1.0/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= -golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= -golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= -golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= -golang.org/x/text v0.11.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190328211700-ab21143f2384/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20201224043029-2b0845dc783e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.1.1/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= -golang.org/x/tools v0.1.10/go.mod h1:Uh6Zz+xoGYZom868N8YTex3t7RhtHDBrE8Gzo9bV56E= -golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= -golang.org/x/tools v0.2.0/go.mod h1:y4OqIKeOV/fWJetJ8bXPU1sEVniLMIyDAZWeHdV+NTA= -golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU= -golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 h1:H2TDz8ibqkAF6YGhCdN3jS9O0/s90v0rJh3X/OLHEUk= golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2/go.mod h1:K8+ghG5WaK9qNqU5K3HdILfMLy1f3aNYFI/wnl100a8= -google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= -google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= -google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= -google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE= -google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo= -google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= -google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= -google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= -gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= -gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= diff --git a/misc/dsettings/org.deepin.XSettings.json b/misc/dsettings/org.deepin.XSettings.json new file mode 100644 index 00000000..f6767d06 --- /dev/null +++ b/misc/dsettings/org.deepin.XSettings.json @@ -0,0 +1,348 @@ +{ + "magic": "dsg.config.meta", + "version": "1.0", + "contents": { + "theme-name": { + "value": "deepin", + "serial": 0, + "flags": [], + "name": "System theme", + "name[zh_CN]": "系统主题", + "description": "Theme to use for gtk+ and qt.", + "permissions": "readwrite", + "visibility": "private" + }, + "icon-theme-name": { + "value": "bloom", + "serial": 0, + "flags": [], + "name": "Icon theme", + "name[zh_CN]": "图标主题", + "description": "Icon theme to use for the panel, nautilus etc", + "permissions": "readwrite", + "visibility": "private" + }, + "icon-theme-fallback": { + "value": "default", + "serial": 0, + "flags": [], + "name": "Fallback icon theme", + "description": "Icon theme", + "permissions": "readwrite", + "visibility": "private" + }, + "sound-theme-name": { + "value": "deepin", + "serial": 0, + "flags": [], + "name": "System sound theme", + "name[zh_CN]": "系统音效", + "description": "Set the system sound theme", + "permissions": "readwrite", + "visibility": "private" + }, + "gtk-theme-name": { + "value": "deepin", + "serial": 0, + "flags": [], + "name": "Gtk+ theme", + "name[zh_CN]": "Gtk 主题", + "description": "Basename of the default theme used by gtk+.", + "permissions": "readwrite", + "visibility": "private" + }, + "gtk-cursor-theme-name": { + "value": "bloom", + "serial": 0, + "flags": [], + "name": "Cursor theme", + "name[zh_CN]": "光标主题", + "description": "Cursor theme name. Used only by Xservers that support the Xcursor extension.", + "permissions": "readwrite", + "visibility": "private" + }, + "gtk-font-name": { + "value": "sans-serif 10.5", + "serial": 0, + "flags": [], + "name": "Default font", + "name[zh_CN]": "默认字体", + "description": "Name of the default font used by gtk+.", + "permissions": "readwrite", + "visibility": "private" + }, + "gtk-key-theme-name": { + "value": "Default", + "serial": 0, + "flags": [], + "name": "Gtk+ Keybinding Theme", + "name[zh_CN]": "热键", + "description": "Basename of the default keybinding theme used by gtk+.", + "permissions": "readwrite", + "visibility": "private" + }, + "xft-hintstyle": { + "value": "hintfull", + "serial": 0, + "flags": [], + "name": "Xft hintstyle", + "description": "What degree of hinting to use; hintnone, hintslight, hintmedium, or hintfull.", + "permissions": "readwrite", + "visibility": "private" + }, + "xft-rgba": { + "value": "rgb", + "serial": 0, + "flags": [], + "name": "Xft RGBA", + "description": "Type of subpixel antialiasing; none, rgb, bgr, vrgb, vbgr.", + "permissions": "readwrite", + "visibility": "private" + }, + "cursor-blink-time": { + "value": 1200, + "serial": 0, + "flags": [], + "name": "Cursor Blink Time", + "name[zh_CN]": "光标闪烁间隔", + "description": "Length of the cursor blink cycle, in milliseconds.", + "permissions": "readwrite", + "visibility": "private" + }, + "gtk-cursor-blink-timeout": { + "value": 10, + "serial": 0, + "flags": [], + "name": "Cursor Blink Timeout", + "description": "Time after which the cursor stops blinking, in seconds.", + "permissions": "readwrite", + "visibility": "private" + }, + "double-click-time": { + "value": 250, + "serial": 0, + "flags": [], + "name": "Double click time", + "name[zh_CN]": "双击响应时间", + "description": "Maximum time allowed between two clicks for them to be considered a double click (in milliseconds).", + "permissions": "readwrite", + "visibility": "private" + }, + "double-click-distance": { + "value": 5, + "serial": 0, + "flags": [], + "name": "Double click distance", + "description": "Maximum distance allowed between two clicks for them to be considered a double click (in pixels).", + "permissions": "readwrite", + "visibility": "private" + }, + "dnd-drag-threshold": { + "value": 8, + "serial": 0, + "flags": [], + "name": "Dnd drag threshold", + "description": "A palette of named colors for use in themes.", + "permissions": "readwrite", + "visibility": "private" + }, + "gtk-cursor-theme-size": { + "value": 24, + "serial": 0, + "flags": [], + "name": "Timeout before click repeat", + "description": "Timeout in milliseconds before a click starts repeating (onspinner buttons for example).", + "permissions": "readwrite", + "visibility": "private" + }, + "gtk-recent-files-max-age": { + "value": 30, + "serial": 0, + "flags": [], + "name": "Gtk Recent Files Max Age", + "description": "The maximum age, in days, of the items inside the recently used resources list.\n Items older than this setting will be excised from the list.\n If set to 0, the list will always be empty; if set to -1, no item will be removed.", + "permissions": "readwrite", + "visibility": "private" + }, + "xft-dpi": { + "value": -1, + "serial": 0, + "flags": [], + "name": "Xft DPI", + "description": "Resolution for Xft, in 1024 * dots/inch. -1 to use default value.\n Do not modify it manually.", + "permissions": "readwrite", + "visibility": "private" + }, + "cursor-blink": { + "value": true, + "serial": 0, + "flags": [], + "name": "Cursor Blink", + "description": "Whether the cursor should blink.", + "permissions": "readwrite", + "visibility": "private" + }, + "enable-event-sounds": { + "value": true, + "serial": 0, + "flags": [], + "name": "Enable sound event", + "description": "Whether to play any event sounds at all.", + "permissions": "readwrite", + "visibility": "private" + }, + "enable-input-feedback-sounds": { + "value": true, + "serial": 0, + "flags": [], + "name": "Enable input feedback sounds", + "description": "Whether to play event sounds as feedback to user input.", + "permissions": "readwrite", + "visibility": "private" + }, + "gtk-recent-files-enabled": { + "value": true, + "serial": 0, + "flags": [], + "name": "Recent files enabled", + "description": "Whether GTK+ should keep track of items inside the recently used resources list.", + "permissions": "readwrite", + "visibility": "private" + }, + "xft-antialias": { + "value": true, + "serial": 0, + "flags": [], + "name": "Xft antialias", + "description": "Whether to antialias Xft fonts; 0=no, 1=yes, -1=default.", + "permissions": "readwrite", + "visibility": "private" + }, + "xft-hinting": { + "value": true, + "serial": 0, + "flags": [], + "name": "Xft hinting", + "description": "Whether to hint Xft fonts; 0=no, 1=yes, -1=default.", + "permissions": "readwrite", + "visibility": "private" + }, + "scale-factor": { + "value": 1.0, + "serial": 0, + "flags": [], + "name": "Text Scale Factor", + "description": "Text scale for Gdk.", + "permissions": "readwrite", + "visibility": "private" + }, + "window-scale": { + "value": 1, + "serial": 0, + "flags": [], + "name": "Gdk Window Scale Factor", + "description": "Window scale for Gdk.", + "permissions": "readwrite", + "visibility": "private" + }, + "individual-scaling": { + "value": "", + "serial": 0, + "flags": [], + "name": "Scaling factors for individual screen", + "description": "Semicolon-separated list of name=value pairs, as used in QT_SCREEN_SCALE_FACTORS.", + "permissions": "readwrite", + "visibility": "private" + }, + "qt-active-color": { + "value": "0,33153,65535,65535", + "serial": 0, + "flags": [], + "name": "Qt Active Color", + "description": "Qt Active Color", + "permissions": "readwrite", + "visibility": "private" + }, + "qt-dark-active-color": { + "value": "0,33153,65535,65535", + "serial": 0, + "flags": [], + "name": "Qt Dark Active Color", + "description": "Qt Active Color In Dark Theme", + "permissions": "readwrite", + "visibility": "private" + }, + "qt-scrollbar-policy": { + "value": 0, + "serial": 0, + "flags": [], + "name": "Qt Scrollbar Policy", + "description": "Qt Scrollbar Policy", + "permissions": "readwrite", + "visibility": "private" + }, + "dtk-size-mode": { + "value": 0, + "serial": 0, + "flags": [], + "name": "Dtk Size Mode", + "description": "Dtk Size Mode", + "permissions": "readwrite", + "visibility": "private" + }, + "qt-font-name": { + "value": "", + "serial": 0, + "flags": [], + "name": "Qt Font Name", + "description": "Qt Font Name", + "permissions": "readwrite", + "visibility": "private" + }, + "qt-mono-font-name": { + "value": "", + "serial": 0, + "flags": [], + "name": "Qt Mono Font Name", + "description": "Qt Mono Font Name", + "permissions": "readwrite", + "visibility": "private" + }, + "qt-font-point-size": { + "value": 10.5, + "serial": 0, + "flags": [], + "name": "Qt Font Point Size", + "description": "Qt Font Point Size", + "permissions": "readwrite", + "visibility": "private" + }, + "dtk-window-radius": { + "value": 8, + "serial": 0, + "flags": [], + "name": "Dtk Window Radius", + "description": "Dtk Window Radius", + "permissions": "readwrite", + "visibility": "private" + }, + "primary-monitor-name": { + "value": "eDP-1", + "serial": 0, + "flags": [], + "name": "Primary Monitor Name", + "description": "Primary Monitor Name", + "permissions": "readwrite", + "visibility": "private" + }, + "primary-monitor-rect": { + "value": "0-0-0-0", + "serial": 0, + "flags": [], + "name": "Primary Monitor Rect", + "description": "x,y,width,height of screen geometry", + "permissions": "readwrite", + "visibility": "private" + } + } +} \ No newline at end of file diff --git a/xsettings/scale.go b/xsettings/scale.go index 1222850f..eda97e51 100644 --- a/xsettings/scale.go +++ b/xsettings/scale.go @@ -40,20 +40,20 @@ const ( // 设置单个缩放值的关键方法 func (m *XSManager) setScaleFactor(scale float64, emitSignal bool) { logger.Debug("setScaleFactor", scale) - m.gs.SetDouble(gsKeyScaleFactor, scale) + m.cfgHelper.SetDouble(gsKeyScaleFactor, scale) // if 1.7 < scale < 2, window scale = 2 windowScale := int32(math.Trunc((scale+0.3)*10) / 10) if windowScale < 1 { windowScale = 1 } - oldWindowScale := m.gs.GetInt(gsKeyWindowScale) + oldWindowScale := m.cfgHelper.GetInt(gsKeyWindowScale) if oldWindowScale != windowScale { - m.gs.SetInt(gsKeyWindowScale, windowScale) + m.cfgHelper.SetInt(gsKeyWindowScale, windowScale) } cursorSize := int32(baseCursorSize * scale) - m.gs.SetInt(gsKeyGtkCursorThemeSize, cursorSize) + m.cfgHelper.SetInt(gsKeyGtkCursorThemeSize, cursorSize) // set cursor size for deepin-metacity gsWrapGDI := gio.NewSettings("com.deepin.wrap.gnome.desktop.interface") gsWrapGDI.SetInt("cursor-size", cursorSize) @@ -271,7 +271,7 @@ func (m *XSManager) setScreenScaleFactors(factors map[string]float64, emitSignal // 关键保存位置 factorsJoined := joinScreenScaleFactors(factors) - m.gs.SetString(gsKeyIndividualScaling, factorsJoined) + m.cfgHelper.SetString(gsKeyIndividualScaling, factorsJoined) err = m.setScreenScaleFactorsForQt(factors) if err != nil { @@ -287,7 +287,7 @@ func (m *XSManager) setScreenScaleFactors(factors map[string]float64, emitSignal } func (m *XSManager) getScreenScaleFactors() map[string]float64 { - factorsJoined := m.gs.GetString(gsKeyIndividualScaling) + factorsJoined := m.cfgHelper.GetString(gsKeyIndividualScaling) return parseScreenFactors(factorsJoined) } diff --git a/xsettings/utils_dconfig.go b/xsettings/utils_dconfig.go new file mode 100644 index 00000000..c0c3834e --- /dev/null +++ b/xsettings/utils_dconfig.go @@ -0,0 +1,185 @@ +package xsettings + +import ( + "github.com/godbus/dbus/v5" + configManager "github.com/linuxdeepin/go-dbus-factory/org.desktopspec.ConfigManager" + "github.com/linuxdeepin/go-lib/dbusutil" + "github.com/linuxdeepin/go-lib/strv" +) + +type DConfig struct { + conn *dbus.Conn + c configManager.Manager + gs *GSConfig //for sync + keyList []string +} + +func NewDSConfig(conn *dbus.Conn) *DConfig { + dsg := configManager.NewConfigManager(conn) + XSettingsConfigManagerPath, err := dsg.AcquireManager(0, dsettingsAppID, dsettingsXSettingsName, "") + if err != nil { + logger.Warning(err) + return nil + } + dConfigManager, err := configManager.NewManager(conn, XSettingsConfigManagerPath) + if err != nil { + logger.Warning(err) + return nil + } + keyList, _ := dConfigManager.KeyList().Get(0) + return &DConfig{ + c: dConfigManager, + conn: conn, + keyList: keyList, + gs: NewGSConfig(), + } +} + +func (d *DConfig) ListKeys() []string { + return d.keyList +} + +func (d *DConfig) hasKey(key string) bool { + if !strv.Strv(d.keyList).Contains(key) { + logger.Warningf("key %v not found in dconfig", key) + return false + } + return true +} + +func (d *DConfig) GetString(key string) string { + if !d.hasKey(key) { + return "" + } + value, err := d.c.Value(0, key) + if err != nil { + logger.Warning(err) + return "" + } + v, ok := value.Value().(string) + if !ok { + logger.Warningf("key %v type is not string, real is:%T", key, value.Value()) + return "" + } + return v +} + +func (d *DConfig) GetInt(key string) int32 { + if !d.hasKey(key) { + return -1 + } + value, err := d.c.Value(0, key) + if err != nil { + logger.Warning(err) + return -1 + } + v, ok := value.Value().(int64) + if !ok { + logger.Warningf("key %v type is not int, real is:%T", key, value.Value()) + return -1 + } + return int32(v) +} + +func (d *DConfig) GetBoolean(key string) bool { + if !d.hasKey(key) { + return false + } + value, err := d.c.Value(0, key) + if err != nil { + logger.Warning(err) + return false + } + v, ok := value.Value().(bool) + if !ok { + logger.Warningf("key %v type is not bool, real is:%T", key, value.Value()) + return false + } + return v +} + +func (d *DConfig) GetDouble(key string) float64 { + if !d.hasKey(key) { + return -1 + } + value, err := d.c.Value(0, key) + if err != nil { + logger.Warning(err) + return -1 + } + v, ok := value.Value().(float64) + if !ok { + // TODO: dconfig float64的类型处理有问题,待该问题解决后去掉该代码 + logger.Warningf("key %v type is not float64, real is:%T", key, value.Value()) + v1, ok := value.Value().(int64) + if !ok { + logger.Warningf("key %v type is not int64, real is:%T", key, value.Value()) + return -1 + } + v = float64(v1) + } + return v +} + +func (d *DConfig) SetString(key string, value string) bool { + if !d.hasKey(key) { + return false + } + if err := d.c.SetValue(0, key, dbus.MakeVariant(value)); err != nil { + logger.Warning(err) + return false + } + if d.gs != nil { + d.gs.SetString(key, value) + } + return true +} + +func (d *DConfig) SetInt(key string, value int32) bool { + if !d.hasKey(key) { + return false + } + if err := d.c.SetValue(0, key, dbus.MakeVariant(value)); err != nil { + logger.Warning(err) + return false + } + if d.gs != nil { + d.gs.SetInt(key, value) + } + return true +} + +func (d *DConfig) SetBoolean(key string, value bool) bool { + if !d.hasKey(key) { + return false + } + if err := d.c.SetValue(0, key, dbus.MakeVariant(value)); err != nil { + logger.Warning(err) + return false + } + if d.gs != nil { + d.gs.SetBoolean(key, value) + } + return true +} + +func (d *DConfig) SetDouble(key string, value float64) bool { + if !d.hasKey(key) { + return false + } + if err := d.c.SetValue(0, key, dbus.MakeVariant(value)); err != nil { + logger.Warning(err) + return false + } + if d.gs != nil { + d.gs.SetDouble(key, value) + } + return true +} + +func (d *DConfig) HandleConfigChanged(cb func(string)) { + systemSigLoop := dbusutil.NewSignalLoop(d.conn, 10) + systemSigLoop.Start() + d.c.InitSignalExt(systemSigLoop, true) + _, _ = d.c.ConnectValueChanged(cb) +} diff --git a/xsettings/utils_gsettings.go b/xsettings/utils_gsettings.go new file mode 100644 index 00000000..9ccbe712 --- /dev/null +++ b/xsettings/utils_gsettings.go @@ -0,0 +1,93 @@ +package xsettings + +import ( + "github.com/linuxdeepin/go-gir/gio-2.0" + "github.com/linuxdeepin/go-lib/gsettings" + "github.com/linuxdeepin/go-lib/strv" +) + +type GSConfig struct { + gs *gio.Settings + keyList []string +} + +func NewGSConfig() *GSConfig { + gs := gio.NewSettings(xsSchema) + keyList := gs.ListKeys() + return &GSConfig{ + gs: gs, + keyList: keyList, + } +} + +func (gc *GSConfig) ListKeys() []string { + return gc.keyList +} + +func (gc *GSConfig) hasKey(key string) bool { + if !strv.Strv(gc.keyList).Contains(key) { + logger.Warning("key %v not found in dconfig", key) + return false + } + return true +} + +func (gc *GSConfig) GetString(key string) string { + if !gc.hasKey(key) { + return "" + } + return gc.gs.GetString(key) +} + +func (gc *GSConfig) GetInt(key string) int32 { + if !gc.hasKey(key) { + return -1 + } + return gc.gs.GetInt(key) +} + +func (gc *GSConfig) GetBoolean(key string) bool { + if !gc.hasKey(key) { + return false + } + return gc.gs.GetBoolean(key) +} + +func (gc *GSConfig) GetDouble(key string) float64 { + if !gc.hasKey(key) { + return -1 + } + return gc.gs.GetDouble(key) +} + +func (gc *GSConfig) SetString(key string, value string) bool { + if !gc.hasKey(key) { + return false + } + return gc.gs.SetString(key, value) +} + +func (gc *GSConfig) SetInt(key string, value int32) bool { + if !gc.hasKey(key) { + return false + } + return gc.gs.SetInt(key, value) +} + +func (gc *GSConfig) SetBoolean(key string, value bool) bool { + if !gc.hasKey(key) { + return false + } + return gc.gs.SetBoolean(key, value) +} + +func (gc *GSConfig) SetDouble(key string, value float64) bool { + if !gc.hasKey(key) { + return false + } + return gc.gs.SetDouble(key, value) +} + +func (d *GSConfig) HandleConfigChanged(cb func(string)) { + gsettings.ConnectChanged(xsSchema, "*", cb) +} diff --git a/xsettings/xsettings.go b/xsettings/xsettings.go index cd096d57..6cb716e6 100644 --- a/xsettings/xsettings.go +++ b/xsettings/xsettings.go @@ -11,11 +11,11 @@ import ( "sync" dbus "github.com/godbus/dbus/v5" + configManager "github.com/linuxdeepin/go-dbus-factory/org.desktopspec.ConfigManager" ddeSysDaemon "github.com/linuxdeepin/go-dbus-factory/system/org.deepin.dde.daemon1" greeter "github.com/linuxdeepin/go-dbus-factory/system/org.deepin.dde.greeter1" gio "github.com/linuxdeepin/go-gir/gio-2.0" "github.com/linuxdeepin/go-lib/dbusutil" - "github.com/linuxdeepin/go-lib/gsettings" "github.com/linuxdeepin/go-lib/log" x "github.com/linuxdeepin/go-x11-client" ) @@ -26,9 +26,11 @@ const ( xsSchema = "com.deepin.xsettings" defaultScaleFactor = 1.0 - xsDBusService = "org.deepin.dde.XSettings1" - xsDBusPath = "/org/deepin/dde/XSettings1" - xsDBusIFC = xsDBusService + xsDBusService = "org.deepin.dde.XSettings1" + xsDBusPath = "/org/deepin/dde/XSettings1" + xsDBusIFC = xsDBusService + dsettingsAppID = "org.deepin.startdde" + dsettingsXSettingsName = "org.deepin.XSettings" ) type displayScaleFactorsHelper interface { @@ -37,6 +39,20 @@ type displayScaleFactorsHelper interface { SetChangedCb(fn func(factors map[string]float64) error) } +// 配置接口,gsetting或者dconfig +type configHeler interface { + ListKeys() []string + GetString(key string) string + GetInt(key string) int32 + GetBoolean(key string) bool + GetDouble(key string) float64 + SetString(key string, value string) bool + SetInt(key string, value int32) bool + SetBoolean(key string, value bool) bool + SetDouble(key string, value float64) bool + HandleConfigChanged(cb func(string)) +} + var logger = log.NewLogger("xsettings") // XSManager xsettings manager @@ -45,7 +61,7 @@ type XSManager struct { conn *x.Conn owner x.Window - gs *gio.Settings + cfgHelper configHeler greeter greeter.Greeter sysDaemon ddeSysDaemon.Daemon @@ -58,6 +74,7 @@ type XSManager struct { // locker for xsettings prop read and write settingsLocker sync.RWMutex dsfHelper displayScaleFactorsHelper + dConfigManager configManager.Manager //nolint signals *struct { @@ -75,7 +92,6 @@ func NewXSManager(conn *x.Conn, recommendedScaleFactor float64, service *dbusuti var m = &XSManager{ conn: conn, service: service, - gs: _gs, dsfHelper: helper, } @@ -97,6 +113,10 @@ func NewXSManager(conn *x.Conn, recommendedScaleFactor float64, service *dbusuti } m.greeter = greeter.NewGreeter(systemBus) m.sysDaemon = ddeSysDaemon.NewDaemon(systemBus) + m.cfgHelper = NewDSConfig(systemBus) + if m.cfgHelper == nil { + return nil, fmt.Errorf("new dconfig failed") + } m.handleLocalCenterSF() m.adjustScaleFactor(recommendedScaleFactor) @@ -114,11 +134,7 @@ func (m *XSManager) GetInterfaceName() string { var _gs *gio.Settings -func GetScaleFactor() float64 { - return getScaleFactor() -} - -func getScaleFactor() float64 { +func (m *XSManager) getScaleFactor() float64 { scale := _gs.GetDouble(gsKeyScaleFactor) return scale } @@ -180,7 +196,7 @@ func (m *XSManager) handleLocalCenterSF() { func (m *XSManager) adjustScaleFactor(recommendedScaleFactor float64) { logger.Debug("recommended scale factor:", recommendedScaleFactor) var err error - if m.gs.GetUserValue(gsKeyScaleFactor) == nil && + if m.cfgHelper.GetDouble(gsKeyScaleFactor) <= 0 && recommendedScaleFactor != defaultScaleFactor { err = m.setScaleFactorWithoutNotify(recommendedScaleFactor) if err != nil { @@ -191,7 +207,7 @@ func (m *XSManager) adjustScaleFactor(recommendedScaleFactor float64) { // migrate old configuration if os.Getenv("STARTDDE_MIGRATE_SCALE_FACTOR") != "" { - scaleFactor := getScaleFactor() + scaleFactor := m.getScaleFactor() err = m.setScreenScaleFactorsForQt(map[string]float64{"": scaleFactor}) if err != nil { logger.Warning("failed to set scale factor for qt:", err) @@ -208,7 +224,7 @@ func (m *XSManager) adjustScaleFactor(recommendedScaleFactor float64) { if err != nil { if os.IsNotExist(err) { // lightdm-deepin-greeter does not have the qt-theme.ini file yet. - scaleFactor := getScaleFactor() + scaleFactor := m.getScaleFactor() if scaleFactor != defaultScaleFactor { err = m.setScreenScaleFactorsForQt(map[string]float64{"": scaleFactor}) if err != nil { @@ -262,13 +278,13 @@ func (m *XSManager) setSettings(settings []xsSetting) error { func (m *XSManager) getSettingsInSchema() []xsSetting { var settings []xsSetting - for _, key := range m.gs.ListKeys() { + for _, key := range m.cfgHelper.ListKeys() { info := gsInfos.getByGSKey(key) if info == nil { continue } - value, err := info.getValue(m.gs) + value, err := info.getValue(m.cfgHelper) if err != nil { logger.Warning(err) continue @@ -283,49 +299,47 @@ func (m *XSManager) getSettingsInSchema() []xsSetting { return settings } -func (m *XSManager) handleGSettingsChanged() { - gsettings.ConnectChanged(xsSchema, "*", func(key string) { - switch key { - case "xft-dpi": - return - case gsKeyScaleFactor: - // 删除m.updateDPI(),保证设置屏幕缩放比例不会立刻生效 - return - case "gtk-cursor-theme-name": - updateXResources(xresourceInfos{ - &xresourceInfo{ - key: "Xcursor.theme", - value: m.gs.GetString("gtk-cursor-theme-name"), - }, - }) - case gsKeyGtkCursorThemeSize: - // 删除updateXResources,阻止设置屏幕缩放后,修改光标大小 - return - case gsKeyWindowScale: - // 删除m.updateDPI(),保证设置屏幕缩放比例不会立刻生效 - return - } - info := gsInfos.getByGSKey(key) - if info == nil { - return - } +func (m *XSManager) handleGSettingsChangedCb(key string) { + switch key { + case "xft-dpi": + return + case gsKeyScaleFactor: + // 删除m.updateDPI(),保证设置屏幕缩放比例不会立刻生效 + return + case "gtk-cursor-theme-name": + updateXResources(xresourceInfos{ + &xresourceInfo{ + key: "Xcursor.theme", + value: m.cfgHelper.GetString("gtk-cursor-theme-name"), + }, + }) + case gsKeyGtkCursorThemeSize: + // 删除updateXResources,阻止设置屏幕缩放后,修改光标大小 + return + case gsKeyWindowScale: + // 删除m.updateDPI(),保证设置屏幕缩放比例不会立刻生效 + return + } + info := gsInfos.getByGSKey(key) + if info == nil { + return + } - value, err := info.getValue(m.gs) - if err == nil { - err = m.setSettings([]xsSetting{ - { - sType: info.getKeySType(), - prop: info.xsKey, - value: value, - }, - }) - if err != nil { - logger.Warning(err) - } - } else { + value, err := info.getValue(m.cfgHelper) + if err == nil { + err = m.setSettings([]xsSetting{ + { + sType: info.getKeySType(), + prop: info.xsKey, + value: value, + }, + }) + if err != nil { logger.Warning(err) } - }) + } else { + logger.Warning(err) + } } // Start load xsettings module @@ -351,7 +365,7 @@ func Start(conn *x.Conn, recommendedScaleFactor float64, service *dbusutil.Servi return nil, err } - m.handleGSettingsChanged() + m.cfgHelper.HandleConfigChanged(m.handleGSettingsChangedCb) return m, nil } diff --git a/xsettings/xsettings_dpi.go b/xsettings/xsettings_dpi.go index ff37db6f..a137e798 100644 --- a/xsettings/xsettings_dpi.go +++ b/xsettings/xsettings_dpi.go @@ -24,15 +24,15 @@ const ( // TODO: update 'antialias, hinting, hintstyle, rgba, cursor-theme, cursor-size' func (m *XSManager) updateDPI() { - scale := m.gs.GetDouble(gsKeyScaleFactor) + scale := m.cfgHelper.GetDouble(gsKeyScaleFactor) if scale <= 0 { scale = 1 } var infos []xsSetting scaledDPI := int32(float64(DPI_FALLBACK*1024) * scale) - if scaledDPI != m.gs.GetInt("xft-dpi") { - m.gs.SetInt("xft-dpi", scaledDPI) + if scaledDPI != m.cfgHelper.GetInt("xft-dpi") { + m.cfgHelper.SetInt("xft-dpi", scaledDPI) infos = append(infos, xsSetting{ sType: settingTypeInteger, prop: "Xft/DPI", @@ -41,11 +41,11 @@ func (m *XSManager) updateDPI() { } // update window scale and cursor size - windowScale := m.gs.GetInt(gsKeyWindowScale) + windowScale := m.cfgHelper.GetInt(gsKeyWindowScale) if windowScale > 1 { scaledDPI = int32(DPI_FALLBACK * 1024) } - cursorSize := m.gs.GetInt(gsKeyGtkCursorThemeSize) + cursorSize := m.cfgHelper.GetInt(gsKeyGtkCursorThemeSize) v, _ := m.GetInteger("Gdk/WindowScalingFactor") if v != windowScale { infos = append(infos, xsSetting{ @@ -73,16 +73,16 @@ func (m *XSManager) updateDPI() { } func (m *XSManager) updateXResources() { - scaleFactor := m.gs.GetDouble(gsKeyScaleFactor) + scaleFactor := m.cfgHelper.GetDouble(gsKeyScaleFactor) xftDpi := int(DPI_FALLBACK * scaleFactor) updateXResources(xresourceInfos{ &xresourceInfo{ key: "Xcursor.theme", - value: m.gs.GetString("gtk-cursor-theme-name"), + value: m.cfgHelper.GetString("gtk-cursor-theme-name"), }, &xresourceInfo{ key: "Xcursor.size", - value: fmt.Sprintf("%d", m.gs.GetInt(gsKeyGtkCursorThemeSize)), + value: fmt.Sprintf("%d", m.cfgHelper.GetInt(gsKeyGtkCursorThemeSize)), }, &xresourceInfo{ key: "Xft.dpi", @@ -94,7 +94,7 @@ func (m *XSManager) updateXResources() { var ffDir = path.Join(os.Getenv("HOME"), ".mozilla/firefox") func (m *XSManager) updateFirefoxDPI() { - scale := m.gs.GetDouble(gsKeyScaleFactor) + scale := m.cfgHelper.GetDouble(gsKeyScaleFactor) if scale <= 0 { // firefox default value: -1 scale = -1 diff --git a/xsettings/xsettings_ifc.go b/xsettings/xsettings_ifc.go index fe778ce5..ddec37a4 100644 --- a/xsettings/xsettings_ifc.go +++ b/xsettings/xsettings_ifc.go @@ -165,11 +165,11 @@ func (m *XSManager) setGSettingsByXProp(prop string, v interface{}) error { return errPropNotFound } - return info.setValue(m.gs, v) + return info.setValue(m.cfgHelper, v) } func (m *XSManager) GetScaleFactor() (float64, *dbus.Error) { - return getScaleFactor(), nil + return m.getScaleFactor(), nil } func (m *XSManager) SetScaleFactor(scale float64) *dbus.Error { diff --git a/xsettings/xsettings_info.go b/xsettings/xsettings_info.go index 78fffb6d..7e57da6c 100644 --- a/xsettings/xsettings_info.go +++ b/xsettings/xsettings_info.go @@ -10,8 +10,6 @@ import ( "math" "strconv" "strings" - - "github.com/linuxdeepin/go-gir/gio-2.0" ) const ( @@ -400,7 +398,7 @@ func (info *typeGSKeyInfo) getKeySType() uint8 { return settingTypeInteger } -func (info *typeGSKeyInfo) getValue(s *gio.Settings) (result interface{}, err error) { +func (info *typeGSKeyInfo) getValue(s configHeler) (result interface{}, err error) { switch info.gsType { case gsKeyTypeBool: v := s.GetBoolean(info.gsKey) @@ -423,7 +421,7 @@ func (info *typeGSKeyInfo) getValue(s *gio.Settings) (result interface{}, err er return } -func (info *typeGSKeyInfo) setValue(s *gio.Settings, v interface{}) error { +func (info *typeGSKeyInfo) setValue(s configHeler, v interface{}) error { var err error if info.convertXsToGs != nil { v, err = info.convertXsToGs(v)