Merge lp://staging/~hikiko/unity-control-center/u-c-c.checkbox-for-app-scaling into lp://staging/unity-control-center

Proposed by Eleni Maria Stea
Status: Rejected
Rejected by: Sebastien Bacher
Proposed branch: lp://staging/~hikiko/unity-control-center/u-c-c.checkbox-for-app-scaling
Merge into: lp://staging/unity-control-center
Diff against target: 237 lines (+130/-2)
2 files modified
panels/display/cc-display-panel.c (+93/-1)
panels/display/display-capplet.ui (+37/-1)
To merge this branch: bzr merge lp://staging/~hikiko/unity-control-center/u-c-c.checkbox-for-app-scaling
Reviewer Review Type Date Requested Status
Sebastien Bacher Needs Information
PS Jenkins bot (community) continuous-integration Approve
Marco Trevisan (TreviƱo) Pending
Unity Team Pending
Review via email: mp+211681@code.staging.launchpad.net

Commit message

Added a checkbox: when it's checked, the gnome scaling-factor and text-scaling-factor will be set to values that are in accordance with the unity ui-scale factor. To review it you need to install this first: lp:~hikiko/gsettings-ubuntu-touch-schemas/gsettings-ubuntu-touch-schemas.selected-monitor

Description of the change

Added a checkbox: when it's checked, the gnome scaling-factor and text-scaling-factor will be set to values that are in accordance with the unity ui-scale factor. To review it you need to install this first: lp:~hikiko/gsettings-ubuntu-touch-schemas/gsettings-ubuntu-touch-schemas.selected-monitor

To post a comment you must log in.
Revision history for this message
Eleni Maria Stea (hikiko) wrote :

The checkbox is the quick solution to have the feature ready before the Ubuntu release. I've started implementing this design: https://wiki.ubuntu.com/BrightnessAndDisplays#Displays

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
Sebastien Bacher (seb128) wrote :

Thanks for the work, as discussed on IRC the logic seems too complex there. We need at least a ffe/uife bug with explanations of what the code tries to achieve.

If we don't go for the full design I would only add a checkbox that toggle the gsettings keys, the by monitor smartness seems confusing rather than useful...

review: Needs Information
Revision history for this message
Eleni Maria Stea (hikiko) wrote :

Thank you Seb,
Here's the description of the initial problem and the solution:
https://bugs.launchpad.net/unity-control-center/+bug/1294578

This is just a partial solution, because we promised to add a checkbox in 14.04 at UDS. We ll certainly rewrite this feature and further discuss it with the designers for the next release.

Revision history for this message
Lars Karlitski (larsu) wrote :

86 + if (!(selected_monitor_name = malloc (sizeof *monitor_name)))
87 + return;
88 +
89 + strcpy (selected_monitor_name, monitor_name);

sizeof doesn't return the size of the string, but the size of the type you're passing to it (in this case 1). Also, it's missing space for the terminating \0 and there's no need to check the return value of malloc for NULL. I suggest just using

  selected_monitor_name = g_strdup(monitor_name);

selected_monitor_name is never freed (also not the one from line 186 in the diff)

12760. By Eleni Maria Stea

removed printf, useless string operations

12761. By Eleni Maria Stea

set to none, not to default "" when there's a settings mismatch
(so that we get sure we dont override it on rebuild)

Revision history for this message
Eleni Maria Stea (hikiko) wrote :

Sorry Laney, that piece of code wasnt necessary at all, I ve deleted it... I had to finish the branch very quickly yesterday and didn't notice I forgot the malloc and the string operations, it's fixed now, thanks for pointing it now :)

12762. By Eleni Maria Stea

removed the code that sets the factors the first time that u-c-c starts
we should do this in unity

Revision history for this message
Sebastien Bacher (seb128) wrote :

setting as rejected, the UI was tweaked differently

Unmerged revisions

12762. By Eleni Maria Stea

removed the code that sets the factors the first time that u-c-c starts
we should do this in unity

12761. By Eleni Maria Stea

set to none, not to default "" when there's a settings mismatch
(so that we get sure we dont override it on rebuild)

12760. By Eleni Maria Stea

removed printf, useless string operations

12759. By Eleni Maria Stea

seems to work, needs testing

12758. By Eleni Maria Stea

fix in the ui, added gsetting

12757. By Eleni Maria Stea

added button in the ui

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches