Merge lp:~3v1n0/unity-control-center/unity-lowgfx-support into lp:unity-control-center
- unity-lowgfx-support
- Merge into trunk
Status: | Merged |
---|---|
Approved by: | Sebastien Bacher |
Approved revision: | no longer in the source branch. |
Merged at revision: | 12887 |
Proposed branch: | lp:~3v1n0/unity-control-center/unity-lowgfx-support |
Merge into: | lp:unity-control-center |
Prerequisite: | lp:~3v1n0/unity-control-center/grouped-compiz-gsettings-support |
Diff against target: |
724 lines (+362/-170) 2 files modified
panels/appearance/appearance.ui (+285/-170) panels/appearance/cc-appearance-panel.c (+77/-0) |
To merge this branch: | bzr merge lp:~3v1n0/unity-control-center/unity-lowgfx-support |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Sebastien Bacher | Approve | ||
Matthew Paul Thomas (community) | design | Approve | |
Unity Control Center development team | Pending | ||
Review via email: mp+326311@code.launchpad.net |
This proposal supersedes a proposal from 2017-04-04.
Commit message
appearance: support multiple compiz setting profiles, and update lowgfx key accordingly
We only control the value of the "lowgfx" key here, and monitor changes.
The actual change of the profile is up to the unity components.
We monitor the current used profile by looking at org.compiz settings.
I've created a small utility class, GroupedGSettings, that allows to easily
manage multiple settings that share the same schema, but that have different paths.
It allows to set a default path and get value changes from that, while setting
parameters for every value.
So now, when you change any compiz parameter, it will apply to both 'unity' and
'unity-lowgfx' profiles. While we'll just monitor the current one for changes.
Description of the change
Rework over lp:~hikiko/unity-control-center/unity-control-center.lowgfx/+merge/314696 which can be considered deprecated by this.
Also it needs lp:~3v1n0/unity/lowgfx-profile-setter
Sebastien Bacher (seb128) wrote : Posted in a previous version of this proposal | # |
Marco Trevisan (Treviño) (3v1n0) wrote : Posted in a previous version of this proposal | # |
Nope... As I just fixed the work that was done previously in UI side, so not sure there was some interaction in that side.
Anyway,let me split this in the two parts though, so in case we can just backport the non-UI side.
Marco Trevisan (Treviño) (3v1n0) wrote : Posted in a previous version of this proposal | # |
For design, this is the look so far... http://
Matthew Paul Thomas (mpt) wrote : Posted in a previous version of this proposal | # |
There are many language and layout problems here, but some of them are not new. Unfortunately the diff is too long for me to tell exactly which ones. Please provide a Before screenshot to compare with the After screenshot. Thanks!
Marco Trevisan (Treviño) (3v1n0) wrote : Posted in a previous version of this proposal | # |
Here it is: http://
Matthew Paul Thomas (mpt) wrote : Posted in a previous version of this proposal | # |
Thanks.
Unfortunately I can’t tell what “Appearance and other effects” refers to.
Last year another option was introduced in exactly the same place, labelled “Low graphics mode”. <http://
Is this the same option? What happened to the previous implementation?
Marco Trevisan (Treviño) (3v1n0) wrote : Posted in a previous version of this proposal | # |
It's the same option, but that option actually never landed because of other non-UI problems with that implementation.
I'm feel to change the wording to what you prefer, though.
Marco Trevisan (Treviño) (3v1n0) wrote : | # |
I've rebased this branch on top of lp:~3v1n0/unity-control-center/grouped-compiz-gsettings-support so that this has only the UI bits.
Matthew Paul Thomas (mpt) wrote : | # |
Thanks for the explanation.
Assuming that we can’t tidy up the rest of this panel, I suggest adding the new setting with this layout and text: https:/
Marco Trevisan (Treviño) (3v1n0) wrote : | # |
Final look is https:/
Matthew Paul Thomas (mpt) wrote : | # |
Layout approved based on <https:/
Sebastien Bacher (seb128) wrote : | # |
code looks good
- 12909. By Marco Trevisan (Treviño)
-
appearance.ui: redesign the look of the visual effects section
mpt gave a good input on this.
- 12910. By Marco Trevisan (Treviño)
-
appearance: ensure we also hide the related separators when needed
- 12911. By Marco Trevisan (Treviño)
-
appearance: hide lowgfx parameters if gsetting or profiles aren't there
- 12912. By Marco Trevisan (Treviño)
-
appearance: remove unneeded nested boxes
Preview Diff
1 | === modified file 'panels/appearance/appearance.ui' |
2 | --- panels/appearance/appearance.ui 2016-01-28 16:15:49 +0000 |
3 | +++ panels/appearance/appearance.ui 2017-06-27 23:35:33 +0000 |
4 | @@ -1,7 +1,10 @@ |
5 | <?xml version="1.0" encoding="UTF-8"?> |
6 | -<!-- Generated with glade 3.16.1 --> |
7 | +<!-- Generated with glade 3.20.0 --> |
8 | <interface> |
9 | <requires lib="gtk+" version="3.0"/> |
10 | + <object class="GtkSizeGroup" id="sizegroup"> |
11 | + <property name="mode">vertical</property> |
12 | + </object> |
13 | <object class="GtkListStore" id="sources-liststore"> |
14 | <columns> |
15 | <!-- column-name source-name --> |
16 | @@ -84,9 +87,9 @@ |
17 | <object class="GtkLabel" id="label1"> |
18 | <property name="visible">True</property> |
19 | <property name="can_focus">False</property> |
20 | - <property name="xalign">0</property> |
21 | <property name="label" translatable="yes"><b>Background</b></property> |
22 | <property name="use_markup">True</property> |
23 | + <property name="xalign">0</property> |
24 | </object> |
25 | <packing> |
26 | <property name="expand">False</property> |
27 | @@ -190,8 +193,8 @@ |
28 | <object class="GtkLabel" id="slide-label"> |
29 | <property name="visible">True</property> |
30 | <property name="can_focus">False</property> |
31 | - <property name="xalign">0</property> |
32 | <property name="label" translatable="yes" comments="This refers to a slideshow background">Changes throughout the day</property> |
33 | + <property name="xalign">0</property> |
34 | </object> |
35 | <packing> |
36 | <property name="expand">False</property> |
37 | @@ -454,10 +457,10 @@ |
38 | <object class="GtkLabel" id="theme-label"> |
39 | <property name="visible">True</property> |
40 | <property name="can_focus">False</property> |
41 | - <property name="xalign">0</property> |
42 | <property name="xpad">6</property> |
43 | <property name="label" translatable="yes"><b>Theme</b></property> |
44 | <property name="use_markup">True</property> |
45 | + <property name="xalign">0</property> |
46 | <accessibility> |
47 | <relation type="label-for" target="theme-selector"/> |
48 | </accessibility> |
49 | @@ -521,10 +524,10 @@ |
50 | <object class="GtkLabel" id="unity-iconsize-label"> |
51 | <property name="visible">True</property> |
52 | <property name="can_focus">False</property> |
53 | - <property name="xalign">0</property> |
54 | <property name="xpad">6</property> |
55 | <property name="label" translatable="yes"><b>Launcher icon size</b></property> |
56 | <property name="use_markup">True</property> |
57 | + <property name="xalign">0</property> |
58 | <accessibility> |
59 | <relation type="label-for" target="unity-iconsize-scale"/> |
60 | </accessibility> |
61 | @@ -602,9 +605,9 @@ |
62 | <object class="GtkLabel" id="label4"> |
63 | <property name="visible">True</property> |
64 | <property name="can_focus">False</property> |
65 | - <property name="xalign">0</property> |
66 | <property name="label" translatable="yes"><b>Auto-hide the Launcher</b></property> |
67 | <property name="use_markup">True</property> |
68 | + <property name="xalign">0</property> |
69 | <accessibility> |
70 | <relation type="label-for" target="unity_launcher_autohide"/> |
71 | </accessibility> |
72 | @@ -619,9 +622,9 @@ |
73 | <object class="GtkLabel" id="label2"> |
74 | <property name="visible">True</property> |
75 | <property name="can_focus">False</property> |
76 | - <property name="xalign">0</property> |
77 | <property name="label" translatable="yes"><span size="small">The launcher will reveal when moving the pointer to the defined hot spot.</span></property> |
78 | <property name="use_markup">True</property> |
79 | + <property name="xalign">0</property> |
80 | </object> |
81 | <packing> |
82 | <property name="expand">False</property> |
83 | @@ -640,8 +643,8 @@ |
84 | <object class="GtkLabel" id="unity_reveal_label"> |
85 | <property name="visible">True</property> |
86 | <property name="can_focus">False</property> |
87 | - <property name="xalign">0</property> |
88 | <property name="label" translatable="yes">Reveal location:</property> |
89 | + <property name="xalign">0</property> |
90 | <accessibility> |
91 | <relation type="label-for" target="unity_reveal_spot_left"/> |
92 | <relation type="label-for" target="unity_reveal_spot_topleft"/> |
93 | @@ -826,20 +829,6 @@ |
94 | <property name="position">0</property> |
95 | </packing> |
96 | </child> |
97 | - <child> |
98 | - <object class="GtkLabel" id="unity-label-external-tool"> |
99 | - <property name="can_focus">False</property> |
100 | - <property name="xalign">0</property> |
101 | - <property name="xpad">12</property> |
102 | - <property name="label" translatable="yes">Some settings have been overriden by an external program, press "Restore Default Behaviors" to reset the behavior and return control to this panel.</property> |
103 | - <property name="wrap">True</property> |
104 | - </object> |
105 | - <packing> |
106 | - <property name="expand">False</property> |
107 | - <property name="fill">True</property> |
108 | - <property name="position">1</property> |
109 | - </packing> |
110 | - </child> |
111 | </object> |
112 | <packing> |
113 | <property name="expand">False</property> |
114 | @@ -919,30 +908,200 @@ |
115 | <object class="GtkBox" id="unity_menus_box"> |
116 | <property name="visible">True</property> |
117 | <property name="can_focus">False</property> |
118 | + <property name="margin_left">10</property> |
119 | + <property name="margin_right">10</property> |
120 | + <property name="homogeneous">True</property> |
121 | + <child> |
122 | + <object class="GtkBox" id="unity_menus_location_box"> |
123 | + <property name="visible">True</property> |
124 | + <property name="can_focus">False</property> |
125 | + <property name="orientation">vertical</property> |
126 | + <child> |
127 | + <object class="GtkLabel" id="label3"> |
128 | + <property name="visible">True</property> |
129 | + <property name="can_focus">False</property> |
130 | + <property name="label" translatable="yes"><b>Show the menus for a window</b></property> |
131 | + <property name="use_markup">True</property> |
132 | + <property name="xalign">0</property> |
133 | + <accessibility> |
134 | + <relation type="label-for" target="unity_global_menus"/> |
135 | + <relation type="label-for" target="unity_local_menus"/> |
136 | + </accessibility> |
137 | + </object> |
138 | + <packing> |
139 | + <property name="expand">False</property> |
140 | + <property name="fill">True</property> |
141 | + <property name="position">0</property> |
142 | + </packing> |
143 | + </child> |
144 | + <child> |
145 | + <object class="GtkBox" id="unity_menus_type_box"> |
146 | + <property name="visible">True</property> |
147 | + <property name="can_focus">False</property> |
148 | + <property name="margin_top">9</property> |
149 | + <property name="orientation">vertical</property> |
150 | + <child> |
151 | + <object class="GtkRadioButton" id="unity_global_menus"> |
152 | + <property name="label" translatable="yes">In the menu bar</property> |
153 | + <property name="visible">True</property> |
154 | + <property name="can_focus">True</property> |
155 | + <property name="receives_default">False</property> |
156 | + <property name="xalign">0</property> |
157 | + <property name="draw_indicator">True</property> |
158 | + <property name="group">unity_local_menus</property> |
159 | + </object> |
160 | + <packing> |
161 | + <property name="expand">False</property> |
162 | + <property name="fill">True</property> |
163 | + <property name="position">1</property> |
164 | + </packing> |
165 | + </child> |
166 | + <child> |
167 | + <object class="GtkRadioButton" id="unity_local_menus"> |
168 | + <property name="label" translatable="yes">In the window's title bar</property> |
169 | + <property name="visible">True</property> |
170 | + <property name="can_focus">True</property> |
171 | + <property name="receives_default">False</property> |
172 | + <property name="xalign">0</property> |
173 | + <property name="draw_indicator">True</property> |
174 | + <property name="group">unity_global_menus</property> |
175 | + </object> |
176 | + <packing> |
177 | + <property name="expand">False</property> |
178 | + <property name="fill">True</property> |
179 | + <property name="position">2</property> |
180 | + </packing> |
181 | + </child> |
182 | + </object> |
183 | + <packing> |
184 | + <property name="expand">False</property> |
185 | + <property name="fill">True</property> |
186 | + <property name="position">1</property> |
187 | + </packing> |
188 | + </child> |
189 | + </object> |
190 | + <packing> |
191 | + <property name="expand">False</property> |
192 | + <property name="fill">True</property> |
193 | + <property name="position">0</property> |
194 | + </packing> |
195 | + </child> |
196 | + <child> |
197 | + <object class="GtkBox" id="unity_menus_visibility_box"> |
198 | + <property name="visible">True</property> |
199 | + <property name="can_focus">False</property> |
200 | + <property name="orientation">vertical</property> |
201 | + <child> |
202 | + <object class="GtkLabel" id="label5"> |
203 | + <property name="visible">True</property> |
204 | + <property name="can_focus">False</property> |
205 | + <property name="label" translatable="yes"><b>Menus visibility</b></property> |
206 | + <property name="use_markup">True</property> |
207 | + <property name="xalign">0</property> |
208 | + <accessibility> |
209 | + <relation type="label-for" target="unity_auto_hide_menus"/> |
210 | + <relation type="label-for" target="unity_always_show_menus"/> |
211 | + </accessibility> |
212 | + </object> |
213 | + <packing> |
214 | + <property name="expand">False</property> |
215 | + <property name="fill">True</property> |
216 | + <property name="position">0</property> |
217 | + </packing> |
218 | + </child> |
219 | + <child> |
220 | + <object class="GtkBox" id="unity_menus_visibility_type_box"> |
221 | + <property name="visible">True</property> |
222 | + <property name="can_focus">False</property> |
223 | + <property name="margin_top">9</property> |
224 | + <property name="orientation">vertical</property> |
225 | + <child> |
226 | + <object class="GtkRadioButton" id="unity_auto_hide_menus"> |
227 | + <property name="label" translatable="yes">Displayed on mouse hovering</property> |
228 | + <property name="visible">True</property> |
229 | + <property name="can_focus">True</property> |
230 | + <property name="receives_default">False</property> |
231 | + <property name="xalign">0</property> |
232 | + <property name="draw_indicator">True</property> |
233 | + <property name="group">unity_always_show_menus</property> |
234 | + </object> |
235 | + <packing> |
236 | + <property name="expand">False</property> |
237 | + <property name="fill">True</property> |
238 | + <property name="position">1</property> |
239 | + </packing> |
240 | + </child> |
241 | + <child> |
242 | + <object class="GtkRadioButton" id="unity_always_show_menus"> |
243 | + <property name="label" translatable="yes">Always displayed</property> |
244 | + <property name="visible">True</property> |
245 | + <property name="can_focus">True</property> |
246 | + <property name="receives_default">False</property> |
247 | + <property name="xalign">0</property> |
248 | + <property name="draw_indicator">True</property> |
249 | + <property name="group">unity_auto_hide_menus</property> |
250 | + </object> |
251 | + <packing> |
252 | + <property name="expand">False</property> |
253 | + <property name="fill">True</property> |
254 | + <property name="position">2</property> |
255 | + </packing> |
256 | + </child> |
257 | + </object> |
258 | + <packing> |
259 | + <property name="expand">False</property> |
260 | + <property name="fill">True</property> |
261 | + <property name="position">1</property> |
262 | + </packing> |
263 | + </child> |
264 | + </object> |
265 | + <packing> |
266 | + <property name="expand">False</property> |
267 | + <property name="fill">True</property> |
268 | + <property name="position">1</property> |
269 | + </packing> |
270 | + </child> |
271 | + </object> |
272 | + <packing> |
273 | + <property name="expand">False</property> |
274 | + <property name="fill">True</property> |
275 | + <property name="padding">5</property> |
276 | + <property name="position">4</property> |
277 | + </packing> |
278 | + </child> |
279 | + <child> |
280 | + <object class="GtkSeparator" id="unity_menus_separator"> |
281 | + <property name="visible">True</property> |
282 | + <property name="can_focus">False</property> |
283 | + </object> |
284 | + <packing> |
285 | + <property name="expand">False</property> |
286 | + <property name="fill">True</property> |
287 | + <property name="position">5</property> |
288 | + </packing> |
289 | + </child> |
290 | + <child> |
291 | + <object class="GtkBox" id="unity_gfx_mode_box"> |
292 | + <property name="visible">True</property> |
293 | + <property name="can_focus">False</property> |
294 | <property name="orientation">vertical</property> |
295 | <child> |
296 | - <object class="GtkBox" id="box8"> |
297 | + <object class="GtkBox" id="unity_gfx_mode_selector_box"> |
298 | <property name="visible">True</property> |
299 | <property name="can_focus">False</property> |
300 | <property name="margin_left">10</property> |
301 | <property name="margin_right">10</property> |
302 | - <property name="homogeneous">True</property> |
303 | + <property name="spacing">5</property> |
304 | <child> |
305 | - <object class="GtkBox" id="unity_menus_location_box"> |
306 | + <object class="GtkBox"> |
307 | <property name="visible">True</property> |
308 | <property name="can_focus">False</property> |
309 | <property name="orientation">vertical</property> |
310 | <child> |
311 | - <object class="GtkLabel" id="label3"> |
312 | + <object class="GtkLabel" id="label_gfx_mode"> |
313 | <property name="visible">True</property> |
314 | <property name="can_focus">False</property> |
315 | - <property name="xalign">0</property> |
316 | - <property name="label" translatable="yes"><b>Show the menus for a window</b></property> |
317 | - <property name="use_markup">True</property> |
318 | - <accessibility> |
319 | - <relation type="label-for" target="unity_global_menus"/> |
320 | - <relation type="label-for" target="unity_local_menus"/> |
321 | - </accessibility> |
322 | + <property name="label" translatable="yes">Visual effects:</property> |
323 | </object> |
324 | <packing> |
325 | <property name="expand">False</property> |
326 | @@ -951,50 +1110,7 @@ |
327 | </packing> |
328 | </child> |
329 | <child> |
330 | - <object class="GtkBox" id="unity_menus_type_box"> |
331 | - <property name="visible">True</property> |
332 | - <property name="can_focus">False</property> |
333 | - <property name="margin_left">10</property> |
334 | - <property name="margin_top">9</property> |
335 | - <property name="orientation">vertical</property> |
336 | - <child> |
337 | - <object class="GtkRadioButton" id="unity_global_menus"> |
338 | - <property name="label" translatable="yes">In the menu bar</property> |
339 | - <property name="visible">True</property> |
340 | - <property name="can_focus">True</property> |
341 | - <property name="receives_default">False</property> |
342 | - <property name="xalign">0</property> |
343 | - <property name="draw_indicator">True</property> |
344 | - <property name="group">unity_local_menus</property> |
345 | - </object> |
346 | - <packing> |
347 | - <property name="expand">False</property> |
348 | - <property name="fill">True</property> |
349 | - <property name="position">1</property> |
350 | - </packing> |
351 | - </child> |
352 | - <child> |
353 | - <object class="GtkRadioButton" id="unity_local_menus"> |
354 | - <property name="label" translatable="yes">In the window's title bar</property> |
355 | - <property name="visible">True</property> |
356 | - <property name="can_focus">True</property> |
357 | - <property name="receives_default">False</property> |
358 | - <property name="xalign">0</property> |
359 | - <property name="draw_indicator">True</property> |
360 | - <property name="group">unity_global_menus</property> |
361 | - </object> |
362 | - <packing> |
363 | - <property name="expand">False</property> |
364 | - <property name="fill">True</property> |
365 | - <property name="position">2</property> |
366 | - </packing> |
367 | - </child> |
368 | - </object> |
369 | - <packing> |
370 | - <property name="expand">False</property> |
371 | - <property name="fill">True</property> |
372 | - <property name="position">1</property> |
373 | - </packing> |
374 | + <placeholder/> |
375 | </child> |
376 | </object> |
377 | <packing> |
378 | @@ -1004,71 +1120,66 @@ |
379 | </packing> |
380 | </child> |
381 | <child> |
382 | - <object class="GtkBox" id="unity_menus_visibility_box"> |
383 | + <object class="GtkBox"> |
384 | <property name="visible">True</property> |
385 | <property name="can_focus">False</property> |
386 | <property name="orientation">vertical</property> |
387 | - <child> |
388 | - <object class="GtkLabel" id="label5"> |
389 | - <property name="visible">True</property> |
390 | - <property name="can_focus">False</property> |
391 | - <property name="xalign">0</property> |
392 | - <property name="label" translatable="yes"><b>Menus visibility</b></property> |
393 | + <property name="spacing">2</property> |
394 | + <child> |
395 | + <object class="GtkBox"> |
396 | + <property name="visible">True</property> |
397 | + <property name="can_focus">False</property> |
398 | + <property name="spacing">5</property> |
399 | + <child> |
400 | + <object class="GtkRadioButton" id="unity_gfx_mode_low_enable"> |
401 | + <property name="label" translatable="yes">Low</property> |
402 | + <property name="visible">True</property> |
403 | + <property name="can_focus">True</property> |
404 | + <property name="receives_default">False</property> |
405 | + <property name="active">True</property> |
406 | + <property name="draw_indicator">True</property> |
407 | + </object> |
408 | + <packing> |
409 | + <property name="expand">False</property> |
410 | + <property name="fill">False</property> |
411 | + <property name="position">0</property> |
412 | + </packing> |
413 | + </child> |
414 | + <child> |
415 | + <object class="GtkRadioButton" id="unity_gfx_mode_full_enable"> |
416 | + <property name="label" translatable="yes">High</property> |
417 | + <property name="visible">True</property> |
418 | + <property name="can_focus">True</property> |
419 | + <property name="receives_default">False</property> |
420 | + <property name="draw_indicator">True</property> |
421 | + <property name="group">unity_gfx_mode_low_enable</property> |
422 | + </object> |
423 | + <packing> |
424 | + <property name="expand">False</property> |
425 | + <property name="fill">False</property> |
426 | + <property name="position">1</property> |
427 | + </packing> |
428 | + </child> |
429 | + </object> |
430 | + <packing> |
431 | + <property name="expand">False</property> |
432 | + <property name="fill">True</property> |
433 | + <property name="position">0</property> |
434 | + </packing> |
435 | + </child> |
436 | + <child> |
437 | + <object class="GtkLabel"> |
438 | + <property name="name">5</property> |
439 | + <property name="visible">True</property> |
440 | + <property name="can_focus">False</property> |
441 | + <property name="margin_top">5</property> |
442 | + <property name="label" translatable="yes"><small>Includes shadows and animations when opening, resizing and switching windows.</small></property> |
443 | <property name="use_markup">True</property> |
444 | - <accessibility> |
445 | - <relation type="label-for" target="unity_global_menus"/> |
446 | - <relation type="label-for" target="unity_local_menus"/> |
447 | - </accessibility> |
448 | - </object> |
449 | - <packing> |
450 | - <property name="expand">False</property> |
451 | - <property name="fill">True</property> |
452 | - <property name="position">0</property> |
453 | - </packing> |
454 | - </child> |
455 | - <child> |
456 | - <object class="GtkBox" id="unity_menus_visibility_type_box"> |
457 | - <property name="visible">True</property> |
458 | - <property name="can_focus">False</property> |
459 | - <property name="margin_left">10</property> |
460 | - <property name="margin_top">9</property> |
461 | - <property name="orientation">vertical</property> |
462 | - <child> |
463 | - <object class="GtkRadioButton" id="unity_auto_hide_menus"> |
464 | - <property name="label" translatable="yes">Displayed on mouse hovering</property> |
465 | - <property name="visible">True</property> |
466 | - <property name="can_focus">True</property> |
467 | - <property name="receives_default">False</property> |
468 | - <property name="xalign">0</property> |
469 | - <property name="draw_indicator">True</property> |
470 | - <property name="group">unity_always_show_menus</property> |
471 | - </object> |
472 | - <packing> |
473 | - <property name="expand">False</property> |
474 | - <property name="fill">True</property> |
475 | - <property name="position">1</property> |
476 | - </packing> |
477 | - </child> |
478 | - <child> |
479 | - <object class="GtkRadioButton" id="unity_always_show_menus"> |
480 | - <property name="label" translatable="yes">Always displayed</property> |
481 | - <property name="visible">True</property> |
482 | - <property name="can_focus">True</property> |
483 | - <property name="receives_default">False</property> |
484 | - <property name="xalign">0</property> |
485 | - <property name="draw_indicator">True</property> |
486 | - <property name="group">unity_auto_hide_menus</property> |
487 | - </object> |
488 | - <packing> |
489 | - <property name="expand">False</property> |
490 | - <property name="fill">True</property> |
491 | - <property name="position">2</property> |
492 | - </packing> |
493 | - </child> |
494 | - </object> |
495 | - <packing> |
496 | - <property name="expand">False</property> |
497 | - <property name="fill">True</property> |
498 | + </object> |
499 | + <packing> |
500 | + <property name="expand">False</property> |
501 | + <property name="fill">False</property> |
502 | + <property name="pack_type">end</property> |
503 | <property name="position">1</property> |
504 | </packing> |
505 | </child> |
506 | @@ -1076,37 +1187,50 @@ |
507 | <packing> |
508 | <property name="expand">False</property> |
509 | <property name="fill">True</property> |
510 | - <property name="position">1</property> |
511 | + <property name="position">4</property> |
512 | </packing> |
513 | </child> |
514 | </object> |
515 | <packing> |
516 | <property name="expand">False</property> |
517 | <property name="fill">True</property> |
518 | - <property name="padding">5</property> |
519 | <property name="position">0</property> |
520 | </packing> |
521 | </child> |
522 | - <child> |
523 | - <object class="GtkSeparator" id="menu_separator"> |
524 | - <property name="visible">True</property> |
525 | - <property name="can_focus">False</property> |
526 | - </object> |
527 | - <packing> |
528 | - <property name="expand">False</property> |
529 | - <property name="fill">True</property> |
530 | - <property name="position">1</property> |
531 | - </packing> |
532 | - </child> |
533 | - </object> |
534 | - <packing> |
535 | - <property name="expand">False</property> |
536 | - <property name="fill">True</property> |
537 | - <property name="position">4</property> |
538 | - </packing> |
539 | - </child> |
540 | - <child> |
541 | - <object class="GtkBox" id="box5"> |
542 | + </object> |
543 | + <packing> |
544 | + <property name="expand">False</property> |
545 | + <property name="fill">True</property> |
546 | + <property name="position">6</property> |
547 | + </packing> |
548 | + </child> |
549 | + <child> |
550 | + <object class="GtkSeparator" id="unity_gfx_mode_separator"> |
551 | + <property name="visible">True</property> |
552 | + <property name="can_focus">False</property> |
553 | + </object> |
554 | + <packing> |
555 | + <property name="expand">False</property> |
556 | + <property name="fill">True</property> |
557 | + <property name="position">7</property> |
558 | + </packing> |
559 | + </child> |
560 | + <child> |
561 | + <object class="GtkLabel" id="unity-label-external-tool"> |
562 | + <property name="can_focus">False</property> |
563 | + <property name="xpad">12</property> |
564 | + <property name="label" translatable="yes">Some settings have been overriden by an external program, press "Restore Default Behaviors" to reset the behavior and return control to this panel.</property> |
565 | + <property name="wrap">True</property> |
566 | + <property name="xalign">0</property> |
567 | + </object> |
568 | + <packing> |
569 | + <property name="expand">False</property> |
570 | + <property name="fill">True</property> |
571 | + <property name="position">8</property> |
572 | + </packing> |
573 | + </child> |
574 | + <child> |
575 | + <object class="GtkBox" id="restore_box"> |
576 | <property name="height_request">36</property> |
577 | <property name="visible">True</property> |
578 | <property name="can_focus">False</property> |
579 | @@ -1133,7 +1257,7 @@ |
580 | <packing> |
581 | <property name="expand">False</property> |
582 | <property name="fill">True</property> |
583 | - <property name="position">7</property> |
584 | + <property name="position">9</property> |
585 | </packing> |
586 | </child> |
587 | </object> |
588 | @@ -1155,13 +1279,4 @@ |
589 | </object> |
590 | </child> |
591 | </object> |
592 | - <object class="GtkSizeGroup" id="sizegroup"> |
593 | - <property name="mode">vertical</property> |
594 | - <widgets> |
595 | - <widget name="sources-combobox"/> |
596 | - <widget name="heading-hbox"/> |
597 | - <widget name="slide-label"/> |
598 | - <widget name="strut"/> |
599 | - </widgets> |
600 | - </object> |
601 | </interface> |
602 | |
603 | === modified file 'panels/appearance/cc-appearance-panel.c' |
604 | --- panels/appearance/cc-appearance-panel.c 2017-06-27 23:35:32 +0000 |
605 | +++ panels/appearance/cc-appearance-panel.c 2017-06-27 23:35:33 +0000 |
606 | @@ -131,6 +131,7 @@ |
607 | #define UNITY_FAVORITES_KEY "favorites" |
608 | #define UNITY_INTEGRATED_MENUS_KEY "integrated-menus" |
609 | #define UNITY_ALWAYS_SHOW_MENUS_KEY "always-show-menus" |
610 | +#define UNITY_LOWGFX_KEY "lowgfx" |
611 | #define SHOW_DESKTOP_UNITY_FAVORITE_STR "unity://desktop-icon" |
612 | |
613 | #define MIN_ICONSIZE 16.0 |
614 | @@ -1976,6 +1977,7 @@ |
615 | gboolean has_menu_settings = has_setting && unity_own_setting_exists (self, UNITY_ALWAYS_SHOW_MENUS_KEY); |
616 | gtk_widget_set_visible (WID ("unity_menus_location_box"), has_setting); |
617 | gtk_widget_set_visible (WID ("unity_menus_box"), has_menu_settings); |
618 | + gtk_widget_set_visible (WID ("unity_menus_separator"), has_menu_settings); |
619 | |
620 | if (!has_setting) |
621 | return; |
622 | @@ -2016,6 +2018,7 @@ |
623 | gboolean has_menu_settings = has_setting && unity_own_setting_exists (self, UNITY_INTEGRATED_MENUS_KEY); |
624 | gtk_widget_set_visible (WID ("unity_menus_location_box"), has_setting); |
625 | gtk_widget_set_visible (WID ("unity_menus_box"), has_menu_settings); |
626 | + gtk_widget_set_visible (WID ("unity_menus_separator"), has_menu_settings); |
627 | |
628 | if (!has_setting) |
629 | return; |
630 | @@ -2047,6 +2050,68 @@ |
631 | menuvisibility_widget_refresh (self); |
632 | } |
633 | |
634 | +static gboolean |
635 | +is_compiz_profile_available (const gchar *profile) |
636 | +{ |
637 | + gboolean is_available; |
638 | + gchar *profile_path; |
639 | + |
640 | + profile_path = g_strdup_printf ("%s/compiz-1/compizconfig/%s.ini", |
641 | + g_get_user_config_dir (), profile); |
642 | + is_available = g_file_test (profile_path, G_FILE_TEST_EXISTS); |
643 | + g_free (profile_path); |
644 | + |
645 | + if (!is_available) |
646 | + { |
647 | + profile_path = g_strdup_printf ("/etc/compizconfig/%s.ini", profile); |
648 | + is_available = g_file_test (profile_path, G_FILE_TEST_EXISTS); |
649 | + g_free (profile_path); |
650 | + } |
651 | + |
652 | + return is_available; |
653 | +} |
654 | + |
655 | +static void |
656 | +gfx_mode_widget_refresh (CcAppearancePanel *self) |
657 | +{ |
658 | + CcAppearancePanelPrivate *priv = self->priv; |
659 | + gboolean has_setting = unity_own_setting_exists (self, UNITY_LOWGFX_KEY); |
660 | + gboolean has_profile = is_compiz_profile_available (UNITY_NORMAL_PROFILE) && |
661 | + is_compiz_profile_available (UNITY_LOWGFX_PROFILE); |
662 | + |
663 | + gtk_widget_set_visible (WID ("unity_gfx_mode_box"), has_setting && has_profile); |
664 | + gtk_widget_set_visible (WID ("unity_gfx_mode_separator"), has_setting && has_profile); |
665 | + |
666 | + if (!has_setting || !has_profile) |
667 | + return; |
668 | + |
669 | + gboolean enable_lowgfx = g_settings_get_boolean (priv->unity_own_settings, UNITY_LOWGFX_KEY); |
670 | + |
671 | + if (enable_lowgfx == FALSE) |
672 | + gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (WID ("unity_gfx_mode_full_enable")), TRUE); |
673 | + else |
674 | + gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (WID ("unity_gfx_mode_low_enable")), TRUE); |
675 | +} |
676 | + |
677 | +static void |
678 | +on_gfx_mode_changed (GtkToggleButton *button, |
679 | + gpointer user_data) |
680 | +{ |
681 | + CcAppearancePanel *self = CC_APPEARANCE_PANEL (user_data); |
682 | + CcAppearancePanelPrivate *priv = self->priv; |
683 | + |
684 | + gboolean low_enabled = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (WID ("unity_gfx_mode_low_enable"))); |
685 | + g_settings_set_boolean (priv->unity_own_settings, UNITY_LOWGFX_KEY, low_enabled); |
686 | +} |
687 | + |
688 | +static void |
689 | +ext_lowgfx_changed_callback (GroupedGSettings* compiz_gs, |
690 | + gchar *key, |
691 | + gpointer user_data) |
692 | +{ |
693 | + gfx_mode_widget_refresh (CC_APPEARANCE_PANEL (user_data)); |
694 | +} |
695 | + |
696 | static void |
697 | ext_compiz_profile_changed_callback (GSettings* compiz_settings, |
698 | gchar *key, |
699 | @@ -2090,6 +2155,9 @@ |
700 | if (unity_own_setting_exists (self, UNITY_ALWAYS_SHOW_MENUS_KEY)) |
701 | g_settings_reset (priv->unity_own_settings, UNITY_ALWAYS_SHOW_MENUS_KEY); |
702 | |
703 | + if (unity_own_setting_exists (self, UNITY_LOWGFX_KEY)) |
704 | + g_settings_reset (priv->unity_own_settings, UNITY_LOWGFX_KEY); |
705 | + |
706 | GtkToggleButton *showdesktop = GTK_TOGGLE_BUTTON (WID ("check_showdesktop_in_launcher")); |
707 | gtk_toggle_button_set_active(showdesktop, TRUE); |
708 | } |
709 | @@ -2266,6 +2334,15 @@ |
710 | G_CALLBACK (on_menuvisibility_changed), self); |
711 | menuvisibility_widget_refresh (self); |
712 | |
713 | + /* Low gfx */ |
714 | + g_signal_connect (priv->unity_own_settings, "changed::" UNITY_LOWGFX_KEY, |
715 | + G_CALLBACK (ext_lowgfx_changed_callback), self); |
716 | + g_signal_connect (WID ("unity_gfx_mode_full_enable"), "toggled", |
717 | + G_CALLBACK (on_gfx_mode_changed), self); |
718 | + g_signal_connect (WID ("unity_gfx_mode_low_enable"), "toggled", |
719 | + G_CALLBACK (on_gfx_mode_changed), self); |
720 | + gfx_mode_widget_refresh (self); |
721 | + |
722 | /* Restore defaut on second page */ |
723 | g_signal_connect (WID ("button-restore-unitybehavior"), "clicked", |
724 | G_CALLBACK (on_restore_defaults_page2_clicked), self); |
Looks good, did we get input from design on the layout though?