thinkpad.ui 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <interface domain="thinkpad-battery-threshold@marcosdalvarez.org">
  3. <template class="ThinkpadPrefs" parent="AdwPreferencesPage">
  4. <property name="name">thinkpad</property>
  5. <property name="title" translatable="yes">Thresholds</property>
  6. <property name="icon-name">battery-symbolic</property>
  7. <child>
  8. <object class="AdwPreferencesGroup" id="bat0_group">
  9. <property name="title" translatable="yes">Main battery (BAT0)</property>
  10. <property name="description" translatable="yes">The changes will be applied by reactivating the thresholds or from the menu</property>
  11. <property name="header-suffix">
  12. <object class="GtkButton" id="apply_bat0">
  13. <property name="valign">center</property>
  14. <property name="margin-start">6</property>
  15. <property name="visible">false</property>
  16. <child>
  17. <object class="AdwButtonContent">
  18. <property name="icon-name">object-select-symbolic</property>
  19. <property name="label" translatable="yes">Apply</property>
  20. </object>
  21. </child>
  22. <style>
  23. <class name="suggested-action" />
  24. </style>
  25. </object>
  26. </property>
  27. <child>
  28. <object class="AdwSpinRow" id="start_bat0">
  29. <property name="title" translatable="yes">Charging start value</property>
  30. <property name="subtitle" translatable="yes">Start charging when the level is below this value</property>
  31. <property name="snap-to-ticks">true</property>
  32. <property name="update-policy">if-valid</property>
  33. <property name="adjustment">
  34. <object class="GtkAdjustment">
  35. <property name="page-increment">5.0</property>
  36. <property name="step-increment">1.0</property>
  37. <property name="upper">99.0</property>
  38. <property name="lower">0.0</property>
  39. <property name="value">75.0</property>
  40. </object>
  41. </property>
  42. </object>
  43. </child>
  44. <child>
  45. <object class="AdwSpinRow" id="end_bat0">
  46. <property name="title" translatable="yes">Charging stop value</property>
  47. <property name="subtitle" translatable="yes">Stop charging when the level is above this value</property>
  48. <property name="snap-to-ticks">true</property>
  49. <property name="update-policy">if-valid</property>
  50. <property name="adjustment">
  51. <object class="GtkAdjustment">
  52. <property name="page-increment">5.0</property>
  53. <property name="step-increment">1.0</property>
  54. <property name="upper">100.0</property>
  55. <property name="lower">1.0</property>
  56. <property name="value">80.0</property>
  57. </object>
  58. </property>
  59. </object>
  60. </child>
  61. <child>
  62. <object class="AdwSpinRow" id="disabled_start_bat0">
  63. <property name="title" translatable="yes">Start value considered disabled</property>
  64. <property name="subtitle" translatable="yes">The start threshold value that is considered disabled is not the same on all laptops (usually 0 or 95). We will try to automatically detect this value, but if you can't turn off the thresholds, try changing it manually (use -1 to automatically detect it)</property>
  65. <property name="snap-to-ticks">true</property>
  66. <property name="update-policy">if-valid</property>
  67. <property name="adjustment">
  68. <object class="GtkAdjustment">
  69. <property name="page-increment">5.0</property>
  70. <property name="step-increment">1.0</property>
  71. <property name="upper">99.0</property>
  72. <property name="lower">-1.0</property>
  73. <property name="value">-1.0</property>
  74. </object>
  75. </property>
  76. </object>
  77. </child>
  78. <child>
  79. <object class="GtkRevealer" id="warn_bat0">
  80. <property name="reveal-child">true</property>
  81. <child>
  82. <object class="GtkBox">
  83. <property name="orientation">GTK_ORIENTATION_HORIZONTAL</property>
  84. <property name="spacing">12</property>
  85. <property name="margin-start">6</property>
  86. <property name="margin-end">6</property>
  87. <property name="margin-top">6</property>
  88. <property name="margin-bottom">6</property>
  89. <child>
  90. <object class="GtkImage">
  91. <property name="icon-name">dialog-warning</property>
  92. <property name="css-classes">warning</property>
  93. <property name="icon-size">GTK_ICON_SIZE_LARGE</property>
  94. </object>
  95. </child>
  96. <child>
  97. <object class="GtkBox">
  98. <property name="orientation">GTK_ORIENTATION_VERTICAL</property>
  99. <child>
  100. <object class="GtkLabel">
  101. <property name="label" translatable="yes">WARNING</property>
  102. <property name="css-classes">warning</property>
  103. <property name="wrap">true</property>
  104. <property name="hexpand">true</property>
  105. <property name="justify">GTK_JUSTIFY_CENTER</property>
  106. <attributes>
  107. <attribute name="weight" value="PANGO_WEIGHT_BOLD"/>
  108. </attributes>
  109. </object>
  110. </child>
  111. <child>
  112. <object class="GtkLabel">
  113. <property name="wrap">true</property>
  114. <property name="hexpand">true</property>
  115. <property name="justify">GTK_JUSTIFY_CENTER</property>
  116. <property name="label" translatable="yes">The configured threshold values are equal to the values considered "disabled"</property>
  117. </object>
  118. </child>
  119. </object>
  120. </child>
  121. </object>
  122. </child>
  123. </object>
  124. </child>
  125. </object>
  126. </child>
  127. <child>
  128. <object class="AdwPreferencesGroup" id="bat1_group">
  129. <property name="title" translatable="yes">Secondary battery (BAT1)</property>
  130. <property name="description" translatable="yes">The changes will be applied by reactivating the thresholds or from the menu</property>
  131. <property name="header-suffix">
  132. <object class="GtkButton" id="apply_bat1">
  133. <property name="valign">center</property>
  134. <property name="margin-start">6</property>
  135. <property name="visible">false</property>
  136. <child>
  137. <object class="AdwButtonContent">
  138. <property name="icon-name">object-select-symbolic</property>
  139. <property name="label" translatable="yes">Apply</property>
  140. </object>
  141. </child>
  142. <style>
  143. <class name="suggested-action" />
  144. </style>
  145. </object>
  146. </property>
  147. <child>
  148. <object class="AdwSpinRow" id="start_bat1">
  149. <property name="title" translatable="yes">Charging start value</property>
  150. <property name="subtitle" translatable="yes">Start charging when the level is below this value</property>
  151. <property name="snap-to-ticks">true</property>
  152. <property name="update-policy">if-valid</property>
  153. <property name="adjustment">
  154. <object class="GtkAdjustment">
  155. <property name="page-increment">5.0</property>
  156. <property name="step-increment">1.0</property>
  157. <property name="upper">99.0</property>
  158. <property name="lower">0.0</property>
  159. <property name="value">75.0</property>
  160. </object>
  161. </property>
  162. </object>
  163. </child>
  164. <child>
  165. <object class="AdwSpinRow" id="end_bat1">
  166. <property name="title" translatable="yes">Charging stop value</property>
  167. <property name="subtitle" translatable="yes">Stop charging when the level is above this value</property>
  168. <property name="snap-to-ticks">true</property>
  169. <property name="update-policy">if-valid</property>
  170. <property name="adjustment">
  171. <object class="GtkAdjustment">
  172. <property name="page-increment">5.0</property>
  173. <property name="step-increment">1.0</property>
  174. <property name="upper">100.0</property>
  175. <property name="lower">1.0</property>
  176. <property name="value">80.0</property>
  177. </object>
  178. </property>
  179. </object>
  180. </child>
  181. <child>
  182. <object class="AdwSpinRow" id="disabled_start_bat1">
  183. <property name="title" translatable="yes">Start value considered disabled</property>
  184. <property name="subtitle" translatable="yes">The start threshold value that is considered disabled is not the same on all laptops (usually 0 or 95). We will try to automatically detect this value, but if you can't turn off the thresholds, try changing it manually (use -1 to automatically detect it)</property>
  185. <property name="snap-to-ticks">true</property>
  186. <property name="update-policy">if-valid</property>
  187. <property name="adjustment">
  188. <object class="GtkAdjustment">
  189. <property name="page-increment">5.0</property>
  190. <property name="step-increment">1.0</property>
  191. <property name="upper">99.0</property>
  192. <property name="lower">-1.0</property>
  193. <property name="value">-1.0</property>
  194. </object>
  195. </property>
  196. </object>
  197. </child>
  198. <child>
  199. <object class="GtkRevealer" id="warn_bat1">
  200. <property name="reveal-child">true</property>
  201. <child>
  202. <object class="GtkBox">
  203. <property name="orientation">GTK_ORIENTATION_HORIZONTAL</property>
  204. <property name="spacing">12</property>
  205. <property name="margin-start">6</property>
  206. <property name="margin-end">6</property>
  207. <property name="margin-top">6</property>
  208. <property name="margin-bottom">6</property>
  209. <child>
  210. <object class="GtkImage">
  211. <property name="icon-name">dialog-warning</property>
  212. <property name="css-classes">warning</property>
  213. <property name="icon-size">GTK_ICON_SIZE_LARGE</property>
  214. </object>
  215. </child>
  216. <child>
  217. <object class="GtkBox">
  218. <property name="orientation">GTK_ORIENTATION_VERTICAL</property>
  219. <child>
  220. <object class="GtkLabel">
  221. <property name="label" translatable="yes">WARNING</property>
  222. <property name="css-classes">warning</property>
  223. <property name="wrap">true</property>
  224. <property name="hexpand">true</property>
  225. <property name="justify">GTK_JUSTIFY_CENTER</property>
  226. <attributes>
  227. <attribute name="weight" value="PANGO_WEIGHT_BOLD"/>
  228. </attributes>
  229. </object>
  230. </child>
  231. <child>
  232. <object class="GtkLabel">
  233. <property name="wrap">true</property>
  234. <property name="hexpand">true</property>
  235. <property name="justify">GTK_JUSTIFY_CENTER</property>
  236. <property name="label" translatable="yes">The configured threshold values are equal to the values considered "disabled"</property>
  237. </object>
  238. </child>
  239. </object>
  240. </child>
  241. </object>
  242. </child>
  243. </object>
  244. </child>
  245. </object>
  246. </child>
  247. <child>
  248. <object class="AdwPreferencesGroup" id="reset_group">
  249. <property name="title" translatable="yes">Reset thresholds</property>
  250. <property name="description" translatable="yes">Reset recommended threshold values</property>
  251. <property name="header-suffix">
  252. <object class="GtkButton" id="reset">
  253. <property name="halign">start</property>
  254. <property name="valign">center</property>
  255. <property name="margin-start">6</property>
  256. <child>
  257. <object class="AdwButtonContent">
  258. <property name="icon-name">view-refresh-symbolic</property>
  259. <property name="label" translatable="yes">Reset</property>
  260. </object>
  261. </child>
  262. <style>
  263. <class name="destructive-action" />
  264. </style>
  265. </object>
  266. </property>
  267. </object>
  268. </child>
  269. </template>
  270. <object class="AdwMessageDialog" id="reset_thresholds_dialog">
  271. <property name="heading" translatable="yes">Reset thresholds?</property>
  272. <property name="body" translatable="yes">This action resets the batteries thresholds to the recommended values, do you want to continue?</property>
  273. <property name="default-response">cancel</property>
  274. <property name="close-response">cancel</property>
  275. <property name="hide-on-close">true</property>
  276. <property name="modal">true</property>
  277. <property name="destroy-with-parent">true</property>
  278. <responses>
  279. <response id="cancel" translatable="yes" appearance="suggested">Cancel</response>
  280. <response id="reset" translatable="yes" appearance="destructive">Reset</response>
  281. </responses>
  282. </object>
  283. </interface>