diff -Nru unity-7.1.2+14.04.20140303/AUTHORS unity-7.2.4+14.04.20141217/AUTHORS --- unity-7.1.2+14.04.20140303/AUTHORS 2014-03-03 16:47:14.000000000 +0000 +++ unity-7.2.4+14.04.20141217/AUTHORS 2014-12-17 20:51:37.000000000 +0000 @@ -13,9 +13,11 @@ Alex Launi Alex Launi , Allan LeSage Alex Launi , Thomi Richards + Alfred Neumayer Andrea Azzarone Andrea Azzarone Andrea Cimitan + Andrew Gaul Andrey Logvinov Automatic PS uploader @@ -30,17 +32,24 @@ Brandon Schaefer Brandon Schaefer Brandon Schaefer + Brandon Schaefer , Marco Trevisan (Treviño) Brandon Schaefer , Thomi Richards Brandon Schaefer Charles Kerr Charles Kerr , Andrea Azzarone Chase Douglas Chris Coulson + chris.gagnon Christopher James Halse Rogers Christopher Lee + Christopher Lee , Thomi Richards Christopher Lee Christopher Townsend + Chris Townsend Chris Townsend + Chris Townsend , Andrea Azzarone + Chris Townsend , Stephen M. Webb + CI bot Daniel d'Andrada Daniel van Vugt David Barth @@ -49,11 +58,16 @@ Didier Roche Didier Roche , Sebastien Bacher , Marco Trevisan (Treviño) , Łukasz 'sil2100' Zemczak , Didier Roche , Neil Jagdish Patel Didier Roche + Dimitri John Ledkov + Dimitri John Ledkov Eleni Maria Stea + Eleni Maria Stea foxoman + Francis Ginther Francis Ginther Gabor Kelemen Gary Lasker + George Karavasilev Gordon Allott Henri De Veene Iain Lane @@ -82,25 +96,32 @@ Kevin DuBois Koichi Akabe Lars Uebernickel + Leo Arias Loïc Molinari Lorenzo Mattei Łukasz 'sil2100' Zemczak Luke Yelavich Manuel de la Pena + Manuel de la Pena , Nick Dedekind , Pawel Stolowski , Michal Hruby , Łukasz 'sil2100' Zemczak , Marco Trevisan (Treviño) , Automatic PS uploader , Chris Townsend , Andrea Azzarone + Marc Deslauriers Marco Biscaro Marco Biscaro , Rick Spencer Marco Mariani , Thomi Richards Marco Trevisan Marco Trevisan + Marco Trevisan , Marc Deslauriers Marco Trevisan Marco Trevisan (Treviño) Marco Trevisan (Treviño) , 3v1n0 + Marco Trevisan (Treviño) , Andrea Azzarone Marco Trevisan (Treviño) , Andrea Cimitan Marco Trevisan (Treviño) , Brandon Schaefer Marco Trevisan (Treviño) , Brandon Schaefer , Tim Penhey Marco Trevisan (Treviño) , Lukas Vacek Marco Trevisan (Treviño) , Michal Hruby + Marco Trevisan (Treviño) , Sam Spilsbury Marco Trevisan (Treviño) , Thomi Richards + Marco Trevisan (Treviño), Marco Trevisan (Treviño) Marius Gedminas Martin Albisetti Martin Mrazik @@ -108,6 +129,7 @@ Martin Pitt Mathieu Trudel-Lapierre Matthias Alles + Matthieu James Maxim Ermilov MC Return Michael Rawson @@ -115,6 +137,7 @@ Michael Terry Michael Vogt Michal Hruby + Michi Henning Mikkel Kamstrup Erlandsen Mirco Müller Mitsuya Shibata @@ -129,6 +152,7 @@ Nicolas d'Offay Nicolas d'Offay , Nic d'Offay , Neil Jagdish Patel Nico van der Walt + Niklas Steger Oliver Sauder Omer Akram Omer Akram @@ -137,6 +161,8 @@ Paul Sladen Paul Sladen , Andrea Cimitan Pawel Stolowski + Pawel Stolowski , Michal Hruby + Pawel Stolowski Rafał Cieślak Renato Araujo Oliveira Filho Ricardo Mendoza @@ -148,7 +174,9 @@ Rodrigo Moya Romain Perier Ryan Lortie + Sami Jaktholm Sam Spilsbury + Sam Spilsbury , Andrea Azzarone Sam Spilsbury , Daniel van Vugt Sam Spilsbury , Didier Roche Sam Spilsbury , Michal Hruby @@ -157,9 +185,13 @@ smspillaz , Daniel van Vugt smspillaz , Sam Spilsbury Stephen M. Webb + Stephen M. Webb , Andrew McCarthy + Stephen M. Webb , Marco Trevisan (Treviño) , Andrea Azzarone + Steve Langasek Sven Baars Tarmac Ted Gould + Thomas Voß , Didier Roche Thomas Voß Thomi Richards Thomi Richards , Alex Launi @@ -176,6 +208,7 @@ Thomi Richards , Ted Gould Thomi Richards , Thomi Richards Thomi Richards , Tim Penhey + Tigran Gabrielyan timo.jyrinki@canonical.com Timo Jyrinki Tim Penhey @@ -188,5 +221,7 @@ Ugo Riboni Unity Merger Victor Eduardo + William Grant + William Hua Xiao-Long Chen Zaid Yeganeh diff -Nru unity-7.1.2+14.04.20140303/ChangeLog unity-7.2.4+14.04.20141217/ChangeLog --- unity-7.1.2+14.04.20140303/ChangeLog 2014-03-03 16:47:14.000000000 +0000 +++ unity-7.2.4+14.04.20141217/ChangeLog 2014-12-17 20:51:37.000000000 +0000 @@ -1,3 +1,18508 @@ +2014-08-26 CI bot + + Releasing 7.2.3+14.04.20140826-0ubuntu1 + +2014-08-26 Chris Townsend + + Release Unity 7.2.3. + +2014-08-26 Stephen M. Webb + + marked new upstream release as an UNRELEASED package + +2014-08-25 Stephen M. Webb + + removed downstream Ubuntu patches because upstream changes are now included + +2014-08-25 Stephen M. Webb + + merged in security updates from Ubuntu + +2014-07-24 Chris Townsend + + Bump version to 7.2.3. + +2014-08-26 Stephen M. Webb + + Prepare fixes for upstream micro-release 7.2.3. Fixes: 1283415, 1292391, 1306211, 1312107, 1320051, 1320071, 1324114, 1339629, 1340171, 1340394, 1340477, 1340992, 1340996, 1342208, 1342731, 1347735 + +2014-08-06 Marco Trevisan (Treviño) + + debian/patches: removing security patch, now included in branch + +2014-08-06 Marco Trevisan (Treviño) + + Merging with trunk + +2014-08-06 Marco Trevisan (Treviño) + + debian/changelog: add new revisions + +2014-08-06 Marco Trevisan (Treviño) + + SwitcherView, PanelService: correctly handle horizontal and vertical scroll events + +2014-08-06 Andrea Azzarone + + TextInput: use GdkKeymap to check the caps-lock status + +2014-08-06 Marco Trevisan (Treviño) + + PlacesOverlayVScrollBar: redirect the mouse wheel scroll events coming from the thumb to the scrollview + + This will make the scrollview to handle then and perform the same scrolling action it would do otherwise. + +2014-08-06 Marco Trevisan (Treviño) + + LockScreenShield: Add GrabScreen function and retry to make sure we really get grab + + It might happen that the grab is not possible because the PluginAdapter::IsScreenGrabbed + request has still not being fully processed, and thus nux is not able to grab the + pointer/keyboard. By doing this we instead try to grab the screen, and if this is + not happening, we wait a little until we don't get the ungrab event. + + In this way, if we eventually get the grab, all will work as expected. + Otherwise, we cancel the lock request (very unlikely to happen). + +2014-08-06 Marco Trevisan (Treviño) + + PlacesOverlayVScrollBar and VScrollBarOverlayWindow: add support for scaling + + Add a new ScrollView class to create ScrollViews with an OverlayScrollbar and with scaling support. + Using them in dash Scopes and Previews. + +2014-07-24 Chris Townsend + + Added changelog entry for lp:1340477. + +2014-07-24 Marco Trevisan (Treviño) + + Hud: scale to match current DPI settings for monitor + +2014-07-24 Chris Townsend + + Added changelog entries for lp:1283415 and lp:1340394. + +2014-07-24 Marco Trevisan (Treviño) + + OverlayRendering: correctly scale the overlays borders and edges to match settings + + DashStyle has been modified to return smart pointers of textures that are loaded + depending on the scale level. The cache will make sure that we don't duplicate + the textures and that they get removed when not needed anymore. + + Also thanks to this the SearchBarSpinner textures (and the other spinners as well) + uses the SVGs scaled at the proper size (I desgined a new SVG for the magnifier, + as we only had a PNG). + +2014-07-24 Chris Townsend + + Added changelog entry for lp:1340171. + +2014-07-24 Marco Trevisan (Treviño) + + FilterWidgets: add support for scaling. + +2014-07-24 Chris Townsend + + Added changelog entries for lp:1339629. + +2014-07-24 Marco Trevisan (Treviño) + + Previews: scale the dash preview contents to match current monitor scaling + + Improved also the scaling of search-bar, spinner, categories and many other components. + +2014-07-23 Chris Townsend + + Added changelog entries for lp:1324114. + +2014-07-23 Stephen M. Webb + + Reduce the scope of the kill command when restarting Compiz. + +2014-07-23 Chris Townsend + + Add changelog entries for lp:1306211, lp:1320051, and lp:1320071. + +2014-07-23 Marco Trevisan (Treviño) + + LockScreenAcceleratorController: do ther configured action on power special keys press + + We finally can suspend, shutdown, hibernate or start the screensaver when the screen is locked, using + the Suspend, Sleep, Hibernate and PowerOff hardware keys. + + Also the Shutdown dialog doesn't allow now to lock the session if it is not allowed by settings. + +2014-07-23 Chris Townsend + + Add changelog entry for lp:1292391. + +2014-07-23 Andrea Azzarone + + Manually emit nux::Area::geometry_changed beucase nux can fail to emit it. + +2014-07-23 Chris Townsend + + Add changelog entry for lp:1312107. + +2014-07-23 Andrea Azzarone + + Remove cross fade effect during lock/unlocking. A simple fading works just fine. + +2014-08-05 Marco Trevisan + + * SECURITY UPDATE: more screen locking fixes (LP: #1349128) + - debian/patches/lp1349128.patch: flush after ungrabbing the keyboard + in unity-shared/PluginAdapter.cpp, add GrabScreen() function that + retries to lockscreen/LockScreenController.cpp, + lockscreen/LockScreenShield.cpp, lockscreen/LockScreenShield.h. + +2014-07-14 CI bot + + Releasing 7.2.2+14.04.20140714-0ubuntu1 + +2014-07-14 Chris Townsend + + Release Unity 7.2.2. + Approved by: Stephen M. Webb + +2014-07-03 Chris Townsend + + Bump upstream release to 7.2.2. + +2014-07-14 Chris Townsend + + Prepare for upstream micro-release 7.2.2 that includes fixes for the following bugs: + Bug #607796: Launcher, Window management - Dragging and holding a selection over an entry in the Launcher should spread out windows belonging to that application + Bug #727902: Launcher icon highlighting should not switch off as soon the cursor moves after the app spread appears. + Bug #741869: Unity/compiz intercepts Super and Alt keypresses from grabbed windows like VMs. + Bug #754580: Cannot move tabs between multiple Firefox or Chromium windows while using Unity unless windows are both unmaximized, unminimized, and visible. + Bug #839728: Launcher - dragging a item on top of a launcher tile that is a valid drop receptacle in the Launcher should cause that launcher tile to glow + Bug #924840: Keyboard shortcuts overlay text too long + Bug #1281058: [UIFe] The system shutdowns when multiple accounts are open + Bug #1283775: Launcher: icon pips are not always updated properly + Bug #1304882: [Regression] Launcher doesn't reappear fully after hiding from DND + Bug #1305586: Lock screen is unusable when some windows have a keyboard/mouse grab + Bug #1307738: Lockscreen caps lock icon drawn under text entry, should be a white icon. + Bug #1308288: Lockscreen warning icon has no tooltip + Bug #1308323: Shutdown/reboot/login/logout dialogs not scaled after toggling UI scale Edit + Bug #1308911: Clipboard contents are accessible within lockscreen + Bug #1309739: Unity launcher icon edge illumination is offset + Bug #1310200: Indicators disappear at the panel (clementine, dropbox, skype etc) + Bug #1313280: Fullscreen window set to "Always on Top" in single-monitor will hide the lockscreen + Bug #1316005: Panel shadow appears over full screen applications w/ locally integrated menus enabled + Bug #1317348: Switcher (Alt-Tab) does not respect monitor-defined scaling factor + Bug #1317356: Shortcut hint does not respect monitor scaling factor + Bug #1317869: Keyboard shortcuts overlay does not show up when workspaces are enabled at 1366x768 + Bug #1320438: Unity launcher auto hide fails on screen unlock using "Super+L" + Bug #1321043: [regression] lock screen bypass with touchpad Fixes: 607796, 727902, 741869, 754580, 839728, 924840, 1281058, 1283775, 1304882, 1305586, 1307738, 1308288, 1308323, 1308911, 1309739, 1310200, 1313280, 1316005, 1317348, 1317356, 1317869, 1320438, 1321043 + Approved by: Marco Trevisan (Treviño) + +2014-07-01 Chris Townsend + + Add changelog entry for lp:1281058. + +2014-07-01 Andrea Azzarone + + Add a warning in the session dialog if other sessions are still open. + +2014-07-01 Andrea Azzarone + + Add a warning in the session dialog if other sessions are still open. + +2014-06-23 Marco Trevisan (Treviño) + + PluginAdapter: pass the state to compiz plugins activations + + Fixes Scale triggering on DnD + +2014-06-10 Marco Trevisan (Treviño) + + PluginAdapter: pass the state to compiz plugins activations + + Fixes Scale triggering on DnD + +2014-06-06 CI bot + + Releasing 7.2.0+14.10.20140606.1-0ubuntu1 + +2014-06-06 Marco Trevisan (Treviño) + + SwitcherView: use RawPixel's for the size values and convert them to match current scaling Fixes: 1317348 + +2014-06-06 Chris Townsend + + Fix issue where scaling the edge illumination up and down with the size of the Launcher icons would cause the illumination border to be offset and smaller than the icon. Fixes: 1309739 + +2014-06-06 Brandon Schaefer + + Lockscreen warning icon needs a tooltip to say what the warning is about! Fixes: 1308288 + +2014-06-06 Brandon Schaefer + + ShutdownView: Scale up the Buttons and Text plus Borders of the UnityWindowView. Fixes: 1308323 + +2014-06-06 Brandon Schaefer + + TextInput: move the warning icon inside the input field, render it white Fixes: 1307738 + +2014-06-05 Brandon Schaefer + + * Merge trunk + +2014-06-06 Marco Trevisan (Treviño) + + ApplicationLauncherIcon: Focus and, in case, Spread the windows on DnD + + After 1 second that an user is over an icon, that icon should focus the relative + application and Spread its windows if it has more than one opened. + + Correctly handle the DnD scale in launcher, and apply glow to the icon under pointer. Fixes: 607796, 727902, 754580, 839728 + +2014-06-06 Alfred Neumayer + + Restore the launcher position by reversing the animation and unsetting the DND_PUSHED_OFF quirk. Fixes: 1304882 + +2014-06-23 Chris Townsend + + Added changelog entry for lp:1310200. + +2014-06-23 Andrea Azzarone + + Fix skype indicator blinking. + +2014-05-30 Andrea Azzarone + + Fix skype indicator blinking. + +2014-06-23 Chris Townsend + + Added changelog entry for lp:1316005. + +2014-06-23 Chris Townsend + + Fix issue where the Panel shadow would get drawn over drop down windows in full screen windows. + +2014-05-28 Chris Townsend + + Fix issue where the Panel shadow would get drawn over drop down windows in full screen windows. + +2014-06-23 Chris Townsend + + Added changelog entry for lp:1283775. + +2014-06-23 Chris Townsend + + Fix issue where the number of Launcher icon pips are not always properly updated when a new window of an already running application is opened. + +2014-05-28 Chris Townsend + + Get rid of break statement since we need to continue the loop. + Relax if/else if logic and just assign boolean regardless what the current value is. + +2014-05-28 Chris Townsend + + Create a new method that replaces SetWindowVisibleOnMonitor() which also keeps the number of visible windows per monitor for a particular app. + Also, remove some of the helper functions added in a previous commit. + +2014-05-27 Chris Townsend + + Use counter for calculating number of app windows in a viewport and also check if the number of app windows has changed outside of the for loop in order to update Launcher pips for all Launchers in multi-monitor scenarios. + +2014-05-26 Chris Townsend + + Fix issue where the number of Launcher icon pips are not always properly updated when a new window of an already running application is opened. + +2014-06-23 Chris Townsend + + Added changelog entry for lp:1320438. + +2014-06-23 Andrea Azzarone + + Pass the correct options to showLauncherKeyTerminate in UnityScreen::OnLockScreen + +2014-05-26 Andrea Azzarone + + Pass the correct options to showLauncherKeyTerminate in UnityScreen::OnLockScreen. + +2014-06-23 Chris Townsend + + Added changelog entry for lp:1321043. + +2014-06-23 Andrea Azzarone + + Disable switcher gestures if screen is locked. Fixed a regression. + +2014-05-20 Andrea Azzarone + + Remove unwated changes. + +2014-05-20 Andrea Azzarone + + Disable switcher gestures if screen is locked. Fixed a regression. + +2014-05-20 Andrea Azzarone + + Restore clibpoard on unlock. Update tests too. + +2014-05-20 Andrea Azzarone + + Clear the clipboard when locking the screen. + +2014-05-16 Andrea Azzarone + + Clear the clipboard when locking the screen. + +2014-06-23 Chris Townsend + + Add changelog entry for lp:1308911. + +2014-06-23 Andrea Azzarone + + Clear the clipboard when locking the screen. + +2014-05-26 Andrea Azzarone + + Enable clipboard by default. + +2014-05-26 Andrea Azzarone + + Disable clibpoard during lockscreen. + +2014-06-23 Chris Townsend + + Added changelog entry for lp:924840. + +2014-06-23 Marco Trevisan (Treviño) + + ShortcutView: use RawPixel's for the size values and convert them to match current scaling + + Plus dinamically allocate horizontal space, not to cut the text. + +2014-05-16 Marco Trevisan (Treviño) + + Merging with lp:~3v1n0/unity/dynamic-shortcut-hint + +2014-05-14 Marco Trevisan (Treviño) + + ShortcutView: increase max column widths to make sure they will work with big text + +2014-05-14 Marco Trevisan (Treviño) + + ShortcutView: adjust column maximum width inside PreLayoutManagement instead that when filling the model + +2014-05-14 Marco Trevisan (Treviño) + + ShortcutView: some cleanup + +2014-05-14 Marco Trevisan (Treviño) + + ShortcutView: define maximum columns width, way longer than before + +2014-05-14 Marco Trevisan (Treviño) + + ShortcutView: reduce the line spacing to match old values + + This migtht be caused by the StaticCairoText usage, and this spacing actually matches design + +2014-05-14 Marco Trevisan (Treviño) + + ShortcutController: always fill the model before setting it + +2014-05-14 Marco Trevisan (Treviño) + + ShortcutView: compute maximum columns width based on text size + + In this way the text won't be truncated. The text size is computed per each column + +2014-05-16 Marco Trevisan (Treviño) + + Merging with lp:~brandontschaefer/unity/shutdown-dialog-hi-dpi + +2014-05-13 Marco Trevisan (Treviño) + + ShortcutView: use string literal to build RawPixel's + +2014-05-13 Marco Trevisan (Treviño) + + Merge with trunk + +2014-05-08 Marco Trevisan (Treviño) + + ShortcutView: use RawPixel's for the size values and convert them to match current scaling + +2014-06-23 Chris Townsend + + Added changelog entry for lp:741869. + +2014-06-23 Marco Trevisan (Treviño) + + PluginAdapter: try to grab the screen to make sure that the screen is not grabbed + + FocusIn event with NotifyGrab mode is not always triggered by X when a window + takes the grab, then we need to ensure that there's no grab by trying to get one. + We only care about keyboard here, since pointer grabs don't affect us in general. + +2014-05-13 Marco Trevisan (Treviño) + + LockScreenController: don't try to lock if there's a keyboard grab around + +2014-05-13 Marco Trevisan (Treviño) + + PluginAdapter: try to grab the screen to make sure that the screen is not grabbed + + FocusIn event with NotifyGrab mode is not always triggered by X when a window + takes the grab, then we need to ensure that there's no grab by trying to get one. + We only care about keyboard here, since pointer grabs don't affect us in general. + +2014-05-12 CI bot + + Releasing 7.2.0+14.10.20140512.4-0ubuntu1 + +2014-05-12 Stephen M. Webb + + disabled precompiled headers on arm64 Ubuntu package builds Fixes: 1317276 + +2014-05-12 Stephen M. Webb + + lockscreen/LockScreenAccelerators.h: added required header for std:vector definition + +2014-05-12 Mathieu Trudel-Lapierre + + Sync with distro upload for 7.2.0+14.04.20140423-0ubuntu2 + - replace autopilot-desktop Depends in unity-autopilot with autopilot-desktop-legacy. + +2014-05-07 Mathieu Trudel-Lapierre + + Sync with distro + +2014-05-12 Andrea Azzarone + + Add a warning in the session dialog if other sessions are still open. Fixes: 1281058 + +2014-05-09 Andrea Azzarone + + Update string. + +2014-05-09 Andrea Azzarone + + Merge trunk. + +2014-04-17 Andrea Azzarone + + Send the changed event. + +2014-04-16 Andrea Azzarone + + Use a ROProperty. + +2014-04-16 Andrea Azzarone + + Add an extra /n. + +2014-04-11 Andrea Azzarone + + Fix string. + +2014-04-11 Andrea Azzarone + + Remove new line. + +2014-04-11 Andrea Azzarone + + Add a warning in the session dialog if other sessions are still open. + +2014-05-12 Brandon Schaefer + + Set the max width, so our static text wraps. So we don't end up rendering text out of the view area. Fixes: 1312749 + +2014-05-12 Marco Trevisan (Treviño) + + DebugDBusInterface: match properties if they are in the AP array form [, ] Fixes: 1307748 + +2014-05-12 Marco Trevisan (Treviño) + + PluginAdapter: make sure we don't try to call an invalid initiate/terminate callback function Fixes: 1221673 + +2014-05-12 Marco Trevisan (Treviño) + + UnityScreen: don't try to show Dash/Hud if the screen is grabbed + + Also move the dash opening out from LauncherController, and get rid of UBus + as first initialization source, as it can only slow things down here. Fixes: 741869 + +2014-05-12 Marco Trevisan (Treviño) + + UnityScreen: always paint the lockscreen above, just add menu and onboard as exceptions + + Some code cleanup, factorizing similar code. Fixes: 1313280 + +2014-05-12 Jinkyu Yi + + Dash: Fix problem at checking blacklisted unicode range Fixes: 1251193 + +2014-05-12 William Hua + + Add proper support for modifier-only shortcuts on the lock screen. Fixes: 1291461 + +2014-06-23 Chris Townsend + + Added changelog for lp:1317348. + +2014-06-23 Marco Trevisan (Treviño) + + SwitcherView: use RawPixel's for the size values and convert them to match current scaling + +2014-05-08 Marco Trevisan (Treviño) + + TestSwitcherView: remove obsolete property check + +2014-05-08 Marco Trevisan (Treviño) + + SwitcherView: use RawPixel's for the size values and convert them to match current scaling + +2014-06-23 Chris Townsend + + Added changelog entry for lp:1309739. + +2014-06-23 Chris Townsend + + Fix issue where scaling the edge illumination up and down with the size of the Launcher icons would cause the illumination border to be offset and smaller than the icon. + +2014-05-08 Chris Townsend + + Revert the last change and instead, use the icon glow .png file instead of the .svg since Gdk does not seem to be able to handle properly scaling the svg file. + +2014-05-06 Chris Townsend + + Fix issue where scaling the edge illumination up and down with the size of the Launcher icons would cause the illumination border to be offset and smaller than the icon. + +2014-06-23 Chris Townsend + + Added changelog entry for lp:1308288. + +2014-06-23 Brandon Schaefer + + Lockscreen warning icon needs a tooltip to say what the warning is about! + +2014-04-23 Brandon Schaefer + + * Load the warning icon only when we enable show caps lock. + +2014-04-22 Brandon Schaefer + + * Remove spin_icon_width + +2014-04-22 Brandon Schaefer + + * Merge from parent. Fix conflicts. + +2014-04-22 Brandon Schaefer + + * Merge trunk + +2014-04-15 Brandon Schaefer + + * Fix multi monitor issue + * Fix translation issue + +2014-04-15 Brandon Schaefer + + * No magic strings! + +2014-04-15 Brandon Schaefer + + * Add a nice warning tooltip + +2014-06-19 Chris Townsend + + Added changelog entry for lp:1308323. + +2014-06-19 Brandon Schaefer + + ShutdownView: Scale up the Buttons and Text plus Borders of the UnityWindowView. + +2014-05-13 Brandon Schaefer + + * Much better way to clean up textures + +2014-05-13 Brandon Schaefer + + * Clean up unused textures when a dpi changes, or a monitor changes + +2014-05-08 Brandon Schaefer + + * Pre-load textures based on scale value of monitors + +2014-05-08 Brandon Schaefer + + * Merge Marcos branch again + +2014-05-08 Marco Trevisan (Treviño) + + UnityWindowView: don't keep EMConverter around, we don't need it... Let's use just scale + +2014-05-08 Brandon Schaefer + + * Move the CP() call for the const sizes to UnityWindowStyle + +2014-05-08 Brandon Schaefer + + * Merge Marcos branch + * Merge trunk + +2014-05-08 Marco Trevisan (Treviño) + + SessionButton: don't scale the button size twice... + +2014-05-08 Marco Trevisan (Treviño) + + SessionButton: remove useless definition + +2014-05-08 Marco Trevisan (Treviño) + + UnityWindowView: only expose scale instead of the EMConverter, so we get proper notifications + +2014-05-08 Marco Trevisan (Treviño) + + ShortcutController: set the monitor property + +2014-05-08 Marco Trevisan (Treviño) + + UnityWindowView: don't include UnitySettings in the header... + +2014-05-08 Marco Trevisan (Treviño) + + SwitcherView: use the UnityWindowView monitor value and scale padding correctly + +2014-05-08 Marco Trevisan (Treviño) + + RawPixel: no need to round here, EMConverter will do it + +2014-05-08 Marco Trevisan (Treviño) + + EMConverter: just multiply the pixels per DPIScale, it's simpler and safer + +2014-05-08 Marco Trevisan (Treviño) + + UnityWindowView: make sure we update the internal offset correctly + +2014-05-08 Marco Trevisan (Treviño) + + Merging with lp:~brandontschaefer/unity/shutdown-dialog-hi-dpi + +2014-05-07 Brandon Schaefer + + * Use a map to map textures based on scale size, so we only load scale sizes we need, + and still cache them. Good for multi monitor. + +2014-05-06 Brandon Schaefer + + * Scale the borders + +2014-05-06 Brandon Schaefer + + * Scale the closeable window button as well. + * TODO Window border, a bit more tricky... + +2014-05-05 Brandon Schaefer + + * Fix reviews issues. + +2014-05-02 Brandon Schaefer + + * Undo changes that aren't part of branch + +2014-04-25 Brandon Schaefer + + * Merge trunk + +2014-04-25 Brandon Schaefer + + * Fixes based on review + +2014-04-24 Brandon Schaefer + + * First stage of Shutdown Dialog HiDPI Support + +2014-06-19 Chris Townsend + + Added changelog entry for lp:1307738. + +2014-06-19 Brandon Schaefer + + TextInput: move the warning icon inside the input field, render it white + +2014-04-17 Brandon Schaefer + + * Need the relayout, otherwise the icon is late to show + +2014-04-17 Brandon Schaefer + + * Make caps_lock_on private + +2014-04-17 Brandon Schaefer + + * Move QueueDraw to the changed callback. + * Remove ToggleCapsLock + +2014-04-16 Brandon Schaefer + + * Move over detectiong caps lock to TextInput.cpp as well. + * Steal Marcos code that puts the Warning icon into a layout (Thanks!) + +2014-04-15 Brandon Schaefer + + * Use a fallback icon + +2014-04-15 Brandon Schaefer + + * Move the warning icon over the TextInput. + * This will make adjusting the IMTextEntry width a bit easier (still a TODO) + +2014-04-14 Brandon Schaefer + + * Use the gnome theme to load the warning icon. Looks better, and will scale :) + +2014-04-14 Brandon Schaefer + + * make sure we draw the waring icon above the text entry + +2014-06-19 Chris Townsend + + Added changelog entry for lp:607796. + +2014-06-19 Marco Trevisan (Treviño) + + ApplicationLauncherIcon: Focus and, in case, Spread the windows on DnD + + After 1 second that an user is over an icon, that icon should focus the relative + application and Spread its windows if it has more than one opened. + + Correctly handle the DnD scale in launcher, and apply glow to the icon under pointer. + +2014-04-16 Marco Trevisan (Treviño) + + {Trash,Volume}LauncherIcon: also shimmer on drop-accept + +2014-04-16 Marco Trevisan (Treviño) + + Launcher: glow launcher icons under the dnd if they accept dropping on them + +2014-04-16 Marco Trevisan (Treviño) + + AbstractLauncherIcon: add GLOW quirk + +2014-04-16 Marco Trevisan (Treviño) + + {Dash,Hud}Controller: use wm signals instead of UBus to hide on VP switch + +2014-04-16 Marco Trevisan (Treviño) + + UnityScreen: initialize scale_just_activated_ on OnInitiateSpread + +2014-04-16 Marco Trevisan (Treviño) + + Launcher: don't desaturate the icons when spread is started during DnD + + Also make sure we redraw when bg_effect_helper status changes + +2014-04-16 Marco Trevisan (Treviño) + + UnityScreen: make sure we always set the scale "x_offset" value + +2014-04-16 Marco Trevisan (Treviño) + + PluginAdapter: listen to compiz scale events also for setting scale active/disactive + + This will allow to get the scale status also when it doesn't take the grab (like in the DnD case) + +2014-04-16 Marco Trevisan (Treviño) + + ApplicationLauncherIcon: Focus and, in case, Spread the application windows after some DnD over the icon + + After 1 second that an user is over an icon, that icon should focus the relative application and Spread its windows + if it has more than one opened + +2014-06-19 Chris Townsend + + Added changelog entry for lp:1304882. + +2014-06-19 Alfred Neumayer + + Restore the launcher position by reversing the animation and unsetting the DND_PUSHED_OFF quirk. + +2014-04-16 Alfred Neumayer + + Remove redundant SetHidden() + +2014-04-15 Alfred Neumayer + + Unhide the launcher if it was manually dragged out before DND. + +2014-04-15 Alfred Neumayer + + Base change on Trevinhos patch. + +2014-04-14 Alfred Neumayer + + The animation shouldn't get reversed twice as that looks odd. + +2014-04-14 Alfred Neumayer + + Unset DND_PUSHED_OFF and reverse the animation to make launcher reappear after DND. + +2014-06-19 Chris Townsend + + Added changelog for #1313280. + +2014-06-19 Marco Trevisan (Treviño) + + UnityScreen: always paint the lockscreen above, just add menu and onboard as exceptions + + Some code cleanup, factorizing similar code. + +2014-05-02 Marco Trevisan (Treviño) + + UnityWindow: add just one function that computes if a window can bypass lockscreen + +2014-05-02 Marco Trevisan (Treviño) + + UnityScreen: use a better (and cheaper) way to recognize Onboard window + +2014-05-02 Marco Trevisan (Treviño) + + UnityScreen: always paint the lockscreen above, just add menu and onboard as exceptions + +2014-06-06 Chris Townsend + + Modify debian/changleog to match what's in distro since a branch to fix a bug was not actually included in the Trusty SRU. + +2014-05-13 CI bot + + Releasing 7.2.1+14.04.20140513-0ubuntu1 + +2014-05-13 Stephen M. Webb + + released upstream micro-release 7.2.1 Fixes: 1221673, 1251193, 1291461, 1307748, 1312749, 1313280, 1317276 + +2014-05-13 Stephen M. Webb + + release Unity 7.2.1 + +2014-05-13 Stephen M. Webb + + debian/changelog: updated with additional lockscreen changes + +2014-05-13 Stephen M. Webb + + added changelog for #1317276 + +2014-05-13 Stephen M. Webb + + disabled precompiled headers on arm64 Ubuntu package builds + +2014-05-12 Stephen M. Webb + + disabled precompiled headers for arm64 arch, it seems to cause random ICEs + +2014-05-13 Stephen M. Webb + + lockscreen/LockScreenAccelerators.h: added required header for std:vector definition + +2014-05-12 Stephen M. Webb + + added missing header for std::vector definition + +2014-05-13 Stephen M. Webb + + added changelog for #1312749 + +2014-05-13 Brandon Schaefer + + Set the max width, so our static text wraps. So we don't end up rendering text out of the view area. + +2014-04-25 Jonas Schwabe + + * Set the max width, so the static text wraps (and doesn't go out of the view!) + +2014-05-13 Stephen M. Webb + + added changelog for #1307748 + +2014-05-13 Marco Trevisan (Treviño) + + DebugDBusInterface: match properties if they are in the AP array form [, ] + +2014-04-24 Marco Trevisan (Treviño) + + DebugDBusInterface: GetPropertyValue should return a proper value only if we've a valid array + + Improve debugging messages and fix leaks. + +2014-04-16 Marco Trevisan (Treviño) + + DebugDBusInterface: match properties if they are in the AP array form [, ] + +2014-05-13 Stephen M. Webb + + added changelog for #1221673 + +2014-05-13 Marco Trevisan (Treviño) + + PluginAdapter: make sure we don't try to call an invalid initiate/terminate callback function + +2014-04-30 Marco Trevisan (Treviño) + + PluginAdapter: make sure we don't try to call an invalid initiate/terminate callback function + +2014-05-13 Stephen M. Webb + + added changelog for #1313280 + +2014-05-13 Marco Trevisan (Treviño) + + UnityScreen: always paint the lockscreen above, just add menu and onboard as exceptions + + Some code cleanup, factorizing similar code. + +2014-05-02 Marco Trevisan (Treviño) + + Mergin with trunk + +2014-04-29 Marco Trevisan (Treviño) + + Merging with lp:~3v1n0/unity/lockscreen-keys-disable + +2014-04-25 Marco Trevisan (Treviño) + + UnityScreen: Get the Hud initialization event if unity is locked + +2014-04-25 Marco Trevisan (Treviño) + + UnityScreen: if the screen is grabbed when showing the Hud, wait for ungrab for a couple of seconds + +2014-04-25 Marco Trevisan (Treviño) + + UnityScreen: don't try to show Dash/Hud if the screen is grabbed + + Also move the dash opening out from LauncherController, and get rid of UBus + as first initialization source, that can only slow things down here. + +2014-04-25 Marco Trevisan (Treviño) + + DashController: return a bool in ShowDash, wait for ungrab for 2 seconds maximum + + Now if the screen is grabbed, we just wait a couple of seconds the ungrab-event. + If that happens in such timeframe then we show the dash, otherwise we ignore the request. + + Also return a bool weather we've shown the dash or not. + +2014-04-24 Marco Trevisan (Treviño) + + UnityScreen: notify grab also when the screen is not grabbed but we got a NotifyWhileGrabbed event + +2014-05-13 Stephen M. Webb + + added changelog for #1251193 + +2014-05-13 Jinkyu Yi + + Dash: Fix problem at checking blacklisted unicode range + +2014-05-04 Jinkyu Yi + + Dash: Fix problem at checking blacklisted unicode range. Fixes: 1251193 + +2014-05-13 Stephen M. Webb + + added changelog for #1291461 + +2014-05-13 William Hua + + added proper support for modifier-only shortcuts on the lock screen + +2014-04-30 William Hua + + Treat Meta modifier as Alt. + +2014-04-30 William Hua + + Minor revisions. + +2014-04-29 William Hua + + Destroy accelerator controller between locks. + +2014-04-29 William Hua + + Remove gotos. + +2014-04-18 William Hua + + Make a separate controller just for accelerators. + +2014-04-18 William Hua + + Rip everything out and start anew. + +2014-04-15 William Hua + + Add proper support for modifier-only shortcuts on the lock screen. + +2014-05-02 Marc Deslauriers + + debian/changelog: sync with distro + +2014-05-02 Marco Trevisan (Treviño) + + PanelService: emit an invalid EntryActivated signal if the menu hasn't actually been shown + + In addition, if the menu is not visible after the first popup call, try to show a menu + without keyboard focus. This will make possible to see menus also when there's a key-grab + (although they will be without keyboard support). + + Finally, reset the menu state, if that failed. + +2014-04-29 Marco Trevisan (Treviño) + + LockScreenPanel: if a menu is opened, and the screen is not grabbed, give the grab back to the Shield. + +2014-04-29 Marco Trevisan (Treviño) + + PanelService: cleanup the menu popup code, avoid unnecessary calls to gtk_widget_is_visible + +2014-04-29 Marco Trevisan (Treviño) + + PanelService: if the menu is not visible, try to show a menu without keyboard focus + + This will make possible to see menus also when there's a key-grab. + +2014-04-29 Marco Trevisan (Treviño) + + PanelService: emit an invalid EntryActivated signal if the menu has not actually been shown + + And also reset the menu state, if that failed + +2014-05-02 Marco Trevisan (Treviño) + + UnityScreen: toggle activation of all the unity compiz actions when locking the screen + + Also, make sure that the lockscreen views are treated as "always-on-front" windows by nux + (and this applies to both visibility and events). + +2014-04-30 Marco Trevisan (Treviño) + + TestSessionController: verify correctly the new Hide method + +2014-04-30 Marco Trevisan (Treviño) + + LockScreenController: set the primary shield as the always on front window when another basewindow hides + + That window might have set itself as the always on front window, so we should restore our role + +2014-04-30 Marco Trevisan (Treviño) + + SessionController: set the dialog as the nux always on front view + +2014-04-30 Marco Trevisan (Treviño) + + SessionController: delete the views when hidden, we don't need to keep them around + +2014-04-30 Marco Trevisan (Treviño) + + UnityScreen: make sure we reset all the unity views before locking + +2014-04-30 Marco Trevisan (Treviño) + + UnityScreen: also send the terminate action to Alt pressure on lock + +2014-04-30 Marco Trevisan (Treviño) + + UnityScreen: toggle all the unity (and thus the Gnome) key bindings when locking + +2014-04-29 Marco Trevisan (Treviño) + + LockScreenShield: don't try to regrab again if we've been just requested to ungrab + +2014-04-29 Marco Trevisan (Treviño) + + LockScreenShield: wait for the next ungrab-event if we can't grab when panel is not active anymore + +2014-04-29 Marco Trevisan (Treviño) + + UnityScreen: toggle activation of all the unity compiz actions when locking the screen + +2014-04-29 Marco Trevisan (Treviño) + + LockScreenController: set the blank window or the primary shield as the always-on-front window + + In this way nux won't draw anything above it, nor will pass events to the underneath windows + +2014-04-23 CI bot + + Releasing 7.2.0+14.04.20140423-0ubuntu1 + +2014-04-23 Chris Townsend + + When setting the STARTING quirk for Application Launcher icons, only do it for the monitor specified in the passed in args. Fixes: 1291362 + +2014-04-21 Chris Townsend + + When setting the STARTING quirk for Application Launcher icons, only do it for the monitor specified in the passed in args. + +2014-04-23 Andrea Azzarone + + Close dash/hud/etc. on signal locked too. Fixes: 1308850 + +2014-04-17 Andrea Azzarone + + Use prompt_lock_requested signal. + +2014-04-17 Andrea Azzarone + + Close dash/hud/etc. on signal locked too. + +2014-04-17 Andrea Azzarone + + Close dash/hud/etc. on signal locked too. + +2014-04-16 CI bot + + Releasing 7.2.0+14.04.20140416-0ubuntu1 + +2014-04-16 Andrea Azzarone + + Do not allow to activate twice the same entry! Fixes: 1308572 + +2014-04-16 Andrea Azzarone + + Minor change. + +2014-04-16 Andrea Azzarone + + Fix ident. + +2014-04-16 Andrea Azzarone + + Do not allow to activate two times the same entry! + +2014-04-16 Marco Trevisan (Treviño) + + UnityScreen: save a locked.stamp file when locking/unlocking, to relock on startup + + This makes unity to relocks if it was locked before crashing... Fixes: 1308572 + +2014-04-17 Marco Trevisan (Treviño) + + UnityScreen: Save lock file stamp in $XDG_RUNTIME_DIR, cleanup it on destroy + +2014-04-17 Marco Trevisan (Treviño) + + DesktopUtilities: add GetUserRuntimeDirectory to fetch $XDG_RUNTIME_DIR + +2014-04-16 Marco Trevisan (Treviño) + + UnityScreen: save a locked.stamp file when locking/unlocking, to relock on startup + +2014-04-16 Marco Trevisan (Treviño) + + DesktopUtilities: add GetCacheDirectory, to fetch and create an unity cache dir + +2014-04-14 CI bot + + Releasing 7.2.0+14.04.20140414.1-0ubuntu1 + +2014-04-14 Marco Trevisan (Treviño) + + + CompizUtils: only shadow-decorate alpha windows that have full decorations as well + + Since alpha windows might have custom shapes, it's safer not to shadow-decorate them + unless they don't provide, for sure, a full decoration. + + This fixes, between the others, the unity force-quit dialog. Fixes: 1281825, 1307524 + +2014-04-14 Marco Trevisan (Treviño) + + CompizUtils: only shadow-decorate alpha windows that have full decorations as well + + Since alpha windows might have custom shapes, it's safer not to shadow-decorate them + unless they don't provide, for sure, a full decoration. + + This fixes, between the others, the unity force-quit dialog. + +2014-04-14 Sami Jaktholm + + Scale: Correctly detect the activation of a scale and set scale_just_activated_ + to true properly. Fixes: 1288789 + +2014-04-11 Sami Jaktholm + + Scale: Correctly detect the activation of a scale and set scale_just_activated_ + to true properly. + +2014-04-14 Alfred Neumayer + + Security issue: Gestures on the lock screen allow to peek inside running applications. + As with keyboard input, gestures should be blocked while the screen is locked. Fixes: 1303041, 1306973 + +2014-04-14 Alfred Neumayer + + Stop hiding the launchers parent window for now as it breaks urgent icon wiggling and hint shadow. + +2014-04-13 Alfred Neumayer + + Don't queue up drawing if the gestures are ignored. + +2014-04-12 Alfred Neumayer + + Make the lockscreen_controller accessible to other classes and don't allow 4 finger gestures in the lock screen. + +2014-04-12 Alfred Neumayer + + Should not even try to show the switcher if the screen is locked. + +2014-04-12 Alfred Neumayer + + Forgot a variable + +2014-04-12 Alfred Neumayer + + Also, don't hide the launcher window if expo or scale are active. + +2014-04-12 Alfred Neumayer + + Really shouldn't hide the launcher window if the dash is open. + +2014-04-11 CI bot + + Releasing 7.2.0+14.04.20140411-0ubuntu1 + +2014-04-11 Sami Jaktholm + + Lockscreen: Give proper grabs to the shield before releasing blank_window_. Fixes: 1306417 + +2014-04-11 Sami Jaktholm + + Lockscreen: Give proper grabs to the shield before releasing blank_window_. + +2014-04-10 CI bot + + Releasing 7.2.0+14.04.20140410.1-0ubuntu1 + +2014-04-10 William Hua + + Enable sound buttons and input source switching under lock screen. + +2014-04-11 William Hua + + Clean up. + +2014-04-11 William Hua + + Fix merge errors. + +2014-04-11 William Hua + + Minor changes. + +2014-04-11 William Hua + + Merge trunk. + +2014-04-11 William Hua + + Enable sound and input source shortcuts on lock screen. + +2014-04-10 CI bot + + LockScreen: add ability to show without fading in on some system calls + + Also, if locking is not enabled, calling Lock causes the screensaver to be initiated. + Many cleanups and misc fixes. Fixes: 1292575, 1305194 + +2014-04-10 Eleni Maria Stea + + It fixes the quicklist menu appearance. Fixes: 1298859 + +2014-04-09 Eleni Maria Stea + + fixed quicklist scaling + +2014-04-10 Brandon Schaefer + + When we detect caps lock, or caps lock is pressed, render a warning icon to show its on. Fixes: 1291737 + +2014-04-09 Brandon Schaefer + + * Make sure we update the caps lock detector when we change primary sheilds + +2014-04-01 Brandon Schaefer + + * Get rid of magic numbers, have to get the width of the cached + spin icon width, so we can place the warning icon in the right spot + +2014-04-01 Brandon Schaefer + + * Check if caps is on each time we make a new Prompt, as it can change + when authenticating, and we need to know. + +2014-04-01 Brandon Schaefer + + * Detect if caps lock is on, and check if caps lock is pressed. + If so, then render a warning icon. + +2014-04-10 Alfred Neumayer + + If the dash has not been opened before, a 4 finger tap will result in a dash with no selected scope. + Instead, set up the window and view of the dash by sending DASH_ABOUT_TO_SHOW (same happens when hovering the mouse pointer over the BFB icon) + and open the home scope. Fixes: 1303468 + +2014-04-10 Alfred Neumayer + + UnityGestureTarget.cpp: Remove spaces + +2014-04-10 Alfred Neumayer + + 4 finger tap: Set up the dash window and its view, show the home scope afterwards. + +2014-04-10 Alfred Neumayer + + Launcher: Show and hide the launcher window OnDragUpdate() to fix the gesture animations Fixes: 1303141 + +2014-04-10 Alfred Neumayer + + Only hide/unhide launcher window if autohide mode is on. + +2014-04-10 Alfred Neumayer + + Actually, Hide/Un-Hide launcher window in OnDragUpdate. + +2014-04-10 Alfred Neumayer + + Un-hide launcher window when dragging out using 4 finger gesture: https://bugs.launchpad.net/unity/+bug/1303141 + +2014-04-10 Alfred Neumayer + + Alt-Tab has always respected the alt-tab-bias-viewport setting, but the 3-finger gesture to switch between windows has not, even though it does the same thing. + They should behave the same way depending on the CCSM setting. Fixes: 1303060 + +2014-04-07 Alfred Neumayer + + Make 3 finger window switch gesture respect the alt-tab-bias-viewport setting by moving the check to SetUpAndShowSwitcher. + +2014-04-10 Sami Jaktholm + + Shortcuts: Listen and react to view close requests. Fixes: 1297842 + +2014-04-05 Sami Jaktholm + + Shortcuts: Listen and react to view close requests. + +2014-04-10 Marco Trevisan (Treviño) + + DecorationsGrabEdge, PanelMenuView: perform proper WM action on clicks, based on user settings Fixes: 1283849 + +2014-04-02 Marco Trevisan (Treviño) + + PanelMenuView: use generic actions based on WM settings for double,middle and right clicks + +2014-04-02 Marco Trevisan (Treviño) + + WindowManager: add methods to {Horizontally,Vertically}Maximize a window + +2014-04-02 Marco Trevisan (Treviño) + + WindowManager: add window shading methods + +2014-04-02 Marco Trevisan (Treviño) + + DecorationsGrabEdge: perform proper WM action on clicks, based on user settings + +2014-04-02 Marco Trevisan (Treviño) + + DecorationStyle: add WindowManagerAction to get WM click options + +2014-04-02 Marco Trevisan (Treviño) + + Merging with lp:~3v1n0/unity/right-left-click-maximize-fix + +2014-04-10 CI bot + + Releasing 7.2.0+14.04.20140410-0ubuntu1 + +2014-04-10 CI bot + + Session: Don't lock the screen if screen locking is disabled by + org.gnome.desktop.lockdown disable-lock-screen. Fixes: 1292154 + +2014-04-10 CI bot + + ScreenSaverDBusManager: start/stop gnome-screensaver if we don't/do handle the locking + + This allows to just use the fallback gnome-screensaver lockscreen if we need to use it. Fixes: 1303712 + +2014-04-10 CI bot + + GnomeSessionManager: impelement gnome session dbus interface and a fader to blank the screen Fixes: 1291088, 1292041, 1292078, 1292446, 1292451 + +2014-04-10 Marco Trevisan (Treviño) + + LockScreen: add ability to show without fading in on some system calls + + Also, if locking is not enabled, calling Lock causes the screensaver to be initiated. + Many cleanups and misc fixes. Fixes: 1292575, 1305194 + +2014-04-10 Marco Trevisan (Treviño) + + LockScreenController: fire screensaver_post_lock_timeout_ when the view is fully visible + +2014-04-10 Marco Trevisan (Treviño) + + GnomeSessionManager: if it's impossible to lock a session, start the screensaver on lock + + This is what most of apps expect, and thus we do that. Although it's not really that coherent. + +2014-04-10 Marco Trevisan (Treviño) + + SessionManager: add ScreenSaver{Activate,Deactivate} and relevant signals and export them + + Update LockScreenController and dbus apis to match this + +2014-04-10 Marco Trevisan (Treviño) + + LockScreenController: remove some racy code, avoid to emit multiple signals + + And fix pre-lock blank window + +2014-04-10 Marco Trevisan (Treviño) + + LockScreenController: increase the lockscreen timeout wait to be bigger to a frame duration + +2014-04-10 Marco Trevisan (Treviño) + + SessionDBusManager: export PromptLock method on the dbus + +2014-04-10 Marco Trevisan (Treviño) + + BackgroundSettings: don't create new panel style instances, use the actual instance + +2014-04-10 Marco Trevisan (Treviño) + + ScreenSaverDBusManager: get rid of the old active_ bool variable, that caused undefined behavior + +2014-04-09 Marco Trevisan (Treviño) + + LockScreenController: even more cleanup, move blank window grabbing to own function + +2014-04-09 Marco Trevisan (Treviño) + + UnityWindow: we need to paint also the decorations of the windows, when in lock-mode + + Othewise their texture won't be rebuilt and this will lead to wrong textures. + Also, we don't need to damage the screen when lock opacity changes as it's done by nux. + +2014-04-09 Marco Trevisan (Treviño) + + LockScreenController: also hide BlankWindow on mouse and keyboard down events + +2014-04-09 Marco Trevisan (Treviño) + + LockScreenController: show a blank window unless we don't have the lockscreen ready on prompt requests + +2014-04-09 Marco Trevisan (Treviño) + + SessionDBusManager: add support for "PromptLock" + +2014-04-09 Marco Trevisan (Treviño) + + GnomeSessionManager: use prompt lockscreen on logind lock requests + +2014-04-09 Marco Trevisan (Treviño) + + LockScreenController: add support to PromptLockScreen + +2014-04-09 Marco Trevisan (Treviño) + + SessionManager: add PromptLockScreen method and signal, to require a fast lock (with no fading) + +2014-04-09 Marco Trevisan (Treviño) + + Merging with lp:~sjakthol/unity/fix-1292154 + +2014-04-06 Sami Jaktholm + + Don't cache the value and watch for changes. Check the setting every time instead. + +2014-04-06 Sami Jaktholm + + Session: Don't lock the screen if screen locking is disabled by + org.gnome.desktop.lockdown disable-lock-screen. + +2014-04-09 Marco Trevisan (Treviño) + + Merging with parent + +2014-04-09 Marco Trevisan (Treviño) + + LockScreenController: make sure whe hide the blank window on unlock + +2014-04-09 Marco Trevisan (Treviño) + + Merging with lp:~laney/unity/g-s-replace + + Remves the ugly killall + +2014-04-09 Iain Lane + + Take over as the owner of the gnome-screensaver interface, if necessary. + +2014-04-09 Iain Lane + + Allow skipping of the tests with DEB_BUILD_OPTIONS=nocheck + +2014-04-09 Marco Trevisan (Treviño) + + Merging with parent branch + +2014-04-09 Marco Trevisan (Treviño) + + LockScreenController: add ShowBlankWindow method + +2014-04-09 Marco Trevisan (Treviño) + + UnityShell: ops, remove wrong change + +2014-04-09 Marco Trevisan (Treviño) + + Merging with parent branch + +2014-04-09 Marco Trevisan (Treviño) + + LockScreenController: start the screensaver after few seconds that the user has locked his session, if there's no more interaction + +2014-04-09 Marco Trevisan (Treviño) + + LockScreenShield: emit a signal when we receive a keyboard input + +2014-04-09 Marco Trevisan (Treviño) + + LockScreenController: immediately start the screensaver on SetActive dbus call + +2014-04-09 Marco Trevisan (Treviño) + + ScreenSaverDBusManager: add request_activate signal that is emitted on remote activation request + +2014-04-09 Marco Trevisan (Treviño) + + LockScreenController: some cleanup, and HideBlankWindow on simulate user activity + +2014-04-09 Marco Trevisan (Treviño) + + LockScreenController: keep track of dbus_manager and reset screensaver on simulate-user activity + +2014-04-09 Marco Trevisan (Treviño) + + ScreenSaverDBusManager: implement SimulateUserActivity + +2014-04-09 Marco Trevisan (Treviño) + + ScreenSaverDBusManager: use a nux property for active state + +2014-04-09 Marco Trevisan (Treviño) + + LockScreenController: don't animate when locking the screen on suspend or screensaver + +2014-04-09 Marco Trevisan (Treviño) + + LockScreenController: we can lock the screen if the GS setting is disabled + + Also rename the setting to be more understandable + +2014-04-09 Marco Trevisan (Treviño) + + Merging with parent branch + +2014-04-09 Marco Trevisan (Treviño) + + LockScreenController: always call LockScreen of SessionManager as it has some checks + +2014-04-09 Marco Trevisan (Treviño) + + UnityScreen: damage the screen when the lockscreen opacity changes + +2014-04-09 Marco Trevisan (Treviño) + + LockScreenController: use a ROProperty for opacity + +2014-04-09 Marco Trevisan (Treviño) + + LockScreenController: only try to lock if locking is enabled + +2014-04-08 Marco Trevisan (Treviño) + + LockScreenController: use timeout seconds for lock delay + +2014-04-08 Marco Trevisan (Treviño) + + LockScreenController: only use one window to blank the screen, it's not needed to have one per monitor + +2014-04-08 Marco Trevisan (Treviño) + + LockScreenController: move OnPresenceStatusChanged into a function + +2014-04-08 Marco Trevisan (Treviño) + + LockScreenController: lock the screen on suspend if ubuntu is configured to do so + +2014-04-08 Marco Trevisan (Treviño) + + Uscreen: emit suspending signal on PrepareForSleep + +2014-04-08 Marco Trevisan (Treviño) + + LockScreenController: use direction to set the animation value + +2014-04-09 Marco Trevisan (Treviño) + + ExternalGschema: add missing external settings + +2014-04-08 Marco Trevisan (Treviño) + + LockScreenSettings: also use legacy lockscreen if screen reader is enabled + +2014-04-08 Marco Trevisan (Treviño) + + ScreenSaverDBusManager: add some comments + +2014-04-08 Marco Trevisan (Treviño) + + ScreenSaverDBusManager: use async calls + +2014-04-08 Marco Trevisan (Treviño) + + LockScreenController: call gnome-screensaver to lock the screen if we use a legacy lockscreen + +2014-04-08 Marco Trevisan (Treviño) + + ScreenSaverDBusManager: start/stop gnome-screensaver if we don't/do handle the locking + +2014-04-08 Marco Trevisan (Treviño) + + LockScreenSettings: add use_fallback option, that is on if OSK is active + + This is to workaround on screen keyboard issues + +2014-04-07 Marco Trevisan (Treviño) + + Add GS schemas to external list + +2014-04-07 Marco Trevisan (Treviño) + + GnomeSessionManager: use enum class PresenceStatus instead of magic numbers + +2014-04-07 Andrea Azzarone + + Merge trunk. + +2014-04-07 Andrea Azzarone + + Remove magic numbers. + +2014-04-07 Andrea Azzarone + + Do not implement SimulateUserActivity. + +2014-04-07 Andrea Azzarone + + Update tests. + +2014-04-07 Andrea Azzarone + + Start cleaning lockscreen code. + +2014-04-06 Andrea Azzarone + + Fix. Code style is still WIP. + +2014-04-04 Andrea Azzarone + + Lock the screen after a delay. + +2014-04-02 Andrea Azzarone + + Add the first settings. + +2014-04-02 Andrea Azzarone + + Initial commit to implement g-s dbus interface in unity. + +2014-04-04 CI bot + + Releasing 7.2.0+14.04.20140404-0ubuntu1 + +2014-04-04 Marco Trevisan (Treviño) + + ForceQuitDialog: add a new "sheet style" dialog that is shown when a window hangs + + Listen to compiz toolkit events and prompt a dialog that allows to force-quit an + hanging application. Fixes: 698031, 1299061, 1299080 + +2014-04-02 Marco Trevisan (Treviño) + + ForceQuitDialog: make sure that the dialog is not deletable by WM + + For this to be safe we need also to ignore the delete events + +2014-04-02 Marco Trevisan (Treviño) + + POTFILES: include DecorationsForceQuitDialog.cpp + +2014-04-02 Marco Trevisan (Treviño) + + DecoratedWindow: let's do one line things! + +2014-04-02 Marco Trevisan (Treviño) + + ForceQuitDialog: make sure we hide the dialog before we killed the parent window + + It must be hidden before than the parent, in case the window is not really killed, + it will be shown anyway later. + +2014-04-02 Marco Trevisan (Treviño) + + ForceQuitDialog: avoid warnings on close, due to finalized close button + +2014-04-02 Marco Trevisan (Treviño) + + DecorationsForceQuitDialog: emit close_request signal on close and "Wait" button + +2014-04-02 Marco Trevisan (Treviño) + + DecorationsForceQuitDialog: add close_request signal and destroy window when it gets called + +2014-04-02 Marco Trevisan (Treviño) + + DecoratedWindow: add missing call to UpdateForceQuitDialogPosition + + Maybe it was removed due to a shelved change... + +2014-04-02 Marco Trevisan (Treviño) + + DecorationsForceQuitDialog: implement actual window killing by using both XKillClient and kill -9 + + Yeah, now + +2014-04-02 Marco Trevisan (Treviño) + + DecorationsForceQuitDialog: use proper class names (mostly for theming) + +2014-04-02 Marco Trevisan (Treviño) + + DecorationsForceQuitDialog: use themed button textures + +2014-04-02 Marco Trevisan (Treviño) + + DecorationsForceQuitDialog: set the dialog pid/hostname to match the ones of the parent window + + In this way we don't confuse BAMF about the ownership of the dialog. + +2014-04-02 Marco Trevisan (Treviño) + + ForceQuitDialog: use the same window class of the real parent window + +2014-04-02 Marco Trevisan (Treviño) + + ForceQuitDialog: keep the dialog centered on parent window when its geometry changes + +2014-04-02 Marco Trevisan (Treviño) + + DecorationsManager.cpp: show a forcequit dialog when we get a toolkitActionForceQuitDialog ClientMessage + + These events are triggered directly by compiz, so we only have to catch them! + +2014-04-02 Marco Trevisan (Treviño) + + DecoratedWindow: add ShowForceQuitDialog method to show a forcequit dialog on given window + +2014-04-02 Marco Trevisan (Treviño) + + DecorationsForceQuitDialog: set dialog X time to match the one of the close event + + In this way we correctly handle the focus-stealing prevention + +2014-04-01 Marco Trevisan (Treviño) + + ForceQuitDialog: set shape area to ignore input events outside the actual dialog + +2014-04-01 Marco Trevisan (Treviño) + + DecorationsForceQuitDialog: set parent window as its actual parent X-side, and center on it + +2014-04-01 Marco Trevisan (Treviño) + + ForceQuitDialog: fix label strings + +2014-03-28 Marco Trevisan (Treviño) + + Merge with trunk + +2014-03-27 Marco Trevisan (Treviño) + + DecorationsForceQuitDialog: obey to style for shadows + +2014-03-27 Marco Trevisan (Treviño) + + DecorationsForceQuitDialog: add first basic gtk implementation of the force-quit dialog + +2014-04-04 Chris Townsend + + Fix issue where windows that are in Show Desktop mode are selected for spread have a blank preview. This fix will Fade Out the window for Spread and Fade In the window again when Spread exits if that window is not chosen. Fixes: 1104236 + +2014-04-04 Chris Townsend + + Fix issue where windows that are in Show Desktop mode are selected for spread have a blank preview. This fix will Fade Out the window for Spread and Fade In the window again when Spread exits if that window is not chosen. + +2014-04-03 CI bot + + Releasing 7.2.0+14.04.20140403-0ubuntu1 + +2014-04-03 Marco Trevisan (Treviño) + + DecorationsGrabEdge: Only perform tookit actions on right-click Fixes: 1301459 + +2014-04-02 Marco Trevisan (Treviño) + + DecorationsGrabEdge: Only perform tookit actions on right-click + +2014-04-03 Marco Trevisan (Treviño) + + UnityScreen: reset decoration::DataPool on destruction, otherwise we won't have a valid screen ptr Fixes: 1291243 + +2014-04-02 Marco Trevisan (Treviño) + + UnityScreen: reset decoration::DataPool on destruction, otherwise we won't have screen ptr valid + +2014-04-02 Marco Trevisan (Treviño) + + DecorationsDataPool: add static Reset method that allows to reset our textures + +2014-04-03 Marco Trevisan (Treviño) + + ApplicationLauncherIcon: recompute pips when the screen geometry changes Fixes: 1024101 + +2014-04-02 Marco Trevisan (Treviño) + + ApplicationLauncherIcon: recompute pips when the screen geometry changes + +2014-04-03 Marco Trevisan (Treviño) + + Launcher: hide the launcher window when in auto-hide mode if it's not presented Fixes: 1301394 + +2014-04-02 Marco Trevisan (Treviño) + + Launcher: hide the launcher window when in auto-hide mode if it's not presented + +2014-04-03 Stephen M. Webb + + remove libsyncindicator from services/panel-service.c + +2014-04-02 Stephen M. Webb + + remove libsyncindicator.so (lp: #1300916) + +2014-04-03 Dimitri John Ledkov + + Drop U1 default shortcuts & indicator-sync recommendation. (LP: #1300916) Fixes: 1300916 + +2014-04-02 Dimitri John Ledkov + + Drop U1 default shortcuts & indicator-sync recommendation. (LP: #1300916) + +2014-04-02 CI bot + + Releasing 7.2.0+14.04.20140402-0ubuntu1 + +2014-04-02 Stephen M. Webb + + bump to release 7.2.0 + +2014-04-01 Stephen M. Webb + + debian/control: fix some style warnings in package description + +2014-04-01 Stephen M. Webb + + debian/changelog: fix syntax to silence a lintian warning + +2014-04-01 Stephen M. Webb + + debian/control(Standards-Version): bump to 3.9.5 (no changes) + +2014-03-31 Stephen M. Webb + + release 7.2.0 + +2014-04-02 Marco Trevisan (Treviño) + + SpreadFilter: use launcher width, scale on HiDPI, match also application names + + Launcher Width is now considered in setting the offset of the scale filter (fixes + padding when launcher is in autohide mode). + The search bar is correctly scaled when in HiDPI mode. + We use ApplicationManager and thus BAMF to match windows by their name or app name. Fixes: 1281297, 1282001, 1300763, 1300842 + +2014-04-01 Marco Trevisan (Treviño) + + SpreadFilter: use casefold instead that tolower as it's meant for equalty checks as we do here + +2014-04-01 Marco Trevisan (Treviño) + + SpreadFilter: implement our own to_lower_copy that works with utf8 + +2014-04-01 Marco Trevisan (Treviño) + + UnityScreen: match the scaled windows based on the SpreadFilter matches + +2014-04-01 Marco Trevisan (Treviño) + + SpreadFilter: compute a list of filtered windows using both window and application name + +2014-04-01 Marco Trevisan (Treviño) + + SpreadFilter: take in consideration the launcher width when setting the spread offset + +2014-04-01 Marco Trevisan (Treviño) + + SpreadFilter :Scale the internal searchbar to match DPI settings + +2014-04-01 Marco Trevisan (Treviño) + + SearchBar: fix crash when trying to update the show filter scale in a filterless-search bar + +2014-04-02 Marco Trevisan (Treviño) + + PanelMenuView: use panel style context for painting the panel title Fixes: 1296866 + +2014-03-31 Marco Trevisan (Treviño) + + PanelMenuView: add "panel-title" class to the panel style context when drawing title + +2014-03-31 Marco Trevisan (Treviño) + + PanelStyle: return a Style context with different widget path in GetStyleContext based on type + +2014-03-31 Marco Trevisan (Treviño) + + PanelMenuView: use panel style context for painting the panel title + +2014-03-31 Marco Trevisan (Treviño) + + DecorationStyle: allow to use a different style context in DrawTitle + + Panel will need to use a different one + +2014-04-02 Marco Trevisan (Treviño) + + Panel, Decorations: draw the background under the text glyphs before the text itself Fixes: 723167 + +2014-03-31 Marco Trevisan (Treviño) + + UnitySettings: never allow values minor or equal to 0 as UI scale + +2014-03-31 Marco Trevisan (Treviño) + + DecorationsMenuEntry: draw background under text glyphs + +2014-03-31 Marco Trevisan (Treviño) + + DecorationsTitle: draw background under text glyphs + +2014-03-31 Marco Trevisan (Treviño) + + DecorationStyle: draw text glyphs background on menu items + +2014-03-31 Marco Trevisan (Treviño) + + PanelMenuView: draw the background under the text glyphs + +2014-03-31 Marco Trevisan (Treviño) + + DecorationStyle: add support for drawing the text background under the glyphs + +2014-03-31 Marco Trevisan (Treviño) + + PanelIndicatorEntryView: draw the background under the text glyphs + +2014-04-02 Marco Trevisan (Treviño) + + CompizUtils: only shadow-decorate alpha windows that have full decorations as well + + Since alpha windows might have custom shapes, it's safer not to shadow-decorate them + unless they don't provide, for sure, a full decoration. Fixes: 1281825 + +2014-03-29 Marco Trevisan (Treviño) + + CompizUtils: only shadow-decorate alpha windows that have full decorations as well + + Since alpha windows might have custom shapes, it's safer not to shadow-decorate them + unless they don't provide, for sure, a full decoration. + +2014-03-28 CI bot + + Releasing 7.1.2+14.04.20140328.1-0ubuntu1 + +2014-03-28 Marco Trevisan (Treviño) + + IconRenderer: scale textures when loading them based on the current launcher scaling + + Add SVG textures for tiles and markers (thanks to Matthieu James) to replace .pngs, also make them themable. Fixes: 1297588, 1298488 + +2014-03-27 Marco Trevisan (Treviño) + + Resources, launcher markers: reduce outline opacity to match previous values + +2014-03-27 Matthieu James + + resources: use outline instead of blurring in launcher markers + +2014-03-27 Marco Trevisan (Treviño) + + Resources, launcher_pip_{ltr,rtl }: don't use the shadow in big version, just an outline + +2014-03-27 Marco Trevisan (Treviño) + + IconRenderer: Use multiple sizes for arrows (using SVGs now) + +2014-03-27 Matthieu James + + Resources: add SVGs for launcher markers (pips and arrows) + +2014-03-27 Marco Trevisan (Treviño) + + TextureCache: use better loading size logic + +2014-03-26 Matthieu James + + launcher_icon_edge: fix icon shine to match previous PNGs + +2014-03-26 Marco Trevisan (Treviño) + + IconRenderer: use better naming for content sizes, it's about tiles + +2014-03-26 Marco Trevisan (Treviño) + + SwitcherController: initialize the icon renderer on construction + +2014-03-26 Marco Trevisan (Treviño) + + IconRenderer: save default icon sizes as integers + +2014-03-26 Marco Trevisan (Treviño) + + IconRenderer: load properly scaled pips and arrows + +2014-03-26 Marco Trevisan (Treviño) + + IconRenderer: invalidate and reload cached textures on theme changes + +2014-03-25 Marco Trevisan (Treviño) + + IconRenderer: make launcher textures themable + +2014-03-25 Marco Trevisan (Treviño) + + SwitcherController: cache the IconRenderer instead of rebuilding one everytime we build a view + + This reduces the view construction time to 1ms here (it was 15ms with PNGs and 130ms with SVGs) + +2014-03-25 Marco Trevisan (Treviño) + + IconRenderer: use SVGs textures for rendering icons + + This improves quality when resizing the launcher/switcher + +2014-03-25 Matthieu James + + Resources: add Launcher icon textures SVGs + +2014-03-28 Marco Trevisan (Treviño) + + 02_unity_setup_text_scale_factor: actually make it working, copy the gnome value to unity Fixes: 1298492 + +2014-03-24 Marco Trevisan (Treviño) + + 02_unity_setup_text_scale_factor: actually make it working, copy the gnome value to unity + +2014-03-28 Brandon Schaefer + + When we see an escape in lockscreen prompt, clear the password. Fixes: 1292647 + +2014-03-26 Brandon Schaefer + + * Check if empty before accessing front :) + +2014-03-25 Brandon Schaefer + + * Only clear the focused text entry + +2014-03-25 Brandon Schaefer + + * When we hit an escape clear the password prompt + +2014-03-28 Marco Trevisan (Treviño) + + Tooltip, QuicklistView: use the decoration shadow radius for computing padding Fixes: 1291407, 1297035 + +2014-03-25 Marco Trevisan (Treviño) + + QuicklistView: fix paddings + +2014-03-25 Marco Trevisan (Treviño) + + QuicklistView: consider the QL monitor geometry when defining its position + + Also remove some code duplication. + +2014-03-25 Marco Trevisan (Treviño) + + QuicklistView: remove the unneeded members, use globals for const values + +2014-03-25 Marco Trevisan (Treviño) + + QuicklistView: use the decoration shadow radius for computing padding + +2014-03-25 Marco Trevisan (Treviño) + + Tooltip: use the decoration shadow radius for computing padding + +2014-03-28 Andrea Azzarone + + Fixes the double lockscreen when switching users. Fixes: 1291088, 1298202 + +2014-03-24 Andrea Azzarone + + Use reset and remove the layout manually to avoid crashes. + +2014-03-28 Stephen M. Webb + + restart unity-panel-service for only the current session when restarting unity from the command line Fixes: 777594 + +2014-03-22 Stephen M. Webb + + only shut down Unity panel service for te current session + +2014-03-28 Robert Ancell + + Call pam_acct_mgmt and pam_chauthtok when unlocking screen Fixes: 1296443 + +2014-03-24 Robert Ancell + + Ignore errors from pam_setcred - we shouldn't lock out the user on this + +2014-03-24 Robert Ancell + + Call pam_acct_mgmt and pam_chauthtok when unlocking screen + +2014-03-21 CI bot + + Releasing 7.1.2+14.04.20140321-0ubuntu1 + +2014-03-21 Andrea Azzarone + + Release the lockscreen_timeout (that we use to get the grab properly) on unlock. + +2014-03-21 Andrea Azzarone + + Release the timeout on unlock. + +2014-03-21 Marco Trevisan (Treviño) + + UnitySettings: apply the unity scaling factor to global system settings + + We basically use the integer part of our scaling factor as the Gdk scaling factor, + while we apply the point scaling to the Gdk text-scaling-factor. + In this way the readable items will match our scaling. Fixes: 1295436, 1295445 + +2014-03-22 Marco Trevisan (Treviño) + + Merging with trunk + +2014-03-21 Marco Trevisan (Treviño) + + UnitySettings: avoid double form_factor signal emission + +2014-03-21 Marco Trevisan (Treviño) + + migration-scripts: rename to match debian settings + +2014-03-21 Marco Trevisan (Treviño) + + TestGSettingsScopes: we need to initialize gsetting environment here + +2014-03-21 Marco Trevisan (Treviño) + + TestUnitySettings: initialize the form-factor as desktop, by default + +2014-03-21 Marco Trevisan (Treviño) + + TestUnitySettings: use better test prerequisite checks + +2014-03-21 Marco Trevisan (Treviño) + + DashController: make sure we disconnect from Settings changes + +2014-03-21 Marco Trevisan (Treviño) + + Merging with trunk + +2014-03-21 Marco Trevisan (Treviño) + + Tests: Initialize unity::Settings on test_main, it's too spreaded to repeat it everywhere + +2014-03-21 Marco Trevisan (Treviño) + + UnitySettings: initialize everything inside Impl + +2014-03-21 Marco Trevisan (Treviño) + + DashStyle: connect to signals using sigc::mem_fun inside the impl, so we avoid crashes + +2014-03-21 Marco Trevisan (Treviño) + + Tests: don't care about initialing gsettings test environment, as it's done on test main + +2014-03-21 Marco Trevisan (Treviño) + + debian/unity.migrations: add migration script that sets the current scaling factor to unity + +2014-03-21 Marco Trevisan (Treviño) + + IconLoader: use our text-scaling factor also when computing icon size + +2014-03-21 Marco Trevisan (Treviño) + + UnitySettings: Add unity "cursor-scale-factor" interface setting to customize the cursor scaling + +2014-03-21 Marco Trevisan (Treviño) + + UnitySettings: don't depend on decoration::Style for text size anymore, get it from settings and monitor it + + Before we were not monitoring changes to text size, and this was leading to not-updated EMConverter's + +2014-03-21 Marco Trevisan (Treviño) + + UnitySettings: some cleanups, fix regression on LIM key not being monitored anymore + +2014-03-21 Marco Trevisan (Treviño) + + UnitySettings: also scale the cursor size to match current scaling + +2014-03-21 Marco Trevisan (Treviño) + + UnitySettings: monitor the gnome 'text-scaling-factor' changes and applies them to our scaling factor + +2014-03-20 Marco Trevisan (Treviño) + + Merging with lp:~3v1n0/unity/dash-hidpi-cleanup + +2014-03-20 Marco Trevisan (Treviño) + + UnityShell: add FontSettings back + +2014-03-20 Marco Trevisan (Treviño) + + UnitySettings: move unity UI settings to com.canonical.Unity.Interface + +2014-03-20 Marco Trevisan (Treviño) + + Unity GSchema: fix app-scale-factor-monitor description + +2014-03-20 Marco Trevisan (Treviño) + + UnitySettings: add "app-scale-factor-monitor" setting that we use to define the leader monitor + + The monitor defined by this value is used as reference for scaling all the other applications + +2014-03-20 Marco Trevisan (Treviño) + + ResultView: reload the dash results if the text scaling has changed + + This fixes an issue we had when changing the font scale factor + +2014-03-20 Marco Trevisan (Treviño) + + Unity: Don't use "gtk-xft-dpi" setting for text-scaling, but our own value + +2014-03-20 Marco Trevisan (Treviño) + + UnitySettings: add scale-factor property, and multiply it to gnome scale factor + +2014-03-20 Marco Trevisan (Treviño) + + FontSettings: remove useless code + +2014-03-20 Marco Trevisan (Treviño) + + Merging with lp:~3v1n0/unity/dash-hidpi-cleanup + +2014-03-20 Marco Trevisan (Treviño) + + UnitySettings: apply the unity scaling factor to global system settings + + We basically use the integer part of our scaling factor as the Gdk scaling factor, + while we apply the point scaling to the Gdk text-scaling-factor. + In this way the readable items will be scaled to match our scaling. + +2014-03-20 Marco Trevisan (Treviño) + + DecorationStyle: allow to make pango layout to guess its size + +2014-03-21 Marco Trevisan (Treviño) + + Dash: Use nux properties for scale and cairo device scaling + +2014-03-22 Marco Trevisan (Treviño) + + Merge with trunk + +2014-03-20 Marco Trevisan (Treviño) + + ScopeBarIcon: some code cleanup + +2014-03-20 Marco Trevisan (Treviño) + + ScopeBarIcon: redraw the icon on scale changes + +2014-03-20 Marco Trevisan (Treviño) + + Dash: use nux::Property for scale + +2014-03-20 Marco Trevisan (Treviño) + + ResultRendererTile: use cairo device scaling for scaling elements + +2014-03-20 CI bot + + Releasing 7.1.2+14.04.20140320.1-0ubuntu1 + +2014-03-20 Andrea Azzarone + + Do not lock a guest session. Fixes: 1295194 + +2014-03-20 Andrea Azzarone + + Prevent a guest session to lock. + +2014-03-20 Andrea Azzarone + + Wait for the grab before showing the lockscreen. Fixes: 1291497, 1291547, 1292225 + +2014-03-20 Andrea Azzarone + + Merge trunk. + +2014-03-19 Andrea Azzarone + + Minor change. + +2014-03-19 Andrea Azzarone + + Fix tests. + +2014-03-19 Andrea Azzarone + + Close spread on lockscreen. + +2014-03-18 Andrea Azzarone + + Do not lock the screen if the screen is already grabbed. That's the way other lockscreen works. + +2014-03-20 Brandon Schaefer + + Use key_code instead of key_sym for the Super+ shortcut. Fixes: 1294885 + +2014-03-19 Brandon Schaefer + + * Cache the x11 display + +2014-03-19 Brandon Schaefer + + * Move both key_code conversions to the HandleKeyEvent function + +2014-03-19 Brandon Schaefer + + * Go back to using KeyCode for the Super + shortcut. + +2014-03-20 Chris Townsend + + Change the signal for detecting resuming from Suspend from UPower (which is unreliable) to logind. Fixes: 1210077 + +2014-03-19 Chris Townsend + + Change the signal for Suspend from UPower (which is unreliable) to logind. + +2014-03-18 CI bot + + Releasing 7.1.2+14.04.20140318-0ubuntu1 + +2014-03-18 Andrea Azzarone + + Do not consider minimized windows for cross fade effect. Fixes: 1291402, 1293672 + +2014-03-17 Andrea Azzarone + + Fix 1291402. + +2014-03-18 Andrea Azzarone + + Whitelist "onboard" for rendering during lockscreen. Fixes: 1291402, 1291685 + +2014-03-18 Andrea Azzarone + + Raise osk on lockscreen. + +2014-03-17 Andrea Azzarone + + Merge lp:~andyrock/unity/onboard-lockscreen. + +2014-03-13 Andrea Azzarone + + Whitelist "onboard". + +2014-03-18 Chris Townsend + + Add ability to minimize a single window application when clicking on the Launcher icon of the application. Fixes: 733349 + +2014-03-18 Chris Townsend + + Add "Unsupported" language to the new minimize single window option in CCSM. + +2014-03-17 Chris Townsend + + Add in a CCSM option to enable the click-launcher-icon-to-minimize-window behavior. + +2014-03-17 Tigran Gabrielyan + + Add ability to minimize a single window application when clicking on the Launcher icon of the application. + +2014-03-18 Brandon Schaefer + + Do not avoid rendering the lockscreen when we have a fullscreen app. This also removes the old fullscreen + lockscreen fix where we force painted our selfs on top. Fixes: 1291571, 1292442 + +2014-03-18 Brandon Schaefer + + * Fix the fadding issue + +2014-03-17 Brandon Schaefer + + * Do not remove all of nux windows when a window is fullscreen. + This was hidding the lockscreen. + * Now we also avoid rendering panel shawdow when in lockscreen mode. + +2014-03-18 Brandon Schaefer + + Update the DPI when we setup the view. Fixes: 1292268 + +2014-03-13 Brandon Schaefer + + * Update the DPI when we setup the views + +2014-03-13 CI bot + + Releasing 7.1.2+14.04.20140313-0ubuntu1 + +2014-03-13 Brandon Schaefer + + If the switcher is open when going into lockscreen, hide it! Fixes: 1292225 + +2014-03-13 Brandon Schaefer + + * Hide switcher when going into lockscreen + +2014-03-13 Brandon Schaefer + + Cleartool tips when entering alt+tab mode. Fixes: 1285889 + +2014-03-13 Brandon Schaefer + + * Clear tooltips when entering alt+tab mode. No more strange rendering issues. + +2014-03-13 Brandon Schaefer + + Clear the tooltips when going into the lockscreen. Fixes: 1291503 + +2014-03-13 Brandon Schaefer + + * Clear tooltips when going into lockscreen + +2014-03-13 Brandon Schaefer + + When we are about to LockScreen(). Hide the Dash/Hud if an overlay is open! Fixes: 1291383 + +2014-03-12 Brandon Schaefer + + * Use the signal to hide dash/hud + +2014-03-12 Brandon Schaefer + + * tmp + +2014-03-12 Brandon Schaefer + + * If we have scale mode active, lets exit it before going into lockscreen :) + +2014-03-12 Brandon Schaefer + + * When we are about to lock the screen hide the dash/hud + +2014-03-13 Brandon Schaefer + + When the lockscreen is locked, force paint it on top. This isn't the perfect fix, but it a lot safer of a fix. Fixes: 1291571 + +2014-03-12 Brandon Schaefer + + * When we go into lockscreen, force paint ourselfs above. + (note this is no where near the perfect fix, but it does work for what we need.) + +2014-03-12 CI bot + + Releasing 7.1.2+14.04.20140312-0ubuntu1 + +2014-03-12 Brandon Schaefer + + When the monitors change, go through and update all the launcher widths for all launchers. Fixes: 1291034 + +2014-03-12 Brandon Schaefer + + * Merge Chris's branch + +2014-03-12 Brandon Schaefer + + * Merge Trunk + +2014-03-11 Brandon Schaefer + + * Fix issue when a new monitor is pluged in and the dash/hud do not + get the correct offset based on the launcher_width + +2014-03-12 Luke Yelavich + + Present a textual description of the state of applications to screen reader users when navigating the launcher. Fixes: 1266298 + +2014-03-12 Luke Yelavich + + Also mark launcher icon a11y code for translation. + +2014-03-12 Luke Yelavich + + Whoops size_type is different on 32 and 64 bit systems. + +2014-03-11 Luke Yelavich + + Present a textual description of the state of applications to screen reader users when navigating the launcher. + +2014-03-12 CI bot + + fixes the segfault occuring when the scale factor is < 1.0 Fixes: 1288166 + +2014-03-12 Marco Trevisan (Treviño) + + Decorations and Menus: a bunch of various fixes... Fixes: 1283156, 1283238, 1283786, 1287464, 1287747, 1288166, 1291137, 1291622, 1291650 + +2014-03-13 Marco Trevisan (Treviño) + + Merging with lp:~3v1n0/unity/scale-layout-windows + +2014-03-12 Marco Trevisan (Treviño) + + SwitcherView: update the LayoutWindow scale value to match current progress + +2014-03-12 Marco Trevisan (Treviño) + + DecoratedWindow: never try to set the appmenu if LIMs are disabled + +2014-03-12 Marco Trevisan (Treviño) + + PanelMenuView: make sure we ignore all the not-needed code when integrated menus are disabled + +2014-03-12 Marco Trevisan (Treviño) + + PanelMenuView: remove implicit call + +2014-03-12 Marco Trevisan (Treviño) + + PanelService: use proper monitor when popping-up a menu + +2014-03-12 Marco Trevisan (Treviño) + + Merging with lp:~3v1n0/unity/scale-layout-windows + +2014-03-12 Marco Trevisan (Treviño) + + Merging with lp:~hikiko/unity/unity.fix-segfault + +2014-03-12 Eleni Maria Stea + + fixed segmentation fault when scale < 1 + +2014-03-12 Marco Trevisan (Treviño) + + Merging with trunk + +2014-03-04 Marco Trevisan (Treviño) + + PanelMenuView: Make sure we update the is_inside_ variable once all menus are hidden + +2014-03-04 Marco Trevisan (Treviño) + + PanelMenuView: refresh the panel title if a window state changes in LIM mode + + When using LIMs we care also about inactive-windows for panel, so in case they + get maximized, unmaxmized, minimized, unminimized or unmapped we need + to refresh the panel title. + +2014-03-04 Marco Trevisan (Treviño) + + PanelService: don't try to open an entry that is not in the currently opened panel + +2014-03-04 Marco Trevisan (Treviño) + + PanelService: don't emit warning in gtk_image_to_data on invalid image + +2014-03-04 Marco Trevisan (Treviño) + + UnityScreen: relayout the Scale screen if a window has been redecorated + +2014-03-04 Marco Trevisan (Treviño) + + UnityScreen: delay drawing of fake decorations to the cycle after the rendering + +2014-03-04 Marco Trevisan (Treviño) + + SwitcherController: return a const& in ExternalRenderTargets + +2014-03-03 Marco Trevisan (Treviño) + + SwitcherController: use ROProperty to enable and manage detail + +2014-03-03 Marco Trevisan (Treviño) + + PluginAdapter: use actual window border values when restoring instead of guessing + +2014-03-03 Marco Trevisan (Treviño) + + Merging with trunk + +2014-03-03 Marco Trevisan (Treviño) + + DecoratedWindow: update matrices and textures during Paint cycle + + It's better to do it at this level, to avoid artifacts. + Also, don't try to draw on empty textures and check for shadows + availability using a slighter codepath + +2014-03-03 Marco Trevisan (Treviño) + + DecorationsTitle: never try to render an empty text + +2014-03-03 Marco Trevisan (Treviño) + + CompizUtils: don't try to create a pixmap with invalid size + +2014-03-12 Marco Trevisan (Treviño) + + UnityScreen: use switcher's LayoutSystem to compute the scaled windows geometries + + Thanks to this, both the Alt+Tab and Spread will use the same codepath to define the positioning of the scaled windows. Fixes: 925454, 1286158 + +2014-03-12 Marco Trevisan (Treviño) + + Merging with lp:~3v1n0/unity/hints-on-first-run + +2014-03-10 Marco Trevisan (Treviño) + + UnityScreen: + +2014-03-10 Marco Trevisan (Treviño) + + LayoutWindow: include scale value + +2014-03-12 Marco Trevisan (Treviño) + + UnityScreen: show the shortcut hint on first run Fixes: 1283619 + +2014-03-12 Marco Trevisan (Treviño) + + Merge with trunk + +2014-03-11 Marco Trevisan (Treviño) + + TestShortcutController: verify first run + +2014-03-11 Marco Trevisan (Treviño) + + ShortcutController: make the view closable on first run + +2014-03-11 Marco Trevisan (Treviño) + + UnityScreen: show the shortcut hint on first run + +2014-03-11 Marco Trevisan (Treviño) + + PanelMenuView: show unity desktop name if the panel itself is focused + +2014-03-12 Brandon Schaefer + + Improves Dash HiDPI Support Fixes: 1290936 + +2014-03-11 Brandon Schaefer + + * Only touch the array*layout iff we are in show_filters_hint_ mode + +2014-03-11 Brandon Schaefer + + * Remove useless comment + +2014-03-10 Brandon Schaefer + + * Use a workaround to make sure the LayeredLayout sticks to the same min/max as + the PangoEntry + +2014-03-10 Brandon Schaefer + + * Merge trunk + +2014-03-10 Brandon Schaefer + + * Update the FilterBarLabel with Scale + * Update SearchBar to be dynamic (still a bug when you scale the search bar up then shrink it) + +2014-03-07 Brandon Schaefer + + * Reload the icons when the scale changes. + * Fixed bug in PlaceGroup where the space layout was + not scaling correctly. + +2014-03-03 Brandon Schaefer + + * Merge trunk + +2014-03-03 Brandon Schaefer + + * Get the icons working per monitor! + (need to get them working dynamically!) + +2014-03-01 Brandon Schaefer + + * Get PlacesGroup in a decent position. As well as ScopeView. + From here Ill have access to ResultView, which will hopefully be + easy to change the icon sizes in the dash! + +2014-03-01 Brandon Schaefer + + * Get the ScopeBar/ScopeBarIcon resizing correctly when changing the DPI + +2014-02-28 Brandon Schaefer + + * First batch dealing with the dash. + * All hardcoded values changed over to use RawPixel in: + DashView, SeachBar, ScopeBar ScopeBarIcon + +2014-03-12 Chris Townsend + + Fix the inconsistent z ordering of windows when using the mouse to scroll the Launcher icon of the active application. Fixes: 1286784 + +2014-03-12 Chris Townsend + + Fix the PerformScrollSwitchDirection test to account for the new scroll over Launcher icon window ordering. + +2014-03-12 Chris Townsend + + Merge trunk. + +2014-03-06 Chris Townsend + + Remove unneeded variable. + +2014-03-06 asmoore82 + + Fix the inconsistent z ordering of windows when using the mouse to scroll the Launcher icon of the active application. + +2014-03-12 Chris Townsend + + Add option to allow users to restore the scroll-over-inactive-Launcher-icon-to-focus-window behavior. + Fixes: 1288957 + +2014-03-12 Chris Townsend + + Fix where the new setting was not read and set upon Unity starting. + Fix a couple of unit tests based on the behavior. + +2014-03-12 Chris Townsend + + Merge trunk. + +2014-03-10 Chris Townsend + + Enable the scroll to focus window for inactive Launcher icon by default. + +2014-03-07 Chris Townsend + + Add option to allow users to restore the scroll over inactive Launcher icon to focus window behavior. + +2014-03-12 William Hua + + Unity shell plugin conflicts with gnomecompat. Fixes: 1284532 + +2014-03-10 William Hua + + Conflict with gnomecompat plugin. + +2014-03-12 Chris Townsend + + Remove the test_icon_shows_on_quick_application_reopen Autopilot test and make it into a unit test since Autopilot has difficult time dealing with this test as the test fails occasionally. Fixes: 1073990 + +2014-03-05 Chris Townsend + + Fix test to better exercise the code path we are truly testing. + +2014-03-05 Chris Townsend + + Remove the test_icon_shows_on_quick_application_reopen and make it into a unit test since Autopilot has difficult time dealing with this test as the test fails occasionally. + +2014-03-11 CI bot + + Releasing 7.1.2+14.04.20140311-0ubuntu1 + +2014-03-11 Stephen M. Webb + + Bump Nux build-dep to 4.0.6 for ABI change. + +2014-03-09 Stephen M. Webb + + dump Nux build-dep to 4.0.6 + +2014-03-11 Marco Trevisan (Treviño) + + LockScreenPanel: added a light version of PanelView for Lockscreen only, using PanelIndicatorsView + + - Indicators scrubbing using mouse works again + - Indicators key navigation is supported (Alt+F10 included) + - Indicators will be correctly visible in light themes as well + - Show hostname (optionally) on the top left side of the panel + - LockScreenSettings now bind settings from unity-greeter dconf path + +2014-03-11 Marco Trevisan (Treviño) + + PanelService: load indicators using the "desktop_lockscreen" profile + +2014-03-10 Marco Trevisan (Treviño) + + LockScreenController: use LockScreenUsingUnity properly + +2014-03-07 Marco Trevisan (Treviño) + + LockScreenShield: remove unneeded includes + +2014-03-07 Marco Trevisan (Treviño) + + UnityScreen: allow to paint a menu *only* if an indicator is currently opened + + This solves a possible secuity flaw that caused any pop-up menu to be drawn also + if not an indicator. + +2014-03-07 Marco Trevisan (Treviño) + + LockScreenController: add method to check if a menu is open + +2014-03-07 Marco Trevisan (Treviño) + + LockScreenPanel: change meaning of "active" property use InputSensitivity instead + + The active property now refers to the state of the menus + +2014-03-07 Marco Trevisan (Treviño) + + LockScreenController: only create one dbus indicators for all the shields + +2014-03-07 Marco Trevisan (Treviño) + + BackgroundSettings: never draw the grid under the panel + +2014-03-11 CI bot + + Lockscreen: Multimonitor support, use greeter settings and don't paint popup windows + + In detail: + - Use proper fonts for text input + - Make text cursor to blink as expected + (needs lp:~3v1n0/nux/textentry-toggle-cursor-visibility) + - Use bullet as password char + - Support multi-monitor correctly, switching view on mouse movement (as the greeter + does) + - Fixed lockscreen not showing on newly attached monitors + - Never paint windows that might popup under the lockscreen (such as tooltips or + notifications) + - Use unity greeter gsettings values for painting the Background (support color, or + disable user bg) + - Don't lock guest sessions + +2014-03-11 Andrea Azzarone + + Implement the lockscreen in Unity that looks like unity-greeter. Also allow to fallback to lightdm + greeter (tty switching) in case you need more pam power. Fixes: 878836, 1266464, 1282798 + +2014-03-10 Andrea Azzarone + + Disable LogindLock for the moment. + +2014-03-10 Andrea Azzarone + + Revert po/* changes. + +2014-03-07 Andrea Azzarone + + Merge. + +2014-03-07 Marco Trevisan (Treviño) + + UserAuthenticatorPam: use calloc as andyrock prefers ;) + +2014-03-07 Marco Trevisan (Treviño) + + SessionManager: add locked/unlocked signals + +2014-03-07 Marco Trevisan (Treviño) + + SessionDBusManager: make sure we cancel an action also UI side + +2014-03-07 Marco Trevisan (Treviño) + + UnityScreen: add session::DBusManager instance + +2014-03-07 Marco Trevisan (Treviño) + + SessionDBusManager: add Request actions (to prompt dialogs) + +2014-03-07 Marco Trevisan (Treviño) + + SessionDBusManager: add new dbus server to reply to session controlling requests + +2014-03-07 Marco Trevisan (Treviño) + + StandaloneSession: implement missing HostName + +2014-03-07 Marco Trevisan (Treviño) + + UnityWindow: add proper cross-fading when the lockscreen is about to show/hide + + Also, we override the paint priority making sure that no other plugin might cause a window + not to be painted with the opacity we desire + +2014-03-06 Marco Trevisan (Treviño) + + LockScreen: use settings parameters LockScreenSettings + +2014-03-06 Marco Trevisan (Treviño) + + LockScreenSettings: bind unity greeter options with LockScreenSettings + +2014-03-06 Marco Trevisan (Treviño) + + LockScreenShield: activate the first valid indicator on relative keybinding + +2014-03-06 Marco Trevisan (Treviño) + + WindowManager: add activate_indicators_key property that matches compiz setting + +2014-03-06 Marco Trevisan (Treviño) + + MockSessionManager: add missing virtual method + +2014-03-06 Marco Trevisan (Treviño) + + Lockscreen: re-add panel to the built list + +2014-03-06 Marco Trevisan (Treviño) + + Merging with latest lockscreen-review + +2014-03-06 Marco Trevisan (Treviño) + + Merging with lp:~andyrock/unity/lockscreen + +2014-03-06 Marco Trevisan (Treviño) + + LockScreenPanel: fix typo + +2014-03-06 Marco Trevisan (Treviño) + + PanelIndicatorEntryView: don't draw the text in overlay mode if the entry is active + +2014-03-06 Marco Trevisan (Treviño) + + PanelView: remove the custom lockscreen mode + +2014-03-06 Marco Trevisan (Treviño) + + LockScreenPanel: added a light version of PanelView for Lockscreen only + + This saves us a lot headaches, fixing many issues and allowing us to only + care about the things we need for the lockscreen. + +2014-03-06 Marco Trevisan (Treviño) + + PanelIndicatorsView: if an entry is added while an overlay is open, it should be in overlay mode + + This doesn't apply to PanelMenuView's added menus, though. + +2014-03-06 Marco Trevisan (Treviño) + + SessionManager: add HostName getter (and implement in GnomeSessionManager) + +2014-03-06 Marco Trevisan (Treviño) + + LockScreenShield: make sure we always keep the internal monitor value updated + +2014-03-06 Marco Trevisan (Treviño) + + UnityWindow: make all windows but menus transparent when in lockscreen mode + + We need to draw menus or indicator won't show anything, but it seems that we can't + just set the mask to PAINT_WINDOW_NO_CORE_INSTANCE_MASK in non-menu windows + or the menus won't show anyway... + +2014-03-06 Marco Trevisan (Treviño) + + Merging with latest lp:~andyrock/unity/lockscreen + +2014-03-06 Marco Trevisan (Treviño) + + debian/control: remove unneeded build dependencies, depend on unity-greeter + +2014-03-06 Marco Trevisan (Treviño) + + GnomeSessionManager: never try to lock a guest session + +2014-03-06 Marco Trevisan (Treviño) + + UserPromptView: make the prompt hints to be correctly translatable + +2014-03-06 Marco Trevisan (Treviño) + + BackgroundSettings: follow the unity-greeter gsettings options + +2014-03-06 Marco Trevisan (Treviño) + + BackgroundSettings: don't depend on panel height in offset, or it will cause wrong results + +2014-03-06 Marco Trevisan (Treviño) + + BackgroundSettings: use more forward declaration and a constexpr + +2014-03-06 Marco Trevisan (Treviño) + + BackgroundSettings: read logo from greeter gsettings + +2014-03-06 Marco Trevisan (Treviño) + + BackgroundSettings: don't use hardcoded numbers for logo image + +2014-03-06 Marco Trevisan (Treviño) + + LockScreenController: emit upstart signals only if we are in unity mode + + And close the service after that the locker has been hidden. + +2014-03-06 Marco Trevisan (Treviño) + + UnityShell Settings: use "Unity" name instead of "custom lockscreen" + +2014-03-06 Marco Trevisan (Treviño) + + UScreen: use LOG_WARN instead of LOG_ERROR not to make our tests unreadable + +2014-03-06 Marco Trevisan (Treviño) + + TestTextInput: fix compilation + +2014-03-06 Marco Trevisan (Treviño) + + LockScreenController: make sure we show the newly added views if we're visible + +2014-03-06 Marco Trevisan (Treviño) + + LockScreenAbstractShield: add AbstractShield and use it in factory + + In this way we can properly test also Shield related features + +2014-03-06 Marco Trevisan (Treviño) + + UnityShell: never paint windows when the lockscreen is active + + In this way also popup windows or tooltips won't be shown on top of the locker + +2014-03-05 Marco Trevisan (Treviño) + + LockScreenController: update the primary state of a shield when mouse position changes + + We always have just one primary shield (in case we use unity type locker), in this case we need + to monitor the mouse events on it, and when they're outside its area we need to change the + primary shield to the current one. + + Added various cleanups as well + +2014-03-05 Marco Trevisan (Treviño) + + Lockscreen PCH: add more headers + +2014-03-05 Marco Trevisan (Treviño) + + SessionManager: various cleanup + +2014-03-05 Marco Trevisan (Treviño) + + PanelService: use nicer dbus name + +2014-03-05 Marco Trevisan (Treviño) + + LockScreenShield: emit a signal with proper coordinates on grab motion + +2014-03-05 Marco Trevisan (Treviño) + + LockScreenShield: cache the shield layouts otherwise after some quick primary switch they get messed up + + Blame nux for this! :/ + +2014-03-05 Marco Trevisan (Treviño) + + LockScreenShield: change kind of view on primary changed + +2014-03-05 Marco Trevisan (Treviño) + + LockScreenShield: always return the primary shield as the area of any mouse event + + In this way we can control also mouse movement outside the grabbed shield area. + +2014-03-05 Marco Trevisan (Treviño) + + BackgroundSettings: just use nux::CairoGraphics to generate the texture + + No need to generate a new pixbuf, and copy it twice... + +2014-03-05 Marco Trevisan (Treviño) + + UserAuthenticator: use nicer name for pointer of promise string + +2014-03-05 Marco Trevisan (Treviño) + + UserPromptView: Get correct input field, fix cursor visibility, use bullet as password char + + Plus some misc cleanup, fix "Password: " like text, and use RawPixels for size elements. + +2014-03-05 Marco Trevisan (Treviño) + + TextInput: add some padding on hint text + +2014-03-05 Marco Trevisan (Treviño) + + UserAuthenticatorPam: some code clanup + +2014-03-05 Marco Trevisan (Treviño) + + IMTextEntry: remove workaround to control cursor visibility + +2014-03-05 Marco Trevisan (Treviño) + + IMTextEntry: add property to control the visibility of the cursor + +2014-03-05 Marco Trevisan (Treviño) + + TextInput: make hint text font and size configurable + +2014-03-05 Marco Trevisan (Treviño) + + Merging with lockscreen branch + +2014-03-06 Andrea Azzarone + + Merge trunk. + +2014-03-05 Stephen M. Webb + + Releasing 7.1.2+14.04.20140305-0ubuntu1 + +2014-03-06 CI bot + + Resync trunk + +2014-03-05 Brandon Schaefer + + * False not None + +2014-03-04 Brandon Schaefer + + * Fix AP tests dealing with QL/Tooltips as they are now destoryed when hidden + +2014-03-05 Andrea Azzarone + + Minor change. + +2014-03-04 Andrea Azzarone + + Fix the lockscreen::Controller tests too. + +2014-03-04 Andrea Azzarone + + Fix failing tests in upstart wrapper. + +2014-03-04 Andrea Azzarone + + Merge trunk. + +2014-03-04 Andrea Azzarone + + Fix the failing tests in test_gnome_session_manager.cpp + +2014-02-25 Andrea Azzarone + + Add libpam. + +2014-02-25 Andrea Azzarone + + Fix Build-Depends. + +2014-02-25 Andrea Azzarone + + Add libgnome-desktop-dev. + +2014-02-22 Andrea Azzarone + + Share the logo with unity-greeter. + +2014-02-22 Andrea Azzarone + + Correct handle the grab when using the keyboard shortcut to lock the screen. + +2014-02-22 Andrea Azzarone + + Remove panel tray in the lockscreen. + +2014-02-22 Andrea Azzarone + + Add missing files. + +2014-02-22 Andrea Azzarone + + Improve screen reader in the lockscreen. + +2014-02-21 Andrea Azzarone + + Merge trunk. + +2014-02-20 Andrea Azzarone + + Revert po changes. + +2014-02-20 Andrea Azzarone + + Merge trunk. + +2014-02-20 Andrea Azzarone + + Improve pam code. + +2014-02-14 Andrea Azzarone + + Fix includes. + +2014-02-14 Andrea Azzarone + + Deactivate the prompt view when checking the password. + +2014-02-14 Andrea Azzarone + + Follow robert's tips. + +2014-02-14 Andrea Azzarone + + Use 0.5 opacity for the panel in the lockscreen. + +2014-02-13 Andrea Azzarone + + Revert po/ changes and other minor changes. + +2014-02-13 Andrea Azzarone + + Minor changes in UserPromptView + +2014-02-13 Andrea Azzarone + + Merge trunk. + +2014-02-13 Andrea Azzarone + + Refactor LockScreenShield + +2014-02-13 Andrea Azzarone + + Minor changes. + +2014-02-13 Andrea Azzarone + + Full opacity for the panel in the lockscreen mode. + +2014-02-13 Andrea Azzarone + + Move DbusIndicators(/*lockscree_mode*/ true) in a separate struct. + +2014-02-13 Andrea Azzarone + + Make UserAuthenticatorPam safer using glib::Cancellable. + +2014-02-13 Andrea Azzarone + + Minor changes in BackgroundSettings + +2014-02-12 Andrea Azzarone + + Add and edit tests for GnomeSessionManager.cpp + +2014-02-12 Andrea Azzarone + + Fix tests. + +2014-02-12 Andrea Azzarone + + Merge trunk. + +2014-02-11 Andrea Azzarone + + Use dbus upstart and add tests for it. + +2014-02-11 Andrea Azzarone + + Add a spinner. + +2014-02-11 Andrea Azzarone + + Show an error message when the password is wrong. + +2014-02-10 Andrea Azzarone + + Remove standalone lockscreen for the moment. + +2014-02-10 Andrea Azzarone + + Remove standalone for the moment. + +2014-02-10 Andrea Azzarone + + Fix the destruction of dbus indicators in panel view. + +2014-02-10 Andrea Azzarone + + Improve the aspect of the UserPromptView. + +2014-02-10 Andrea Azzarone + + Add services/unity-panel-service-lockscreen.conf.in + +2014-02-10 Andrea Azzarone + + Hide text hint when not needed. + +2014-02-10 Andrea Azzarone + + Start to improve the look of the prompt view. + +2014-02-10 Andrea Azzarone + + Fix a crash. + +2014-02-07 Andrea Azzarone + + And again. + +2014-02-07 Andrea Azzarone + + Revert unwanted changes. + +2014-02-07 Andrea Azzarone + + Merge trunk. + +2014-02-07 Andrea Azzarone + + Add UpstartWrapper and proper start/stop unity-panel-service in lockscreen mode. + +2014-02-07 Andrea Azzarone + + Deactivate some panel functionalities during lockscreen. + +2014-02-06 Andrea Azzarone + + Merge trunk. + +2014-02-05 Andrea Azzarone + + Disable hud,dash and the shourtcut overlay during lockscreen + +2014-02-05 Andrea Azzarone + + Disable blur during lockscreen. Now session dialog looks just good. + +2014-02-05 Andrea Azzarone + + Improve code. + +2014-01-30 Andrea Azzarone + + Allow to disable lockscreen or fallback to lightdm. Add tests. + +2014-01-30 Andrea Azzarone + + Merge trunk. Add and use unity::lockscreen::Settings. + +2014-01-29 Andrea Azzarone + + Rename BackgroundSettingsGnome.* and starts to cleanup it. + +2014-01-29 Andrea Azzarone + + Minor changes in LockScreenController.*. + +2014-01-29 Andrea Azzarone + + Add tests for unity::lockscreen::Controller + +2014-01-27 Andrea Azzarone + + Listen to logind signals ("lock" and "unlock"). Make fade animation smoother. + +2014-01-26 Andrea Azzarone + + FadeIn/Out the lockscreen. This sould also fix a crash on unlock. + +2014-01-23 Andrea Azzarone + + Unlock screen if the password is correct. Still buggy btw. + +2014-01-22 Andrea Azzarone + + Merge trunk. + +2014-01-22 Andrea Azzarone + + Add an ugly prompt view. + +2014-01-12 Andrea Azzarone + + Remove useless #include in PanelView.cpp + +2014-01-11 Andrea Azzarone + + Merge with trunk. + +2014-01-11 Andrea Azzarone + + Grab the mouse and the keyboard. + +2014-01-08 Andrea Azzarone + + Draw the version logo. + +2014-01-08 Andrea Azzarone + + Integrate the panel view in the lockscreen. + +2014-01-07 Andrea Azzarone + + Merge trunk. + +2014-01-07 Andrea Azzarone + + Draw background grid. + +2014-01-07 Andrea Azzarone + + Add a circle of friend in the unactive monitors. + +2014-01-03 Andrea Azzarone + + Fix leak in unity::lockscreen::Shield::UpdateBackgroundTexture + +2014-01-02 Andrea Azzarone + + Draw the current background in the shield window. + +2013-12-28 Andrea Azzarone + + Initial commit for the unity lockscreen. UserAuthenticator added with tests too. + +2014-03-05 CI bot + + Releasing 7.1.2+14.04.20140305-0ubuntu1 + +2014-03-05 Brandon Schaefer + + When we update the OverlayWindowButtons geometry, make sure we ask the WindowButtons to update their geo as well. (This means poking it as if the DPI has changed). This way the overlay window buttons will be the correct sides per monitor. Fixes: 1285366 + +2014-03-03 Brandon Schaefer + + * Parent + +2014-02-28 Brandon Schaefer + + * Merge trunk + +2014-02-28 Brandon Schaefer + + * Parent + +2014-02-26 Brandon Schaefer + + * Merge with parent + +2014-02-26 Brandon Schaefer + + * Each time we ask to update the Geo, be sure to poke the window buttons + to update their size as if the DPI has changed. As we could be on a different + monitor each time we open the Dash/Hud. + +2014-03-05 Brandon Schaefer + + Allow the launcher_width to be stored per monitor and retrieved per monitor. Allowing for correct Dash/Hud offsets. Fixes: 1284879 + +2014-03-03 Brandon Schaefer + + * Parent + +2014-02-28 Brandon Schaefer + + * Cast area to launcher, vs getting the monitor by geos positon. + +2014-02-28 Brandon Schaefer + + * Parent + +2014-02-26 Brandon Schaefer + + * Rebase from parent + +2014-02-25 Brandon Schaefer + + * Remove comments + +2014-02-25 Brandon Schaefer + + * Move to storing up to monitors::MAX launchers. This way we can tell what + width each launcher is when doing positions on dash/hud/panel + +2014-03-05 Marco Trevisan (Treviño) + + CompizShortcutModeller: use proper keys for Spread and be dependent on workspace setting Fixes: 1287825 + +2014-03-04 Marco Trevisan (Treviño) + + CompizShortcutModeller: better wording for Switcher workspace + +2014-03-04 Marco Trevisan (Treviño) + + CompizShortcutModeller: show workspace sensitive options for switcher as well + +2014-03-04 Marco Trevisan (Treviño) + + CompizShortcutModeller: use proper keys for Spread windows options + +2014-03-05 Chris Townsend + + Fix more Panel Autopilot test failures. Fixes: 1287745 + +2014-03-04 Chris Townsend + + Fix more Panel Autopilot tests. + +2014-03-05 William Hua + + Improve debug logging for gnome key grabber. + +2014-03-04 William Hua + + Use unity.menu.manager as name for logger. + +2014-02-28 William Hua + + Small refactor. + +2014-02-28 William Hua + + Log menu mnemonic activations. + +2014-02-28 William Hua + + Debug output in unity-shared/GnomeKeyGrabber.cpp. + +2014-03-05 Luke Yelavich + + Implement accessibility for the optino buttons in the shutdown dialog. + + Also improve the parent-child relationship between objects such that the shutdown message can be read with Orca flat review. Fixes: 1272168 + +2014-02-25 Luke Yelavich + + No need for a dedicated signal, the changed signal of the highlighted property is sufficient. + + As a result, the GObject private member code is not needed. + +2014-02-24 Luke Yelavich + + Merge with trunk.: + +2014-02-19 Luke Yelavich + + Implement accessibility for the optino buttons in the shutdown dialog. + +2014-03-03 CI bot + + Releasing 7.1.2+14.04.20140303-0ubuntu1 + +2014-03-03 Marco Trevisan (Treviño) + + Panel, Decorations, Launcher, Quicklist, Tooltip: correctly scale items based on the monitor settings + + Adapt elements to match their monitor DPI scale settings. + We mostly use cairo_surface_set_device_scale to easily scale cairo-generated textures. Fixes: 1283171, 1283406, 1283410, 1283453, 1284367, 1284780, 1285989 + +2014-03-03 Marco Trevisan (Treviño) + + PanelService: try to get the actual file name also from Pixbuf GtkImage's + +2014-02-28 Matthieu James + + Resources: replace default dash window buttons with SVGs + +2014-02-28 Marco Trevisan (Treviño) + + WindowButtons: use style's GetDashWindowButton to get dash themed buttons + +2014-02-28 Marco Trevisan (Treviño) + + DecorationStyle: don't include unity subpath on extra folders + +2014-02-28 Marco Trevisan (Treviño) + + PanelStyle: add GetDashWindowButton, hide some internal methods + +2014-02-28 Marco Trevisan (Treviño) + + DecorationStyle: add ThemedFilePath method, that abstracts WindowButtonFile + +2014-02-28 Marco Trevisan (Treviño) + + PanelIndicatorEntryView: only care about icon heights to determine if they're scalable + +2014-02-28 Marco Trevisan (Treviño) + + PanelIndicatorEntryView: fix typo that caused compilation issues + +2014-02-28 Marco Trevisan (Treviño) + + PanelIndicatorEntryView: always try to load an icon from its name if all the checks fail + +2014-02-28 Marco Trevisan (Treviño) + + Tests: fix compilation issues + +2014-02-28 Marco Trevisan (Treviño) + + MenuManager: when the indicators icon paths have changed, let's update the Gtk icon theme accordingly + + This allows us to load indicators only by their GIcon also if they are available in custom theme paths + that have been added by an indicator. + +2014-02-28 Marco Trevisan (Treviño) + + DBusIndicators: add a method to get the indicator icon paths and a signal to notify changes + + Basically we now connect to panel service, that will notify us when an indicator modified the + theme, so we need to sync with it in order to load the proper icons + +2014-02-28 Marco Trevisan (Treviño) + + PanelService: add a method/signal to allow the panel to syncronize the icon paths with parents + +2014-02-28 Marco Trevisan (Treviño) + + PanelIndicatorEntryView: apply the same codepath to all the themed icons + +2014-02-28 Marco Trevisan (Treviño) + + PanelIndicatorEntryView: only care about icon heights, monitor for theme changes and reload icons + +2014-02-28 Marco Trevisan (Treviño) + + PanelIndicatorEntryView: Use 22px icons, and correctly move the scalable icons in the y axis + +2014-02-28 Marco Trevisan (Treviño) + + PanelStyle: use forward declaration + +2014-02-28 Marco Trevisan (Treviño) + + PanelService: use switch for getting the proper image type + +2014-02-28 Marco Trevisan (Treviño) + + Tests: fix compilation Issues + +2014-02-27 Marco Trevisan (Treviño) + + UnityWindow: fix text indentation on fake decorations now that we've scaled buttons + +2014-02-27 Marco Trevisan (Treviño) + + WindowButtons: load scaled textures for dash as well + +2014-02-27 Marco Trevisan (Treviño) + + WindowButtons: use scalable window buttons, don't scale them up roughly + +2014-02-27 Marco Trevisan (Treviño) + + PanelStyle: add support to scalable window buttons (per monitor) + +2014-02-27 Marco Trevisan (Treviño) + + DecorationsWindowButton: use scaled Window Button textures, enjoy the visual quality! + + Well, better with SVGs ;) + +2014-02-27 Marco Trevisan (Treviño) + + DecorationsWidgets, TexturedItem: removing the auto-scaling support + + We don't need it anymore... In case we might extend this class in future. + +2014-02-27 Marco Trevisan (Treviño) + + DecorationStyle: Support loading SVG files as well as window buttons + +2014-02-27 Marco Trevisan (Treviño) + + DecorationsDataPool: use gdk pixbuf + cairo to load the window buttons, and scale them up to match monitor settings + + This allows to have button textures scaled to match current monitor DPI scale settings. + In case we don't have scalable (SVG) file available, we scale up the normal version; if none is + found we fallback to scaled pure-cairo buttons. + +2014-02-27 Marco Trevisan (Treviño) + + PanelMenuView: fix a regression that caused the panel title not to redraw on style changes + +2014-02-27 Marco Trevisan (Treviño) + + UScreen: use better API, const methods and remove useless includes + +2014-02-27 Marco Trevisan (Treviño) + + PanelController: use proper Impl, remove unneeded non-private methods + +2014-02-27 Marco Trevisan (Treviño) + + EMConverter: add return value on Set{FontSize, SetDPI} calls + +2014-02-27 Marco Trevisan (Treviño) + + DecorationsWidgets: use double for scale property + +2014-02-27 Marco Trevisan (Treviño) + + TextureCache: use proper hash function, and use numeric ID in our map + +2014-02-27 Marco Trevisan (Treviño) + + IconRenderer: add support for local textures, depending on Icon size + + Now the progress bar is loaded from a SVG and draws nicely ;) + +2014-02-27 Marco Trevisan (Treviño) + + TextureCache: use size values in default textures loader + +2014-02-27 Marco Trevisan (Treviño) + + IconRenderer: correctly scale up the Icon progress bar + + Added SVGs files for future usage + +2014-02-27 Marco Trevisan (Treviño) + + AbstractIconRenderer: add scale value to IconRenderer + +2014-02-27 Marco Trevisan (Treviño) + + PanelIndicatorEntryView: handle scalable icons differently to get the best quality + + If an icon is scalable, then we paint it ignoring the current dpi_scaling, this way + we can paint it at the best quality. + +2014-02-27 Marco Trevisan (Treviño) + + UnityScreen: cache some functions results + +2014-02-27 Marco Trevisan (Treviño) + + GTKWrapper: use typedef instead of inheritage for new Gtk versions + +2014-02-26 Marco Trevisan (Treviño) + + QuicklistMenuItem: make sure we initialze the text when chaning the scale + +2014-02-26 Marco Trevisan (Treviño) + + Tooltip: use the decoration::Style shadow color + +2014-02-26 Marco Trevisan (Treviño) + + Tooltip: use nux::Color for drawing the texture + +2014-02-26 Marco Trevisan (Treviño) + + Tooltip: correctly scale the cairo texture, instead of just making things bigger + +2014-02-26 Marco Trevisan (Treviño) + + QuicklistView: some cleanup + +2014-02-26 Marco Trevisan (Treviño) + + QuicklistView: use decoration::Style for getting themed shadow color and radius + + Yeah, QL now match theme! ;) + +2014-02-26 Marco Trevisan (Treviño) + + QuicklistView: use nux::Color to draw the texture + +2014-02-26 Marco Trevisan (Treviño) + + QuicklistView: use proper cairo scaling to draw the QL texture + +2014-02-26 Marco Trevisan (Treviño) + + QuicklistMenuItem: initialze scale value to 1.0f + +2014-02-26 Marco Trevisan (Treviño) + + TestDecorationLayout: fix compilation issue due to RawPixel + +2014-02-26 Marco Trevisan (Treviño) + + TestLauncher: initialize UnitySettings before other stuff + +2014-02-26 Marco Trevisan (Treviño) + + UnitySettings: avoid unneeded gvariant calls when updating DPI + + Plus some code cleanup + +2014-02-26 Marco Trevisan (Treviño) + + UnitySettings: don't leak memory when getting the scale factor + +2014-02-26 Marco Trevisan (Treviño) + + DecorationsWidgets: use RawPixel for padding + +2014-02-26 Marco Trevisan (Treviño) + + RawPixel: always return rounded integers when converting + +2014-02-26 Marco Trevisan (Treviño) + + QuicklistMenuItemSeparator: use RawPixel + +2014-02-26 Marco Trevisan (Treviño) + + RawPixel: use double's and add CP for converting based on a scale value + +2014-02-26 Marco Trevisan (Treviño) + + Launcher: AbstractLauncherIcon::icon_size should not be scaled, as it wil be for all monitors + +2014-02-25 Marco Trevisan (Treviño) + + DashView: correctly set the the proper monitor offsets to match monitor DPI + +2014-02-25 Marco Trevisan (Treviño) + + UnityWindow: scale the glow size as well to match DPI + +2014-02-25 Marco Trevisan (Treviño) + + Launcher: update icon size on DPI or monitor changes (as they might have different DPIs) + +2014-02-25 Marco Trevisan (Treviño) + + LauncherController: don't care about launcher DPI settings + +2014-02-25 Marco Trevisan (Treviño) + + DecorationsWidgets: use proper rounding when scaling paddings + +2014-02-25 Marco Trevisan (Treviño) + + LauncherIcon: delete quicklist and tooltip once they're not visible anymore + + We really don't need to keep them around. + +2014-02-25 Marco Trevisan (Treviño) + + LauncherIcon: load a new quicklist everytime... There's no need to reuse previous one + + And also it might break scaling on different monitors + +2014-02-25 Marco Trevisan (Treviño) + + QuicklistMenuItem: make sure we set the text extents that matches the current scaling + +2014-02-25 Marco Trevisan (Treviño) + + QuicklistView: set scale factor when adding a new menu item + + Also use Smart pointers to hold items + +2014-02-25 Marco Trevisan (Treviño) + + QuicklistMenuItem: add support to scale factor when generating items textures + +2014-02-25 Marco Trevisan (Treviño) + + Tooltip: set text scale to match monitor + +2014-02-25 Marco Trevisan (Treviño) + + StaticCairoText: add scale parameter, if set we draw using appropriate cairo device scale + +2014-02-25 Marco Trevisan (Treviño) + + Unity: use cairo InternalContext when possible + +2014-02-25 Marco Trevisan (Treviño) + + PanelMenuView: use cairo surface scale when painting the Panel Title + +2014-02-25 Marco Trevisan (Treviño) + + PanelView: don't use fixed refine_texture height, we can safely resize it to match panel geo + +2014-02-25 Marco Trevisan (Treviño) + + PanelMenuView: correctly resize window buttons on DPI changes + +2014-02-25 Marco Trevisan (Treviño) + + PanelController: correctly resize children on dpi changes + +2014-02-25 Marco Trevisan (Treviño) + + PanelIndicatorsView: apply monitor to all the children + +2014-02-25 Marco Trevisan (Treviño) + + PanelStyle: remove unneeded GetTextDPI call + +2014-02-25 Marco Trevisan (Treviño) + + PanelIndicatorEntryView: use cairo_device_scale to paint indicators + +2014-02-25 Marco Trevisan (Treviño) + + PanelIndicatorEntryDropdownView: simplify the pango layout drawing + +2014-02-25 Marco Trevisan (Treviño) + + DecorationsMenuDropdown: use theme-scaled icon (better results if we've SVG) + +2014-02-25 Marco Trevisan (Treviño) + + DecoratedWindow: no need to use RawPixel here + +2014-02-25 Marco Trevisan (Treviño) + + DecorationsWidgets, Layout: scale the paddings + +2014-02-25 Marco Trevisan (Treviño) + + LauncherIcon: convert icon size value when computing Tip position + +2014-02-25 Marco Trevisan (Treviño) + + UnityScreen: draw panel under dash using the proper panel size + +2014-02-25 Marco Trevisan (Treviño) + + PanelStyle: correctly support different Background textures, and cache panel size + +2014-02-24 Marco Trevisan (Treviño) + + PluginAdapter: a window is on a given monitor, when it's center is on that + +2014-02-24 Marco Trevisan (Treviño) + + UnityWindow: take care of window dpi scale when drawing fake decorations + +2014-02-24 Marco Trevisan (Treviño) + + DecoratedWindow: add dpi_scale ROProperty + +2014-02-24 Marco Trevisan (Treviño) + + CairoContext: add scale parameter + + so we can set the surface device scaling on startup + +2014-02-24 Marco Trevisan (Treviño) + + DecoratedWindow: draw decorations background using proper texture scaling + +2014-02-24 Marco Trevisan (Treviño) + + DecorationsMenuDropdown: correctly scale using cairo_surface_set_device_scale + +2014-02-24 Marco Trevisan (Treviño) + + DecorationsSlidingLayout: set scale also on input item + +2014-02-24 Marco Trevisan (Treviño) + + DecorationsMenuEntry: correctly scale to match DPI + +2014-02-24 Marco Trevisan (Treviño) + + DecorationStyle: use double also for fading title + +2014-02-24 Marco Trevisan (Treviño) + + DecorationStyle: use double for size values when drawing elements + + This allows cairo to properly draw elements when the scale is not 1.0 + +2014-02-24 Marco Trevisan (Treviño) + + UScreen: fix memory leak, use glib::String + +2014-02-24 Marco Trevisan (Treviño) + + DecorationsTitle: use ceil to get scaled title size + +2014-02-23 Marco Trevisan (Treviño) + + PanelService: take in account monitor scale when setting the menu position + +2014-02-23 Marco Trevisan (Treviño) + + UnitySettings: includes cleanup + +2014-02-23 Marco Trevisan (Treviño) + + DecoratedWindow: connect to dpi_changed signal to update extents and scale + + Now windows will update as soon as we change the setting. + +2014-02-23 Marco Trevisan (Treviño) + + DecorationsTitle: scale the cairo surface using cairo_surface_set_device_scale + + Also the Title should not be scalable, or we'll apply also a compiz texture scaling + +2014-02-23 Marco Trevisan (Treviño) + + DecorationsWidgets, TexturedItem: add IsScalable virtual method + + So, set the texture scale only if a TexturedItem is scalable + +2014-02-28 CI bot + + Releasing 7.1.2+14.04.20140228-0ubuntu1 + +2014-02-28 Stephen M. Webb + + remove -O3 and replace with -O3 for C++ compiles to prevent template-related FTBFS Fixes: 1286284 + +2014-02-28 Stephen M. Webb + + Strip -O3 and force -O2 to avoid template instances being removed + +2014-02-28 Stephen M. Webb + + Strip -O3 and force -O2 to avoid template instances from getting elided (lp: #1286284). + +2014-02-28 Chris Townsend + + Fix corner case depending on where a test window opens, a Dash and Hud Autopilot test failure can occur. Fixes: 1286143 + +2014-02-28 Chris Townsend + + Fix corner case where depending on where a test window opens, an Autopilot test failure can occur. + +2014-02-28 Chris Townsend + + Fix a few randomly failing Spread Autopilot tests. Fixes: 1285758 + +2014-02-27 Chris Townsend + + Fix a few randomly failing Spread Autopilot tests. + +2014-02-28 Chris Townsend + + Fix a couple of Panel Autopilot test failures. Fixes: 1285737 + +2014-02-27 Chris Townsend + + Fix a couple of Panel Autopilot test failures. + +2014-02-28 Chris Townsend + + Fix Dash/Hud fullscreen Autopilot window test on multi-monitor where the tests would fail depending on which monitor has the fullscreen window. Fixes: 1285367 + +2014-02-26 Chris Townsend + + Fix Dash/Hud fullscreen window test on multi-monitor where the tests would fail depending on which monitor has the fullscreen window. + +2014-02-28 Chris Townsend + + Use the current Launcher instead of the first launcher when determing when to highlight the Launcher tile during keynav. Fixes: 1285361 + +2014-02-26 Chris Townsend + + Use the current Launcher instead of the first launcher when determing when to highlight the Launcher tile during keynav. + +2014-02-25 CI bot + + Releasing 7.1.2+14.04.20140225-0ubuntu1 + +2014-02-25 Marco Trevisan (Treviño) + + PluginAdapter: take in account the window border size when restoring it from maximization state + + Also don't forget about monitor scaling when getting data from the decoration Style. Fixes: 1276352 + +2014-02-20 Marco Trevisan (Treviño) + + PluginAdapter: don't try to resize undecorated-windows + +2014-02-20 Marco Trevisan (Treviño) + + PluginAdapter: take in account the window border size when restoring it from maximization state + +2014-02-20 Marco Trevisan (Treviño) + + PluginAdapter: take care of monitor DPI scale when computing the decoration size from style + + We use the style data only if a window is Maximized, otherwise we can safely use the actual + window border. + +2014-02-25 Chris Townsend + + Fix some Autopilot test failure regressions due to changes in rev. 3668. Fixes: 1283159 + +2014-02-20 Chris Townsend + + Fix some Autopilot test failure regressions due to changes in rev. 3668. + +2014-02-25 Dimitri John Ledkov + + Fix common buildflags missing. (LP: #1284047) Fixes: 1284047 + +2014-02-25 Dimitri John Ledkov + + Fix common buildflags missing. (LP: #1284047) + +2014-02-25 Eleni Maria Stea + + removed fonts-scale-factor gsetting from unityshell schema, since we now use the ubuntu ui-scale factor to scale the desktop Fixes: 1282804 + +2014-02-25 Eleni Maria Stea + + remove fonts-scale-factor from unityshell schema + +2014-02-25 Eleni Maria Stea + + scaling desktop according to a scale factor Fixes: 1282804 + +2014-02-21 Eleni Maria Stea + + avoid to unreference gobjects twice + +2014-02-21 Eleni Maria Stea + + reversed po/* + desktop works with scale-factor setting + +2014-02-21 Eleni Maria Stea + + unreference gsettings + +2014-02-20 Eleni Maria Stea + + desktop works with scale-factor + +2014-02-20 Eleni Maria Stea + + merged to lim + +2014-02-20 Eleni Maria Stea + + quick backup + +2014-02-20 Eleni Maria Stea + + quick backup + +2014-02-20 Eleni Maria Stea + + quick backup + +2014-02-20 Eleni Maria Stea + + quick backup - testing GetDPI(int monitor) + +2014-02-19 Eleni Maria Stea + + quick backup - added function that gets the ui-scale from gsettings + todo: add dependencies etc + +2014-02-18 Eleni Maria Stea + + removed ConfigParser.h/.cpp: + requirements changed, the gsetting for the scale factor will be a GVariant, + therefore the string parser is not needed anymore + +2014-02-20 CI bot + + Releasing 7.1.2+14.04.20140220-0ubuntu1 + +2014-02-20 Sebastien Bacher + + Drop g-s-d override, unity-settings-daemon landed + +2014-02-20 Sebastien Bacher + + Drop g-s-d override, unity-settings-daemon landed + +2014-02-20 Steve Langasek + + Sync the branch with upload to the archive + +2014-02-19 Steve Langasek + + releasing package unity version 7.1.2+14.04.20140218.1-0ubuntu2 + +2014-02-19 Steve Langasek + + Add Conflicts: libunity-core-6.0-8 to facilitate smooth upgrades. + +2014-02-20 Marco Trevisan (Treviño) + + DecoratedWindow: make sure that the top_layout exist when setting up the decorations + + If there's no layout, then we don't need any texture. Also this might cause a crash if + a window is about to be mapped but not yet fully framed. Fixes: 1281610 + +2014-02-18 Marco Trevisan (Treviño) + + DecoratedWindow: make sure that the top_layout exist when setting up the decorations + + If there's no, then we don't need no decoration textures at all + +2014-02-20 Marco Trevisan (Treviño) + + DecoratedWindow: add menu + +2014-02-19 Marco Trevisan (Treviño) + + Merging against lp:~3v1n0/unity/hdpi-gnome-scaling-factor + +2014-02-19 Marco Trevisan (Treviño) + + CairoBaseWindow: add EMConverter in the base class + + Instead of adding this to tooltip or Quicklist + +2014-02-19 Marco Trevisan (Treviño) + + Merging with Brandon's HiDPI chain, again + +2014-02-19 Marco Trevisan (Treviño) + + PanelIndicatorsView: never try to add to dropdown an already known entry + + As it might have been just popped out from the dropdown, and we might have + an infinite loop of push/pop's. + +2014-02-19 Marco Trevisan (Treviño) + + PanelMenuView: put back virtual methods, to make tests happier + +2014-02-19 Marco Trevisan (Treviño) + + DecoratedWindow: add some more introspection data + +2014-02-19 Marco Trevisan (Treviño) + + DecoratedWindow: set the top layout scale to the value we use for this monitor + +2014-02-19 Marco Trevisan (Treviño) + + DecorationsWindowButton: remove the custom code for scaling them up + +2014-02-19 Marco Trevisan (Treviño) + + TestDecorationLayout: verify scale property + +2014-02-19 Marco Trevisan (Treviño) + + DecorationsWidgets: add Scale property, use on TexturedItem to update geometry + +2014-02-19 Marco Trevisan (Treviño) + + CompizUtils: update the geometry size when setting the scale + +2014-02-19 Marco Trevisan (Treviño) + + DecorationsEdgeBorders: don't depend on theme, but rather on actual window extents + +2014-02-18 Marco Trevisan (Treviño) + + Merging with lp:~3v1n0/unity/spread-filter + +2014-02-18 Marco Trevisan (Treviño) + + Merging with HiDPI stuff, so with spread improvements + +2014-02-18 Marco Trevisan (Treviño) + + Merging with Brandon's quicklist branch + +2014-02-18 Marco Trevisan (Treviño) + + Merging with Brandon's panel branch + +2014-02-18 Marco Trevisan (Treviño) + + DecoratedWindow: don't use a property for monitor, just a member + +2014-02-18 Marco Trevisan (Treviño) + + UnityGSchema: make favorites list easier editable + +2014-02-18 Marco Trevisan (Treviño) + + DecorationStyle, UnitySettings: set integrated_menus off by default :( + +2014-02-18 Marco Trevisan (Treviño) + + Merging with Brandon's HiDPI stuff + +2014-02-18 Marco Trevisan (Treviño) + + Merging with trunk + +2014-02-15 Marco Trevisan (Treviño) + + PanelMenuView: fix logic of HasMenus, again... + +2014-02-14 Marco Trevisan (Treviño) + + DecorationsMenuEntry, PanelTitlebarGrabArea: ignore motion threshold only if still inside the item + + Othewise grabbing away a window would be delayed too much when not needed + +2014-02-14 Marco Trevisan (Treviño) + + GSchema: set integrated-menus tweaks to match design specs + +2014-02-14 Marco Trevisan (Treviño) + + Merging with lp:~3v1n0/unity/text-escaping-fix (so with lp:~3v1n0/unity/decorations-menu) + +2014-02-13 Marco Trevisan (Treviño) + + PanelMenuView: fix possible errors on key activation due to HasMenus wrong value + +2014-02-13 Marco Trevisan (Treviño) + + PanelMenuView: when switching back to global menu mode, add focus to window buttons + +2014-02-13 Marco Trevisan (Treviño) + + DecorationsSlidingLayout: only use indexes to refer to internal items + +2014-02-13 Marco Trevisan (Treviño) + + PanelMenuView: add the ability to double-click over LIMs, waiting the defined timeout + +2014-02-13 Marco Trevisan (Treviño) + + PanelTitlebarGrabAreaView: use decoration::Style and UnitySettings for LIM options + +2014-02-13 Marco Trevisan (Treviño) + + UnitySettings: add lim options and use them in DecorationsMenuEntry + +2014-02-13 Marco Trevisan (Treviño) + + DecorationsGrabEdge: use DecorationStyle grab_wait value + +2014-02-13 Marco Trevisan (Treviño) + + DecorationStyle: add grab_wait option to gsettings + + It basically define how much we should wait before starting a window grab + +2014-02-13 Marco Trevisan (Treviño) + + DecorationsMenuEntry: add movement threshold value + + Basically if when the mouse is grabbed we get a motion event, we ingore it + if smaller than the given threshold. + +2014-02-13 Marco Trevisan (Treviño) + + MenuManager: add show_menus_wait property and use it in Panel and decorations + +2014-02-13 Marco Trevisan (Treviño) + + DecorationsSlidingLayout: use menu::Manager values for fadein/fadeout timings + +2014-02-13 Marco Trevisan (Treviño) + + DecoratedWindow: set sliding layout as mouse owner also if the pointer is inside the grab-edge + +2014-02-13 Marco Trevisan (Treviño) + + DecorationsMenuLayout: use menu::Manager + +2014-02-13 Marco Trevisan (Treviño) + + MenuManager: add HasAppMenu getter + +2014-02-13 Marco Trevisan (Treviño) + + PanelMenuView: Ignore menu visibility for the 100ms after an application switch + + This is needed not to make the panel to show the previous menus for a while before + switching to new ones... + +2014-02-13 Marco Trevisan (Treviño) + + PanelMenuView: improve the logic of GetTitleOpacity in case we use LIMs + +2014-02-13 Marco Trevisan (Treviño) + + UnityShell: disable menu_show on menu::Manager before showing the Alt+Tab + +2014-02-13 Marco Trevisan (Treviño) + + DecorationsMenuLayout: set the last_pointer position to the current one on key-activation + + Otherwise mouse pointer position might cause another menu to pop-up instead of the + requested one. + +2014-02-13 Marco Trevisan (Treviño) + + DecorationsManager: Add menu::Manager as construction parameter and use it + + We now have proper keyboard activation for indicator menus, and also we share + the same indicator-entries and dbus indicators with all the panels. + +2014-02-13 Marco Trevisan (Treviño) + + DecorationsMenuLayout: return a bool in ActivateMenu, based on the result + +2014-02-13 Marco Trevisan (Treviño) + + MenuManager: just handle one single AppMenu... We support only. + + So, no need to overcomplicate things. Also add signals and getters. + +2014-02-13 Marco Trevisan (Treviño) + + Merging with lp:~3v1n0/unity/menu-manager + +2014-02-12 Marco Trevisan (Treviño) + + PluginAdapter: don't use GetWindowGeometry, compiz already has what we need + + And without new search and copies... + +2014-02-12 Marco Trevisan (Treviño) + + Decorations: when integrated_menus mode is active, add menus in the decorations + + Only the active window will show up them at the moment. + +2014-02-12 Marco Trevisan (Treviño) + + AppmenuIndicator: add Ptr definition + +2014-02-12 Marco Trevisan (Treviño) + + DecorationsMenuLayout: don't care about AppmenuIndicator, we don't need subtype + +2014-02-11 Marco Trevisan (Treviño) + + UnitySettings: add integrated-menus option + + When changed, it applies to decoration::Style + +2014-02-11 Marco Trevisan (Treviño) + + UnitySettings: use glib::SignalManager + +2014-02-11 Marco Trevisan (Treviño) + + Merging with lp:~3v1n0/unity/decorations-timestamps + +2014-02-11 Marco Trevisan (Treviño) + + PanelMenuView: We need to update pointer status in these cases... + +2014-02-11 Marco Trevisan (Treviño) + + PanelView: ignore an empty PanelMenuView on Alt+F10 + +2014-02-11 Marco Trevisan (Treviño) + + DecorationsInputMixer: add ForceMouseOwnerCheck to force a new UpdateMouseOwner + + When new widgets are added in the same area of the current mouse-owner, inputmixer + should update the current owner, this can now be done on request. + +2014-02-11 Marco Trevisan (Treviño) + + DecorationsGrabEdge: add ButtonDown getter + +2014-02-11 Marco Trevisan (Treviño) + + Indicators: add SyncGeometries as virtual method, and panel in on_entry_activated + + Update DBusIndicators accordingly to match the new DBus API. + Also, in PanelView don't start any mouse-poll timer if the activated entry + is not in the current panel + +2014-02-11 Marco Trevisan (Treviño) + + PanelService: include the name of the panel in EntryActivated signal + +2014-02-11 Marco Trevisan (Treviño) + + PanelView: ignore menu activations if they happens under a different panel + + So don't setup any timeout to check the menu position (and save some unneeded + computation in multi-monitor). + +2014-02-11 Marco Trevisan (Treviño) + + PanelService: assume that the current entry is visible on key-navigation + + This fixes key-navigation in LIMs to loop back to first entry when we have a dropdown + +2014-02-11 Marco Trevisan (Treviño) + + PanelService: add function to check if an entry is visible in a specific panel + + So, an entry is visible if has a geometry and has visible emblems, but it might + be visible only in a specific panel (such as indicators that aren't visible on LIMs) + +2014-02-11 Marco Trevisan (Treviño) + + DecorationsMenuLayout: fix mouse over dropdown, we might have items with same geo + +2014-02-11 Marco Trevisan (Treviño) + + DecorationsMenuDropdown: add ActivateChild method, to activate the submenu + +2014-02-11 Marco Trevisan (Treviño) + + DecorationsMenuLayout: add ActivateMenu method to activate an entry by its ID + + As it happens on key-navigation + +2014-02-11 Marco Trevisan (Treviño) + + PanelView: don't try to activate an entry if the panel has no menus + +2014-02-10 Marco Trevisan (Treviño) + + Merge with trunk + +2014-02-10 Marco Trevisan (Treviño) + + UnityScreen: don't paint shadow over windows if using integrated_menus + +2014-02-10 Marco Trevisan (Treviño) + + PanelView: don't activate or sync geometries if a panel has no menus + +2014-02-10 Marco Trevisan (Treviño) + + PanelMenuView: add Locally Integrated Menus support + + When Integrated menus are enabled the buttons or title are drawn only + when we have a maximized window. + Also improved the code that draws the title texture that now is just big as + the text. + +2014-02-10 Marco Trevisan (Treviño) + + TestPanelIndicatorEntryDropdownView: remove in_dropdown from tests + +2014-02-10 Marco Trevisan (Treviño) + + DecorationsSlidingLayout: add fade animation when switching slide + +2014-02-10 Marco Trevisan (Treviño) + + PanelView: use !empty() instead of size() > 0 + +2014-02-10 Marco Trevisan (Treviño) + + PanelService: keep track of the panel id that is parent of the entry + + We use it to make sure we won't popdown or move a menu that has been opened + somewhere else. + +2014-02-10 Marco Trevisan (Treviño) + + PanelService: disconnect from last_menu signals when the menu is hidden + + Otherwise we'd get multiple calls to our callbacks + +2014-02-10 Marco Trevisan (Treviño) + + PanelIndicatorEntryView: get rid of in_dropdown property, just always iterate over items in layout + + So GetGeometryForSync will now ignore the entries that have been added to a dropdown. + +2014-02-10 Marco Trevisan (Treviño) + + DecorationStyle: add integrated_menus property + +2014-02-10 Marco Trevisan (Treviño) + + PanelMenuView: use const int to define show-now wait + +2014-02-10 Marco Trevisan (Treviño) + + PanelIndicatorEntryView: use smaller icon for dropdown + +2014-02-10 Marco Trevisan (Treviño) + + DecorationsMenuDropdown: use the proper Icon for the dropdown + + Also, update the dropdown height to match the one of its children. + +2014-02-10 Marco Trevisan (Treviño) + + DecorationsMenuEntry: move padding to Property, make RenderTexture virtual + + RenderTexture is now called on EntryUpdated, and might be overridden by sub-classes. + +2014-02-10 Marco Trevisan (Treviño) + + DecorationsMenuLayout: never try to activate an insensitive item. + +2014-02-10 Marco Trevisan (Treviño) + + DecorationStyle: add DrawMenuItemIcon method + +2014-02-08 Marco Trevisan (Treviño) + + DecorationsSlidingLayout: only damage if we've an input slide set + +2014-02-08 Marco Trevisan (Treviño) + + DecorationsWidgets: use uweak_ptr for parent_ + +2014-02-08 Marco Trevisan (Treviño) + + DecorationsMenuEntry: pass the window xid on ShowMenu + +2014-02-08 Marco Trevisan (Treviño) + + DecorationsEdge: add Window getter + +2014-02-08 Marco Trevisan (Treviño) + + DecorationsMenuLayout: add show_now property and set it true with delay + + It matches PanelMenuView value + +2014-02-08 Marco Trevisan (Treviño) + + DecorationsMenuEntry: add show_now property that reflects internal entry value + +2014-02-08 Marco Trevisan (Treviño) + + IndicatorEntry: don't emit signals when first/last parent is added/removed + + We don't really need this, as visibility is independent from this fact. + +2014-02-08 Marco Trevisan (Treviño) + + DecorationsInputMixer: fix a typo introduced with UWeakPtr, caused a test-crash + +2014-02-08 Marco Trevisan (Treviño) + + PanelIndicatorsView: use the drop-down to add an entry if it's already visible + + Otherwise we might add an entry in the empty space before the dropdown. + +2014-02-08 Marco Trevisan (Treviño) + + PanelIndicatorEntryDropdownView: add insert method, to include items by priority + + Tests included. + +2014-02-07 Marco Trevisan (Treviño) + + PanelIndicatorEntryDropdownView: some cleanup + +2014-02-07 Marco Trevisan (Treviño) + + DecorationsWidgets: RequestRelayout if Layout size has changed after relayout + + This save us from possible infinite loops and causes a relayout only if it has a parent. + +2014-02-07 Marco Trevisan (Treviño) + + DecorationsMenuLayout: override DoRelayout and and use a Dropdown menu if needed + + When we've not enough horizontal space add a dropdown menu and fill it with menu entries + that wouldn't show correctly. + +2014-02-07 Marco Trevisan (Treviño) + + MenuDropdown: add dropdown menu entry that acts both like an entry and container + +2014-02-06 Marco Trevisan (Treviño) + + Decorations: add more introspection data + +2014-02-06 Marco Trevisan (Treviño) + + DecorationsMenuLayout: don't use append to add items, add them manually + + So we can just relayout once instead that once per item added. + +2014-02-06 Marco Trevisan (Treviño) + + DecorationsMenuEntry: set the always_wait_grab_timeout value to true on GrabEdge + + This will make possible to see the menus also on non-resizable windows. + +2014-02-06 Marco Trevisan (Treviño) + + DecorationsGrabEdge: add construction parameter to always wait grab timeout + + If this value is true, we always wait the grab timeout to happen before starting + to grab a window. + +2014-02-06 Marco Trevisan (Treviño) + + DecorationsMenuEntry: promptly show the menu if the window is not maximizable + +2014-02-06 Marco Trevisan (Treviño) + + DecorationsGrabEdge: add IsMaximizable getter + +2014-02-06 Marco Trevisan (Treviño) + + DecorationsMenuLayout: track the mouse pointer position when an entry is active + + So now, we can navigate over menu items just moving the pointer over them. + +2014-02-06 Marco Trevisan (Treviño) + + DecorationsMenuEntry: make ShowMenu public + +2014-02-06 Marco Trevisan (Treviño) + + DecorationsMenuEntry: don't try to show the menu if the entry is already active + +2014-02-06 Marco Trevisan (Treviño) + + DecorationsMenuLayout: add active property and ChildrenGeometries method + + The menu layout is active when one of its children is, this way we can notify the parent. + Added ChildrenGeometries to generate the EntryLocationMap to be sent to the u-p-s + +2014-02-06 Marco Trevisan (Treviño) + + DecorationsMenuEntry: add a ShowMenu method and an active property + + We set the entry active as soon as we try to show the menu, if that won't happen + we'll get a signal back that will reset it. + Also expose the entry Id so we are able to send the geo informations to the Panel Service. + +2014-02-06 Marco Trevisan (Treviño) + + DecorationsGrabEdge: add IsGrabbed getter + + If true it means that the grab action has been started; false otherwise. + +2014-02-05 Marco Trevisan (Treviño) + + DBusIndicators: use Async dbus calls when we don't need prompt reply + +2014-02-05 Marco Trevisan (Treviño) + + TexturedItem: don't emit any geometry_changed signal if the coords haven't changed + +2014-02-05 Marco Trevisan (Treviño) + + CompizUtils: return a bool on all the Set functions (if anything changed) + +2014-02-05 Marco Trevisan (Treviño) + + Indicators: use unordered_map by default + +2014-02-05 Marco Trevisan (Treviño) + + DecorationsMenuLayout: add layout for Menus + +2014-02-05 Marco Trevisan (Treviño) + + DecorationsMenuEntry: use prelight-mode for "show-now" + +2014-02-05 Marco Trevisan (Treviño) + + DecorationStyle: ignore underscore in menu text, use prelight-mode for "show-now" + +2014-02-05 Marco Trevisan (Treviño) + + DecorationsMenuEntry: add simple indicator::Entry wrapper that draws a textured menu entry + +2014-02-05 Marco Trevisan (Treviño) + + DecorationsSlidingLayout: add simple layout that will show only only one item at time when mouse_owner + +2014-02-05 Marco Trevisan (Treviño) + + DecoratedWindow: use a WeakPtr for title + + It's a child of layout, so it will be automatically deleted when its parent will disappear + +2014-02-05 Marco Trevisan (Treviño) + + DecorationsPriv: use uweak_ptr + +2014-02-05 Marco Trevisan (Treviño) + + DecorationsEdgeBorders: add border getter + +2014-02-05 Marco Trevisan (Treviño) + + DecorationsWindowButton: make sure we override the proper functions + +2014-02-05 Marco Trevisan (Treviño) + + DecorationsWidgets: add typedef for Item::WeakPtr and use it in InputMixer + +2014-02-05 Marco Trevisan (Treviño) + + UWeakPtr: add std::weak_ptr extended class to handle them as shared_ptr's + + This means that we have bool, -> and * operators handy. + +2014-02-05 Marco Trevisan (Treviño) + + DecorationsWidgets: make BasicContainer to inherit from std::enable_shared_from_this + +2014-02-04 Marco Trevisan (Treviño) + + Merge with trunk + +2014-02-04 Marco Trevisan (Treviño) + + DecorationStyle: add method to draw Menu Entries + +2014-02-04 Marco Trevisan (Treviño) + + BasicContainer: factorize similar actions inside Relayout, and make DoRelayout virtual instead + + Implementors will have to implement DoRelayout instead, without caring about multiple calls to it + or emitting geometry changes afterwards. + +2014-02-20 CI bot + + The decor now scales with the DPI value. + +2014-02-20 CI bot + + Add dynamic HiDPI support to the quicklist. + +2014-02-20 CI bot + + Add dynamic HiDPI support to the tooltips. + +2014-02-20 CI bot + + Add dynamic HiDPI support to the launcher. Fixes: 1075417 + +2014-02-20 Brandon Schaefer + + UnitySettings: use proper gnome scaling-factor + +2014-02-19 Marco Trevisan (Treviño) + + UScreen: multiply the monitor pixel geometry with the scale factor + +2014-02-19 Marco Trevisan (Treviño) + + UnitySettings: use proper gnome scaling-factor + +2014-02-18 Brandon Schaefer + + * Parent + +2014-02-18 Brandon Schaefer + + * Parent + +2014-02-18 Brandon Schaefer + + * Parent + +2014-02-18 Brandon Schaefer + + * Parent + +2014-02-18 Brandon Schaefer + + * Parent + +2014-02-18 Brandon Schaefer + + * Parent + +2014-02-18 Brandon Schaefer + + * Parent + +2014-02-18 Brandon Schaefer + + * Parent + +2014-02-18 Brandon Schaefer + + * Parent + +2014-02-18 Brandon Schaefer + + * Parent + +2014-02-18 Brandon Schaefer + + * Parent + +2014-02-18 Brandon Schaefer + + * Parent + +2014-02-18 Brandon Schaefer + + * Parent + +2014-02-18 Brandon Schaefer + + * Move to EM::Ptr + +2014-02-18 Brandon Schaefer + + * Parent + +2014-02-18 Brandon Schaefer + + * Move to ::Ptr + +2014-02-18 Brandon Schaefer + + * Parent + +2014-02-18 Brandon Schaefer + + * Move to ::Ptr + +2014-02-18 Brandon Schaefer + + * Parent + +2014-02-18 Brandon Schaefer + + * Parent + +2014-02-18 Brandon Schaefer + + * Parent + +2014-02-18 Brandon Schaefer + + * Parent + +2014-02-18 Brandon Schaefer + + * Parent + +2014-02-18 Brandon Schaefer + + * Resize the icons when the DPI changes + +2014-02-18 Brandon Schaefer + + * Parent + +2014-02-18 Brandon Schaefer + + * Merge parent + +2014-02-18 Brandon Schaefer + + * Reference + +2014-02-18 Brandon Schaefer + + * Merge parent + +2014-02-18 Brandon Schaefer + + * Need to use a reference for EMConverter + +2014-02-18 Brandon Schaefer + + * Merge parent + +2014-02-18 Brandon Schaefer + + * Reference + +2014-02-18 Brandon Schaefer + + * Merge parent + +2014-02-18 Brandon Schaefer + + * Do not adopt Views + +2014-02-17 Brandon Schaefer + + * Parent + +2014-02-17 Brandon Schaefer + + * Parent + +2014-02-17 Brandon Schaefer + + * Parent + +2014-02-17 Brandon Schaefer + + * parent + +2014-02-17 Brandon Schaefer + + * Merge parent + +2014-02-17 Brandon Schaefer + + * Update the window button scale + +2014-02-17 Brandon Schaefer + + * Merge parent + +2014-02-17 Brandon Schaefer + + * Fix unit tests (need a unity::Settings instance) + +2014-02-17 Brandon Schaefer + + * Merge back + +2014-02-17 Brandon Schaefer + + * Merged back + +2014-02-17 Brandon Schaefer + + * merge + +2014-02-17 Brandon Schaefer + + * Merge parent + +2014-02-17 Brandon Schaefer + + * Merge parent + +2014-02-17 Brandon Schaefer + + * Merge parent + +2014-02-17 Brandon Schaefer + + * Resize decor border to match the DPI scaling value per monitor. + +2014-02-17 Brandon Schaefer + + * Remove Reloading the Quicklist when mouse leave (causes crash). As when you + right click and the quicklist opens it also forces the mouse to leave, mean SEG FAULT! + +2014-02-10 Brandon Schaefer + + * Merged prev branch + * Update QuicklistView with new RawPixel + +2014-02-10 Brandon Schaefer + + * Move the tooltip over to new RawPixels + +2014-02-10 Brandon Schaefer + + * Merge prev branch + +2014-02-10 Brandon Schaefer + + * Move Launcher over to new RawPixel + +2014-02-10 Brandon Schaefer + + * Merge from panel-dpi-height + +2014-01-27 Brandon Schaefer + + * Quicklist Dynamically resize with DPI change. + +2014-01-24 Brandon Schaefer + + * Tooltip dynamically resize with the DPI + +2014-01-24 Brandon Schaefer + + * Launcher now dynamically resizes with DPI changes! + +2014-02-20 Brandon Schaefer + + Remove the nux::Property panel_height; Replace it with a function. + + Now PanelStyle holds up to monitors::MAX panel_height. Now to get the panel height for the monitor you just use PanelHeight(int monitor). + + Added a signal panel_height_changed() that will emit the new panel height, and the monitor that was changed. Its not currently used. Fixes: 1075417 + +2014-02-18 Brandon Schaefer + + * Parent + +2014-02-18 Brandon Schaefer + + * Fix infinte loop, thanks Marco! + +2014-02-18 Brandon Schaefer + + * Merge trunk + +2014-02-18 Brandon Schaefer + + * Fix bug, race issue when setting the DPI settings, then changing it very quickly. + +2014-02-18 Brandon Schaefer + + * Move to EMConverter::Ptr + +2014-02-18 Brandon Schaefer + + * Should make sure it compiles...geez + +2014-02-18 Brandon Schaefer + + * Update MinMax height in SetMonitor + +2014-02-18 Brandon Schaefer + + * rebase scaleish spread + +2014-02-18 Brandon Schaefer + + * Returns a & and use a & when dealing with EMConverters + * Fix signal getting problems + +2014-02-17 Brandon Schaefer + + * Cleaned up parts in *EntryView* + * Cleaned up bits that use PanelHeight, (Missed some defaulted calls) + +2014-02-17 Brandon Schaefer + + * Remove panel_height that come back somehow! + +2014-02-17 Brandon Schaefer + + * Semi colon missing :( + +2014-02-17 Brandon Schaefer + + * Merge trunk + +2014-02-17 Brandon Schaefer + + * Remove all the unneeded calls the PanelHeight(), make a variable hold that instead. + +2014-02-16 Brandon Schaefer + + * Update more with monitors checks for PanelHeight. A couple moure to go. + * Still need to update the window buttons correctly when different monitor + sizes. + +2014-02-10 Brandon Schaefer + + * Move over to a new dpi_changed signal (not hooked up yet with the new settings) + So now when the DPI changes everything that needs to update it self in the Panel will! + +2014-02-07 Brandon Schaefer + + * Merge trunk again! + +2014-02-07 Brandon Schaefer + + * Merge trunk + +2014-01-23 Brandon Schaefer + + * Change ConvertPixels to CP + +2014-01-23 Brandon Schaefer + + * Rename em_converter_ to em_ + +2014-01-23 Brandon Schaefer + + * Merge in my panel height DPI changes over the unity-decorations changes. + We now depend on this branch! + +2014-01-17 Brandon Schaefer + + * Scale window buttons when the DPI changes + +2014-01-17 Brandon Schaefer + + * Fix merged problems + +2014-01-17 Brandon Schaefer + + * Merge trunk + +2014-01-17 Brandon Schaefer + + * Update MinMax size in the paneltray + +2014-01-16 Brandon Schaefer + + * Scale the indicator icons with the DPI! + +2014-01-16 Brandon Schaefer + + * Merge trunk + +2014-01-16 Brandon Schaefer + + * Panel/Launcher dynamically resize when the DPI changes + +2014-01-16 Brandon Schaefer + + * This causes some intersting problems if the panel height is different on 1 monitor. + ... unityshell.cpp is going to need some love to get this working nicely. + +2014-01-16 Brandon Schaefer + + * Move to PanelHeight inside panel::Style::GetBackground() + * Remove unused function pane::Style::GetHomeButtons() + * Filled in a couple more PanelHeight(monitor) calls + +2014-01-15 Brandon Schaefer + + * Add a couple of test for outof bounds (under/over) + +2014-01-15 Brandon Schaefer + + * Use the specific monitor that is being using for the panel height. + As it will soon be subject to be different heights + +2014-01-15 Brandon Schaefer + + * Move panel::Style::panel_height over to a function PanelHeight(int monitor) + +2014-02-18 CI bot + + Releasing 7.1.2+14.04.20140218.1-0ubuntu1 + +2014-02-18 Marco Trevisan (Treviño) + + UnityScreen: add a SpreadFilter when in Scale mode, when updated it filters the scale results + + The SpreadFilter is a BaseWindow with a SearchBar shown on the top-left corner of the + active workspace that is hidden by default monitoring key-presses; when some content is + written, the bar is shown, while is hidden when empty. + + Thanks to this we can finally filter the windows by name in the unity spread! Fixes: 1281257 + +2014-02-18 Marco Trevisan (Treviño) + + PluginAdapter: use CancelAction to terminate scale by default + + If we terminated it, it means that there has been no user action + +2014-02-18 Marco Trevisan (Treviño) + + TestSpread: verify that window button terminates the spread + +2014-02-18 Marco Trevisan (Treviño) + + TestSpread: verify the panel is in overlay mode during the spread + +2014-02-18 Marco Trevisan (Treviño) + + SpreadTests: don't consider the BFB as anways-saturated button anymore + +2014-02-18 Marco Trevisan (Treviño) + + TestSpread: verify the spread filter + +2014-02-18 Marco Trevisan (Treviño) + + UnityScreen: introspect spread::Filter + +2014-02-18 Marco Trevisan (Treviño) + + SpreadFilter: include geometry in introspection + +2014-02-18 Marco Trevisan (Treviño) + + SearchBar: add only valid introspection value + +2014-02-17 Marco Trevisan (Treviño) + + SpreadFilter: some cleanup + +2014-02-17 Marco Trevisan (Treviño) + + SpreadFilter: show/hide the filter as soon the text is filled/empty wait less + +2014-02-17 Marco Trevisan (Treviño) + + SpreadFilter: use longer search wait timeout + +2014-02-17 Marco Trevisan (Treviño) + + SearchBar: make live search wait a property, use chained constructors + +2014-02-17 Marco Trevisan (Treviño) + + TestSpreadFilter: add basic unit tests for the spread::Filter + +2014-02-17 Marco Trevisan (Treviño) + + Merging with lp:~3v1n0/unity/spreadish-scale + +2014-02-17 Marco Trevisan (Treviño) + + UnityScreen: check for spread selected window only if in spread mode + +2014-02-17 Marco Trevisan (Treviño) + + UnityShell: set scalefilter as a conflicting plugin + +2014-02-17 Marco Trevisan (Treviño) + + UnityScreen: add a SpreadFilter when in Scale mode, when updated it relayouts the scale plugin + + Thanks to this we can finally filter the windows by name in the unity spread! + +2014-02-17 Marco Trevisan (Treviño) + + SpreadFilter: a BaseWindow with a SearchBar that is shown/hidden when there's some content + + The SpreadFilter is a SearchBar shown on the top-left corner of the active workspace that + is hidden by default monitoring key-presses; when some content is put the bar is shown, + while is hidden when empty. + +2014-02-17 Marco Trevisan (Treviño) + + SearchBar: clear TextEntry geometry before painting it if not in full-redraw + + Otherwise we'd get the same texture redrawn over and over, in standalone mode. + +2014-02-17 Marco Trevisan (Treviño) + + PluginAdapter: simplify the scaled windows selector + +2014-02-18 Marco Trevisan (Treviño) + + Panel: Draw blurred in spread mode and show active close button + + Also desaturate the BFB on spread/expo and set an offset on scale + when the launcher is hidden (so that we get events and we have a proper + scaled windows geometry). Fixes: 1280595, 1280616, 1280632 + +2014-02-17 Marco Trevisan (Treviño) + + TestPanelMenuView: add tests for PanelMenuView in spread mode + +2014-02-17 Marco Trevisan (Treviño) + + StandaloneWindowManager: emit signals when expo/spread state changed + +2014-02-17 Marco Trevisan (Treviño) + + Merging with trunk + +2014-02-17 Marco Trevisan (Treviño) + + TestPanelMenuView: fix failing test + +2014-02-17 Marco Trevisan (Treviño) + + TestPanelView: add some tests for InOverlayMode + +2014-02-17 Marco Trevisan (Treviño) + + PanelView: spotted a regression, set the dash width on overlay initialization + +2014-02-16 Marco Trevisan (Treviño) + + UnityWindow: ignore opacity value when drawing a fake-decoration for scaled windows + +2014-02-16 Marco Trevisan (Treviño) + + PanelIndicatorEntryView: Terminate{Expo,Scale} before activating the an indicator + + In this way they are sensitive also in spread and expo mode, acting like when the + dash/hud is closed. + +2014-02-15 Marco Trevisan (Treviño) + + PanelMenuView: draw the window buttons when in Spread mode + +2014-02-15 Marco Trevisan (Treviño) + + PanelView: paint the panel as InOverlayMode when in spread mode + + Added the concept of InOverlayMode that is true when an overlay is opened + or when the spread is active. In that case we draw the semi-transparent blurred + panel and white indicators + +2014-02-15 Marco Trevisan (Treviño) + + WindowButtons: toggle the overlay_mode to match spread state + +2014-02-15 Marco Trevisan (Treviño) + + UnityScreen: Set the scale x_offset when the launcher is in autohide mode + +2014-02-15 Marco Trevisan (Treviño) + + UnityScreen: do the useless search to change the expo offset + +2014-02-15 Marco Trevisan (Treviño) + + PluginAdapter: use initialization list and use _spread_state instead of grabExist("scale") + + It's surely faster... + +2014-02-15 Marco Trevisan (Treviño) + + Launcher: BFB should be desaturated when in spread (scale or expo) mode + +2014-02-17 CI bot + + Releasing 7.1.2+14.04.20140217-0ubuntu1 + +2014-02-17 Chris Townsend + + Fix some more AP tests: + * Redo the Hud query method to account for the fact that the Hud button we want may not be the first entry. + * Fix a show desktop test so we get the correct show desktop state after the test exits. + * Fix a Spread test to get the mouse to move to the Launcher icon that we want. + +2014-02-14 Chris Townsend + + Fix some more AP tests: + * Redo the Hud query method to account for the fact that the Hud button we want may not be the first entry. + * Fix a show desktop test so we get the correct show desktop state after the test exits. + * Fix a Spread test to get the mouse to move to the Launcher icon that we want. + +2014-02-17 Luke Yelavich + + QuickListMenuItem: Add GetPlainTextLabel method to better present quicklist menu items to screen reader users. + + When Orca users navigate quicklists, they hear something like item name, due to the markup for the item being used as the accessible label. Use the ACCESSIBLE_DESC property of dbusmenu menu items to provide a plain text form of the label. Fixes: 1266656 + +2014-02-13 Luke Yelavich + + Forgot to rename the call to the new method. + +2014-02-13 Luke Yelavich + + QuickListMenuItem: Add GetPlainTextLabel method to better present quicklist menu items to screen reader users. + + When Orca users navigate quicklists, they hear something like item name, due to the markup for the item being used as the accessible label. Use the ACCESSIBLE_DESC property of dbusmenu menu items to provide a plain text form of the label. + +2014-02-17 Niklas Steger + + Add missing unity-scope-home dependency. Fixes: 1233029 + +2014-02-12 Niklas Steger + + Fix for missing unity-scope-home. Prevents Unity from only showing applications. + +2014-02-17 Sebastien Bacher + + Restore archive change dropped by error, let g-s-d run in Unity sessions + +2014-02-17 Sebastien Bacher + + Restore archive change dropped by error, let g-s-d run in Unity sessions + +2014-02-14 CI bot + + Releasing 7.1.2+14.04.20140214.1-0ubuntu1 + +2014-02-14 Marco Trevisan (Treviño) + + PanelMenuView: we don't need to escape the panel title anymore + + New decorations just use pango text. Fixes: 1280077 + +2014-02-14 Marco Trevisan (Treviño) + + Merging with parent branch + +2014-02-14 Marco Trevisan (Treviño) + + Tests: add tests to verify the text escaping + +2014-02-14 Marco Trevisan (Treviño) + + LauncherIcon: don't use escaped text by default, we do it when drawing + + Otherwise PanelMenuView wouldn't get proper string on launcher navigation. + +2014-02-14 Marco Trevisan (Treviño) + + PanelMenuView: we don't need to escape the panel title anymore + + New decorations just use pango text. + +2014-02-14 Marco Trevisan (Treviño) + + {DecorationsGrabEdge, PanelTitlebarGrabAreaView}: show the WindowAction menu on right-click Fixes: 1098419, 1280042 + +2014-02-14 Marco Trevisan (Treviño) + + PanelMenuView: revert wrong change for this branch + +2014-02-14 Marco Trevisan (Treviño) + + PanelMenuView: set the pointer outside the panel once the Action menu has been closed + +2014-02-14 Marco Trevisan (Treviño) + + DecorationsManager: Ungrab the pointer if we get a grab notification and we have a mouse owner + + This fixes the problem with window-actions menus showing on decoration right-click, + as we don't get a ButtonRelease event back, so we need to cancel it. + +2014-02-14 Marco Trevisan (Treviño) + + DecorationsInputMixer: add UngrabPointer, it unsets the mouse owner and mouse_down status + +2014-02-14 Marco Trevisan (Treviño) + + PanelMenuView: Show the maximized action window menu on right-click over Grab area + +2014-02-14 Marco Trevisan (Treviño) + + PanelTitlebarGrabAreaView: add menu request signal on right-click + +2014-02-14 Marco Trevisan (Treviño) + + PanelView: use UnGrabMousePointer + +2014-02-14 Marco Trevisan (Treviño) + + WindowManager: add ShowActionMenu and UnGrabMousePointer + + ShowActionMenu asks compiz to show the toolkit action menu for windows + while UnGrabMousePointer is a workaround we need to open menus with nux. + The code was put in two different places, better to just have one. + +2014-02-14 Marco Trevisan (Treviño) + + DecorationsGrabEdge: show the WindowAction menu on right-click + +2014-02-14 Marco Trevisan (Treviño) + + LauncherDragWindow: set the drag window background to transparent or it will be white by default + + This was causing a quick flickering of the icon as soon as it was drawn on the first place. Fixes: 1279904 + +2014-02-13 Marco Trevisan (Treviño) + + LauncherDragWindow: set the drag window background to transparent or it will be white by default + + This was causing a quick flickering of the icon as soon as it was drawn on the first place. + +2014-02-14 CI bot + + Flush trunk to Ubuntu + +2014-02-13 Marco Trevisan (Treviño) + + MenuManager: add a wrapper for Indicators and KeyGrabber that registers mnemonics + + It also emits signals with accumulators that will just stop the emission when a client + returns true, and holds menu general settings. + + Approved by Brandon Schaefer, PS Jenkins bot. + +2014-02-12 Marco Trevisan (Treviño) + + StandaloneUnity: fix compilation and crash on load + +2014-02-12 Marco Trevisan (Treviño) + + PanelView: make sure that the pointer won't select another entry just after keyboard activation + + If the pointer is over a panel entry and an indicator is activated using keyboard, we don't have + to activate the entry under it, until it will change position. + +2014-02-12 Marco Trevisan (Treviño) + + PanelView: remove unneeded function + +2014-02-12 Marco Trevisan (Treviño) + + MenuManager: add nux::Property's to handle menu settings + + This is way better than passing the single values so many times in the panel + +2014-02-12 Marco Trevisan (Treviño) + + Introspectable: don't try to add or remove an invalid child + +2014-02-12 Marco Trevisan (Treviño) + + Unity: just create one MenuManager on creation and share with Panel + + Also this allows testability without relying on actual dbus indicators. + +2014-02-12 Marco Trevisan (Treviño) + + Indicators: make also ShowEntriesDropdown a virtual method + +2014-02-12 Marco Trevisan (Treviño) + + MenuManager: add a wrapper for Indicators and KeyGrabber that registers mnemonics + + It also emits signals with accumulators that will just stop the emission when a client + returns true. + +2014-02-12 Marco Trevisan (Treviño) + + KeyGrabber: add abstract class and implement it in GnomeKeyGrabber + +2014-02-12 Chris Townsend + + Fix Autopilot test issue where Show Desktop is somehow invoked and the recovery from this does not properly get the state back to Show Desktop off. + + Approved by PS Jenkins bot, Brandon Schaefer. + +2014-02-12 Chris Townsend + + Fix Autopilot test issue where Show Desktop is somehow invoked and the recovery from this does not properly get the state back to Show Desktop off. + +2014-02-12 Chris Townsend + + Fix where the mouse_disabled_ variable was unintialized which would cause the Switcher to not work correctly with the mouse and arrow keys. + Fix the mouse filter list to account for only motion and button click/release so arrow key navigation will still work in the Switcher when mouse interaction is disabled. Fixes: https://bugs.launchpad.net/bugs/1279499. + + Approved by PS Jenkins bot, Brandon Schaefer. + +2014-02-12 Chris Townsend + + Fix where the mouse_disabled_ variable was unintialized which would cause the Switcher to not work correctly with the mouse and arrow keys. + Fix the mouse filter list to account for only motion and button click/release so arrow key navigation will still work in the Switcher when mouse interaction is disabled. + +2014-02-12 Stephen M. Webb + + add multi-mointor support to a couple of tests where it got misssed. + + Approved by PS Jenkins bot, Christopher Townsend. + +2014-02-12 Stephen M. Webb + + add multi-monitor support to a couple of tests that were missing it + +2014-02-12 Chris Townsend + + Fix a failing Dash AP test due to too many results being returned which caused the position of the Dash icon to be off the screen. + + Approved by PS Jenkins bot, Brandon Schaefer. + +2014-02-11 Chris Townsend + + Fix a failing Dash AP test due to too many results being returned which caused the position of the Dash icon to be off the screen. + +2014-02-11 Marco Trevisan (Treviño) + + DecorationsInputMixer: pass Timestamp to events + + This might be needed to perform some actions, and using CompScreen getCurrentTime() + is way much more expensive than I thought. + + Approved by PS Jenkins bot, Christopher Townsend. + +2014-02-11 Marco Trevisan (Treviño) + + TestInputMixer: update to match new API + +2014-02-11 Marco Trevisan (Treviño) + + DecorationsInputMixer: pass Timestamp to events + + This might be needed to perform some actions, and using CompScreen getCurrentTime() + is way much more expensive than I thought. + +2014-02-11 William Hua + + Implement the GNOME key grabber interface so that Compiz and gnome-settings-daemon no longer have to fight for key grabs. Also, fix the global menu bar mnemonics. (LP: #1113008, LP: #1206582, LP: #1226962). Fixes: https://bugs.launchpad.net/bugs/1113008, https://bugs.launchpad.net/bugs/1206582, https://bugs.launchpad.net/bugs/1226962. + + Approved by Christopher Townsend, Marco Trevisan (Treviño), PS Jenkins bot. + +2014-02-11 William Hua + + Merge trunk. + +2014-02-07 William Hua + + screen_ might be NULL if Compiz wasn't initialized (as in tests). + +2014-02-07 William Hua + + Remove grabbed actions on destruction. + +2014-02-06 William Hua + + Add alt reveal menu AP test. + +2014-02-06 William Hua + + Use test logger. + +2014-02-05 William Hua + + Refactor tests; do a proper tear-down. + +2014-02-05 William Hua + + Add clean-up for tests. + +2014-02-05 William Hua + + Merge trunk. + +2014-02-05 William Hua + + Simplify show menu with alt. + +2014-02-04 William Hua + + Clean up. + +2014-02-04 William Hua + + Merge trunk. + +2014-02-04 William Hua + + Stop tracking grabs; Compiz already does it for us. + +2014-02-04 William Hua + + Test was slightly incorrect, fix it. + +2014-02-03 William Hua + + Add GnomeKeyGrabber autopilot tests. + +2014-02-01 William Hua + + Only watch if we have a grabber. + +2014-02-01 William Hua + + Clean up. + +2014-02-01 William Hua + + Remember to set state to CompAction::StateInitKey. + +2014-02-01 William Hua + + Fix crash. + +2014-01-31 William Hua + + Fix CMake errors. + +2014-01-31 William Hua + + Implement mnemonic grabber in panel. + +2014-01-31 William Hua + + Pass key grabber down to implementation. + +2014-01-31 William Hua + + Pass GnomeKeyGrabber. + +2014-01-31 William Hua + + Grabber is a pointer. + +2014-01-30 William Hua + + Don't use grabber namespace. + +2014-01-30 William Hua + + Remove mnemonic grabbing from u-p-s. + +2014-01-29 William Hua + + MP fix-up. + +2014-01-29 William Hua + + Merge trunk. + +2014-01-22 William Hua + + Show menu bar on alt press. + +2014-01-21 William Hua + + We renamed CompAction::Class to CompAction::Container. + +2014-01-20 William Hua + + Use key grabber for mnemonics. + +2014-01-19 William Hua + + Merge trunk. + +2014-01-12 William Hua + + Fix key re-assignment bug. + +2014-01-10 William Hua + + Merge trunk. + +2013-12-29 William Hua + + Merge trunk. + +2013-12-23 William Hua + + possibleTap wasn't getting set, fix that. + +2013-12-23 William Hua + + Fix vector re-allocation crash. + +2013-12-19 William Hua + + Differentiate between modifier-only and other shortcuts. + +2013-12-17 William Hua + + Fix deprecation error. + +2013-12-12 William Hua + + GnomeKeyGrabber initial implementation. + +2014-02-10 Chris Townsend + + Fix a couple of test_panel AP tests: + * The overlay window buttons did not take multi-monitor into account, so now account for that. + * Fix the AP test themselves to actually use the correct introspection object. + + Approved by PS Jenkins bot, Brandon Schaefer. + +2014-02-10 Chris Townsend + + Fix a couple of test_panel AP tests: + * The overlay window buttons did not take multi-monitor into account, so now account for that. + * Fix the AP test themselves to actually use the correct introspection object. + +2014-02-10 Dimitri John Ledkov + + (sync with archive) + + * Temporally allow running under gnome-settings-daemon, until + unity-settings-daemon is in main. + * Make unity7 job start on started either gnome or unity settings + daemon. + * Cherrypick "Removed the ZeitgeistUtils.h as this is no longer needed + since Zeitgeist in main is now fixed." to fix FTBFS. + +2014-02-08 Chris Townsend + + Fixes some Autopilot Panel test failures: + * Emit the signal to call OnIndicatorViewUpdated() when the active window position has changed. + * Account for an overlay (Dash/Hud) to be opened when testing if the window buttons should be shown in the Panel. This was removed some revisions ago and it looks like it shouldn't have been. + * Fix up a Panel test since it was failing in a part that didn't need to be ran anyways. Fixes: https://bugs.launchpad.net/bugs/1277265. + + Approved by PS Jenkins bot, Brandon Schaefer. + +2014-02-07 Chris Townsend + + Remove the check to see if the overlay is open in the PanelMenuView from my last commit. + +2014-02-06 Chris Townsend + + Fixes some Autopilot Panel test failures: + * Emit the signal to call OnIndicatorViewUpdated() when the active window position has changed. + * Account for an overlay (Dash/Hud) to be opened when testing if the window buttons should be shown in the Panel. This was removed some revisions ago and it looks like it shouldn't have been. + * Fix up a Panel test since it was failing in a part that didn't need to be ran anyways. + +2014-02-07 Brandon Schaefer + + Simple RawPixel class. It adds 2 define literals, ex: 10_em, 10.0_em. From there it turns them into raw pixels. RawPixels have CP (CovertPixel) function which takes in an EMConverter that allows you to use a converter specific to a monitor to convert the raw pixel to the correct value. + + Approved by PS Jenkins bot, Marco Trevisan (Treviño). + +2014-02-07 Brandon Schaefer + + * Add a RawPixel class, which has 2 defined literals (ex: 10_em, 10.0_em) + +2014-02-07 Eleni Maria Stea + + function that gets the monitor name from the GDKScreen in UScreen. + + Approved by PS Jenkins bot, Marco Trevisan (Treviño). + +2014-02-07 Eleni Maria Stea + + fixed return statement (output_name is not a char* anymore) + +2014-02-06 Eleni Maria Stea + + GetMonitorName now gets the monitor number as a parameter, also, it always + return a non-null std::string + +2014-02-05 Eleni Maria Stea + + function GetMonitorName: finds the name of the MonitorWithMouse + +2014-02-05 Eleni Maria Stea + + added GetScreen function that returns the GDKScreen + +2014-02-07 William Hua + + Launcher: Fix GVariant type error in Hud UBus message. + + Approved by Marco Trevisan (Treviño), Christopher Townsend, PS Jenkins bot. + +2014-02-05 William Hua + + Fix it in launcher instead. + +2014-02-05 William Hua + + Fix GVariant typing error in HudController. + +2014-02-04 Sebastien Bacher + + lists keybinding in unity-control-center. Fixes: https://bugs.launchpad.net/bugs/1271710. + + Approved by PS Jenkins bot, Christopher Townsend. + +2014-02-04 Sebastien Bacher + + lists keybinding in unity-control-center + +2014-02-04 Sebastien Bacher + + use unity-control-center by default. + + Approved by PS Jenkins bot, Christopher Townsend. + +2014-02-04 Sebastien Bacher + + use unity-control-center by default + +2014-02-03 Eleni Maria Stea + + Configuration Parser class for custom gsettings. + + Approved by PS Jenkins bot, Brandon Schaefer. + +2014-02-03 Eleni Maria Stea + + fixed indent issue + +2014-02-03 Eleni Maria Stea + + added configuration parser + +2014-02-03 Eleni Maria Stea + + new gsetting in unityshell.xml.in: fonts-scale-factor. + + Approved by Brandon Schaefer, PS Jenkins bot. + +2014-02-03 Eleni Maria Stea + + new gsetting: "fonts-scale-factor" + +2014-02-03 Marco Trevisan (Treviño) + + PanelMenuView: show a dropdown menu of indicators, if there's no enough horizontal space + + PanelService: add new dbus method ShowEntriesDropdown that when called puts + the requested indicator entires into a DropDown menu before showing them, + also threat dropdown menus as special entries when the their geometry has + been synced. + + UnityCore: add add ShowEntriesDropdown virtual method as well and implement + in DBusIndicators, to call the relative method in PanelService. + Add parents to indicator::Entry, now an entry can have one or more parents + (that's mostly depending on how many monitors we have), and if parented, + it notifies active, show_now and geometry status to them. + API cleanups included, SO-name bumped. + + PanelView: add simpler PreLayoutManagement function, to avoid nux to do too + many computations that will cause the Menu to relayout too much with no need. + + Added PanelIndicatorEntryDropdownView as new subtype of PanelIndicatorEntryView + that will show a go-down icon on the PanelMenuView that when clicked will show + a dropdown menu of indicators. This will happen only if there's not enough + room to see them inline. + + PanelIndicatorsView: many cleanups, and add EnableDropdownMenu that creates a + new PanelIndicatorEntryDropdownView and uses it to place the entries that don't + fit the available space, until we don't get some more. + + Added and reworked a bunch of unit tests. Fixes: https://bugs.launchpad.net/bugs/1274554. + + Approved by Christopher Townsend, PS Jenkins bot. + +2014-01-30 Marco Trevisan (Treviño) + + TestPanelIndicatorEntryDropdownView: disable the jenkins-only failing checks + +2014-01-30 Marco Trevisan (Treviño) + + TestMain: remove old unused definitions + +2014-01-30 Marco Trevisan (Treviño) + + PanelView: both redraw and relayout on changes + + There's something weird happening here, though. + +2014-01-30 Marco Trevisan (Treviño) + + CMake, Tests: use file (COPY ...) directive to copy data files (instead of doing everything manually) + +2014-01-30 Marco Trevisan (Treviño) + + Tests: include go-down-symbolic icon in tests, or they will fail in jenkins + +2014-01-30 Marco Trevisan (Treviño) + + ExternalGSChema: define other external schemas we use in unity + +2014-01-30 Marco Trevisan (Treviño) + + debian: make the libunity-core-6.0 packaging reflect the new soname + +2014-01-30 Marco Trevisan (Treviño) + + PanelView: set PanelMenuView stretch factor to 0, as we manually manage its size. + +2014-01-30 Marco Trevisan (Treviño) + + PanelMenuView: connect to entry signals on entry_added signal + + Also SetMaximumEntriesWidth before computing the layout content size (as it might change it). + +2014-01-30 Marco Trevisan (Treviño) + + PanelView: enable dropdown menu on PanelMenuView + +2014-01-30 Marco Trevisan (Treviño) + + TestPanelIndicatorsView: verify EnableDropdownMenuInvalid + +2014-01-30 Marco Trevisan (Treviño) + + MockIndicators: Move definition in a separate header, update TestIndicators accordingly + +2014-01-30 Marco Trevisan (Treviño) + + TestPanelIndicatorEntryDropdownView: add unit tests covering its behavior + +2014-01-30 Marco Trevisan (Treviño) + + PanelIndicatorsView: add EnableDropdownMenu, if enabled we add a PanelIndicatorEntryDropdownView + + That dropdown is used to adjust the size of the children, hiding them under a dropdown icon + instead of collapsing or loosing their control. This is motly unseful only for PanelMenuView, + but it might be enabled also for standard indicators. + + Including, as often, some code cleanup, removing useless dynamic_casts and iterate over + layout_->Children()'s instead that over entries. Added entry_added and entry_removed signals. + +2014-01-30 Marco Trevisan (Treviño) + + PanelIndicatorEntryView: remove the useless code to paint indicator entries with fade-out + +2014-01-30 Marco Trevisan (Treviño) + + PanelIndicatorEntryDropdownView: mark a child entry as "in_dropdown" when added/removed + +2014-01-30 Marco Trevisan (Treviño) + + PanelIndicatorEntryView: add in_dropdown property, to mark an entry logically hidden + + When an entry is in_dropdown it should be hidden logically, but it should still be active, + as the internal Entry can notify its parent. + Include some code cleanups, and set the entry size to a fixed value + +2014-01-30 Marco Trevisan (Treviño) + + TestPanelView: use a mock DBusIndicators instead that real one + + We still intialize a proxy internally, but at least we won't use it. + +2014-01-30 Marco Trevisan (Treviño) + + PanelIndicatorEntryDropdownView: added a new kind of EntryView that is a logical container + + The role of this view is to act like a queue of EntryView's that should be hidden when added to + this view and pop'ed when there's enough space for them on the main widget. + Overriding the ShowMenu method we can call the ShowEntriesDropdown Indicators method + in order to see the hidden entries as drop-down + +2014-01-30 Marco Trevisan (Treviño) + + unityshell.xml.in: make showrepaint plugin to be loaded after unity + + Otherwise we won't see the unity redraws... + +2014-01-30 Marco Trevisan (Treviño) + + PanelView: add PreLayoutManagement to better handling relayouting + + We force the menuview to use all the space that is not used by tray or indicators. + This saves a lot of computations at nux layout level + +2014-01-30 Marco Trevisan (Treviño) + + IndicatorEntry: don't set an entry invisible if it has parents + + Reverting previous logic... Since the IndicatorEntry's can be shared between monitors + then, this would affect the visbility on both. We need to handle this at panel level. + +2014-01-28 Marco Trevisan (Treviño) + + TestIndicatorEntry: verify signal emissions on parents adding/removal + +2014-01-28 Marco Trevisan (Treviño) + + TestIndicatorEntry: verify visibility changes on add/removal of parents + +2014-01-28 Marco Trevisan (Treviño) + + UnityCore: update so-name version + +2014-01-28 Marco Trevisan (Treviño) + + IndicatorEntry: set an entry invisible by default if it has parents + +2014-01-28 Marco Trevisan (Treviño) + + IndicatorEntry: cleanup the API, add parents support, improve testing + + Each Entry might have one or more (it might happen on multi-monitor) parent entries that will + match a child geometry, active state and show-now state. + + So, when we add a parent we update its values to match the child, when a relevant child value changes + we inform the parents about it. + +2014-01-28 Marco Trevisan (Treviño) + + Indicators: match ShowEntriesDropdown to the dbus-API + + So we get an Entry::Ptr as selected item. + +2014-01-28 Marco Trevisan (Treviño) + + PanelService: include selected-entry parameter in ShowEntriesDropdown, fix key navigation + + We now can convert fake-dropdown entries from both their id or address, key navigation + will work also for dropdown menu, while it will be possible to directly open a dropdown + submenu entry from u-p-s (and so an app with accelerator will be able to show it). + +2014-01-27 Marco Trevisan (Treviño) + + Indicators: remove the ShowDropdownMenu call from Entry, we handle it a lower level now + +2014-01-27 Marco Trevisan (Treviño) + + Indicators: add ShowEntriesDropdown to show a dropdown from a list of entries + + And implement it for DBusIndicators + +2014-01-27 Marco Trevisan (Treviño) + + PanelService: go back to ShowEntriesDropdown to take a list of entries to show + +2014-01-27 Marco Trevisan (Treviño) + + PanelService: add fake-dropdown entries for each indicator, so that they can have a geometry + +2014-01-26 Marco Trevisan (Treviño) + + TestIndicatorEntry: verify ShowDropdownMenu calls + +2014-01-26 Marco Trevisan (Treviño) + + TestIndicatorEntry: use GMock's facilities for checking signals + +2014-01-26 Marco Trevisan (Treviño) + + IndicatorEntry: add new ShowDropdownMenu call and emit proper signals to Indicator and Indicators + + DBusIndicators already supporting sending such signals. + Added tests. + +2014-01-25 Marco Trevisan (Treviño) + + StandalonePanel: fix compilation with new panel namespace + +2014-01-25 Marco Trevisan (Treviño) + + Panel: move all the panel classes inside the panel namespace + +2014-01-25 Marco Trevisan (Treviño) + + DBusIndicators: fix a typo causing compilation troubles + +2014-01-25 Marco Trevisan (Treviño) + + DBusIndicators: add callback to call "ShowEntriesDropdown" panel service method + +2014-01-25 Marco Trevisan (Treviño) + + TestIndicators: use GMock calls checker + +2014-01-25 Marco Trevisan (Treviño) + + Indicators: cleanup the API + + Move virtual methods to protected area, remove unneeded things + +2014-01-25 Marco Trevisan (Treviño) + + DBusIndicators: don't use virtual methods on Impl + +2014-01-25 Marco Trevisan (Treviño) + + DBusIndicators: fix show-appmenu call, and don't pass & to lambdas + +2014-01-25 Marco Trevisan (Treviño) + + PanelService: s/ShowEntries/ShowEntriesDropdown/ it takes an entry now and shows all the rest + + Basically passing an entry id to the service, it will show all the other entries of the indicator + from the first to the last ones, inside a drop-down menu. + We need to use some "hacks" to unparent/reparent menus, but it seems to work as it should. + +2014-01-25 Marco Trevisan (Treviño) + + PanelService: remove the useless offscreen-window and menubar + +2014-01-24 Marco Trevisan (Treviño) + + PanelService: add ShowEntries method to show a list of entries in a drop-down menu + +2014-01-24 Marco Trevisan (Treviño) + + PanelIndicatorsView: make PanelIndicatorsView const and return a const& + +2014-01-23 Marco Trevisan (Treviño) + + TestIndicator: use SigReceiver with EXPECT_CALL in old tests + + Also split them in smaller ones + +2014-01-23 Marco Trevisan (Treviño) + + TestIndicator: verify updated signal + +2014-01-23 Marco Trevisan (Treviño) + + Indicator: add "updated" signal, that is emitted when entries have been changed + + So we get just one signal when a bunch of entries have been added or removed + instead of many + +2014-01-31 Brandon Schaefer + + Add multi monitor support for EMConverter in unity settings. Now you can grab a specific converter per monitor. + + Approved by PS Jenkins bot, Christopher Townsend. + +2014-01-31 Brandon Schaefer + + * Reword error message + +2014-01-31 Brandon Schaefer + + * Move div 1024 inside the GetDPI/FontSize funtion + +2014-01-31 Brandon Schaefer + + * Use index to GetDPI(int monitor) + +2014-01-31 Brandon Schaefer + + * Add multi monitor support for EMConverters. Now you asked which EMConverter + you want for a specific monitor index. + +2014-01-31 Brandon Schaefer + + Move EMConverter over to unity settings. + + Approved by Christopher Townsend, Eleni Maria Stea, PS Jenkins bot. + +2014-01-30 Brandon Schaefer + + * Move the EMConverter over to the unitysettings, this way only it will be doing + the DPI/FontSize updating. + +2014-01-31 Chris Townsend + + Add a method to tell the Hud icon when there are multi-monitors and only a Launcher on the primary monitor. This will make sure the active and visible states for the icon are correct and allow the AP tests to pass. Fixes: https://bugs.launchpad.net/bugs/1274985. + + Approved by Brandon Schaefer, PS Jenkins bot. + +2014-01-31 Chris Townsend + + Add a method to tell the Hud icon when there are multi-monitors and only a Launcher on the primary monitor. This will make sure the active and visible states for the icon is correct and allow the AP tests to pass. + +2014-01-30 Brandon Schaefer + + Add Pt to Px function to em converter. + + Approved by Christopher Townsend, PS Jenkins bot. + +2014-01-29 Brandon Schaefer + + * Add a simple Pt to Px function to the EMConverter + +2014-01-29 Chris Townsend + + Fix more AP tests: + * Fix workspace emulator to get viewport info for more than the first monitor. + * Fix some Hud, Dash, and Switcher tests for multi-monitor. + + Approved by PS Jenkins bot, Brandon Schaefer. + +2014-01-29 Chris Townsend + + Fix more AP tests: + * Fix workspace emulator to get viewport info for more than the first monitor. + * Fix some Hud, Dash, and Switcher tests. + +2014-01-29 Brandon Schaefer + + Testing that the ibus anthy tests could possibly be causing strange issues on the nvidia machine. So skipping them to test if tihs is the source of the error. + + Approved by PS Jenkins bot, Christopher Townsend. + +2014-01-29 Brandon Schaefer + + * Skip IBUS tests for a test + +2014-01-28 Marco Trevisan (Treviño) + + decorations: added new unity-decorations fully gtk-css-themed inside unity. Fixes: https://bugs.launchpad.net/bugs/691817, https://bugs.launchpad.net/bugs/827537. + + Approved by Christopher Townsend, Brandon Schaefer, PS Jenkins bot. + +2014-01-23 Marco Trevisan (Treviño) + + DecorationStyle: fix issue when using "titlebar-uses-system-font" setting + + It was always using the system font, once enabled one time. + +2014-01-23 Marco Trevisan (Treviño) + + Merging with trunk, again + +2014-01-23 Marco Trevisan (Treviño) + + DecorationsWidgets: move definitions of some members in cpp file + +2014-01-23 Marco Trevisan (Treviño) + + LauncherIcon: set back to use mouse-monitor-center introspection data overwritten by merge + +2014-01-23 Marco Trevisan (Treviño) + + DecorationsManager: make sure manager_ is never replaced unless invalid + +2014-01-23 Marco Trevisan (Treviño) + + DecorationsEdgeBorders: use a for-loop to initialize items + +2014-01-23 Marco Trevisan (Treviño) + + DecoratedPriv: remove extern Display definition, just use server->dpy() + +2014-01-23 Marco Trevisan (Treviño) + + DecoratedWindow: use auto-const pointers + +2014-01-23 Marco Trevisan (Treviño) + + DecoratedWindow: replace inline-? statements with an if + +2014-01-23 Marco Trevisan (Treviño) + + DecoratedWindow: make UpdateFrame more readable, splitting it... + + As per Brandon's review. + +2014-01-23 Marco Trevisan (Treviño) + + UNITY_STANDALONE_LADD: no need to use the ";" to separate these parameters + +2014-01-22 Marco Trevisan (Treviño) + + UnityShell: no need to be friend of decoration::{Window,Manager} + +2014-01-22 Marco Trevisan (Treviño) + + UnityWindow: don't draw fake decoration on windows that don't are decorable and unselected + + We still want to paint it on selected windows, to show what they are. + +2014-01-22 Marco Trevisan (Treviño) + + DecoratedWindow: use nullptr + +2014-01-21 Marco Trevisan (Treviño) + + DecoratedWindow: add private IsMaximized utility function + +2014-01-21 Marco Trevisan (Treviño) + + DecoratedWindow: add last_title string to backup the title name in case the window is undecorated + + This is mostly for maximized windows, as they do have the title also if the current decoration::Title has + been deleted with the top layout. In this case we need to keep a copy of the text around until we've + not get decorated again. We're avoiding to duplicate any string content, though. + +2014-01-21 Marco Trevisan (Treviño) + + Merging with trunk + +2014-01-21 Marco Trevisan (Treviño) + + decorations_pch: include sigc + +2014-01-21 Marco Trevisan (Treviño) + + UnityScreen: add option to override themed decoration shadows and use for choosing settings + + Also update Manager perameters on style changed. + +2014-01-21 Marco Trevisan (Treviño) + + DecorationsManager: get default shadow settings from decoration::Style + +2014-01-21 Marco Trevisan (Treviño) + + DecorationsManager: add back definition for ~Manager, or linking won't work + +2014-01-21 Marco Trevisan (Treviño) + + DecorationStyle: make shadow settings themable + +2014-01-21 Marco Trevisan (Treviño) + + DecorationStyle: use GdkRGBA for glow-color + +2014-01-20 Marco Trevisan (Treviño) + + decorations: various code cleanups + +2014-01-20 Marco Trevisan (Treviño) + + DecorationStyle: no need to set the context changed after building it + +2014-01-20 Marco Trevisan (Treviño) + + decorations_pch: update precompiled headers + +2014-01-20 Marco Trevisan (Treviño) + + DecorationsTitle: damage the window title when text changes + +2014-01-20 Marco Trevisan (Treviño) + + DecoratedWindow: define a RedrawDecorations method that sets dirty_geo_ and damages + +2014-01-20 Marco Trevisan (Treviño) + + DecorationsManager: rebuild window top layout when _MOTIF_WM_HINTS atom changes + + In theory it would be better to only hide/remove items from the layout or InputMixer, but + this is the faster way and really this won't happen so often. + +2014-01-20 Marco Trevisan (Treviño) + + DecorationsTitle: use TexturedItem::SetTexture and don't care about manually damaging + +2014-01-20 Marco Trevisan (Treviño) + + DecorationsWidgets: also reset max/min width when setting a new Texture + + Otherwise the layout computation won't be affected when changning size. + +2014-01-18 Marco Trevisan (Treviño) + + DecoratedWindow: move the window controls cleanup into a single function + + Also reset the window title instance we have or it will continue to live (what about using a weak_ptr?)... + +2014-01-17 Marco Trevisan (Treviño) + + DecorationsManager: fix a typo, check if name changed when Atoms::wmName changed! + + Not motif hints... They're only for decorating + +2014-01-17 Marco Trevisan (Treviño) + + DecorationsTitle: simplify the logic for setting texture size on text changed, reduce damages + +2014-01-17 Marco Trevisan (Treviño) + + UnityWindow: set decorated window as scaled when in spread-mode + +2014-01-17 Marco Trevisan (Treviño) + + DecoratedWindow: add scaled property, when that's true draw as active and decorate it + + In this way maximized windows get decorated in scale mode (and we use proper textures) + +2014-01-16 Marco Trevisan (Treviño) + + DecorationsDataPool: load the glow texture on startup and use it in UnityWindow + + Also the windows glowing is now fully themable! ;) + +2014-01-16 Marco Trevisan (Treviño) + + DecorationStyle: invalidate the style context before updating the themed values! + +2014-01-16 Marco Trevisan (Treviño) + + CompizUtils: add operator overridden methods for SimpleTexture + +2014-01-16 Marco Trevisan (Treviño) + + UnityWindow: use decoration::Style to get glow settings + +2014-01-16 Marco Trevisan (Treviño) + + DecorationStyle: make glow color and size themable + +2014-01-16 Marco Trevisan (Treviño) + + StandaloneDecorationStyle: add getters for CornerRadius + +2014-01-16 Marco Trevisan (Treviño) + + CMakeLists: export GTK_PREFIX on config.h instead of hardcoding one + +2014-01-16 Marco Trevisan (Treviño) + + DecorationStyle: add support for titlebar-uses-system-font gnome wm setting + +2014-01-15 Marco Trevisan (Treviño) + + DecorationStyle: read again the themed values when theme changes + + Oh, I really missed this... We need to get these settings again or they won't + match the new theme... + +2014-01-15 Marco Trevisan (Treviño) + + DecorationStyle: add getter for corner radius for each side + +2014-01-15 Marco Trevisan (Treviño) + + UnityWindow: use decoration::Style defined paddings on fake-decorated windows + +2014-01-15 Marco Trevisan (Treviño) + + DecorationsTitle: add introspection details + +2014-01-15 Marco Trevisan (Treviño) + + DecorationsWindowButton: add introspection details + +2014-01-15 Marco Trevisan (Treviño) + + DecorationsEdgeBorders: add introspection details + + Also rename the Edge::Type::CENTRAL to Edge::Type::GRAB + +2014-01-15 Marco Trevisan (Treviño) + + DecoratedWindow: return its introspectable children + +2014-01-15 Marco Trevisan (Treviño) + + DecorationsWidgets: add Introspection support + +2014-01-15 Marco Trevisan (Treviño) + + Introspectable: protect against null children + +2014-01-15 Marco Trevisan (Treviño) + + DecorationsDataPool: keep track of the Display, as it might be deleted when destroying + +2014-01-15 Marco Trevisan (Treviño) + + DecorationsManager, DecoratedWindow: add introspection support + +2014-01-15 Marco Trevisan (Treviño) + + IntrospectionData: add introspection for compiz geometries classes + +2014-01-14 Marco Trevisan (Treviño) + + WindowManager: remove (un)decorate calls and signals, use DecorationStyle to get values + +2014-01-14 Marco Trevisan (Treviño) + + DecoratedWindow: move decoration support checks in CompizUtils + + Having IsWindowShadowDecorable and IsWindowFullyDecorable in unity-shared allows to use + this in PluginAdapter as well... Not the nicest thing, but more correct. + +2014-01-14 Marco Trevisan (Treviño) + + UnityShell: updateFrameRegion also when called through minimize handler + +2014-01-14 Marco Trevisan (Treviño) + + UnityWindow: some code cleanup + +2014-01-14 Marco Trevisan (Treviño) + + PanelStyle: invalidate the window buttons cached textures when theme changes + + Othewise buttons won't be updated, as they might have multiple references + +2014-01-14 Marco Trevisan (Treviño) + + TestTextureCache: add invalidate method, to invalidate a texture + +2014-01-14 Marco Trevisan (Treviño) + + DecorationStyle: fix a typo causing missing loading of system-wide buttons files + + Also log on missing files + +2014-01-14 Marco Trevisan (Treviño) + + DecorationsDataPool: be more verbose on missing ButtonTexture + +2014-01-14 Marco Trevisan (Treviño) + + UnityWindow: initialize the close_icon_state_ value and reset it on close + + It was causing a crash; also include close button only on closable windows and + connect to decoration::Style signals to update the textures. + +2014-01-14 Marco Trevisan (Treviño) + + PanelStyle: remove any local connection, depend on decoration::Style + +2014-01-14 Marco Trevisan (Treviño) + + DecorationsTitle: regenerate the title texture if the font changed + + We don't need to do this in case of theme changes, because the decoration title + would be regenerated anyway... + +2014-01-14 Marco Trevisan (Treviño) + + DecoratedWindow: redecorate framed windows when the theme changes + +2014-01-14 Marco Trevisan (Treviño) + + DecorationsDataPool: reload buttons textures when theme changed + +2014-01-14 Marco Trevisan (Treviño) + + DecorationStyle: monitor theme and font settings and add properties to match them + + Also invalidate contextes (pango and style) when relevant values change. + +2014-01-14 Marco Trevisan (Treviño) + + PanelStyle: use DecorationStyle to get window buttons files or to generate them + +2014-01-14 Marco Trevisan (Treviño) + + UnityWindow: use decoration::DataPool texture for the close button in fake decorated windows + +2014-01-14 Marco Trevisan (Treviño) + + UnityWindow: don't decorate/undecorate windows on spread initiate/terminate + + We need to handle this properly, though. + +2014-01-14 Marco Trevisan (Treviño) + + DecorationsDataPool: generate cairo-drawn fallback window buttons if no pixmaps are available + +2014-01-14 Marco Trevisan (Treviño) + + DecorationStyle: draw filled window buttons with bigger internal symbols + +2014-01-14 Marco Trevisan (Treviño) + + DecorationStyle: add function to draw fallback window buttons + +2014-01-14 Marco Trevisan (Treviño) + + DecorationStyle: include fallback style classes for supporting old themes + +2014-01-13 Marco Trevisan (Treviño) + + PanelMenuView: draw the buttons and title if a clickable element owns the mouse + + Also improve the logic... + +2014-01-13 Marco Trevisan (Treviño) + + DecorationStyle: use automatic height if not provided a valid value + +2014-01-13 Marco Trevisan (Treviño) + + WindowButtons: always use static_cast, since we're handling private elements it's pretty safe. + +2014-01-13 Marco Trevisan (Treviño) + + WindowButtons: add IsMouseOwner getter + +2014-01-13 Marco Trevisan (Treviño) + + PanelMenuView: use DecorationStyle to draw the panel title + + This allows us to remove a lot of code duplication... + +2014-01-13 Marco Trevisan (Treviño) + + PanelMenuView: don't redraw if title didn't change after a Refresh + +2014-01-13 Marco Trevisan (Treviño) + + PanelMenuView: don't care about decorating/undecorating windows + + This is now handled by the decoration Manager + +2014-01-13 Marco Trevisan (Treviño) + + PluginAdapter: remove unneeded double-assigment + +2014-01-13 Marco Trevisan (Treviño) + + Merging with trunk + +2014-01-13 Marco Trevisan (Treviño) + + XWindowManager: apply text corrections also if the text is marked as XA_STRING but invalid utf-8 + +2014-01-13 Marco Trevisan (Treviño) + + UnityShell: some code cleanup + +2014-01-13 Marco Trevisan (Treviño) + + UnityShell: increase the conflict level with decor plugin, remove it if loaded + +2014-01-13 Marco Trevisan (Treviño) + + UnityShell.xml: update default inactive shadow color + +2014-01-11 Marco Trevisan (Treviño) + + UnityWindow: use DecorationStyle to paint fake decorations as well + + In this way they will match theming completely. + +2014-01-11 Marco Trevisan (Treviño) + + DecorationsManager: use WM's GetStringProperty function to update titles + + This saves us to do unneeded XPropertyGet calls, and now we do only one per each changed property. + +2014-01-11 Marco Trevisan (Treviño) + + WindowManager: merge GetUtf8Property and GetTextProperty into GetStringProperty + + We can only do one blocking call for getting a string property, then we can eventually convert it + in case it's compound text. + +2014-01-09 Marco Trevisan (Treviño) + + DecorationStyle: make fading pixels value themable + +2014-01-09 Marco Trevisan (Treviño) + + DecorationsTitle: fade the title tail when it's longer than available space + +2014-01-09 Marco Trevisan (Treviño) + + DecoratedWindow: set the getter/setter for the title property, as a proxy of the DecorationTitle text value + +2014-01-09 Marco Trevisan (Treviño) + + DecorationsManager: Update the window title when the relevant xproperties change + +2014-01-09 Marco Trevisan (Treviño) + + XWindowManager: initialize atoms and some cleanup + +2014-01-09 Marco Trevisan (Treviño) + + WindowManager: move Atom properties getters in XWindowManager + + And make them public + +2014-01-09 Marco Trevisan (Treviño) + + TestDecorationItem: verify RequestRelayout + +2014-01-09 Marco Trevisan (Treviño) + + DecorationsWidgets: add RequestRelayout protected member + +2014-01-09 Marco Trevisan (Treviño) + + DecorationsWidgets, TexturedItem: don't try to draw a null texture + +2014-01-09 Marco Trevisan (Treviño) + + CompizUtils: add bool operator for SimpleTextureQuad and don't crash on texture member of SimpleTexture + +2014-01-09 Marco Trevisan (Treviño) + + DecorationsTitle: only override SetX to eventually align the text + +2014-01-09 Marco Trevisan (Treviño) + + DecorationsWidgets, Layout: emit geo_parameters_changed after relayouting is done + + Otherwise a child-layout won't be able to be resized by its parent in case it has become + too big. + +2014-01-08 Marco Trevisan (Treviño) + + TestDecorationLayout: verify recursive relayouting from bottom to top + +2014-01-08 Marco Trevisan (Treviño) + + DecorationsWidgets, Layout: emit geo_parameters_changed if geo changed + + This will make it to notify any eventual parent to relayout as well. + (and fixes vertically un-aligned text on some lazy windows such as firefox) + +2014-01-03 Marco Trevisan (Treviño) + + DecoratedWindow: add RWProperty for title + +2014-01-03 Marco Trevisan (Treviño) + + DecoratedWindow: add Title to the window, inside a padded layout + + Finally windows have a title, even if it's static for now. + +2014-01-03 Marco Trevisan (Treviño) + + DecorationsManager: adjust the shadows opacity to match more the previous one + +2014-01-03 Marco Trevisan (Treviño) + + TexturedItem: damage the previous geometry if texture changed size + +2013-12-23 Marco Trevisan (Treviño) + + DecorationsTitle: add simple implementation of TexturedItem for Title + +2013-12-23 Marco Trevisan (Treviño) + + DecorationStyle: add DrawTitle method and TitleIndent value + +2013-12-23 Marco Trevisan (Treviño) + + CompizUtils: avoid some computations if new values are equal to old ones + +2013-12-23 Marco Trevisan (Treviño) + + TestDecorationItem: add GetTopParent tests + +2013-12-23 Marco Trevisan (Treviño) + + DecorationsWidgets: add GetTopParent method + +2013-12-23 Marco Trevisan (Treviño) + + DecorationsWidgets: redefine max, min and clamp_size as constexpr's + +2013-12-23 Marco Trevisan (Treviño) + + DecorationsWidgets: define ContentGeometry virtual function for BasicContainer + + Also add an inline clam_size function to make sure we don't set invalid values. + +2013-12-20 Marco Trevisan (Treviño) + + DecorationStyle: add function to compute the natural size of the Decoration Text + +2013-12-20 Marco Trevisan (Treviño) + + DecoratedWindow: only use the EdgeBorders if a window is resizable, a GrabEdge if movable or nothing + + Loving the DecorationWidgets! :P + +2013-12-20 Marco Trevisan (Treviño) + + DecorationsGrabEdge: if the window doesn't support maximization, just start movement on it + +2013-12-20 Marco Trevisan (Treviño) + + DecorationsEdge: don't set it as sensitive if the window doesn't support the relative action + +2013-12-19 Marco Trevisan (Treviño) + + DecorationsManager: use an unordered_map to track the framed windows + + The map is referenced by the frame xid, in this way we are much faster to find + the parent decoration::Window for each event. Using some magic std::weak_ptr's + not to increas ref counting and not to care much about destroying everything! <3 + +2013-12-19 Marco Trevisan (Treviño) + + DecorationsWindowButton: use SetTexture method, this will get us free relayouting if needed + + Like when the window is very small and the button texture changes, in that case we need + to compute the texture position again. + +2013-12-19 Marco Trevisan (Treviño) + + TexturedItem: add SetTexture method, if the geo changed we also need to relayout + +2013-12-19 Marco Trevisan (Treviño) + + DecorationsWidgets: dont' add an item to Layou if it has already a parent + + Tests included. + +2013-12-19 Marco Trevisan (Treviño) + + TestDecoration{Item,Layout}: add tests for item parent management + +2013-12-19 Marco Trevisan (Treviño) + + DecorationsWidgets: add the concept of Parent to the DecorationItems + + Only a container can be a Parent, and in case visibility or geometry of an item + changes, it notifies the parent. + +2013-12-19 Marco Trevisan (Treviño) + + DecorationsGrabEdge: implement the same click/drag behavior that we have in PanelGrabArea + + Basically when we have a click event we wait 150ms before claming it as a drag action, unless + we don't have a movement before. + +2013-12-19 Marco Trevisan (Treviño) + + DecorationsGrabEdge: add support for Maximization on DoubleClick! + + It might be improved by using the same strategy we have on PanelGrabArea, but it's working well + +2013-12-19 Marco Trevisan (Treviño) + + Decorations: use screen->getCurrentTime() instead of CurrentTime + + It seems that the latter is always 0, so we ask compiz screen for the real one. + +2013-12-19 Marco Trevisan (Treviño) + + DecorationsGrabEdge: add new simple class that implements Edge to specialze the central "edge" + + That is a grab area, actually... + +2013-12-19 Marco Trevisan (Treviño) + + DecorationStyle: add getters for Gtk double click options (max time delta and distance) + +2013-12-19 Marco Trevisan (Treviño) + + DecorationsEdge: reorder the Edge::Type enum to make sure we dispatch events with proper priority + + Added some comments as well + +2013-12-19 Marco Trevisan (Treviño) + + DecorationsEdge: add support for Center edge, and so for the move grab area! + + For now implementing the central grab area as a decoration Edge is the best thing + as the event will be processed using the very same logic... :) + +2013-12-19 Marco Trevisan (Treviño) + + DecorationsDataPool: add shared Edge cursors, so we don't need to recreate them multiple-times + + Move some code from DecorationsEdge that is now semplified + +2013-12-19 Marco Trevisan (Treviño) + + DecorationsWindowButton: remove from the Window::Impl namespace + + It doesn't depend on the Manager anymore, now that we've the TexturePool + +2013-12-19 Marco Trevisan (Treviño) + + DecorationsDataPool: add new singleton-based class for handling shared textures + +2013-12-19 Marco Trevisan (Treviño) + + TestDecorationInputMixer: verify that removal of the InputMixer parent from a children event won't crash it + + This is what happens when pressing the maximize button, as the decoration is immediately deleted + and so the InputMixer. Then we can't continue running it. + +2013-12-19 Marco Trevisan (Treviño) + + DecorationsManager: Just decorate a window if it requested to do so + + If a window sends the _NET_REQUEST_FRAME_EXTENTS atom, then we need to decorate it, + in any case... Otherwise java apps won't get proper absolute geometry as expected. + It's basically a similar fix as the one that was applied on bug #1110138 + +2013-12-19 Marco Trevisan (Treviño) + + DecorationsManager: keep track of the last mouse-owner InputMixer with a weak_ptr + + In this way we can eventually send ButtonRelease events to that mixer + +2013-12-19 Marco Trevisan (Treviño) + + DecorationsEdge: start move/resize event on MouseDown over an edge + + Yay, we can finally resize windows (not move yet) :P + +2013-12-19 Marco Trevisan (Treviño) + + DecoratedWindow: add EdgeBorders + + Even if thery're not sensitive (yet), now each windows show the proper mouse cursor when + the mouse hits the edges! :) + +2013-12-19 Marco Trevisan (Treviño) + + XWindowManager: use compiz cached atoms + +2013-12-18 Marco Trevisan (Treviño) + + DecorationsWindowButton: vertically-unmaximize a window if it was previously maximzied when pressing on Maximize button + + This set the old behavior back. + +2013-12-18 Marco Trevisan (Treviño) + + DecorationsWidgets: add a virtual Relayout method on BasicContainer and call it on geo changed + + So we can remove duplicated data from Layout and DecorationsEdgeBorders + +2013-12-18 Marco Trevisan (Treviño) + + EdgeBorders: add a SimpleContainer that holds DecorationEdge's and disposes them at the edges of the Geometry + + We add edges and at every geometry change we make sure that the Edges are placed in the proper position. + +2013-12-18 Marco Trevisan (Treviño) + + DecorationEdge: add a simple edge class that defines the proper cursor for window on-mouse-over + +2013-12-18 Marco Trevisan (Treviño) + + DecorationsWidgets: fix an ugly Width/Height typo in SetMaxHeight that was causing weird troubles + +2013-12-18 Marco Trevisan (Treviño) + + TestDecorationInputMixer: add Removal test + +2013-12-18 Marco Trevisan (Treviño) + + DecorationsWidgets: use std::deque to define Item::List, it's faster and allow direct access + +2013-12-18 Marco Trevisan (Treviño) + + DecorationStyle: add InputBorder property to style and use it in Window + + Deprecate BorderWidth method. + +2013-12-18 Marco Trevisan (Treviño) + + StandaloneDecorationStyle: fix typos + +2013-12-18 Marco Trevisan (Treviño) + + DecorationsInputMixer: use IsContainer during recursive search and eventually static cast to BasicContainer + +2013-12-18 Marco Trevisan (Treviño) + + DecorationsWidgets: add IsContainer virtual method to item and BasicContainer as layout parent + + This would make casting nicer + +2013-12-18 Marco Trevisan (Treviño) + + DecorationsInputMixer: use a std::weak_ptr to verify validity of last_mouse_owner_ after event triggering + + When relasing the Maximization button, the event callback in WindowButton might cause to destroy + the current InputMixer, and this would lead to a crash when performing the next step, trying to compute + a new mouse owner. By using a weak_ptr we can monitor the deletion of the last_mouse_owner value, and + in that case don't continue with our tasks... + + Now we can safely re-enable the destruction of the input_mixer instance in the DecoratedWindow. + +2013-12-18 Marco Trevisan (Treviño) + + DecoratedWindow: initialize the top_layout focus to match the active status + + Otherwise we'll get unfocused layout when unmaximizing... + +2013-12-18 Marco Trevisan (Treviño) + + DecorationsWindowButton: correctly handle mouse-up events and perform the relative action + + Yay! Windows now can be properly controlled ;) + +2013-12-18 Marco Trevisan (Treviño) + + DecorationsManager: handle Frame events before all the other unity ones + +2013-12-18 Marco Trevisan (Treviño) + + DecoratedWindow: don't grab pointer, or it seems we get duplicated ButtonPress events + +2013-12-18 Marco Trevisan (Treviño) + + DecorationsWidgets: make InputMixer friend class of Item + +2013-12-18 Marco Trevisan (Treviño) + + DecorationsWindowButton: don't damage or update texture if we're switching with the current one. + + Also don't draw a grabbed button as prelighted + +2013-12-18 Marco Trevisan (Treviño) + + DecorationsWindowButton: don't draw as pressed a button when mouse is outside it + +2013-12-18 Marco Trevisan (Treviño) + + TestDecorationInputMixer: add mouse-down grabbing tests + +2013-12-18 Marco Trevisan (Treviño) + + TestDecorationInputMixer: fix button down event, relasing the button after each down + +2013-12-18 Marco Trevisan (Treviño) + + DecorationsWindowButton: add pressed button state + +2013-12-18 Marco Trevisan (Treviño) + + DecorationsInputMixer: don't change the mouse owner if the mouse is pressed, report events to previous owner + +2013-12-18 Marco Trevisan (Treviño) + + DecorationsManager: process frame input events in each windows' InputMixer + +2013-12-18 Marco Trevisan (Treviño) + + DecorationsWindowButton: move definition of Window::Button in external file + + Implement texture update based on real state, now it matches focused and mouse state + +2013-12-17 Marco Trevisan (Treviño) + + TestDecoration{Item, Layout}: add focused tests + +2013-12-17 Marco Trevisan (Treviño) + + DecorationsWidgets: add focused property, layout items will always match the parent + +2013-12-17 Marco Trevisan (Treviño) + + DecoratedWindow: add InputMixer and include the top layout and the frame area on it + + It's mostly an inital work, but finally the button texture updates based on input events. + +2013-12-17 Marco Trevisan (Treviño) + + TestDecorationInputMixer: test other events + +2013-12-17 Marco Trevisan (Treviño) + + TestDecorationInputMixer: add tests for Enter and Motion events + +2013-12-17 Marco Trevisan (Treviño) + + TestDecorationInputMixer: add basic tests + +2013-12-17 Marco Trevisan (Treviño) + + DecorationMockItem: move in a new header file, add mock definitions for event functions + +2013-12-17 Marco Trevisan (Treviño) + + DecorationItem: define std::list as Item::List + +2013-12-17 Marco Trevisan (Treviño) + + TestDecorationItem: verify default property values + +2013-12-17 Marco Trevisan (Treviño) + + DecorationsInputMixer: add new class for handling input events and dispatching them to the proper Item + +2013-12-17 Marco Trevisan (Treviño) + + DecorationsWidgets: add methods for event handling + +2013-12-16 Marco Trevisan (Treviño) + + TestDecorationItem: verify items size after relayouting + +2013-12-16 Marco Trevisan (Treviño) + + DecorationsWidgets: log error if we are into an endless loop when relayouting + +2013-12-16 Marco Trevisan (Treviño) + + TestDecorationLayout: added some layout tests + +2013-12-16 Marco Trevisan (Treviño) + + CompizUtils: define operator<< for CompRect + +2013-12-16 Marco Trevisan (Treviño) + + DecorationsWidgets: make an Item visible by default + +2013-12-16 Marco Trevisan (Treviño) + + TestDecorationItem: verify SetCoords and internal geometry changed signal emission + +2013-12-16 Marco Trevisan (Treviño) + + DecorationsWidgets: add implementation of Geometry method, children might Implement InternalGeo. + +2013-12-16 Marco Trevisan (Treviño) + + DecorationsWidgets: don't allow negative values for Natural Size + +2013-12-16 Marco Trevisan (Treviño) + + TestDecorationWidgets: add TestDecorationItem tests + +2013-12-16 Marco Trevisan (Treviño) + + TestUnityWindowStyle: fix use count computation after api changes. + +2013-12-16 Marco Trevisan (Treviño) + + CMakeLists: include full unity-protocol-private library path in UNITY_STANDALONE_LADD + + So we export correctl the lib/libunity path on executables run path (no need LD_LIBRARY_PATH set anymore). + +2013-12-16 Marco Trevisan (Treviño) + + Decorations: fix pre-compiled headers + +2013-12-16 Marco Trevisan (Treviño) + + Decorations: use find_library to get the compiz composite lib instead of simple LDFLAGS, to make linker to define proper RUNPATH + +2013-12-16 Marco Trevisan (Treviño) + + UnityShared: use find_library to get the compiz opengl lib instead of simple LDFLAGS, to make linker to define proper RUNPATH + +2013-12-16 Marco Trevisan (Treviño) + + Decorations: move to separated library + +2013-12-16 Marco Trevisan (Treviño) + + CompizUtils: move to unity-shared and link in unity-shared-compiz + +2013-12-16 Marco Trevisan (Treviño) + + Decorations: get rid of Unity{Screen,Window} dependency + +2013-12-16 Marco Trevisan (Treviño) + + DecorationsManager: remove the dependency on UnityScreen + + And mostly on UnityWindow... + +2013-12-16 Marco Trevisan (Treviño) + + DecoratedWindow: add first basic WindowButton implementation, and put inside a layout + + We now draw the window buttons, still insensible though. + +2013-12-15 Marco Trevisan (Treviño) + + DecorationStyle: add method to get style padding + +2013-12-15 Marco Trevisan (Treviño) + + DecorationStyle: add border struct, and use it to save border parameters + +2013-12-15 Marco Trevisan (Treviño) + + DecorationsWidgets, Layout: add external padding properties + +2013-12-13 Marco Trevisan (Treviño) + + DecorationsWidgets: use nux::Property for the padding, fix the drawing when resizing + +2013-12-13 Marco Trevisan (Treviño) + + DecorationStyle: return a const& on Get method + +2013-12-13 Marco Trevisan (Treviño) + + DecorationsWidgets: add internal signal to notify when geometry parameters change + + We use it in layout instead of overriding + +2013-12-13 Marco Trevisan (Treviño) + + DecorationsWidgets: use better Item geometry management, simplify layout and TexturedItem + +2013-12-13 Marco Trevisan (Treviño) + + DecorationsWidgets: add a simple basic implementation of compiz-textures based widget system + +2013-12-13 Marco Trevisan (Treviño) + + CompizUtils: add more utility functions and compile guard + +2013-12-11 Marco Trevisan (Treviño) + + UnityWindowStyle: make Get() static method to return a const& + +2013-12-11 Marco Trevisan (Treviño) + + DecorationsManager: load the window button textures on initialization, add private getter + +2013-12-11 Marco Trevisan (Treviño) + + DecorationStyle: add function to get the WindowButton filename + +2013-12-11 Marco Trevisan (Treviño) + + PanelStyle: use DecorationStyle enum definitions + +2013-12-11 Marco Trevisan (Treviño) + + PanelStyle: no need to push/pop cairo groups when painting the background + +2013-12-10 Marco Trevisan (Treviño) + + DecorationsManagerPriv: move to DecorationsPriv.h + +2013-12-10 Marco Trevisan (Treviño) + + DecorationsManager: move Windows code into DecoratedWindow + + Still use DecorationsManagerPriv.h as shared private header + +2013-12-10 Marco Trevisan (Treviño) + + DecorationsManager: cleanup the textures when undecorating + + And some code cleanup as well. + +2013-12-10 Marco Trevisan (Treviño) + + CompizUtils: add SimpleTexture base class and use it in SimpleTextureQuad (it was PixmapTextureQuad) + +2013-12-10 Marco Trevisan (Treviño) + + DecorationsManager: use UpdateDecorationPositionDelayed when the active state of a window changes + +2013-12-10 Marco Trevisan (Treviño) + + DecorationsManagerPriv: Manager is sigc::trackable + +2013-12-10 Marco Trevisan (Treviño) + + UnityWindow: use UpdateDecorationPositionDelayed on {move,resize}Notify + + In this way we don't really do any computation unless we need to draw the window. + +2013-12-10 Marco Trevisan (Treviño) + + DecorationsManager: add UpdateDecorationPositionDelayed method to regenerate textures and matrices at paint time + + This might speed-up window movement and resizing. + +2013-12-10 Marco Trevisan (Treviño) + + DecorationsManager: draw different decoration textures based on the window active status + +2013-12-10 Marco Trevisan (Treviño) + + DecorationsManager: draw decoration textures using DecorationStyle + + Finally we've some sort of really-painted decorations using our gtk styling! :) + +2013-12-10 Marco Trevisan (Treviño) + + CompizUtils: add TextureQuad and PixmapTextureQuad structs + +2013-12-10 Marco Trevisan (Treviño) + + DecorationStyle: add method for drawing a styled side texture canvas + +2013-12-09 Marco Trevisan (Treviño) + + DecorationsManager: use DecorationSyle to define window borders. + +2013-12-09 Marco Trevisan (Treviño) + + DecorationsManager: use correct clip region when painting on transformated output + + Also use std::array instead of an old style vector. + +2013-12-09 Marco Trevisan (Treviño) + + DecorationStyle: add a class to parse and draw the decorations using the provided Gtk Style. + +2013-12-06 Marco Trevisan (Treviño) + + Merging with trunk + +2013-12-03 Marco Trevisan (Treviño) + + DecorationsManager: support different types of shadows for active and inactive windows + + Each window uses a different texture beased on its active or inactive status + +2013-12-03 Marco Trevisan (Treviño) + + Merging with trunk + +2013-11-29 Marco Trevisan (Treviño) + + DecorationsManager: use CompizUtils for texture rendering, remove duplicated code + +2013-11-29 Marco Trevisan (Treviño) + + UnityWindow: use CompizUtils for texture rendering + +2013-11-29 Marco Trevisan (Treviño) + + CompizUtils: add some utilities to handle cairo textures in unity trough compiz + +2013-11-29 Marco Trevisan (Treviño) + + UnityWindow: update the decoration on initial damage + +2013-11-29 Marco Trevisan (Treviño) + + DecorationsManager: Update decoration texture when options change + + This means rebuilding the texture, updating its matrices and damaging + the window extents. + +2013-11-29 Marco Trevisan (Treviño) + + UnityShell: add decoration options to ccsm + + Also define a NuxColorFromCompizColor + +2013-11-29 Marco Trevisan (Treviño) + + DecorationManager: Only update shadow quads when a window changes its geometry + + Also rebuild shadow texture when settings changes + +2013-11-27 Marco Trevisan (Treviño) + + UnityShell: draw the decorations after the window and update window extents + + It's up to the decoration to clip to the window input area. + +2013-11-27 Marco Trevisan (Treviño) + + DecorationsManager: draw shadows around windows! + + Now the manager support some settings for drawing shadows around windows + (most of them a part shaped windows and transparent override-redirect ones). + The shadow texture is built using cairo, basically we draw an angle and then we + blur it. Then we compute four quads and we use compiz to draw the texture there, + stretching and repeating it. + Also we use the shadow regions we computed to calculate the proper OutputExtents, + in this way compiz will consider these areas as part of the window and will damage them. + +2013-11-26 Marco Trevisan (Treviño) + + UnityShell: some cleanups to the glow code + +2013-11-25 Marco Trevisan (Treviño) + + PanelStyle: correctly load themed textures from ~/.local/share/themes + +2013-11-25 Marco Trevisan (Treviño) + + Merge with trunk + +2013-11-22 Marco Trevisan (Treviño) + + UnityShell: create decoration::Window and notify events to them + + In case, through the decoration::Manager... + +2013-11-22 Marco Trevisan (Treviño) + + DecorationManager: add first logic implementation, we finally create frame windows taking events + + Invisible, but... Hey there's something! + +2013-11-21 Marco Trevisan (Treviño) + + Merging with trunk + +2013-11-08 Marco Trevisan (Treviño) + + Merging with trunk + +2013-10-22 Marco Trevisan (Treviño) + + DecorationsManager: handle events and setup atoms, make it friend of UnityScreen + +2013-10-22 Marco Trevisan (Treviño) + + DecorationsManager: add first mock implementation + +2014-01-27 George Karavasilev + + LauncherIcon: always try to use themed icons first, before falling back to UnityTheme. + + Approved by PS Jenkins bot, Marco Trevisan (Treviño). + +2014-01-25 George Karavasilev + + Should make the workspace icon themable by icon themes that have workspace icons that follow the same naming covention as the icons in /usr/share/untiy-icon-theme/apps/48 for the workspace icons. + +2014-01-27 Chris Townsend + + More Unity Autopilot Launcher test fixes: + * When initializing the Launcher tests, check whether the Launcher is available on the monitor being tested. If not, skip the test. Also, move the mouse to the monitor being tested before running the test to make sure the correct Launcher is being tested. + * Skip some Launcher reveal tests since the test is no longer valid due to how Autopilot moves the mouse now. + * Fix drag_icon_to_position method. + * Fix mouse_reveal_launcher method. + + Approved by PS Jenkins bot, Brandon Schaefer. + +2014-01-23 Chris Townsend + + More Unity Autopilot Launcher test fixes: + * When initializing the Launcher tests, check whether the Launcher is available on the monitor being tested. If not, skip the test. Also, move the mouse to the monitor being tested before running the test to make sure the correct Launcher is being tested. + * Skip some Launcher reveal tests since the test is no longer valid due to how Autopilot moves the mouse now. + * Fix drag_icon_to_position method. + * Fix mouse_reveal_launcher method. + +2014-01-23 Chris Townsend + + More Unity Autopilot Launcher test fixes: + * When initializing the Launcher tests, check whether the Launcher is available on the monitor being tested. If not, skip the test. Also, move the mouse to the monitor being tested before running the test to make sure the correct Launcher is being tested. + * Skip some Launcher reveal tests since the test is no longer valid due to how Autopilot moves the mouse now. + * Fix drag_icon_to_position method. + * Fix mouse_reveal_launcher method. + +2014-01-21 Chris Townsend + + Fix more Autopilot tests: + * Base icon center introspection on the current monitor instead of the hardcoded first monitor. + * Fix move_mouse_to_icon AP method to work correctly with multi-monitor. + * Fix some scroll tests for multi-monitor. + * Skip the Launcher only on primary monitor/test Launcher functionality on the second monitor tests since the tests cannot run in this scenario. + + Approved by PS Jenkins bot, Brandon Schaefer. + +2014-01-21 Chris Townsend + + Do not run primary Launcher/secondary monitor scenario for LauncherDragIconsBehavior tests. + +2014-01-21 Chris Townsend + + Fix more Autopilot tests: + * Base icon center introspection on the current monitor instead of the hardcoded first monitor. + * Fix move_mouse_to_icon AP method to work correctly with multi-monitor. + * Fix some scroll tests for multi-monitor. + * Skip the Launcher only on primary monitor/test Launcher functionality on the second monitor tests since the tests cannot run in this scenario. + +2014-01-17 Brandon Schaefer + + Refactor EMConverter API. Now all thats needed is int ConvertPixels(int pixel); This will calculate the correct pixel size based on the DPI and font size. + + Approved by Marco Trevisan (Treviño), Christopher Townsend, PS Jenkins bot. + +2014-01-17 Brandon Schaefer + + * Refactor the EMConverter API. + * Really all thats needed is ConvertPixels(int pixels). This takes in a + pixel value, and calculates what the real pixel value should be based + on the DPI and font size. + + * Just need to set the DPI and font size. + +2014-01-15 Chris Townsend + + Removed the ZeitgeistUtils.h as this is no longer needed since Zeitgeist in main is now fixed. + + Approved by PS Jenkins bot, Marco Trevisan (Treviño). + +2014-01-15 Chris Townsend + + Removed the ZeitgeistUtils.h as this is no longer needed since Zeitgeist in main is now fixed. + +2014-01-14 Chris Townsend + + Add back in vertical/horizontal maximized introspection objects since some Autopilot tests need them. + + Approved by PS Jenkins bot, Brandon Schaefer. + +2014-01-14 Chris Townsend + + Add back in vertical/horizontal maximzed introspection objects since some Autopilot tests need them. + +2014-01-14 Brandon Schaefer + + Implement an EMConveter. This way with default settings such that DPI = 96.0f, and font_size = system font size. We can get the correct EM value for any pixel size. Once we have the correct EM value for any pixel size, the DPI value can be adjusted to the current logical one. From here, you can now get the correct pixel size based from of the EM value for the logical DPI of the screen. + + Approved by Christopher Townsend, PS Jenkins bot. + +2014-01-13 Brandon Schaefer + + * Add some more tests. + * Don't case a const double to a float, it just gets casted back to a double! + +2014-01-13 Brandon Schaefer + + * Don't default the font size value + +2014-01-13 Brandon Schaefer + + * Add EMConverter, take moslty from Nux/EMMetrics. We don't + depend on X11, as we don't want to depend on the physical DPI. + + * Add some basic unit tests. + +2014-01-13 Chris Townsend + + Fixes most Launcher based Autopilot tests due to the new object list sorting in xpathselect1.4. + + Approved by PS Jenkins bot, Brandon Schaefer. + +2014-01-13 Chris Townsend + + Fixes most Launcher based Autopilot tests due to the new object list sorting in xpathselect1.4. + +2014-01-13 Chris Townsend + + Add missing Python module declarations for multi-monitor setups. Fixes some AP test failures. + + Approved by PS Jenkins bot, Brandon Schaefer. + +2014-01-13 Chris Townsend + + Add missing Python module declarations for multi-monitor setups. + +2014-01-10 Chris Townsend + + When using the mouse scrollwheel on inactive Launcher icons with unfocused windows, the unfocused window should not be focused. Fixes: https://bugs.launchpad.net/bugs/1267888. + + Approved by PS Jenkins bot, Brandon Schaefer. + +2014-01-10 Chris Townsend + + When using the mouse scrollwheel on inactive Launcher icons with unfocused windows, the unfocused window should not be focused. + +2014-01-10 Chris Townsend + + Fixes issue where a user places the mouse over a Launcher icon that has one unfocused window and then scrolls with the scroll wheel would focus that application when it should not according to Design. Fixes: https://bugs.launchpad.net/bugs/1263786. + + Approved by PS Jenkins bot, Brandon Schaefer. + +2014-01-09 Chris Townsend + + Fixes issue where a user places the mouse over a Launcher icon that has one unfocused window and then scrolls with the scroll wheel would focus that application when it should not according to Design. + +2014-01-10 Brandon Schaefer + + Do not open the dash/hud on a monitor with a top most window that is fullscreen. Fixes: https://bugs.launchpad.net/bugs/1267210. + + Approved by Christopher Townsend, PS Jenkins bot. + +2014-01-09 Brandon Schaefer + + * Add test for dash/hud multi monitor. + +2014-01-08 Brandon Schaefer + + * Added function to StandaloneWM, as we need the function in WM. + Not sure how easy/if possible in the StandaloneWM, so left as a TODO. + + * Added tests + +2014-01-08 Brandon Schaefer + + * Make sure we don't open the dash/hud on a monitor if the top most window on + it is fullscreen. + +2014-01-10 Chris Townsend + + Add mesa-utils dependency to the unity-autopilot package since some of the autopilot tests use glxinfo to gather information. Fixes: https://bugs.launchpad.net/bugs/1267902. + + Approved by PS Jenkins bot, Stephen M. Webb. + +2014-01-10 Chris Townsend + + Add mesa-utils dependency to the unity-autopilot package since some of the autopilot tests use glxinfo to gather information. + +2014-01-09 Chris Townsend + + * If the Dash or Hud is opened when entering Show Desktop, ensure they are closed. + * Added some Autopilot tests for this condition. Fixes: https://bugs.launchpad.net/bugs/961890. + + Approved by PS Jenkins bot, Brandon Schaefer. + +2014-01-09 Chris Townsend + + If the Dash or Hud is opened when entering Show Desktop, ensure they are closed. + Added some Autopilot tests for this condition. + +2014-01-08 Ken VanDine + + Sync changes uploaded to the archive back to trunk + . + + Approved by PS Jenkins bot, Christopher Townsend. + +2014-01-07 Ken VanDine + + * Disable errors upon deprecated-warnings. + * No change rebuild against nux with libglew1.10. + +2014-01-08 Marco Trevisan (Treviño) + + IntrospectionData: use forward declaration for nux classes, add support to glib::Variant + + We don't need to repeat the inclusion everywhere we want debug introspection. + This allows also to add glib::Variant adder without the need of any other cast. + + Approved by PS Jenkins bot, Brandon Schaefer. + +2014-01-08 Marco Trevisan (Treviño) + + TestIntrospectionData: verify glib::Variant introspection + +2014-01-08 Marco Trevisan (Treviño) + + TestIntrospectionData: add missing includes + +2014-01-03 Marco Trevisan (Treviño) + + Launcher: don't cast anymore glib::Variant's to GVariant*'s in introspection data. + + We've a new adder now! + +2014-01-03 Marco Trevisan (Treviño) + + IntrospectionData: use forward declaration for nux classes, add support to glib::Variant + + We don't need to repeat the inclusion everywhere we want debug introspection. + This allows also to add glib::Variant adder without the need of any other cast. + +2014-01-06 Brandon Schaefer + + Adds Super+L to lock the screen, while keeping the older shortcut around in g-s-d (Ctrl+Alt+L). Fixes: https://bugs.launchpad.net/bugs/830709. + + Approved by PS Jenkins bot, Christopher Townsend. + +2014-01-06 Brandon Schaefer + + * Add a shortcut that will lock the screen with Super+L. While + preserving the old shortcut Ctrl+Alt+L. + +2014-01-03 Brandon Schaefer + + Bump to new libnux from this branch: + https://code.launchpad.net/~brandontschaefer/nux/xim-preedit-support. + + Approved by PS Jenkins bot, Christopher Townsend. + +2014-01-03 Brandon Schaefer + + * Ignore checking if ibus is running, as we already check if gcin is active + +2014-01-03 Brandon Schaefer + + * Dam you comma + +2014-01-03 Brandon Schaefer + + * Bump nux to 4.0.5 + +2014-01-02 Brandon Schaefer + + * Add the comma + +2014-01-02 Brandon Schaefer + + * Bump to new libnux from this branch: + https://code.launchpad.net/~brandontschaefer/nux/xim-preedit-support + +2014-01-03 Chris Townsend + + When hiding the Dash & Hud views, zero out the geometry and update the blur background size. This fixes the issue where the blur background wouldn't be updated when using static blur on subsequent opens of the Dash and Hud. Fixes: https://bugs.launchpad.net/bugs/834777. + + Approved by PS Jenkins bot, Marco Trevisan (Treviño). + +2013-12-17 Chris Townsend + + Add logic to only zero out the geometry is the blur type is static. + +2013-12-13 Chris Townsend + + When hiding the Dash & Hud views, zero out the geometry and update the blur background size. This fixes the issue where the blur background wouldn't be updated when using static blur on subsequent opens of the Dash and Hud. + +2014-01-03 Chris Townsend + + Always set the interval timer to 0 when starting a new urgent animation timer. Fixes: https://bugs.launchpad.net/bugs/1263775. + + Approved by Marco Trevisan (Treviño), PS Jenkins bot. + +2013-12-23 Chris Townsend + + Add new unit test to test the condition for this bug. + +2013-12-23 Chris Townsend + + Always set the interval timer to 0 when starting a new urgent animation timer. + +2013-12-21 Chris Townsend + + Due to a change in xpathselect1.4, this fixes a sorting issue of Switcher icons for AP tests. Fixes: https://bugs.launchpad.net/bugs/1244704. + + Approved by PS Jenkins bot, Brandon Schaefer. + +2013-12-11 Chris Townsend + + Due to a change in xpathselect1.4, this fixes a sorting issue of Switcher icons for AP tests. + +2013-12-21 Chris Townsend + + Fix a bunch of failing AP tests due to changes in Unity. Fixes: https://bugs.launchpad.net/bugs/1244704. + + Approved by PS Jenkins bot, Brandon Schaefer. + +2013-12-11 Chris Townsend + + Fix a bunch of failing AP tests due to changes in Unity. + +2013-12-21 Chris Townsend + + Fix compile error due to deprecated gtk_widget_get_state() function. Fixes: https://bugs.launchpad.net/bugs/1173219. + + Approved by PS Jenkins bot, Eleni Maria Stea, Marco Trevisan (Treviño), Brandon Schaefer. + +2013-12-11 Chris Townsend + + Fix compile error due to depricated gtk_widget_get_state() function. + +2013-12-09 Chris Townsend + + Re-enable Quicklist and Tooltip active blurring since it was removed due to the performance merge. Fixes: https://bugs.launchpad.net/bugs/1253740. + + Approved by Marco Trevisan (Treviño), PS Jenkins bot. + +2013-12-04 Chris Townsend + + Use CompRectFromNuxGeo() when getting the view region geometry. + +2013-12-03 Chris Townsend + + Re-enable Quicklist and Tooltip active blurring since it was removed due to the performance merge. + +2013-12-06 Chris Townsend + + * Revert most of lp:unity revno. 3509 as the Compiz Grid plugin is a better place to handle the Ctrl-Super-Left/Right shortcuts. + * Expanded autopilot test to check for correct window placement when semi-maximizing and restoring. Fixes: https://bugs.launchpad.net/bugs/1251777. + + Approved by Marco Trevisan (Treviño), PS Jenkins bot. + +2013-12-04 Chris Townsend + + * Revert most of lp:unity revno. 3509 as the Compiz Grid plugin is a better place to handle the Ctrl-Super-Left/Right shortcuts. + * Expanded autopilot test to check for correct window placement when semi-maximizing and restoring. + +2013-12-03 Chris Townsend + + Add some introspection vector variables to account for per-monitor icon quirks to fix some failing Hud AP tests. Fixes: https://bugs.launchpad.net/bugs/1244704. + + Approved by PS Jenkins bot, Brandon Schaefer. + +2013-12-03 Chris Townsend + + Merge lp:unity. + +2013-11-27 Chris Townsend + + Fix another AP test. + +2013-11-27 Chris Townsend + + Add more introspection vectors for per-monitor icons and fix up some AP tests. + +2013-11-27 Chris Townsend + + Need to add some introspection vector variables to account for per-monitor icon quirks to fix some failing Hud AP tests. + +2013-12-02 Chris Townsend + + Use IsVisibleOnMonitor() instead of IsVisible() for checking to close the Hud when clicking the Hud icon. This is due to the icon's quirk only being set for the current monitor. Fixes: https://bugs.launchpad.net/bugs/1255241. + + Approved by PS Jenkins bot, Eleni Maria Stea. + +2013-11-27 Chris Townsend + + Change local overlay_monitor vars to the overlay_monitor_ member vars. + +2013-11-26 Chris Townsend + + Use IsVisibleOnMonitor() instead of IsVisible() for checking to close the Hud when clicking the Hud icon. This is due to the icon's quirk only being set for the current monitor. + +2013-12-02 Chris Townsend + + Bump the Unity glib build dependency version. + + Approved by PS Jenkins bot, Brandon Schaefer. + +2013-12-02 Chris Townsend + + Bump Unity libglib version build dependency to 2.39.1. + +2013-12-02 William Hua + + Replace deprecated g_settings_list_schemas with g_settings_schema_source_list_schemas. + + Approved by PS Jenkins bot, Christopher Townsend. + +2013-11-29 William Hua + + Replace deprecated g_settings_list_schemas with g_settings_schema_source_list_schemas. + +2013-11-21 Marco Trevisan (Treviño) + + {Dash,Hud}Controller: unset the keyfocus area only if one of their children has the focus + + Otherwise we could steal the focus to another view (such as the Alt+Tab switcher). Fixes: https://bugs.launchpad.net/bugs/1252760. + + Approved by PS Jenkins bot, Brandon Schaefer. + +2013-11-20 Marco Trevisan (Treviño) + + BackgroundEffectHelper: add new constructor that allows to define owner immediately + + And use it in Panel, UnityWindowView and Launcher + +2013-11-19 Marco Trevisan (Treviño) + + Merging with lp:~3v1n0/unity/switcher-animator + +2013-11-19 Marco Trevisan (Treviño) + + SwitcherOverlaysInteractionTests: verify the normal behavior when opening the switcher after an overlay + +2013-11-19 Marco Trevisan (Treviño) + + autopilot, SwitcherInteractionTests: add new interaction tests with shell overlays + + And verify that key binding works when opening the switcher after an overlay + +2013-11-19 Marco Trevisan (Treviño) + + {Dash,Hud}Controller: unset the keyfocus area only if one of their children has the focus + + Otherwise we could steal the focus to another view (such as the Alt+Tab switcher) + +2013-11-21 Marco Trevisan (Treviño) + + SwitcherView: define a custom GeometryGetterFunc and notify helper on changes + + Thanks to this the switcher won't make BackgroundEffectHelper to create a blurred + area as big as the current monitor (with just a small padding), but an area big enough + to draw its background. This get updated automagically when the switcher view + changes its geometry... + + Also, use nux::AnimateValue for switcher animations, making compiz to orchestrate it + and only redraw the view if an icon changed since the last progress iteration. + + We don't want the switcher to be drawn unless its geometry or an icon changes. + Also we don't want to redraw the switcher multiple times if only a not-animated parameter + of an icon (such as a pip or the selection glow) has changed. + As bonus, reduce lots of list copies. + + Approved by Christopher Townsend, PS Jenkins bot. + +2013-11-21 Marco Trevisan (Treviño) + + SwitcherView: update once the blur geometry ony when the view is resized + + Basically as soon the switcher grows, we inform BackgroundEffectHelper + to generate a new big texture (as big as the maximum size that the switcher + will reach), once restored to non-detail mode, we set the texture size back + to the normal value. + +2013-11-21 Marco Trevisan (Treviño) + + UnityWindowView: add the ability to override the blurred-background area size + + By default that's the same of the BackgroundGeometry, but other clients (ehm, switcher, + ehm...) might need custom setups. + +2013-11-19 Marco Trevisan (Treviño) + + SwitcherView: only redraw the view if an icon changed since the last progress iteration + + We don't want the switcher to be changed unless its geometry or an icon changes. + Also we don't want to redraw the switcher multiple times if only a not-animated parameter + of an icon (such as a pip or the selection glow) has changed. + + As bonus, reduce lots of list copies. + +2013-11-19 Marco Trevisan (Treviño) + + TestSwitcher{Controller,View}: update to match new implementation + +2013-11-19 Marco Trevisan (Treviño) + + AbstractIconRenderer: implement operator== and operator!= + +2013-11-19 Marco Trevisan (Treviño) + + SwitcherView: remove unneeded animate property + +2013-11-19 Marco Trevisan (Treviño) + + Merging again with lp:~unity-team/unity/blur-region + +2013-11-19 Marco Trevisan (Treviño) + + Merging with lp:~unity-team/unity/blur-region + +2013-11-19 Marco Trevisan (Treviño) + + SwitcherView: define a custom GeometryGetterFunc and notify helper on changes + + Thanks to this the switcher won't make BackgroundEffectHelper to create a blurred + area as big as the current monitor (with just a small padding), but an area big enough + to draw its background. This get updated automagically when the switcher view + changes its geometry... + +2013-11-19 Marco Trevisan (Treviño) + + BackgroundEffectHelper: allow children to define a custom BackgroundEffectHelper::GeometryGetterFunc + + This is mostly needed by the switcher. Also remove the unneeded offsets when painting the blurred bg. + +2013-11-19 Marco Trevisan (Treviño) + + SwitcherView: use a nux::AnimateValue to animate the switcher layout + + Thanks to this all the computation happens before drawing and only + when compiz wants. + +2013-11-20 Marco Trevisan (Treviño) + + BackgroundEffectHelper: Specify the required blur area before drawing so selectively copy it at paint time + + This means that we don't have to waste fragment bandwidth copying the entire backbuffer when we could just do parts of it. + + Now BackgroundEffectHelper listens to windows and views geometry changes and updates + a list of blurred regions that might be copied to the backup texture at every repaint + that affects them. This avoids to copy large regions (especially when using big resolutions or multiple monitors), but only the ones we really need to blur. + + Approved by PS Jenkins bot, Eleni Maria Stea, Christopher Townsend. + +2013-11-19 Marco Trevisan (Treviño) + + StandaloneSwitcher: fix compilation with new BG Handler + +2013-11-19 Marco Trevisan (Treviño) + + Merging with trunk + +2013-11-19 Marco Trevisan (Treviño) + + BackgroundEffectHelper: Set radius to 0 when using no blur, some cleanup + +2013-11-19 Marco Trevisan (Treviño) + + SwitcherView: resize switcher view in PreLayoutManagement + +2013-11-18 Marco Trevisan (Treviño) + + BackgroundEffectHelper: keep a cached version of blur geometries + + Now the blurred geometries are saved in a list that gets updated only + when they change, this allows to reduce a lot the cost of GetBlurGeometries + that now only returns a const reference of the actual vector. + + Improved also HasEnabledHelpers (no helper can be registered if it's not enabled). + +2013-11-18 Marco Trevisan (Treviño) + + OverlayRenderer: remove debug data + +2013-11-18 Marco Trevisan (Treviño) + + HudView: set blur background size whenever the content size changes or this will happen at draw time + + And this is something we don't want not to be late on copying the current backbuffer + +2013-11-18 Marco Trevisan (Treviño) + + OverlayRenderer: update the blur region before drawing, otherwise we'll get a lag + + We need to update BackgroundEffectHelper about the new blurred regions + before drawing, otherwise compiz will copy the wrong area to the backbuffer + and as result we'll get a corrupted blurred image as background. + +2013-11-16 Marco Trevisan (Treviño) + + UnityScreen: correctly translate the x coords to gl coords when copying the backbuffer + +2013-11-16 Marco Trevisan (Treviño) + + SwitcherController: Use expand to generate the maximum View size + +2013-11-16 Marco Trevisan (Treviño) + + BackgroundEffectHelper: connect to owner geometry changes to update the requested blur geo + + Now BGHelper clients doesn't need to do this manually: as soon as they register with the helper, + it connects to owner's geometry changes. Each owner can also provide a custom function for + defining another blur region instead of its absolute geometry (mostly needed by the dash). + +2013-11-15 Marco Trevisan (Treviño) + + BackgroundEffectHelper: only register helpers if an owner is set + + Plus some code cleanup, remove some unused properties and move + others to static consts. + +2013-11-15 Marco Trevisan (Treviño) + + UnityScreen: translate the output geometry before intersecting with the blur geo + + Othewise if we have monitors smaller than the screen height we'd copy the + wrong part of the backup texture to be blurred. + +2013-11-15 Marco Trevisan (Treviño) + + UnityShell: some code cleanup + +2013-11-15 Marco Trevisan (Treviño) + + PanelView: use parent geometry + + We need to use the parent absolute geo, not the view one. + +2013-11-14 Marco Trevisan (Treviño) + + BackgroundEffectHelper: use GetExpand for computing the blurred area + + Also factorize the BlurSigma and BlurRadius computation + +2013-11-14 Marco Trevisan (Treviño) + + Merging with lp:~3v1n0/unity/gl-bottleneck-fix + +2013-07-22 Sam Spilsbury + + Merge lp:unity + +2013-06-27 Sam Spilsbury + + Merge lp:unity + +2013-06-15 Sam Spilsbury + + Cleanup + +2013-06-11 Sam Spilsbury + + Remove duplicate variable declaration + +2013-06-11 Sam Spilsbury + + Merge lp:unity + +2013-06-07 Sam Spilsbury + + Merge trunk + +2013-05-26 Sam Spilsbury + + Merge lp:~smspillaz/unity/unity.fix_1080947.3 + +2013-03-31 Sam Spilsbury + + Specify the required blur area before drawing so that we can selectively use glCopyTexSubImage2D. + + This required the construction of some of the views to be re-thought-out, eg + because GetAbsoluteGeometry depends on the parent window geometry we need + to construct that first and then pass it to the view so we can listen to + the signals on the BaseWindow object + +2013-03-31 Sam Spilsbury + + Revert + +2013-03-30 Sam Spilsbury + + Unrevert + +2013-11-20 Marco Trevisan (Treviño) + + DebugDBusInterface: add local::xpathselect::NodeSelector to use the dloaded lib. + + Approved by PS Jenkins bot, Brandon Schaefer. + +2013-11-20 Marco Trevisan (Treviño) + + IntrospectionData: use a template-based internal function to add a SIMPLE type value + +2013-11-20 Marco Trevisan (Treviño) + + IntrospectionData: add missing returns + +2013-11-20 Marco Trevisan (Treviño) + + IntrospectionData: Use Variant to initialize also 32 bits data + +2013-11-19 Marco Trevisan (Treviño) + + A new merge with lp:~3v1n0/unity/ap1.4-introspection-cleanup + +2013-11-19 Marco Trevisan (Treviño) + + Merging again with lp:~3v1n0/unity/ap1.4-introspection-cleanup + +2013-11-19 Marco Trevisan (Treviño) + + Merging with lp:~3v1n0/unity/ap1.4-introspection-cleanup + +2013-11-14 Marco Trevisan (Treviño) + + Merging with lp:~3v1n0/unity/ap1.4-introspection-cleanup + +2013-09-19 Marco Trevisan (Treviño) + + Merging with lp:~3v1n0/unity/ap1.4-introspection-cleanup + +2013-09-19 Marco Trevisan (Treviño) + + DashController: try to own the unity dbus name + +2013-09-19 Marco Trevisan (Treviño) + + DebugDBusInterface: add local::xpathselect::NodeSelector struct to dynamically load and call the lib + +2013-09-19 Marco Trevisan (Treviño) + + DebugDBusInterface: use a pimpl instead of static data + +2013-09-19 Marco Trevisan (Treviño) + + IntrospectionData: use glib::Variant::FromVector to build the values list + +2013-11-20 Marco Trevisan (Treviño) + + Introspectable: use IntrospectionData class for collecting data from children + + Now each introspectable object is called with an IntrospectionData parameter and calling one of its methods it's the only way to fill introspection data into unity. + As bonus point, remove all the unneeded UnityCore/Variant.cpp inclusions. Fixes: https://bugs.launchpad.net/bugs/1227131. + + Approved by PS Jenkins bot. + +2013-11-19 Marco Trevisan (Treviño) + + IntrospectionData: add definition for long in 32bit platforms + +2013-11-19 Marco Trevisan (Treviño) + + Variant: add definitions with (unsigned) long in 32 bit platforms + +2013-11-19 Marco Trevisan (Treviño) + + IntrospectionData: add missing parameter + +2013-11-19 Marco Trevisan (Treviño) + + IntrospectionData: add definition for unsigned long if not on 64 bits + + As it is used by Window type on these platforms + +2013-11-19 Marco Trevisan (Treviño) + + ScopeBar: made more clear the type we're iterating + +2013-11-19 Marco Trevisan (Treviño) + + Merge with trunk + +2013-11-14 Marco Trevisan (Treviño) + + LauncherIcon, autopilot: introspect nux::Point3 directly, remove unneeded duplications. + +2013-11-14 Marco Trevisan (Treviño) + + IntrospectionData: add support for nux::Point3 + +2013-11-14 Marco Trevisan (Treviño) + + GLibDBus{Proxy,Server}: use variant's operator << for debugging... + +2013-11-14 Marco Trevisan (Treviño) + + Variant: implement operator << + + Also for GVariant* + +2013-11-14 Marco Trevisan (Treviño) + + TestGLibVariant: verify FromVector with an empty vector + + It was causing glib errors before (and potential crashes) + +2013-11-14 Marco Trevisan (Treviño) + + Variant: make Variant::FromVector to work without errors in case of empty arrays + +2013-11-14 Marco Trevisan (Treviño) + + Merge with trunk + +2013-09-19 Marco Trevisan (Treviño) + + Merging with trunk + +2013-09-19 Marco Trevisan (Treviño) + + Merging with lp:~3v1n0/unity/ap1.4-introspection-cleanup + +2013-09-19 Marco Trevisan (Treviño) + + launcher: Use Variant::FromVector to generate values + +2013-09-19 Marco Trevisan (Treviño) + + TestGLibVariant: verify FromVector + +2013-09-19 Marco Trevisan (Treviño) + + Variant: add FromVector static constructor + + It would have been nice to use a real constructor with templates, but they need to be applied everything then + +2013-09-19 Marco Trevisan (Treviño) + + Introspectable: use IntrospectionData class for collecting data from children + + Now each introspectable object is called with an IntrospectionData parameter and calling one + of its methods it's the only way to fill introspection data into unity. + As bonus point, remove all the unneeded UnityCore/Variant.cpp inclusions. + +2013-09-19 Marco Trevisan (Treviño) + + TestIntrospectionData: add new tests for IntrospectionData + +2013-09-19 Marco Trevisan (Treviño) + + IntrospectionData: add new class for collecting introspection informations + + This is going to be used to collect the introspection data for every Introspectable object, + without any direct inclusion of glib::Variant and making impossible for the clients to use + an invalid syntax. + +2013-11-18 Eleni Maria Stea + + adds virtual destructors to classes with virtual methods to prevent memory leaks - ABI break. + + Approved by Christopher Townsend, PS Jenkins bot. + +2013-11-08 Eleni Maria Stea + + fixed error in destructor definition + +2013-11-08 Eleni Maria Stea + + merged to trunk + +2013-11-08 Eleni Maria Stea + + temporal remove of v. destr + +2013-11-06 Eleni Maria Stea + + added virtual destructors in classes that have virtual methods + to prevent future memory leaks + +2013-11-17 Marco Trevisan (Treviño) + + Unity: always prefer passing [this] to lambdas than [&]. + + Approved by PS Jenkins bot, Andrea Azzarone. + +2013-11-17 Marco Trevisan (Treviño) + + Fix compilation of unity-mt-grab-handles + +2013-11-14 Marco Trevisan (Treviño) + + Unity: always prefer passing [this] to lambdas than [&] + +2013-11-17 Andrea Azzarone + + Alt-Tab, shutdown dialog and shortcut overlay should not be transparent in Low GFX Mode. Fixes: https://bugs.launchpad.net/bugs/1170508. + + Approved by PS Jenkins bot, Marco Trevisan (Treviño), Christopher Townsend. + +2013-11-12 Andrea Azzarone + + Fix indentation. + +2013-11-11 Andrea Azzarone + + Remove unwanted empty line. + +2013-11-11 Andrea Azzarone + + Fix build issue on ARM. + +2013-11-07 Andrea Azzarone + + Merge lp:unity trunk. + +2013-11-07 Andrea Azzarone + + Merge with lp:unity + +2013-11-06 Andrea Azzarone + + Alt-Tab, shutdown dialog and shortcut overlay should not be transparent in Low GFX Mode. + +2013-11-17 Chris Townsend + + In low graphics mode, only draw the Launcher background as needed instead of all of the time, even if the Launcher is hidden. Fixes: https://bugs.launchpad.net/bugs/1179210. + + Approved by Marco Trevisan (Treviño), PS Jenkins bot. + +2013-11-07 Chris Townsend + + In low graphics mode, only draw the Launcher background as needed instead of all of the time, even if the Launcher is hidden. + +2013-11-17 Marco Trevisan (Treviño) + + UnityScreen: remove the useless and expensive gl{Push,Pop}Attrib calls + + For some reasons this code was copied by the opengl plugin as a workaround + to fix the state of our screen after that nux has drawn. + Actually this is not needed, the only thing we really need to do is to fix the + current Viewport, because nux seems to leave it in a bad state which would + lead to flickering menus, fullscreen windows, tooltip and missing windows + thumbnails in switcher. + + Thanks to Sam Spilsbury for his precious support. Fixes: https://bugs.launchpad.net/bugs/1251275. + + Approved by PS Jenkins bot, Eleni Maria Stea, Andrea Azzarone. + +2013-11-14 Marco Trevisan (Treviño) + + PanelController: cache the panel geometries in the controller + + We use these values very often in UnityShell and all these calls + seems to be not much very loved by callgrind... + +2013-11-14 Marco Trevisan (Treviño) + + UnityShell: remove the useless call to GetPresentationListGeometries in glPaintTransformedOutput + +2013-11-14 Marco Trevisan (Treviño) + + UnityShell: initialize panel geometries vector outside the loop + +2013-11-14 Marco Trevisan (Treviño) + + UnityScreen: indentation fix + +2013-11-14 Marco Trevisan (Treviño) + + UnityScreen: remove the useless and expensive gl{Push,Pop}Attrib calls + + For some reasons this code was copied by the opengl plugin as a workaround + to fix the state of our screen after that nux has drawn. + Actually this is not needed, the only thing we really need to do is to fix the + current Viewport, because nux seems to leave it in a bad state which would + lead to flickering menus, fullscreen windows, tooltip and missing windows + thumbnails in switcher. + + Thanks to Sam Spilsbury for his precious support. + +2013-11-08 Marco Trevisan (Treviño) + + Convert compiz regions / rects to nux::Geometry's and back easily. + + Approved by PS Jenkins bot, Christopher Townsend. + +2013-11-01 Marco Trevisan (Treviño) + + UnityShell: just verify wether the dirty areas hit the panel in a single loop + +2013-11-01 Marco Trevisan (Treviño) + + UnityShell: add and use CompRectFromNuxGeo as well + +2013-11-01 Marco Trevisan (Treviño) + + UnityShell: some code cleanup, add functions to convert CompRect <-> nux::Geometry + +2013-11-07 Sam Spilsbury + + Don't re-present all of our windows on every frame. Only do that if damage intersects it. + + Use the new APIs exposed by compiz and nux to intelligently determine which windows need to be presented per-frame and only register damage for those windows. This fixes two things: + + 1. BaseWindows being redrawn from scratch every time damage was registered over them. That was incorrect and should only be done in the case of background blurs. + 2. BaseWindows being drawn to the screen on every frame, regardless of whether or not they needed to be. Now they will only be drawn if some damage intersects beneath them. Note that unity will expand the damage region to accomadate the base window since nux does not support geometry clipping. So if there is a partial intersection of the launcher for example, the area of the screen which contains the launcher will be re-painted (but the launcher itself won't be redrawn, just its texture) + + (LP: #1080947). Fixes: https://bugs.launchpad.net/bugs/1080947. + + Approved by PS Jenkins bot, Stephen M. Webb, Christopher Townsend, Brandon Schaefer. + +2013-11-07 Chris Townsend + + Initialize variables to 0 since the compiler for armhf seems to not understand the #ifdef block and throws a "variable is uninitialized" error. + +2013-11-07 Chris Townsend + + Account for unused variables for armhf builds. + +2013-11-07 Chris Townsend + + Merge in lp:unity. + +2013-11-05 Chris Townsend + + Change package depends on Compiz version 0.9.11. + +2013-10-31 Marco Trevisan (Treviño) + + BackgroundEffectHelper: use IsIntersecting + +2013-10-31 Marco Trevisan (Treviño) + + LauncherController: better lambdas + +2013-10-30 Marco Trevisan (Treviño) + + UnityScreen: use new ForEachBaseWindow + +2013-10-30 Marco Trevisan (Treviño) + + Unity: use IsIntersecting when possible + +2013-10-30 Chris Townsend + + Merge lp:unity. + +2013-10-30 Chris Townsend + + Remove reference to variable in the call to RenderInterfaceFromForeignCmd(). + +2013-10-30 Chris Townsend + + Update the Nux version to depend on due to Nux ABI change. + +2013-10-29 Chris Townsend + + Remove redraw_view_if_damaged/NeedSoftRedraw() combo as it's no longer needed due to the changes introduced for performance. + +2013-10-29 Chris Townsend + + Merge lp:unity. + +2013-07-22 Sam Spilsbury + + Merge lp:unity + +2013-06-27 Sam Spilsbury + + Merge lp:unity + +2013-06-15 Sam Spilsbury + + Cleanup, remove duplicate calls to QueueDraw + +2013-06-15 Sam Spilsbury + + Merge lp:unity{ + +2013-06-07 Sam Spilsbury + + Merge trunk + +2013-05-26 Sam Spilsbury + + Remove extra free + +2013-05-26 Sam Spilsbury + + Merge lp:~smspillaz/unity/unity.fix_1080947.2 + +2013-05-21 Sam Spilsbury + + Merge lp:unity + +2013-05-21 Sam Spilsbury + + Revert 3273 + +2013-05-17 Sam Spilsbury + + Merge lp:~smspillaz/unity/unity.fix_1180790 + +2013-05-17 Sam Spilsbury + + Added GtkUtil.h + +2013-05-17 Sam Spilsbury + + Use an ifdef to pick the free method. + + Unreferencing a GtkIconInfo is broken in gtk versions < 3.8, but using + gtk_icon_info_free is deprecated in >= 3.8 . So provide a new function + gtk::UnreferenceIconInfo with an ifdef to pick the right method and do that. + + GtkUtilDeathTest::NoDeathOnUnreference added to verify that. + +2013-05-16 Sam Spilsbury + + Merge lp:~smspillaz/unity/unity.fix_1180790 + +2013-05-16 Sam Spilsbury + + Use gtk_icon_info_free instead of g_object_unref + + GtkIconInfo is not a GObject, and callers are meant to free it with + gtk_icon_info_unref according to the documentation for it: + + GtkIconInfo * gtk_icon_theme_lookup_icon (GtkIconTheme *icon_theme, + const gchar *icon_name, + gint size, + GtkIconLookupFlags flags); + Looks up a named icon and returns a structure containing information such + as the filename of the icon. The icon can then be rendered into a pixbuf + using gtk_icon_info_load_icon(). (gtk_icon_theme_load_icon() combines + these two steps if all you need is the pixbuf.) + + ... + + Returns : + a GtkIconInfo structure containing information about the icon, or NULL if + the icon wasn't found. Free with gtk_icon_info_free() + + + (LP: #1180790) + +2013-05-16 Sam Spilsbury + + Merge lp:unity + +2013-05-16 Sam Spilsbury + + Revert local revision + +2013-05-08 Sam Spilsbury + + Move LauncherDragWindow icon texture painting to DrawContent + by making it execute through a functor - this means that we are + only changing the framebuffer binding while nux is rendering + and not while compiz is rendering. + +2013-05-08 Sam Spilsbury + + Merge lp:unity + +2013-05-04 Sam Spilsbury + + Merge lp:unity + +2013-04-25 Sam Spilsbury + + Fix some other conflicts + +2013-04-24 Sam Spilsbury + + Merge lp:unity + +2013-04-17 Sam Spilsbury + + Added some comments to explain various parts of the draw hooks + +2013-04-16 Sam Spilsbury + + Merge lp:unity + +2013-04-16 Sam Spilsbury + + Force a QueueDraw for 10 frames every time we resume from suspend. + +2013-04-15 Sam Spilsbury + + Merge lp:unity + +2013-04-14 Sam Spilsbury + + Merge lp:~andyrock/unity/unity.fix_1080947.2 + +2013-04-13 Andrea Azzarone + + Merge trunk. + +2013-04-13 Sam Spilsbury + + Merge lp:~smspillaz/unity/unity.fix_1080947.2 + +2013-03-30 Sam Spilsbury + + Revert that revision + +2013-03-30 Sam Spilsbury + + Specify the required blur area before drawing so that we can selectively use glCopyTexSubImage2D + + This means that we don't have to waste fragment bandwidth copying the entire backbuffer when + we could just do parts of it. + +2013-04-13 Sam Spilsbury + + Merge lp:unity + +2013-03-30 Sam Spilsbury + + Merge unity.experimental2 + +2013-03-30 Sam Spilsbury + + Only redraw the window buttons when necessary, not on every frame + +2013-03-29 Sam Spilsbury + + Merge unity.experimental2 + +2013-03-29 Sam Spilsbury + + Remove useless binds, and only update the nux blurs when there is compiz + damage, not compiz damage caused by nux damage + +2013-03-29 Sam Spilsbury + + Merge unity.experimental2 + +2013-03-29 Sam Spilsbury + + Replace with back_buffer_age_ in the header too + +2013-03-28 Sam Spilsbury + + Merge unity.experimental2 + +2013-03-28 Sam Spilsbury + + Rename to back_buffer_age_ + +2013-03-28 Sam Spilsbury + + Also initialize the buffer age + +2013-03-28 Sam Spilsbury + + Merge unity.experimental2 + +2013-03-28 Sam Spilsbury + + Just read off the backbuffer. Its faster and easier + +2013-03-28 Sam Spilsbury + + Merge lp:unity + +2013-03-28 Sam Spilsbury + + Merge unity.experimental2 + +2013-03-28 Sam Spilsbury + + Remove printfs + +2013-03-26 Sam Spilsbury + + Merge unity.experimental2 + +2013-03-26 Sam Spilsbury + + Cleanup - use range based for, remove unused function + +2013-03-22 Sam Spilsbury + + Merge unity.experimental2 + +2013-03-22 Sam Spilsbury + + Track "HasDirtyHelpers" in damageCutoff rather than glPaintOutput + as gathering the blur-region is done once per output pass and that will + invalidate the dirty_cache variable internally + +2013-03-22 Sam Spilsbury + + Merge from unity.experimental2 + +2013-03-22 Sam Spilsbury + + Merge lp:unity and use the old fbo api + +2013-02-28 Sam Spilsbury + + Merge unity.fix_1089811 + +2013-02-28 Sam Spilsbury + + Fix typo + +2013-02-28 Sam Spilsbury + + Merge lp:unity + +2013-02-25 Sam Spilsbury + + Merge unity.fix_1089811 + +2013-02-25 Sam Spilsbury + + Check that the shadow texture was created first + +2013-02-25 Sam Spilsbury + + Merge unity.fix_1080947 + +2013-02-25 Sam Spilsbury + + Merge lp:unity + +2013-02-19 Sam Spilsbury + + Merge lp:unity + +2013-02-19 Sam Spilsbury + + Merge lp:unity + +2013-02-10 Sam Spilsbury + + Merge lp:~smspillaz/unity/unity.fix_1080947 + +2013-02-10 Sam Spilsbury + + Fix stray ' + +2013-02-10 Sam Spilsbury + + Merge lp:~smspillaz/unity/unity.fix_1080947 + +2013-02-10 Sam Spilsbury + + Put the panel damage code where you expect it + +2013-02-10 Sam Spilsbury + + "Merge unity.fix_1080947" + +2013-02-10 Sam Spilsbury + + Added a note about ShowWindow removal + +2013-02-10 Sam Spilsbury + + Revert bounding rect removal + +2013-02-10 Sam Spilsbury + + Fix merge conflict + +2013-02-10 Sam Spilsbury + + Fixes (LP: #1080947) + +2013-02-10 Sam Spilsbury + + Merge unity.fix_1089811 + +2013-02-10 Sam Spilsbury + + Merge lp:unity + +2013-02-10 Sam Spilsbury + + Merge unity.fix_1089811 + +2013-02-07 Sam Spilsbury + + Merge lp:unity + +2013-02-04 Sam Spilsbury + + Merge lp:unity + +2013-01-11 Sam Spilsbury + + Bind the old draw framebuffer for reading before entering nux + +2013-01-11 Sam Spilsbury + + Merge lp:unity + +2013-01-03 Sam Spilsbury + + Added note about the damage feedback cycle and why we can't really do + much about it + +2012-12-23 Sam Spilsbury + + Fix code artefact + +2012-12-23 Sam Spilsbury + + Adapt for new API + +2012-12-23 Sam Spilsbury + + Reset viewport when doing glBlitFramebuffer operation + +2012-12-22 Sam Spilsbury + + Reallocate framebuffers on output change + +2012-12-22 Sam Spilsbury + + We are using our own fbo now, we don't care about glPaintCompositedOutputRequired + +2012-12-22 Sam Spilsbury + + Fix damage calculuation algorithm, draw blurs into our own private fbo + and adapt for new core api + +2012-12-20 Sam Spilsbury + + More flickering fixes: + 1. Use nux API to issue a damage cutoff to prevent any more calls to PresentInEmbeddedModeOnThisFrame + 2. Ignore redraw requests during PAINT_SCREEN_FULL + 3. Fix additional damage algorithm + +2012-12-20 Sam Spilsbury + + Slightly more reliable damage tracking and panel shadow damage. Not 100% reliable though. + +2012-12-19 Sam Spilsbury + + If a plugin requests PAINT_SCREEN_FULL we need to display all nux windows + +2012-12-18 Sam Spilsbury + + Experimental implementation of regional damage support, using new API from + nux + +2012-12-14 Sam Spilsbury + + Don't mess with ShapeBounding + +2013-11-07 Eleni Maria Stea + + the branch fixes the following compile errors: + 1. SetReferenceFramebuffer function gets 3 parameters (Nux/WindowCompositor.h) + 2. RenderInterfaceFromForeignCmd gets const reference not pointer as argument + (Nux/WindowThread.h). + + Approved by PS Jenkins bot, Andrea Azzarone. + +2013-11-07 Eleni Maria Stea + + fixed unity compile errors: + 1. SetReferenceFramebuffer function gets 3 parameters (Nux/WindowCompositor.h) + 2. RenderInterfaceFromForeignCmd gets const reference not pointer as argument + (Nux/WindowThread.h) + +2013-11-07 Automatic PS uploader + + Releasing 7.1.2+14.04.20131106.1-0ubuntu1 (revision 3588 from lp:unity). + + Approved by PS Jenkins bot. + +2013-11-06 Automatic PS uploader + + Releasing 7.1.2+14.04.20131106.1-0ubuntu1, based on r3588 + +2013-11-06 Łukasz 'sil2100' Zemczak + + DebugDBusInterface: add support to libxpathselect-1.4 + + Some cleanups and reworking of glib::Variant and debug::DBusInterface + + Same as lp:~3v1n0/unity/xpathselect-1.4 but with double function removed and packaging dependencies added. + +2013-11-06 Timo Jyrinki + + Depend on xpathselect1.4 in packaging + +2013-11-06 Timo Jyrinki + + Leave only packaging changes, lp:~3v1n0/unity/xpathselect-1.4 will fix things better. + +2013-11-06 Timo Jyrinki + + Revert the revert bzr3586 to get xpathselect1.4 support back in. + +2013-11-06 Timo Jyrinki + + Remove the double redraw_view_if_damaged function. + +2013-11-06 Timo Jyrinki + + Merge trevinho's xpathselect-1.4 branch. + +2013-11-01 Marco Trevisan (Treviño) + + Merging with trunk + +2013-09-19 Marco Trevisan (Treviño) + + Result: use initializer list to generate variants + +2013-09-19 Marco Trevisan (Treviño) + + Merging with trunk + +2013-09-19 Marco Trevisan (Treviño) + + Introspectable: fix compilation issue + +2013-09-19 Marco Trevisan (Treviño) + + Introspectable: some cleanup + +2013-09-19 Marco Trevisan (Treviño) + + DebugDBusInterface: use new GVariant constructors and getters where possible + +2013-09-19 Marco Trevisan (Treviño) + + Variant: BuilderWrapper return's cleanup + +2013-09-19 Marco Trevisan (Treviño) + + Variant: update copyright + +2013-09-19 Marco Trevisan (Treviño) + + TestGLibVariant: verify construction from HintsMap + +2013-09-19 Marco Trevisan (Treviño) + + Variant: add constructor and assigment operator for creating new from HintsMap + +2013-09-19 Marco Trevisan (Treviño) + + Variant: implement numeric getters using an unique template function + +2013-09-19 Marco Trevisan (Treviño) + + Variant: add new byte getter + +2013-09-19 Marco Trevisan (Treviño) + + BuilderWrapper: add overriding with glib::Variant + +2013-09-19 Marco Trevisan (Treviño) + + Introspectable: use BuilderWrapper also for Children + +2013-09-19 Marco Trevisan (Treviño) + + Unity: update various code to use new Variant facilities + +2013-09-19 Marco Trevisan (Treviño) + + TestGLibVariant: verify assigment operators + +2013-09-19 Marco Trevisan (Treviño) + + Variant: add assigment operators for different types + +2013-09-19 Marco Trevisan (Treviño) + + Introspectable: use variant::BuilderWrapper for adding the ID value to items + +2013-09-19 Marco Trevisan (Treviño) + + UnityShell: fix compilation due to evil compiz #define's + +2013-09-19 Marco Trevisan (Treviño) + + BuilderWrapper: add new values using new Autopilot format, that includes the type + +2013-09-19 Marco Trevisan (Treviño) + + Result: use new glib::Variant constructors + +2013-09-19 Marco Trevisan (Treviño) + + TestGLibVariant: update against new features of glib::Variant + +2013-09-19 Marco Trevisan (Treviño) + + Variant: add ability to create a new variant from simple types + +2013-09-18 Marco Trevisan (Treviño) + + Variant: add (u)int16 getters, cleanup the variant extraction + +2013-09-18 Marco Trevisan (Treviño) + + AggregateMonitor, ElapsedTimeMonitor: remove useless files + +2013-09-18 Marco Trevisan (Treviño) + + Unity: use the new BuildWrapper features in AddProperties methods + +2013-09-18 Marco Trevisan (Treviño) + + Variant: add more introspectable types to BuildWrapper + +2013-09-18 Marco Trevisan (Treviño) + + Introspectable: some code cleanup on Introspect method + +2013-09-18 Marco Trevisan (Treviño) + + DebugDBusInterface: if the "id" is required, there's no need to introspect. Just return it + +2013-09-18 Marco Trevisan (Treviño) + + DebugDBusInterface: add const strings for defining proto version and library loading + +2013-09-17 Marco Trevisan (Treviño) + + DebugDBusInterface: make IntrospectableAdapter::Ptr definition const by default + + this will make us avoid to const_cast later... + +2013-09-17 Marco Trevisan (Treviño) + + DebugDBusInterface: update copyright + +2013-09-17 Marco Trevisan (Treviño) + + DebugDBusInterface: implemented correctly MatchStringProperty, MatchBooleanProperty and MatchIntegerProperty + +2013-09-17 Marco Trevisan (Treviño) + + DebugDBusInterface: use glib::Variant and add property getter method + +2013-09-17 Marco Trevisan (Treviño) + + DebugDBusInterface: get proper node id and add first stub matching functions + +2013-10-30 Lars Uebernickel + + panel-service.c: don't warn about unknown image type unnecessarily + + Don't warn about indicators that explicitely don't have an image set. However, continue warning when the set image is of an unknown type. + + Approved by PS Jenkins bot, Stephen M. Webb. + +2013-10-26 Lars Uebernickel + + panel-service.c: don't warn about unknown image type unnecessarily + + Don't warn about indicators that explicitely don't have an image set. However, + continue warning when the set image is of an unknown type. + +2013-10-29 Francis Ginther + + Reverting support for libxpathselect1.4. Fixes: https://bugs.launchpad.net/bugs/1245988. + + Approved by PS Jenkins bot, Christopher Townsend, Timo Jyrinki. + +2013-10-29 Francis Ginther + + Reverting support for libxpathselect1.4. + +2013-10-29 Chris Townsend + + Instead of using NeedSoftRedraw(), use QueueDraw() for the Launcher and Panel to force a redraw to fix issue where leaving a full screen unredirected window would not redraw the Launcher and Panel. Fixes: https://bugs.launchpad.net/bugs/1240595. + + Approved by PS Jenkins bot, Marco Trevisan (Treviño). + +2013-10-29 Chris Townsend + + Add comment to remind us to remove this code when the Unity performance branches are merged. + +2013-10-28 Chris Townsend + + Instead of using NeedSoftRedraw(), use QueueDraw() for the Launcher and Panel to force a redraw to fix issue where leaving a full screen unredirected window would not redraw the Launcher and Panel. + +2013-10-24 Marco Trevisan (Treviño) + + Invalidate the Icon Centers when the monitor layout changes, so we make sure that if an icon center is set, then the icon is available on that monitor. + Added GetCenterForMonitor that allows to retrieve the nearest valid icon center for a given monitor, and in this way we can get the best icon that can handle a window minimization. Fixes: https://bugs.launchpad.net/bugs/767752. + + Approved by Brandon Schaefer, PS Jenkins bot. + +2013-10-22 Marco Trevisan (Treviño) + + ApplicationLauncherIcon: break in any case if we've found our target window + +2013-10-22 Marco Trevisan (Treviño) + + ApplicationLauncherIcon: Set the proper minimization icon when in multi-monitor + + This is possible thanks to GetCenterForMonitor, that returns the monitor that + is handling the current window. + +2013-10-22 Marco Trevisan (Treviño) + + LauncherIcon: some cleanup to the header, move GetCenterForMonitor to protected + +2013-10-22 Marco Trevisan (Treviño) + + TestLauncherController: verify we reset the icon centers on monitors changed + +2013-10-22 Marco Trevisan (Treviño) + + LauncherController: reset icon centers when monitor geometries change + +2013-10-22 Marco Trevisan (Treviño) + + TestLauncherIcon: add tests for GetCenterForMonitor + +2013-10-22 Marco Trevisan (Treviño) + + TestLauncherIcon: add tests for ResetCenters + +2013-10-22 Marco Trevisan (Treviño) + + LauncherIcon: add ResetCenters and GetCenterForMonitor functions + + ResetCenters sets the center values to the default (null) value. + GetCenterForMonitor gives the nearest valid {monitor, center} pair + for a given monitor id. It allows to know which is the center that + handles an icon children (such as a window) that is on the provided + monitor. + +2013-10-24 Eleni Maria Stea + + Added --compiz-path parameter to the unity startup script. It allows us to + start unity with custom builds of compiz (not only /usr/bin/compiz) like + that: + ./unity --compiz-path custom_compiz_build_directory/bin/compiz --replace ccp. + + Approved by PS Jenkins bot, Christopher Townsend. + +2013-10-23 Eleni Maria Stea + + fixes error in the unity version + +2013-10-23 Eleni Maria Stea + + Added --compiz-path parameter to the unity startup script. It allows us to + start unity with custom builds of compiz (not only /usr/bin/compiz) like + that: + ./unity --compiz-path custom_compiz_build_directory/bin/compiz --replace ccp + +2013-10-24 Marco Trevisan (Treviño) + + LauncherIcon: use nux::Animation for each Quirk property + + Update Launcher and Icons code accordingly, get rid of the timespec. + Remove unneded Quirks, reduce redraws and update tests. + + Approved by PS Jenkins bot, Brandon Schaefer. + +2013-10-22 Marco Trevisan (Treviño) + + Launcher: always keep the blur background in Expo mode + +2013-10-22 Marco Trevisan (Treviño) + + Merge with trunk + +2013-10-22 Marco Trevisan (Treviño) + + Merging with lp:~3v1n0/unity/multi-monitor-icon-quirks + +2013-10-21 Marco Trevisan (Treviño) + + UnityScreen: remove getMipmap override + +2013-10-21 Marco Trevisan (Treviño) + + Launcher: set back BASE_URGENT_ANIMATION_PERIOD to default value + + I changed it for testing reasons + +2013-10-21 Marco Trevisan (Treviño) + + AbstractLauncherIcon: remove un-used DROP_DIM quirk + +2013-10-21 Marco Trevisan (Treviño) + + DashController: check for invalid (null) keybindings + +2013-10-21 Marco Trevisan (Treviño) + + LauncherIcon: use std::bitset instead of std::vector's + +2013-10-21 Marco Trevisan (Treviño) + + UnityScreen: use better way to parse the unity digit keybindings + +2013-10-21 Marco Trevisan (Treviño) + + TestLauncher: verify saturation during Expo + +2013-10-21 Marco Trevisan (Treviño) + + Launcher: don't saturate icons if an overlay is still active + +2013-10-21 Marco Trevisan (Treviño) + + Launcher: desaturate icons when in Expo mode as well + +2013-10-21 Marco Trevisan (Treviño) + + TestLauncher: add IsOverlayOpen tests + +2013-10-21 Marco Trevisan (Treviño) + + LauncherController: skip visibility animations when initializing the Icons + + This will avoid to get the icons to grow their size during initialization. + +2013-10-21 Marco Trevisan (Treviño) + + TestLauncher: verify icon desaturation when it's added on overlay opened + +2013-10-21 Marco Trevisan (Treviño) + + Launcher: fix wrong merging + +2013-10-21 Marco Trevisan (Treviño) + + Merging with trunk + +2013-10-21 Marco Trevisan (Treviño) + + Merging with lp:~3v1n0/unity/multi-monitor-icon-quirks + +2013-10-20 Marco Trevisan (Treviño) + + TestLauncherIcon: verify EmitNeedsRedraw on visbility + +2013-10-18 Marco Trevisan (Treviño) + + TestLauncher: add one more test about urgent icons handling (on autohide) + +2013-10-18 Marco Trevisan (Treviño) + + TestLauncherIcon: update tests accordingly to redraw-only-visible-icons + +2013-10-18 Marco Trevisan (Treviño) + + LauncherIcon: don't require to redraw an icon if it's invisible and its animator is stopped + +2013-10-18 Marco Trevisan (Treviño) + + TestLauncherIcon: add SetQuirkDuration tests/test_launcher_icon.cpp + +2013-10-18 Marco Trevisan (Treviño) + + LauncherIcon: use nux::Animation for each Quirk property + + Update Launcher and Icons code accordingly, get rid of the timespec. + Remove unneded Quirks, reduce redraws and update tests. + +2013-10-23 Marco Trevisan (Treviño) + + Support libxpathselect1.4. Fixes: https://bugs.launchpad.net/bugs/1243529. + + Approved by PS Jenkins bot, Brandon Schaefer. + +2013-10-23 Marco Trevisan (Treviño) + + Support libxpathselect1.4. + +2013-09-17 Marco Trevisan (Treviño) + + DebugDBusInterface: initial support to libxpathselect-1.4 + +2013-10-22 Marco Trevisan (Treviño) + + AnimationUtils: add Start, Skip and SetValue methods + + These allows to start an animation, to skip it or to just set its value. + The templates now are more intelligent and we define the values that + can assume just once, by specializing a StartValueForDirection function. + + Approved by PS Jenkins bot, Brandon Schaefer. + +2013-10-18 Marco Trevisan (Treviño) + + TestAnimationUtils: add Skip test + +2013-10-18 Marco Trevisan (Treviño) + + TestAnimationUtils: reset the start value after skipping an animation + +2013-10-18 Marco Trevisan (Treviño) + + TestAnimationUtils: add tests for Start and SetValue methods + +2013-10-18 Marco Trevisan (Treviño) + + TestAnimationUtils: use typed test for all tests! :) + +2013-10-18 Marco Trevisan (Treviño) + + TestAnimationUtils: add tests for {Start,Finish}ValueForDirection using TYPED_TEST's + +2013-10-18 Marco Trevisan (Treviño) + + AnimationUtils: add Start, Skip and SetValue methods + + These allows to start an animation, to skip it or to just set its value. + The templates now are more intelligent and we define the values that + can assume just once, by specializing a StartValueForDirection function. + +2013-10-22 Marco Trevisan (Treviño) + + UnityScreen: CreateSuperNewAction with Shift and Numpad for launcher + + This fixes the bug that caused Super+Shift+KP_x not to work as it should. Fixes: https://bugs.launchpad.net/bugs/1240806. + + Approved by Brandon Schaefer, PS Jenkins bot. + +2013-10-17 Marco Trevisan (Treviño) + + UnityScreen: CreateSuperNewAction with Shift and Numpad for launcher + + This fixes the bug that caused Super+Shift+KP_x not to work as it should. + +2013-10-17 Marco Trevisan (Treviño) + + TestUnityshellPrivate: Verify create action string with ActionModifiers::USE_SHIFT_NUMPAD + +2013-10-17 Marco Trevisan (Treviño) + + UnityshellPrivate: allow to create Shift+Numpad super keybindings + +2013-10-22 Marco Trevisan (Treviño) + + LauncherIcon: add MultiMonitor quirks support + + A quirk can be now set for all monitors or for just one. Fixes: https://bugs.launchpad.net/bugs/1051913, https://bugs.launchpad.net/bugs/1215738, https://bugs.launchpad.net/bugs/1240737, https://bugs.launchpad.net/bugs/1240750. + + Approved by PS Jenkins bot, Brandon Schaefer. + +2013-10-22 Marco Trevisan (Treviño) + + SingleMonitorLauncherIcon: fix compilation issue + +2013-10-22 Marco Trevisan (Treviño) + + Merging with trunk + +2013-10-22 Marco Trevisan (Treviño) + + SingleMonitorLauncherIcon: use int for internal monitor variable + + And initialize it to -1 by default (i.e. never visible). + +2013-10-18 Marco Trevisan (Treviño) + + LauncherIcon: also include the quirk on the timeout id when using delayed update + +2013-10-17 Marco Trevisan (Treviño) + + LauncherIcon: also use multi-monitor names for delayed events + +2013-10-17 Marco Trevisan (Treviño) + + ApplicationLauncherIcon: only do the shimmer animation on the relevant icon monitor + +2013-10-17 Marco Trevisan (Treviño) + + Launcher: desaturate an icon that has been just added if in OverlayMode + +2013-10-17 Marco Trevisan (Treviño) + + Launcher: use monitor parameter for ResetQuirkTime as well + +2013-10-16 Marco Trevisan (Treviño) + + Launcher: don't desaturate icons again on move... We handle that through DndStarted/DndFinished now + +2013-10-15 Marco Trevisan (Treviño) + + TestLauncherIcon: update with new signal api, add some Presentation tests + +2013-10-15 Marco Trevisan (Treviño) + + Icons: remove unneeded redraw requests + + They're already covered by parent calls. + +2013-10-15 Marco Trevisan (Treviño) + + AbstractLauncherIcon: use monitor-aware needs_redraw + + So make only the relevant Launcher to be redrawn. + +2013-10-15 Marco Trevisan (Treviño) + + StandaloneUnity: fix compilation + +2013-10-15 Marco Trevisan (Treviño) + + TestLauncherIcon: add quirks tests + +2013-10-15 Marco Trevisan (Treviño) + + TimeUtil: add operator-> support + + To access to the internal members + +2013-10-15 Marco Trevisan (Treviño) + + StandaloneLauncher: fix compilation + +2013-10-14 Marco Trevisan (Treviño) + + TestLauncher: use SetExpoActive + +2013-10-14 Marco Trevisan (Treviño) + + TestLauncherController: enable dnd tests again, they seem to take little time now + +2013-10-14 Marco Trevisan (Treviño) + + tests: use testwrapper::StandaloneWM everywhere to avoid breaking other tests + +2013-10-14 Marco Trevisan (Treviño) + + StandaloneWM: add a wrapper that taskes care of WM casting and resetting + + All this for making testing easier + +2013-10-14 Marco Trevisan (Treviño) + + Tests: call StandaloneWindowManager::ResetStatus when done + + Not to break other tests + +2013-10-14 Marco Trevisan (Treviño) + + Merging with lp:~3v1n0/unity/spread-launcher-desaturate (and trunk) + +2013-10-14 Marco Trevisan (Treviño) + + StandaloneWindowManager: add ResetStatus, to cleanup the WM values + +2013-10-14 Marco Trevisan (Treviño) + + TestLauncher: unset the WindowManager properties not to mess with other tests + +2013-10-14 Marco Trevisan (Treviño) + + TestXdndManager: use only mocks for testing, ignore graphic dispaly to get data + +2013-10-14 Marco Trevisan (Treviño) + + XdndManagerImp: use Collection Window's GetData method to fetch dnd data + +2013-10-14 Marco Trevisan (Treviño) + + XdndCollectionWindow: add a GetData method to fetch dnd data from GraphicDisplay + +2013-10-14 Marco Trevisan (Treviño) + + TestSoftwareCenterLauncherIcon: update to match new internals + +2013-10-14 Marco Trevisan (Treviño) + + TestLauncherController: add tests for launcher desaturations on DND + +2013-10-14 Marco Trevisan (Treviño) + + TestLauncherIcon: update to use multi-monitor quirks + +2013-10-14 Marco Trevisan (Treviño) + + MockApplication: Implement missing mock methods + +2013-10-14 Marco Trevisan (Treviño) + + TestLauncher: use multi-monitor quirks + +2013-10-14 Marco Trevisan (Treviño) + + XdndManager: Emit the old monitor on monitor_changed signal, add Monitor getter + + This allows to cleanup some LauncherController code. Also added some safety checks that should + fix potential crashes. + +2013-10-14 Marco Trevisan (Treviño) + + MockLauncherIcon: update to match new AbstractLauncherIcon API + +2013-10-14 Marco Trevisan (Treviño) + + Icons: some cleanups + +2013-10-14 Marco Trevisan (Treviño) + + SoftwareCenterLauncherIcon: Set sticky by default and use MultiMonitor quirks + +2013-10-14 Marco Trevisan (Treviño) + + UnityScreen: use unordered_map for decorated windows + +2013-10-14 Marco Trevisan (Treviño) + + Launcher: use monitor quirks for DnD data + + Now only the relevant launcher desaturates when the data is dragged between monitors + +2013-10-14 Marco Trevisan (Treviño) + + LauncherController: call Launcher's DndStarted when monitor changes + + In this way we can reset the parameters for each launcher + +2013-10-14 Marco Trevisan (Treviño) + + XdndManager: keep track of the dnd data, emit it on monitor-changed + +2013-10-13 Marco Trevisan (Treviño) + + Launcher: get/set quirks for the specified monitor only + + Also fixes desaturation of icons on different monitors + +2013-10-13 Marco Trevisan (Treviño) + + BFBLauncherIcon: hide when showing HUD icon without animation + +2013-10-13 Marco Trevisan (Treviño) + + HudLauncherIcon: Set icon visible on monitor without animating it + +2013-10-13 Marco Trevisan (Treviño) + + Launcher: always use IsVisibleOnMonitor + +2013-10-13 Marco Trevisan (Treviño) + + LauncherIcon: add MultiMonitor quirks support + + A quirk can be now set for all monitors or for just one + +2013-10-13 Marco Trevisan (Treviño) + + TimeUtil: add unity::time::Spec wrapper + + It cares about initialization, resetting and setting to current time + +2013-10-22 Marco Trevisan (Treviño) + + Launcher: desaturate the inactive icons when in Spread mode. Fixes: https://bugs.launchpad.net/bugs/1238638, https://bugs.launchpad.net/bugs/1238892. + + Approved by PS Jenkins bot, Brandon Schaefer. + +2013-10-14 Marco Trevisan (Treviño) + + TestLauncher: remove not supported method + +2013-10-14 Marco Trevisan (Treviño) + + Merging with trunk + +2013-10-14 Marco Trevisan (Treviño) + + Test{Dash,Hud}Controller: verify construction and signal disconnection + + Rework MockBaseWindow to set ON_CALL on initialization. + +2013-10-14 Marco Trevisan (Treviño) + + HudController: extend sigc::trackable to automatcally disconect from signal connections + +2013-10-14 Marco Trevisan (Treviño) + + DashController: extend sigc::trackable to automatcally disconect from signal connections + +2013-10-14 Marco Trevisan (Treviño) + + TestLauncher: Reset WM status when tests are over + +2013-10-11 Marco Trevisan (Treviño) + + Launcher: use the default revelation mode if spread is active (for now) + +2013-10-11 Marco Trevisan (Treviño) + + TestLauncher: verify launcher behavior on Spread + +2013-10-11 Marco Trevisan (Treviño) + + autopilot, TestSpread: verify that the tooltip is hidden on spread + +2013-10-11 Marco Trevisan (Treviño) + + Launcher: hide tooltip when Expo is initiated + +2013-10-11 Marco Trevisan (Treviño) + + Launcher: Hide Tooltip when the Spread is initiated + +2013-10-11 Marco Trevisan (Treviño) + + Launcher: don't saturate the launcher if the spread has been initiated with mouse over + + Only in the case of global spread! If we are in application spread mode we don't have to + do this until we don't move the mouse. + +2013-10-11 Marco Trevisan (Treviño) + + Launcher: call OnSpreadChanged when spread inits/terminates... + + Fix a typo that caused wrong logic... + +2013-10-11 Marco Trevisan (Treviño) + + autopilot, TestSpread: add assertion functions and test spread app switching + +2013-10-11 Marco Trevisan (Treviño) + + autopilot, TestSpread: add icon saturations tests + +2013-10-11 Marco Trevisan (Treviño) + + Launcher: Saturate icon again if over another icon app-spread mode + +2013-10-11 Marco Trevisan (Treviño) + + Launcher: desaturate the inactive icons when in Spread mode + +2013-10-21 Marco Trevisan (Treviño) + + OverlayRenderer: only and correctly initialize the BGLayer when not on GLSL codepath + + Make sure we set the initial bg_layer_ value to the average color, and do this only if + really needed. Fixes: https://bugs.launchpad.net/bugs/1232726. + + Approved by PS Jenkins bot, Eleni Maria Stea. + +2013-10-21 Marco Trevisan (Treviño) + + OverlayRenderer: only and correctly initialize the BGLayer when not on GLSL codepath + + Make sure we set the initial bg_layer_ value to the average color, and do this only if + really needed. + +2013-10-18 Brandon Schaefer + + Get the current char before moving on to the next char!. + + Approved by PS Jenkins bot, Marco Trevisan (Treviño). + +2013-10-18 Brandon Schaefer + + * Get the current char before moving the pointer down to the next char + +2013-10-16 Ted Gould + + Clean up NIH Errors so they don't get reported on exit. Fixes: https://bugs.launchpad.net/bugs/1236720. + + Approved by PS Jenkins bot, Stephen M. Webb. + +2013-10-16 Ted Gould + + Attaching bug + +2013-10-16 Ted Gould + + Error header + +2013-10-16 Ted Gould + + Change error handlers for upstart events as well + +2013-10-16 Ted Gould + + Check error on the upstart proxy + +2013-10-16 Brandon Schaefer + + Workaround for now, replace all blacklisted chars in the results name with a '?'. So we can still render all the results with out a crash. This needs to be fixed in pango/harfbuzz. Fixes: https://bugs.launchpad.net/bugs/1239381. + + Approved by PS Jenkins bot, Marco Trevisan (Treviño), Stephen M. Webb. + +2013-10-15 Brandon Schaefer + + * Use *next_char + +2013-10-15 Brandon Schaefer + + * Fix very bad utf8 handling...thnaks bregma! + +2013-10-15 Brandon Schaefer + + * Remove extra string copy + +2013-10-15 Brandon Schaefer + + * Reduce the complexity of the solution, do a one-time pass replace + +2013-10-15 Brandon Schaefer + + * Make the name more abstract, in case there are other languages we need to blacklist + +2013-10-15 Brandon Schaefer + + * When dealing with names that are in burmese, we must replace those with '?'. + There is a crash in burmese only when dealing with ellipize/width/heigh in the + names of the result. + + This is a workaround so we dont crash, once the bug is fixed upstream we will remove this.k + +2013-10-16 Marco Trevisan (Treviño) + + UnityScreen: also redraw the HudView if it has not been fully damaged. Fixes: https://bugs.launchpad.net/bugs/1240322. + + Approved by Brandon Schaefer, PS Jenkins bot. + +2013-10-16 Marco Trevisan (Treviño) + + UnityScreen: also redraw the HudView if it has not been fully damaged + +2013-10-16 Marco Trevisan (Treviño) + + HudController: expose the HudView to the public + +2013-10-14 Automatic PS uploader + + Releasing 7.1.2+13.10.20131014.1-0ubuntu1 (revision 3570 from lp:unity). + + Approved by PS Jenkins bot. + +2013-10-14 Automatic PS uploader + + Releasing 7.1.2+13.10.20131014.1-0ubuntu1, based on r3570 + +2013-10-14 William Grant + + Build with -fPIC on arm64 to fix link failure. + +2013-10-11 Marco Trevisan (Treviño) + + PluginAdapter: set the spread window state before spreading or the callback will get a wrong state. Fixes: https://bugs.launchpad.net/bugs/1238622. + + Approved by Christopher Townsend, PS Jenkins bot. + +2013-10-11 Marco Trevisan (Treviño) + + PluginAdapter: set the spread window state before spreading or the callback will get a wrong state + +2013-10-11 Andrea Azzarone + + Don't ignore Stick command is the icon is already sticky but save==true. Fixes: https://bugs.launchpad.net/bugs/1237359. + + Approved by PS Jenkins bot, Christopher Townsend. + +2013-10-11 Andrea Azzarone + + Add missing change. + +2013-10-11 Andrea Azzarone + + Don't ignore Stick command is the icon is already sticky but save==true. + +2013-10-11 Marco Trevisan (Treviño) + + PluginAdapter: set the spread window state before spreading or the callback will get a wrong state. Fixes: https://bugs.launchpad.net/bugs/1238622. + + Approved by PS Jenkins bot, Christopher Townsend. + +2013-10-11 Marco Trevisan (Treviño) + + PluginAdapter: set the spread window state before spreading or the callback will get a wrong state + +2013-10-11 Automatic PS uploader + + Releasing 7.1.2+13.10.20131011-0ubuntu1 (revision 3565 from lp:unity). + + Approved by PS Jenkins bot. + +2013-10-11 Automatic PS uploader + + Releasing 7.1.2+13.10.20131011-0ubuntu1, based on r3565 + +2013-10-10 Stephen M. Webb + + bumped upstream to 7.1.2. + + Approved by Marco Trevisan (Treviño), PS Jenkins bot. + +2013-10-10 Stephen M. Webb + + debian/changelog: fixed email address + +2013-10-10 Stephen M. Webb + + bump to version 7.1.2 + +2013-10-10 Marco Trevisan (Treviño) + + ApplicationLauncherIcon: don't unset the app if the icon has been already removed + + In this case the app is unset when removed, doing it twice causes the app->seen flag to + be reset and this breaks the assumtions of the LauncherController, making it to recreate + a new app for the same BamfApplication. Fixes: https://bugs.launchpad.net/bugs/1237182. + + Approved by PS Jenkins bot, Christopher Townsend. + +2013-10-10 Marco Trevisan (Treviño) + + TestApplicationLauncherIcon: verify that removing/destroying an icon won't break the Seen flag + +2013-10-10 Marco Trevisan (Treviño) + + ApplicationLauncherIcon: don't unset the app if the icon has been already removed + + In this case the app is unset when removed, doing it twice causes the app->seen flag to be + reset and this breaks the assumtions of the LauncherController, making it to recreate a + new app for the same BamfApplication. + +2013-10-10 Marco Trevisan (Treviño) + + TestApplicationLauncherIcon: verify destruction unsets app parameters + +2013-10-10 Marco Trevisan (Treviño) + + TestApplicationLauncherIcon: even more Removal tests + +2013-10-10 Marco Trevisan (Treviño) + + TestApplicationLauncherIcon: add new tests to verify SetApplication + +2013-10-10 Marco Trevisan (Treviño) + + ApplicationLauncherIcon: keep the stikyness state of the icon when replacing the inner app + + No need to do this manually on SoftwareCenterLauncherIcon anymore. + +2013-10-10 Marco Trevisan (Treviño) + + ApplicationLauncherIcon: add UnsetApplication utility function to reset application parameters + + This is done when removing, destructing and replacing the application. + +2013-10-10 Marco Trevisan (Treviño) + + LauncherIcon: set the removed property true and disconnect from callbacks when removed + +2013-10-10 Marco Trevisan (Treviño) + + SourceManager: add RemoveAll public method. + + Approved by Christopher Townsend, PS Jenkins bot. + +2013-10-10 Marco Trevisan (Treviño) + + TestGLibSourceManager: add RemoveAll tests + +2013-10-10 Marco Trevisan (Treviño) + + SourceManager: add RemoveAll public method + +2013-10-09 Marco Trevisan (Treviño) + + ApplicationLauncherIcon: remove the icon when setting a null application. Fixes: https://bugs.launchpad.net/bugs/1237161. + + Approved by PS Jenkins bot, Brandon Schaefer. + +2013-10-09 Marco Trevisan (Treviño) + + TestSoftwareCenterLauncherIcon: test cleanup + +2013-10-09 Marco Trevisan (Treviño) + + TestSoftwareCenterLauncherIcon: make sure we don't crash when a new Null app is set + +2013-10-09 Marco Trevisan (Treviño) + + SoftwareCenterLauncherIcon: be safer when handling new app + + It may be null. + +2013-10-09 Marco Trevisan (Treviño) + + ApplicationLauncherIcon: remove the icon when setting a null application + +2013-10-08 Andrea Azzarone + + Fix rendering of italic text in StaticCairoText. Fixes: https://bugs.launchpad.net/bugs/1190275. + + Approved by PS Jenkins bot, Brandon Schaefer. + +2013-10-08 Andrea Azzarone + + Fix rendering of italic test. + +2013-10-08 Marco Trevisan (Treviño) + + AP, TestSpread: assertWindowIsNotScaled may fail when getting the Xid. Fixes: https://bugs.launchpad.net/bugs/1236872. + + Approved by PS Jenkins bot, Christopher Townsend. + +2013-10-08 Marco Trevisan (Treviño) + + AP, WindowManagerKeybindingsForWindowHandling: just extend UnityTestCase + + Or we have duplicated tests that may fail + +2013-10-08 Marco Trevisan (Treviño) + + AP, TestSpread: assertWindowIsNotScaled may fail when getting the Xid + +2013-10-08 Marco Trevisan (Treviño) + + LauncherIcon: Add monitor parameter to GetTipPosition. Fixes: https://bugs.launchpad.net/bugs/1236631. + + Approved by PS Jenkins bot, Brandon Schaefer. + +2013-10-08 Marco Trevisan (Treviño) + + LauncherIcon: Add monitor parameter to GetTipPosition + +2013-10-08 Marco Trevisan (Treviño) + + VolumeLauncherIcon: copy files to device on DnD + + Use filemanager to perform the copy action. If needed, delay the procedure until we + don't have the volume mounted (using a magic utility function to share the code). Fixes: https://bugs.launchpad.net/bugs/838731. + + Approved by PS Jenkins bot, Brandon Schaefer. + +2013-10-08 Marco Trevisan (Treviño) + + GnomeFileManager: don't try to copy files from o to invalid locations + +2013-10-07 Marco Trevisan (Treviño) + + TestVolumeLauncherIcon: always create icon on init, move some test to DelayedConstruction + +2013-10-07 Marco Trevisan (Treviño) + + ApplicationLauncherIcon: remove the unneeded ValidateUrisForLaunch function + +2013-10-07 Marco Trevisan (Treviño) + + TestVolumeLauncherIcon: add tests to verify the copy on DnD + +2013-10-07 Marco Trevisan (Treviño) + + VolumeLauncherIcon: copy files to device on DnD + + Use filemanager to perform the copy action. If needed, delay the procedure until we + don't have the volume mounted (using a magic utility function to share the code). + +2013-10-07 Marco Trevisan (Treviño) + + FileManager: add CopyFiles method, implement it for GnomeFileManager using nautilus APIs + + This way we have the proper transfers notifications on launcher. + +2013-10-07 Marco Trevisan (Treviño) + + Volume: remove FileManager instance, handle opened status in VolumeLauncherIcon. Fixes: https://bugs.launchpad.net/bugs/1236468. + + Approved by PS Jenkins bot, Christopher Townsend. + +2013-10-07 Marco Trevisan (Treviño) + + IconLoader: use unity::action::Handle as IconLoader::Handle + +2013-10-07 Marco Trevisan (Treviño) + + Removing wrongly committed file + +2013-10-07 Marco Trevisan (Treviño) + + Volume: remove FileManager instance, handle opened status in VolumeLauncherIcon + +2013-10-07 Marco Trevisan (Treviño) + + Volume: move FileManager and Notification actions to VolumeLauncherIcon + +2013-10-07 Marco Trevisan (Treviño) + + Tests: move TestVolume to test-gtest-xless + +2013-10-07 Marco Trevisan (Treviño) + + TestDeviceLauncherSection: use mock notification display + +2013-10-07 Marco Trevisan (Treviño) + + DeviceLauncherSection: allow to mock DeviceNotificationDisplay + +2013-10-07 Marco Trevisan (Treviño) + + GMockVolume: return the current object to the async callback + +2013-10-07 Marco Trevisan (Treviño) + + Volume: add mounted, ejected and unmounted signals + +2013-10-07 Marco Trevisan (Treviño) + + GnomeFileManager: use nwe nautilus dbus paths for actions + +2013-10-04 Marco Trevisan (Treviño) + + ActionHandle: move connection::handle to a more generic action::handle + +2013-10-05 Brandon Schaefer + + Remove the ibus workaround, as im-config has been updated to use 'auto' as its default choice. This means ibus-daemon will start up correctly now. + + Approved by PS Jenkins bot, Stephen M. Webb. + +2013-10-04 Brandon Schaefer + + * Remove imports that was part of the workaround + +2013-10-04 Brandon Schaefer + + * Remove the workaround that hardly worked + +2013-10-04 Automatic PS uploader + + Releasing 7.1.1+13.10.20131004-0ubuntu1 (revision 3554 from lp:unity). + + Approved by PS Jenkins bot. + +2013-10-04 Automatic PS uploader + + Releasing 7.1.1+13.10.20131004-0ubuntu1, based on r3554 + +2013-10-04 Marco Trevisan (Treviño) + + AbstractLauncherIcon: add static icon_size property. Fixes: https://bugs.launchpad.net/bugs/1073103. + + Approved by PS Jenkins bot, Brandon Schaefer. + +2013-10-04 Marco Trevisan (Treviño) + + AbstractLauncherIcon: set default icon size to 48 + +2013-10-04 Marco Trevisan (Treviño) + + IconTextureSource: RememberEmblem and HadEmblem must be multi-monitor aware + + This fixes a bug that was causing the emblem not being drawn on secondary monitors. + +2013-10-04 Marco Trevisan (Treviño) + + Launcher: some cleanup + +2013-10-04 Marco Trevisan (Treviño) + + LauncherIcon: don't save parent geometries anymore, SetCenter should now include them + + This is really not needed anymore since the icon knows its size. + +2013-10-04 Marco Trevisan (Treviño) + + LauncherIcon: use icon_size to compute the tip position and where it was hardcoded before + +2013-10-04 Marco Trevisan (Treviño) + + DeviceNotificationDisplayImp: use const value for icon size + +2013-10-04 Marco Trevisan (Treviño) + + ApplicationLauncherIcon: use correct icon size to set the window-icon geometry + + Used for minimizing animation + +2013-10-04 Marco Trevisan (Treviño) + + Launcher: set the icon_size value for AbstractLauncherIcon when set for itself + +2013-10-04 Marco Trevisan (Treviño) + + AbstractLauncherIcon: add static icon_size property + +2013-10-04 Marco Trevisan (Treviño) + + LauncherIcon: add GetTipPosition function to compute where show tooltip and quicklists + +2013-10-04 Marco Trevisan (Treviño) + + LauncherIcon: don't continue computation if the center has not changed + +2013-10-04 Marco Trevisan (Treviño) + + BamfApplicationManager: if the app is not found, return compiz manually. + + This fixes crashes on standalone clients + +2013-10-04 Marco Trevisan (Treviño) + + LauncherIcon: don't try to show again quicklists or tooltip if center changed, just move them. Fixes: https://bugs.launchpad.net/bugs/1234778. + + Approved by PS Jenkins bot, Brandon Schaefer. + +2013-10-04 Marco Trevisan (Treviño) + + LauncherIcon: don't try to show again quicklists or tooltip if center changed, just move them + +2013-10-04 Marco Trevisan (Treviño) + + QuicklistManager: add MoveQuicklist method + +2013-10-04 Marco Trevisan (Treviño) + + QuicklistView: add position ql setter + +2013-10-04 Marco Trevisan (Treviño) + + Tooltip: add tooltip position setter + +2013-10-03 Marco Trevisan (Treviño) + + SimpleLauncherIcon: we need to restore the focus when closing the Overlay for activation. Fixes: https://bugs.launchpad.net/bugs/909870. + + Approved by Brandon Schaefer, PS Jenkins bot. + +2013-10-03 Marco Trevisan (Treviño) + + autopilot, LauncherIconsTests: verify that overlays gets closed on icon Activation + +2013-10-03 Marco Trevisan (Treviño) + + TestApplicationLauncherIcon: verify that we ask to hide the Overlays on icon activation + +2013-10-03 Marco Trevisan (Treviño) + + DashController: always restore the input focus when hidden, no need to add a parameter + +2013-10-03 Marco Trevisan (Treviño) + + HudController: if we're hiding, then the view is already there + +2013-10-03 Marco Trevisan (Treviño) + + HudController: always restore the input focus when hidden, no need to add a parameter + +2013-10-03 Marco Trevisan (Treviño) + + SimpleLauncherIcon: we need to restore the focus when closing the Overlay + +2013-10-03 Marco Trevisan (Treviño) + + DashView: some cleanup + +2013-10-03 Marco Trevisan (Treviño) + + HudController: don't save input focus, it's really not needed + +2013-10-03 Marco Trevisan (Treviño) + + PanelService: close a menu and re-send the keyevent when handling a combination + + Or when we try to open HUD/Dash. Also, close the active menu if a new application is opened + and focused. Fixes: https://bugs.launchpad.net/bugs/10905, https://bugs.launchpad.net/bugs/1197071, https://bugs.launchpad.net/bugs/1234457. + + Approved by PS Jenkins bot, Christopher Townsend. + +2013-10-03 Marco Trevisan (Treviño) + + TestPanelServiceCompizShortcutParsing: verify the parsing of the compiz shortcuts + +2013-10-03 Marco Trevisan (Treviño) + + PanelService: add private header, add testable parse_string_keybinding + +2013-10-03 Marco Trevisan (Treviño) + + Tests: add new monitored keys to external gschemas + +2013-10-03 Marco Trevisan (Treviño) + + autopilot, PanelIndicatorEntryTests: add new test to verify menu closes on new app + +2013-10-03 Marco Trevisan (Treviño) + + autopilot, WindowManagerKeybindings: ensure menus are shown + +2013-10-03 Marco Trevisan (Treviño) + + PanelService: close the active menu if requested to open a NULL entry instead of warn + + This will fix orphan menus, when a new application takes focus. + +2013-10-03 Marco Trevisan (Treviño) + + PanelService: use g_signal_handlers_disconnect_by_data for menu signals + +2013-10-03 Marco Trevisan (Treviño) + + PanelService: allow print screen key to be used without modifiers + +2013-10-03 Marco Trevisan (Treviño) + + Switcher: some cleanup + +2013-10-03 Marco Trevisan (Treviño) + + autopilot, WindowManagerKeybindings: add test to verify interaction with WM when menus are opened + +2013-10-03 Marco Trevisan (Treviño) + + autopilot, WindowManager: add methods to initiate/terminate spread + +2013-10-03 Marco Trevisan (Treviño) + + PanelService: save KeySym's internally, convert them to keycode on event + +2013-10-03 Marco Trevisan (Treviño) + + PanelService: call parent finalize function when finalizing panel + +2013-10-03 Marco Trevisan (Treviño) + + PanelService: use g_signal_handlers_disconnect_matched to disconnect signals + +2013-10-03 Marco Trevisan (Treviño) + + PanelService: use switch/case statement for handling events + +2013-10-03 Marco Trevisan (Treviño) + + PanelService: close a menu and re-send the keyevent when handling a combination + + Or when we try to open HUD/Dash + +2013-10-02 Marco Trevisan (Treviño) + + PanelService: add KeyBinding struct to handle keys and use it for toggle modifier + +2013-10-03 Christopher Lee + + Preparing autopilot tests for an upcoming update in autopilot 1.3. + + Approved by PS Jenkins bot, Thomi Richards. + +2013-10-03 Christopher Lee + + Cleanup to make changes backward compatible with autopilot. + +2013-10-03 Christopher Lee + + Updated autopilot tests in preparation for updated autopilot. + +2013-10-02 Andrea Azzarone + + Hide the tooltip when an app is closed. Fixes: https://bugs.launchpad.net/bugs/1172769. + + Approved by Brandon Schaefer, PS Jenkins bot. + +2013-10-02 Andrea Azzarone + + Hide the tooltip when an app is closed. + +2013-10-01 Marco Trevisan (Treviño) + + CairoBaseWindow: add fade animator to control both QL and Tooltip + + Removing the animator from LauncherIcon, and handling the tooltip animation + inside the QL and Tooltip base class. + + Approved by PS Jenkins bot, Christopher Townsend. + +2013-09-30 Marco Trevisan (Treviño) + + JSONParser: no need to use pango for parsing colors, nux can do it! + +2013-09-30 Marco Trevisan (Treviño) + + TestLauncherIcon: Add tooltip visibility checks + +2013-09-30 Marco Trevisan (Treviño) + + CairoBaseWindow: add fade animator to control both QL and Tooltip + + Removing the animator from LauncherIcon, and handling the tooltip animation + inside the QL and Tooltip base class. + +2013-10-01 Andrea Azzarone + + Update icon_under_mouse before process mouse movemnt in the tooltip manager. Fixes: https://bugs.launchpad.net/bugs/1172769, https://bugs.launchpad.net/bugs/1233666. + + Approved by PS Jenkins bot, Brandon Schaefer. + +2013-10-01 Andrea Azzarone + + Update icon_under_mouse before process mouse movemnt in the tooltip manager. + +2013-10-01 Andrea Azzarone + + Fix bad redrawing of dash overlay scrollbar connector. Fixes: https://bugs.launchpad.net/bugs/1233195. + + Approved by PS Jenkins bot, Brandon Schaefer. + +2013-09-30 Andrea Azzarone + + Fix bad redrawing of scrollbar connector. + +2013-10-01 Marco Trevisan (Treviño) + + CairoBaseWindow: only regenerate blur texture when visible and damaged. Fixes: https://bugs.launchpad.net/bugs/1233109. + + Approved by Christopher Townsend, PS Jenkins bot. + +2013-09-30 Marco Trevisan (Treviño) + + QuicklistView: use way-better looking quicklists on low-gfx mode + + In low-gfx we can still draw the dotted-texture and transparent outline. + We only need to use opaque background. + +2013-09-30 Marco Trevisan (Treviño) + + Tooltip: still keep semi-transparent borders on low-gfx mode + +2013-09-30 Marco Trevisan (Treviño) + + CairoBaseWindow: only regenerate blur texture on visible and when damaged + +2013-09-30 Brandon Schaefer + + Move the switcher Alt+ shortcut handling into nux, from compiz. Now nux handles these events instead of compiz. This way its makes much more sense code wise and we no longer ungrab the arrow gets from X... so Alt+LeftArrow will no longer open the hud. Fixes: https://bugs.launchpad.net/bugs/969039. + + Approved by PS Jenkins bot, Christopher Townsend. + +2013-09-30 Brandon Schaefer + + * Clean ups + * Move KEYUP -> KEYDOWN + +2013-09-29 Brandon Schaefer + + * Merge with trunk + +2013-09-29 Brandon Schaefer + + * Move AltTab arrow key handling into nux vs having compiz use shortcuts which was ungrabbing the arrow keys. + Causing alt+ to show the hud! This is how the switcher should handle arrow keys anyway. + +2013-09-27 Brandon Schaefer + + Break the bump detection by moving to the first icon, then down 5 pixels. Since bump detection needs to move in 3 different directions. + + Approved by PS Jenkins bot, Christopher Townsend, Marco Trevisan (Treviño). + +2013-09-27 Brandon Schaefer + + * Ensure we always break + +2013-09-27 Brandon Schaefer + + * Move Right as well + +2013-09-27 Brandon Schaefer + + * Add a break bump detection in the switcher view + +2013-09-27 Brandon Schaefer + + * Break the bump detection before testing mouse detection works :) + +2013-09-27 Automatic PS uploader + + Releasing 7.1.1+13.10.20130927.1-0ubuntu1 (revision 3540 from lp:unity). + + Approved by PS Jenkins bot. + +2013-09-27 Automatic PS uploader + + Releasing 7.1.1+13.10.20130927.1-0ubuntu1, based on r3540 + +2013-09-27 Marco Trevisan (Treviño) + + TestIMTextEntry: fix failing tests with IBus, use TEST_F and TEST_P. + + Approved by PS Jenkins bot, Brandon Schaefer. + +2013-09-26 Marco Trevisan (Treviño) + + TestIMTextEntry: move back AltKeybindings and SuperKeybindings to test-gtest + + And reduce the number of tests. We can just verify letters... + +2013-09-26 Marco Trevisan (Treviño) + + TestIMTextEntry: fix failing tests with IBus, use TEST_F and TEST_P + +2013-09-26 Marco Trevisan (Treviño) + + MockTextEntry: use a timeout when processing the events with IBus running + +2013-09-27 Łukasz 'sil2100' Zemczak + + Re-add the telepathy-indicator recommends as it got dropped from Main without any valid reasons + +2013-09-27 Pawel Stolowski + + Expose Scope::results_dirty property and add a few more parameters to Preview::PerformAction. Fixes: https://bugs.launchpad.net/bugs/1230352. + + Approved by PS Jenkins bot, Pawel Stolowski. + +2013-09-26 Michal Hruby + + Move the callbacks typedefs to ScopeProxyInterface.h + +2013-09-25 Michal Hruby + + Add libunity-core-6.0-7 to conflicts and replaces + +2013-09-25 Michal Hruby + + Add a test for Preview::PerformAction + +2013-09-25 Michal Hruby + + Bump ABI version + +2013-09-25 Michal Hruby + + Merge lp:~stolowski/unity/unity-cancellable-actions + +2013-09-25 Pawel Stolowski + + Support callback function in PerformAction. + +2013-09-25 Pawel Stolowski + + Add cancellable argument to PerformAction. + +2013-09-25 Michal Hruby + + Add results_dirty property + +2013-09-27 Łukasz 'sil2100' Zemczak + + No new recommends/depends now, since at this point of the cycle it's not allowed for this project + +2013-09-27 Brandon Schaefer + + If we are switching view ports tell nux to process the events. Even though the viewport switcher does grab the mouse, we will still feed nux the events so we can correctly update where the mouse is for the launcher. Fixes: https://bugs.launchpad.net/bugs/1231679. + + Approved by Marco Trevisan (Treviño), PS Jenkins bot. + +2013-09-26 Brandon Schaefer + + * Better + +2013-09-26 Brandon Schaefer + + * Handle the disabling of the mouse better! Caused a regression :( + +2013-09-26 Brandon Schaefer + + * When switching viewports make sure we are telling nux to keep track of the mouse! + +2013-09-25 Brandon Schaefer + + Change sleep from 5 to 10, in hopes of appeasing jenkins. + + Approved by PS Jenkins bot, Stephen M. Webb. + +2013-09-25 Brandon Schaefer + + * Move to 10 seconds...as jenkins doesn't seem to like the daemon still. + +2013-09-25 Marco Trevisan (Treviño) + + VScrollBarOverlayWindow: add quick fade animation on show/hide. + + Approved by PS Jenkins bot, Christopher Townsend, Brandon Schaefer. + +2013-09-24 Marco Trevisan (Treviño) + + TestOverlayWindow, TestOverlayWindow: correctly use animator ticks + + This fixes failing tests + +2013-09-24 Marco Trevisan (Treviño) + + VScrollBarOverlayWindow: add quick fade animation on show/hide + +2013-09-25 Marco Trevisan (Treviño) + + Unity: Use WindowManager average_color property for getting the desktop color + + Having to deal with UBus here was a mess and caused us to re-store the same value + too many times. Using a nux property gives us all the features we need easily + while WindowManager is already enough shared to be used for this task. + + Approved by PS Jenkins bot, Brandon Schaefer. + +2013-09-25 Marco Trevisan (Treviño) + + Tests: verify the disconnection of WM signals on some object destructions + +2013-09-25 Marco Trevisan (Treviño) + + OverlayRendererImpl: extend sigc::trackable to smartly disconnect signals + +2013-09-25 Marco Trevisan (Treviño) + + {Switcher,Shortcut,Session}Controller: extend sigc::trackable to smartly disconnect signals + +2013-09-24 Marco Trevisan (Treviño) + + BGHash: no need to use AnimationUtils here + +2013-09-24 Marco Trevisan (Treviño) + + UnityWindowView: redraw the view when the background has been updated + +2013-09-24 Marco Trevisan (Treviño) + + Unity: Use WindowManager average_color property for getting the desktop color + + Having to deal with UBus here was a mess and caused us to re-store the same value + too many times. Using a nux property gives us all the features we need easily + while WindowManager is already enough shared to be used for this task. + +2013-09-24 Marco Trevisan (Treviño) + + BGHash: use WindowManager's average_color instead of UBus + + Plus some usual code cleanup + +2013-09-24 Marco Trevisan (Treviño) + + WindowManager: add average_color Property + +2013-09-25 Andrea Azzarone + + Don't use sigc::bind with a static value that should be dynamic. Fixes: https://bugs.launchpad.net/bugs/1228965. + + Approved by PS Jenkins bot, Christopher Townsend. + +2013-09-24 Andrea Azzarone + + Add line removed by mistake. + +2013-09-23 Andrea Azzarone + + Fix segfault. + +2013-09-18 Andrea Azzarone + + Merge trunk. + +2013-09-25 Jeremy Bicha + + recommend telepathy-indicator. + + Approved by PS Jenkins bot, Christopher Townsend. + +2013-09-18 Jeremy Bicha + + recommend telepathy-indicator + +2013-09-25 Marco Trevisan (Treviño) + + PanelService: set proper priority for floating position-less NG indicators. Fixes: https://bugs.launchpad.net/bugs/1229460. + + Approved by PS Jenkins bot, Brandon Schaefer. + +2013-09-24 Marco Trevisan (Treviño) + + PanelService: indentation fixes + +2013-09-24 Marco Trevisan (Treviño) + + PanelService: move floating-indicators after libapplication indicators + +2013-09-24 Marco Trevisan (Treviño) + + PanelService: set proper priority for floating position-less NG indicators + +2013-09-24 Marco Trevisan (Treviño) + + PanelService: set the correct priority for NG indicators with no position set + +2013-09-24 Marco Trevisan (Treviño) + + PanelService: use correct priority for legacy indicator entries + + This partially reverts r3391 and fixes position for some special indicators + +2013-09-20 Marco Trevisan (Treviño) + + CMakeLists: use the indicators prefix as indicator service path + + This way the local installations will still load the system indicators, unless + libindicator (and the full indicators set) is not locally installed. + +2013-09-24 Brandon Schaefer + + restart the ibus daemon wit hthe right args for tests. + + Approved by PS Jenkins bot, Stephen M. Webb. + +2013-09-23 Brandon Schaefer + + * Replace the bad ibus-deamon with one that works + +2013-09-24 Marco Trevisan (Treviño) + + UBusMessages: remove useless messages (and relative emission). + + Approved by PS Jenkins bot, Brandon Schaefer. + +2013-09-24 Marco Trevisan (Treviño) + + QuicklistManager, Tooltip: also remove ubus inclusions + +2013-09-24 Marco Trevisan (Treviño) + + UBusMessages: remove useless messages (and relative emission) + +2013-09-24 Chris Townsend + + The ShowDesktopHandleWindowInterface teardown was missing it's call to DeleteHandler() in a recent commit that refactored the handling of some Show Desktop code. Fixes: https://bugs.launchpad.net/bugs/1228915. + + Approved by PS Jenkins bot, Marco Trevisan (Treviño), Brandon Schaefer. + +2013-09-23 Chris Townsend + + Fix some formatting. + +2013-09-23 Chris Townsend + + The ShowDesktopHandleWindowInterface teardown was missing it's call to DeleteHandler() in a recent commit that refactored the handling of some Show Desktop code. + +2013-09-20 Chris Townsend + + A regression caused by revno. 3515 breaks the recently fixed Quicklist and Tooltip active blur. This fixes it by checking if the View is a ViewWindow and if so, use QueueDraw() instead of NeedSoftRedraw(). Fixes: https://bugs.launchpad.net/bugs/1228308. + + Approved by PS Jenkins bot, Brandon Schaefer. + +2013-09-20 Chris Townsend + + A regression caused by revno. 3515 breaks the recently fixed Quicklist and Tooltip active blur. This fixes it by checking if the View is a ViewWindow and if so, use QueueDraw() instead of NeedSoftRedraw(). + +2013-09-20 Automatic PS uploader + + Releasing 7.1.0+13.10.20130920-0ubuntu1 (revision 3524 from lp:unity). + + Approved by PS Jenkins bot. + +2013-09-20 Automatic PS uploader + + Releasing 7.1.0+13.10.20130920-0ubuntu1, based on r3524 + +2013-09-20 chris.gagnon + + BlackListDriverError moved to Display. Fixes: https://bugs.launchpad.net/bugs/1227882. + + Approved by Andrea Azzarone, PS Jenkins bot. + +2013-09-19 chris.gagnon + + update import to the new location + +2013-09-20 Stephen M. Webb + + render the Dash frame all the way to the bottom of the screen (lp: #1100120). Fixes: https://bugs.launchpad.net/bugs/1100120. + + Approved by Brandon Schaefer, PS Jenkins bot. + +2013-09-19 Stephen M. Webb + + adjusted clip rectangle even more + +2013-09-19 Stephen M. Webb + + unity-shared/OverlayRenderer.cpp: fixed copyright dates + +2013-09-19 Stephen M. Webb + + synch with trunk + +2013-08-22 Stephen M. Webb + + synched with trunk + +2013-03-11 Stephen M. Webb + + Adjusted clip height to accommodate previous height adjustment to the drawing area (lp: #1100120). + +2013-09-20 Marco Trevisan (Treviño) + + ShortcutController: fix typo on introspection data. + + Approved by PS Jenkins bot, Brandon Schaefer. + +2013-09-20 Marco Trevisan (Treviño) + + ShortcutController: fix typo on introspection data + +2013-09-19 Brandon Schaefer + + Only accept focus if the mouse moves in 3 directions on switcher start up if the mouse starts over the switcher window. This is an attempt to tell the difference between a bump and intentional movement. Fixes: https://bugs.launchpad.net/bugs/1223630. + + Approved by PS Jenkins bot, Christopher Townsend. + +2013-09-19 Brandon Schaefer + + * Restart bump handling each time we go in/out of detail mode + +2013-09-19 Brandon Schaefer + + * Left click in detail mode that is not over an icon should exit detail mode + +2013-09-19 Brandon Schaefer + + * Don't set check_mouse_first_time_ while handling detail mouse events + +2013-09-18 Brandon Schaefer + + * Add gtest for delta tracker + +2013-09-18 Brandon Schaefer + + * Merge trunk + +2013-09-18 Brandon Schaefer + + * Make sure we do the same for detail mode on start up. + * Remove old function that is not used anymore + +2013-09-18 Brandon Schaefer + + * GetFlatIcons does not need to part of the SwitcherView class. Its completly independent of the class, and is a untility function. + +2013-09-18 Brandon Schaefer + + * Use the SwitcherWindow as boarder instead of keeping track of which icon we are over. + +2013-09-17 Brandon Schaefer + + * Only check the mouse movement directions if the mouse is over the icon + +2013-09-11 Brandon Schaefer + + * Keep track of directions the mouse move has changed, if it has moved in all 4 + directions we are no longer a bump, and now the mouse should act normal. + +2013-09-19 Marco Trevisan (Treviño) + + Launcher: fix style to use postfixed-underscore for private members + + Also remove some tabs and useless members. + + Approved by Christopher Townsend, PS Jenkins bot. + +2013-09-19 Marco Trevisan (Treviño) + + Merging again with lp:~3v1n0/unity/animation-utils + +2013-09-19 Marco Trevisan (Treviño) + + Merging with lp:~3v1n0/unity/animation-utils + +2013-09-16 Marco Trevisan (Treviño) + + Merging with lp:~3v1n0/unity/launcher-nux-animation changes + +2013-09-13 Marco Trevisan (Treviño) + + Launcher: use std::pow(progress, 2) for drag animation + +2013-09-13 Marco Trevisan (Treviño) + + LauncherIcon: includes cleanup and remove useless ubus call + +2013-09-13 Marco Trevisan (Treviño) + + Launcher: cleanup the includes + +2013-09-13 Marco Trevisan (Treviño) + + Icons: remove the unneeded Launcher.h includes + +2013-09-13 Marco Trevisan (Treviño) + + Merging with lp:~3v1n0/unity/animation-utils/ + +2013-09-13 Marco Trevisan (Treviño) + + Launcher: fix style to use postfixed-underscore for private members + + Also remove some tabs and useless members + +2013-09-19 Marco Trevisan (Treviño) + + AnimationUtils: add utility functions to handle nux::Animation's start and reversion + + Update the whole code using nux::animation to use these facility functions. + + Approved by PS Jenkins bot, Christopher Townsend. + +2013-09-19 Marco Trevisan (Treviño) + + Launcher: add missing comma + + Damned typos! :P + +2013-09-19 Marco Trevisan (Treviño) + + Merging with trunk + +2013-09-13 Marco Trevisan (Treviño) + + Launcher: drag_over_animation should go in Backward direction + +2013-09-13 Marco Trevisan (Treviño) + + Merging with lp:~3v1n0/unity/launcher-nux-animation + +2013-09-13 Marco Trevisan (Treviño) + + AnimationUtils: add inline functions and move definition in AnimationUtils-inl.h + +2013-09-13 Marco Trevisan (Treviño) + + SessionController: use AnimationUtils methods to start and reverse the animation + +2013-09-13 Marco Trevisan (Treviño) + + ShortcutController: use AnimationUtils methods to start and reverse the animation + +2013-09-13 Marco Trevisan (Treviño) + + DashController: use AnimationUtils methods to start and reverse the menus animation + +2013-09-13 Marco Trevisan (Treviño) + + SwitcherController: use AnimationUtils methods to start and reverse the animation + +2013-09-13 Marco Trevisan (Treviño) + + LauncherIcon: use AnimationUtils methods to start and reverse the tooltip animation + +2013-09-13 Marco Trevisan (Treviño) + + HudController: use AnimationUtils methods to start and reverse the animation + +2013-09-13 Marco Trevisan (Treviño) + + DashController: use AnimationUtils methods to start and reverse the animation + +2013-09-13 Marco Trevisan (Treviño) + + TestAnimationUtils: verify GetDirection method + +2013-09-13 Marco Trevisan (Treviño) + + AnimationUtils: add GetDirectionStartedReversed + + And put into anonymous namespace + +2013-09-13 Marco Trevisan (Treviño) + + Launcher: use animation utils to start animations + +2013-09-13 Marco Trevisan (Treviño) + + TestAnimationUtils: verify unity::animation utils + +2013-09-13 Marco Trevisan (Treviño) + + AnimationUtils: add utility functions to handle nux::Animation's start and reversion + +2013-09-18 Chris Townsend + + It appears that it's not a timeout causing these tests to really fail. It seems that Jenkins is unable to connect to GlibDBusProxy which leads to the timeout. For now, let's just remove the most troublesome tests so we can get automerging to work and then revisit the real reason why this is happening. Fixes: https://bugs.launchpad.net/bugs/1224643. + + Approved by PS Jenkins bot, Brandon Schaefer. + +2013-09-18 Chris Townsend + + It appears that it's not a timeout causing these tests to really fail. It seems that Jenkins is unable to connect to GlibDBusProxy which leads to the timeout. For now, let's just remove the most troublesome tests so we can get automerging to work and then revisit the real reason why this is happening. + +2013-09-18 Chris Townsend + + When dragging and dropping an icon before another icon, the calculation to position the drop was off by half an icon which would cause some AP tests to fail. Fixes: https://bugs.launchpad.net/bugs/1227056. + + Approved by PS Jenkins bot, Brandon Schaefer. + +2013-09-18 Chris Townsend + + When dragging and dropping an icon before another icon, the calculation to position the drop was off by half an icon which would cause some AP tests to fail. + +2013-09-18 Brandon Schaefer + + Get the real shortcut to activate ibus. Fixes: https://bugs.launchpad.net/bugs/1227056. + + Approved by PS Jenkins bot, Christopher Townsend. + +2013-09-18 Brandon Schaefer + + * Lets get the real activate key...as the default should be Super+Space, but sometimes its still + Ctrl+Space. So lets just get the real value and use the first one. + +2013-09-18 Chris Townsend + + Increase the wait timeout to 15 seconds since 1 second didn't seem to make the unit test failure any better. Also add a timeout to the CheckResults method. Fixes: https://bugs.launchpad.net/bugs/1224643. + + Approved by Brandon Schaefer, PS Jenkins bot. + +2013-09-18 Chris Townsend + + Increase the wait timeout to 15 seconds since 1 seconds didn't seem to make the unit test failure any better. Also add a timeout to the CheckResults method. + +2013-09-18 Marco Trevisan (Treviño) + + UnityShell: redraw the dash also if a non-blurred area is damaged + + If the dash is damaged, but not the blurred area, it won't redraw. We need + to draw it, in order to avoid flickering of its border. + + Also, add the redraw_view_if_damaged utility function to redraw a view if + really needed. Fixes: https://bugs.launchpad.net/bugs/1224340. + + Approved by PS Jenkins bot, Brandon Schaefer. + +2013-09-16 Marco Trevisan (Treviño) + + UnityScreen: remove while iterating the animating show-desktop windows + + As this is done in donePaint, it's better to optimize things the most we can. + +2013-09-16 Marco Trevisan (Treviño) + + UnityShell: redraw the dash also if a non-blurred area is damaged + + If the dash is damaged, but not the blurred area, it won't redraw. We need + to draw it, in order to avoid flickering of its border. + + Also, add the redraw_view_if_damaged utility function to redraw a view if + really needed. + +2013-09-16 Marco Trevisan (Treviño) + + DashController: add DashView getter + +2013-09-18 Marco Trevisan (Treviño) + + ShortcutView: use StaticCairoText instead of StaticText for rendering the View + + Improves the text alignment and visual quality. + + Approved by PS Jenkins bot, Andrea Azzarone. + +2013-09-16 Marco Trevisan (Treviño) + + ShortcutView: use StaticCairoText instead of StaticText for rendering the View + + Improves the text aligment and visual quality + +2013-09-18 Andrea Azzarone + + Derive EdgeBarrierController::Impl from sigc::trackable and remove the use of c++11 lambdas for callbacks. Fixes: https://bugs.launchpad.net/bugs/1217560. + + Approved by PS Jenkins bot, Marco Trevisan (Treviño). + +2013-09-17 Andrea Azzarone + + Derive EdgeBarrierController::Impl from sigc::trackable and remove the use of c++11 lambdas for callbacks. + +2013-09-18 Chris Townsend + + Make the mouse movement infinite while loop into a for loop and only iterate 10 times w/ a 0.5 second delay between movements. Raise an error if the correct icon is not found when the loop terminates. + Consolidate the autoscroll_to_icon() function into the move_mouse_to_icon() function and change move_mouse_to_icon() to handle autoscrolling offsets. Fixes: https://bugs.launchpad.net/bugs/1226639. + + Approved by PS Jenkins bot, Brandon Schaefer. + +2013-09-17 Chris Townsend + + Make the mouse movement infinite while loop into a for loop and only iterate 10 times w/ a 0.5 second delay between movements. Raise an error if the correct icon is not found when the loop terminates. + Consolidate the autoscroll_to_icon() function into the move_mouse_to_icon() function and change move_mouse_to_icon() to handle autoscrolling offsets. + +2013-09-17 Andrea Azzarone + + Return a copy of memeber variables of DndData class. Should fix lp:1224569. Fixes: https://bugs.launchpad.net/bugs/1224569. + + Approved by PS Jenkins bot, Brandon Schaefer. + +2013-09-16 Andrea Azzarone + + Return a copy of memebr variables. Should fix lp:1224569. + +2013-09-17 Marco Trevisan (Treviño) + + Launcher: use nux::Animation for all the launcher animations + + This allows to do these when compiz requests to prepare painting, instead of + using only an idle to perform this. Fixes: https://bugs.launchpad.net/bugs/1224766, https://bugs.launchpad.net/bugs/1226114. + + Approved by PS Jenkins bot, Christopher Townsend. + +2013-09-16 Marco Trevisan (Treviño) + + Launcher: fix a regression I introduced due to int computation of speed + +2013-09-13 Marco Trevisan (Treviño) + + UBusMessages, Launcher: remove useless Ubus messages + +2013-09-13 Marco Trevisan (Treviño) + + TestLauncher: verify that the correct action state is set on drag cancel + +2013-09-13 Marco Trevisan (Treviño) + + Launcher: Set the action state to ACTION_DRAG_ICON_CANCELLED on drag cancel + + Otherwise the mouse-up event could trigger an activation. + +2013-09-13 Marco Trevisan (Treviño) + + Launcher: don't animate the launcher when on mouse over if it has not to unfold + +2013-09-12 Marco Trevisan (Treviño) + + Launcher: remove useless member variables and add some internal const + +2013-09-12 Marco Trevisan (Treviño) + + Launcher: make sure we properly smart-animate the icons when dragging over them + +2013-09-12 Marco Trevisan (Treviño) + + Launcher: remove useless display property + +2013-09-12 Marco Trevisan (Treviño) + + Launcher: remove some useless EnsureAnimation calls and rename them to QueueDraw + +2013-09-12 Marco Trevisan (Treviño) + + Launcher: No need to force a new idle if the hover value changed + + It already calls QueueDraw on callback + +2013-09-12 Marco Trevisan (Treviño) + + Launcher: use nux::Animation for all the launcher animations + + This allows to do these when compiz requests to prepare painting, instead of + using only an idle to perform this. + +2013-09-12 Marco Trevisan (Treviño) + + Merge with trunk + +2013-09-17 Marco Trevisan (Treviño) + + UnityScreen: add support for Super+Arrows shortcuts to manage the focused window + + Super+Arrows shortcut allows to move and maximize / restore / minimize + the focused window on the screen. Fixes: https://bugs.launchpad.net/bugs/751050, https://bugs.launchpad.net/bugs/992697. + + Approved by PS Jenkins bot, Christopher Townsend. + +2013-09-16 Marco Trevisan (Treviño) + + UnityScreen, CompizShortcutModeller: remove the custom keys to maximize or restore/minimize + + We already have them defined in compiz core nowadays, it's better not to create even more + fragmentation, but reusing what we can. Sadly I've to remove code :'( + +2013-09-16 Marco Trevisan (Treviño) + + manual-tests: remove SuperArrows.txt test, now we have AP for it + +2013-09-16 Marco Trevisan (Treviño) + + WindowManagerKeybindings: add scenarios to perform the tests for Maximized and Restored windows + +2013-09-16 Marco Trevisan (Treviño) + + autopilot, WindowManagerKeybindings: verify the window restoration after vertical maximization + +2013-09-16 Marco Trevisan (Treviño) + + autopilot, WindowManagerKeybindings: verify right/left maximization geometries + +2013-09-16 Marco Trevisan (Treviño) + + autopilot, WindowManagerKeybindings: added new keybindings AP tests + +2013-09-16 Marco Trevisan (Treviño) + + UnityWindow: add more introspectable data about the window state for AP + +2013-09-14 Marco Trevisan (Treviño) + + UnityShell.xml: adapt the default window management keybindings to new values + +2013-09-14 Marco Trevisan (Treviño) + + CompizShortcutModeller: update the options to use the new unity shortcuts + +2013-09-14 Marco Trevisan (Treviño) + + UnityScreen: consume the key actions or they will be repeated around + +2013-09-14 Marco Trevisan (Treviño) + + After 1 year and 7 months... Merging again with trunk! :) + + ... And it works ;-) + +2012-02-14 Marco Trevisan (Treviño) + + Merging with trunk + +2012-01-28 Marco Trevisan (Treviño) + + manual-tests: added the test for Super+Arrows + +2012-01-28 Marco Trevisan (Treviño) + + UnityScreen: add support for Super+Arrows shortcuts to manage the focused window + + Super+Arrows shortcut allows to move and maximize / restore / minimize + the focused window on the screen. + +2012-01-28 Marco Trevisan (Treviño) + + WindowManager (PluginAdapter): support methods to (right/left)-maximize and check the status + + They allow to maximize a window, or to vertically maximize it and put on a side of + the screen. + +2013-09-16 Chris Townsend + + Set the wait timeout to a longer period (1000ms) since many Jenkins CI tests are failing in the TestIconLoader tests. Fixes: https://bugs.launchpad.net/bugs/1224643. + + Approved by PS Jenkins bot, Brandon Schaefer. + +2013-09-16 Chris Townsend + + Set the wait timeout to a longer period since many Jenkins CI tests are failing in the TestIconLoader tests. + +2013-09-16 Andrea Azzarone + + Fix randomly failing AP test. Fixes: https://bugs.launchpad.net/bugs/1226116. + + Approved by PS Jenkins bot, Brandon Schaefer. + +2013-09-16 Andrea Azzarone + + Fix lp:1226116. + +2013-09-13 Lars Uebernickel + + panel-service: fix order when paging through menus with left/right keys. Fixes: https://bugs.launchpad.net/bugs/1183994. + + Approved by Christopher Townsend, Stephen M. Webb, PS Jenkins bot. + +2013-09-13 Lars Uebernickel + + Use MAX_INDICATOR_ENTRIES instead of hardcoding '100' + +2013-09-12 Lars Uebernickel + + panel-service: fix order when paging through menus with left/right keys + +2013-09-12 Brandon Schaefer + + Make sure we move the mouse over the target icon while we are dragging the source icon. + + Approved by PS Jenkins bot, Christopher Townsend. + +2013-09-12 Brandon Schaefer + + * Make sure we move the mouse over the target icon while we are dragging the source icon. + +2013-09-12 Brandon Schaefer + + Set an upper bound on the amount of icons we go through to check tooltips. As the accordion effect was causing the mouse to go through the icons to fast, making the test fail. + + Approved by PS Jenkins bot, Christopher Townsend. + +2013-09-12 Brandon Schaefer + + * 4 spaces, not 2! + +2013-09-12 Brandon Schaefer + + * Must avoid the accordion effect, when attemtping to test the tooltips. + When we hit the bottom, and the accordion start to open the icons pass to quickly. + Causing the test to fail. + +2013-09-12 Chris Townsend + + Use the first two icons in the Launcher to assure the icons are always on the screen for this particular Autopilot test. Fixes: https://bugs.launchpad.net/bugs/1219636. + + Approved by PS Jenkins bot, Brandon Schaefer. + +2013-09-12 Chris Townsend + + Use the first two icons in the Launcher to assure the icons are always on the screen for this particular Autopilot test. + +2013-09-12 Marco Trevisan (Treviño) + + ApplicationLauncherIcon: log unity zeitgeist events on stick, unstick, removal and delete. Fixes: https://bugs.launchpad.net/bugs/779449. + + Approved by PS Jenkins bot, Andrea Azzarone. + +2013-09-11 Marco Trevisan (Treviño) + + Launcher: stick and save icons dragged around + +2013-09-11 Marco Trevisan (Treviño) + + TestLauncherController: verify the unity events logging + +2013-09-11 Marco Trevisan (Treviño) + + LauncherController: allow to emit the save signal when creating new favorite + + It allows to log events in zeitgeist + +2013-09-11 Marco Trevisan (Treviño) + + TestApplicationLauncherIcon: verify leave events logging + +2013-09-11 Marco Trevisan (Treviño) + + ApplicationLauncherIcon: log leave event on icon removal + +2013-09-11 Marco Trevisan (Treviño) + + ApplicationLauncherIcon: add GetApplication protected method + +2013-09-11 Marco Trevisan (Treviño) + + LauncherController: stick the SWcenter icon, not the app. + + Add a test for this as well... + +2013-09-11 Marco Trevisan (Treviño) + + ApplicationLauncherIcon: make sure that the desktop file is updated when all other emblems are set + +2013-09-11 Marco Trevisan (Treviño) + + ApplicationManager: add Leave app event (and implement for desktop::Application) + +2013-09-11 Marco Trevisan (Treviño) + + TestSoftwareCenterLauncherIcon: verify log event on installation finished + +2013-09-11 Marco Trevisan (Treviño) + + TestApplicationLauncherIcon: verify LogUnityEvent + +2013-09-11 Marco Trevisan (Treviño) + + TestApplicationLauncherIcon: derivate from testmocks::TestUnityAppBase + +2013-09-11 Marco Trevisan (Treviño) + + TestLauncherController: derivate from testmocks::TestUnityAppBase and add log tests + +2013-09-11 Marco Trevisan (Treviño) + + TestTrashLauncherIcon: derivate from testmocks::TestUnityAppBase + +2013-09-11 Marco Trevisan (Treviño) + + MockApplication: add TestUnityAppBase struct to test UnityApplication + +2013-09-11 Marco Trevisan (Treviño) + + TestApplicationLauncherIcon: verify the event logging on stick / unstick + +2013-09-11 Marco Trevisan (Treviño) + + ApplicationLauncherIcon: log unity zeitgeist events on stick, unstick and delete + +2013-09-10 Marco Trevisan (Treviño) + + TestTrashLauncherIcon: verify and clear the expectations of the Unity App when starting the test + +2013-09-10 Marco Trevisan (Treviño) + + TestTrashLauncherIcon: initialize unity app at every test startup + +2013-09-10 Marco Trevisan (Treviño) + + SoftwareCenterLauncherIcon: make sure we access to the new_app ptr only if valid + +2013-09-12 Marco Trevisan (Treviño) + + Launcher: only fade the launcher when in auto-hide and dash is opened. Fixes: https://bugs.launchpad.net/bugs/1044926, https://bugs.launchpad.net/bugs/1223979. + + Approved by PS Jenkins bot, Christopher Townsend. + +2013-09-12 Marco Trevisan (Treviño) + + Launcher: use nux::Animation to compute the fade progress level on dash showing + + This will make it match with the DashController one + +2013-09-11 Marco Trevisan (Treviño) + + Launcher: only fade the launcher when in auto-hide and dash is opened + +2013-09-12 Brandon Schaefer + + When the shortcut is open, and we receive a ButtonPress or KeyPress hide it. As this causes problems else where, and it really should close if the user attempts to do anything (even while holding super!). Fixes: https://bugs.launchpad.net/bugs/932718. + + Approved by PS Jenkins bot, Marco Trevisan (Treviño). + +2013-09-10 Brandon Schaefer + + * If a button/key is pressed and the shortcut hint is open close it! + +2013-09-12 Brandon Schaefer + + Add an option to disable the mouse in the switcher. Fixes: https://bugs.launchpad.net/bugs/1224048. + + Approved by PS Jenkins bot, Christopher Townsend. + +2013-09-11 Brandon Schaefer + + * Add option to disable the mouse from the switcher + +2013-09-11 Chris Townsend + + Move the _compute_blur_bkg bool into the QuicklistView::Draw() method to actually get active blur to work. Fixes: https://bugs.launchpad.net/bugs/873387. + + Approved by PS Jenkins bot, Brandon Schaefer. + +2013-09-11 Chris Townsend + + I didn't realize there was already support in place for Quicklist active blur, so I removed all of the code I added for that in the last commit. Instead, all this needed is to move the _compute_blur_bkg boolean to the QuicklistView::Draw() method. + +2013-09-09 Chris Townsend + + Add support to allow active blur under Quicklists. + Also move the _compute_blur_bkg bool into the Draw method to actually get active blur to work. + +2013-09-11 Chris Townsend + + Move the _compute_blur_bkg bool to the Tooltip::Draw() method since the CairoBaseWindow::Draw() method sets this to false causing subsequent draws to never update the background texture. Fixes: https://bugs.launchpad.net/bugs/1052782. + + Approved by PS Jenkins bot, Marco Trevisan (Treviño), Brandon Schaefer. + +2013-09-09 Chris Townsend + + Move the _compute_blur_bkg bool to the Draw method since the CairoBaseWindow::Draw() method sets this to false causing subsequent draws to never update the background texture. + +2013-09-11 Brandon Schaefer + + Make sure we ignore mouse movement over detail icons if the mouse starts over it at start. Let the mouse take selection control once it moves outside of any icon, vs having to enter a different icon. Fixes: https://bugs.launchpad.net/bugs/1223037, https://bugs.launchpad.net/bugs/1223039. + + Approved by PS Jenkins bot, Christopher Townsend. + +2013-09-09 Brandon Schaefer + + * Use else if... + +2013-09-09 Brandon Schaefer + + * Make sure on first start we ignore mouse moves over detail icons. + * Regain mouse selection control if we move outside any icon vs entering a different icon. + +2013-09-11 Chris Townsend + + Due to a change libdbusmenu, need to use a fully qualified name for the Dbus object name. Fixes: https://bugs.launchpad.net/bugs/1223561. + + Approved by PS Jenkins bot, Marco Trevisan (Treviño). + +2013-09-11 Chris Townsend + + Due to a change libdbusmenu, need to use a fully qualified name for the Dbus object name. + +2013-09-07 Marco Trevisan (Treviño) + + Application: add desktop_id method, and implement in desktop::Application. + + Approved by Brandon Schaefer, PS Jenkins bot. + +2013-09-06 Marco Trevisan (Treviño) + + Merging with lp:~3v1n0/unity/desktop-app-manager + +2013-09-05 Marco Trevisan (Treviño) + + TestLauncherController: get rid of the dependency on real desktop-id for URIs + +2013-09-05 Marco Trevisan (Treviño) + + Application: add desktop_id method, and implement in desktop::Application + +2013-09-07 Chris Townsend + + The logic to detect when a Quicklist may be off the screen did not take into account the default top size of 4, so any Quicklists near the bottom would have blur that was shifted down 4 pixels. Fixes: https://bugs.launchpad.net/bugs/819663. + + Approved by Brandon Schaefer, PS Jenkins bot. + +2013-09-04 Chris Townsend + + The logic to detect when a quicklist may be off the screen did not take into account the default top size of 4, so any quicklists near the bottom would have blur that was shifted down 4 pixels. + +2013-09-06 Marco Trevisan (Treviño) + + DesktopApplicationManager: added new app manager layer so that we can emit app events. + + Approved by Brandon Schaefer, PS Jenkins bot. + +2013-09-06 Marco Trevisan (Treviño) + + TestTrashLauncherIcon: add more log checks + +2013-09-06 Marco Trevisan (Treviño) + + MockApplication: use tuple for log events and add function to verify them + +2013-09-05 Marco Trevisan (Treviño) + + TestTrashLauncherIcon: verify that delete events gets logged by unity app on Dnd drop + +2013-09-05 Marco Trevisan (Treviño) + + TestDesktopApplicationSubject: add equalty tests + +2013-09-05 Marco Trevisan (Treviño) + + ApplicationManager: add equalty operators to ApplicationSubject + +2013-09-05 Marco Trevisan (Treviño) + + MockApplication: return a MockApplication::Nice as UnityApplication + +2013-09-05 Marco Trevisan (Treviño) + + TestTrashLauncherIcon: verify that files gets trashed on Dnd request + +2013-09-05 Marco Trevisan (Treviño) + + TrashLauncherIcon: use FileManager to trash files on DnD + +2013-09-05 Marco Trevisan (Treviño) + + TestApplicationLauncherIcon: fix typo on MatcherP + +2013-09-05 Marco Trevisan (Treviño) + + FileManager: add TrashFile action + +2013-09-05 Marco Trevisan (Treviño) + + TrashLauncherIcon: use AppManager's UnityApplication for logging removal events + +2013-09-05 Marco Trevisan (Treviño) + + BamfApplicationManager: add real implementation of GetUnityApplication + +2013-09-05 Marco Trevisan (Treviño) + + DesktopApplicationManager: use better style for ApplicationSubject setter functions + +2013-09-05 Marco Trevisan (Treviño) + + DesktopApplicationManager: use "application://" prefix for actor uri + +2013-09-04 Marco Trevisan (Treviño) + + ApplicationManager: add GetUnityApplication getter with stub implementations + +2013-09-04 Marco Trevisan (Treviño) + + ApplicationManager: make manager methods const + +2013-09-04 Marco Trevisan (Treviño) + + DesktopApplicationManager: add LogEvent definition using zeitgeist to log events + +2013-09-04 Marco Trevisan (Treviño) + + TestDesktopApplicationSubject: verify copy constructors + +2013-09-04 Marco Trevisan (Treviño) + + MockApplication: add mock ApplicationSubject definition + +2013-09-04 Marco Trevisan (Treviño) + + DesktopApplicationSubject: add copy constructors and internal zeitgeist event getter + +2013-09-03 Marco Trevisan (Treviño) + + TestDesktopApplicationSubject: add tests for desktop::ApplicationSubject + +2013-09-03 Marco Trevisan (Treviño) + + DesktopApplicationManager: add implementation for desktop::ApplicationSubject + +2013-09-03 Marco Trevisan (Treviño) + + MockApplication: implement new logging methods + +2013-09-03 Marco Trevisan (Treviño) + + DesktopApplicationManager: add skeleton implementation for event logging + +2013-09-02 Marco Trevisan (Treviño) + + ZeitgeistUtils: add different workaround to include new zeitgeist + +2013-09-02 Marco Trevisan (Treviño) + + Merging with trunk + +2013-08-30 Marco Trevisan (Treviño) + + TrashLauncherIcon: always use the GCancellable for GFile operations + +2013-08-30 Marco Trevisan (Treviño) + + TrashLauncherIcon: ignore include errors from zeitgeist library + +2013-08-30 Marco Trevisan (Treviño) + + Merging with lp:~bregma/unity/lp-1197569 + +2013-09-06 Brandon Schaefer + + Ignore mouse movements if the mouse starts over a switcher icon. Clicking still works fine, we just wont steal focus from the alt+tab work. Fixes: https://bugs.launchpad.net/bugs/1215630. + + Approved by PS Jenkins bot, Marco Trevisan (Treviño). + +2013-09-05 Brandon Schaefer + + * We should make sure its defined... + +2013-09-05 Brandon Schaefer + + * Better way to avoid changing the focus on a mouse bump, if the mouse + starts over an icon. + +2013-09-05 Chris Townsend + + Fixes issue where entering keynav mode may make the BFB icon scroll off the top of the Launcher. Fixes: https://bugs.launchpad.net/bugs/1068166, https://bugs.launchpad.net/bugs/1219636. + + Approved by PS Jenkins bot, Stephen M. Webb. + +2013-09-05 Chris Townsend + + Fixes issue where entering keynav mode may make the BFB icon scroll off the top of the Launcher. + +2013-09-03 Automatic PS uploader + + Releasing 7.1.0+13.10.20130903.1-0ubuntu1 (revision 3488 from lp:unity). + + Approved by PS Jenkins bot. + +2013-09-03 Automatic PS uploader + + Releasing 7.1.0+13.10.20130903.1-0ubuntu1, based on r3488 + +2013-09-02 Stephen M. Webb + + moved to zeitgeist-2.0. Fixes: https://bugs.launchpad.net/bugs/1197569. + + Approved by Marco Trevisan (Treviño), PS Jenkins bot. + +2013-08-30 Stephen M. Webb + + synched with trunk + +2013-08-30 Stephen M. Webb + + ignored zeitgeist.h warning + +2013-08-19 Stephen M. Webb + + Adjusted for libzeitgeis 2.0 API (lp: #1197569). + +2013-08-17 Stephen M. Webb + + changed zeitgeist dependency to 2.0 + +2013-08-30 Marco Trevisan (Treviño) + + ApplicationLauncherIcon: make sure we unstick an icon, update its URI and resave it in order + + Also improving a lot the SoftwareCenterLauncherIcon code and the install behaviour. Fixes: https://bugs.launchpad.net/bugs/1217849, https://bugs.launchpad.net/bugs/1218504. + + Approved by Christopher Townsend, PS Jenkins bot. + +2013-08-29 Marco Trevisan (Treviño) + + TestSoftwareCenterLauncherIcon: add more animation tests + +2013-08-29 Marco Trevisan (Treviño) + + TestLauncherDragWindow: test initialization refactoring + +2013-08-29 Marco Trevisan (Treviño) + + TestLauncherDragWindow: update to match the current API + +2013-08-28 Marco Trevisan (Treviño) + + LauncherController, SoftwareCenterLauncherIcon: don't animate unless we have the final icon position + +2013-08-28 Marco Trevisan (Treviño) + + SoftwareCenterLauncherIcon: don't store any Launcher reference + +2013-08-28 Marco Trevisan (Treviño) + + LauncherDragWindow: add LauncherDragWindow::Ptr definition + +2013-08-28 Marco Trevisan (Treviño) + + LauncherDragWindow: make it generate the texture and improve the callback + + Simplify Launcher and SoftwareCenterLauncherIcon code + +2013-08-28 Marco Trevisan (Treviño) + + SoftwareCenterLauncherIcon: use dynamically allocated DBusProxy and delete it when finished + +2013-08-28 Marco Trevisan (Treviño) + + ApplicationLauncherIcon: make sure we unstick an icon, update its URI and resave it in order + +2013-08-28 Marco Trevisan (Treviño) + + TestApplicationLauncherIcon: improve sticky/unsticky tests, verify that icon uris are updated correctly + + The latter is failing for now + +2013-08-28 Marco Trevisan (Treviño) + + MockApplication: add nicer visibility setter + +2013-08-28 Marco Trevisan (Treviño) + + ApplicationLauncherIcon: always match visibility quirk with app visibility + +2013-08-28 Marco Trevisan (Treviño) + + ApplicationLauncherIcon: SetApplication can nullify the inner pointer + +2013-08-23 Marco Trevisan (Treviño) + + SoftwareCenterLauncherIcon: create space on launcher before moving an icon to the final position + + Now the launcher create the room for the icon, then it flies there. + +2013-08-23 Marco Trevisan (Treviño) + + SoftwareCenterLauncherIcon: use test-friend class + +2013-08-23 Marco Trevisan (Treviño) + + SoftwareCenterLauncherIcon: use new Variant features for getting the progress + +2013-08-23 Marco Trevisan (Treviño) + + TestGLibVariant: verify the estraction of basic types from Variant + +2013-08-23 Marco Trevisan (Treviño) + + TestGLibVariant: test GetVariant + +2013-08-23 Marco Trevisan (Treviño) + + Variant: add GetVariant method + +2013-08-23 Marco Trevisan (Treviño) + + Variant: allow to get simple types from a GVariant containing a Variant type value + +2013-08-29 Chris Townsend + + Fix the code formatting introduced in revno. 3485. + + Approved by PS Jenkins bot, Brandon Schaefer. + +2013-08-29 Chris Townsend + + Fixed formatting in code introduced in revno. 3485. + +2013-08-29 Ted Gould + + Use libupstart for sending Upstart signals. + + Approved by Christopher Townsend, PS Jenkins bot. + +2013-08-26 Ted Gould + + White space fix + +2013-08-25 Ted Gould + + Updated to trunk + +2013-08-25 Ted Gould + + Updating test deps + +2013-08-07 Ted Gould + + Clarifying what we emit + +2013-08-07 Ted Gould + + Whitespace + +2013-08-07 Ted Gould + + Emit a shutdown signal when shutting down + +2013-08-07 Ted Gould + + Switch to emitting the start signal via the proxy + +2013-08-07 Ted Gould + + Adding the Upstart proxy as a member variable + +2013-08-07 Ted Gould + + Adding deps for building with libupstart + +2013-08-29 Automatic PS uploader + + Releasing 7.1.0+13.10.20130829.1-0ubuntu1 (revision 3483 from lp:unity). + + Approved by PS Jenkins bot. + +2013-08-29 Automatic PS uploader + + Releasing 7.1.0+13.10.20130829.1-0ubuntu1, based on r3483 + +2013-08-28 Automatic PS uploader + + Releasing 7.1.0+13.10.20130828.1-0ubuntu1 (revision 3481 from lp:unity). + + Approved by PS Jenkins bot. + +2013-08-28 Automatic PS uploader + + Releasing 7.1.0+13.10.20130828.1-0ubuntu1, based on r3481 + +2013-08-28 Brandon Schaefer + + Fixes: + unity.tests.test_switcher.SwitcherDetailsMouseTests.test_mouse_click_will_activate_detail_icon(show_desktop_icon_true) + unity.tests.test_switcher.SwitcherDetailsMouseTests.test_mouse_click_will_activate_detail_icon(show_desktop_icon_false). Fixes: https://bugs.launchpad.net/bugs/1217592. + + Approved by PS Jenkins bot, Christopher Townsend. + +2013-08-27 Brandon Schaefer + + * Only say we have handled a mouse up event if we are inside the close button.. + +2013-08-27 Brandon Schaefer + + * Fix a failing AP test...not counting the mouse up in the swicher...causing it to never fully click. Click twice to ensure one gets through... + +2013-08-28 Pawel Stolowski + + Handle a new PERFORM_SEARCH activation response defined by libunity (perform a new search with given query). + + Approved by PS Jenkins bot, Michal Hruby. + +2013-08-28 Pawel Stolowski + + Restored accidently removed changelog entry. + +2013-08-27 Pawel Stolowski + + Require libunity>=7.1.0. + +2013-08-26 Pawel Stolowski + + Updated libunity requirements. + +2013-08-26 Pawel Stolowski + + Updated for PERFORM_SEARCH change, fixed changelog. + +2013-08-26 Pawel Stolowski + + Merged trunk. + +2013-08-16 Pawel Stolowski + + Update changelog. + +2013-08-16 Pawel Stolowski + + Bump required libunity. + +2013-08-16 Pawel Stolowski + + Handle DO_SEARCH activation response (issue a new search query). + +2013-08-27 Brandon Schaefer + + Quick fix to enable the compose key which is turned off by default. + + Finding a better fix soon. Fixes: https://bugs.launchpad.net/bugs/1216979. + + Approved by PS Jenkins bot, Thomi Richards, Sebastien Bacher. + +2013-08-27 Brandon Schaefer + + * Quick fix to fix blocking + +2013-08-27 Michal Hruby + + Added support for colorizing UnityProtocolAnnotatedIcon. + + Approved by PS Jenkins bot, Marco Trevisan (Treviño). + +2013-08-27 Michal Hruby + + Use GetInternalContext to paint to the surfaces + +2013-08-27 Michal Hruby + + Bump libunity requirement in debian + +2013-08-27 Michal Hruby + + Add a test + +2013-08-27 Michal Hruby + + Add ability to colorize AnnotatedIcons + +2013-08-27 Chris Townsend + + Do not display the scope bar at the bottom when the Command "Lens" is opened as it's not really not a Lens/Scope. Fixes: https://bugs.launchpad.net/bugs/1168019. + + Approved by PS Jenkins bot, Brandon Schaefer. + +2013-08-27 Chris Townsend + + Update tests/CMakeLists.txt to include the new mock commands.scope. + Add back in the testscope4.scope and update the test to check for 5 scopes. + +2013-08-27 Chris Townsend + + Add a dummy Commands scope since Jenkins does not have a commands.scope already installed. + +2013-08-26 Chris Townsend + + Add unit test to ensure Scope Bar is invisible when activating the Command "Lens". + +2013-08-26 Chris Townsend + + Do not display the scope bar at the bottom when the Command "Lens" is opened as it's not really not a Lens/Scope. + +2013-08-22 Automatic PS uploader + + Releasing 7.1.0+13.10.20130822-0ubuntu1 (revision 3476 from lp:unity). + + Approved by PS Jenkins bot. + +2013-08-22 Automatic PS uploader + + Releasing 7.1.0+13.10.20130822-0ubuntu1, based on r3476 + +2013-08-21 Łukasz 'sil2100' Zemczak + + We now have indicator-keyboard - recommend it along other indicators. + + Approved by PS Jenkins bot, Sebastien Bacher. + +2013-08-21 Łukasz 'sil2100' Zemczak + + We now have indicator-keyboard - recommend it along other indicators + +2013-08-21 Łukasz 'sil2100' Zemczak + + Bump the build dependency on compiz to 0.9.10 + +2013-08-16 Automatic PS uploader + + Releasing 7.1.0+13.10.20130816.3-0ubuntu1 (revision 3473 from lp:unity). + + Approved by PS Jenkins bot. + +2013-08-16 Automatic PS uploader + + Releasing 7.1.0+13.10.20130816.3-0ubuntu1, based on r3473 + +2013-08-16 Nick Dedekind + + Fixed duplicate categories in scope caused by full resync on model change. Fixes: https://bugs.launchpad.net/bugs/1212945. + + Approved by PS Jenkins bot, Michal Hruby. + +2013-08-16 Nick Dedekind + + removed unneeded var. + +2013-08-16 Nick Dedekind + + better handling of adding categories/filters + +2013-08-16 Nick Dedekind + + Fixed duplcate categories + +2013-08-16 Stephen M. Webb + + removed debug output thatcould cause a potential security problem (lp: #1051921). Fixes: https://bugs.launchpad.net/bugs/1051921. + + Approved by PS Jenkins bot, Brandon Schaefer. + +2013-08-15 Stephen M. Webb + + Removed debug output of style graphics (lp: #1051921). + +2013-08-15 Nick Dedekind + + Don't re-add the rows for filters and categories if the model changes. + + Approved by Michal Hruby, PS Jenkins bot. + +2013-08-15 Nick Dedekind + + Dont do row additions for categories and filters when changing model. Framework does it for you + +2013-08-15 Chris Townsend + + Fix issue where the same app on different workspaces would not allow alt-tab to work properly when trying to switch to the last used app on the same workspace. Fixes: https://bugs.launchpad.net/bugs/1211261. + + Approved by PS Jenkins bot. + +2013-08-13 Chris Townsend + + Fix issue where the same app on different workspaces would not allow alt-tab to work properly when trying to switch to the last used app on the same workspace. + +2013-08-15 Michal Hruby + + Make sure we emit row_added signals for all rows present in a model when changing a model Model::SetModel(). Fixes: https://bugs.launchpad.net/bugs/1212580. + + Approved by PS Jenkins bot, Michał Sawicz, Nick Dedekind. + +2013-08-15 Michal Hruby + + Ensure we're not emitting filter signals with invalid Filter instances + +2013-08-14 Stephen M. Webb + + added photo lens shortcut to the shortcuts hint window (lp: #1069644). Fixes: https://bugs.launchpad.net/bugs/1069644. + + Approved by PS Jenkins bot, Christopher Townsend, Marco Trevisan (Treviño). + +2013-08-14 Stephen M. Webb + + Fixed name of Files Lens + +2013-07-09 Stephen M. Webb + + reformatted DashHintsContains function for clarity + +2013-07-08 Stephen M. Webb + + fixed new test + +2013-07-08 Stephen M. Webb + + added test case, synch with trunk + +2013-07-06 Andrew McCarthy + + Add shortcut hint for Photo lens (lp: #1069644). + +2013-08-13 Automatic PS uploader + + Releasing 7.1.0+13.10.20130813.1-0ubuntu1 (revision 3466 from lp:unity). + + Approved by PS Jenkins bot. + +2013-08-13 Automatic PS uploader + + Releasing 7.1.0+13.10.20130813.1-0ubuntu1, based on r3466 + +2013-08-12 Brandon Schaefer + + Attempt to use more canonical words for the ibus AP tests, so we end up with a more used word, vs one the might change. Fixes: https://bugs.launchpad.net/bugs/1211501. + + Approved by PS Jenkins bot, Stephen M. Webb. + +2013-08-12 Brandon Schaefer + + * "disk" in pinyin is giving a different preference while running jenkins. + * Replace the "disk" test with "hello". + * Use "managment" instead of "disk managment" + +2013-08-12 Brandon Schaefer + + Fix ibus-anthy AP tests, due to a failing commit key Ctrl+J being changed to now turn off/on the ibus-anthy engine. Fixes: https://bugs.launchpad.net/bugs/1211464. + + Approved by PS Jenkins bot, Stephen M. Webb. + +2013-08-12 Brandon Schaefer + + * ibus-anthy has Ctrl+J as turning the input method on and off now. Though + Ctrl+J is also still listed as how to commit text, it is turning of the IM + before doing so causing tests to fail. So instead of using Ctrl+J we will just + use Enter. + +2013-08-12 Automatic PS uploader + + Releasing 7.1.0+13.10.20130812.1-0ubuntu1 (revision 3462 from lp:unity). + + Approved by PS Jenkins bot. + +2013-08-12 Automatic PS uploader + + Releasing 7.1.0+13.10.20130812.1-0ubuntu1, based on r3462 + +2013-08-12 Michal Hruby + + Fix a leak in scope activation. Pass the original result if the activation fails. + + Approved by PS Jenkins bot, Nick Dedekind. + +2013-08-09 Michal Hruby + + Fix a leak + +2013-08-12 Brandon Schaefer + + Adds the ability to use the mouse in the switcher. Fixes: https://bugs.launchpad.net/bugs/824965. + + Approved by PS Jenkins bot, Christopher Townsend. + +2013-08-09 Brandon Schaefer + + * Don't emit 'inside' just check locally and emit hide_request if outside the background area + +2013-08-08 Brandon Schaefer + + * Merge Trunk + +2013-08-08 Brandon Schaefer + + * Do not close if the mouse is inside the background of the switcher + +2013-08-08 Brandon Schaefer + + * Fix crash, and fix AP tests + +2013-08-01 Brandon Schaefer + + * Forgot to update tests + +2013-07-31 Brandon Schaefer + + * Fix up reviewers comment + +2013-07-26 Brandon Schaefer + + * When you close all the detail windows we close the switcher. + As we can't safely add/remove icons from the application list, + as iterators can be exposed. Aslo getting a crash when removing the last one + needs to be looked at a bit more. + +2013-07-25 Brandon Schaefer + + * Fixed up reviewers comment + +2013-07-22 Brandon Schaefer + + * Fixed based on reviewers comment + - Click outside closes switcher + - Multi-monitor works in detail mode + - Magic numbers fixed up (hopefully better names!) + - Better signal names. + - Flipped the scroll direction + - Middle click now closes + - Possibly something else! + +2013-07-18 Brandon Schaefer + + * I guess you have to set the view to actually accept wheel events. Go figure. + +2013-07-18 Brandon Schaefer + + * Moves scrolling event handing inside SwitcherView + +2013-07-18 Brandon Schaefer + + * Fix failing unit test + +2013-07-18 Brandon Schaefer + + * Adds AP tests for detail mouse mode + +2013-07-17 Brandon Schaefer + + * Add a couple tests + +2013-07-17 Brandon Schaefer + + * Cant use static, as you need to reset the last_icon state, saddly :( + +2013-07-17 Brandon Schaefer + + * Move logic from SwitcherController -> SwitcherView + * Mouse will only change the selected icon when it hits a different icon then it hit last. + - This means if you hightlight icon 0, then use the keyboard to move the selection over, the + mouse will not steal selection until it hits a new icon. + * Added AP tests for normal icon mouse movement + +2013-07-16 Brandon Schaefer + + * Add right clicking to toggle detail mode. + * Refactor lambda funciton into a CB functions + +2013-07-15 Brandon Schaefer + + * You can use the mouse now in the switcher :) + +2013-08-12 Brandon Schaefer + + Don't make the ScopeView/DashView/ScrollView Visible on start up (bool wise, causing things to think its ok to render). Fixes: https://bugs.launchpad.net/bugs/1201631. + + Approved by PS Jenkins bot, Christopher Townsend. + +2013-07-18 Brandon Schaefer + + * On first start, this code sets the dashview/scopeview/scroll view to visible when it is not. + This causes the overlay scroll bar to think its ok to render... + + *** NOTE: The code being removed was mentioned to fix focus on the dash on start up... but + after removing the code, I still get dash focus on start up. Would like someone else + to test this :). + +2013-08-12 Brandon Schaefer + + Add ibus.py to the tests/autopilot/unity/emulators from lp:autopilot. Fixes: https://bugs.launchpad.net/bugs/1210661. + + Approved by PS Jenkins bot, Christopher Townsend. + +2013-08-05 Brandon Schaefer + + * Move ibus.py emulator from lp:autopilot to lp:unity + +2013-08-11 Andrea Azzarone + + Add edge barriers to unity::panel::PanelView. Fixes: https://bugs.launchpad.net/bugs/931384. + + Approved by PS Jenkins bot, Brandon Schaefer. + +2013-08-09 Andrea Azzarone + + Remove some code duplication. + +2013-08-08 Andrea Azzarone + + Add edge barriers to panels too. Unit tests added. + +2013-08-07 Andrea Azzarone + + Inject the EdgeBarrierController in launcher controller. + +2013-08-07 Andrea Azzarone + + Support both vertical and horizontal barriers. Add tests too. + +2013-08-09 Marco Trevisan (Treviño) + + ApplicationLauncherIcon: Create a local desktop file when sticking an app that has not + + Also make icon sticky only if both the icon itself and the inner app is sticky as well. Fixes: https://bugs.launchpad.net/bugs/704046, https://bugs.launchpad.net/bugs/753305, https://bugs.launchpad.net/bugs/754334, https://bugs.launchpad.net/bugs/765466, https://bugs.launchpad.net/bugs/1209320. + + Approved by Christopher Townsend, PS Jenkins bot. + +2013-08-09 Marco Trevisan (Treviño) + + TestLauncher: Use WaitUntilMSec with lambda body to ensure dragged window is deleted + +2013-08-09 Marco Trevisan (Treviño) + + TestLauncher: use WaitPendingEvents instead of a fixed timeout + +2013-08-07 Marco Trevisan (Treviño) + + StandaloneAppManager: update against recente appmanager changes + +2013-08-07 Marco Trevisan (Treviño) + + TestApplicationLauncherIcon: verify sticking of desktop'ed an desktopless apps + +2013-08-07 Marco Trevisan (Treviño) + + ApplicationLauncherIcon: Create a local desktop file when sticking an app that has not + + Also make icon sticky only if both the icon itself and the inner app is sticky as well. + +2013-08-07 Marco Trevisan (Treviño) + + BamfApplicationManager: add and implement CreateLocalDesktopFile method + + This will make BAMF to generate a new desktop file for the given application + (if that has not already one). + +2013-08-07 Marco Trevisan (Treviño) + + TestApplicationLauncherIcon: visibility tests + +2013-08-07 Marco Trevisan (Treviño) + + ApplicationLauncherIcon: move more app initialization code into SetApplication + +2013-08-09 Automatic PS uploader + + Releasing 7.1.0+13.10.20130809.1-0ubuntu1 (revision 3456 from lp:unity). + + Approved by PS Jenkins bot. + +2013-08-09 Automatic PS uploader + + Releasing 7.1.0+13.10.20130809.1-0ubuntu1, based on r3456 + +2013-08-07 Michal Hruby + + Send up-to-date form_factor also after waiting for proxy connection. + + Approved by PS Jenkins bot, Andrea Azzarone. + +2013-08-07 Michal Hruby + + Send up-to-date form_factor also after waiting for proxy connection + +2013-08-07 Marco Trevisan (Treviño) + + BamfApplicationManager: add support for desktop-file-updated signal and use in AppIcon + + Now an ApplicationLauncherIcon can have its .desktop file updated and when this happens + it reloads the infos it needs and updates the FavoriteStore accordingly. + + Approved by PS Jenkins bot, Christopher Townsend. + +2013-08-06 Marco Trevisan (Treviño) + + TestLauncherController: verify saving/unsaving favorites works when the Icon uri changes + +2013-08-06 Marco Trevisan (Treviño) + + LauncherController: update the Uri that is used to forget a favorite when it's signaled to be changed. + +2013-08-06 Marco Trevisan (Treviño) + + TestApplicationLauncherIcon: verify icon uri updates + +2013-08-06 Marco Trevisan (Treviño) + + ApplicationLauncherIcon: signal forget and icon uri updated when desktop file has changed + +2013-08-06 Marco Trevisan (Treviño) + + AbstractLauncherIcon: add uri_changed signal + +2013-08-05 Marco Trevisan (Treviño) + + TestLauncherController: some cleanup + +2013-08-05 Marco Trevisan (Treviño) + + TestLauncherController: use better mocking for MockApplicationLauncherIcon + +2013-08-05 Marco Trevisan (Treviño) + + AbstractLauncherIcon: make DesktopFile() and RemoteUri() const methods + +2013-08-05 Marco Trevisan (Treviño) + + TestApplicationLauncherIcon: verify desktop file updates + +2013-08-05 Marco Trevisan (Treviño) + + ApplicationLauncherIcon: support desktop_file updates, update data only when this happens + +2013-08-05 Marco Trevisan (Treviño) + + TestApplicationLauncherIcon: verify that adding a new Sticky apps, sticks LauncherIcon + +2013-08-05 Marco Trevisan (Treviño) + + ApplicationLauncherIcon: make sure we reload desktop data, title and icon when a changing inner application + +2013-08-05 Marco Trevisan (Treviño) + + SoftwareCenterLauncherIcon: ensure we save position when sticking the application + + This should generally happen everytime, but there's a corner case when this is not gonna + happen, so let's cover that as well + +2013-08-05 Marco Trevisan (Treviño) + + TestSoftwareCenterLauncherIcon: verify that icon and tooltip_text gets updated on SetApplication + +2013-08-05 Marco Trevisan (Treviño) + + SoftwareCenter: no need to keep application title, we can re-compute it when assigning new app + +2013-08-01 Marco Trevisan (Treviño) + + MockApplication: try to load the desktop file to initialize application name and icon if possible + +2013-08-01 Marco Trevisan (Treviño) + + TestSoftwareCenterLauncherIcon: verify that icon and app title gets updated on finished + + Not all tests are passing for now... + +2013-08-01 Marco Trevisan (Treviño) + + TestSoftwareCenterLauncherIcon: split OnFinished tests + +2013-07-31 Marco Trevisan (Treviño) + + TestSoftwareCenterLauncherIcon: properly use mocked desktop file + +2013-07-31 Marco Trevisan (Treviño) + + SoftwareCenterLauncherIcon: massive spaces and code cleanup + +2013-07-31 Marco Trevisan (Treviño) + + MockApplication: add ::Ptr typedef's + +2013-07-31 Marco Trevisan (Treviño) + + TestSoftwareCenterLauncherIcon: add more checks OnFinished, use TEST_P for progress tests + +2013-07-31 Marco Trevisan (Treviño) + + ApplicationLauncherIcon: some code cleanup + +2013-07-31 Marco Trevisan (Treviño) + + debian/control: depend on recent libbamf3 0.5.0 + +2013-07-31 Marco Trevisan (Treviño) + + ApplicationManager: make desktop_file as a property + +2013-08-07 Chris Townsend + + Fix yet another regression in revno. 3381 where the Panel shadow is not drawn when in Show Desktop mode by using PluginAdapter::IsWindowOnTop() instead of the new GetTopVisibleWindow(). Remove GetTopVisibleWindow() to get rid of code duplication. Fixes: https://bugs.launchpad.net/bugs/1203097. + + Approved by PS Jenkins bot, Marco Trevisan (Treviño), Brandon Schaefer. + +2013-07-26 Chris Townsend + + Remove the "in_show_desktop_" logic since the PluginAdapter::IsWindowOnTop() can account for in Show Desktop mode. + +2013-07-26 Chris Townsend + + Use the already available PluginAdapter::IsWindowOnTop() instead of the new Get TopVisibleWindow() to remove code duplication. + +2013-07-23 Chris Townsend + + Fix yet another regression in revno. 3381 where the Panel shadow is not drawn when in Show Desktop mode. + +2013-08-07 Jeremy Bicha + + Adjust to rename of ubiquity-gtkui.desktop to ubiquity.desktop. + + Approved by PS Jenkins bot, Christopher Townsend, Dmitrijs Ledkovs. + +2013-08-01 Jeremy Bicha + + Adjust to renaming of ubiquity-gtkui.desktop to ubiquity.desktop + +2013-08-05 Automatic PS uploader + + Releasing 7.1.0+13.10.20130805-0ubuntu1 (revision 3451 from lp:unity). + + Approved by PS Jenkins bot. + +2013-08-05 Automatic PS uploader + + Releasing 7.1.0+13.10.20130805-0ubuntu1, based on r3451 + +2013-08-03 Andrea Azzarone + + Add tests for unity::panel::Controller. These test are quite similar to the ones for unity::launcher::Controller. Fixes: https://bugs.launchpad.net/bugs/1207170. + + Approved by PS Jenkins bot, Brandon Schaefer. + +2013-08-01 Andrea Azzarone + + Remove Set/GetPrimary. + +2013-08-01 Andrea Azzarone + + Merge trunk and update test_panel_controller. + +2013-08-01 Andrea Azzarone + + Refactor unity::panel::Controller and add tests for it. + +2013-08-02 Automatic PS uploader + + Releasing 7.1.0+13.10.20130802-0ubuntu1 (revision 3449 from lp:unity). + + Approved by PS Jenkins bot. + +2013-08-02 Automatic PS uploader + + Releasing 7.1.0+13.10.20130802-0ubuntu1, based on r3449 + +2013-08-01 Brandon Schaefer + + Remove setting hotkey for ibus using gconf, as ibus 1.5 no longer uses gconf. + + Approved by PS Jenkins bot, Andrea Azzarone. + +2013-08-01 Brandon Schaefer + + * Remove attempting to set/get gconf settings as ibus1.5 no longer uses gconf + +2013-07-31 Brandon Schaefer + + Fix AP tests for IBus 1.5 + Fix search bar hint when using preedit. Fixes: https://bugs.launchpad.net/bugs/1203106, https://bugs.launchpad.net/bugs/1204215. + + Approved by Marco Trevisan (Treviño), PS Jenkins bot. + +2013-07-31 Brandon Schaefer + + * Remove test that is not a real word + +2013-07-23 Brandon Schaefer + + * This not everything else + +2013-07-23 Brandon Schaefer + + * Fix ibus tests, as ibus is always on we can't assert when its enabled or not. + Removing those bits, along with adding the expected results I have 32 tests passing here. + This isn't the overall fix, as we need to clean some things up, but this will get it working + with unity so we can get ibus 1.5 in. + + * Also note ibus 1.5 works well on unity/hud the only problem being tests failing :). + +2013-07-31 Marco Trevisan (Treviño) + + MultiMonitor: remove the ugly max_num_monitors var, put it inside proper namespace. + + Approved by PS Jenkins bot, Brandon Schaefer. + +2013-07-29 Marco Trevisan (Treviño) + + MultiMonitor: remove the ugly max_num_monitors var, put it inside proper namespace + +2013-07-31 Marco Trevisan (Treviño) + + SimpleLauncherIcon: remove useless methods and signals, use smarter allocation. + + Approved by PS Jenkins bot, Brandon Schaefer. + +2013-07-29 Marco Trevisan (Treviño) + + TestLauncherIcon: verify monitor visibility on construction + +2013-07-29 Marco Trevisan (Treviño) + + AbstractLauncherIcon: use default dtor + +2013-07-29 Marco Trevisan (Treviño) + + LauncherIcon: remove useless dtor + +2013-07-29 Marco Trevisan (Treviño) + + LauncherIcon: use BaseTexturePtr for icon textures generation + +2013-07-29 Marco Trevisan (Treviño) + + SimpleLauncherIcon: use unordered map + +2013-07-29 Marco Trevisan (Treviño) + + IconRenderer: avoid to get the same icon twice... + +2013-07-29 Marco Trevisan (Treviño) + + SimpleLauncherIcon: remove useless methods and signals, use smarter allocation + +2013-07-31 Stephen M. Webb + + Remove incorrect last check in test_unhide_single_app AP test. Fixes: https://bugs.launchpad.net/bugs/1204188. + + Approved by PS Jenkins bot, Andrea Azzarone. + +2013-07-30 Stephen M. Webb + + removed invalid last portion of unhide-single-app test + +2013-07-29 Automatic PS uploader + + Releasing 7.1.0+13.10.20130729-0ubuntu1 (revision 3443 from lp:unity). + + Approved by PS Jenkins bot. + +2013-07-29 Automatic PS uploader + + Releasing 7.1.0+13.10.20130729-0ubuntu1, based on r3443 + +2013-07-26 Andrea Azzarone + + Add show_desktop_key film in unityshell plugin. Fixes: https://bugs.launchpad.net/bugs/1204664. + + Approved by Stephen M. Webb, PS Jenkins bot. + +2013-07-24 Andrea Azzarone + + Contol + super+ D not control + alt + d. + +2013-07-24 Andrea Azzarone + + Add show_desktop_key shortcut. + +2013-07-26 Stephen M. Webb + + release Unity 7.1.0. + + Approved by PS Jenkins bot, Marco Trevisan (Treviño). + +2013-07-24 Stephen M. Webb + + upstream release 7.1.0 + +2013-07-25 Marco Trevisan (Treviño) + + TestPanelService: verify that the entry's label and icon are disconnected on removal. + + Approved by PS Jenkins bot, Christopher Townsend. + +2013-07-25 Marco Trevisan (Treviño) + + PanelService: move proper code block below the related comment + +2013-07-25 Marco Trevisan (Treviño) + + TestPanelService: added ManyEntriesRemovalIndicatorObject test + +2013-07-25 Marco Trevisan (Treviño) + + TestPanelService: verify signal disconnections when removing an indicator object + +2013-07-25 Marco Trevisan (Treviño) + + TestPanelService: verify that the entry's label and icon are disconnected on removal + +2013-07-25 Marco Trevisan (Treviño) + + MockIndicatorObject: add function to remove an entry and signal it to the object + +2013-07-24 Andrew Gaul + + PanelService: Disconnect signals connected in panel-service.c:on_entry_added. Fixes: https://bugs.launchpad.net/bugs/1203607. + + Approved by PS Jenkins bot, Christopher Townsend, Marco Trevisan (Treviño). + +2013-07-21 Andrew Gaul + + Disconnect signals connected in panel-service.c:on_entry_added + + This addresses a memory leak observed in: + + https://bugs.launchpad.net/unity/+bug/1203607 + +2013-07-23 Chris Townsend + + Change to using ellipsis instead of three dots for the "Installing" tooltip. Fixes: https://bugs.launchpad.net/bugs/1203092. + + Approved by PS Jenkins bot, Stephen M. Webb. + +2013-07-23 Chris Townsend + + Change to using ellipsis instead of three dots for the "Installing" tooltip. + +2013-07-23 Automatic PS uploader + + Releasing 7.0.2+13.10.20130723.1-0ubuntu1 (revision 3437 from lp:unity). + + Approved by PS Jenkins bot. + +2013-07-23 Automatic PS uploader + + Releasing 7.0.2+13.10.20130723.1-0ubuntu1, based on r3437 + +2013-07-23 Łukasz 'sil2100' Zemczak + + Disable the TestAnimationOpacity test, as it's failing on powerpc. + + Approved by PS Jenkins bot, Marco Trevisan (Treviño). + +2013-07-23 Łukasz 'sil2100' Zemczak + + Disable the TestAnimationOpacity test, as it's failing on powerpc + +2013-07-21 Jeremy Bicha + + Drop unnecessary python-gconf dependency. + + Approved by PS Jenkins bot, Marco Trevisan (Treviño). + +2013-07-19 Jeremy Bicha + + drop unnecessary dependency on python-gconf + +2013-07-20 Michal Hruby + + Fix scope-related tests. Fixes: https://bugs.launchpad.net/bugs/1199961. + + Approved by PS Jenkins bot, Marco Trevisan (Treviño). + +2013-07-19 Michal Hruby + + Increate the dbus timeout even more, dump dee dep + +2013-07-19 Michal Hruby + + Disable TestCategoriesChanging as they are racy + +2013-07-18 Michal Hruby + + Merge trunk + +2013-07-17 Michal Hruby + + Increase the test runner timeout + +2013-07-17 Michal Hruby + + Use read-only shared models + +2013-07-17 Michal Hruby + + Use dbus-test-runner for the dbus tests + +2013-07-17 Michal Hruby + + Keep the service output + +2013-07-16 Michal Hruby + + Merge trunk + +2013-07-12 Michal Hruby + + Re-enable the tests + +2013-07-12 Michal Hruby + + Fix scope-related tests + +2013-07-20 Andrea Azzarone + + Define/Init UnityWindow::cWindow. Fixes: https://bugs.launchpad.net/bugs/1203129. + + Approved by PS Jenkins bot, Marco Trevisan (Treviño). + +2013-07-19 Andrea Azzarone + + Define/Init cWindow. + +2013-07-19 Michal Hruby + + Preload results after removal, as they might got moved into a visible position. + + Approved by PS Jenkins bot, Brandon Schaefer. + +2013-07-18 Michal Hruby + + Preload results after removal, as they might got moved into a visible position + +2013-07-19 Marco Trevisan (Treviño) + + Unity: improve the correctness of the memory usage of various components + + Thanks to valgrind. Fixes: https://bugs.launchpad.net/bugs/1202423, https://bugs.launchpad.net/bugs/1202972. + + Approved by PS Jenkins bot, Brandon Schaefer. + +2013-07-19 Marco Trevisan (Treviño) + + TestIconLoader: use TEST_F and disconnect all the handles we have at the end of each test + + This will avoid any possible crash. + +2013-07-18 Marco Trevisan (Treviño) + + TestScope: assert that the models are valid + +2013-07-18 Marco Trevisan (Treviño) + + Model: use sigc::bind when possible + +2013-07-18 Marco Trevisan (Treviño) + + debian/control: build-depend on libnux-4.0-dev (>= 4.0.2+13.10.20130718.1) + +2013-07-18 Marco Trevisan (Treviño) + + test-gtest-xless: fixed some memory leak and read/write errors + +2013-07-18 Marco Trevisan (Treviño) + + PlacesOverlayVScrollBar: use connection::Wrapper + +2013-07-18 Marco Trevisan (Treviño) + + TestXdndManager: initialize properly Xevent + +2013-07-18 Marco Trevisan (Treviño) + + TrashLauncherIcon: initialize empty_ boolean value + +2013-07-18 Marco Trevisan (Treviño) + + TestTabIterator: use push_back instead of reversed push_front, it's absolutely more intuitive... + +2013-07-18 Marco Trevisan (Treviño) + + TestTabIterator: no need to use dynamic allocation for iterator + +2013-07-18 Marco Trevisan (Treviño) + + TestTabIterator: use smart pointers for Entry areas + +2013-07-18 Marco Trevisan (Treviño) + + TabIterator: simplify Remove and use Unsigned as index + +2013-07-18 Marco Trevisan (Treviño) + + TestTabIterator: fix the tests that were actually wrong checking the result when *it.end() was used + +2013-07-18 Marco Trevisan (Treviño) + + TabIterator: fix Bad deference of an .end() iterator, we should use rbegin() istead!!! + + This may lead to a crash (thanks valgrind!). + +2013-07-18 Marco Trevisan (Treviño) + + TestTabIterator: use friend class TestTabIterator + +2013-07-18 Marco Trevisan (Treviño) + + TestTabIterator: ensure testing the correct area + +2013-07-18 Marco Trevisan (Treviño) + + TestTabIterator: use EXPECT_EQ instead of EXPECT_TRUE(a == b) + +2013-07-18 Marco Trevisan (Treviño) + + TestQuicklistMenuItem: initialize any XEvent parameter we'll use + +2013-07-18 Marco Trevisan (Treviño) + + TestPreviewPlayer: don't use const& to refer to a temporary object + +2013-07-17 Marco Trevisan (Treviño) + + Launcher: Initialize _drag_action on constructor + +2013-07-17 Marco Trevisan (Treviño) + + TestFilterMultirange, AddFilterOptions: fix read/write error spotted by valgrind + +2013-07-19 Chris Townsend + + Modify the Launcher icon of an installing app to display "Installing..." instead of always saying "Waiting to install". Fixes: https://bugs.launchpad.net/bugs/966189. + + Approved by PS Jenkins bot, Brandon Schaefer. + +2013-07-17 Chris Townsend + + When installing an app from the Dash, the tooltip for the icon in the Launcher when installing now says "Installing..." instead of "Waiting to install" during the whole install. + +2013-07-17 Chris Townsend + + Merge in trunk. + +2013-07-17 Chris Townsend + + Revert previous change since Design has said they just want the tooltip to display "Installing..." when the app is installing. + +2013-06-21 Chris Townsend + + Modify the Launcher icon of an installing app to display the current Apt status instead of always saying "Waiting to install". + +2013-07-19 Manuel de la Pena + + Fix the introspection so that QA can work with autopilot. Fixes: https://bugs.launchpad.net/bugs/1185486. + + Approved by PS Jenkins bot, Marco Trevisan (Treviño), Leo Arias. + +2013-07-10 Manuel de la Pena + + Improved the instrospection of object so that autopilot can be used. + +2013-07-18 Michal Hruby + + Manually merged lp:~mhr3/unity/fix-ap-preview-tests + +2013-07-16 Michal Hruby + + Fix AP tests - installed apps are special-cased and previews are done using the right click + +2013-07-17 Marco Trevisan (Treviño) + + GLibDBusServer: set the proper destroy function when resetting the InterfaceInfo ptr. + + Approved by PS Jenkins bot, Michal Hruby, Brandon Schaefer. + +2013-07-17 Marco Trevisan (Treviño) + + GLibDBusServer: some space cleanup... + +2013-07-17 Marco Trevisan (Treviño) + + TestServiceMain: dont' use const& for our object, or valgrind will complain... + + G++ issue? + +2013-07-17 Marco Trevisan (Treviño) + + GLibDBusServer: set the proper destroy function when resetting the InterfaceInfo ptr + +2013-07-16 Marco Trevisan (Treviño) + + TestGtest: Addedd TestPanelService and new tests to TestStaticCairoText, removed test-unit + + Improved the u-p-s stability and refactored a little its initialization to allow testing with only mock indicators. Fixes: https://bugs.launchpad.net/bugs/1200748. + + Approved by PS Jenkins bot, Brandon Schaefer. + +2013-07-13 Marco Trevisan (Treviño) + + External GSchema: add panel-first-menu + +2013-07-13 Marco Trevisan (Treviño) + + TestSwitcherView: always use float for progres + +2013-07-12 Marco Trevisan (Treviño) + + Merging with trunk + +2013-07-12 Marco Trevisan (Treviño) + + Tests: remove the obsolete test-gtest, the whole tests have been moved to test-gtest + +2013-07-12 Marco Trevisan (Treviño) + + PanelService: make sure we clear all the idles we've set up on destroy. + + Also edstroy the HT on finalize + +2013-07-12 Marco Trevisan (Treviño) + + TestStaticCairoText: add test about text growing, ported from old test-unit + +2013-07-12 Marco Trevisan (Treviño) + + TestSwitcherView: fix test failures for i386 hw + +2013-07-11 Marco Trevisan (Treviño) + + PanelService: notify the clients to resync all the indicators when we have to clear them + +2013-07-11 Marco Trevisan (Treviño) + + TestPanelService: add clear indicators test + +2013-07-11 Marco Trevisan (Treviño) + + PanelService: check the value of timeout before removing it + +2013-07-11 Marco Trevisan (Treviño) + + PanelService: ensure we unset the indicator "remove-timeout" data + +2013-07-11 Marco Trevisan (Treviño) + + TestPanelService: verify mass-addition of Indicators and Entries + +2013-07-11 Marco Trevisan (Treviño) + + PanelService: remove active timeouts and disconect to signals on object removal + +2013-07-11 Marco Trevisan (Treviño) + + MockIndicatorObject: nullify the entries list on dispose after free'ing it + +2013-07-11 Marco Trevisan (Treviño) + + TestPanelService: test removal of multiple entries + + Crashing the service for now... + +2013-07-11 Marco Trevisan (Treviño) + + PanelService: Make sure we always notify the removal of an Indicator + + And also disconnect from all the pendings event on it (signals and timeouts). + +2013-07-11 Marco Trevisan (Treviño) + + TestPanelService: add indicator object removal test. + + Currently failing... + +2013-07-11 Marco Trevisan (Treviño) + + TestPanelService: add activate request test + +2013-07-11 Marco Trevisan (Treviño) + + TestPanelService: use a common GetResults to parse synchronization results + +2013-07-11 Marco Trevisan (Treviño) + + TestPanelService: add more indicators, entries loading tests + +2013-07-11 Marco Trevisan (Treviño) + + PanelService: ref the object when adding an external indicator + +2013-07-11 Marco Trevisan (Treviño) + + TestPanelService: verify entri addition + +2013-07-11 Marco Trevisan (Treviño) + + TestPanelService: verify the indicators addition + +2013-07-11 Marco Trevisan (Treviño) + + MockIndicatorObject: add a mock indicator implementation to test panel service + +2013-07-11 Marco Trevisan (Treviño) + + PanelService: Add public method to add a new IndicatorObject + +2013-07-11 Marco Trevisan (Treviño) + + TestGtest: add TestPanelService initial testing + +2013-07-11 Marco Trevisan (Treviño) + + PanelService: Allow to initialize a new Panel Service without default indicators + + In this way we can easily test it without much dependencies. + +2013-07-15 Łukasz 'sil2100' Zemczak + + Try to merge in the manually uploaded versions. + + Approved by PS Jenkins bot, Didier Roche. + +2013-07-15 Łukasz 'sil2100' Zemczak + + Try to re-merge the manually released versions + +2013-07-12 Brandon Schaefer + + Show desktop now only works for individual workspaces. Also if any new windows are opened, or one is restored on that workspace then the next Show desktop will minimize those. The only time windows are restored are when no new windows have been mapped, and no windows have been restored for that workspace only. Fixes: https://bugs.launchpad.net/bugs/966030. + + Approved by PS Jenkins bot, Christopher Townsend, Marco Trevisan (Treviño). + +2013-07-10 Brandon Schaefer + + * Merge trunk + +2013-07-10 Brandon Schaefer + + * Remove extra noise in the AP tests... + +2013-07-01 Brandon Schaefer + + * Merge trunk + +2013-07-01 Brandon Schaefer + + * Fixes show desktop + +2013-07-12 Nick Dedekind + + Removed the legal icon, again. Approved by Thomas Strehl. + + Approved by PS Jenkins bot, Andrea Azzarone. + +2013-07-12 Nick Dedekind + + revert 3421. Re-removed dash legal notice. + +2013-07-11 Michal Hruby + + Added getter for content-type property to Category class. + + Approved by PS Jenkins bot, Brandon Schaefer. + +2013-07-11 Michal Hruby + + Expose category content-type + +2013-07-11 Marco Trevisan (Treviño) + + CMake: re-enable DBus Tests, excluding TestScope* + + This exclusion is due to lp:1199961 to be fixed ASAP. Fixes: https://bugs.launchpad.net/bugs/1199962. + + Approved by Christopher Townsend, PS Jenkins bot. + +2013-07-11 Marco Trevisan (Treviño) + + DummyDBusTestRunner: new script to run tests in dbus session + + Removing the build-dependency on dbus-test-runner + +2013-07-11 Marco Trevisan (Treviño) + + Merging with parent branch + +2013-07-10 Marco Trevisan (Treviño) + + debian/control: build-depend on dbus-test-runner + +2013-07-10 Marco Trevisan (Treviño) + + CMake: re-enable DBus Tests, excluding TestScope* + + This exclusion is due to lp:1199961 to be fix ASAP. + +2013-07-10 Marco Trevisan (Treviño) + + TestServiceModel: use std::string + +2013-07-10 Marco Trevisan (Treviño) + + TestServiceModel: use glib::Variant + +2013-07-10 Marco Trevisan (Treviño) + + TestServiceModel: ref_sink variant not to crash on quit + +2013-07-11 Nick Dedekind + + Reverted r3415 "remove legal link" - Approved by Thomas Strehl. + + Approved by Marco Trevisan (Treviño), PS Jenkins bot. + +2013-07-10 Nick Dedekind + + reverted r3415. legal link re-added + +2013-07-11 Marco Trevisan (Treviño) + + CMake: run X-dependent tests using a dummy Xorg server on make check-headless + + This is possible using dummy-xorg-test-runner.sh to run these tests. + Calling ./dummy-xorg-test-runner.sh binary --any-parameter -f --bar will + load binary (with requested parameters) in a fake X server (using dummy + xorg video driver, that now also uses llvmpipe to get 3d acceleration). Fixes: https://bugs.launchpad.net/bugs/1197561, https://bugs.launchpad.net/bugs/1199857, https://bugs.launchpad.net/bugs/1199890. + + Approved by PS Jenkins bot, Christopher Townsend. + +2013-07-11 Marco Trevisan (Treviño) + + TestUtils: schedule the timeout using a G_PRIORITY_DEFAULT+10 priority + + In this way we make sure that we give more priority to timeouts, but less + priority to idles. + +2013-07-11 Marco Trevisan (Treviño) + + TestResultIterator: use glib::Variant to fix reference issue + +2013-07-10 Marco Trevisan (Treviño) + + CMakeLists.txt: use make check-headless for make distcheck + +2013-07-10 Marco Trevisan (Treviño) + + cmake/pch.cmake: Also append -fpch-preprocess to make ccache happier + +2013-07-10 Marco Trevisan (Treviño) + + debian/control: sort build-dependencies by name + +2013-07-10 Marco Trevisan (Treviño) + + Merge with trunk fixing conflicts + +2013-07-10 Marco Trevisan (Treviño) + + Variant: use copy-and-swap idiom also to assign a raw pointer to it. + + This will solve any issue on self-assignment + +2013-07-10 Marco Trevisan (Treviño) + + TestGLibVariant: add assignment tests with different and equal values + + AssignSame is currently failing due to bug lp:1199890 + +2013-07-10 Marco Trevisan (Treviño) + + Results: don't define unneeded functions, just redirect signals + +2013-07-10 Marco Trevisan (Treviño) + + TestResults: verify signal proxies + +2013-07-10 Marco Trevisan (Treviño) + + TestResults: use TEST_F + +2013-07-10 Marco Trevisan (Treviño) + + TestCategories: use TEST_F + +2013-07-10 Marco Trevisan (Treviño) + + TestCategories: split signal proxies tests + +2013-07-10 Marco Trevisan (Treviño) + + TestCategories: improve the signal test detection + +2013-07-10 Marco Trevisan (Treviño) + + tests/CMakeLists.txt: space cleanup + +2013-07-10 Marco Trevisan (Treviño) + + DummyXorgTestRunner: exit with 1 if a signal is trapped + +2013-07-10 Marco Trevisan (Treviño) + + DumyXorgTestRunner: some code cleanup on X config file + +2013-07-10 Marco Trevisan (Treviño) + + DummyXorgTestRunner: add a cleanup function, call it on signal trap + + Also avoid to print an empty log file + +2013-07-10 Marco Trevisan (Treviño) + + DummyXorgTestRunner: randomize the initial DISPLAY value + +2013-07-10 Marco Trevisan (Treviño) + + DummyXorgTestRunner: show the Xorg log if something failed on its initialization + +2013-07-10 Marco Trevisan (Treviño) + + Hud: use glib::Variant, and avoid to do operations on null values + +2013-07-10 Marco Trevisan (Treviño) + + Variant: avoid to handle null values + +2013-07-10 Marco Trevisan (Treviño) + + TestThumbnailGenerator: ARM can be very slow... + + Increasing the wait time for TestGetManyFileThumbnail + +2013-07-10 Marco Trevisan (Treviño) + + DummyXorgTestRunner: increase the Xorg wait time, and log on failure + +2013-07-10 Marco Trevisan (Treviño) + + tests/CMakeLists.txt: define once the tests xml log paths, avoid multiple .xml generations + +2013-07-10 Marco Trevisan (Treviño) + + DummyXorgTestRunner: improve debugging output if we have not executables scripts + +2013-07-10 Marco Trevisan (Treviño) + + Rename external.gschema's not to make jenkins angry + +2013-07-10 Marco Trevisan (Treviño) + + tests/CMakeLists.txt: re-enable the xml output for xless tests + +2013-07-10 Marco Trevisan (Treviño) + + DummyXorgTestRunner: wait maximum 5 seconds for the X server to show up + +2013-07-10 Marco Trevisan (Treviño) + + ScopeView: cleanup lambda callbacks + +2013-07-10 Marco Trevisan (Treviño) + + DummyXorgTestRunner: support to launch any binary in path + +2013-07-10 Marco Trevisan (Treviño) + + TestDeviceLauncherSection: use NiceMock + +2013-07-10 Marco Trevisan (Treviño) + + Model: make RowAtIndex virtual + + for unknown reasons, when building the .deb file the specialized version we have in tests + is not used... I would have preferred a better solution, but that it is! + +2013-07-10 Marco Trevisan (Treviño) + + Categories: use nicer decltype instead of full type redefinition + +2013-07-10 Marco Trevisan (Treviño) + + Categories: use only sigc::mem_fun to redirect signal emission + +2013-07-10 Marco Trevisan (Treviño) + + Categories: don't emit the signals twice. include tests. + +2013-07-09 Marco Trevisan (Treviño) + + TestDBus: fix compilation with new test_utils + +2013-07-09 Marco Trevisan (Treviño) + + TestUtils: use a simple std::string for test error messages + +2013-07-09 Marco Trevisan (Treviño) + + TestScopeView: use new Utils::WaitPendingEvents + +2013-07-09 Marco Trevisan (Treviño) + + TestUtils: add WaitPendingEvents + +2013-07-09 Marco Trevisan (Treviño) + + MockResults: remove any dee dependency on MockResults + + Implement RowAtIndex for Result in tests + +2013-07-09 Marco Trevisan (Treviño) + + TestGnomeSessionManager: use Utils::{init,reset}_gsettings_test_environment + +2013-07-09 Marco Trevisan (Treviño) + + TestScopeView: put back wait timeouts so that we can wait pending events + +2013-07-09 Marco Trevisan (Treviño) + + TestScopeView: cleanup FakePlacesGroup + +2013-07-09 Marco Trevisan (Treviño) + + TestScopeView: use Utils::WaitUntilMSec by default + +2013-07-09 Marco Trevisan (Treviño) + + TestScopeView: wait before checking for category on TestCategoryInsert + +2013-07-09 Marco Trevisan (Treviño) + + TestThumbnailGenerator: increase the max wait time for TestGetManyFileThumbnail + + As it can take some time on slower platforms + +2013-07-09 Marco Trevisan (Treviño) + + TestSoftwareCenterLauncherIcon: use NiceMock + +2013-07-09 Marco Trevisan (Treviño) + + ScopeView: some misc code cleanup + + Use const& and foreach loops... + +2013-07-09 Marco Trevisan (Treviño) + + ScopeView: avoid unneeded string copies... + +2013-07-09 Marco Trevisan (Treviño) + + ScopeView: use sigc::mem_fun to connect to signals instead of lambdas + +2013-07-09 Marco Trevisan (Treviño) + + debian/control: build depend on libgl1-mesa-dri + +2013-07-09 Marco Trevisan (Treviño) + + TestScopeView: remove unneeded timeouts and use asserts when it's better + +2013-07-09 Marco Trevisan (Treviño) + + MockCategories: remove any dee dependency, use template specialization to override a method + + This happens at link time... + +2013-07-09 Marco Trevisan (Treviño) + + TestFavoriteStoreGSettings: remove unneded variable, fix compilation + +2013-07-09 Marco Trevisan (Treviño) + + TestResultRenderer: use an always-available icon + +2013-07-09 Marco Trevisan (Treviño) + + CMakeLists.txt: include external schemas for testing purposes + +2013-07-09 Marco Trevisan (Treviño) + + Tests: always use Utils::{init,reset}_gsettings_test_environment(); when needed + +2013-07-09 Marco Trevisan (Treviño) + + TestThumbnailGenerator: increase the wait time for results + + Or we can get false negative + +2013-07-09 Marco Trevisan (Treviño) + + TestThumbnailGenerator: depend only on always-available files + +2013-07-09 Marco Trevisan (Treviño) + + TestIconLoader: load icons we're sure we have in minimal installations + +2013-07-09 Marco Trevisan (Treviño) + + TestPreviewPlayer: use a fake dbus remote player not to depend on external components + +2013-07-09 Marco Trevisan (Treviño) + + TestPreviewPlayer: use TEST_F and connection::Wrapper + +2013-07-09 Marco Trevisan (Treviño) + + Merge with trunk + +2013-07-04 Marco Trevisan (Treviño) + + dummy-xorg-test-runner: sleep to wait Xorg to fully load + +2013-07-04 Marco Trevisan (Treviño) + + tests/CMakeLists.txt: remove comment + +2013-07-04 Marco Trevisan (Treviño) + + Merging with trunk + +2013-07-04 Marco Trevisan (Treviño) + + debian/control: build-depends on xserver-xorg-video-dummy + +2013-07-04 Marco Trevisan (Treviño) + + CMake: run X-dependent tests on a dummy Xorg server on make check-headless + + This is possible using dummy-xorg-test-runner.sh to run these tests. + +2013-07-04 Marco Trevisan (Treviño) + + dummy-xorg-test-runner: added a script to run tests in a dummy X server + + Calling ./dummy-xorg-test-runner.sh binary --any-parameter -f --bar will + load binary (with requested parameters) in a fake X server (using dummy + xorg video driver, that now also uses llvmpipe to get 3d acceleration) + +2013-07-04 Marco Trevisan (Treviño) + + Tests: use SOURCEDATADIR when loading textures, instead of PKGDATADIR + +2013-07-04 Marco Trevisan (Treviño) + + config.h: add a reference to the source resources path as SOURCEDATADIR + +2013-07-02 Marco Trevisan (Treviño) + + Merge with trunk + +2013-07-10 Thomas Voß + + Adjust CMake setup to account for new GMock version. + . Fixes: https://bugs.launchpad.net/bugs/1185265. + + Approved by PS Jenkins bot, Didier Roche. + +2013-07-09 Thomas Voß + + Add explicit google-mock version. + +2013-07-09 Thomas Voß + + * Make sure that check-headless target is available. + +2013-07-09 Thomas Voß + + [ Timo Jyrinki ] + * Bump version number to go with X.org update + [ Brandon Schaefer ] + * When the ScopeView changes visibility make sure we update the filter + scroll view as well. This way we don't get random overlay scroll + bars appearing when it shouldn't!. (LP: #1175666) + [ Timo Jyrinki ] + * Move unity to the new libxi changes, along with the new 1.14 + xserver. Manual merge to be able to migrate together with Xorg from + -proposed. + [ Didier Roche ] + * Revert rev 3404, makes autopilot tests failing as well as keep weird + filters artefacts in the preview + [ Marco Trevisan (Treviño) ] + * ScopeProxy: use glib::SignalManager to manage connections and + disconnections. + * Use again glib::Cancellable wrapper in scopes code. + [ Ubuntu daily release ] + * Automatic snapshot from revision 3410 + +2013-07-08 Thomas Voß + + Adjust CMake setup to account for new GMock version. + +2013-07-04 Didier Roche + + intermediate commit to conditionnally build with the new gmock and embedded gtest + +2013-07-10 Brandon Schaefer + + Don't calculate the velocity if dtime is 0. This way we don't get a huge velocity on the initial barrier hit. Fixes: https://bugs.launchpad.net/bugs/1199050. + + Approved by Stephen M. Webb, PS Jenkins bot. + +2013-07-09 Brandon Schaefer + + * If dtime is 0, return 1 instead of still calcualting the velocity. + It was causing the first barrier hits speed to be waaay to high, causing the + barrier to almost always release. + +2013-07-10 Michal Hruby + + Reset the connected property when scope disappears. + + Approved by PS Jenkins bot, Andrea Azzarone. + +2013-07-09 Michal Hruby + + Reset the connected property when scope disappears + +2013-07-09 Michal Hruby + + When requesting a channel from scopes, use the DIFF flag, which will cause scopes machinery to do a diff between the old and new model states, so results that didn't change will stay in the model - previously they would be removed and re-added. + + Approved by PS Jenkins bot, Andrea Azzarone. + +2013-07-05 Michal Hruby + + Request diffing channel from scopes + +2013-07-09 Nick Dedekind + + Removed the legal link and icon from the dash. + . + + Approved by PS Jenkins bot, Marco Trevisan (Treviño). + +2013-07-09 Nick Dedekind + + Removed legal notice link and icon from dash view + +2013-07-09 Charles Kerr + + in panel-service.c's load_indicators_from_indicator_files(), plug a GDir leak. + + Approved by PS Jenkins bot, Lars Uebernickel. + +2013-07-02 Charles Kerr + + in panel-service.c's load_indicators_from_indicator_files(), plug a GDir leak + +2013-07-08 Brandon Schaefer + + Correctly set back the filter scroll views state when leaving/entering the scope view. Fixes: https://bugs.launchpad.net/bugs/1175666. + + Approved by PS Jenkins bot, Christopher Townsend. + +2013-07-05 Brandon Schaefer + + * If the filters are expaneded, and the scope view is changing to visible, set the filter scroll view + to visible. + * If the scope view is losing visiblity, set the filter scroll view visible to false. + +2013-07-08 Pawel Stolowski + + Activate (installed) applications on single left-click in Home and Applications scopes view. Fixes: https://bugs.launchpad.net/bugs/1189088. + + Approved by PS Jenkins bot, Brandon Schaefer. + +2013-07-04 Pawel Stolowski + + Fixed typo. + +2013-07-03 Pawel Stolowski + + Added autopliot tests for lmb on apps. + +2013-07-02 Pawel Stolowski + + Don't display previews on left-click for applications. + +2013-07-08 Automatic PS uploader + + Releasing 7.0.2+13.10.20130705.1-0ubuntu1 (revision 3410 from lp:unity). + + Approved by PS Jenkins bot. + +2013-07-05 Automatic PS uploader + + Releasing 7.0.2+13.10.20130705.1-0ubuntu1, based on r3410 + +2013-07-05 Didier Roche + + Revert rev 3404, makes autopilot tests failing as well as keep weird filters artefacts in the preview + +2013-07-04 Timo Jyrinki + + Bump version number to go with X.org update + +2013-07-04 Timo Jyrinki + + Bump version to 7.0.2 and libxi dependencies to >= 2:1.7.1.901 + +2013-07-04 Timo Jyrinki + + Move unity to the new libxi changes, along with the new 1.14 xserver. + + Manual merge to be able to migrate together with Xorg from -proposed. + +2013-07-04 Timo Jyrinki + + Add explicit dependencies to libxfixes3 and libxi6 to prevent symbols messup. + +2013-07-04 Timo Jyrinki + + Add epoch to libxi-dev dependency, bump libxfixes-dev dependency. + +2013-07-03 Brandon Schaefer + + * Bump version from 7.0.1 -> 7.0.2 + +2013-07-03 Brandon Schaefer + + * Merge trunk + +2013-05-29 Brandon Schaefer + + * Merged Trunk + +2013-03-19 Brandon Schaefer + + * Merge Trunk + +2013-03-08 Brandon Schaefer + + * Merge Trunk + +2013-02-25 Brandon Schaefer + + * Set threshold so we don't attempt to release the barrier (when we shouldn't) in the tests + +2013-02-25 Brandon Schaefer + + * Added some logging statements + * Actually check for the version... + +2013-02-22 Brandon Schaefer + + * Missed a coma + +2013-02-22 Brandon Schaefer + + * Merged trunk + +2013-02-22 Brandon Schaefer + + * Forgot to remove old EventFilterArg... + +2013-02-22 Brandon Schaefer + + [ Brandon Schaefer ] + Moved PointerBarrier logic to the new xserver 1.14 (libXi 1.6.99.1) + version. + + - We now use XI2 (XI_BarrierHit) to handle barrier events. + - Shifted a bunch of things around that were being ran more than they need to be. + - Updated unit test to reflect changes. + +2013-07-04 Marco Trevisan (Treviño) + + Use again glib::Cancellable wrapper in scopes code. + + Approved by PS Jenkins bot, Brandon Schaefer. + +2013-07-02 Marco Trevisan (Treviño) + + ScopeView: use glib::Cancellable + +2013-07-02 Marco Trevisan (Treviño) + + ScopeProxy: use glib::Cancellable + +2013-07-02 Marco Trevisan (Treviño) + + Preview: use glib::Cancellable + +2013-07-04 Marco Trevisan (Treviño) + + ScopeProxy: use glib::SignalManager to manage connections and disconnections. + + Approved by PS Jenkins bot, Brandon Schaefer. + +2013-07-02 Marco Trevisan (Treviño) + + ScopeProxy: use glib::SignalManager to manage connections and disconnections + +2013-07-04 Brandon Schaefer + + When the ScopeView changes visibility make sure we update the filter scroll view as well. This way we don't get random overlay scroll bars appearing when it shouldn't!. Fixes: https://bugs.launchpad.net/bugs/1175666. + + Approved by PS Jenkins bot, Stephen M. Webb. + +2013-07-03 Brandon Schaefer + + * Hide the filter scroll view when the scope views visibility changes. + +2013-07-03 Automatic PS uploader + + Releasing 7.0.1+13.10.20130703-0ubuntu1 to ubuntu. + + Approved by PS Jenkins bot. + +2013-07-03 Automatic PS uploader + + Releasing 7.0.1+13.10.20130703-0ubuntu1, based on r3402 + +2013-07-02 Marco Trevisan (Treviño) + + Unity: use connection::Wrapper to hold the connections to signals and disconnect from them. + + Approved by PS Jenkins bot, Brandon Schaefer. + +2013-07-02 Marco Trevisan (Treviño) + + Merging with lp:~3v1n0/unity/connection-wrapper + +2013-07-02 Marco Trevisan (Treviño) + + Scopes: use connection::Wrapper + +2013-07-01 Marco Trevisan (Treviño) + + ShortcutView: use connection::Wrapper + +2013-07-01 Marco Trevisan (Treviño) + + WindowGestureTarget: use connection::Wrapper + +2013-07-01 Marco Trevisan (Treviño) + + PanelMenuView: use connection::Wrapper + +2013-07-01 Marco Trevisan (Treviño) + + Launcher: use connection::Wrapper + +2013-07-01 Marco Trevisan (Treviño) + + Dash: use connection::Wrapper + +2013-07-01 Marco Trevisan (Treviño) + + Track: use connection::Wrapper + +2013-07-01 Marco Trevisan (Treviño) + + Merging with lp:~3v1n0/unity/connection-manager-use + +2013-07-02 Marco Trevisan (Treviño) + + ConnectionManager: add connection::Wrapper to wrap a sigc::connection disconnecting it on destruction. + + Approved by PS Jenkins bot, Brandon Schaefer. + +2013-07-02 Marco Trevisan (Treviño) + + Merging with lp:~3v1n0/unity/connection-manager-use + +2013-07-01 Marco Trevisan (Treviño) + + ConnectionManager: just use erase method when removing a connection + + Using a connection::Wrapper internally makes things to work smoothly + +2013-07-01 Marco Trevisan (Treviño) + + ConnectionManager: use connection::Wrapper::Ptr to hold connections + +2013-07-01 Marco Trevisan (Treviño) + + TestConnectionWrapper: add tests for connection::Wrapper + +2013-07-01 Marco Trevisan (Treviño) + + ConnectionManager: add connection::Wrapper to wrap a sigc::connection disconnecting it on destruction + +2013-07-02 Marco Trevisan (Treviño) + + Use connection::Manager to handle the sigc::connection disconnection on parent removal. + + Approved by PS Jenkins bot, Brandon Schaefer. + +2013-07-02 Marco Trevisan (Treviño) + + test-gestures: link against libUnityCore + +2013-07-01 Marco Trevisan (Treviño) + + GesturalWindowSwitcher: use connection::Manager + +2013-07-01 Marco Trevisan (Treviño) + + Tracks: remove unneeded dtor + +2013-07-01 Marco Trevisan (Treviño) + + VolumeLauncherIcon: use connection::Manager + +2013-07-01 Marco Trevisan (Treviño) + + Tracks: use connection::Manager + +2013-07-01 Marco Trevisan (Treviño) + + AbstractLauncherIcon: remove never-connected-to connections + +2013-07-01 Marco Trevisan (Treviño) + + MiscUtils: return sigc::connection when connecting to properties + + They can be safely copied around, keeping them working + +2013-07-01 Marco Trevisan (Treviño) + + Scope: use connection::Manager to connect to signals + +2013-07-01 Marco Trevisan (Treviño) + + ScopeProxy: use connection::Manager + +2013-07-01 Marco Trevisan (Treviño) + + ApplicationLauncherIcon: use connection::Manager + +2013-07-01 Marco Trevisan (Treviño) + + PanelView: use connection::Manager + +2013-07-01 Marco Trevisan (Treviño) + + PanelIndicatorsView: use connection::Manager + +2013-07-01 Marco Trevisan (Treviño) + + Merging with lp:~3v1n0/unity/connection-manager + +2013-07-01 Marco Trevisan (Treviño) + + Indicator: use connection::Manager + +2013-07-01 Marco Trevisan (Treviño) + + ScopeView: use connection::Manager + +2013-07-02 Automatic PS uploader + + Releasing 7.0.1+13.10.20130702-0ubuntu1 to ubuntu. + + Approved by PS Jenkins bot. + +2013-07-02 Automatic PS uploader + + Releasing 7.0.1+13.10.20130702-0ubuntu1, based on r3396 + +2013-07-02 Sebastien Bacher + + Depends on the new dconf-cli, we only need the command line tool, not the gtk editor. + + Approved by PS Jenkins bot, Michael Terry. + +2013-05-31 Sebastien Bacher + + Depends on the new dconf-cli, we only need the command line tool, not the gtk editor + +2013-07-02 Marco Trevisan (Treviño) + + ApplicationLauncherIcon: improve the way we override the Quit quicklist item + + If a quit action is defined in static (desktop file action) or dynamic way we + use it to override the default one, placing it to the proper position. + Also override more labels by default and if a quicklist item has the + QuicklistMenuItem::QUIT_ACTION_PROPERTY (defined as "unity-quit-action") + property set to TRUE, then we use this item as the quit quicklist item. + + Factorized the code we use to generate both static and dynamic ql items. Fixes: https://bugs.launchpad.net/bugs/876421. + + Approved by PS Jenkins bot, Christopher Townsend. + +2013-06-28 Marco Trevisan (Treviño) + + ApplicationLauncherIcon: quit overrider menu item should always have the "Quit" label + + TestApplicationLauncherIcon tests updated accordingly + +2013-06-28 Marco Trevisan (Treviño) + + TestApplicationLauncherIcon: verify that an entry can override the default Quit action using property + +2013-06-28 Marco Trevisan (Treviño) + + ApplicationLauncherIcon: allow to override the quit action, by using a DBusMenu property + + If a quicklist item has the QuicklistMenuItem::QUIT_ACTION_PROPERTY (defined as "unity-quit-action") + property set to TRUE, then we use this item as the quit menu. + +2013-06-28 Marco Trevisan (Treviño) + + TestApplicationLauncherIcon: use TEST_P to perform Quit entry tests by label + +2013-06-28 Marco Trevisan (Treviño) + + TestApplicationLauncherIcon: verify that the quit action is shown only if the app is running + + Also if it is overridden + +2013-06-28 Marco Trevisan (Treviño) + + ApplicationLauncherIcon: improve the way we override the Quit quicklist item + + If a quit action is defined in static (desktop file action) or dynamic way we use it to + override the default one, placing it to the proper position. + Factorized the code we use to generate both static and dynamic ql items. + +2013-06-28 Marco Trevisan (Treviño) + + TestApplicationLauncherIcon: verify Desktop Actions quicklist items + +2013-06-28 Marco Trevisan (Treviño) + + TestApplicationLauncherIcon: verify that invisible menus are ignored + +2013-06-28 Marco Trevisan (Treviño) + + TestApplicationLauncherIcon: verify that the markup is always disabled on remote menus + +2013-06-28 Marco Trevisan (Treviño) + + TestApplicationLauncherIcon: verify that adding a "Quit" labelled remote menu-item overrides default + +2013-06-28 Marco Trevisan (Treviño) + + TestApplicationLauncherIcon: verify the presence of remote menus and their callback + + All this is possible by mocking GetRemoteMenus and implementing it temporary. + +2013-06-28 Marco Trevisan (Treviño) + + LauncherIcon: add overridable GetRemoteMenus method, use to add remote menu items. + + Make the internal _menuclient_dynamic_quicklist variable internal to LauncherIcon only. + +2013-06-28 Marco Trevisan (Treviño) + + ApplicationLauncherIcon: better naming for ensure menu items function + +2013-07-02 Sebastien Bacher + + use correct ellipses. + + Approved by Marco Trevisan (Treviño), PS Jenkins bot. + +2013-07-01 Sebastien Bacher + + use correct ellipses + +2013-07-02 Chris Townsend + + Fixes some panel shadow regressions caused by rev. 3381. + - No panel shadow when logging in, ie, no windows are opened. + - Indicator drop down menus have the panel shadow painted over them. + - Notification bubbles cause the panel shadow to be drawn on top of everything. + - Minimizing all windows caused the panel shadow to not be drawn. Fixes: https://bugs.launchpad.net/bugs/1194865. + + Approved by PS Jenkins bot, Brandon Schaefer. + +2013-06-27 Chris Townsend + + Fixes some panel shadow regressions caused by rev. 3381. + +2013-07-02 Marco Trevisan (Treviño) + + ConnectionManager: add a class container of sigc::connection that takes care of disconnection + + Connections added will be disconnected on class destruction on on explicit removal or replacement + request. + + Approved by PS Jenkins bot, Andrea Azzarone. + +2013-07-01 Marco Trevisan (Treviño) + + TestConnectionManager: test Clear method + +2013-07-01 Marco Trevisan (Treviño) + + ConnectionManager: add Clear method + +2013-07-01 Marco Trevisan (Treviño) + + ConnectionManager: add full definition of std::hash + +2013-07-01 Marco Trevisan (Treviño) + + TestConnectionHandle: added new tests for connection::handle + +2013-07-01 Marco Trevisan (Treviño) + + ConnectionManager: add decrement operator overloading for handle + +2013-06-29 Marco Trevisan (Treviño) + + ConnectionManager: define connection::handle as a struct, so that we can control the initialization + + Thanks to this, we are sure that adding a connection::handle in a class, it gets initialized to 0 + at its initialization. + To get this I also had to specialize the std::hash in order to get std::unordered_map to work. + +2013-06-28 Marco Trevisan (Treviño) + + TestConnectionManager: test Get method + +2013-06-28 Marco Trevisan (Treviño) + + ConnectionManager: add Get method (to retrieve a sigc::connection from an handler) + +2013-06-28 Marco Trevisan (Treviño) + + TestConnectionManager: test RemoveAndClear method + +2013-06-28 Marco Trevisan (Treviño) + + ConnectionManager: add RemoveAndClear method, that is able to clear the handle value + +2013-06-28 Marco Trevisan (Treviño) + + TestConnectionManager: add tests for unity::connection::Manager + +2013-06-28 Marco Trevisan (Treviño) + + ConnectionManager: add a class container of sigc::connection that takes care of disconnection + + Connections added will be disconnected on class destruction on on explicit removal or replacement + request. + +2013-07-01 Marco Trevisan (Treviño) + + ApplicationLauncherIcon: only use a simple std::vector to cache the quicklist entries + + Remove the ugly std::string indexed std::map. + + Approved by Christopher Townsend, PS Jenkins bot. + +2013-06-29 Marco Trevisan (Treviño) + + test-gtest-service: don't depend on mock-application + +2013-06-28 Marco Trevisan (Treviño) + + TestLauncherController: use NiceMock's to avoid unneded output + +2013-06-28 Marco Trevisan (Treviño) + + TestApplicationLauncherIcon: cleanup the standalone windows we have on TearDown + +2013-06-28 Marco Trevisan (Treviño) + + MockApplication: always generate a NiceMock of default AppManager + +2013-06-28 Marco Trevisan (Treviño) + + MockApplication: add a default implementation for all the methods we have + +2013-06-27 Marco Trevisan (Treviño) + + TestApplicationLauncherIcon: check if Quit app method is called on quicklist activation + +2013-06-27 Marco Trevisan (Treviño) + + TestApplicationLauncherIcon: use NiceMock for mock Application and ApplicationWindow + +2013-06-27 Marco Trevisan (Treviño) + + MockApplication: do real gtest mocks of MockApplication and MockApplicationWindow + + This will allow proper testing + +2013-06-27 Marco Trevisan (Treviño) + + MockApplication: do a first real gtest mock of MockApplicationManager + +2013-06-27 Marco Trevisan (Treviño) + + TestApplicationLauncherIcon: verify unlock from launcher quicklist + +2013-06-27 Marco Trevisan (Treviño) + + TestApplicationLauncherIcon: verify the "Lock to Launcher" action + +2013-06-27 Marco Trevisan (Treviño) + + TestApplicationLauncherIcon: test the existence of main quicklist menu items + +2013-06-27 Marco Trevisan (Treviño) + + TestApplicationLauncherIcon: add utility functions to get quicklist items by label + + And use them in tests + +2013-06-27 Marco Trevisan (Treviño) + + ApplicationLauncherIcon: don't update icon geometry for web-app applications. + + No need to loop on them + +2013-06-27 Marco Trevisan (Treviño) + + MockApplication: add SetTitle / SetIcon methods and use them on TestApplicationLauncherIcon + +2013-06-27 Marco Trevisan (Treviño) + + TestApplicationLauncherIcon: verify that if an application has changed title, then quicklist is updated + +2013-06-27 Marco Trevisan (Treviño) + + ApplicationLauncherIcon: only use a simple vector to cache the quicklist entries + + Remove the ugly std::string indexed std::map + +2013-06-27 Marco Trevisan (Treviño) + + ApplicationLauncherIcon: use a simple std::vector to hold the control quicklists + +2013-06-27 Marco Trevisan (Treviño) + + ApplicationLauncherIcon: remove the unneeded _menu_clients map, just get it from parent + +2013-07-01 Sebastien Bacher + + backport the changelog from the manual distro upload. + + Approved by PS Jenkins bot, Didier Roche. + +2013-07-01 Sebastien Bacher + + backport the changelog from the manual distro upload + +2013-07-01 Lars Uebernickel + + unity-panel-service: call ido_init() and honor indicator's position requests. + + Approved by PS Jenkins bot, Sebastien Bacher. + +2013-06-30 Lars Uebernickel + + debian/control: add ido build-dep + +2013-06-28 Lars Uebernickel + + unity-panel-service: honor indicator's desired position + + For backward compatibility, this keeps the static ordering for indicators that + don't return a valid position. + +2013-06-28 Lars Uebernickel + + unity-panel-service: depend on ido and call ido_init + + Custom menu items for indicators live in ido now, and it needs to register + itself with gtk before any menus are created. + +2013-07-01 Didier Roche + + now build-depends on the desktop definition for scopes as libunity-common is dead. + + Approved by PS Jenkins bot. + +2013-06-28 Didier Roche + + now depends on the desktop definition for scopes as libunity-common is dead + +2013-06-29 Andrea Azzarone + + Remove not necessary assert. Fixes: https://bugs.launchpad.net/bugs/1192503. + + Approved by Brandon Schaefer, PS Jenkins bot. + +2013-06-19 Andrea Azzarone + + Remove not-needed assert. + +2013-06-28 Marco Trevisan (Treviño) + + BamfApplicationManager: always use std::make_shared and use glib::SignalManager::Add + + Also add some helper constructors. + + Approved by Christopher Townsend, PS Jenkins bot. + +2013-06-27 Marco Trevisan (Treviño) + + BamfApplicationManager: use glib::SignalManager::Add utility function to connect to signals + + And some spacing cleanup... + +2013-06-27 Marco Trevisan (Treviño) + + BamfApplicationManager: use std::bind to connect to property handlers + +2013-06-27 Marco Trevisan (Treviño) + + BamfApplicationManager: always use std::make_shared + + Also add some helper constructors + +2013-06-27 Marco Trevisan (Treviño) + + ApplicationManager: Use nux::ROProperty for Window and Application title and icon + + So BamfApplicationManager connect to {name,icon}-changed signals, set getters for properties + and ApplicationLauncherIcon update icon tooltip_text and icon when App title/icon changes. Fixes: https://bugs.launchpad.net/bugs/751909. + + Approved by Andrea Azzarone, PS Jenkins bot. + +2013-06-27 Marco Trevisan (Treviño) + + BamfApplicationManager: remove debug print statement + +2013-06-26 Marco Trevisan (Treviño) + + debian/control: update the build-dependency on bamf 0.5.0+13.10.20130626 + +2013-06-26 Marco Trevisan (Treviño) + + StandaloneLauncher: use UNITY_LOG_SEVERITY env var to define logging severity + +2013-06-26 Marco Trevisan (Treviño) + + TestApplicationLauncherIcon: remove old tests, update them to check the icon/tooltip updates + +2013-06-26 Marco Trevisan (Treviño) + + ApplicationLauncherIcon: remove the workaround to initialize tooltip or icon in invalid views + + This is not needed anymore since the gdbus-based libbamf has landed, as it uses properties + for Name and Icon values, and these are notified everytime they change or the view is re-opened. + +2013-06-26 Marco Trevisan (Treviño) + + MockLauncherIcon: use ApplicationWindow properties + +2013-06-26 Marco Trevisan (Treviño) + + PanelMenuView: update the panel title when the unmaximized application name changes + +2013-06-26 Marco Trevisan (Treviño) + + ApplicationLauncherIcon: update icon tooltip_text and icon when App title/icon changes + +2013-06-26 Marco Trevisan (Treviño) + + Tests: adapt ApplicationManager based code to use title and icon properties + +2013-06-26 Marco Trevisan (Treviño) + + BamfApplicationManager: connect to {name,icon}-changed signals, set getters for properties + +2013-06-26 Marco Trevisan (Treviño) + + ApplicationManager: Use nux::ROProperty for Window and Application title and icon + +2013-06-27 Łukasz 'sil2100' Zemczak + + Revert revision 3380. This caused regression of all autopilot tests as show_desktop was invalidly detected every time there are no visible windows on screen. + + Approved by PS Jenkins bot, Andrea Azzarone. + +2013-06-27 Łukasz 'sil2100' Zemczak + + Revert revision 3380. This caused regression of all autopilot tests as show_desktop was invalidly detected every time there are no visible windows on screen + +2013-06-26 Michal Hruby + + Add form_factor property to ScopeProxy, allow passing hints to searches. + + Approved by PS Jenkins bot, Marco Trevisan (Treviño). + +2013-06-26 Michal Hruby + + Bump versions + +2013-06-26 Michal Hruby + + Add form_factor, allow passing hints to searches + +2013-06-24 Automatic PS uploader + + Releasing 7.0.0daily13.06.24-0ubuntu1 to ubuntu. + + Approved by PS Jenkins bot. + +2013-06-24 Automatic PS uploader + + Releasing 7.0.0daily13.06.24-0ubuntu1, based on r3382 + +2013-06-24 Ted Gould + + Fix upstart job to handle legacy case and not duplicate events. + + Approved by Michał Sawicz, PS Jenkins bot, Christopher Townsend, Iain Lane. + +2013-06-21 Ted Gould + + Remove manual start work around + +2013-06-21 Ted Gould + + Commenting out the dep on the Unity jobs for now. + +2013-06-21 Ted Gould + + Changing the upstart job name to Unity 7 + +2013-06-21 Ted Gould + + The panel serivce lifecycle should match Unity's + +2013-06-20 Ted Gould + + We want to make sure that we're only running with Unity, and after it has started + +2013-06-20 Ted Gould + + In the fallback case manually start unity-panel-service + +2013-06-20 Ted Gould + + Don't emit desktop-start and desktop-end, we shouldn't have two jobs we expect to have running at the same time emitting the same events. + +2013-06-20 Ted Gould + + Make sure that gnome-settings-daemon is started so we get the X variables we need at start + +2013-06-22 Brandon Schaefer + + When on the bottom row and you press down, the detail index now moves right until it hits the last icon in the row. + + Approved by PS Jenkins bot, Marco Trevisan (Treviño). + +2013-06-21 Brandon Schaefer + + * Fix up tests :) + +2013-06-20 Brandon Schaefer + + * A test! + +2013-06-20 Brandon Schaefer + + * To designs request also make pressing down on the last right move to the right + +2013-06-22 Chris Townsend + + Draw the full panel shadow when there are windows docked on the panel and no focused windows on the screen such as when the desktop has been clicked. Fixes: https://bugs.launchpad.net/bugs/1036614. + + Approved by Brandon Schaefer, MC Return, PS Jenkins bot. + +2013-06-19 Chris Townsend + + Draw the full panel shadow when there are windows docked on the panel and no focused windows on the screen such as when the desktop has been clicked. + +2013-06-21 Brandon Schaefer + + Show desktop now only works for individual workspaces. Also if any new windows are opened, or one is restored on that workspace then the next Show desktop will minimize those. The only time windows are restored are when no new windows have been mapped, and no windows have been restored for that workspace only. Fixes: https://bugs.launchpad.net/bugs/966030. + + Approved by Marco Trevisan (Treviño), PS Jenkins bot. + +2013-06-20 Brandon Schaefer + + * When a window closes, or we enter a new workspace check if its empty, if so we want to restore + windows on a show desktop. + +2013-06-19 Brandon Schaefer + + * Fix focusing issue. Compiz assumes if any windows are still in show + desktop mode to not focus a new window sadly... + +2013-06-19 Brandon Schaefer + + * Only restore windows on the current workspace + +2013-06-18 Brandon Schaefer + + * Fixes viewport problem. Now if we ever enter a viewport that is empty (only desktop visible), then + we go back to being 'in show desktop mode' thi way we restore windows if the user hits the shows desktop + icon. Otherwise nothing would happen, which feels incorrect. + +2013-06-18 Brandon Schaefer + + * Only allows windows on the same viewport to be minimzed when doing a show desktop. + * Also, when a uses maps a new window, unminimizes a window that was hidden or switches workspaces + show deskop will then hide all window (instead of unminimizing them!). + +2013-06-19 Automatic PS uploader + + Releasing 7.0.0daily13.06.19-0ubuntu1 to ubuntu. + + Approved by PS Jenkins bot. + +2013-06-19 Automatic PS uploader + + Releasing 7.0.0daily13.06.19-0ubuntu1, based on r3378 + +2013-06-18 Brandon Schaefer + + When in detail mode, you are now allowed to use UP/DOWN keys to move around. Fixes: https://bugs.launchpad.net/bugs/1131646. + + Approved by PS Jenkins bot, Marco Trevisan (Treviño). + +2013-06-18 Brandon Schaefer + + * Merge trunk + +2013-06-18 Brandon Schaefer + + * Adds more tests, cleans up name and extra functions we don't need to expose + +2013-06-17 Brandon Schaefer + + * Move some event handling logic inside the switcher controller! + +2013-06-17 Brandon Schaefer + + * Adds some tests for the changes in SystemLayout + +2013-06-17 Brandon Schaefer + + * Missed one explict cast... + +2013-06-17 Brandon Schaefer + + * Fix up from reviewers comments + +2013-06-13 Brandon Schaefer + + * Allows the use of UP/DOWN arrow keys while in the switcher detail mode. + +2013-06-17 Iain Lane + + Start unity-panel-service using upstart user session jobs. + + Approved by PS Jenkins bot, Didier Roche. + +2013-06-17 Iain Lane + + Don't 'start on starting gnome-settings-daemon' - this should be the other way round. + + This doesn't cause gsd to get started. Instead gsd should be 'start on ... + starting unity' so that it is launched when we try to launch unity. + +2013-06-17 Iain Lane + + Have unity emit desktop-start/desktop-end and unity-panel-service listen for those + + This matches the behaviour we have with gnome-session currently and will allow + jobs to care for both gnome-session and direct Unity launching with one set of + "start on"/"stop on" stanzas. + + start on started/starting unity will continue to work too. + +2013-06-17 Iain Lane + + Reintroduce 3364: + + Manage Unity Panel Service's lifecycle with Upstart. + +2013-06-15 Andrea Azzarone + + Skip tests if not in desktop mode. Fixes: https://bugs.launchpad.net/bugs/1191053. + + Approved by PS Jenkins bot, Marco Trevisan (Treviño). + +2013-06-14 Andrea Azzarone + + Skip tests if not in desktop mode. + +2013-06-15 Andrea Azzarone + + Fix failing test. Fixes: https://bugs.launchpad.net/bugs/1191059. + + Approved by PS Jenkins bot, Marco Trevisan (Treviño). + +2013-06-14 Andrea Azzarone + + Fix failing test. + +2013-06-15 Xiao-Long Chen + + SessionView: Fix build when building without precompiled headers. Fixes: https://bugs.launchpad.net/bugs/1191097. + + Approved by PS Jenkins bot, Marco Trevisan (Treviño). + +2013-06-14 Xiao-Long Chen + + Fix build when building without precompiled headers + +2013-06-14 Brandon Schaefer + + Fixes the use of Alt+` and Right arrow when in detail mode. Now it goes to the next window instead of closing detail mode. Fixes: https://bugs.launchpad.net/bugs/1190798. + + Approved by PS Jenkins bot, Marco Trevisan (Treviño). + +2013-06-14 Brandon Schaefer + + * When going into detail mode, we need to ensure we set: DetailMode::TAB_NEXT_WINDOW + not DetailMode::TAB_NEXT_TILE. Otherwise the next Right movemnt will alway + close detail mode. + +2013-06-14 Andrea Azzarone + + Fix failing AP test. Fixes: https://bugs.launchpad.net/bugs/1191039. + + Approved by PS Jenkins bot, Marco Trevisan (Treviño). + +2013-06-14 Andrea Azzarone + + Fix failing test. + +2013-06-13 Michal Hruby + + Bump libunity-core SONAME and adjust debian. + + Approved by PS Jenkins bot, Michał Sawicz. + +2013-06-13 Michal Hruby + + Bump SONAME + +2013-06-13 Ted Gould + + Make Unity depend on bamfdaemon. + + Approved by PS Jenkins bot, Marco Trevisan (Treviño). + +2013-06-13 Ted Gould + + Adding a direct dependnecy on the bamfdaemon as we need it for the launcher and alt tab. + +2013-06-12 Nick Dedekind + + Added check for x-unity-no-preview. Do not preview; send direct activation to scope. Fixes: https://bugs.launchpad.net/bugs/1188705. + + Approved by Michal Hruby, PS Jenkins bot. + +2013-06-11 Nick Dedekind + + added check for x-unity-no-preview + +2013-06-12 Chris Townsend + + Add support to close social previews by clicking anywhere in the preview bubble. Fixes: https://bugs.launchpad.net/bugs/1190007. + + Approved by PS Jenkins bot, Brandon Schaefer. + +2013-06-11 Chris Townsend + + Added support to close social previews by clicking anywhere in the preview bubble. + +2013-06-10 Chris Townsend + + Add functionality to wiggle urgent icons at certain time intervals when the Launcher is hidden. Fixes: https://bugs.launchpad.net/bugs/893196. + + Approved by Marco Trevisan (Treviño), PS Jenkins bot, Brandon Schaefer. + +2013-06-10 Chris Townsend + + Move some logic outside of the for loop since it doesn't need to be checked every iteration. + +2013-06-10 Chris Townsend + + * Change some EXPECT_* to ASSERT_* since we don't want to continue the test if the prerequisite fails. + * Add a new test to detect if the urgent icon will wiggle once the Launcher is revealed. + +2013-06-07 Chris Townsend + + Add tests for checking the handling of the urgent timer functions. + +2013-06-06 Chris Townsend + + Cleaned up the code some per comments in the merge proposal. + +2013-06-06 Chris Townsend + + Merge in trunk. + +2013-05-31 Chris Townsend + + A bit more refactoring. + +2013-05-31 Chris Townsend + + Refactor the previous code change to make this more readable and to place code in functions that does the same work in different places. + +2013-05-31 Chris Townsend + + Merge in from trunk. + +2013-05-14 Chris Townsend + + Rework the logic to take into account more conditions that may occur when dealing with urgent icons. + +2013-05-10 Chris Townsend + + Add functionality to wiggle urgent icons when the Launcher is hidden at certain time intervals. + +2013-06-07 Automatic PS uploader + + Releasing 7.0.0daily13.06.07-0ubuntu1 to ubuntu. + + Approved by PS Jenkins bot. + +2013-06-07 Automatic PS uploader + + Releasing 7.0.0daily13.06.07-0ubuntu1, based on r3365 + +2013-06-07 Didier Roche + + Revert the panel on upstart from ted, it doesn't respawn as expected when another service try to communicate with the panel service and the consequence is a lot of tests failing + +2013-06-06 Ted Gould + + Manage Unity Panel Service's lifecycle with Upstart. + + Approved by PS Jenkins bot, Christopher Townsend. + +2013-06-05 Ted Gould + + Updating to current trunk and resolving a small conflict + +2013-05-25 Ted Gould + + Merging trunk + +2013-05-17 Ted Gould + + Emit the indicators-loaded event + +2013-05-17 Ted Gould + + Grab the GTK wrapper branch + +2013-05-17 Ted Gould + + If we're connected when we create it, resync right away. + +2013-05-17 Ted Gould + + Adding in an emits + +2013-05-16 Ted Gould + + Fleshing this out a bit + +2013-05-16 Ted Gould + + Grabbing the upstart directory + +2013-05-16 Ted Gould + + Adding in the conf file, basic version + +2013-05-16 Ted Gould + + Dropping the dbus services directory + +2013-05-16 Ted Gould + + We don't need DBus Activation here + +2013-05-16 Ted Gould + + We want upstart to respawn the panel service for us + +2013-06-06 Michal Hruby + + Don't activate a result twice after pressing Enter. Fixes: https://bugs.launchpad.net/bugs/1188191. + + Approved by PS Jenkins bot, Brandon Schaefer. + +2013-06-06 Michal Hruby + + Don't activate a result twice + +2013-06-06 Manuel de la Pena + + Adds support for payment previews that will allow users to buy music from within the dash. . + + Approved by PS Jenkins bot, Nick Dedekind. + +2013-06-05 Manuel de la Pena + + Add actions to the tab iterator so that the default action is the correctly highlighted. + +2013-06-05 Manuel de la Pena + + Add action buttons as childre, remove tab order and use a tab iterator based layout. + +2013-06-04 Manuel de la Pena + + Ensure buttons are added as children. + +2013-06-04 Manuel de la Pena + + Fixed some small issues mentioned from design. + +2013-05-29 Manuel de la Pena + + Merged with trunk. + +2013-05-24 Manuel de la Pena + + Merged with trunk. + +2013-05-17 Manuel de la Pena + + Removed moved file that was accidentaly added. + +2013-05-17 Manuel de la Pena + + Merged with trunk. + +2013-05-15 Manuel de la Pena + + Fixed problem with the wrong action name. + +2013-05-14 Manuel de la Pena + + Fixed small issue with error preview. Ensure download action expands according to text. + +2013-05-14 Manuel de la Pena + + Title are ellipsized when they are too long. + +2013-05-14 Manuel de la Pena + + Merged with parent. + +2013-05-14 Manuel de la Pena + + Ellipsize the text whn needed. + +2013-05-10 Manuel de la Pena + + Merged with changes in parent branch. + +2013-05-10 Manuel de la Pena + + Fixed some merge issues. + +2013-05-06 Manuel de la Pena + + Merged with libunity breackage. + +2013-05-02 Manuel de la Pena + + Add missing AddChild. + +2013-05-02 Manuel de la Pena + + Updated changelog. + +2013-05-02 Manuel de la Pena + + Reverted changes in debian changelog. + +2013-04-30 Manuel de la Pena + + Updated change log + +2013-04-30 Manuel de la Pena + + Updated change log + +2013-04-30 Manuel de la Pena + + Updated change log. + +2013-04-29 Manuel de la Pena + + Set correct tab order. + +2013-04-29 Manuel de la Pena + + Set a max for the lines in the error and ellipsized if we are too long. + +2013-04-29 Manuel de la Pena + + Fixed warning icon alignment. + +2013-04-29 Manuel de la Pena + + Fixed aligment in error preview. + +2013-04-29 Manuel de la Pena + + Merged with trunk. + +2013-04-29 Manuel de la Pena + + Merged with plan-b + +2013-04-22 Manuel de la Pena + + Merged with trunk. + +2013-04-22 Manuel de la Pena + + Merged with trunk. + +2013-04-16 Manuel de la Pena + + Merged with trunk. + +2013-04-16 Manuel de la Pena + + Merged with plan-b. + +2013-04-02 Manuel de la Pena + + Improve transition for payment previews. + +2013-04-02 Manuel de la Pena + + Added missing resources and fixed the aligment. + +2013-04-02 Manuel de la Pena + + Fixed static text width. + +2013-04-01 Manuel de la Pena + + Update comment. + +2013-04-01 Manuel de la Pena + + Show error message when the hint is set. + +2013-03-31 Manuel de la Pena + + Ensure that actions do work in the error preview. + +2013-03-31 Manuel de la Pena + + Added support for the in-dash payments. + +2013-06-05 Ted Gould + + Add an upstart job to unity-common. + + Approved by PS Jenkins bot, Christopher Townsend. + +2013-06-03 Ted Gould + + Make sure to export the right variable name + +2013-05-16 Ted Gould + + Typo + +2013-05-16 Ted Gould + + Make sure to install the upstart job + +2013-05-16 Ted Gould + + Adding in an upstart job to start unity + +2013-06-05 Łukasz 'sil2100' Zemczak + + Add a flag for -Wno-error=unused-local-typedefs, since this causes a FTBFS on ARM + +2013-06-05 Łukasz 'sil2100' Zemczak + + Add a flag for -Wno-error=unused-local-typedefs, since this causes a FTBFS on ARM + +2013-06-05 Nick Dedekind + + Uses a gobject weak ref to test for object deletion in the GLibObject tests. + Previously was checking with G_IS_OBJECT on an invalid pointer, which was causing a segfault + +2013-06-05 Nick Dedekind + + Use weak ref to test for gobject deletion. G_IS_OBJECT crashing on deleted pointer. + +2013-06-05 Pawel Stolowski + + Bumped required version of libunity. + +2013-06-05 Pawel Stolowski + + Bumped required version of libunity. + +2013-06-03 Automatic PS uploader + + Releasing 7.0.0daily13.06.03ubuntu.unity.next-0ubuntu1 to ubuntu. + + Approved by PS Jenkins bot. + +2013-06-03 Automatic PS uploader + + Releasing 7.0.0daily13.06.03ubuntu.unity.next-0ubuntu1, based on r3355 + +2013-06-03 Sam Spilsbury + + Add a pkg-config dependency on xpathselect>=1.2 + + Technically we depend on xpathselect>=1.3 in debian/control, however + the latest -dev package in the distro claims the version is 1.2 and it + builds just fine with that. + + (LP: #1185226). Fixes: https://bugs.launchpad.net/bugs/1185226. + + Approved by PS Jenkins bot, Stephen M. Webb. + +2013-05-29 Sam Spilsbury + + Add a pkg-config dependency on xpathselect>=1.2 + + Technically we depend on xpathselect>=1.3 in debian/control, however + the latest -dev package in the distro claims the version is 1.2 and it + builds just fine with that. + + (LP: #1185226) + +2013-06-01 Andrea Azzarone + + Reference BamfApplication in GetRunningApplications. Fixes: https://bugs.launchpad.net/bugs/1181717. + + Approved by PS Jenkins bot, Marco Trevisan (Treviño). + +2013-06-01 Andrea Azzarone + + Fix crash in Application::~Application. + +2013-05-31 Chris Townsend + + Fixes the issue where the filling in of the progress bar over Launcher icons does not scale when using smaller or larger icon sizes than the default size of 48. Fixes: https://bugs.launchpad.net/bugs/968680. + + Approved by PS Jenkins bot, Brandon Schaefer. + +2013-05-31 Chris Townsend + + Add an explicit cast for consistency's sake. + +2013-05-30 Chris Townsend + + * Get rid of whitespace. + * Change float casts to static_cast. + * Get rid of int casts as they are not needed. + * Fix double ";;" typo. + +2013-05-29 Chris Townsend + + Fixes the issue where the filling in of the progress bar over Launcher icons does not scale when using smaller or larger icon sizes than the default size of 48. + +2013-05-31 Automatic PS uploader + + Releasing 7.0.0daily13.05.31ubuntu.unity.next-0ubuntu1 to ubuntu. + + Approved by PS Jenkins bot. + +2013-05-31 Automatic PS uploader + + Releasing 7.0.0daily13.05.31ubuntu.unity.next-0ubuntu1, based on r3352 + +2013-05-30 Chris Townsend + + Fixes issue where source files for test-gestures would always be compiled even if the original source files did not change. Fixes: https://bugs.launchpad.net/bugs/1039367. + + Approved by Marco Trevisan (Treviño), PS Jenkins bot. + +2013-05-16 Chris Townsend + + Fixes issue where source files for test-gestures would always be compiled even if the original source files did not change. + +2013-05-29 Ted Gould + + Upstart event for when the indicators are loaded by the panel service. + + Approved by Stephen M. Webb, PS Jenkins bot. + +2013-04-23 Ted Gould + + Adding a runtime dep on upstart so that we can get initctl + +2013-04-23 Ted Gould + + Fixing a lost comma + +2013-04-23 Ted Gould + + Fix variable name + +2013-04-23 Ted Gould + + Sending the signal to upstart that the indicators are loaded + +2013-04-23 Ted Gould + + Adding in a ready signal idle + +2013-05-29 Andrea Azzarone + + Allow alt-tabbing during a dnd operation. Fixes: https://bugs.launchpad.net/bugs/111939. + + Approved by PS Jenkins bot, Marco Trevisan (Treviño). + +2013-04-10 Andrea Azzarone + + Allow alt-tabbing during a dnd operation. + +2013-05-28 Leo Arias + + Fixed the execute_action_by_id on the dash emulator. Fixes: https://bugs.launchpad.net/bugs/1181677. + + Approved by PS Jenkins bot, Łukasz Zemczak. + +2013-05-19 Leo Arias + + Fixed the execute_action_by_id on the dash emulator. + +2013-05-28 Didier Roche + + add dep on autopilot-desktop. + + Approved by PS Jenkins bot, Łukasz Zemczak. + +2013-05-27 Didier Roche + + add dep on autopilot-dekstop + +2013-05-24 Pawel Stolowski + + Fixes for two autopilot tests. + + Approved by PS Jenkins bot, Nick Dedekind, Łukasz Zemczak. + +2013-05-24 Pawel Stolowski + + Fix two autopilot tests. + +2013-05-24 Thomi Richards + + Update the unity autopilot test suite to be compatible with the new autopilot API for custom emulators. + + Approved by PS Jenkins bot, Christopher Lee. + +2013-05-23 Thomi Richards + + Update to work with autopilot API for custom emulator base classes. + +2013-05-23 Andrea Azzarone + + Remove AbstractSeparator.cpp (it does not make sense :). + + Approved by PS Jenkins bot, Marco Trevisan (Treviño). + +2013-05-23 Andrea Azzarone + + Remove AbstractSeparator.cpp (it does not make sense :) + +2013-05-23 Didier Roche + + Bumped the libnux version to 4.0.2, as we just bumped the micro version due to the ABI change + +2013-05-23 Łukasz 'sil2100' Zemczak + + Bumped the libnux version to 4.0.2, as we just bumped the micro version due to the ABI change + +2013-05-23 Marco Trevisan (Treviño) + + Unity: "s/unsigned long long/uint64_t/g". + + Approved by Brandon Schaefer, PS Jenkins bot. + +2013-05-18 Marco Trevisan (Treviño) + + Unity: "s/unsigned long long/uint64_t/g" + +2013-05-22 Brandon Schaefer + + Bumps libnux to new correct abi version. + + Approved by PS Jenkins bot, Francis Ginther, Marco Trevisan (Treviño). + +2013-05-22 Brandon Schaefer + + * Forgot comma! + +2013-05-21 Brandon Schaefer + + [ Brandon Schaefer ] + Bump libnux to new version + +2013-05-22 Andrea Azzarone + + Fix crashing tests. Fixes: https://bugs.launchpad.net/bugs/1182585. + + Approved by Marco Trevisan (Treviño), PS Jenkins bot. + +2013-05-22 Andrea Azzarone + + Disconnect signal in DashView. + +2013-05-22 Pawel Stolowski + + Add ModelIterator-inl.h to the list of installed headers (as it's included by ModelIterator.h). + + Approved by PS Jenkins bot, Nick Dedekind. + +2013-05-22 Pawel Stolowski + + Add ModelIterator-inl.h to the list of installed headers (as it's included by ModelIterator.h). + +2013-05-22 Andrea Azzarone + + Don't build CoverflowResultView.cpp. + + Approved by PS Jenkins bot, Marco Trevisan (Treviño). + +2013-05-22 Andrea Azzarone + + Don't build CoverflowResultView.cpp. + +2013-05-22 Francis Ginther + + Handle StateNotFoundError when querying the label of a hud button. + + Approved by PS Jenkins bot, Łukasz Zemczak. + +2013-05-21 Francis Ginther + + Handle StateNotFoundError when querying the label of a hud button + +2013-05-22 Łukasz 'sil2100' Zemczak + + Modify all the hud_query_check lambdas to be more smart and error-checking. Same for the selected_hud_button method in the HUD emulator. + Also, get rid of the troublesome test_gedit_undo and change it into test_gedit_save, which is easier to test and anyway tests what we want. + Besides that we also now try to handle the StateNotFoundError exception in the HUD emulator, another cause of some AP failures. + + Approved by PS Jenkins bot, Francis Ginther, Andrea Azzarone. + +2013-05-21 Łukasz 'sil2100' Zemczak + + Ok, so actually, let's handle the case when there's a StateNotFoundError returned by the hud_buttons method + +2013-05-21 Łukasz 'sil2100' Zemczak + + Same fix for the test_search HUD tests + +2013-05-21 Łukasz 'sil2100' Zemczak + + Fix the test_app_activate_on_enter in the same way + +2013-05-21 Łukasz 'sil2100' Zemczak + + Change the test_gedit_undo to test_gedit_save, as it checks the same functionality but is easier to make right + +2013-05-21 Łukasz 'sil2100' Zemczak + + More fixes related to the terrible undo test + +2013-05-21 Łukasz 'sil2100' Zemczak + + Fix some autopilot test failures, some related to test_shortcut_hint and some to test_scroll in launcher. + + Approved by PS Jenkins bot, Francis Ginther. + +2013-05-20 Łukasz 'sil2100' Zemczak + + Add a few more applications to be launched during the test_scroll tests, for bigger screend - a workaround + +2013-05-20 Łukasz 'sil2100' Zemczak + + Fix the two shortcut_hint tests with the switcher + +2013-05-21 Christopher Lee + + Updating the dbus introspection to use the new xpathselect 1.3.libxpathselect-dev. + + Approved by Brandon Schaefer, PS Jenkins bot, Thomi Richards. + +2013-05-20 Christopher Lee + + Fixed depends for unity-autopilot + +2013-05-20 Christopher Lee + + Merge trunk + +2013-05-19 Christopher Lee + + Added missing build depends + +2013-05-14 Christopher Lee + + Make exception caught in ensure_unity_running more specific + +2013-05-14 Christopher Lee + + Merge trunk + +2013-05-14 Christopher Lee + + Slight code juggle around to enable cleanup of dlopen-ed library. + +2013-05-09 Christopher Lee + + Update dbus protocol version to 1.3 + +2013-05-09 Christopher Lee + + re-introduce xpathselect for introspection and update for protocol version 1.3 + +2013-05-07 Thomi Richards + + Added GetVersion method. + +2013-05-20 Mathieu Trudel-Lapierre + + Increase timeouts for hud functional and search tests. + + Approved by PS Jenkins bot, Brandon Schaefer. + +2013-05-17 Mathieu Trudel-Lapierre + + Increase timeouts for Eventually() tests for hud functional and search tests. + +2013-05-20 Łukasz 'sil2100' Zemczak + + Wrong version AGAIN, fixing so that the builder can start working correctly again. + + Approved by PS Jenkins bot, Marco Trevisan (Treviño). + +2013-05-19 Łukasz 'sil2100' Zemczak + + Wrong version AGAIN + +2013-05-19 Łukasz 'sil2100' Zemczak + + Fix version in changelog again, since the date needs to be different. + + Approved by PS Jenkins bot, Marco Trevisan (Treviño). + +2013-05-19 Łukasz 'sil2100' Zemczak + + Maybe like this + +2013-05-19 Łukasz 'sil2100' Zemczak + + Fix version in changelog again + +2013-05-19 Łukasz 'sil2100' Zemczak + + Add the missing changelog entry for 7.0.0daily13.05.08ubuntu.unity.next-0ubuntu1 which landed into the next PPA. + + Approved by PS Jenkins bot, Marco Trevisan (Treviño). + +2013-05-19 Łukasz 'sil2100' Zemczak + + Bump the date again + +2013-05-19 Łukasz 'sil2100' Zemczak + + Add the missing changelog entry for 7.0.0daily13.05.08ubuntu.unity.next-0ubuntu1 which landed into the next PPA + +2013-05-19 Marco Trevisan (Treviño) + + SwitcherController: use proper long long types for WindowActiveNumber + + Otherwise an overflow can cause bad window selection after long uptime. + + Approved by PS Jenkins bot, Brandon Schaefer. + +2013-05-18 Marco Trevisan (Treviño) + + Merging with parent branch fixes + +2013-05-18 Marco Trevisan (Treviño) + + TestSwitcherController: fix faling test + +2013-05-18 Marco Trevisan (Treviño) + + TestSwitcherController: test switching between windows of the focused application + +2013-05-18 Marco Trevisan (Treviño) + + FakeApplicationWindow: register window in the StandaloneWindowManager with active number + +2013-05-18 Marco Trevisan (Treviño) + + StandaloneWindow: add ActiveNumber support + +2013-05-18 Marco Trevisan (Treviño) + + SwitcherController: use proper long long types for WindowActiveNumber + + Otherwise an overflow can cause bad window selection after long uptime. + +2013-05-19 Marco Trevisan (Treviño) + + UnityCore: add GtkWrapper to handle GtkIconInfo correctly for different GTK versions + + Fix a memory leak in LauncherIcon. Fixes: https://bugs.launchpad.net/bugs/1180790. + + Approved by PS Jenkins bot, Sam Spilsbury, Ted Gould, Andrea Azzarone. + +2013-05-18 Marco Trevisan (Treviño) + + TestGTKWrapper: Adding basic gtk-wrapper test + +2013-05-18 Marco Trevisan (Treviño) + + TestResultRenderer: fix compilation issue + +2013-05-17 Marco Trevisan (Treviño) + + ResultRenderer: use glib::Error for error handling + +2013-05-17 Marco Trevisan (Treviño) + + GLibWrapper.h: clear the glib::Error before setting it again + +2013-05-17 Marco Trevisan (Treviño) + + Merging with trunk + +2013-05-17 Marco Trevisan (Treviño) + + Use gtk::IconInfo everywhere in the code to have proper handling + + Fix a memory leak in LauncherIcon (we always created a GIcon without unref'ing it) + +2013-05-17 Marco Trevisan (Treviño) + + UnityCore: add GtkWrapper to handle GtkIconInfo correctly for different versions + +2013-05-18 Łukasz 'sil2100' Zemczak + + We need to bump the changelog version for the daily-release bots to be able to handle it correctly. + + Approved by PS Jenkins bot, Andrea Azzarone. + +2013-05-18 Łukasz 'sil2100' Zemczak + + We need to bump the changelog version for the daily-release bots to be able to handle it correctly + +2013-05-18 Łukasz 'sil2100' Zemczak + + Fix two HUD failures related to HUD slow action activation. + + Approved by PS Jenkins bot, Brandon Schaefer, Mathieu Trudel-Lapierre. + +2013-05-16 Łukasz 'sil2100' Zemczak + + Fix two HUD failures related to HUD 2.0 changes + +2013-05-17 Łukasz 'sil2100' Zemczak + + Fix the changelog entries that were in the experimental PPA - move them to unity main versions. + + Approved by PS Jenkins bot, Ken VanDine. + +2013-05-17 Łukasz 'sil2100' Zemczak + + Fix the changelog entry + +2013-05-17 Manuel de la Pena + + Merge 100 scopes / smart scopes feature branch. + + Approved by PS Jenkins bot, Mathieu Trudel-Lapierre. + +2013-05-17 Łukasz 'sil2100' Zemczak + + Comment out suspicious parts that are breaking CI + +2013-05-16 Pawel Stolowski + + Bumped required version of nux. + +2013-05-16 Pawel Stolowski + + Fixed required version of libunity-dev for libunity-core. + +2013-05-16 Pawel Stolowski + + Bumped required libunity version to 7.0.0. + +2013-05-16 Pawel Stolowski + + Merged smart scopes branch. + +2013-05-15 Christopher Lee + + Resolve conflicts in merging updated autopilot tests. + + Approved by Pawel Stolowski, PS Jenkins bot. + +2013-05-15 Christopher Lee + + Merge and resolve conflict + +2013-05-10 Christopher Lee + + Merged in Autopilot 1.3 updates + +2013-05-14 Pawel Stolowski + + Fix required version of nux to 4.0.1 from 4.0.2. + + Approved by PS Jenkins bot, Łukasz Zemczak, Nick Dedekind. + +2013-05-14 Pawel Stolowski + + Use correct version of nux; the latest one is now 4.0.1. + +2013-05-14 Nick Dedekind + + If enter is pressed while a search is still being performed, we wait a maximum of one second before activating. + + Approved by Pawel Stolowski, PS Jenkins bot. + +2013-05-13 Nick Dedekind + + use const value for entry activate wait timeout + +2013-05-13 Nick Dedekind + + added max search entry activation timeout + +2013-05-13 Nick Dedekind + + Result preview activated on left single-click. Normal result activation on double-click. + + Approved by Michal Hruby, PS Jenkins bot. + +2013-05-03 Nick Dedekind + + Added double-click-activate dconf key. + +2013-05-01 Nick Dedekind + + Fixed ap dash emulator result activate + +2013-05-01 Nick Dedekind + + Updated autopilot dash result activations + +2013-05-01 Nick Dedekind + + Result preview activated on left single-click. Normal result activation on double-click + +2013-05-13 James Henstridge + + Hide the ratings widget in the movie preview if the rating is less than zero. Fixes: https://bugs.launchpad.net/bugs/1178046. + + Approved by PS Jenkins bot, Nick Dedekind. + +2013-05-13 James Henstridge + + Fix indentation. + +2013-05-13 James Henstridge + + Add a test to show that the ratings widget is not created when the + rating is less than 0. + +2013-05-10 James Henstridge + + Hide the ratings widget in the Movie preview if rating < 0. + +2013-05-09 Automatic PS uploader + + Merge trunk. + + Approved by PS Jenkins bot, Manuel de la Peña, Brandon Schaefer. + +2013-05-09 Michal Hruby + + Merge unity trunk + +2013-05-08 Automatic PS uploader + + Releasing 7.0.0daily13.05.08ubuntu.unity.experimental.certified-0ubuntu1 to ubuntu. + + Approved by PS Jenkins bot. + +2013-05-08 Automatic PS uploader + + Releasing 7.0.0daily13.05.08ubuntu.unity.experimental.certified-0ubuntu1, based on r3137 + +2013-05-07 Automatic PS uploader + + Releasing 7.0.0daily13.05.07ubuntu.unity.experimental.certified-0ubuntu1 to ubuntu. + + Approved by PS Jenkins bot. + +2013-05-07 Automatic PS uploader + + Releasing 7.0.0daily13.05.07ubuntu.unity.experimental.certified-0ubuntu1, based on r3134 + +2013-05-07 Andrea Azzarone + + Fix category expansion. + + Approved by PS Jenkins bot, Michal Hruby. + +2013-05-07 Michal Hruby + + Merge trunk + +2013-05-02 Andrea Azzarone + + Add MockResults + +2013-05-02 Andrea Azzarone + + Update and fix tests. + +2013-05-01 Andrea Azzarone + + Improve tests. + +2013-05-01 Andrea Azzarone + + Pull from Nick's branch and make sure that all the tests of the previous commit pass. + +2013-05-01 Andrea Azzarone + + Commit to pull from Nick's branch. + +2013-04-30 Andrea Azzarone + + Add test for category expansion. + +2013-04-30 Andrea Azzarone + + Merge lp:~unity-team/unity/libunity-7.0-breakage. + +2013-04-30 Andrea Azzarone + + Remove doubled code. + +2013-05-07 Nick Dedekind + + Save/Restore dash category focus when adding/removing/reordering categories. Fixes: https://bugs.launchpad.net/bugs/1170709, https://bugs.launchpad.net/bugs/1174488. + + Approved by Michal Hruby, PS Jenkins bot, Andrea Azzarone. + +2013-05-03 Nick Dedekind + + updated nux api version + +2013-05-01 Nick Dedekind + + Fixed some issues with static focus results + +2013-04-30 Nick Dedekind + + Set focus back to default on focus reset. + +2013-04-30 Nick Dedekind + + Set focus back to default on focus reset. + +2013-04-30 Nick Dedekind + + merged with parent + +2013-04-30 Nick Dedekind + + More scope focus navigation + +2013-04-30 Nick Dedekind + + merge with parent + +2013-04-29 Nick Dedekind + + Resuse focus push/pop code + +2013-04-29 Nick Dedekind + + Keep resultview focus static + +2013-05-03 Andrea Azzarone + + Fix "There is no content..." message. Fixes: https://bugs.launchpad.net/bugs/1170728. + + Approved by Michal Hruby, PS Jenkins bot. + +2013-05-02 Andrea Azzarone + + Fix no result label in scope view. + +2013-05-02 Andrea Azzarone + + [FilterExpanderLabel] Pass mouse wheel event to the parent view. + + Approved by Michal Hruby, PS Jenkins bot. + +2013-05-02 Andrea Azzarone + + [FilterExpanderLabel] Pass mouse wheel event to filter view. + +2013-05-01 Nick Dedekind + + Check for file uri for nautilus app icon drop target. Fixes: https://bugs.launchpad.net/bugs/1170721. + + Approved by Andrea Azzarone, PS Jenkins bot. + +2013-04-30 Nick Dedekind + + Check for file uri for nautilus app icon drop target. + +2013-05-01 Nick Dedekind + + Fixed typo which set categories instead of filters when filter model changed. + + Approved by Michal Hruby, PS Jenkins bot. + +2013-04-30 Nick Dedekind + + Fixed filter update + +2013-05-01 Nick Dedekind + + Set spinner to searching when we search for the first time on a scope load. (forced search). + + Approved by Michal Hruby, PS Jenkins bot. + +2013-04-30 Nick Dedekind + + Fixed search spin on initial scope load. + +2013-04-30 Andrea Azzarone + + Remove HomeLens*, FilesystemLenses, Lens, Lenses code/test. + + Approved by Nick Dedekind, Michal Hruby, PS Jenkins bot. + +2013-04-25 Andrea Azzarone + + Remove FilesystemLenses, Lens, Lenses code/test. + +2013-04-25 Andrea Azzarone + + Remove HomeLens* code/tests. + +2013-04-26 Michal Hruby + + Use the Customization type in apps lens for AP filter test. + + Approved by Marco Trevisan (Treviño), PS Jenkins bot. + +2013-04-26 Michal Hruby + + Test filters using the Customization type in apps lens + +2013-04-26 Andrea Azzarone + + Disable detail view for webapp icons. Fixes: https://bugs.launchpad.net/bugs/1169340. + + Approved by PS Jenkins bot, Marco Trevisan (Treviño). + +2013-04-25 Michal Hruby + + Bump libunity requirement in control file. + + Approved by PS Jenkins bot, Pawel Stolowski. + +2013-04-25 Michal Hruby + + Bump debian control file + +2013-04-24 Michal Hruby + + Fix a few AP tests. + + Approved by Christopher Townsend, PS Jenkins bot. + +2013-04-24 Michal Hruby + + Fix command lens test + +2013-04-24 Michal Hruby + + Fix invalid reference in AP tests + +2013-04-24 Andrea Azzarone + + Remove ResultView::ComputeContentSize. + + Approved by PS Jenkins bot, Marco Trevisan (Treviño). + +2013-04-24 Andrea Azzarone + + Remove ResultView::ComputeContentSize. + +2013-04-23 Andrea Azzarone + + Allow disabling PreviewRatingsWidget for ApplicationPreviews. Fixes: https://bugs.launchpad.net/bugs/1170715. + + Approved by Michal Hruby, PS Jenkins bot. + +2013-04-23 Andrea Azzarone + + Allow to disable PreviewRatingsWidget. + +2013-04-23 Automatic PS uploader + + Releasing 7.0.0daily13.04.23ubuntu.unity.experimental.certified-0ubuntu1 to ubuntu. + + Approved by PS Jenkins bot. + +2013-04-23 Automatic PS uploader + + Releasing 7.0.0daily13.04.23ubuntu.unity.experimental.certified-0ubuntu1, based on r3121 + +2013-04-22 Andrea Azzarone + + Don't QueueDraw inside Draw callback - can cause rendering loops. + + Approved by PS Jenkins bot, Michal Hruby. + +2013-04-22 Andrea Azzarone + + Don't call QueueDraw inside DashContent. + +2013-04-22 Andrea Azzarone + + Don't close the dash if the mouse is over the vertical line between the dash and the launcher. Fixes: https://bugs.launchpad.net/bugs/1170720. + + Approved by Brandon Schaefer, PS Jenkins bot. + +2013-04-19 Andrea Azzarone + + Don't close the dash if the mouse is over the vertical line between the dash and the launcher (bug 1170720) + +2013-04-18 Nick Dedekind + + Fix redraw issues with the filter pane. Fixes: https://bugs.launchpad.net/bugs/1159814. + + Approved by Michal Hruby, PS Jenkins bot. + +2013-04-18 Nick Dedekind + + QueueRelayout when adding/removing genre filter buttons. + +2013-04-18 Michal Hruby + + Fix FTBFS on i386. + + Approved by Nick Dedekind, PS Jenkins bot. + +2013-04-18 Michal Hruby + + Cast Time to uint32_t + +2013-04-17 Marco Trevisan (Treviño) + + merge with trunk 3307. + + Approved by Michal Hruby, PS Jenkins bot. + +2013-04-17 Nick Dedekind + + Merged with trunk. + +2013-04-15 Michal Hruby + + Fix signature of overridden method. Fixes: https://bugs.launchpad.net/bugs/1158840. + + Approved by PS Jenkins bot, Nick Dedekind. + +2013-04-15 Michal Hruby + + Override correct method + +2013-04-12 Michal Hruby + + Don't try to close a channel over DBus when the proxy is not active. + + Approved by PS Jenkins bot, Nick Dedekind. + +2013-04-12 Michal Hruby + + Call CloseChannel only when one is actually opened, otherwise we're forcing the scopes to start up + +2013-04-10 Automatic PS uploader + + Releasing 7.0.0daily13.04.10ubuntu.unity.experimental.certified-0ubuntu1 to ubuntu. + + Approved by PS Jenkins bot. + +2013-04-10 Automatic PS uploader + + Releasing 7.0.0daily13.04.10ubuntu.unity.experimental.certified-0ubuntu1, based on r3113 + +2013-04-08 Automatic PS uploader + + merged with trunk. + + Approved by PS Jenkins bot, Didier Roche. + +2013-04-08 Nick Dedekind + + fixed gvariant test. fixed pch'less build. + +2013-04-08 Nick Dedekind + + merge with trunk. + +2013-03-27 Brandon Schaefer + + Dont clear the group->GetGeometry() as this should be done in the ScrollView if needed. Cause we are ending up clearing the wrong group when scrolled down at all in the ScrollView. Fixes: https://bugs.launchpad.net/bugs/1160537. + + Approved by PS Jenkins bot, Nick Dedekind. + +2013-03-27 Brandon Schaefer + + * Add {} to nested if statement + +2013-03-27 Brandon Schaefer + + * Clearing group->GetGeometry() causes clearing of other groups, depending on + where the scroll view is. + +2013-03-27 Nick Dedekind + + Added support for activation-uri hint. + + Approved by PS Jenkins bot, Michal Hruby. + +2013-03-27 Nick Dedekind + + Added log message + +2013-03-27 Nick Dedekind + + Added unit test for activation-uri preview action + +2013-03-27 Nick Dedekind + + merge with parent + +2013-03-27 Nick Dedekind + + support preview action activation-uri hint + +2013-03-27 Nick Dedekind + + Relayout scope view when categories change. Fix redraw issues. + + Approved by PS Jenkins bot, Michal Hruby. + +2013-03-27 Nick Dedekind + + Relayotu view when categories change + +2013-03-27 Nick Dedekind + + More autopilot test fixes. (sourced by build 20) + http://10.97.0.1:8080/job/ps-unity-100scopes-experimental-autopilot-release-testing/20/testReport/. + + Approved by Łukasz Zemczak, PS Jenkins bot. + +2013-03-27 Nick Dedekind + + Autopilot fixes. build 20 + +2013-03-27 Nick Dedekind + + Fixed crash when not receiving a valid reply for an activation request. Fixes: https://bugs.launchpad.net/bugs/1157351, https://bugs.launchpad.net/bugs/1159200. + + Approved by PS Jenkins bot, Michal Hruby. + +2013-03-27 Nick Dedekind + + Error case more readable. + +2013-03-26 Nick Dedekind + + Fixed uninitialised mem on activate timeout + +2013-03-27 Nick Dedekind + + Fixed result view loading all result icons. Fixes: https://bugs.launchpad.net/bugs/1160541. + + Approved by Michal Hruby, PS Jenkins bot. + +2013-03-27 Nick Dedekind + + removed printf + +2013-03-27 Nick Dedekind + + Better idle handling of lazy load result icons + +2013-03-27 Nick Dedekind + + Better lazy loading restrictions + +2013-03-27 Nick Dedekind + + Fixed lazy icon loading + +2013-03-26 Brandon Schaefer + + Make test_panel.py use the OverlayWindowButtons when dealing with the dash window buttons. Fixes: test_window_buttons_maximization_buttons_works_for_dash, also splits that test into these: test_window_buttons_maximize_or_restore_dash, test_window_buttons_active_inactive_states, test_window_buttons_state_switch_on_click. + + Approved by Łukasz Zemczak, PS Jenkins bot. + +2013-03-25 Brandon Schaefer + + * Fixes this AP test: + unity.tests.test_panel.PanelWindowButtonsTests.test_window_buttons_maximization_buttons_works_for_dash + + * Split the test up into 3 different AP tests. + * The real issue was the new OverlayWindowButtons were used instead of the panel + ones, so during the tests both were not visible causing a failure. + +2013-03-26 Nick Dedekind + + Autopilot fixes for ppa build 18. + + unity.tests.test_command_lens.CommandScopeSearchTests.test_result_category_actually_contains_results + unity.tests.test_dash.DashKeyNavTests.test_focus_returns_to_searchbar + unity.tests.test_dash.DashKeyNavTests.test_scopebar_enter_activation + possibly: + unity.tests.test_hud.HudBehaviorTests.test_hud_to_dash_has_key_focus. + + Approved by PS Jenkins bot, Łukasz Zemczak. + +2013-03-26 Nick Dedekind + + ensure ap result settle always gets one cycle + +2013-03-26 Nick Dedekind + + Fixed autopilot test regressions. + +2013-03-26 Nick Dedekind + + Fixed dash focus regression on scope bar activate + +2013-03-26 Didier Roche + + Merged with trunk r3252. + + Approved by Didier Roche, PS Jenkins bot. + +2013-03-25 Nick Dedekind + + Merge with trunk + +2013-03-25 Łukasz 'sil2100' Zemczak + + Change the music scope shopping result to 'Albums' in autopilot. + Workaround the slow scope results by increasing the timeout to 25 second. If it fails after this period, we're sure that there's something broken, since it's a BIG regression to even wait so long. + + Approved by PS Jenkins bot, Brandon Schaefer. + +2013-03-25 Łukasz 'sil2100' Zemczak + + A quick workaround for failing shopping tests - make the timeout longer, since scopes are REALLY LAZY with showing shopping results. + +2013-03-22 Łukasz 'sil2100' Zemczak + + With the new scope interface, the music shopping results are displayed in the "Albums" category. + +2013-03-25 Nick Dedekind + + Fixes for dash related autopilot failures. + + Approved by PS Jenkins bot, Brandon Schaefer. + +2013-03-25 Nick Dedekind + + Autopilot tests wait for categories/results before assuming there are any + +2013-03-25 Nick Dedekind + + Now matches unity trunk dash focus mechanism. Fixes: https://bugs.launchpad.net/bugs/1157236, https://bugs.launchpad.net/bugs/1157650, https://bugs.launchpad.net/bugs/1158967. + + Approved by PS Jenkins bot, Brandon Schaefer. + +2013-03-25 Nick Dedekind + + Dash focus matching unity trunk. + +2013-03-25 Brandon Schaefer + + Use the scope data to generate the dash quicklist. There is a name change from "Dash Home" to "Home Scope". Fixes: https://bugs.launchpad.net/bugs/1158917. + + Approved by Łukasz Zemczak, PS Jenkins bot. + +2013-03-22 Brandon Schaefer + + * The Dash Home is now part of the scopes data, which is now called Home Scope + +2013-03-25 Didier Roche + + Fix tests failing due to latest glib. Fixes: https://bugs.launchpad.net/bugs/1159677. + + Approved by Nick Dedekind, PS Jenkins bot. + +2013-03-25 Didier Roche + + Fix unit tests regressions with latest glib (LP: #1159677) + +2013-03-22 Nick Dedekind + + Fixed issue causing scope not to attempt reconnect if initial attempt to create proxy failed. + Fixed up search workflow so that we wont initiate multiple searches when opening dash/switching scopes. + + Approved by PS Jenkins bot, Michal Hruby. + +2013-03-22 Nick Dedekind + + Removed SetSearchStarted. was only causing search spinner to be delayed. + +2013-03-22 Nick Dedekind + + Fixed search cancellation. Removed multi-search from search clear + +2013-03-22 Nick Dedekind + + only activate result if the search completed successfully. + +2013-03-22 Nick Dedekind + + removed some debug code + +2013-03-22 Nick Dedekind + + resorted dash code + +2013-03-22 Nick Dedekind + + re-search on reconnection after a failed search. + +2013-03-22 Nick Dedekind + + Log create proxy error + +2013-03-22 Nick Dedekind + + Fixed scope proxy recreation after pervious failure. Mulit-search fixes + +2013-03-22 Nick Dedekind + + Check null pointer string + +2013-03-22 Nick Dedekind + + Uses serialised track model from music preview. + + Approved by PS Jenkins bot, Michal Hruby. + +2013-03-22 Nick Dedekind + + Updated music preview for serialised track model. + +2013-03-22 Nick Dedekind + + Fixed inconsistent previous lens/scope keybinding behavior for non-visible scopes (command.scope) LP#1158236. Fixes: https://bugs.launchpad.net/bugs/1158236. + + Approved by PS Jenkins bot, Brandon Schaefer. + +2013-03-22 Nick Dedekind + + Fix non-visible scope bar icon tabbing + +2013-03-22 Łukasz 'sil2100' Zemczak + + Fix a general typo that caused failures in AP tests DashKeyNavTests suite. We need to pass the variables as references if we want to modify them - thus returning the correct column and row size in GetResultDimensions. + + Approved by PS Jenkins bot, Nick Dedekind. + +2013-03-22 Łukasz 'sil2100' Zemczak + + Fix a general typo that caused failures in AP tests DashKeyNavTests suite. We need to pass the variables as references if we want to modify them - thus returning the correct column and row size. + +2013-03-22 Brandon Schaefer + + The FilterResults was using the PlacesVScrollbar which doesn't have the Overlayscroll bar. So just change it to use PlacesOverlayVScrollbar. Fixes: https://bugs.launchpad.net/bugs/1158913. + + Approved by PS Jenkins bot, Nick Dedekind. + +2013-03-22 Brandon Schaefer + + * Use the PlacesOverlayVScrollbar vs the normal one. + +2013-03-22 Nick Dedekind + + Fixed external activation of lazy created scopes. Fixes: https://bugs.launchpad.net/bugs/1158231. + + Approved by Brandon Schaefer, PS Jenkins bot. + +2013-03-22 Nick Dedekind + + Fixed alt+f2 activation + +2013-03-22 Nick Dedekind + + use_pch=OFF build not working. + include missing from file. + + Approved by PS Jenkins bot, Łukasz Zemczak. + +2013-03-22 Nick Dedekind + + Fixed include. pch'less build not working + +2013-03-22 Manuel de la Pena + + Adds implementations for the payment previews that are required for the new payment in the music scopes. Fixes: https://bugs.launchpad.net/bugs/1154176. + + Approved by Didier Roche, PS Jenkins bot, Nick Dedekind. + +2013-03-21 Manuel de la Pena + + Added error previews. + +2013-03-21 Manuel de la Pena + + Made changes according to review. + +2013-03-21 Manuel de la Pena + + Merged generic-payment-preview into error-preview. + +2013-03-21 Manuel de la Pena + + Merged generic-payment-preview into error-preview. + +2013-03-21 Manuel de la Pena + + Merged generic-payment-preview into error-preview. + +2013-03-20 Manuel de la Pena + + Merged generic-payment-preview into error-preview. + +2013-03-19 Manuel de la Pena + + Merged generic-payment-preview into error-preview. + +2013-03-12 Manuel de la Pena + + Merged with generic preview. + +2013-02-06 Manuel de la Pena + + Merged generic-payment-preview into error-preview. + +2013-02-05 Manuel de la Pena + + Merged generic-payment-preview into error-preview. + +2013-01-30 Manuel de la Pena + + Merged generic-payment-preview into error-preview. + +2013-01-30 Manuel de la Pena + + Merged with diegos error preview implementation. + +2012-12-07 Diego Sarmentero + + adding error preview test + +2012-12-03 Diego Sarmentero + + merge + +2012-11-30 Diego Sarmentero + + merge + +2012-11-30 Diego Sarmentero + + fixing error preview + +2012-11-28 Diego Sarmentero + + fixing unity-code for error preview + +2012-11-27 Diego Sarmentero + + error fixed + +2012-11-27 Diego Sarmentero + + merge + +2012-11-27 Diego Sarmentero + + merge + +2012-11-27 Diego Sarmentero + + adding error files + +2012-11-23 Diego Sarmentero + + Adding ErrorPreview + +2013-03-21 Manuel de la Pena + + Do check for null but just when really needed. + +2013-03-21 Manuel de la Pena + + Do not check for null. + +2013-03-21 Manuel de la Pena + + Get out of the loop as soon as get the error message. + +2013-03-21 Manuel de la Pena + + Merged with parent branch. + +2013-03-20 Manuel de la Pena + + Fix code according to review. + +2013-03-20 Manuel de la Pena + + Fixed small compilation errors. + +2013-03-19 Manuel de la Pena + + Merged with trunk. + +2013-03-19 Manuel de la Pena + + Fixed code according to reviews. + +2013-03-19 Manuel de la Pena + + Merged with lp:~unity-team/unity/libunity-7.0-breakage + +2013-03-12 Manuel de la Pena + + Small code improvements. + +2013-03-12 Manuel de la Pena + + Fixed error message logical error after using empty. + +2013-03-12 Manuel de la Pena + + Improve the GetErrorMessage method. + +2013-03-12 Manuel de la Pena + + Do not use c_str. + +2013-03-12 Manuel de la Pena + + Improve code by removing mem leak and using std::make_pair. + +2013-03-12 Manuel de la Pena + + Moved from using define to static std::string. + +2013-03-12 Manuel de la Pena + + Removed not needed code. + +2013-03-12 Manuel de la Pena + + Use share pointers. + +2013-03-12 Manuel de la Pena + + Removed not needed destructor. + +2013-03-12 Manuel de la Pena + + Merged with trunk. + +2013-03-11 Manuel de la Pena + + Merged with trunk. + +2013-02-28 Manuel de la Pena + + Merged with trunk. + +2013-02-27 Manuel de la Pena + + Merged with trnk. + +2013-02-27 Manuel de la Pena + + Merged with trunk. + +2013-02-06 Manuel de la Pena + + Merged with trunk. + +2013-02-05 Manuel de la Pena + + Merged with trunk. + +2013-01-30 Manuel de la Pena + + Merged with trunk. + +2013-01-30 Manuel de la Pena + + Removed not needed header. + +2013-01-29 Manuel de la Pena + + Merged with trunk. + +2013-01-29 Manuel de la Pena + + Fixed tests of the MusicPaymentPreview. + +2013-01-28 Manuel de la Pena + + Added generic PaymentPreview tests. + +2013-01-28 Manuel de la Pena + + Improve mem management. + +2013-01-28 Manuel de la Pena + + Improve mem management. + +2013-01-28 Manuel de la Pena + + Merged with trunk. + +2013-01-22 Manuel de la Pena + + Linked fixed bug. + +2013-01-22 Manuel de la Pena + + Merged with the code that ensures action link shows selectiong. + +2013-01-22 Manuel de la Pena + + Fixed problem when merging with the tab order branch. + +2013-01-22 Manuel de la Pena + + Merged with last version of the tab iterator. + +2013-01-22 Manuel de la Pena + + Merged with unity trunk. + +2013-01-22 Manuel de la Pena + + Revert to old stacked implementation. + +2013-01-15 Manuel de la Pena + + Use the correct push draw version. + +2013-01-15 Manuel de la Pena + + Use the correct push draw version. + +2013-01-15 Manuel de la Pena + + Try to blend layouts. + +2013-01-14 Manuel de la Pena + + Added spinner for when the purchase action is being performed. + +2013-01-14 Manuel de la Pena + + Add support to show the user that he had a password error. + +2013-01-11 Manuel de la Pena + + Add support for an overlay. + +2013-01-10 Manuel de la Pena + + Remove the left prints. + +2013-01-09 Manuel de la Pena + + Merged with parent that fixes tab ordering. + +2013-01-09 Manuel de la Pena + + Merged with branch that allows to add the tan order in a more decent way. + +2013-01-09 Manuel de la Pena + + Fixed buttons that were not getting the mouse events. Added workaround for the tab ordering. + +2013-01-08 Manuel de la Pena + + Removed not needed changes. Added debugging. + +2013-01-08 Manuel de la Pena + + Merged with branch that provides quick fix. + +2013-01-08 Manuel de la Pena + + Provide a simple method to add input to the tab iterator. + +2013-01-08 Manuel de la Pena + + Add to the iterator the diff actions. + +2013-01-08 Manuel de la Pena + + Merged with trunk. + +2013-01-03 Manuel de la Pena + + Fix compilation error after unity updates. + +2013-01-03 Manuel de la Pena + + Merged with trunk. + +2012-12-14 Manuel de la Pena + + Merged with trunk. + +2012-12-14 Manuel de la Pena + + Use a simpler method to add the text. + +2012-12-11 Manuel de la Pena + + Remove printfs + +2012-12-11 Manuel de la Pena + + Merged with static cairo text fix. + +2012-12-11 Manuel de la Pena + + Tried to find the preview bug. + +2012-12-11 Manuel de la Pena + + Merged with the static cairo text fix. + +2012-12-11 Manuel de la Pena + + Updated preview to use the new libunity. + +2012-12-11 Manuel de la Pena + + Merged with trunk. + +2012-12-11 Manuel de la Pena + + Just have a single model for payment previews. + +2012-12-10 Manuel de la Pena + + Started adding the tests for the preview. + +2012-12-05 Manuel de la Pena + + Fixed code after merge. + +2012-12-05 Manuel de la Pena + + Merged with trunk. + +2012-11-29 Manuel de la Pena + + Merged with trunk. + +2012-11-29 Manuel de la Pena + + Use the new libunity. + +2012-11-28 Manuel de la Pena + + Removed redundant method. + +2012-11-28 Manuel de la Pena + + Updated standalone payment_previews app to work with the new libunity. + +2012-11-28 Manuel de la Pena + + Removed the title and info hint hacks \o/ + +2012-11-28 Manuel de la Pena + + Merged with trunk. + +2012-11-26 Manuel de la Pena + + Enure that the private implementation is init. + +2012-11-26 Manuel de la Pena + + Use the new libunity protocol to create the MusicPaymentPreview model. + +2012-11-26 Manuel de la Pena + + Fixed some small layout issues. + +2012-11-26 Manuel de la Pena + + Merged with trunk. + +2012-11-22 Diego Sarmentero + + Refactoring of MusicPaymentPreview, creating a generic PaymentPreview and a MusicPaymentPreview which inherit from PaymentPreview + +2012-11-21 Diego Sarmentero + + refactoring + +2012-11-21 Manuel de la Pena + + Merged get-u1-name into add-payment-base-class. + +2012-11-21 Manuel de la Pena + + Merged add-payment-preview into get-u1-name. + +2012-11-21 Manuel de la Pena + + Fixed conflicts. + +2012-11-21 Manuel de la Pena + + Merged add-entry-tests into add-action-link. + +2012-11-21 Manuel de la Pena + + Added test constructor. + +2012-11-21 Manuel de la Pena + + Move headers to .h so that tests compile. + +2012-11-21 Manuel de la Pena + + Fixed compilation issues in tests. + +2012-11-20 Manuel de la Pena + + Added skelleton for base class. + +2012-11-20 Manuel de la Pena + + Renamed U1PaymentPReview to the more generic name MusicPaymentPreview. + +2012-11-20 Manuel de la Pena + + Merged add-action-link into add-payment-preview. + +2012-11-20 Manuel de la Pena + + Merged add-entry-tests into add-action-link. + +2012-11-20 Manuel de la Pena + + Fixed merged issues with trunk. + +2012-11-20 Manuel de la Pena + + Merged with trunk. + +2012-10-22 Manuel de la Pena + + Merged add-action-link into add-payment-preview. + +2012-10-22 Manuel de la Pena + + Merged add-entry-tests into add-action-link. + +2012-10-22 Manuel de la Pena + + Merged add-text-entry into add-entry-tests. + +2012-10-22 Manuel de la Pena + + Remerged with trunk. + +2012-10-18 Manuel de la Pena + + Added initial test impl. + +2012-10-18 Manuel de la Pena + + Merged add-action-link into add-payment-preview. + +2012-10-18 Manuel de la Pena + + Merged add-entry-tests into add-action-link. + +2012-10-18 Manuel de la Pena + + Merged add-text-entry into add-entry-tests. + +2012-10-18 Manuel de la Pena + + Merged with trunk. + +2012-10-18 Manuel de la Pena + + Added intial code for tests. + +2012-10-18 Manuel de la Pena + + Merged add-action-link into add-payment-preview. + +2012-10-18 Manuel de la Pena + + Merged add-entry-tests into add-action-link. + +2012-10-18 Manuel de la Pena + + Merged add-text-entry into add-entry-tests. + +2012-10-18 Manuel de la Pena + + Merged with trunk. + +2012-10-18 Manuel de la Pena + + Merged add-action-link into add-payment-preview. + +2012-10-18 Manuel de la Pena + + Added SetTextAlpha method to allow to set the alpha of the text color. + +2012-10-18 Manuel de la Pena + + Merged add-action-link into add-payment-preview. + +2012-10-18 Manuel de la Pena + + Merged add-entry-tests into add-action-link. + +2012-10-18 Manuel de la Pena + + Removed not used class. + +2012-10-18 Manuel de la Pena + + Merged add-action-link into add-payment-preview. + +2012-10-18 Manuel de la Pena + + Removed the use of the horizontal line and use pango instead. + +2012-10-17 Manuel de la Pena + + Merged add-action-link into add-payment-preview. + +2012-10-17 Manuel de la Pena + + Removed not used param. + +2012-10-17 Manuel de la Pena + + Merged add-action-link into add-payment-preview. + +2012-10-17 Manuel de la Pena + + Merged add-action-link into add-payment-preview. + +2012-10-17 Manuel de la Pena + + Merged add-action-link into add-payment-preview. + +2012-10-17 Manuel de la Pena + + Merged add-action-link into add-payment-preview. + +2012-10-17 Manuel de la Pena + + Merged add-action-link into add-payment-preview. + +2012-10-17 Manuel de la Pena + + Added the standalone app for the payments. + +2012-10-17 Manuel de la Pena + + Merged add-action-link into add-payment-preview. + +2012-10-17 Manuel de la Pena + + Merged add-action-link into add-payment-preview. + +2012-10-17 Manuel de la Pena + + Merged add-action-link into add-payment-preview. + +2012-10-17 Manuel de la Pena + + Merged add-action-link into add-payment-preview. + +2012-10-15 Manuel de la Pena + + Merged add-action-link into add-payment-preview. + +2012-10-11 Manuel de la Pena + + Ensure that we exit the method at the correct point. + +2012-10-11 Manuel de la Pena + + Set the results to be 0 so that we do not show any of the buttons from the preview container. + +2012-10-11 Manuel de la Pena + + Merged add-action-link into add-payment-preview. + +2012-10-10 Manuel de la Pena + + Merged add-action-link into add-payment-preview. + +2012-10-09 Manuel de la Pena + + Merged add-action-link into add-payment-preview. + +2012-10-09 Manuel de la Pena + + Merged add-action-link into add-payment-preview. + +2012-10-09 Manuel de la Pena + + Merged add-action-link into add-payment-preview. + +2012-10-08 Manuel de la Pena + + Merged add-action-link into add-payment-preview. + +2012-10-08 Manuel de la Pena + + Merged add-action-link into add-payment-preview. + +2012-10-04 Manuel de la Pena + + Added a payment preview for the u1 music store. + +2013-03-21 Nick Dedekind + + Fixed connection log message. + + Approved by PS Jenkins bot, Michal Hruby. + +2013-03-21 Nick Dedekind + + Fixed inverted connect/disconnect log message + +2013-03-21 Nick Dedekind + + Added/Updated unit tests for new libunity scope API. + + Approved by PS Jenkins bot, Łukasz Zemczak. + +2013-03-21 Nick Dedekind + + Removed bad tests. Unset instead of reset GSETTINGS env vars. + +2013-03-21 Nick Dedekind + + merged with parent + +2013-03-20 Nick Dedekind + + fixed some AP issues + +2013-03-18 Nick Dedekind + + Merge with parent + +2013-03-15 Nick Dedekind + + merge with parent + +2013-03-15 Nick Dedekind + + Updated tets for search callback change. + +2013-03-14 Nick Dedekind + + merge with parent + +2013-03-14 Nick Dedekind + + Merged with parent + +2013-03-14 Nick Dedekind + + Merged with parent + +2013-03-13 Nick Dedekind + + Fixed dbus service tests + +2013-03-13 Nick Dedekind + + merged with parent + +2013-03-13 Nick Dedekind + + Use fake categories for scope view test + +2013-03-13 Nick Dedekind + + merge with parent + +2013-03-07 Nick Dedekind + + merged with parent + +2013-03-07 Nick Dedekind + + Added ability to specify scope id to test with. + +2013-03-07 Nick Dedekind + + removed Required metadata values + +2013-03-01 Nick Dedekind + + added coverage html generation make target + +2013-02-28 Nick Dedekind + + Fixed some search issues in test scope impl. + +2013-02-28 Nick Dedekind + + Merge with parent + +2013-02-28 Nick Dedekind + + Better preview player tests + +2013-02-28 Nick Dedekind + + merge with trunk + +2013-02-28 Nick Dedekind + + Added track tests. + +2013-02-28 Nick Dedekind + + merge with parent + +2013-02-27 Nick Dedekind + + fixed dbus interface + +2013-02-27 Nick Dedekind + + merge with parent + +2013-02-27 Nick Dedekind + + Fixed scope service previewer. Added preview player tests + +2013-02-27 Nick Dedekind + + added test for preview actions. + +2013-02-27 Nick Dedekind + + merge with parent + +2013-02-26 Nick Dedekind + + music preview play/pause test + +2013-02-22 Nick Dedekind + + merge with parent + +2013-02-22 Nick Dedekind + + merge with parent + +2013-02-21 Nick Dedekind + + merge with parent + +2013-02-21 Nick Dedekind + + Re-initialised test branch. + +2013-02-21 Nick Dedekind + + merge with trunk + +2013-03-20 Nick Dedekind + + Reasoning: + Because the scopes are created synchronously in construction, the dash is not et parented, so the nux focus tree does not go down all parent levels when focus is set. + + Change: + When the dash is parented, re-initialise the current focus area's focus tree. Fixes: https://bugs.launchpad.net/bugs/1157236, https://bugs.launchpad.net/bugs/1157650. + + Approved by Michal Hruby, PS Jenkins bot. + +2013-03-20 Nick Dedekind + + Fixed focus on first display + +2013-03-20 Brandon Schaefer + + Merge with trunk. + + Approved by PS Jenkins bot, Didier Roche. + +2013-03-20 Nick Dedekind + + Merged with trunk + +2013-03-20 Nick Dedekind + + Added photo scope default & re-ordered scopes. + Do not expand last category when entering search. + + Approved by PS Jenkins bot, Michal Hruby. + +2013-03-20 Nick Dedekind + + Do not expand last category when entering a search. + +2013-03-20 Nick Dedekind + + reordered defualt scopes + +2013-03-20 Nick Dedekind + + Added photo lens + +2013-03-20 Nick Dedekind + + Filter state updated with signal from scope. + Removed filter "all" button based on state of filter hint. + + Approved by PS Jenkins bot, Pawel Stolowski, Michal Hruby. + +2013-03-20 Nick Dedekind + + Fixed re-search on filter-settings-changed + +2013-03-20 Nick Dedekind + + Fixed State merge row handling + +2013-03-19 Nick Dedekind + + Filter bar all button removal + +2013-03-19 Nick Dedekind + + Advanced home scope filters + +2013-03-18 Andrea Azzarone + + merge with trunk. + + Approved by PS Jenkins bot, Nick Dedekind. + +2013-03-18 Nick Dedekind + + Merged with trunk + +2013-03-18 Nick Dedekind + + Fixed drawing of ghost icons. + Incorrect logic in checking array size. + + Approved by PS Jenkins bot, Michal Hruby. + +2013-03-18 Nick Dedekind + + Fixed array size check logic in GetResultViewForCategory. + +2013-03-18 Nick Dedekind + + Check for callback validity when scope proxy connection fails. + + Approved by Michal Hruby, PS Jenkins bot. + +2013-03-18 Nick Dedekind + + Check callback pointer after Search/Activate proxy wait failure. + +2013-03-15 Nick Dedekind + + In the music preview, reset the state of tracks which do not match the uri of signals emitted by the player. + + Approved by PS Jenkins bot, Michal Hruby. + +2013-03-15 Nick Dedekind + + When getting player update, reset the state of tracks which don't match uri. + +2013-03-15 Nick Dedekind + + Updated default scopes gsettings. + application.scope + files.scope + music.scope + video.scope + social.scope (not yet ported). + + Approved by PS Jenkins bot, Michal Hruby. + +2013-03-15 Nick Dedekind + + Updated default master scopes. + +2013-03-15 Nick Dedekind + + Fixed issue with search bar finishing spin with an old search result. + + Approved by PS Jenkins bot, Michal Hruby. + +2013-03-15 Nick Dedekind + + Fixed issue with search bar finishing spin with an old search result. + +2013-03-14 Nick Dedekind + + removed some debug logging + +2013-03-14 Nick Dedekind + + reverted mistaken commit + +2013-03-14 Nick Dedekind + + fixed bug in ordering + +2013-03-13 Nick Dedekind + + merged with parent + +2013-03-13 Didier Roche + + bump build-dep on libunity-dev + +2013-03-13 Nick Dedekind + + Removed SeriesPreview.h from cmake. + +2013-03-13 Nick Dedekind + + Added type constructor to categoris. + +2013-03-13 Nick Dedekind + + Fixed uin64 variant fetch. + +2013-03-12 Nick Dedekind + + fixed tests for changes in API + +2013-03-12 Nick Dedekind + + merged with trunk + +2013-03-11 Nick Dedekind + + Scope reorder. Needs tests. + +2013-03-07 Nick Dedekind + + Removed UpdatePreviewProperty + +2013-02-28 Nick Dedekind + + Fixed play/pause/resume. Added player logging. + +2013-02-28 Nick Dedekind + + Added track index + +2013-02-28 Nick Dedekind + + Added track model disconnectfor tracks UI + +2013-02-27 Nick Dedekind + + removed old preview code + +2013-02-27 Nick Dedekind + + Added preview player to music preview. + +2013-02-26 Nick Dedekind + + Scope Preview callback returns preview + +2013-02-25 Nick Dedekind + + removed printf + +2013-02-22 Nick Dedekind + + 64bit fix + +2013-02-22 Nick Dedekind + + Review fix. Vairant ref + +2013-02-22 Nick Dedekind + + Fixed LauncherEntryRemote method signatures + +2013-02-21 Nick Dedekind + + fixed code review comments + +2013-02-21 Nick Dedekind + + 64bit fixes for vairant builder. + +2013-02-21 Nick Dedekind + + 64bit fixes for vairant builder. + +2013-02-21 Nick Dedekind + + reverted as much testing changes as possible for new lens API. tests moved to new branch. + +2013-02-21 Nick Dedekind + + even more testing + +2013-02-19 Nick Dedekind + + autopilot changes + +2013-02-19 Nick Dedekind + + reverted autopilot changes to dash emulator + +2013-02-19 Nick Dedekind + + Merged with trunk. Reverted autopilot changes + +2013-02-18 Nick Dedekind + + More unit tests + +2013-02-18 Nick Dedekind + + Fixed async callback cancellation. More testing. + +2013-02-15 Nick Dedekind + + More unit tests + +2013-02-15 Nick Dedekind + + Fixes for unit tests + +2013-02-15 Nick Dedekind + + Upated translation includes + +2013-02-14 Nick Dedekind + + More improvements dash & scope testing + +2013-02-14 Nick Dedekind + + Improved dash testability. Fixed scope uri launch activation. + +2013-02-14 Nick Dedekind + + Fixed preview close crash + +2013-02-14 Nick Dedekind + + Fixed preview action not sending action id. Check string pointers in Result::FromVariant + +2013-02-13 Nick Dedekind + + Updated icon resource location. + +2013-02-13 Nick Dedekind + + Fixed waitfor error string + +2013-02-13 Nick Dedekind + + Fixed LocalResult::FromVariant + +2013-02-13 Nick Dedekind + + Better search workflow testing + +2013-02-12 Nick Dedekind + + Fixed another 64bit compile issue + +2013-02-12 Nick Dedekind + + Fixed 64 bit issue in test_scope_proxy + +2013-02-12 Nick Dedekind + + Fixed 64 bit issue in test_scope_proxy + +2013-02-12 Nick Dedekind + + More Lens->Scope renaming + +2013-02-12 Nick Dedekind + + Rename files Lens -> Scope + +2013-02-12 Nick Dedekind + + Fixed/Improved scope unit tests + +2013-02-12 Nick Dedekind + + Fixed writable view_type + +2013-02-08 Nick Dedekind + + New libunity scope API. + +2013-01-25 Nick Dedekind + + Fixed connected property validation. + +2013-01-24 Nick Dedekind + + Implemented re-opening of channel on reconnection. + +2013-01-23 Nick Dedekind + + renaming .lens files to .scope + +2013-01-23 Nick Dedekind + + removed visibility fetching from proxy + +2013-01-23 Nick Dedekind + + Added category order change connections. + +2013-01-23 Nick Dedekind + + Fixed filter variant serialization. + +2013-01-23 Nick Dedekind + + Merge with trunk. + +2013-01-23 Nick Dedekind + + Fixed connections in scope. + +2013-01-22 Nick Dedekind + + Review fixes. Scopes now initialized with ScopeData structure. + +2013-01-22 Nick Dedekind + + reverted changes to function declarations. + +2013-01-22 Nick Dedekind + + Removed StringRef. removed always-search + +2013-01-22 Nick Dedekind + + Added cancellable to scope calls + +2013-01-21 Nick Dedekind + + more 64bit fixes + +2013-01-21 Nick Dedekind + + Connected up client filter updates to scope backend. + +2013-01-21 Nick Dedekind + + Fixed 64bit size_t->unsigned int conversion. + +2013-01-21 Nick Dedekind + + Merged with trunk + +2013-01-21 Nick Dedekind + + removed filter_update for changes in libunity + +2013-01-21 Nick Dedekind + + Reverted more unnecessary changes. + +2013-01-21 Nick Dedekind + + Reverted ModelIterator to ResultIterator + +2013-01-21 Nick Dedekind + + more cleanup + +2013-01-18 Nick Dedekind + + 100 scopes work + +2013-05-15 Christopher Lee + + Missed a package depends for unity-autopilot. + + Approved by PS Jenkins bot. + +2013-05-14 Christopher Lee + + Added missing unity-autopilot depends. + +2013-05-15 Sam Spilsbury + + LauncherDragWindow: defer icon paint until DrawContent rather than doing + so immediately + + (LP: #1180174). Fixes: https://bugs.launchpad.net/bugs/1180174. + + Approved by Stephen M. Webb, MC Return, PS Jenkins bot. + +2013-05-15 Sam Spilsbury + + Fix style + +2013-05-15 Sam Spilsbury + + LauncherDragWindow: defer icon paint until DrawContent rather than doing + so immediately + + (LP: #1180174) + +2013-05-14 Ted Gould + + gtk_icon_info_free() is deprecated for g_object_unref(). + + Approved by PS Jenkins bot, Stephen M. Webb, MC Return. + +2013-05-14 Ted Gould + + Remove deprecated gtk_icon_info_free() + +2013-05-14 Christopher Lee + + Update unity autopilot tests depends. + + Approved by PS Jenkins bot, Didier Roche. + +2013-05-09 Christopher Lee + + Merge trunk + +2013-05-03 Christopher Lee + + Added missing Depends + +2013-05-09 Chris Townsend + + Fixes issue where minimizing a full screen window would not draw the Launcher and Panel after minimization. Fixes: https://bugs.launchpad.net/bugs/1064155. + + Approved by Brandon Schaefer, PS Jenkins bot, Sam Spilsbury. + +2013-05-08 Chris Townsend + + Re-work the fix for drawing the Launcher & Panel after minimizing a unredirected full screen window per Sam's comments. This way is much simpler and just takes into account if a window is minimized when adding it's geometry to the fullscreenRegion. + +2013-05-02 Chris Townsend + + Fixes issue where minimizing a full screen window would not draw the Launcher and Panel after minimization. + +2013-05-09 Christopher Lee + + Updating Unity autopilot tests to work with the new version of autopilot (1.3). + + Approved by PS Jenkins bot, Thomi Richards. + +2013-05-03 Christopher Lee + + Backed out ibus changes + +2013-05-02 Christopher Lee + + Remove WIP comments + +2013-05-02 Christopher Lee + + Fixed usage of Mouse().create() + +2013-05-02 Christopher Lee + + Move the ibus module in from Autopilot + +2013-05-02 Christopher Lee + + process_manager/display updates to launcher tests + +2013-05-01 Christopher Lee + + fix use of is_rect_on_screen + +2013-05-01 Christopher Lee + + Update the dbus backend updates + +2013-05-01 Christopher Lee + + Updated use of move_mouse_to_screen + +2013-04-30 Christopher Lee + + Fix start_app and app_is_running, process manager + +2013-04-30 Christopher Lee + + Fix set_unity_option error + +2013-04-30 Christopher Lee + + Fix missing call_gsettings_cmd and self.KNOWN_APPS + +2013-04-30 Christopher Lee + + Update usage of start_app/start_app_window + +2013-04-29 Christopher Lee + + WIP update for AP 1.3: Fix typo in emulator + +2013-04-29 Christopher Lee + + WIP updating tests for AP 1.3. Bamf -> Process and dragging windows + +2013-04-29 Christopher Lee + + WIP updating to work with ap 1.3. screen geo -> display + re-introducing removed Unity specific functionality etc. + +2013-04-29 Christopher Lee + + WIP Initial changes (before a mass rename) + +2013-05-08 Automatic PS uploader + + Releasing 7.0.0daily13.05.08ubuntu.unity.next-0ubuntu1 to ubuntu. + + Approved by PS Jenkins bot. + +2013-05-08 Automatic PS uploader + + Releasing 7.0.0daily13.05.08ubuntu.unity.next-0ubuntu1, based on r3317 + +2013-05-08 Christopher Lee + + Attempt to fix sporadic failure of TestGLibSource.Running for arm builds. + + Approved by Brandon Schaefer, PS Jenkins bot. + +2013-05-06 Christopher Lee + + Increased priority of timeout in test + +2013-05-02 Automatic PS uploader + + Releasing 7.0.0daily13.05.01.1ubuntu.unity.next-0ubuntu1 to ubuntu. + + Approved by PS Jenkins bot. + +2013-05-01 Automatic PS uploader + + Releasing 7.0.0daily13.05.01.1ubuntu.unity.next-0ubuntu1, based on r3315 + +2013-04-25 Andrea Azzarone + + Disable detail view for webapp icons. Fixes: https://bugs.launchpad.net/bugs/1169340. + + Approved by PS Jenkins bot, Marco Trevisan (Treviño). + +2013-04-18 Andrea Azzarone + + Remove double space. + +2013-04-17 Andrea Azzarone + + Disable detail view for webapp icons. + +2013-04-25 Łukasz 'sil2100' Zemczak + + Now that we're using the new HUD, there have been some changes that typically cause test_hud tests to fail. Fix the tests to fit the new model. + The first one is that generally we do not have indicator entries visible in the HUD anymore. Only application menu entries are in it now. + The second one - the way the results are displayed is different. Now, instead of "Menu > Entry" we have "Entry (Menu)" etc. + + Approved by PS Jenkins bot, Mathieu Trudel-Lapierre. + +2013-04-24 Łukasz 'sil2100' Zemczak + + Fix unicode strings. Add a check to another test, making sure that we click the right HUD button + +2013-04-24 Łukasz 'sil2100' Zemczak + + Add assertions making sure the tests make sense + +2013-04-24 Łukasz 'sil2100' Zemczak + + Now that we're using the new HUD, there have been some changes that typically cause test_hud tests to fail. Fix the tests to fit the new model. + The first one is that generally we do not have indicator entries visible in the HUD anymore. Only application menu entries are in it now. + The second one - the way the results are displayed is different. Now, instead of "Menu > Entry" we have "Entry (Menu)" etc. + +2013-04-24 Marco Trevisan (Treviño) + + UnityWindow: don't draw the panel shadow above a fullscreen window. Fixes: https://bugs.launchpad.net/bugs/1171934. + + Approved by PS Jenkins bot, Andrea Azzarone. + +2013-04-23 Marco Trevisan (Treviño) + + UnityWindow: don't draw the panel shadow above a fullscreen window. + +2013-04-23 Marco Trevisan (Treviño) + + IconRenderer: preprocess an icon if its emblem has been shown/hidden + + In that way we can update its transformation. Fixes: https://bugs.launchpad.net/bugs/1171476, https://bugs.launchpad.net/bugs/1171663. + + Approved by PS Jenkins bot, Brandon Schaefer. + +2013-04-23 Marco Trevisan (Treviño) + + IconRenderer: preprocess an icon if its emblem has been shown/hidden + + In that way we can update its transformation. + +2013-04-23 Marco Trevisan (Treviño) + + IconTextureSource: add parameter to remember last emblem validity + +2013-04-23 Sebastien Bacher + + Use '%s:' string for preview hints, rather than just appending ':'. Fixes: https://bugs.launchpad.net/bugs/1074038. + + Approved by Marco Trevisan (Treviño), PS Jenkins bot. + +2013-04-23 Sebastien Bacher + + Use '%s:' string for preview hints, rather than just appending ':' + +2013-04-18 Automatic PS uploader + + Releasing 7.0.0daily13.04.18~13.04-0ubuntu1 to ubuntu. + + Approved by PS Jenkins bot. + +2013-04-18 Automatic PS uploader + + Releasing 7.0.0daily13.04.18~13.04-0ubuntu1, based on r3309 + +2013-04-18 Automatic PS uploader + + Releasing 7.0.0daily13.04.17~13.04-0ubuntu1 to ubuntu. + + Approved by PS Jenkins bot. + +2013-04-17 Automatic PS uploader + + Releasing 7.0.0daily13.04.17~13.04-0ubuntu1, based on r3305 + +2013-04-17 Manuel de la Pena + + Add code to ensure that a label is shown when u1 creds are not present. Fixes: https://bugs.launchpad.net/bugs/1168674. + + Approved by PS Jenkins bot, Marco Trevisan (Treviño), Nick Dedekind. + +2013-04-17 Manuel de la Pena + + Remove not needed methods. + +2013-04-17 Manuel de la Pena + + Merged with trunk. + +2013-04-17 Manuel de la Pena + + reverted error. + +2013-04-17 Manuel de la Pena + + Fixed mem leak. + +2013-04-15 Manuel de la Pena + + const for mem safety. + +2013-04-11 Manuel de la Pena + + Show tag when there are no creds. + +2013-04-17 Łukasz 'sil2100' Zemczak + + Disable screen locking during autopilot test runs. + + Approved by Christopher Lee, Didier Roche, PS Jenkins bot. + +2013-04-16 Łukasz 'sil2100' Zemczak + + Where did I have my head? As mentioned by Michael, we should remember the previous value of the lock gsettings variable and restore it in the end + +2013-04-15 Łukasz 'sil2100' Zemczak + + Disable screen locking during the autopilot test runs + +2013-04-17 Łukasz 'sil2100' Zemczak + + During the test_window_buttons_show_when_holding_show_menu_key, wait for a menu settle period before continuing. The reason for this is that when by any chance the gedit application is already maximized on start, there is a timing condition that causes things to happen 'too fast' - and in the end, instead of a Alt press we get an Alt tap. + + Approved by PS Jenkins bot, Francis Ginther. + +2013-04-16 Łukasz 'sil2100' Zemczak + + During the test_window_buttons_show_when_holding_show_menu_key, wait for a menu settle period before continuing. The reason for this is that when by any chance the gedit application is already maximized on start, there is a timing condition that causes things to happen 'too fast' - and in the end, instead of a Alt press we get an Alt tap. + +2013-04-17 Łukasz 'sil2100' Zemczak + + A leftover from the self.emulator -> self.unity.emulator migration. This was causing problems with HUD cleanups. + + Approved by PS Jenkins bot, Didier Roche. + +2013-04-16 Łukasz 'sil2100' Zemczak + + A leftover from the self.emulator -> self.unity.emulator migration. This was causing problems with HUD cleanups + +2013-04-16 Marco Trevisan (Treviño) + + + + BackgroundEffectHelper: use texture cache, unregister clients when unneeded + + And add HasDamageableHelpers() function that is used in UnityScreen not to + try to damage blur regions if we don't have any of them. + + Approved by PS Jenkins bot, Andrea Azzarone. + +2013-04-13 Marco Trevisan (Treviño) + + UnityScreen: don't try to damage the blur regions if we don't have any + +2013-04-13 Marco Trevisan (Treviño) + + BackgroundEffectHelper: use texture cache, unregister clients when unneeded + + And add HasDamageableHelpers() function + +2013-04-16 Marco Trevisan (Treviño) + + UnityWindow: paint the panel shadow over a window if it's under the panel. Fixes: https://bugs.launchpad.net/bugs/871758. + + Approved by PS Jenkins bot, Andrea Azzarone. + +2013-04-15 Marco Trevisan (Treviño) + + UnityWindow: factorize the logic for maximized and non-maximized windows + +2013-04-15 Marco Trevisan (Treviño) + + UnityWindow: paint the panel shadow over a window if it's under the panel. + +2013-04-16 Matthieu James + + The swirl's direction of rotation in the BFB icon has been changed from anti-clockwise to clockwise. Fixes: https://bugs.launchpad.net/bugs/1169238. + + Approved by PS Jenkins bot, Didier Roche. + +2013-04-16 Matthieu James + + Changed the swirl's direction of rotation in the BFB icon + +2013-04-15 Automatic PS uploader + + Releasing 7.0.0daily13.04.15-0ubuntu1 to ubuntu. + + Approved by PS Jenkins bot. + +2013-04-15 Automatic PS uploader + + Releasing 7.0.0daily13.04.15-0ubuntu1, based on r3300 + +2013-04-14 Marco Trevisan (Treviño) + + Unity: reduce a lot the cost of some many-often called functions, thanks to callgrind + + UnityScreen::nuxEpilogue: -38.3% + IconRenderer::RenderElement: -5.8% + Launcher::DrawContent: -58.6% + panel::Controller::GetTrayXids: -100% + UnityScreen::nuxDamageCompiz: -70% + IconRenderer::PreprocessIcons: -74.3% + UnityScreen::nuxPrologue: -36.9% + IconRenderer::UpdateIconTransform: -87.7% + UnityScreen::paintPanelShadow: -64.3% + dash::LensView::OnResultAdded: -84.6% + IconTexture::GetTransform: -89.4% + + See more at http://i.imgur.com/VHrthtt.png. Fixes: https://bugs.launchpad.net/bugs/1167605, https://bugs.launchpad.net/bugs/1167894, https://bugs.launchpad.net/bugs/1168556, https://bugs.launchpad.net/bugs/1168569. + + Approved by PS Jenkins bot, Andrea Azzarone, Brandon Schaefer. + +2013-04-13 Marco Trevisan (Treviño) + + AbstractIconRenderer: use a nux::Vector3 instead of a nux::Point3 for rotation + +2013-04-13 Marco Trevisan (Treviño) + + SwitcherView: use std::min instead of MIN + +2013-04-13 Marco Trevisan (Treviño) + + Merge with trunk + +2013-04-12 Marco Trevisan (Treviño) + + Merge with trunk + +2013-04-11 Marco Trevisan (Treviño) + + debian/control: updating builddep to force a rebuild with new nux + +2013-04-11 Marco Trevisan (Treviño) + + FileManager: add missing include + +2013-04-11 Marco Trevisan (Treviño) + + PanelTray: Return 0 as xid if the widget is not realized (it shouldn't ever happen) + +2013-04-11 Marco Trevisan (Treviño) + + PanelController: use const& to return Xids, removing copies reduces its cost a lot + + Since this function is called in compiz painting functions, it's better to keep it low. + +2013-04-11 Marco Trevisan (Treviño) + + LensView: reduce the map accesses, it moves the callgrind cost down to 0 + +2013-04-10 Marco Trevisan (Treviño) + + IconRenderer: Pre-propcess an icon if it changed its skipping state + +2013-04-10 Marco Trevisan (Treviño) + + IconTextureSource: add method to save if the icon was skipping + +2013-04-10 Marco Trevisan (Treviño) + + IconTextureSource: use vectors for transformations handling + + Use constructor to init values and sizes. + +2013-04-10 Marco Trevisan (Treviño) + + unityshell: remove the slow nuxPrologue/nuxEpilogue calls in paintPanelShadow + + They're often called, as this happens in glPaint. + +2013-04-10 Marco Trevisan (Treviño) + + IconRenderer: cache the shader locations to save computation + + This operation seems to be quite expensive in callgrind, doing so reduces the + RenderElement cost of about 30% + +2013-04-10 Marco Trevisan (Treviño) + + IconRenderer: don't preprocess an icon if nothing changed on its position + + If rotation or centers have not been changed since last computation, we can + avoid to do all this expensive matrix computation, that according to callgrind + it's taking much of unity code. + +2013-04-10 Marco Trevisan (Treviño) + + AbstractIconRenderer: move rotation float's to a single nux::Point3 + +2013-04-10 Marco Trevisan (Treviño) + + IconTextureSource: add a cache for Centers and Rotation + + So we can cache here the last values and perform pre-processing only if needed. + +2013-04-12 Andrea Azzarone + + Pass shared ptr by const reference. + + Approved by PS Jenkins bot, Brandon Schaefer. + +2013-04-12 Andrea Azzarone + + Minor change. + +2013-04-12 Andrea Azzarone + + Pass shared ptr by const reference. + +2013-04-12 Andrea Azzarone + + Don't force edge drawing in DashView. Fixes bug 1055126 here. Fixes: https://bugs.launchpad.net/bugs/1055126. + + Approved by PS Jenkins bot, Brandon Schaefer. + +2013-04-12 Andrea Azzarone + + Don't force edge drawing in DashView. Fixes bug 1055126 here. + +2013-04-11 Andrea Azzarone + + Show XdndCollectionWindow only during dnd operations. + + Approved by PS Jenkins bot, Marco Trevisan (Treviño). + +2013-04-11 Andrea Azzarone + + Show XdndCollectionWindow only during dnd operation. + +2013-04-11 Andrea Azzarone + + Reduce the scope of a variable and avoid the creation/destruction of a geometry on every frame. + + Approved by PS Jenkins bot, Marco Trevisan (Treviño). + +2013-04-11 Andrea Azzarone + + Remove dead code. + +2013-04-11 Andrea Azzarone + + Reduce the scope of a variable and avoid the creation/destruction of a geometry on every frame. + +2013-04-11 Brandon Schaefer + + Remove UBUS code that never gets called. It gets removed when the DashView is setup, which happens before this message can get sent. + + Approved by PS Jenkins bot, Andrea Azzarone. + +2013-04-10 Brandon Schaefer + + * Remove dead code, this UBUS signal gets removed when the view is setup. + +2013-04-10 Brandon Schaefer + + If the command lens is open, and we have received an event from compiz to open the command lens, close the dash. Fixes: https://bugs.launchpad.net/bugs/1167466. + + Approved by PS Jenkins bot, Andrea Azzarone. + +2013-04-10 Brandon Schaefer + + * If the command lens is open, and we have recived another Alt+F2 key event from compiz, close the dash. + +2013-04-10 Marco Trevisan (Treviño) + + ApplicationLauncherIcon: use GAppLaunchContext to open indicator shortcuts + + Using the new indicator_desktop_shortcuts_nick_exec_with_context passing to it + the context containing the timestamp of the quicklist activation event. Fixes: https://bugs.launchpad.net/bugs/1164483. + + Approved by PS Jenkins bot, Łukasz Zemczak, Brandon Schaefer, Andrea Azzarone. + +2013-04-09 Marco Trevisan (Treviño) + + autopilot, QuicklistActionTests: add startup-notification on activation test + +2013-04-09 Marco Trevisan (Treviño) + + autopilot, UnityTestCase: move here get_startup_notification_timestamp from icon test case + +2013-04-09 Marco Trevisan (Treviño) + + QuicklistMenuItem: save activation timestamp for autopilot testing + +2013-04-09 Marco Trevisan (Treviño) + + autopilot, QuicklistActionTests: fix test_quicklist_actions to work with any locale + +2013-04-09 Marco Trevisan (Treviño) + + ApplicationLauncherIcon: use GAppLaunchContext to open indicator shortcuts + + Using the new indicator_desktop_shortcuts_nick_exec_with_context passing to it + the context containing the timestamp of the quicklist activation event. + +2013-04-10 Brandon Schaefer + + Make test_panel.py use the OverlayWindowButtons when dealing with the dash window buttons. Fixes: test_window_buttons_maximization_buttons_works_for_dash, also splits that test into these: test_window_buttons_maximize_or_restore_dash, test_window_buttons_active_inactive_states, test_window_buttons_state_switch_on_click. + + Approved by PS Jenkins bot, Andrea Azzarone. + +2013-04-08 Brandon Schaefer + + * Fixes this branch that was reverted: + lp:~brandontschaefer/unity/ap-panel-test-fix/ + + * Missed adding WindowButtons to the child of DashView :(, causing them to not + be found in the AP test + +2013-04-10 Automatic PS uploader + + Releasing 7.0.0daily13.04.10-0ubuntu1 to ubuntu. + + Approved by PS Jenkins bot. + +2013-04-10 Automatic PS uploader + + Releasing 7.0.0daily13.04.10-0ubuntu1, based on r3290 + +2013-04-09 Marco Trevisan (Treviño) + + PanelController: create only one instance of DBusIndicators and share it between Views. + + We can just have one dbus-model for indicators, and use it for all our panels. + This saves some unneeded allocations in multi-monitor environments. Fixes: https://bugs.launchpad.net/bugs/1166550. + + Approved by PS Jenkins bot, Brandon Schaefer. + +2013-04-09 Marco Trevisan (Treviño) + + TestPanelView: update to new API + +2013-04-09 Marco Trevisan (Treviño) + + StandalonePanel: fix compilation, update to new API + +2013-04-09 Marco Trevisan (Treviño) + + PanelController: create only one instance of DBusIndicators and share it between Views. + + We can just have one dbus-model for indicators, and use it for all our panels. + This saves some unneeded allocations in multi-monitor environments. + +2013-04-09 Marco Trevisan (Treviño) + + Unity: share textures whenever possible, optimize memory usage. + + And some code improvements in TextureCache, PanelStyle, PanelView and unityshell. Fixes: https://bugs.launchpad.net/bugs/1166532. + + Approved by PS Jenkins bot, Brandon Schaefer. + +2013-04-09 Marco Trevisan (Treviño) + + TestTextureCache: enable again the tests, they're not failing anymore here. + +2013-04-09 Marco Trevisan (Treviño) + + unityshell: cleanup the code to paint the panel under dash, use style-cached texture. + +2013-04-09 Marco Trevisan (Treviño) + + PanelStyle: cache the panel background texture + +2013-04-09 Marco Trevisan (Treviño) + + unityshell: use a repeated texture to paint the panel below dash + + And draw it only in the display where we actually have the dash. + +2013-04-08 Marco Trevisan (Treviño) + + PanelView: some code-cleanup, reduce computation when updating BG Texture + +2013-04-08 Marco Trevisan (Treviño) + + PanelStyle: build an 1 x panel_height texture in GetBackground + + It's up to the clients to repeat it for the panel width. + +2013-04-08 Marco Trevisan (Treviño) + + PanelView: repeat a 1-px wide texture, instead of building a bigger one + +2013-04-08 Marco Trevisan (Treviño) + + PanelStyle: Use TextureCache for WindowButtons + +2013-04-08 Marco Trevisan (Treviño) + + WindowButtons: Use TextureCache + +2013-04-08 Marco Trevisan (Treviño) + + Launcher: update to use TextureCache API + +2013-04-08 Marco Trevisan (Treviño) + + DashStyle: use TextureCache + +2013-04-08 Marco Trevisan (Treviño) + + PanelView: use TextureCache + +2013-04-08 Marco Trevisan (Treviño) + + TextureCache: add default textures loader for unity path + + And some usual cleanup... + +2013-04-09 Marco Trevisan (Treviño) + + Unity: remove unneeded Geometries allocations. + + Approved by PS Jenkins bot, Brandon Schaefer. + +2013-04-09 Marco Trevisan (Treviño) + + Unity: remove unneeded Geometries allocations + + Found thanks to lp:~3v1n0/nux/rect-c++11 + +2013-04-09 Michi Henning + + Fix for bug #1163705 + + Removed redundant const qualifier on function return types because that causes warnings with gcc and -Wextra -Wall. Fixes: https://bugs.launchpad.net/bugs/1163705. + + Approved by PS Jenkins bot. + +2013-04-05 Michi Henning + + Oops, forgot to make corresponding change in .cpp file. + +2013-04-03 Michi Henning + + Fixes bug #1163705 by removing useless const qualifiers for return values, which cause gcc to emit a warning with + -Wextra -Wall. + +2013-04-08 Andrea Azzarone + + Connect/Disconnect unity::Application signals when replacing app_ in SCLauncherIcon. Fixes: https://bugs.launchpad.net/bugs/1165097. + + Approved by PS Jenkins bot, Brandon Schaefer. + +2013-04-05 Andrea Azzarone + + Fix lp 1165097. + +2013-04-08 Chris Townsend + + Revert the glow intensity of icons in keyboard navigation mode due to a visual regression in the Switcher icons. + + Approved by PS Jenkins bot, Brandon Schaefer. + +2013-04-08 Chris Townsend + + Revert the glow intensity of icons in keyboard nav mode due a visual regression in the Switcher icons. + +2013-04-08 Automatic PS uploader + + Releasing 7.0.0daily13.04.08-0ubuntu1 to ubuntu. + + Approved by PS Jenkins bot. + +2013-04-08 Automatic PS uploader + + Releasing 7.0.0daily13.04.08-0ubuntu1, based on r3283 + +2013-04-05 Andrea Azzarone + + Don't draw the 'running pip' when an app is automatically placed in the Launcher after being installed from the Software Center (or from the apps lens). Fixes: https://bugs.launchpad.net/bugs/987727. + + Approved by PS Jenkins bot, Marco Trevisan (Treviño). + +2013-04-05 Andrea Azzarone + + Fix bug 987727. + +2013-04-05 Automatic PS uploader + + Releasing 7.0.0daily13.04.05.2-0ubuntu1 to ubuntu. + + Approved by PS Jenkins bot. + +2013-04-05 Automatic PS uploader + + Releasing 7.0.0daily13.04.05.2-0ubuntu1, based on r3279 + +2013-04-05 Tigran Gabrielyan + + Toggle radio state to checked for active window in quicklist menu (LP: #1152477). Fixes: https://bugs.launchpad.net/bugs/1152477. + + Approved by PS Jenkins bot, Marco Trevisan (Treviño), Andrea Azzarone. + +2013-03-21 Tigran Gabrielyan + + Make code clearer as to what it's testing + +2013-03-21 Tigran Gabrielyan + + Use ASSERT_STREQ instead of g_strcmp for test + +2013-03-20 Tigran Gabrielyan + + Added tests for radio state in quicklist window switcher (LP: #1152477) + +2013-03-08 Tigran Gabrielyan + + Toggle radio to checked for active window (LP: #1152477) + +2013-04-05 Marco Trevisan (Treviño) + + autopilot, UnityTestCase: add register_nautilus utility function and use in LauncherIconsTests + + It will also take care of its unregistration. + + Approved by PS Jenkins bot, Sebastien Bacher. + +2013-04-05 Marco Trevisan (Treviño) + + autopilot, LauncherIconsTests: use register_nautilus utility function + +2013-04-05 Marco Trevisan (Treviño) + + autopilot, UnityTestCase: add register_nautilus utility function + + It will also take care of its unregistration + +2013-04-05 Łukasz 'sil2100' Zemczak + + Revert revision 3276 as we think it is causing a big test failure, which - in the end, results in many other tests failing as well. + + Approved by PS Jenkins bot, Didier Roche. + +2013-04-05 Łukasz 'sil2100' Zemczak + + Revert revision 3276 as we think it is causing a big test failure, which - in the end, results in many other tests failing as well. + +2013-04-05 Andrea Azzarone + + Don't show grab icons when using touchpad. Fixes: https://bugs.launchpad.net/bugs/1026712. + + Approved by PS Jenkins bot, Stephen M. Webb. + +2013-04-05 Andrea Azzarone + + Minor change. + +2013-04-05 Andrea Azzarone + + Fix bug 1026712. + +2013-04-05 Sebastien Bacher + + Revert r3266 "Don't close the dash when switching from the command lens to the home lens.", it's breaking dash closing for individual lens, which also result in a serie of failing tests (lp: #1164915). Fixes: https://bugs.launchpad.net/bugs/1164915. + + Approved by PS Jenkins bot, Didier Roche. + +2013-04-05 Sebastien Bacher + + Revert r3266 "Don't close the dash when switching from the command lens + to the home lens.", it's breaking dash closing for individual lens, + which also result in a serie of failing tests (lp: #1164915) + +2013-04-04 Brandon Schaefer + + Make test_panel.py use the OverlayWindowButtons when dealing with the dash window buttons. Fixes: test_window_buttons_maximization_buttons_works_for_dash, also splits that test into these: test_window_buttons_maximize_or_restore_dash, test_window_buttons_active_inactive_states, test_window_buttons_state_switch_on_click. + + Approved by PS Jenkins bot, Andrea Azzarone. + +2013-03-28 Brandon Schaefer + + * Fixes failing AP test due to the new OverlayWindowButtons. + +2013-04-04 Łukasz 'sil2100' Zemczak + + Back ported fixes related to dash autopilot preview tests from 100scopes fixes made by Nick Dedekind. Let's wait for the preview animation to finish before continuing the tests. + + Approved by PS Jenkins bot, Brandon Schaefer. + +2013-04-04 Łukasz 'sil2100' Zemczak + + Back ported fixes related to dash autopilot preview tests from 100scopes fixes made by Nick Dedekind. Let's wait for the preview animation to finish before continuing the tests. + +2013-04-03 Chris Townsend + + Tweak the glow around icons for urgent apps. + Also tweak the keyboard nav icon glow as well as the system icon. Fixes: https://bugs.launchpad.net/bugs/1163944. + + Approved by PS Jenkins bot, Brandon Schaefer. + +2013-04-03 Chris Townsend + + Tweak the glow around icons for urgent apps. + Also tweak the keyboard nav icon glow as well as the system icon. + +2013-04-03 Marco Trevisan (Treviño) + + Trash and Device Icons: disconnect from FileManager signal on destruction. Fixes: https://bugs.launchpad.net/bugs/1161916. + + Approved by PS Jenkins bot, Andrea Azzarone. + +2013-04-03 Marco Trevisan (Treviño) + + TestTrashLauncherIcon: ensure filemanager signals get disconnected + +2013-04-03 Marco Trevisan (Treviño) + + TrashLauncherIcon: disconnect from FileManager signal on destruction + +2013-04-03 Marco Trevisan (Treviño) + + TestVolumeImp: ensure we disconnect from filemanager signals on destruction + +2013-04-03 Marco Trevisan (Treviño) + + VolumeImp: disconnect from file-manager signal on destruction + +2013-04-03 Marco Trevisan (Treviño) + + CMakeLists.txt: fix unity components path, removing magic number and }. + + Approved by PS Jenkins bot, Stephen M. Webb. + +2013-04-03 Marco Trevisan (Treviño) + + CMakeLists.txt: fix unity components path, removing magic number and } + +2013-04-03 Brandon Schaefer + + Disable TestIconLoader.TestGetManyIcons until we have the new thread safe lp:fontconfig. + + Approved by PS Jenkins bot, Stephen M. Webb. + +2013-04-03 Brandon Schaefer + + * Disable test, we will need to revert this once we have the new lp:fontfonfig + after 13.04 + +2013-04-03 Brandon Schaefer + + Allows dragging of the normal scrollbar if the overlay scrollbars have reached the top/bottom. Fixes: https://bugs.launchpad.net/bugs/1163616. + + Approved by PS Jenkins bot, Andrea Azzarone. + +2013-04-02 Brandon Schaefer + + * If the Overlayscroll bar is at the top or bottom of the track we still allow + dragging of the scroll until it self has reached the top or bottom. + +2013-04-03 Stephen M. Webb + + Release 7.0.0 + 2013-04-03 Stephen M. Webb Bump the Unity version to 7.0.0. diff -Nru unity-7.1.2+14.04.20140303/CMakeLists.txt unity-7.2.4+14.04.20141217/CMakeLists.txt --- unity-7.1.2+14.04.20140303/CMakeLists.txt 2014-03-03 16:47:36.000000000 +0000 +++ unity-7.2.4+14.04.20141217/CMakeLists.txt 2014-12-17 20:51:54.000000000 +0000 @@ -9,8 +9,8 @@ # set (PROJECT_NAME "unity") set (UNITY_MAJOR 7) -set (UNITY_MINOR 1) -set (UNITY_MICRO 2) +set (UNITY_MINOR 2) +set (UNITY_MICRO 4) set (UNITY_VERSION "${UNITY_MAJOR}.${UNITY_MINOR}.${UNITY_MICRO}") set (UNITY_API_VERSION "6.0") set (UNITY_COMPONENTS_VERSION "6") @@ -102,15 +102,14 @@ && bzr log --gnu-changelog > ChangeLog && echo "• Generating AUTHORS" && bzr log --long --levels=0 | grep -e "^\\s*author:" -e "^\\s*committer:" | cut -d ":" -f 2 | sed -r -f AUTHOR-glue | sort -u > AUTHORS - && echo "• Committing Release" - && bzr commit -m\"Release ${UNITY_VERSION}\" --unchanged - && echo "• Tagging Release" - && bzr tag ${UNITY_VERSION} && echo "• Running Distcheck" ) add_custom_target (dist - COMMAND bzr export --root=${ARCHIVE_NAME} ${CMAKE_BINARY_DIR}/${ARCHIVE_NAME}.tar.bz2 + COMMAND echo "• Creating Tarball" + && bzr export --root=${ARCHIVE_NAME} ${CMAKE_BINARY_DIR}/${ARCHIVE_NAME}.tar.bz2 + && echo "• Signing Tarball" + && gpg --armor --sign --detach-sig ${CMAKE_BINARY_DIR}/${ARCHIVE_NAME}.tar.bz2 WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} ) add_dependencies(dist pre-distcheck) @@ -129,19 +128,17 @@ add_dependencies(distcheck dist) add_custom_target (post-distcheck - COMMAND echo "• Signing Tarball" - && gpg --armor --sign --detach-sig ${CMAKE_BINARY_DIR}/${ARCHIVE_NAME}.tar.bz2 - && echo "• Pushing Branch" - && bzr push - && echo "• Publishing Tarball" - && lp-project-upload unity ${UNITY_VERSION} ${CMAKE_BINARY_DIR}/${ARCHIVE_NAME}.tar.bz2 - && echo "" - && echo "• Unity ${UNITY_VERSION} Released." + COMMAND echo "• Committing Release" + && bzr commit -m\"Release ${UNITY_VERSION}\" --unchanged + && echo "• Tagging Release" + && bzr tag ${UNITY_VERSION} + && echo "• Unity ${UNITY_VERSION} is ready for release." + WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} ) add_dependencies(post-distcheck distcheck) add_custom_target (release) -add_dependencies (release post-distcheck) +add_dependencies (release distcheck) # # config.h @@ -230,6 +227,7 @@ indicator3-0.4>=0.4.90 json-glib-1.0 libbamf3>=0.5.0 + gnome-desktop-3.0 libnotify libstartup-notification-1.0 nux-4.0>=4.0.5 @@ -261,8 +259,10 @@ add_subdirectory(unity-shared) add_subdirectory(dash) add_subdirectory(launcher) +add_subdirectory(data) if (ENABLE_X_SUPPORT) add_subdirectory(hud) + add_subdirectory(lockscreen) add_subdirectory(panel) add_subdirectory(decorations) add_subdirectory(plugins/unityshell) diff -Nru unity-7.1.2+14.04.20140303/com.canonical.Unity.gschema.xml unity-7.2.4+14.04.20141217/com.canonical.Unity.gschema.xml --- unity-7.1.2+14.04.20140303/com.canonical.Unity.gschema.xml 2014-03-03 16:47:14.000000000 +0000 +++ unity-7.2.4+14.04.20141217/com.canonical.Unity.gschema.xml 2014-12-17 20:51:37.000000000 +0000 @@ -54,6 +54,36 @@ unity top panel + + + 1.0 + + Font scaling for unity and applications. + This value defines the global font scaling used by both + unity and applications. It will match the current system font scaling. + + + 1.0 + + Mouse cursor scaling. + This value defines the global mouse cursor scaling used by both + unity and applications. Changing this value allows to use a custom scaling + for the mouse cursor. + + + '' + The name of the monitor that controls the global app scaling factor. + This value defines the monitor that unity will use (if found) as reference + for scaling all the applications. + + + true + Use the maximum per-monitor scale-factor as application scale factor if no target monitor is found. + When this is enabled, the applications scale factor will match + the scale factor of the monitor with the greater value, in case the monitor + defined in 'app-scale-factor-monitor' is not provided or available. + + [ @@ -64,9 +94,7 @@ 'application://libreoffice-calc.desktop', 'application://libreoffice-impress.desktop', 'application://ubuntu-software-center.desktop', - 'application://ubuntuone-installer.desktop', 'application://ubuntu-amazon-default.desktop', - 'application://UbuntuOneMusiconeubuntucom.desktop', 'application://unity-control-center.desktop', 'unity://running-apps', 'unity://expo-icon', diff -Nru unity-7.1.2+14.04.20140303/dash/DashController.cpp unity-7.2.4+14.04.20141217/dash/DashController.cpp --- unity-7.1.2+14.04.20140303/dash/DashController.cpp 2014-03-03 16:47:36.000000000 +0000 +++ unity-7.2.4+14.04.20141217/dash/DashController.cpp 2014-12-17 20:51:37.000000000 +0000 @@ -33,7 +33,6 @@ #include "unity-shared/UScreen.h" #include "unity-shared/WindowManager.h" - namespace unity { namespace dash @@ -44,7 +43,7 @@ namespace { -const unsigned int PRELOAD_TIMEOUT_LENGTH = 40; +unsigned const PRELOAD_TIMEOUT_LENGTH = 40; namespace dbus { @@ -63,12 +62,10 @@ } Controller::Controller(Controller::WindowCreator const& create_window) - : launcher_width(64) - , use_primary(false) + : use_primary(false) , create_window_(create_window) , monitor_(0) , visible_(false) - , need_show_(false) , dbus_server_(dbus::BUS_NAME) , ensure_timeout_(PRELOAD_TIMEOUT_LENGTH) , timeline_animator_(90) @@ -94,7 +91,7 @@ SetupWindow(); UScreen::GetDefault()->changed.connect([this] (int, std::vector const&) { Relayout(true); }); - Settings::Instance().form_factor.changed.connect([this](FormFactor) + form_factor_changed_ = Settings::Instance().form_factor.changed.connect([this] (FormFactor) { if (window_ && view_ && visible_) { @@ -107,7 +104,9 @@ } }); - WindowManager::Default().initiate_spread.connect(sigc::mem_fun(this, &Controller::HideDash)); + auto& wm = WindowManager::Default(); + wm.initiate_spread.connect(sigc::mem_fun(this, &Controller::HideDash)); + wm.screen_viewport_switch_started.connect(sigc::mem_fun(this, &Controller::HideDash)); dbus_server_.AddObjects(dbus::INTROSPECTION, dbus::PATH); dbus_server_.GetObjects().front()->SetMethodsCallsHandler([this] (std::string const& method, GVariant*) { @@ -197,6 +196,11 @@ } } +int Controller::Monitor() const +{ + return monitor_; +} + nux::BaseWindow* Controller::window() const { return window_.GetPointer(); @@ -228,6 +232,7 @@ { UScreen *uscreen = UScreen::GetDefault(); auto monitor_geo = uscreen->GetMonitorGeometry(GetIdealMonitor()); + int launcher_width = unity::Settings::Instance().LauncherWidth(monitor_); // We want to cover as much of the screen as possible to grab any mouse events outside // of our window @@ -242,11 +247,11 @@ EnsureDash(); if (check_monitor) - { monitor_ = CLAMP(GetIdealMonitor(), 0, static_cast(UScreen::GetDefault()->GetMonitors().size()-1)); - } + int launcher_width = unity::Settings::Instance().LauncherWidth(monitor_); nux::Geometry geo = GetIdealWindowGeometry(); + view_->Relayout(); window_->SetGeometry(geo); view_->SetMonitorOffset(launcher_width, panel::Style::Instance().PanelHeight(monitor_)); @@ -258,20 +263,14 @@ HideDash(); } -void Controller::OnScreenUngrabbed() -{ - LOG_DEBUG(logger) << "On Screen Ungrabbed called"; - if (need_show_) - { - EnsureDash(); - ShowDash(); - } -} - void Controller::OnExternalShowDash(GVariant* variant) { EnsureDash(); - visible_ ? HideDash() : ShowDash(); + + if (!visible_) + ShowDash(); + else + HideDash(); } void Controller::OnExternalHideDash(GVariant* variant) @@ -279,30 +278,44 @@ HideDash(); } -void Controller::ShowDash() +bool Controller::ShowDash() { - EnsureDash(); - WindowManager& wm = WindowManager::Default(); // Don't want to show at the wrong time - if (visible_ || wm.IsExpoActive() || wm.IsScaleActive()) - return; + if (visible_) + return false; + + WindowManager& wm = WindowManager::Default(); + + if (wm.IsExpoActive()) + wm.TerminateExpo(); // We often need to wait for the mouse/keyboard to be available while a plugin // is finishing it's animations/cleaning up. In these cases, we patiently wait // for the screen to be available again before honouring the request. if (wm.IsScreenGrabbed()) { - screen_ungrabbed_slot_ = wm.screen_ungrabbed.connect(sigc::mem_fun(this, &Controller::OnScreenUngrabbed)); - need_show_ = true; - return; + screen_ungrabbed_slot_ = wm.screen_ungrabbed.connect([this] { + grab_wait_.reset(); + ShowDash(); + }); + + // Let's wait ungrab event for maximum a couple of seconds... + grab_wait_.reset(new glib::TimeoutSeconds(2, [this] { + screen_ungrabbed_slot_->disconnect(); + return false; + })); + + return false; } + EnsureDash(); monitor_ = GetIdealMonitor(); + screen_ungrabbed_slot_->disconnect(); + int launcher_width = unity::Settings::Instance().LauncherWidth(monitor_); view_->SetMonitorOffset(launcher_width, panel::Style::Instance().PanelHeight(monitor_)); - view_->AboutToShow(); + view_->AboutToShow(monitor_); FocusWindow(); - need_show_ = false; visible_ = true; StartShowHideTimeline(); @@ -311,6 +324,7 @@ GVariant* info = g_variant_new(UBUS_OVERLAY_FORMAT_STRING, "dash", TRUE, monitor_, view_content_geo.width, view_content_geo.height); ubus_manager_.SendMessage(UBUS_OVERLAY_SHOWN, info); + return true; } void Controller::FocusWindow() @@ -342,8 +356,6 @@ if (!visible_) return; - screen_ungrabbed_slot_->disconnect(); - EnsureDash(); view_->AboutToHide(); @@ -389,7 +401,7 @@ view_->OnActivateRequest(variant); } -gboolean Controller::CheckShortcutActivation(const char* key_string) +bool Controller::CheckShortcutActivation(const char* key_string) { if (!key_string) return false; @@ -456,8 +468,8 @@ nux::Geometry const& view_content_geo(view_->GetContentGeometry()); nux::Geometry geo(window_geo.x, window_geo.y, view_content_geo.width, view_content_geo.height); - geo.width += style.GetDashRightTileWidth(); - geo.height += style.GetDashBottomTileHeight(); + geo.width += style.GetDashRightTileWidth().CP(view_->scale()); + geo.height += style.GetDashBottomTileHeight().CP(view_->scale()); return geo; } diff -Nru unity-7.1.2+14.04.20140303/dash/DashController.h unity-7.2.4+14.04.20141217/dash/DashController.h --- unity-7.1.2+14.04.20140303/dash/DashController.h 2014-03-03 16:47:14.000000000 +0000 +++ unity-7.2.4+14.04.20141217/dash/DashController.h 2014-12-17 20:51:37.000000000 +0000 @@ -51,17 +51,16 @@ nux::BaseWindow* window() const; - gboolean CheckShortcutActivation(const char* key_string); + bool CheckShortcutActivation(const char* key_string); std::vector GetAllShortcuts(); - nux::Property launcher_width; nux::Property use_primary; sigc::signal on_realize; void HideDash(); void QuicklyHideDash(); - void ShowDash(); + bool ShowDash(); void ReFocusKeyInput(); @@ -70,6 +69,8 @@ nux::Geometry GetInputWindowGeometry(); nux::ObjectPtr const& Dash() const; + int Monitor() const; + protected: std::string GetName() const; void AddProperties(debug::IntrospectionData&); @@ -85,7 +86,6 @@ void Relayout(bool check_monitor =false); void OnMouseDownOutsideWindow(int x, int y, unsigned long bflags, unsigned long kflags); - void OnScreenUngrabbed(); void OnExternalShowDash(GVariant* variant); void OnExternalHideDash(GVariant* variant); void OnActivateRequest(GVariant* variant); @@ -102,13 +102,13 @@ nux::ObjectPtr window_; nux::ObjectPtr view_; int monitor_; - bool visible_; - bool need_show_; connection::Wrapper screen_ungrabbed_slot_; + connection::Wrapper form_factor_changed_; glib::DBusServer dbus_server_; glib::TimeoutSeconds ensure_timeout_; + glib::Source::UniquePtr grab_wait_; nux::animation::AnimateValue timeline_animator_; UBusManager ubus_manager_; }; diff -Nru unity-7.1.2+14.04.20140303/dash/DashView.cpp unity-7.2.4+14.04.20141217/dash/DashView.cpp --- unity-7.1.2+14.04.20140303/dash/DashView.cpp 2014-03-03 16:47:36.000000000 +0000 +++ unity-7.2.4+14.04.20141217/dash/DashView.cpp 2014-12-17 20:51:37.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2010 Canonical Ltd + * Copyright (C) 2010-2014 Canonical Ltd * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License version 3 as @@ -53,10 +53,11 @@ const int DASH_TILE_HORIZONTAL_COUNT = 6; const int DASH_DEFAULT_CATEGORY_COUNT = 3; -const int DASH_RESULT_RIGHT_PAD = 35; -const int GROUP_HEADING_HEIGHT = 24; -const int PREVIEW_ICON_SPLIT_OFFSCREEN_OFFSET = 10; +const RawPixel DASH_RESULT_RIGHT_PAD = 35_em; +const RawPixel PREVIEW_ICON_SPLIT_OFFSCREEN_OFFSET = 10_em; +const RawPixel PREVIEW_CONTAINER_TRIANGLE_WIDTH = 14_em; +const RawPixel PREVIEW_CONTAINER_TRIANGLE_HEIGHT = 12_em; const int MAX_ENTRY_ACTIVATE_WAIT_TIMEOUT = 1000; } @@ -112,6 +113,7 @@ DashView::DashView(Scopes::Ptr const& scopes, ApplicationStarter::Ptr const& application_starter) : nux::View(NUX_TRACKER_LOCATION) + , scale(Settings::Instance().em()->DPIScale()) , scopes_(scopes) , application_starter_(application_starter) , preview_container_(nullptr) @@ -129,6 +131,7 @@ , animate_preview_container_value_(0.0) , animate_preview_value_(0.0) , overlay_window_buttons_(new OverlayWindowButtons()) + , monitor_(0) { renderer_.SetOwner(this); renderer_.need_redraw.connect([this] () { @@ -142,7 +145,6 @@ mouse_down.connect(sigc::mem_fun(this, &DashView::OnMouseButtonDown)); preview_state_machine_.PreviewActivated.connect(sigc::mem_fun(this, &DashView::BuildPreview)); - Relayout(); if (scopes_) { @@ -155,6 +157,10 @@ if (visible_ && !area) nux::GetWindowCompositor().SetKeyFocusArea(default_focus()); }); + + unity::Settings::Instance().dpi_changed.connect(sigc::mem_fun(this, &DashView::OnDPIChanged)); + scale.changed.connect(sigc::mem_fun(this, &DashView::UpdateScale)); + UpdateScale(scale()); } DashView::~DashView() @@ -228,13 +234,13 @@ if (!preview_container_) { - preview_container_ = previews::PreviewContainer::Ptr(new previews::PreviewContainer()); + preview_container_ = new previews::PreviewContainer(); preview_container_->SetRedirectRenderingToTexture(true); AddChild(preview_container_.GetPointer()); preview_container_->SetParentObject(this); } preview_container_->Preview(model, previews::Navigation::NONE); // no swipe left or right - + preview_container_->scale = scale(); preview_container_->SetGeometry(scopes_layout_->GetGeometry()); preview_displaying_ = true; @@ -261,6 +267,7 @@ { // got a new preview whilst already displaying, we probably clicked a navigation button. preview_container_->Preview(model, preview_navigation_mode_); // TODO + preview_container_->scale = scale(); } if (G_LIKELY(preview_state_machine_.left_results() > 0 && preview_state_machine_.right_results() > 0)) @@ -454,11 +461,17 @@ content_view_->SetPresentRedirectedView(true); } -void DashView::AboutToShow() +void DashView::AboutToShow(int monitor) { visible_ = true; search_bar_->text_entry()->SelectAll(); + if (monitor_ != monitor) + { + monitor_ = monitor; + scale = Settings::Instance().em(monitor_)->DPIScale(); + } + /* Give the scopes a chance to prep data before we map them */ if (active_scope_view_) { @@ -479,6 +492,7 @@ overlay_window_buttons_->Show(); + renderer_.scale = scale(); renderer_.UpdateBlurBackgroundSize(content_geo_, GetRenderAbsoluteGeometry(), false); renderer_.AboutToShow(); } @@ -486,7 +500,7 @@ void DashView::AboutToHide() { if (BackgroundEffectHelper::blur_type == BLUR_STATIC) - { + { content_geo_ = {0, 0, 0, 0}; renderer_.UpdateBlurBackgroundSize(content_geo_, GetRenderAbsoluteGeometry(), false); } @@ -518,31 +532,24 @@ void DashView::SetupViews() { - dash::Style& style = dash::Style::Instance(); - layout_ = new nux::VLayout(); - layout_->SetLeftAndRightPadding(style.GetVSeparatorSize(), 0); - layout_->SetTopAndBottomPadding(style.GetHSeparatorSize(), 0); SetLayout(layout_); top_space_ = new nux::SpaceLayout(0, 0, renderer_.y_offset(), renderer_.y_offset()); layout_->AddLayout(top_space_, 0); content_layout_ = new DashLayout(NUX_TRACKER_LOCATION); - content_layout_->SetTopAndBottomPadding(style.GetDashViewTopPadding(), 0); content_view_ = new DashContentView(NUX_TRACKER_LOCATION); content_view_->SetLayout(content_layout_); layout_->AddView(content_view_, 1, nux::MINOR_POSITION_START, nux::MINOR_SIZE_FULL); search_bar_layout_ = new nux::HLayout(); - search_bar_layout_->SetLeftAndRightPadding(style.GetSearchBarLeftPadding(), 0); content_layout_->AddLayout(search_bar_layout_, 0, nux::MINOR_POSITION_CENTER, nux::MINOR_SIZE_FULL); search_bar_ = new SearchBar(true); + search_bar_->scale = scale(); AddChild(search_bar_); - search_bar_->SetMinimumHeight(style.GetSearchBarHeight()); - search_bar_->SetMaximumHeight(style.GetSearchBarHeight()); search_bar_->activated.connect(sigc::mem_fun(this, &DashView::OnEntryActivated)); search_bar_->search_changed.connect(sigc::mem_fun(this, &DashView::OnSearchChanged)); search_bar_->live_search_reached.connect(sigc::mem_fun(this, &DashView::OnLiveSearchReached)); @@ -564,6 +571,41 @@ AddChild(scope_bar_); scope_bar_->scope_activated.connect(sigc::mem_fun(this, &DashView::OnScopeBarActivated)); content_layout_->AddView(scope_bar_, 0, nux::MINOR_POSITION_CENTER); + + OnDPIChanged(); +} + +void DashView::OnDPIChanged() +{ + scale = Settings::Instance().em(monitor_)->DPIScale(); +} + +void DashView::UpdateScale(double scale) +{ + UpdateDashViewSize(); + + for (auto& scope : scope_views_) + scope.second->scale = scale; + + search_bar_->scale = scale; + scope_bar_->scale = scale; + renderer_.scale = scale; + + if (preview_container_) + preview_container_->scale = scale; + + Relayout(); +} + +void DashView::UpdateDashViewSize() +{ + dash::Style const& style = dash::Style::Instance(); + + layout_->SetLeftAndRightPadding(style.GetVSeparatorSize().CP(scale), 0); + layout_->SetTopAndBottomPadding(style.GetHSeparatorSize().CP(scale), 0); + + content_layout_->SetTopAndBottomPadding(style.GetDashViewTopPadding().CP(scale), 0); + search_bar_layout_->SetLeftAndRightPadding(style.GetSearchBarLeftPadding().CP(scale), 0); } void DashView::SetupUBusConnections() @@ -584,17 +626,25 @@ content_geo_ = GetBestFitGeometry(geo); dash::Style& style = dash::Style::Instance(); + int top_padding = style.GetDashViewTopPadding().CP(scale); + // kinda hacky, but it makes sure the content isn't so big that it throws // the bottom of the dash off the screen // not hugely happy with this, so FIXME - scopes_layout_->SetMaximumHeight (std::max(0, content_geo_.height - search_bar_->GetGeometry().height - scope_bar_->GetGeometry().height - style.GetDashViewTopPadding())); - scopes_layout_->SetMinimumHeight (std::max(0, content_geo_.height - search_bar_->GetGeometry().height - scope_bar_->GetGeometry().height - style.GetDashViewTopPadding())); + scopes_layout_->SetMaximumHeight (std::max(0, content_geo_.height - + search_bar_->GetGeometry().height - + scope_bar_->GetGeometry().height - + top_padding)); + + scopes_layout_->SetMinimumHeight (std::max(0, content_geo_.height - + search_bar_->GetGeometry().height - + scope_bar_->GetGeometry().height - + top_padding)); layout_->SetMinMaxSize(content_geo_.width, content_geo_.y + content_geo_.height); // Minus the padding that gets added to the left - float tile_width = style.GetTileWidth(); - style.SetDefaultNColumns(floorf((content_geo_.width - 32) / tile_width)); + style.columns_number = floorf((content_geo_.width - (32_em).CP(scale)) / style.GetTileWidth().CP(scale)); ubus_manager_.SendMessage(UBUS_DASH_SIZE_CHANGED, g_variant_new("(ii)", content_geo_.width, content_geo_.height)); @@ -615,22 +665,24 @@ int panel_height = renderer_.y_offset; int width = 0, height = 0; - int tile_width = style.GetTileWidth(); - int tile_height = style.GetTileHeight(); - int category_height = (style.GetPlacesGroupTopSpace() + style.GetCategoryIconSize() + style.GetPlacesGroupResultTopPadding() + tile_height); + int tile_width = style.GetTileWidth().CP(scale); + + int category_height = (style.GetPlacesGroupTopSpace().CP(scale) + + style.GetCategoryIconSize().CP(scale) + + style.GetPlacesGroupResultTopPadding().CP(scale) + + style.GetTileHeight().CP(scale)); + int half = for_geo.width / 2; // if default dash size is bigger than half a screens worth of items, go for that. - while ((width += tile_width) < half) - ; + while ((width += tile_width) < half); width = std::max(width, tile_width * DASH_TILE_HORIZONTAL_COUNT); - width += style.GetVSeparatorSize(); - width += style.GetPlacesGroupResultLeftPadding() + DASH_RESULT_RIGHT_PAD; + width += style.GetVSeparatorSize().CP(scale); + width += style.GetPlacesGroupResultLeftPadding().CP(scale) + DASH_RESULT_RIGHT_PAD.CP(scale); - - height = style.GetHSeparatorSize(); - height += style.GetDashViewTopPadding(); + height = style.GetHSeparatorSize().CP(scale); + height += style.GetDashViewTopPadding().CP(scale); height += search_bar_->GetGeometry().height; height += category_height * DASH_DEFAULT_CATEGORY_COUNT; // adding three categories height += scope_bar_->GetGeometry().height; @@ -744,7 +796,7 @@ texxform.voffset = (scope_bar_->GetY() - content_view_->GetY())/(float)content_view_->GetHeight(); int start_y = scope_bar_->GetY(); - int final_y = geo_layout.y + geo_layout.height + PREVIEW_ICON_SPLIT_OFFSCREEN_OFFSET; + int final_y = geo_layout.y + geo_layout.height + PREVIEW_ICON_SPLIT_OFFSCREEN_OFFSET.CP(scale); int scope_y = (1.0f - animate_split_value_) * start_y + (animate_split_value_ * final_y); @@ -768,7 +820,7 @@ texxform.voffset = (search_bar_->GetY() - content_view_->GetY())/(float)content_view_->GetHeight(); start_y = search_bar_->GetY(); - final_y = geo_layout.y - search_bar_->GetHeight() - PREVIEW_ICON_SPLIT_OFFSCREEN_OFFSET; + final_y = geo_layout.y - search_bar_->GetHeight() - PREVIEW_ICON_SPLIT_OFFSCREEN_OFFSET.CP(scale); graphics_engine.QRP_1Tex ( @@ -786,7 +838,7 @@ texxform.voffset = (search_bar_->GetY() - content_view_->GetY())/(float)content_view_->GetHeight(); int start_x = active_scope_view_->filter_bar()->GetX(); - int final_x = content_view_->GetX() + content_view_->GetWidth() + PREVIEW_ICON_SPLIT_OFFSCREEN_OFFSET; + int final_x = content_view_->GetX() + content_view_->GetWidth() + PREVIEW_ICON_SPLIT_OFFSCREEN_OFFSET.CP(scale); int filter_x = (1.0f - animate_split_value_) * start_x + (animate_split_value_ * final_x); @@ -810,7 +862,7 @@ texxform.voffset = (search_bar_->GetY() - content_view_->GetY())/(float)content_view_->GetHeight(); int start_y = search_bar_->GetY(); - int final_y = geo_layout.y - search_bar_->GetHeight() - PREVIEW_ICON_SPLIT_OFFSCREEN_OFFSET; + int final_y = geo_layout.y - search_bar_->GetHeight() - PREVIEW_ICON_SPLIT_OFFSCREEN_OFFSET.CP(scale); graphics_engine.QRP_1Tex ( @@ -844,8 +896,8 @@ // Triangle pointed at preview item if (opening_column_x_ != -1) { - int final_width = 14; - int final_height = 12; + int final_width = PREVIEW_CONTAINER_TRIANGLE_WIDTH.CP(scale); + int final_height = PREVIEW_CONTAINER_TRIANGLE_HEIGHT.CP(scale); int x_center = geo_content.x + (opening_column_x_ - geo_abs.x) + opening_column_width_ / 2; int start_y = geo_abs_preview.y - geo_abs.y; @@ -1069,13 +1121,13 @@ void DashView::OnMouseButtonDown(int x, int y, unsigned long button, unsigned long key) { - dash::Style& style = dash::Style::Instance(); nux::Geometry geo(content_geo_); if (Settings::Instance().form_factor() == FormFactor::DESKTOP) { - geo.width += style.GetDashRightTileWidth(); - geo.height += style.GetDashBottomTileHeight(); + dash::Style& style = dash::Style::Instance(); + geo.width += style.GetDashRightTileWidth().CP(scale); + geo.height += style.GetDashBottomTileHeight().CP(scale); } } @@ -1217,6 +1269,7 @@ nux::ObjectPtr view(new ScopeView(scope, search_bar_->show_filters())); AddChild(view.GetPointer()); + view->scale = scale(); view->SetVisible(false); view->result_activated.connect(sigc::mem_fun(this, &DashView::OnResultActivated)); @@ -1391,8 +1444,8 @@ { for (Scope::Ptr scope: scopes_->GetScopes()) { - std::string shortcut = scope->shortcut; - if(shortcut.size() > 0) + std::string const& shortcut = scope->shortcut; + if (!shortcut.empty()) result.push_back(shortcut.at(0)); } } @@ -1452,8 +1505,8 @@ introspection.add(nux::Geometry(GetAbsoluteX(), GetAbsoluteY(), content_geo_.width, content_geo_.height)) .add("num_rows", num_rows) .add("form_factor", form_factor) - .add("right-border-width", style.GetDashRightTileWidth()) - .add("bottom-border-height", style.GetDashBottomTileHeight()) + .add("right-border-width", style.GetDashRightTileWidth().CP(scale)) + .add("bottom-border-height", style.GetDashBottomTileHeight().CP(scale)) .add("preview_displaying", preview_displaying_) .add("preview_animation", animate_split_value_ * animate_preview_container_value_ * animate_preview_value_) .add("dash_maximized", style.always_maximised()) diff -Nru unity-7.1.2+14.04.20140303/dash/DashView.h unity-7.2.4+14.04.20141217/dash/DashView.h --- unity-7.1.2+14.04.20140303/dash/DashView.h 2014-03-03 16:47:36.000000000 +0000 +++ unity-7.2.4+14.04.20141217/dash/DashView.h 2014-12-17 20:51:37.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2010 Canonical Ltd + * Copyright (C) 2010-2014 Canonical Ltd * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License version 3 as @@ -62,7 +62,9 @@ DashView(Scopes::Ptr const& scopes, ApplicationStarter::Ptr const& application_starter); ~DashView(); - void AboutToShow(); + nux::Property scale; + + void AboutToShow(int monitor); void AboutToHide(); void Relayout(); void DisableBlur(); @@ -129,6 +131,9 @@ nux::Geometry GetRenderAbsoluteGeometry() const; + void UpdateDashViewSize(); + void UpdateScale(double scale); + void OnDPIChanged(); nux::Area* KeyNavIteration(nux::KeyNavDirection direction); @@ -192,6 +197,8 @@ nux::ObjectPtr overlay_window_buttons_; + int monitor_; + friend class TestDashView; }; diff -Nru unity-7.1.2+14.04.20140303/dash/FilterBar.cpp unity-7.2.4+14.04.20141217/dash/FilterBar.cpp --- unity-7.1.2+14.04.20140303/dash/FilterBar.cpp 2014-03-03 16:47:14.000000000 +0000 +++ unity-7.2.4+14.04.20141217/dash/FilterBar.cpp 2014-12-17 20:51:37.000000000 +0000 @@ -33,28 +33,34 @@ { namespace dash { + +namespace +{ + double const DEFAULT_SCALE = 1.0; +} + DECLARE_LOGGER(logger, "unity.dash.filterbar"); NUX_IMPLEMENT_OBJECT_TYPE(FilterBar); FilterBar::FilterBar(NUX_FILE_LINE_DECL) : View(NUX_FILE_LINE_PARAM) + , scale(DEFAULT_SCALE) { - Init(); -} - -FilterBar::~FilterBar() -{ + SetLayout(new nux::VLayout(NUX_TRACKER_LOCATION)); + scale.changed.connect(sigc::mem_fun(this, &FilterBar::UpdateScale)); + UpdateScale(scale); } -void FilterBar::Init() +void FilterBar::UpdateScale(double scale) { - dash::Style& style = dash::Style::Instance(); + for (auto& filters : filter_map_) + filters.second->scale = scale; - nux::LinearLayout* layout = new nux::VLayout(NUX_TRACKER_LOCATION); - layout->SetTopAndBottomPadding(style.GetFilterBarTopPadding() - style.GetFilterHighlightPadding()); - layout->SetSpaceBetweenChildren(style.GetSpaceBetweenFilterWidgets() - style.GetFilterHighlightPadding()); - SetLayout(layout); + auto& style = dash::Style::Instance(); + auto* layout = static_cast(GetLayout()); + layout->SetTopAndBottomPadding(style.GetFilterBarTopPadding().CP(scale) - style.GetFilterHighlightPadding().CP(scale)); + layout->SetSpaceBetweenChildren(style.GetSpaceBetweenFilterWidgets().CP(scale) - style.GetFilterHighlightPadding().CP(scale)); } void FilterBar::SetFilters(Filters::Ptr const& filters) @@ -71,6 +77,7 @@ } FilterExpanderLabel* filter_view = factory_.WidgetForFilter(filter); + filter_view->scale = scale(); AddChild(filter_view); filter_map_[filter] = filter_view; GetLayout()->AddView(filter_view, 0, nux::MINOR_POSITION_START, nux::MINOR_SIZE_FULL); @@ -103,9 +110,7 @@ } void FilterBar::Draw(nux::GraphicsEngine& graphics_engine, bool force_draw) -{ - -} +{} void FilterBar::DrawContent(nux::GraphicsEngine& graphics_engine, bool force_draw) { diff -Nru unity-7.1.2+14.04.20140303/dash/FilterBar.h unity-7.2.4+14.04.20141217/dash/FilterBar.h --- unity-7.1.2+14.04.20140303/dash/FilterBar.h 2014-03-03 16:47:14.000000000 +0000 +++ unity-7.2.4+14.04.20141217/dash/FilterBar.h 2014-12-17 20:51:37.000000000 +0000 @@ -42,7 +42,8 @@ NUX_DECLARE_OBJECT_TYPE(FilterBar, nux::View); public: FilterBar(NUX_FILE_LINE_PROTO); - ~FilterBar(); + + nux::Property scale; void SetFilters(Filters::Ptr const& filters); @@ -60,7 +61,7 @@ virtual void AddProperties(debug::IntrospectionData&); private: - void Init(); + void UpdateScale(double scale); FilterFactory factory_; Filters::Ptr filters_; diff -Nru unity-7.1.2+14.04.20140303/dash/FilterBasicButton.cpp unity-7.2.4+14.04.20141217/dash/FilterBasicButton.cpp --- unity-7.1.2+14.04.20140303/dash/FilterBasicButton.cpp 2014-03-03 16:47:14.000000000 +0000 +++ unity-7.2.4+14.04.20141217/dash/FilterBasicButton.cpp 2014-12-17 20:51:54.000000000 +0000 @@ -20,55 +20,39 @@ */ #include "unity-shared/DashStyle.h" +#include "unity-shared/UnitySettings.h" #include "FilterBasicButton.h" -namespace -{ -const int kMinButtonHeight = 30; -const int kMinButtonWidth = 48; -const int kFontSizePx = 15; // 15px == 11pt -} - namespace unity { namespace dash { - +namespace +{ +const RawPixel BUTTON_HEIGHT = 30_em; +const RawPixel MIN_BUTTON_WIDTH = 48_em; +const int FONT_SIZE_PX = 15; // 15px == 11pt +} + NUX_IMPLEMENT_OBJECT_TYPE(FilterBasicButton); FilterBasicButton::FilterBasicButton(nux::TextureArea* image, NUX_FILE_LINE_DECL) - : nux::ToggleButton(image, NUX_FILE_LINE_PARAM) -{ - Init(); -} + : FilterBasicButton(std::string(), image, NUX_FILE_LINE_PARAM) +{} + +FilterBasicButton::FilterBasicButton(NUX_FILE_LINE_DECL) + : FilterBasicButton(std::string(), NUX_FILE_LINE_PARAM) +{} FilterBasicButton::FilterBasicButton(std::string const& label, NUX_FILE_LINE_DECL) - : nux::ToggleButton(NUX_FILE_LINE_PARAM) - , label_(label) -{ - Init(); -} + : FilterBasicButton(label, nullptr, NUX_FILE_LINE_PARAM) +{} FilterBasicButton::FilterBasicButton(std::string const& label, nux::TextureArea* image, NUX_FILE_LINE_DECL) : nux::ToggleButton(image, NUX_FILE_LINE_PARAM) + , scale(1.0) , label_(label) { - Init(); -} - -FilterBasicButton::FilterBasicButton(NUX_FILE_LINE_DECL) - : nux::ToggleButton(NUX_FILE_LINE_PARAM) -{ - Init(); -} - -FilterBasicButton::~FilterBasicButton() -{ -} - -void FilterBasicButton::Init() -{ - InitTheme(); SetAcceptKeyNavFocusOnMouseDown(false); SetAcceptKeyNavFocusOnMouseEnter(true); @@ -85,34 +69,46 @@ if (GetInputEventSensitivity()) Active() ? Deactivate() : Activate(); }); + + scale.changed.connect(sigc::mem_fun(this, &FilterBasicButton::UpdateScale)); + Settings::Instance().font_scaling.changed.connect(sigc::hide(sigc::mem_fun(this, &FilterBasicButton::InitTheme))); } void FilterBasicButton::InitTheme() { - if (!active_) - { - nux::Geometry const& geo = GetGeometry(); + nux::Geometry const& geo = GetGeometry(); - prelight_.reset(new nux::CairoWrapper(geo, sigc::bind(sigc::mem_fun(this, &FilterBasicButton::RedrawTheme), nux::ButtonVisualState::VISUAL_STATE_PRELIGHT))); - active_.reset(new nux::CairoWrapper(geo, sigc::bind(sigc::mem_fun(this, &FilterBasicButton::RedrawTheme), nux::ButtonVisualState::VISUAL_STATE_PRESSED))); - normal_.reset(new nux::CairoWrapper(geo, sigc::bind(sigc::mem_fun(this, &FilterBasicButton::RedrawTheme), nux::ButtonVisualState::VISUAL_STATE_NORMAL))); - focus_.reset(new nux::CairoWrapper(geo, sigc::mem_fun(this, &FilterBasicButton::RedrawFocusOverlay))); - } + prelight_.reset(new nux::CairoWrapper(geo, sigc::bind(sigc::mem_fun(this, &FilterBasicButton::RedrawTheme), nux::ButtonVisualState::VISUAL_STATE_PRELIGHT))); + active_.reset(new nux::CairoWrapper(geo, sigc::bind(sigc::mem_fun(this, &FilterBasicButton::RedrawTheme), nux::ButtonVisualState::VISUAL_STATE_PRESSED))); + normal_.reset(new nux::CairoWrapper(geo, sigc::bind(sigc::mem_fun(this, &FilterBasicButton::RedrawTheme), nux::ButtonVisualState::VISUAL_STATE_NORMAL))); + focus_.reset(new nux::CairoWrapper(geo, sigc::mem_fun(this, &FilterBasicButton::RedrawFocusOverlay))); + + double font_scaling = Settings::Instance().font_scaling() * scale; + SetMinimumWidth(MIN_BUTTON_WIDTH.CP(font_scaling)); + ApplyMinWidth(); - SetMinimumHeight(kMinButtonHeight); - SetMinimumWidth(kMinButtonWidth); + SetMinimumHeight(BUTTON_HEIGHT.CP(font_scaling)); + SetMaximumHeight(BUTTON_HEIGHT.CP(font_scaling)); } void FilterBasicButton::RedrawTheme(nux::Geometry const& geom, cairo_t* cr, nux::ButtonVisualState faked_state) { - Style::Instance().Button(cr, faked_state, label_, kFontSizePx, Alignment::CENTER, true); + cairo_surface_set_device_scale(cairo_get_target(cr), scale, scale); + Style::Instance().Button(cr, faked_state, label_, FONT_SIZE_PX, Alignment::CENTER, true); } void FilterBasicButton::RedrawFocusOverlay(nux::Geometry const& geom, cairo_t* cr) { + cairo_surface_set_device_scale(cairo_get_target(cr), scale, scale); Style::Instance().ButtonFocusOverlay(cr); } +void FilterBasicButton::UpdateScale(double scale) +{ + InitTheme(); + QueueDraw(); +} + long FilterBasicButton::ComputeContentSize() { long ret = nux::Button::ComputeContentSize(); diff -Nru unity-7.1.2+14.04.20140303/dash/FilterBasicButton.h unity-7.2.4+14.04.20141217/dash/FilterBasicButton.h --- unity-7.1.2+14.04.20140303/dash/FilterBasicButton.h 2014-03-03 16:47:14.000000000 +0000 +++ unity-7.2.4+14.04.20141217/dash/FilterBasicButton.h 2014-12-17 20:51:37.000000000 +0000 @@ -39,15 +39,15 @@ FilterBasicButton(std::string const& label, NUX_FILE_LINE_PROTO); FilterBasicButton(std::string const& label, nux::TextureArea* image, NUX_FILE_LINE_PROTO); FilterBasicButton(NUX_FILE_LINE_PROTO); - virtual ~FilterBasicButton(); - void SetClearBeforeDraw(bool clear_before_draw); + nux::Property scale; + protected: virtual long ComputeContentSize(); virtual void Draw(nux::GraphicsEngine& GfxContext, bool force_draw); - void Init(); void InitTheme(); + void SetClearBeforeDraw(bool clear_before_draw); void RedrawTheme(nux::Geometry const& geom, cairo_t* cr, nux::ButtonVisualState faked_state); void RedrawFocusOverlay(nux::Geometry const& geom, cairo_t* cr); @@ -61,6 +61,8 @@ nux::Geometry cached_geometry_; private: + void UpdateScale(double); + std::string label_; bool clear_before_draw_; }; diff -Nru unity-7.1.2+14.04.20140303/dash/FilterExpanderLabel.cpp unity-7.2.4+14.04.20141217/dash/FilterExpanderLabel.cpp --- unity-7.1.2+14.04.20140303/dash/FilterExpanderLabel.cpp 2014-03-03 16:47:14.000000000 +0000 +++ unity-7.2.4+14.04.20141217/dash/FilterExpanderLabel.cpp 2014-12-17 20:51:37.000000000 +0000 @@ -24,13 +24,18 @@ #include "unity-shared/GraphicsUtils.h" #include "FilterExpanderLabel.h" +namespace unity +{ +namespace dash +{ namespace { - +const double DEFAULT_SCALE = 1.0; const float EXPAND_DEFAULT_ICON_OPACITY = 1.0f; - -// expander_layout_ -const int EXPANDER_LAYOUT_SPACE_BETWEEN_CHILDREN = 8; +const RawPixel EXPANDER_LAYOUT_SPACE_BETWEEN_CHILDREN = 8_em; +const RawPixel ARROW_HORIZONTAL_PADDING = 2_em; +const RawPixel ARROW_TOP_PADDING = 11_em; +const RawPixel ARROW_BOTTOM_PADDING = 9_em; // font const char* const FONT_EXPANDER_LABEL = "Ubuntu 13"; // 17px = 13 @@ -71,15 +76,11 @@ } -namespace unity -{ -namespace dash -{ - NUX_IMPLEMENT_OBJECT_TYPE(FilterExpanderLabel); FilterExpanderLabel::FilterExpanderLabel(std::string const& label, NUX_FILE_LINE_DECL) : nux::View(NUX_FILE_LINE_PARAM) + , scale(DEFAULT_SCALE) , expanded(true) , layout_(nullptr) , top_bar_layout_(nullptr) @@ -87,18 +88,21 @@ , expander_layout_(nullptr) , right_hand_contents_(nullptr) , cairo_label_(nullptr) - , raw_label_(label) - , label_("label") { + scale.changed.connect(sigc::mem_fun(this, &FilterExpanderLabel::UpdateScale)); expanded.changed.connect(sigc::mem_fun(this, &FilterExpanderLabel::DoExpandChange)); BuildLayout(); } void FilterExpanderLabel::SetLabel(std::string const& label) { - raw_label_ = label; + cairo_label_->SetText(label); +} - cairo_label_->SetText(label.c_str()); +void FilterExpanderLabel::UpdateScale(double scale) +{ + cairo_label_->SetScale(scale); + UpdateLayoutSizes(); } void FilterExpanderLabel::SetRightHandView(nux::View* view) @@ -107,7 +111,7 @@ if (right_hand_contents_) { top_bar_layout_->RemoveChildObject(right_hand_contents_); - right_hand_contents_ = nullptr; + right_hand_contents_ = nullptr; } if (view) { @@ -130,40 +134,27 @@ void FilterExpanderLabel::BuildLayout() { - dash::Style& style = dash::Style::Instance(); - layout_ = new nux::VLayout(NUX_TRACKER_LOCATION); - layout_->SetLeftAndRightPadding(style.GetFilterBarLeftPadding(), style.GetFilterBarRightPadding()); - top_bar_layout_ = new nux::HLayout(NUX_TRACKER_LOCATION); - top_bar_layout_->SetTopAndBottomPadding(style.GetFilterHighlightPadding()); - expander_layout_ = new nux::HLayout(NUX_TRACKER_LOCATION); - expander_layout_->SetSpaceBetweenChildren(EXPANDER_LAYOUT_SPACE_BETWEEN_CHILDREN); expander_view_ = new ExpanderView(NUX_TRACKER_LOCATION); expander_view_->SetLayout(expander_layout_); top_bar_layout_->AddView(expander_view_, 1); - cairo_label_ = new StaticCairoText(label_.c_str(), NUX_TRACKER_LOCATION); + cairo_label_ = new StaticCairoText("", NUX_TRACKER_LOCATION); cairo_label_->SetFont(FONT_EXPANDER_LABEL); + cairo_label_->SetScale(scale); cairo_label_->SetTextColor(nux::color::White); cairo_label_->SetAcceptKeyboardEvent(false); - nux::BaseTexture* arrow; - arrow = dash::Style::Instance().GetGroupUnexpandIcon(); - expand_icon_ = new IconTexture(arrow, - arrow->GetWidth(), - arrow->GetHeight()); + expand_icon_ = new IconTexture(Style::Instance().GetGroupUnexpandIcon()); expand_icon_->SetOpacity(EXPAND_DEFAULT_ICON_OPACITY); - expand_icon_->SetMinimumSize(arrow->GetWidth(), arrow->GetHeight()); + expand_icon_->SetDrawMode(IconTexture::DrawMode::STRETCH_WITH_ASPECT); expand_icon_->SetVisible(true); + arrow_layout_ = new nux::VLayout(); - arrow_top_space_ = new nux::SpaceLayout(2, 2, 11, 11); - arrow_bottom_space_ = new nux::SpaceLayout(2, 2, 9, 9); - arrow_layout_->AddView(arrow_top_space_, 0, nux::MINOR_POSITION_CENTER); arrow_layout_->AddView(expand_icon_, 0, nux::MINOR_POSITION_CENTER); - arrow_layout_->AddView(arrow_bottom_space_, 0, nux::MINOR_POSITION_CENTER); expander_layout_->AddView(cairo_label_, 1, nux::MINOR_POSITION_CENTER, nux::MINOR_SIZE_FULL); expander_layout_->AddView(arrow_layout_, 0, nux::MINOR_POSITION_CENTER); @@ -196,8 +187,25 @@ cairo_label_->mouse_click.connect(mouse_expand); expand_icon_->mouse_click.connect(mouse_expand); + UpdateLayoutSizes(); +} + +void FilterExpanderLabel::UpdateLayoutSizes() +{ + auto& style = dash::Style::Instance(); + + layout_->SetLeftAndRightPadding(style.GetFilterBarLeftPadding().CP(scale), style.GetFilterBarRightPadding().CP(scale)); + top_bar_layout_->SetTopAndBottomPadding(style.GetFilterHighlightPadding().CP(scale)); + expander_layout_->SetSpaceBetweenChildren(EXPANDER_LAYOUT_SPACE_BETWEEN_CHILDREN.CP(scale)); + + auto const& tex = expand_icon_->texture(); + expand_icon_->SetMinMaxSize(RawPixel(tex->GetWidth()).CP(scale), RawPixel(tex->GetHeight()).CP(scale)); + + arrow_layout_->SetLeftAndRightPadding(ARROW_HORIZONTAL_PADDING.CP(scale)); + arrow_layout_->SetTopAndBottomPadding(ARROW_TOP_PADDING.CP(scale), ARROW_BOTTOM_PADDING.CP(scale)); + QueueRelayout(); - NeedRedraw(); + QueueDraw(); } void FilterExpanderLabel::DoExpandChange(bool change) @@ -208,6 +216,9 @@ else expand_icon_->SetTexture(style.GetGroupExpandIcon()); + auto const& tex = expand_icon_->texture(); + expand_icon_->SetMinMaxSize(RawPixel(tex->GetWidth()).CP(scale), RawPixel(tex->GetHeight()).CP(scale)); + if (change and contents_ and !contents_->IsChildOf(layout_)) { layout_->AddLayout(contents_.GetPointer(), 1, nux::MINOR_POSITION_START, nux::MINOR_SIZE_FULL, 100.0f, nux::LayoutPosition(1)); @@ -265,7 +276,7 @@ graphics::ClearGeometry(right_hand_contents_->GetGeometry()); if (expanded()) - ClearRedirectedRenderChildArea(); + ClearRedirectedRenderChildArea(); } if (focus_layer_ && ShouldBeHighlighted()) @@ -283,7 +294,7 @@ if (IsFullRedraw()) { - nux::GetPainter().PopPaintLayerStack(); + nux::GetPainter().PopPaintLayerStack(); } else if (pushed_paint_layers > 0) { diff -Nru unity-7.1.2+14.04.20140303/dash/FilterExpanderLabel.h unity-7.2.4+14.04.20141217/dash/FilterExpanderLabel.h --- unity-7.1.2+14.04.20140303/dash/FilterExpanderLabel.h 2014-03-03 16:47:14.000000000 +0000 +++ unity-7.2.4+14.04.20141217/dash/FilterExpanderLabel.h 2014-12-17 20:51:37.000000000 +0000 @@ -64,6 +64,7 @@ nux::View* expander_view() const { return expander_view_; } + nux::Property scale; nux::Property expanded; protected: @@ -79,20 +80,18 @@ private: void BuildLayout(); + void UpdateLayoutSizes(); void DoExpandChange(bool change); bool ShouldBeHighlighted(); + void UpdateScale(double scale); - nux::LinearLayout* layout_; + nux::VLayout* layout_; nux::LinearLayout* top_bar_layout_; nux::View* expander_view_; nux::LinearLayout* expander_layout_; nux::View* right_hand_contents_; StaticCairoText* cairo_label_; - std::string raw_label_; - std::string label_; nux::VLayout* arrow_layout_; - nux::SpaceLayout* arrow_top_space_; - nux::SpaceLayout* arrow_bottom_space_; IconTexture* expand_icon_; nux::ObjectPtr contents_; diff -Nru unity-7.1.2+14.04.20140303/dash/FilterGenreWidget.cpp unity-7.2.4+14.04.20141217/dash/FilterGenreWidget.cpp --- unity-7.1.2+14.04.20140303/dash/FilterGenreWidget.cpp 2014-03-03 16:47:14.000000000 +0000 +++ unity-7.2.4+14.04.20141217/dash/FilterGenreWidget.cpp 2014-12-17 20:51:37.000000000 +0000 @@ -35,6 +35,11 @@ { namespace dash { +namespace +{ +const RawPixel CHILDREN_SPACE = 12_em; +const RawPixel CHILDREN_SPACE_SMALLER = 10_em; +} NUX_IMPLEMENT_OBJECT_TYPE(FilterGenre); @@ -42,33 +47,41 @@ : FilterExpanderLabel(_("Categories"), NUX_FILE_LINE_PARAM) , all_button_(nullptr) { - dash::Style& style = dash::Style::Instance(); - InitTheme(); - genre_layout_ = new nux::GridHLayout(NUX_TRACKER_LOCATION); genre_layout_->ForceChildrenSize(true); genre_layout_->MatchContentSize(true); - genre_layout_->SetTopAndBottomPadding(style.GetSpaceBetweenFilterWidgets() - style.GetFilterHighlightPadding(), style.GetFilterHighlightPadding()); genre_layout_->EnablePartialVisibility(false); + UpdateSize(columns); + SetContents(genre_layout_); + + scale.changed.connect([this, columns] (double scale) { + if (all_button_) all_button_->scale = scale; + + for (auto* button : buttons_) + button->scale = scale; + + UpdateSize(columns); + }); +} + +void FilterGenre::UpdateSize(int columns) +{ + auto& style = dash::Style::Instance(); + genre_layout_->SetTopAndBottomPadding(style.GetSpaceBetweenFilterWidgets().CP(scale) - style.GetFilterHighlightPadding().CP(scale), style.GetFilterHighlightPadding().CP(scale)); + if (columns == 3) { - genre_layout_->SetChildrenSize((style.GetFilterBarWidth() - 12 * 2) / 3, style.GetFilterButtonHeight()); - genre_layout_->SetSpaceBetweenChildren (12, 12); + genre_layout_->SetChildrenSize((style.GetFilterBarWidth().CP(scale) - CHILDREN_SPACE.CP(scale) * 2) / 3, style.GetFilterButtonHeight().CP(scale)); + genre_layout_->SetSpaceBetweenChildren(CHILDREN_SPACE.CP(scale), CHILDREN_SPACE.CP(scale)); } else { - genre_layout_->SetChildrenSize((style.GetFilterBarWidth() - 10 ) / 2, style.GetFilterButtonHeight()); - genre_layout_->SetSpaceBetweenChildren (10, 12); + genre_layout_->SetChildrenSize((style.GetFilterBarWidth().CP(scale) - CHILDREN_SPACE_SMALLER.CP(scale)) / 2, style.GetFilterButtonHeight().CP(scale)); + genre_layout_->SetSpaceBetweenChildren(CHILDREN_SPACE_SMALLER.CP(scale), CHILDREN_SPACE.CP(scale)); } - - SetContents(genre_layout_); -} - -FilterGenre::~FilterGenre() -{ } void FilterGenre::SetFilter(Filter::Ptr const& filter) @@ -81,11 +94,14 @@ all_button_ = show_all_button ? new FilterAllButton(NUX_TRACKER_LOCATION) : nullptr; SetRightHandView(all_button_); if (all_button_) + { + all_button_->scale = scale(); all_button_->SetFilter(filter_); + } }; show_button_func(filter_->show_all_button); filter_->show_all_button.changed.connect(show_button_func); - + expanded = !filter_->collapsed(); filter_->option_added.connect(sigc::mem_fun(this, &FilterGenre::OnOptionAdded)); @@ -106,6 +122,7 @@ std::string label(escape.Value()); FilterGenreButton* button = new FilterGenreButton(label, NUX_TRACKER_LOCATION); + button->scale = scale(); button->SetFilter(new_filter); genre_layout_->AddView(button, 0, nux::MINOR_POSITION_CENTER, nux::MINOR_SIZE_FULL); buttons_.push_back(button); @@ -121,7 +138,7 @@ { genre_layout_->RemoveChildObject(*it); buttons_.erase(it); - + QueueRelayout(); break; } diff -Nru unity-7.1.2+14.04.20140303/dash/FilterGenreWidget.h unity-7.2.4+14.04.20141217/dash/FilterGenreWidget.h --- unity-7.1.2+14.04.20140303/dash/FilterGenreWidget.h 2014-03-03 16:47:14.000000000 +0000 +++ unity-7.2.4+14.04.20141217/dash/FilterGenreWidget.h 2014-12-17 20:51:37.000000000 +0000 @@ -46,7 +46,6 @@ NUX_DECLARE_OBJECT_TYPE(FilterGenre, FilterExpanderLabel); public: FilterGenre(int columns, NUX_FILE_LINE_PROTO); - virtual ~FilterGenre(); void SetFilter(Filter::Ptr const& filter); std::string GetFilterType(); @@ -59,6 +58,7 @@ private: void OnOptionAdded(FilterOption::Ptr const& new_filter); void OnOptionRemoved(FilterOption::Ptr const& removed_filter); + void UpdateSize(int columns); nux::GridHLayout* genre_layout_; FilterAllButton* all_button_; diff -Nru unity-7.1.2+14.04.20140303/dash/FilterMultiRangeButton.cpp unity-7.2.4+14.04.20141217/dash/FilterMultiRangeButton.cpp --- unity-7.1.2+14.04.20140303/dash/FilterMultiRangeButton.cpp 2014-03-03 16:47:14.000000000 +0000 +++ unity-7.2.4+14.04.20141217/dash/FilterMultiRangeButton.cpp 2014-12-17 20:51:37.000000000 +0000 @@ -33,29 +33,18 @@ namespace { -const int kFontSizePx = 10; - -const int kLayoutPadLeftRight = 4; -const int kLayoutPadtopBottom = 2; +const int FONT_SIZE_PX = 10; } NUX_IMPLEMENT_OBJECT_TYPE(FilterMultiRangeButton); FilterMultiRangeButton::FilterMultiRangeButton(NUX_FILE_LINE_DECL) : nux::ToggleButton(NUX_FILE_LINE_PARAM) + , scale(1.0) , theme_init_(false) , has_arrow_(MultiRangeArrow::NONE) , side_(MultiRangeSide::CENTER) { - Init(); -} - -FilterMultiRangeButton::~FilterMultiRangeButton() -{ -} - -void FilterMultiRangeButton::Init() -{ InitTheme(); // Controlled by parent widget SetAcceptKeyNavFocusOnMouseDown(false); @@ -64,6 +53,8 @@ state_change.connect(sigc::mem_fun(this, &FilterMultiRangeButton::OnActivated)); key_nav_focus_change.connect([this](nux::Area*, bool, nux::KeyNavDirection) { QueueDraw(); }); key_nav_focus_activate.connect([this](nux::Area* area) { Active() ? Deactivate() : Activate(); }); + + scale.changed.connect(sigc::hide(sigc::mem_fun(this, &FilterMultiRangeButton::InitTheme))); } void FilterMultiRangeButton::OnActivated(nux::Area* area) @@ -133,27 +124,26 @@ void FilterMultiRangeButton::InitTheme() { - if (!active_[MapKey(MultiRangeArrow::LEFT, MultiRangeSide::LEFT)]) - { - nux::Geometry const& geo = GetGeometry(); + nux::Geometry const& geo = GetGeometry(); - std::vector sides = {MultiRangeSide::LEFT, MultiRangeSide::RIGHT, MultiRangeSide::CENTER}; - std::vector arrows = {MultiRangeArrow::LEFT, MultiRangeArrow::RIGHT, MultiRangeArrow::BOTH, MultiRangeArrow::NONE}; + std::vector sides = {MultiRangeSide::LEFT, MultiRangeSide::RIGHT, MultiRangeSide::CENTER}; + std::vector arrows = {MultiRangeArrow::LEFT, MultiRangeArrow::RIGHT, MultiRangeArrow::BOTH, MultiRangeArrow::NONE}; - for (auto arrow : arrows) + for (auto arrow : arrows) + { + for (auto side : sides) { - for (auto side : sides) - { - active_[MapKey(arrow, side)].reset(new nux::CairoWrapper(geo, sigc::bind(sigc::mem_fun(this, &FilterMultiRangeButton::RedrawTheme), nux::ButtonVisualState::VISUAL_STATE_PRESSED, arrow, side))); - normal_[MapKey(arrow, side)].reset(new nux::CairoWrapper(geo, sigc::bind(sigc::mem_fun(this, &FilterMultiRangeButton::RedrawTheme), nux::ButtonVisualState::VISUAL_STATE_NORMAL, arrow, side))); - prelight_[MapKey(arrow, side)].reset(new nux::CairoWrapper(geo, sigc::bind(sigc::mem_fun(this, &FilterMultiRangeButton::RedrawTheme), nux::ButtonVisualState::VISUAL_STATE_PRELIGHT, arrow, side))); - focus_[MapKey(arrow, side)].reset(new nux::CairoWrapper(geo, sigc::bind(sigc::mem_fun(this, &FilterMultiRangeButton::RedrawFocusOverlay), arrow, side))); - } + active_[MapKey(arrow, side)].reset(new nux::CairoWrapper(geo, sigc::bind(sigc::mem_fun(this, &FilterMultiRangeButton::RedrawTheme), nux::ButtonVisualState::VISUAL_STATE_PRESSED, arrow, side))); + normal_[MapKey(arrow, side)].reset(new nux::CairoWrapper(geo, sigc::bind(sigc::mem_fun(this, &FilterMultiRangeButton::RedrawTheme), nux::ButtonVisualState::VISUAL_STATE_NORMAL, arrow, side))); + prelight_[MapKey(arrow, side)].reset(new nux::CairoWrapper(geo, sigc::bind(sigc::mem_fun(this, &FilterMultiRangeButton::RedrawTheme), nux::ButtonVisualState::VISUAL_STATE_PRELIGHT, arrow, side))); + focus_[MapKey(arrow, side)].reset(new nux::CairoWrapper(geo, sigc::bind(sigc::mem_fun(this, &FilterMultiRangeButton::RedrawFocusOverlay), arrow, side))); } } - SetMinimumHeight(dash::Style::Instance().GetFilterButtonHeight() + 3); + SetMinimumHeight(Style::Instance().GetFilterButtonHeight().CP(scale) + (3_em).CP(scale)); theme_init_ = true; + + QueueDraw(); } void FilterMultiRangeButton::RedrawTheme(nux::Geometry const& geom, @@ -187,8 +177,9 @@ else segment = Segment::RIGHT; - Style::Instance().MultiRangeSegment(cr, faked_state, name, kFontSizePx, arrow, segment); - NeedRedraw(); + cairo_surface_set_device_scale(cairo_get_target(cr), scale, scale); + Style::Instance().MultiRangeSegment(cr, faked_state, name, FONT_SIZE_PX, arrow, segment); + QueueDraw(); } void FilterMultiRangeButton::RedrawFocusOverlay(nux::Geometry const& geom, @@ -214,6 +205,7 @@ else segment = Segment::RIGHT; + cairo_surface_set_device_scale(cairo_get_target(cr), scale, scale); Style::Instance().MultiRangeFocusOverlay(cr, arrow, segment); QueueDraw(); } diff -Nru unity-7.1.2+14.04.20140303/dash/FilterMultiRangeButton.h unity-7.2.4+14.04.20141217/dash/FilterMultiRangeButton.h --- unity-7.1.2+14.04.20140303/dash/FilterMultiRangeButton.h 2014-03-03 16:47:14.000000000 +0000 +++ unity-7.2.4+14.04.20141217/dash/FilterMultiRangeButton.h 2014-12-17 20:51:37.000000000 +0000 @@ -54,8 +54,9 @@ { NUX_DECLARE_OBJECT_TYPE(FilterMultiRangeButton, nux::ToggleButton); public: - FilterMultiRangeButton (NUX_FILE_LINE_PROTO); - virtual ~FilterMultiRangeButton(); + FilterMultiRangeButton(NUX_FILE_LINE_PROTO); + + nux::Property scale; void SetFilter(FilterOption::Ptr const& filter); FilterOption::Ptr GetFilter(); @@ -69,7 +70,6 @@ private: void InitTheme(); - void Init(); void RedrawTheme(nux::Geometry const& geom, cairo_t* cr, diff -Nru unity-7.1.2+14.04.20140303/dash/FilterMultiRangeWidget.cpp unity-7.2.4+14.04.20141217/dash/FilterMultiRangeWidget.cpp --- unity-7.1.2+14.04.20140303/dash/FilterMultiRangeWidget.cpp 2014-03-03 16:47:14.000000000 +0000 +++ unity-7.2.4+14.04.20141217/dash/FilterMultiRangeWidget.cpp 2014-12-17 20:51:37.000000000 +0000 @@ -64,6 +64,13 @@ mouse_up.connect(sigc::mem_fun(this, &FilterMultiRangeWidget::RecvMouseUp)); mouse_drag.connect(sigc::mem_fun(this, &FilterMultiRangeWidget::RecvMouseDrag)); + + scale.changed.connect([this] (double scale) { + if (all_button_) all_button_->scale = scale; + + for (auto const& button : buttons_) + button->scale = scale; + }); } void FilterMultiRangeWidget::SetFilter(Filter::Ptr const& filter) @@ -83,11 +90,14 @@ all_button_ = show_all_button ? new FilterAllButton(NUX_TRACKER_LOCATION) : nullptr; SetRightHandView(all_button_); if (all_button_) + { + all_button_->scale = scale(); all_button_->SetFilter(filter_); + } }; show_button_func(filter_->show_all_button); filter_->show_all_button.changed.connect(show_button_func); - + expanded = !filter_->collapsed(); filter_->option_added.connect(sigc::mem_fun(this, &FilterMultiRangeWidget::OnOptionAdded)); @@ -151,6 +161,7 @@ void FilterMultiRangeWidget::OnOptionAdded(FilterOption::Ptr const& new_filter) { FilterMultiRangeButtonPtr button(new FilterMultiRangeButton(NUX_TRACKER_LOCATION)); + button->scale = scale(); button->SetFilter(new_filter); layout_->AddView(button.GetPointer()); buttons_.push_back(button); diff -Nru unity-7.1.2+14.04.20140303/dash/FilterRatingsButton.cpp unity-7.2.4+14.04.20141217/dash/FilterRatingsButton.cpp --- unity-7.1.2+14.04.20140303/dash/FilterRatingsButton.cpp 2014-03-03 16:47:14.000000000 +0000 +++ unity-7.2.4+14.04.20141217/dash/FilterRatingsButton.cpp 2014-12-17 20:51:37.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright 2011 Canonical Ltd. + * Copyright 2014 Canonical Ltd. * * This program is free software: you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License version 3, as @@ -15,255 +15,62 @@ * License version 3 along with this program. If not, see * * - * Authored by: Gordon Allott + * Authored by: Marco Trevisan * */ -#include - -#include -#include - -#include "unity-shared/DashStyle.h" #include "FilterRatingsButton.h" namespace { -const int star_size = 28; -const int star_gap = 10; -const int num_stars = 5; +const int STAR_SIZE = 28; +const int STAR_GAP = 10; } namespace unity { namespace dash { - + NUX_IMPLEMENT_OBJECT_TYPE(FilterRatingsButton); FilterRatingsButton::FilterRatingsButton(NUX_FILE_LINE_DECL) - : nux::ToggleButton(NUX_FILE_LINE_PARAM) - , focused_star_(-1) -{ - SetAcceptKeyNavFocusOnMouseDown(false); - SetAcceptKeyNavFocusOnMouseEnter(true); - - mouse_up.connect(sigc::mem_fun(this, &FilterRatingsButton::RecvMouseUp)); - mouse_move.connect(sigc::mem_fun(this, &FilterRatingsButton::RecvMouseMove)); - mouse_drag.connect(sigc::mem_fun(this, &FilterRatingsButton::RecvMouseDrag)); - - key_nav_focus_change.connect([this](nux::Area* area, bool has_focus, nux::KeyNavDirection direction) - { - if (has_focus) - focused_star_ = 0; - else if (!has_focus) - focused_star_ = -1; - - QueueDraw(); - }); - - key_nav_focus_activate.connect([this](nux::Area*) { filter_->rating = static_cast(focused_star_+1)/num_stars; }); - key_down.connect(sigc::mem_fun(this, &FilterRatingsButton::OnKeyDown)); -} - -FilterRatingsButton::~FilterRatingsButton() -{ -} + : RatingsButton(STAR_SIZE, STAR_GAP, NUX_FILE_LINE_PARAM) +{} void FilterRatingsButton::SetFilter(Filter::Ptr const& filter) { filter_ = std::static_pointer_cast(filter); - filter_->rating.changed.connect(sigc::mem_fun(this, &FilterRatingsButton::OnRatingsChanged)); - NeedRedraw(); -} - -std::string FilterRatingsButton::GetFilterType() -{ - return "FilterRatingsButton"; -} - -void FilterRatingsButton::Draw(nux::GraphicsEngine& GfxContext, bool force_draw) -{ - int rating = 0; - if (filter_ && filter_->filtering) - rating = static_cast(filter_->rating * num_stars); - // FIXME: 9/26/2011 - // We should probably support an API for saying whether the ratings - // should or shouldn't support half stars...but our only consumer at - // the moment is the applications scope which according to design - // (Bug #839759) shouldn't. So for now just force rounding. - // int total_half_stars = rating % 2; - // int total_full_stars = rating / 2; - int total_full_stars = rating; - - nux::Geometry const& geo = GetGeometry(); - nux::Geometry geo_star(geo); - geo_star.width = star_size; - - gPainter.PaintBackground(GfxContext, geo); - // set up our texture mode - nux::TexCoordXForm texxform; - texxform.SetWrap(nux::TEXWRAP_REPEAT, nux::TEXWRAP_REPEAT); - texxform.SetTexCoordType(nux::TexCoordXForm::OFFSET_COORD); - - // clear what is behind us - unsigned int alpha = 0, src = 0, dest = 0; - - GfxContext.GetRenderStates().GetBlend(alpha, src, dest); - GfxContext.GetRenderStates().SetBlend(true, GL_ONE, GL_ONE_MINUS_SRC_ALPHA); - - nux::Color col = nux::color::Black; - col.alpha = 0; - GfxContext.QRP_Color(geo.x, - geo.y, - geo.width, - geo.height, - col); - - for (int index = 0; index < num_stars; ++index) - { - Style& style = Style::Instance(); - nux::BaseTexture* texture = style.GetStarSelectedIcon(); - if (index < total_full_stars) - { - if (GetVisualState() == nux::ButtonVisualState::VISUAL_STATE_NORMAL) - texture = style.GetStarSelectedIcon(); - else if (GetVisualState() == nux::ButtonVisualState::VISUAL_STATE_PRELIGHT) - texture = style.GetStarSelectedIcon(); - else if (GetVisualState() == nux::ButtonVisualState::VISUAL_STATE_PRESSED) - texture = style.GetStarSelectedIcon(); - } - else - { - if (GetVisualState() == nux::ButtonVisualState::VISUAL_STATE_NORMAL) - texture = style.GetStarDeselectedIcon(); - else if (GetVisualState() == nux::ButtonVisualState::VISUAL_STATE_PRELIGHT) - texture = style.GetStarDeselectedIcon(); - else if (GetVisualState() == nux::ButtonVisualState::VISUAL_STATE_PRESSED) - texture = style.GetStarDeselectedIcon(); - } - - GfxContext.QRP_1Tex(geo_star.x, - geo_star.y, - geo_star.width, - geo_star.height, - texture->GetDeviceTexture(), - texxform, - nux::Color(1.0f, 1.0f, 1.0f, 1.0f)); - - if (focused_star_ == index) - { - GfxContext.QRP_1Tex(geo_star.x, - geo_star.y, - geo_star.width, - geo_star.height, - style.GetStarHighlightIcon()->GetDeviceTexture(), - texxform, - nux::Color(1.0f, 1.0f, 1.0f, 0.5f)); - } - - geo_star.x += geo_star.width + star_gap; - - } - - GfxContext.GetRenderStates().SetBlend(alpha, src, dest); - -} - -static void _UpdateRatingToMouse(RatingsFilter::Ptr filter, int x) -{ - int width = 180; - float new_rating = (static_cast(x) / width); - - // FIXME: change to * 2 once we decide to support also half-stars - new_rating = ceil((num_stars * 1) * new_rating) / (num_stars * 1); - new_rating = (new_rating > 1) ? 1 : ((new_rating < 0) ? 0 : new_rating); - - if (filter) - filter->rating = new_rating; -} - -void FilterRatingsButton::RecvMouseUp(int x, int y, unsigned long button_flags, unsigned long key_flags) -{ - _UpdateRatingToMouse(filter_, x); -} - -void FilterRatingsButton::RecvMouseDrag(int x, int y, int dx, int dy, - unsigned long button_flags, - unsigned long key_flags) -{ - _UpdateRatingToMouse(filter_, x); + filter_->rating.changed.connect(sigc::mem_fun(this, &FilterRatingsButton::SetRating)); + QueueDraw(); } -void FilterRatingsButton::OnRatingsChanged(int rating) +RatingsFilter::Ptr FilterRatingsButton::GetFilter() const { - NeedRedraw(); + return filter_; } -void FilterRatingsButton::RecvMouseMove(int x, int y, int dx, int dy, - unsigned long button_flags, - unsigned long key_flags) +std::string FilterRatingsButton::GetFilterType() { - int width = 180; - focused_star_ = std::max(0, std::min(static_cast(ceil((static_cast(x) / width) * num_stars) - 1), num_stars - 1)); - - if (!HasKeyFocus()) - nux::GetWindowCompositor().SetKeyFocusArea(this); - - QueueDraw(); + return "FilterRatingsButton"; } - -bool FilterRatingsButton::InspectKeyEvent(unsigned int eventType, unsigned int keysym, const char* character) +std::string FilterRatingsButton::GetName() const { - nux::KeyNavDirection direction = nux::KEY_NAV_NONE; - - switch (keysym) - { - case NUX_VK_LEFT: - direction = nux::KeyNavDirection::KEY_NAV_LEFT; - break; - case NUX_VK_RIGHT: - direction = nux::KeyNavDirection::KEY_NAV_RIGHT; - break; - default: - direction = nux::KeyNavDirection::KEY_NAV_NONE; - break; - } - - if (direction == nux::KeyNavDirection::KEY_NAV_NONE) - return false; - else if (direction == nux::KEY_NAV_LEFT && (focused_star_ <= 0)) - return false; - else if (direction == nux::KEY_NAV_RIGHT && (focused_star_ >= num_stars - 1)) - return false; - else - return true; + return "FilterRatingsButton"; } - -void FilterRatingsButton::OnKeyDown(unsigned long event_type, unsigned long event_keysym, - unsigned long event_state, const TCHAR* character, - unsigned short key_repeat_count) +void FilterRatingsButton::SetRating(float rating) { - switch (event_keysym) - { - case NUX_VK_LEFT: - --focused_star_; - break; - case NUX_VK_RIGHT: - ++focused_star_; - break; - default: - return; - } + if (filter_) + filter_->rating = rating; QueueDraw(); } -bool FilterRatingsButton::AcceptKeyNavFocus() +float FilterRatingsButton::GetRating() const { - return true; + return (filter_ && filter_->filtering) ? filter_->rating : 0; } } // namespace dash diff -Nru unity-7.1.2+14.04.20140303/dash/FilterRatingsButton.h unity-7.2.4+14.04.20141217/dash/FilterRatingsButton.h --- unity-7.1.2+14.04.20140303/dash/FilterRatingsButton.h 2014-03-03 16:47:14.000000000 +0000 +++ unity-7.2.4+14.04.20141217/dash/FilterRatingsButton.h 2014-12-17 20:51:37.000000000 +0000 @@ -25,46 +25,33 @@ #include #include -#include -#include #include +#include "unity-shared/RatingsButton.h" namespace unity { namespace dash { -class FilterRatingsButton : public nux::ToggleButton +class FilterRatingsButton : public RatingsButton { - NUX_DECLARE_OBJECT_TYPE(FilterRatingsButton, nux::ToggleButton); + NUX_DECLARE_OBJECT_TYPE(FilterRatingsButton, RatingsButton); public: FilterRatingsButton(NUX_FILE_LINE_PROTO); - virtual ~FilterRatingsButton(); void SetFilter(Filter::Ptr const& filter); - RatingsFilter::Ptr GetFilter(); + RatingsFilter::Ptr GetFilter() const; std::string GetFilterType(); protected: - virtual void Draw(nux::GraphicsEngine& GfxContext, bool force_draw); + // Introspectable methods + std::string GetName() const; - // Key-nav - virtual bool AcceptKeyNavFocus(); - virtual bool InspectKeyEvent(unsigned int eventType, unsigned int keysym, const char* character); + void SetRating(float rating) override; + float GetRating() const override; private: - void OnKeyDown(unsigned long event_type, unsigned long event_keysym, - unsigned long event_state, const TCHAR* character, - unsigned short key_repeat_count); - - void RecvMouseUp(int x, int y, unsigned long button_flags, unsigned long key_flags); - void RecvMouseDrag(int x, int y, int dx, int dy, unsigned long button_flags, unsigned long key_flags); - void RecvMouseMove(int x, int y, int dx, int dy, unsigned long button_flags, unsigned long key_flags); - void OnRatingsChanged(int rating); - dash::RatingsFilter::Ptr filter_; - int focused_star_; - }; } // namespace dash diff -Nru unity-7.1.2+14.04.20140303/dash/FilterRatingsWidget.cpp unity-7.2.4+14.04.20141217/dash/FilterRatingsWidget.cpp --- unity-7.1.2+14.04.20140303/dash/FilterRatingsWidget.cpp 2014-03-03 16:47:14.000000000 +0000 +++ unity-7.2.4+14.04.20141217/dash/FilterRatingsWidget.cpp 2014-12-17 20:51:37.000000000 +0000 @@ -33,15 +33,14 @@ #include "FilterRatingsButton.h" #include "FilterRatingsWidget.h" -namespace -{ -const int star_size = 28; -} - namespace unity { namespace dash { +namespace +{ +const RawPixel STAR_SIZE = 28_em; +} NUX_IMPLEMENT_OBJECT_TYPE(FilterRatingsWidget); @@ -49,22 +48,30 @@ : FilterExpanderLabel(_("Rating"), NUX_FILE_LINE_PARAM) , all_button_(nullptr) { - dash::Style& style = dash::Style::Instance(); - const int top_padding = style.GetSpaceBetweenFilterWidgets() - style.GetFilterHighlightPadding() - 1; // -1 (PNGs have an 1px top padding) - const int bottom_padding = style.GetFilterHighlightPadding(); - nux::VLayout* layout = new nux::VLayout(NUX_TRACKER_LOCATION); - layout->SetTopAndBottomPadding(top_padding, bottom_padding); ratings_ = new FilterRatingsButton(NUX_TRACKER_LOCATION); - ratings_->SetMinimumHeight(star_size); layout->AddView(ratings_); + UpdateSize(); SetContents(layout); + + scale.changed.connect([this] (double scale) { + if (all_button_) all_button_->scale = scale; + UpdateSize(); + }); } -FilterRatingsWidget::~FilterRatingsWidget() +void FilterRatingsWidget::UpdateSize() { + dash::Style& style = dash::Style::Instance(); + int top_padding = style.GetSpaceBetweenFilterWidgets().CP(scale) - style.GetFilterHighlightPadding().CP(scale) - (1_em).CP(scale); // -1 (PNGs have an 1px top padding) + int bottom_padding = style.GetFilterHighlightPadding().CP(scale); + static_cast(GetLayout())->SetTopAndBottomPadding(top_padding, bottom_padding); + + ratings_->scale = scale(); + ratings_->SetMinimumHeight(STAR_SIZE.CP(scale)); + ratings_->ApplyMinHeight(); } void FilterRatingsWidget::SetFilter(Filter::Ptr const& filter) @@ -77,7 +84,10 @@ all_button_ = show_all_button ? new FilterAllButton(NUX_TRACKER_LOCATION) : nullptr; SetRightHandView(all_button_); if (all_button_) + { + all_button_->scale = scale(); all_button_->SetFilter(filter_); + } }; show_button_func(filter_->show_all_button); filter_->show_all_button.changed.connect(show_button_func); diff -Nru unity-7.1.2+14.04.20140303/dash/FilterRatingsWidget.h unity-7.2.4+14.04.20141217/dash/FilterRatingsWidget.h --- unity-7.1.2+14.04.20140303/dash/FilterRatingsWidget.h 2014-03-03 16:47:14.000000000 +0000 +++ unity-7.2.4+14.04.20141217/dash/FilterRatingsWidget.h 2014-12-17 20:51:37.000000000 +0000 @@ -45,7 +45,6 @@ NUX_DECLARE_OBJECT_TYPE(FilterRatingsWidget, FilterExpanderLabel); public: FilterRatingsWidget(NUX_FILE_LINE_PROTO); - virtual ~FilterRatingsWidget(); void SetFilter(Filter::Ptr const& filter); std::string GetFilterType(); @@ -54,6 +53,8 @@ void ClearRedirectedRenderChildArea(); private: + void UpdateSize(); + FilterAllButton* all_button_; FilterRatingsButton* ratings_; RatingsFilter::Ptr filter_; diff -Nru unity-7.1.2+14.04.20140303/dash/PlacesGroup.cpp unity-7.2.4+14.04.20141217/dash/PlacesGroup.cpp --- unity-7.1.2+14.04.20140303/dash/PlacesGroup.cpp 2014-03-03 16:47:14.000000000 +0000 +++ unity-7.2.4+14.04.20141217/dash/PlacesGroup.cpp 2014-12-17 20:51:37.000000000 +0000 @@ -54,12 +54,16 @@ const float kExpandDefaultIconOpacity = 0.5f; // Category highlight -const int kHighlightHeight = 24; -const int kHighlightRightPadding = 10 - 3; // -3 because the scrollbar is not a real overlay scrollbar! -const int kHighlightLeftPadding = 10; +const RawPixel kHighlightRightPadding = 7_em; // FIXME 10 - 3 because the scrollbar is not a real overlay scrollbar! +const RawPixel kHighlightHeight = 24_em; +const RawPixel kHighlightLeftPadding = 10_em; +const RawPixel SPACE_BETWEEN_CHILDREN = 10_em; +const RawPixel TEXT_INTERNAL_MARGIN = 15_em; +const RawPixel EXPAND_INTERNAL_MARGIN = 8_em; +const double DEFAULT_SCALE = 1.0; // Font -const char* const NAME_LABEL_FONT = "Ubuntu 13"; // 17px = 13 +const char* const NAME_LABEL_FONT = "Ubuntu 13"; // 17px = 13 const char* const EXPANDER_LABEL_FONT = "Ubuntu 10"; // 13px = 10 } @@ -112,6 +116,7 @@ PlacesGroup::PlacesGroup(dash::StyleInterface& style) : nux::View(NUX_TRACKER_LOCATION), + scale(DEFAULT_SCALE), _style(style), _child_layout(nullptr), _child_view(nullptr), @@ -121,15 +126,14 @@ _n_visible_items_in_unexpand_mode(0), _n_total_items(0), _coverflow_enabled(false), - disabled_header_count_(false) + _disabled_header_count(false) { SetAcceptKeyNavFocusOnMouseDown(false); SetAcceptKeyNavFocusOnMouseEnter(false); + scale.changed.connect(sigc::mem_fun(this, &PlacesGroup::UpdateScale)); - nux::BaseTexture* arrow = _style.GetGroupExpandIcon(); - - _background = _style.GetCategoryBackground(); - _background_nofilters = _style.GetCategoryBackgroundNoFilters(); + _background = _style.GetCategoryBackground().GetPointer(); + _background_nofilters = _style.GetCategoryBackgroundNoFilters().GetPointer(); nux::ROPConfig rop; rop.Blend = true; @@ -137,41 +141,39 @@ rop.DstBlend = GL_ONE_MINUS_SRC_ALPHA; nux::TexCoordXForm texxform; - _background_layer.reset(new nux::TextureLayer(_background_nofilters->GetDeviceTexture(), - texxform, + _background_layer.reset(new nux::TextureLayer(_background_nofilters->GetDeviceTexture(), + texxform, nux::color::White, false, rop)); _group_layout = new nux::VLayout("", NUX_TRACKER_LOCATION); - int top_space = style.GetPlacesGroupTopSpace(); - _group_layout->AddLayout(new nux::SpaceLayout(top_space, top_space, top_space, top_space), 0); + // Spacelayout size is updated in UpdatePlacesGroupSize + _space_layout = new nux::SpaceLayout(0, 0, 0, 0); + _group_layout->AddLayout(_space_layout, 0); _header_view = new HeaderView(NUX_TRACKER_LOCATION); _group_layout->AddView(_header_view, 0, nux::MINOR_POSITION_START, nux::MINOR_SIZE_FULL); _header_layout = new nux::HLayout(NUX_TRACKER_LOCATION); - _header_layout->SetLeftAndRightPadding(_style.GetCategoryHeaderLeftPadding(), 0); - _header_layout->SetSpaceBetweenChildren(10); + _header_layout->SetLeftAndRightPadding(_style.GetCategoryHeaderLeftPadding().CP(scale), 0); _header_view->SetLayout(_header_layout); - _icon = new IconTexture("", _style.GetCategoryIconSize()); - _icon->SetMinMaxSize(_style.GetCategoryIconSize(), _style.GetCategoryIconSize()); + _icon = new IconTexture("", _style.GetCategoryIconSize().CP(scale)); _header_layout->AddView(_icon, 0, nux::MINOR_POSITION_CENTER, nux::MINOR_SIZE_FIX); _text_layout = new nux::HLayout(NUX_TRACKER_LOCATION); - _text_layout->SetHorizontalInternalMargin(15); _header_layout->AddLayout(_text_layout, 0, nux::MINOR_POSITION_CENTER, nux::MINOR_SIZE_MATCHCONTENT); _name = new StaticCairoText("", NUX_TRACKER_LOCATION); _name->SetFont(NAME_LABEL_FONT); + _name->SetLines(-1); _name->SetTextEllipsize(StaticCairoText::NUX_ELLIPSIZE_END); _name->SetTextAlignment(StaticCairoText::NUX_ALIGN_LEFT); _text_layout->AddView(_name, 0, nux::MINOR_POSITION_CENTER, nux::MINOR_SIZE_MATCHCONTENT); _expand_layout = new nux::HLayout(NUX_TRACKER_LOCATION); - _expand_layout->SetHorizontalInternalMargin(8); _text_layout->AddLayout(_expand_layout, 0, nux::MINOR_POSITION_END, nux::MINOR_SIZE_MATCHCONTENT); _expand_label_layout = new nux::HLayout(NUX_TRACKER_LOCATION); @@ -179,16 +181,17 @@ _expand_label = new StaticCairoText("", NUX_TRACKER_LOCATION); _expand_label->SetFont(EXPANDER_LABEL_FONT); + _expand_label->SetLines(-1); _expand_label->SetTextEllipsize(StaticCairoText::NUX_ELLIPSIZE_END); _expand_label->SetTextAlignment(StaticCairoText::NUX_ALIGN_LEFT); _expand_label->SetTextColor(kExpandDefaultTextColor); _expand_label_layout->AddView(_expand_label, 0, nux::MINOR_POSITION_CENTER, nux::MINOR_SIZE_FIX); - _expand_icon = new IconTexture(arrow, arrow->GetWidth(), arrow->GetHeight()); + _expand_icon = new IconTexture(_style.GetGroupExpandIcon()); + _expand_icon->SetDrawMode(IconTexture::DrawMode::STRETCH_WITH_ASPECT); _expand_icon->SetOpacity(kExpandDefaultIconOpacity); - _expand_icon->SetMinimumSize(arrow->GetWidth(), arrow->GetHeight()); _expand_icon->SetVisible(false); - _expand_layout->AddView(_expand_icon, 0, nux::MINOR_POSITION_CENTER, nux::MINOR_SIZE_FIX); + _expand_layout->AddView(_expand_icon, 0, nux::MINOR_POSITION_CENTER, nux::MINOR_SIZE_MATCHCONTENT); SetLayout(_group_layout); @@ -211,6 +214,48 @@ else nux::GetWindowCompositor().SetKeyFocusArea(GetHeaderFocusableView(), direction); }); + + UpdatePlacesGroupSize(); +} + +void +PlacesGroup::UpdatePlacesGroupSize() +{ + int icon_size = _style.GetCategoryIconSize().CP(scale); + int top_space = _style.GetPlacesGroupTopSpace().CP(scale); + + _space_layout->SetMinimumSize(top_space, top_space); + _space_layout->SetMaximumSize(top_space, top_space); + + _header_layout->SetSpaceBetweenChildren(SPACE_BETWEEN_CHILDREN.CP(scale())); + _header_layout->SetLeftAndRightPadding(_style.GetCategoryHeaderLeftPadding().CP(scale), 0); + + _icon->SetMinMaxSize(icon_size, icon_size); + + _text_layout->SetHorizontalInternalMargin(TEXT_INTERNAL_MARGIN.CP(scale())); + _expand_layout->SetHorizontalInternalMargin(EXPAND_INTERNAL_MARGIN.CP(scale())); +} + +void +PlacesGroup::UpdateScale(double scale) +{ + _name->SetMinimumSize(nux::AREA_MIN_WIDTH, nux::AREA_MIN_HEIGHT); + _name->SetMaximumSize(nux::AREA_MAX_WIDTH, nux::AREA_MAX_HEIGHT); + _name->SetScale(scale); + _expand_label->SetScale(scale); + + _icon->SetSize(_style.GetCategoryIconSize().CP(scale)); + _icon->ReLoadIcon(); + + auto const& arrow = _expand_icon->texture(); + _expand_icon->SetMinMaxSize(RawPixel(arrow->GetWidth()).CP(scale), RawPixel(arrow->GetHeight()).CP(scale)); + + if (_child_view) + _child_view->scale = scale; + + ComputeContentSize(); + UpdatePlacesGroupSize(); + UpdateResultViewPadding(); } void @@ -232,6 +277,7 @@ } void + PlacesGroup::SetName(std::string const& name) { if (_cached_name != name) @@ -243,7 +289,7 @@ void PlacesGroup::SetHeaderCountVisible(bool disable) { - disabled_header_count_ = !disable; + _disabled_header_count = !disable; Relayout(); } @@ -262,7 +308,17 @@ void PlacesGroup::SetIcon(std::string const& path_to_emblem) { - _icon->SetByIconName(path_to_emblem, _style.GetCategoryIconSize()); + _icon->SetByIconName(path_to_emblem, _style.GetCategoryIconSize().CP(scale)); +} + +void +PlacesGroup::UpdateResultViewPadding() +{ + if (_child_layout) + { + _child_layout->SetTopAndBottomPadding(_style.GetPlacesGroupResultTopPadding().CP(scale), 0); + _child_layout->SetLeftAndRightPadding(_style.GetPlacesGroupResultLeftPadding().CP(scale), 0); + } } void @@ -279,12 +335,12 @@ AddChild(view); _child_view = view; + _child_view->scale = scale(); _child_layout = new nux::VLayout(); _child_layout->AddView(_child_view, 0); - _child_layout->SetTopAndBottomPadding(_style.GetPlacesGroupResultTopPadding(),0); - _child_layout->SetLeftAndRightPadding(_style.GetPlacesGroupResultLeftPadding(), 0); + UpdateResultViewPadding(); _group_layout->AddLayout(_child_layout, 1); view->results_per_row.changed.connect([this] (int results_per_row) @@ -311,7 +367,7 @@ void PlacesGroup::RefreshLabel() { - if (disabled_header_count_) + if (_disabled_header_count) { _expand_icon->SetVisible(false); _expand_label->SetVisible(false); @@ -401,7 +457,10 @@ // only the width matters if (_cached_geometry.GetWidth() != geo.GetWidth()) { - _focus_layer.reset(_style.FocusOverlay(geo.width - kHighlightLeftPadding - kHighlightRightPadding, kHighlightHeight)); + _focus_layer.reset(_style.FocusOverlay(geo.width - + kHighlightLeftPadding.CP(scale()) - + kHighlightRightPadding.CP(scale()), + kHighlightHeight.CP(scale()))); _cached_geometry = geo; } return ret; @@ -419,8 +478,11 @@ if (ShouldBeHighlighted() && _focus_layer) { nux::Geometry geo(_header_layout->GetGeometry()); - geo.width = base.width - kHighlightRightPadding - kHighlightLeftPadding; - geo.x += kHighlightLeftPadding; + geo.width = base.width - + kHighlightRightPadding.CP(scale()) - + kHighlightLeftPadding.CP(scale()); + + geo.x += kHighlightLeftPadding.CP(scale()); _focus_layer->SetGeometry(geo); _focus_layer->Renderlayer(graphics_engine); @@ -528,6 +590,9 @@ else _expand_icon->SetTexture(_style.GetGroupExpandIcon()); + auto const& tex = _expand_icon->texture(); + _expand_icon->SetMinMaxSize(RawPixel(tex->GetWidth()).CP(scale), RawPixel(tex->GetHeight()).CP(scale)); + expanded.emit(this); } diff -Nru unity-7.1.2+14.04.20140303/dash/PlacesGroup.h unity-7.2.4+14.04.20141217/dash/PlacesGroup.h --- unity-7.1.2+14.04.20140303/dash/PlacesGroup.h 2014-03-03 16:47:14.000000000 +0000 +++ unity-7.2.4+14.04.20141217/dash/PlacesGroup.h 2014-12-17 20:51:37.000000000 +0000 @@ -59,6 +59,8 @@ PlacesGroup(dash::StyleInterface& style); + nux::Property scale; + void SetIcon(std::string const& icon); void SetName(std::string const& name); void SetHeaderCountVisible(bool disable); @@ -69,7 +71,6 @@ void SetChildView(dash::ResultView* view); dash::ResultView* GetChildView(); - void SetChildLayout(nux::Layout* layout); void Relayout(); @@ -123,6 +124,10 @@ bool OnIdleRelayout(); void RefreshLabel(); + void UpdatePlacesGroupSize(); + void UpdateResultViewPadding(); + void UpdateScale(double scale); + private: std::string _category_id; dash::StyleInterface& _style; @@ -134,13 +139,14 @@ nux::HLayout* _expand_label_layout; nux::HLayout* _expand_layout; nux::VLayout* _child_layout; + nux::SpaceLayout* _space_layout; dash::ResultView* _child_view; std::unique_ptr _focus_layer; - IconTexture* _icon; + IconTexture* _icon; StaticCairoText* _name; StaticCairoText* _expand_label; - IconTexture* _expand_icon; + IconTexture* _expand_icon; nux::BaseTexture* _background; nux::BaseTexture* _background_nofilters; @@ -156,7 +162,7 @@ bool _coverflow_enabled; - bool disabled_header_count_; + bool _disabled_header_count; glib::Source::UniquePtr _relayout_idle; UBusManager _ubus; diff -Nru unity-7.1.2+14.04.20140303/dash/previews/ActionButton.cpp unity-7.2.4+14.04.20141217/dash/previews/ActionButton.cpp --- unity-7.1.2+14.04.20140303/dash/previews/ActionButton.cpp 2014-03-03 16:47:14.000000000 +0000 +++ unity-7.2.4+14.04.20141217/dash/previews/ActionButton.cpp 2014-12-17 20:51:54.000000000 +0000 @@ -25,23 +25,25 @@ #include #include "unity-shared/IconTexture.h" #include "unity-shared/StaticCairoText.h" +#include "unity-shared/UnitySettings.h" +namespace unity +{ namespace { -const int kMinButtonHeight = 34; -const int kMinButtonWidth = 48; +const RawPixel MIN_BUTTON_HEIGHT = 34_em; +const RawPixel MIN_BUTTON_WIDTH = 48_em; -const int icon_size = 24; +const RawPixel icon_size = 24_em; } -namespace unity -{ namespace dash { DECLARE_LOGGER(logger, "unity.dash.preview.action"); ActionButton::ActionButton(std::string const& action_hint, std::string const& label, std::string const& icon_hint, NUX_FILE_LINE_DECL) : nux::AbstractButton(NUX_FILE_LINE_PARAM) + , scale(1.0) , action_hint_(action_hint) , image_(nullptr) { @@ -49,6 +51,8 @@ SetAcceptKeyNavFocusOnMouseEnter(true); Init(); BuildLayout(label, icon_hint, ""); + scale.changed.connect(sigc::mem_fun(this, &ActionButton::UpdateScale)); + Settings::Instance().font_scaling.changed.connect(sigc::hide(sigc::mem_fun(this, &ActionButton::InitTheme))); } ActionButton::~ActionButton() @@ -84,22 +88,20 @@ void ActionButton::InitTheme() { - if (!cr_active_) - { - nux::Geometry const& geo = GetGeometry(); - - cr_prelight_.reset(new nux::CairoWrapper(geo, sigc::bind(sigc::mem_fun(this, &ActionButton::RedrawTheme), nux::ButtonVisualState::VISUAL_STATE_PRELIGHT))); - cr_active_.reset(new nux::CairoWrapper(geo, sigc::bind(sigc::mem_fun(this, &ActionButton::RedrawTheme), nux::ButtonVisualState::VISUAL_STATE_PRESSED))); - cr_normal_.reset(new nux::CairoWrapper(geo, sigc::bind(sigc::mem_fun(this, &ActionButton::RedrawTheme), nux::ButtonVisualState::VISUAL_STATE_NORMAL))); - cr_focus_.reset(new nux::CairoWrapper(geo, sigc::mem_fun(this, &ActionButton::RedrawFocusOverlay))); - } + nux::Geometry const& geo = GetGeometry(); - SetMinimumHeight(kMinButtonHeight); - SetMinimumWidth(kMinButtonWidth); + cr_prelight_.reset(new nux::CairoWrapper(geo, sigc::bind(sigc::mem_fun(this, &ActionButton::RedrawTheme), nux::ButtonVisualState::VISUAL_STATE_PRELIGHT))); + cr_active_.reset(new nux::CairoWrapper(geo, sigc::bind(sigc::mem_fun(this, &ActionButton::RedrawTheme), nux::ButtonVisualState::VISUAL_STATE_PRESSED))); + cr_normal_.reset(new nux::CairoWrapper(geo, sigc::bind(sigc::mem_fun(this, &ActionButton::RedrawTheme), nux::ButtonVisualState::VISUAL_STATE_NORMAL))); + cr_focus_.reset(new nux::CairoWrapper(geo, sigc::mem_fun(this, &ActionButton::RedrawFocusOverlay))); + + double font_scaling = Settings::Instance().font_scaling() * scale; + SetMinimumHeight(MIN_BUTTON_HEIGHT.CP(font_scaling)); + SetMinimumWidth(MIN_BUTTON_WIDTH.CP(font_scaling)); } void ActionButton::SetExtraHint(std::string const& extra_hint, std::string const& font_hint) -{ +{ extra_font_hint_= font_hint; if (extra_text_) { @@ -123,13 +125,13 @@ if (!icon_hint_.empty()) { - image_ = new IconTexture(icon_hint, icon_size); + image_ = new IconTexture(icon_hint, icon_size.CP(scale)); image_->texture_updated.connect([this](nux::ObjectPtr const&) { BuildLayout(label_, icon_hint_, extra_hint_); }); image_->SetInputEventSensitivity(false); - image_->SetMinMaxSize(icon_size, icon_size); + image_->SetMinMaxSize(icon_size.CP(scale), icon_size.CP(scale)); } } @@ -192,11 +194,13 @@ void ActionButton::RedrawTheme(nux::Geometry const& geom, cairo_t* cr, nux::ButtonVisualState faked_state) { + cairo_surface_set_device_scale(cairo_get_target(cr), scale, scale); Style::Instance().Button(cr, faked_state, "", -1, Alignment::CENTER, true); } void ActionButton::RedrawFocusOverlay(nux::Geometry const& geom, cairo_t* cr) { + cairo_surface_set_device_scale(cairo_get_target(cr), scale, scale); Style::Instance().ButtonFocusOverlay(cr, 0.20f); } @@ -311,5 +315,27 @@ return extra_hint_; } +void ActionButton::UpdateScale(double scale) +{ + InitTheme(); + + if (image_) + { + image_->SetSize(icon_size.CP(scale)); + image_->SetMinMaxSize(icon_size.CP(scale), icon_size.CP(scale)); + image_->ReLoadIcon(); + } + + if (static_text_) + static_text_->SetScale(scale); + + if (extra_text_) + extra_text_->SetScale(scale); + + QueueRelayout(); + QueueDraw(); +} + + } // namespace dash } // namespace unity diff -Nru unity-7.1.2+14.04.20140303/dash/previews/ActionButton.h unity-7.2.4+14.04.20141217/dash/previews/ActionButton.h --- unity-7.1.2+14.04.20140303/dash/previews/ActionButton.h 2014-03-03 16:47:14.000000000 +0000 +++ unity-7.2.4+14.04.20141217/dash/previews/ActionButton.h 2014-12-17 20:51:37.000000000 +0000 @@ -59,6 +59,8 @@ std::string GetLabel() const; std::string GetExtraText() const; + nux::Property scale; + protected: virtual long ComputeContentSize(); virtual void Draw(nux::GraphicsEngine& GfxContext, bool force_draw); @@ -95,6 +97,8 @@ nux::ObjectPtr image_; nux::ObjectPtr static_text_; nux::ObjectPtr extra_text_; + + void UpdateScale(double scale); }; } // namespace dash diff -Nru unity-7.1.2+14.04.20140303/dash/previews/ActionLink.cpp unity-7.2.4+14.04.20141217/dash/previews/ActionLink.cpp --- unity-7.1.2+14.04.20140303/dash/previews/ActionLink.cpp 2014-03-03 16:47:14.000000000 +0000 +++ unity-7.2.4+14.04.20141217/dash/previews/ActionLink.cpp 2014-12-17 20:51:37.000000000 +0000 @@ -40,12 +40,15 @@ ActionLink::ActionLink(std::string const& action_hint, std::string const& label, NUX_FILE_LINE_DECL) : nux::AbstractButton(NUX_FILE_LINE_PARAM) + , scale(1.0) , action_hint_(action_hint) , aligment_(StaticCairoText::NUX_ALIGN_CENTRE) , underline_(StaticCairoText::NUX_UNDERLINE_SINGLE) { Init(); BuildLayout(label); + UpdateScale(scale); + scale.changed.connect(sigc::mem_fun(this, &ActionLink::UpdateScale)); } std::string ActionLink::GetName() const @@ -109,6 +112,7 @@ static_text_ = new StaticCairoText(label_, true, NUX_TRACKER_LOCATION); if (!font_hint_.empty()) static_text_->SetFont(font_hint_); + static_text_->SetScale(scale); static_text_->SetInputEventSensitivity(false); static_text_->SetTextAlignment(aligment_); static_text_->SetUnderline(underline_); @@ -243,5 +247,14 @@ return label_; } +void ActionLink::UpdateScale(double scale) +{ + if (static_text_) + static_text_->SetScale(scale); + + QueueRelayout(); + QueueDraw(); +} + } // namespace dash } // namespace unity diff -Nru unity-7.1.2+14.04.20140303/dash/previews/ActionLink.h unity-7.2.4+14.04.20141217/dash/previews/ActionLink.h --- unity-7.1.2+14.04.20140303/dash/previews/ActionLink.h 2014-03-03 16:47:14.000000000 +0000 +++ unity-7.2.4+14.04.20141217/dash/previews/ActionLink.h 2014-12-17 20:51:37.000000000 +0000 @@ -47,6 +47,7 @@ nux::RWProperty text_aligment; nux::RWProperty underline_state; nux::RWProperty font_hint; + nux::Property scale; void Activate() {} void Deactivate() {} @@ -90,8 +91,7 @@ StaticCairoText::UnderlineState underline_; private: typedef std::unique_ptr NuxCairoPtr; - - + void UpdateScale(double scale); }; } // namespace dash diff -Nru unity-7.1.2+14.04.20140303/dash/previews/ApplicationPreview.cpp unity-7.2.4+14.04.20141217/dash/previews/ApplicationPreview.cpp --- unity-7.1.2+14.04.20140303/dash/previews/ApplicationPreview.cpp 2014-03-03 16:47:14.000000000 +0000 +++ unity-7.2.4+14.04.20141217/dash/previews/ApplicationPreview.cpp 2014-12-17 20:51:37.000000000 +0000 @@ -24,7 +24,6 @@ #include "unity-shared/PreviewStyle.h" #include "unity-shared/CoverArt.h" #include "unity-shared/IconTexture.h" -#include "unity-shared/PlacesOverlayVScrollBar.h" #include #include #include @@ -46,23 +45,31 @@ { namespace previews { -DECLARE_LOGGER(logger, "unity.dash.preview.application"); -class DetailsScrollView : public nux::ScrollView +namespace { -public: - DetailsScrollView(NUX_FILE_LINE_PROTO) - : ScrollView(NUX_FILE_LINE_PARAM) - { - SetVScrollBar(new dash::PlacesOverlayVScrollBar(NUX_TRACKER_LOCATION)); - } + const RawPixel ICON_SPACE_CHILDREN = 3_em; + const RawPixel DATA_SPACE_CHILDREN = 16_em; + const RawPixel INFO_SPACE_CHILDREN = 12_em; + const RawPixel COPYRIGHT_SPACE_CHILDREN = 8_em; + const RawPixel ICON_SIZE = 72_em; +} -}; +DECLARE_LOGGER(logger, "unity.dash.preview.application"); NUX_IMPLEMENT_OBJECT_TYPE(ApplicationPreview); ApplicationPreview::ApplicationPreview(dash::Preview::Ptr preview_model) : Preview(preview_model) +, title_subtitle_layout_(nullptr) +, image_data_layout_(nullptr) +, main_app_info_(nullptr) +, icon_layout_(nullptr) +, app_data_layout_(nullptr) +, app_updated_copywrite_layout_(nullptr) +, app_info_layout_(nullptr) +, app_info_scroll_(nullptr) +, actions_layout_(nullptr) { SetupViews(); } @@ -121,12 +128,13 @@ auto on_mouse_down = [this](int x, int y, unsigned long button_flags, unsigned long key_flags) { this->preview_container_->OnMouseDown(x, y, button_flags, key_flags); }; - nux::HLayout* image_data_layout = new nux::HLayout(); - image_data_layout->SetSpaceBetweenChildren(style.GetPanelSplitWidth()); + image_data_layout_ = new nux::HLayout(); + image_data_layout_->SetSpaceBetweenChildren(style.GetPanelSplitWidth().CP(scale)); ///////////////////// // Image image_ = new CoverArt(); + image_->scale = scale(); AddChild(image_.GetPointer()); UpdateCoverArtImage(image_.GetPointer()); ///////////////////// @@ -134,34 +142,36 @@ ///////////////////// // App Data Panel full_data_layout_ = new nux::VLayout(); - full_data_layout_->SetPadding(style.GetDetailsTopMargin(), 0, style.GetDetailsBottomMargin(), style.GetDetailsLeftMargin()); - full_data_layout_->SetSpaceBetweenChildren(16); + full_data_layout_->SetPadding(style.GetDetailsTopMargin().CP(scale), 0, style.GetDetailsBottomMargin().CP(scale), style.GetDetailsLeftMargin().CP(scale)); + full_data_layout_->SetSpaceBetweenChildren(DATA_SPACE_CHILDREN.CP(scale)); ///////////////////// // Main App Info - nux::HLayout* main_app_info = new nux::HLayout(); - main_app_info->SetSpaceBetweenChildren(style.GetSpaceBetweenIconAndDetails()); + main_app_info_ = new nux::HLayout(); + main_app_info_->SetSpaceBetweenChildren(style.GetSpaceBetweenIconAndDetails().CP(scale)); ///////////////////// // Icon Layout - nux::VLayout* icon_layout = new nux::VLayout(); - icon_layout->SetSpaceBetweenChildren(3); - app_icon_ = new IconTexture(app_preview_model->app_icon.Get().RawPtr() ? g_icon_to_string(app_preview_model->app_icon.Get().RawPtr()) : "", 72); + icon_layout_ = new nux::VLayout(); + icon_layout_->SetSpaceBetweenChildren(ICON_SPACE_CHILDREN.CP(scale)); + app_icon_ = new IconTexture(app_preview_model->app_icon.Get().RawPtr() ? g_icon_to_string(app_preview_model->app_icon.Get().RawPtr()) : "", ICON_SIZE.CP(scale)); AddChild(app_icon_.GetPointer()); - app_icon_->SetMinimumSize(style.GetAppIconAreaWidth(), style.GetAppIconAreaWidth()); - app_icon_->SetMaximumSize(style.GetAppIconAreaWidth(), style.GetAppIconAreaWidth()); + app_icon_->SetMinimumSize(style.GetAppIconAreaWidth().CP(scale), style.GetAppIconAreaWidth().CP(scale)); + app_icon_->SetMaximumSize(style.GetAppIconAreaWidth().CP(scale), style.GetAppIconAreaWidth().CP(scale)); app_icon_->mouse_click.connect(on_mouse_down); - icon_layout->AddView(app_icon_.GetPointer(), 0); + icon_layout_->AddView(app_icon_.GetPointer(), 0); - if (app_preview_model->rating >= 0) { + if (app_preview_model->rating >= 0) + { app_rating_ = new PreviewRatingsWidget(); AddChild(app_rating_.GetPointer()); - app_rating_->SetMaximumHeight(style.GetRatingWidgetHeight()); - app_rating_->SetMinimumHeight(style.GetRatingWidgetHeight()); + app_rating_->scale = scale(); + app_rating_->SetMaximumHeight(style.GetRatingWidgetHeight().CP(scale)); + app_rating_->SetMinimumHeight(style.GetRatingWidgetHeight().CP(scale)); app_rating_->SetRating(app_preview_model->rating); app_rating_->SetReviews(app_preview_model->num_ratings); app_rating_->request_close().connect([this]() { preview_container_->request_close.emit(); }); - icon_layout->AddView(app_rating_.GetPointer(), 0); + icon_layout_->AddView(app_rating_.GetPointer(), 0); } ///////////////////// @@ -169,15 +179,16 @@ ///////////////////// // Data - nux::VLayout* app_data_layout = new nux::VLayout(); - app_data_layout->SetSpaceBetweenChildren(16); + app_data_layout_ = new nux::VLayout(); + app_data_layout_->SetSpaceBetweenChildren(DATA_SPACE_CHILDREN.CP(scale)); title_subtitle_layout_ = new nux::VLayout(); - title_subtitle_layout_->SetSpaceBetweenChildren(style.GetSpaceBetweenTitleAndSubtitle()); + title_subtitle_layout_->SetSpaceBetweenChildren(style.GetSpaceBetweenTitleAndSubtitle().CP(scale)); title_ = new StaticCairoText(preview_model_->title, true, NUX_TRACKER_LOCATION); AddChild(title_.GetPointer()); title_->SetLines(-1); + title_->SetScale(scale); title_->SetFont(style.title_font().c_str()); title_->mouse_click.connect(on_mouse_down); title_subtitle_layout_->AddView(title_.GetPointer(), 1); @@ -188,12 +199,13 @@ AddChild(subtitle_.GetPointer()); subtitle_->SetFont(style.subtitle_size_font().c_str()); subtitle_->SetLines(-1); + subtitle_->SetScale(scale); subtitle_->mouse_click.connect(on_mouse_down); title_subtitle_layout_->AddView(subtitle_.GetPointer(), 1); } - nux::VLayout* app_updated_copywrite_layout = new nux::VLayout(); - app_updated_copywrite_layout->SetSpaceBetweenChildren(8); + app_updated_copywrite_layout_ = new nux::VLayout(); + app_updated_copywrite_layout_->SetSpaceBetweenChildren(COPYRIGHT_SPACE_CHILDREN.CP(scale)); if (!app_preview_model->license.Get().empty()) { @@ -201,8 +213,9 @@ AddChild(license_.GetPointer()); license_->SetFont(style.app_license_font().c_str()); license_->SetLines(-1); + license_->SetScale(scale); license_->mouse_click.connect(on_mouse_down); - app_updated_copywrite_layout->AddView(license_.GetPointer(), 1); + app_updated_copywrite_layout_->AddView(license_.GetPointer(), 1); } if (!app_preview_model->last_update.Get().empty()) @@ -213,8 +226,9 @@ last_update_ = new StaticCairoText(last_update.str(), true, NUX_TRACKER_LOCATION); AddChild(last_update_.GetPointer()); last_update_->SetFont(style.app_last_update_font().c_str()); + last_update_->SetScale(scale); last_update_->mouse_click.connect(on_mouse_down); - app_updated_copywrite_layout->AddView(last_update_.GetPointer(), 1); + app_updated_copywrite_layout_->AddView(last_update_.GetPointer(), 1); } if (!app_preview_model->copyright.Get().empty()) @@ -223,29 +237,32 @@ AddChild(copywrite_.GetPointer()); copywrite_->SetFont(style.app_copywrite_font().c_str()); copywrite_->SetLines(-1); + copywrite_->SetScale(scale); copywrite_->mouse_click.connect(on_mouse_down); - app_updated_copywrite_layout->AddView(copywrite_.GetPointer(), 1); + app_updated_copywrite_layout_->AddView(copywrite_.GetPointer(), 1); } - app_data_layout->AddLayout(title_subtitle_layout_); - app_data_layout->AddLayout(app_updated_copywrite_layout); + app_data_layout_->AddLayout(title_subtitle_layout_); + app_data_layout_->AddLayout(app_updated_copywrite_layout_); // buffer space ///////////////////// - main_app_info->AddLayout(icon_layout, 0); - main_app_info->AddLayout(app_data_layout, 1); + main_app_info_->AddLayout(icon_layout_, 0); + main_app_info_->AddLayout(app_data_layout_, 1); ///////////////////// ///////////////////// // Description - nux::ScrollView* app_info = new DetailsScrollView(NUX_TRACKER_LOCATION); + auto* app_info = new ScrollView(NUX_TRACKER_LOCATION); + app_info_scroll_ = app_info; + app_info->scale = scale(); app_info->EnableHorizontalScrollBar(false); app_info->mouse_click.connect(on_mouse_down); - nux::VLayout* app_info_layout = new nux::VLayout(); - app_info_layout->SetSpaceBetweenChildren(12); - app_info->SetLayout(app_info_layout); + app_info_layout_ = new nux::VLayout(); + app_info_layout_->SetSpaceBetweenChildren(INFO_SPACE_CHILDREN.CP(scale)); + app_info->SetLayout(app_info_layout_); if (!preview_model_->description.Get().empty()) { @@ -256,36 +273,36 @@ description_->SetLines(-style.GetDescriptionLineCount()); description_->SetLineSpacing(style.GetDescriptionLineSpacing()); description_->mouse_click.connect(on_mouse_down); - app_info_layout->AddView(description_.GetPointer()); + app_info_layout_->AddView(description_.GetPointer()); } if (!preview_model_->GetInfoHints().empty()) { - preview_info_hints_ = new PreviewInfoHintWidget(preview_model_, style.GetInfoHintIconSizeWidth()); + preview_info_hints_ = new PreviewInfoHintWidget(preview_model_, style.GetInfoHintIconSizeWidth().CP(scale)); AddChild(preview_info_hints_.GetPointer()); preview_info_hints_->request_close().connect([this]() { preview_container_->request_close.emit(); }); - app_info_layout->AddView(preview_info_hints_.GetPointer()); + app_info_layout_->AddView(preview_info_hints_.GetPointer()); } ///////////////////// ///////////////////// // Actions action_buttons_.clear(); - nux::Layout* actions_layout = BuildGridActionsLayout(preview_model_->GetActions(), action_buttons_); - actions_layout->SetLeftAndRightPadding(0, style.GetDetailsRightMargin()); + actions_layout_ = BuildGridActionsLayout(preview_model_->GetActions(), action_buttons_); + actions_layout_->SetLeftAndRightPadding(0, style.GetDetailsRightMargin().CP(scale)); /////////////////// - full_data_layout_->AddLayout(main_app_info, 0); + full_data_layout_->AddLayout(main_app_info_, 0); full_data_layout_->AddView(app_info, 1); - full_data_layout_->AddLayout(actions_layout, 0); + full_data_layout_->AddLayout(actions_layout_, 0); ///////////////////// - - image_data_layout->AddView(image_.GetPointer(), 0); - image_data_layout->AddLayout(full_data_layout_, 1); + + image_data_layout_->AddView(image_.GetPointer(), 0); + image_data_layout_->AddLayout(full_data_layout_, 1); mouse_click.connect(on_mouse_down); - SetLayout(image_data_layout); + SetLayout(image_data_layout_); } void ApplicationPreview::PreLayoutManagement() @@ -296,12 +313,16 @@ nux::Geometry geo_art(geo.x, geo.y, style.GetAppImageAspectRatio() * geo.height, geo.height); - if (geo.width - geo_art.width - style.GetPanelSplitWidth() - style.GetDetailsLeftMargin() - style.GetDetailsRightMargin() < style.GetDetailsPanelMinimumWidth()) - geo_art.width = MAX(0, geo.width - style.GetPanelSplitWidth() - style.GetDetailsLeftMargin() - style.GetDetailsRightMargin() - style.GetDetailsPanelMinimumWidth()); + int content_width = geo.width - style.GetPanelSplitWidth().CP(scale) + - style.GetDetailsLeftMargin().CP(scale) + - style.GetDetailsRightMargin().CP(scale); + if (content_width - geo_art.width < style.GetDetailsPanelMinimumWidth().CP(scale)) + geo_art.width = std::max(0, content_width - style.GetDetailsPanelMinimumWidth().CP(scale)); + image_->SetMinMaxSize(geo_art.width, geo_art.height); - int details_width = MAX(0, geo.width - geo_art.width - style.GetPanelSplitWidth() - style.GetDetailsLeftMargin() - style.GetDetailsRightMargin()); - int top_app_info_max_width = MAX(0, details_width - style.GetAppIconAreaWidth() - style.GetSpaceBetweenIconAndDetails()); + int details_width = std::max(0, content_width - geo_art.width); + int top_app_info_max_width = std::max(0, details_width - style.GetAppIconAreaWidth().CP(scale) - style.GetSpaceBetweenIconAndDetails().CP(scale)); if (title_) { title_->SetMaximumWidth(top_app_info_max_width); } if (subtitle_) { subtitle_->SetMaximumWidth(top_app_info_max_width); } @@ -310,12 +331,77 @@ if (copywrite_) { copywrite_->SetMaximumWidth(top_app_info_max_width); } if (description_) { description_->SetMaximumWidth(details_width); } + int button_w = CLAMP((details_width - style.GetSpaceBetweenActions().CP(scale)) / 2, 0, style.GetActionButtonMaximumWidth().CP(scale)); + int button_h = style.GetActionButtonHeight().CP(scale); + for (nux::AbstractButton* button : action_buttons_) + button->SetMinMaxSize(button_w, button_h); + + Preview::PreLayoutManagement(); +} + +void ApplicationPreview::UpdateScale(double scale) +{ + Preview::UpdateScale(scale); + + previews::Style& style = dash::previews::Style::Instance(); + + if (app_icon_) { - button->SetMinMaxSize(CLAMP((details_width - style.GetSpaceBetweenActions()) / 2, 0, style.GetActionButtonMaximumWidth()), style.GetActionButtonHeight()); + app_icon_->SetSize(ICON_SIZE.CP(scale)); + app_icon_->SetMinimumSize(style.GetAppIconAreaWidth().CP(scale), style.GetAppIconAreaWidth().CP(scale)); + app_icon_->SetMaximumSize(style.GetAppIconAreaWidth().CP(scale), style.GetAppIconAreaWidth().CP(scale)); + app_icon_->ReLoadIcon(); } - Preview::PreLayoutManagement(); + if (app_info_scroll_) + app_info_scroll_->scale = scale; + + if (license_) + license_->SetScale(scale); + + if (last_update_) + last_update_->SetScale(scale); + + if (copywrite_) + copywrite_->SetScale(scale); + + if (app_rating_) + { + app_rating_->SetMaximumHeight(style.GetRatingWidgetHeight().CP(scale)); + app_rating_->SetMinimumHeight(style.GetRatingWidgetHeight().CP(scale)); + app_rating_->scale = scale; + } + + if (image_data_layout_) + image_data_layout_->SetSpaceBetweenChildren(style.GetPanelSplitWidth().CP(scale)); + + if (full_data_layout_) + { + full_data_layout_->SetPadding(style.GetDetailsTopMargin().CP(scale), 0, style.GetDetailsBottomMargin().CP(scale), style.GetDetailsLeftMargin().CP(scale)); + full_data_layout_->SetSpaceBetweenChildren(DATA_SPACE_CHILDREN.CP(scale)); + } + + if (main_app_info_) + main_app_info_->SetSpaceBetweenChildren(style.GetSpaceBetweenIconAndDetails().CP(scale)); + + if (icon_layout_) + icon_layout_->SetSpaceBetweenChildren(ICON_SPACE_CHILDREN.CP(scale)); + + if (app_data_layout_) + app_data_layout_->SetSpaceBetweenChildren(DATA_SPACE_CHILDREN.CP(scale)); + + if (title_subtitle_layout_) + title_subtitle_layout_->SetSpaceBetweenChildren(style.GetSpaceBetweenTitleAndSubtitle().CP(scale)); + + if (app_info_layout_) + app_info_layout_->SetSpaceBetweenChildren(INFO_SPACE_CHILDREN.CP(scale)); + + if (actions_layout_) + actions_layout_->SetLeftAndRightPadding(0, style.GetDetailsRightMargin().CP(scale)); + + if (app_updated_copywrite_layout_) + app_updated_copywrite_layout_->SetSpaceBetweenChildren(COPYRIGHT_SPACE_CHILDREN.CP(scale)); } } // namespace previews diff -Nru unity-7.1.2+14.04.20140303/dash/previews/ApplicationPreview.h unity-7.2.4+14.04.20141217/dash/previews/ApplicationPreview.h --- unity-7.1.2+14.04.20140303/dash/previews/ApplicationPreview.h 2014-03-03 16:47:14.000000000 +0000 +++ unity-7.2.4+14.04.20141217/dash/previews/ApplicationPreview.h 2014-12-17 20:51:37.000000000 +0000 @@ -24,6 +24,7 @@ #define APPLICATIONPREVIEW_H #include "Preview.h" +#include "unity-shared/OverlayScrollView.h" namespace unity { @@ -54,9 +55,18 @@ virtual void PreLayoutManagement(); virtual void SetupViews(); + void UpdateScale(double scale) override; protected: nux::VLayout* title_subtitle_layout_; + nux::HLayout* image_data_layout_; + nux::HLayout* main_app_info_; + nux::VLayout* icon_layout_; + nux::VLayout* app_data_layout_; + nux::VLayout* app_updated_copywrite_layout_; + nux::VLayout* app_info_layout_; + ScrollView* app_info_scroll_; + nux::Layout* actions_layout_; nux::ObjectPtr app_icon_; nux::ObjectPtr app_rating_; diff -Nru unity-7.1.2+14.04.20140303/dash/previews/ErrorPreview.cpp unity-7.2.4+14.04.20141217/dash/previews/ErrorPreview.cpp --- unity-7.1.2+14.04.20140303/dash/previews/ErrorPreview.cpp 2014-03-03 16:47:14.000000000 +0000 +++ unity-7.2.4+14.04.20141217/dash/previews/ErrorPreview.cpp 2014-12-17 20:51:54.000000000 +0000 @@ -26,7 +26,6 @@ #include "unity-shared/PreviewStyle.h" #include "unity-shared/CoverArt.h" #include "unity-shared/StaticCairoText.h" -#include "unity-shared/PlacesVScrollBar.h" #include #include #include @@ -38,6 +37,7 @@ #include "stdio.h" #include "config.h" +#include namespace unity { @@ -50,22 +50,18 @@ { nux::logging::Logger logger("unity.dash.previews.ErrorPreview"); +const RawPixel TITLE_DATA_MAX_SIZE = 76_em; +const RawPixel TITLE_DATA_CHILDREN_SPACE = 10_em; +const RawPixel LINE_SPACING = 10_em; +const RawPixel TITLE_MAX_WIDTH = 480_em; +const RawPixel CHILDREN_SPACE = 5_em; +const RawPixel BUTTONS_DATA_SPACE = 20_em; +const RawPixel INTRO_SPACE = 110_em; } const std::string ErrorPreview::CANCEL_ACTION = "cancel"; const std::string ErrorPreview::GO_TO_U1_ACTION = "open_u1_link"; -class DetailsScrollView : public nux::ScrollView -{ -public: - DetailsScrollView(NUX_FILE_LINE_PROTO) - : ScrollView(NUX_FILE_LINE_PARAM) - { - SetVScrollBar(new dash::PlacesVScrollBar(NUX_TRACKER_LOCATION)); - } - -}; - NUX_IMPLEMENT_OBJECT_TYPE(ErrorPreview) ErrorPreview::ErrorPreview(dash::Preview::Ptr preview_model) @@ -73,6 +69,9 @@ { PaymentPreview::SetupBackground(); SetupViews(); + + UpdateScale(scale); + scale.changed.connect(sigc::mem_fun(this, &ErrorPreview::UpdateScale)); } ErrorPreview::~ErrorPreview() @@ -114,6 +113,7 @@ for (dash::Preview::ActionPtr action : preview_model_->GetActions()) { nux::ObjectPtr button = this->CreateButton(action); + button->scale = scale(); button->activate.connect(sigc::mem_fun(this, &ErrorPreview::OnActionActivated)); buttons_map_.insert(std::make_pair(action->id, button)); } @@ -123,8 +123,8 @@ { previews::Style& style = dash::previews::Style::Instance(); nux::VLayout* title_data_layout = new nux::VLayout(); - title_data_layout->SetMaximumHeight(76); - title_data_layout->SetSpaceBetweenChildren(10); + title_data_layout->SetMaximumHeight(TITLE_DATA_MAX_SIZE.CP(scale)); + title_data_layout->SetSpaceBetweenChildren(TITLE_DATA_CHILDREN_SPACE.CP(scale)); title_ = new StaticCairoText( preview_model_->title.Get(), true, @@ -133,7 +133,7 @@ title_->SetFont(style.payment_title_font()); title_->SetLines(-1); title_->SetFont(style.title_font()); - title_->SetMaximumWidth(480); + title_->SetMaximumWidth(TITLE_MAX_WIDTH.CP(scale)); title_->SetTextEllipsize(StaticCairoText::EllipsizeState::NUX_ELLIPSIZE_END); title_data_layout->AddView(title_.GetPointer(), 1); @@ -151,9 +151,9 @@ { previews::Style& style = dash::previews::Style::Instance(); nux::VLayout *prize_data_layout = new nux::VLayout(); - prize_data_layout->SetMaximumHeight(76); - prize_data_layout->SetSpaceBetweenChildren(5); - prize_data_layout->SetPadding(0, 10, 0, 0); + prize_data_layout->SetMaximumHeight(TITLE_DATA_MAX_SIZE.CP(scale)); + prize_data_layout->SetSpaceBetweenChildren(CHILDREN_SPACE.CP(scale)); + prize_data_layout->SetPadding(0, TITLE_DATA_CHILDREN_SPACE.CP(scale), 0, 0); purchase_prize_ = new StaticCairoText( error_preview_model_->purchase_prize.Get(), true, @@ -188,16 +188,17 @@ nux::HLayout *intro_layout = new nux::HLayout(); nux::VLayout *icon_layout = new nux::VLayout(); - icon_layout->SetPadding(78, 10, 90, 43); - intro_layout->SetPadding(75, 20, 0, 0); - intro_layout->SetSpaceBetweenChildren(5); + icon_layout->SetPadding((78_em).CP(scale), (10_em).CP(scale), (90_em).CP(scale), (43_em).CP(scale)); + intro_layout->SetPadding((75_em).CP(scale), (20_em).CP(scale), 0, 0); + intro_layout->SetSpaceBetweenChildren(CHILDREN_SPACE.CP(scale)); intro_ = new StaticCairoText( error_preview_model_->header.Get(), true, NUX_TRACKER_LOCATION); intro_->SetFont(style.payment_intro_font().c_str()); + intro_->SetScale(scale); intro_->SetLines(-3); - intro_->SetLineSpacing(10); + intro_->SetLineSpacing(LINE_SPACING.CP(scale)); intro_->SetTextEllipsize(StaticCairoText::EllipsizeState::NUX_ELLIPSIZE_END); intro_layout->AddView(intro_.GetPointer());//, 0, nux::MINOR_POSITION_CENTER); @@ -220,9 +221,9 @@ actions_buffer_h->AddSpace(0, 1); nux::HLayout* buttons_data_layout = new TabIteratorHLayout(tab_iterator_); - buttons_data_layout->SetSpaceBetweenChildren(style.GetSpaceBetweenActions()); + buttons_data_layout->SetSpaceBetweenChildren(style.GetSpaceBetweenActions().CP(scale)); - buttons_data_layout->AddSpace(20, 1); + buttons_data_layout->AddSpace(BUTTONS_DATA_SPACE.CP(scale), 1); if(buttons_map_[ErrorPreview::CANCEL_ACTION].GetPointer()){ ActionButton* button = (ActionButton*)buttons_map_[ErrorPreview::CANCEL_ACTION].GetPointer(); buttons_data_layout->AddView(buttons_map_[ErrorPreview::CANCEL_ACTION].GetPointer(), @@ -249,11 +250,11 @@ previews::Style& style = dash::previews::Style::Instance(); - int width = MAX(0, geo.width - style.GetPanelSplitWidth() - style.GetDetailsLeftMargin() - style.GetDetailsRightMargin()); + int width = std::max(0, geo.width - style.GetPanelSplitWidth().CP(scale) - style.GetDetailsLeftMargin().CP(scale) - style.GetDetailsRightMargin().CP(scale)); if(full_data_layout_) { full_data_layout_->SetMaximumWidth(width); } if(header_layout_) { header_layout_->SetMaximumWidth(width); } - if(intro_) { intro_->SetMaximumWidth(width - 110); } + if(intro_) { intro_->SetMaximumWidth(width - INTRO_SPACE.CP(scale)); } if(footer_layout_) { footer_layout_->SetMaximumWidth(width); } Preview::PreLayoutManagement(); @@ -274,6 +275,33 @@ PaymentPreview::SetupViews(); } +void ErrorPreview::UpdateScale(double scale) +{ + if (intro_) + intro_->SetScale(scale); + + if (purchase_hint_) + purchase_hint_->SetScale(scale); + if (purchase_prize_) + purchase_prize_->SetScale(scale); + if (purchase_type_) + purchase_type_->SetScale(scale); + + if (warning_texture_) + { + previews::Style& style = dash::previews::Style::Instance(); + RawPixel width(style.GetWarningIcon()->GetWidth()); + RawPixel height(style.GetWarningIcon()->GetHeight()); + + warning_texture_->SetSize(std::max(width, height).CP(scale)); + warning_texture_->ReLoadIcon(); + } + + if (title_) + title_->SetMaximumWidth(TITLE_MAX_WIDTH.CP(scale)); + + Preview::UpdateScale(scale); +} } } diff -Nru unity-7.1.2+14.04.20140303/dash/previews/ErrorPreview.h unity-7.2.4+14.04.20141217/dash/previews/ErrorPreview.h --- unity-7.1.2+14.04.20140303/dash/previews/ErrorPreview.h 2014-03-03 16:47:14.000000000 +0000 +++ unity-7.2.4+14.04.20141217/dash/previews/ErrorPreview.h 2014-12-17 20:51:37.000000000 +0000 @@ -94,6 +94,8 @@ void PreLayoutManagement(); virtual void SetupViews(); + virtual void UpdateScale(double scale); + // content elements nux::ObjectPtr image_; nux::ObjectPtr intro_; diff -Nru unity-7.1.2+14.04.20140303/dash/previews/GenericPreview.cpp unity-7.2.4+14.04.20141217/dash/previews/GenericPreview.cpp --- unity-7.1.2+14.04.20140303/dash/previews/GenericPreview.cpp 2014-03-03 16:47:14.000000000 +0000 +++ unity-7.2.4+14.04.20141217/dash/previews/GenericPreview.cpp 2014-12-17 20:51:37.000000000 +0000 @@ -23,7 +23,6 @@ #include "unity-shared/IntrospectableWrappers.h" #include "unity-shared/PreviewStyle.h" #include "unity-shared/CoverArt.h" -#include "unity-shared/PlacesOverlayVScrollBar.h" #include #include #include @@ -40,25 +39,28 @@ { namespace previews { -DECLARE_LOGGER(logger, "unity.dash.preview.generic"); -class DetailsScrollView : public nux::ScrollView +namespace { -public: - DetailsScrollView(NUX_FILE_LINE_PROTO) - : ScrollView(NUX_FILE_LINE_PARAM) - { - SetVScrollBar(new dash::PlacesOverlayVScrollBar(NUX_TRACKER_LOCATION)); - } + const RawPixel CHILDREN_SPACE = 12_em; + const RawPixel FULL_CHILDREN_SPACE = 16_em; +} -}; +DECLARE_LOGGER(logger, "unity.dash.preview.generic"); NUX_IMPLEMENT_OBJECT_TYPE(GenericPreview); GenericPreview::GenericPreview(dash::Preview::Ptr preview_model) : Preview(preview_model) +, image_data_layout_(nullptr) +, preview_info_layout_(nullptr) +, preview_info_scroll_(nullptr) +, preview_data_layout_(nullptr) +, actions_layout_(nullptr) { SetupViews(); + UpdateScale(scale); + scale.changed.connect(sigc::mem_fun(this, &GenericPreview::UpdateScale)); } GenericPreview::~GenericPreview() @@ -72,7 +74,7 @@ gfx_engine.PushClippingRectangle(base); nux::GetPainter().PaintBackground(gfx_engine, base); - gfx_engine.PopClippingRectangle(); + gfx_engine.PopClippingRectangle(); } void GenericPreview::DrawContent(nux::GraphicsEngine& gfx_engine, bool force_draw) @@ -113,8 +115,8 @@ auto on_mouse_down = [this](int x, int y, unsigned long button_flags, unsigned long key_flags) { this->preview_container_->OnMouseDown(x, y, button_flags, key_flags); }; - nux::HLayout* image_data_layout = new nux::HLayout(); - image_data_layout->SetSpaceBetweenChildren(style.GetPanelSplitWidth()); + image_data_layout_ = new nux::HLayout(); + image_data_layout_->SetSpaceBetweenChildren(style.GetPanelSplitWidth().CP(scale)); ///////////////////// // Image @@ -126,21 +128,22 @@ ///////////////////// // Data Panel full_data_layout_ = new nux::VLayout(); - full_data_layout_->SetPadding(style.GetDetailsTopMargin(), 0, style.GetDetailsBottomMargin(), style.GetDetailsLeftMargin()); - full_data_layout_->SetSpaceBetweenChildren(16); + full_data_layout_->SetPadding(style.GetDetailsTopMargin().CP(scale), 0, + style.GetDetailsBottomMargin().CP(scale), style.GetDetailsLeftMargin().CP(scale)); + full_data_layout_->SetSpaceBetweenChildren(FULL_CHILDREN_SPACE.CP(scale)); ///////////////////// // Data - nux::VLayout* preview_data_layout = new nux::VLayout(); - preview_data_layout->SetSpaceBetweenChildren(style.GetSpaceBetweenTitleAndSubtitle()); + preview_data_layout_ = new nux::VLayout(); + preview_data_layout_->SetSpaceBetweenChildren(style.GetSpaceBetweenTitleAndSubtitle().CP(scale)); title_ = new StaticCairoText(preview_model_->title, true, NUX_TRACKER_LOCATION); AddChild(title_.GetPointer()); title_->SetLines(-1); title_->SetFont(style.title_font().c_str()); title_->mouse_click.connect(on_mouse_down); - preview_data_layout->AddView(title_.GetPointer(), 1); + preview_data_layout_->AddView(title_.GetPointer(), 1); if (!preview_model_->subtitle.Get().empty()) { @@ -149,19 +152,21 @@ subtitle_->SetLines(-1); subtitle_->SetFont(style.subtitle_size_font().c_str()); subtitle_->mouse_click.connect(on_mouse_down); - preview_data_layout->AddView(subtitle_.GetPointer(), 1); + preview_data_layout_->AddView(subtitle_.GetPointer(), 1); } ///////////////////// ///////////////////// // Description - nux::ScrollView* preview_info = new DetailsScrollView(NUX_TRACKER_LOCATION); + auto* preview_info = new ScrollView(NUX_TRACKER_LOCATION); + preview_info_scroll_ = preview_info; + preview_info->scale = scale(); preview_info->EnableHorizontalScrollBar(false); preview_info->mouse_click.connect(on_mouse_down); - nux::VLayout* preview_info_layout = new nux::VLayout(); - preview_info_layout->SetSpaceBetweenChildren(12); - preview_info->SetLayout(preview_info_layout); + preview_info_layout_ = new nux::VLayout(); + preview_info_layout_->SetSpaceBetweenChildren(CHILDREN_SPACE.CP(scale)); + preview_info->SetLayout(preview_info_layout_); if (!preview_model_->description.Get().empty()) { @@ -172,37 +177,37 @@ description_->SetLines(-style.GetDescriptionLineCount()); description_->SetLineSpacing(style.GetDescriptionLineSpacing()); description_->mouse_click.connect(on_mouse_down); - preview_info_layout->AddView(description_.GetPointer()); + preview_info_layout_->AddView(description_.GetPointer()); } if (!preview_model_->GetInfoHints().empty()) { - preview_info_hints_ = new PreviewInfoHintWidget(preview_model_, style.GetInfoHintIconSizeWidth()); + preview_info_hints_ = new PreviewInfoHintWidget(preview_model_, style.GetInfoHintIconSizeWidth().CP(scale)); AddChild(preview_info_hints_.GetPointer()); preview_info_hints_->request_close().connect([this]() { preview_container_->request_close.emit(); }); - preview_info_layout->AddView(preview_info_hints_.GetPointer()); + preview_info_layout_->AddView(preview_info_hints_.GetPointer()); } ///////////////////// ///////////////////// // Actions action_buttons_.clear(); - nux::Layout* actions_layout = BuildGridActionsLayout(preview_model_->GetActions(), action_buttons_); - actions_layout->SetLeftAndRightPadding(0, style.GetDetailsRightMargin()); + actions_layout_ = BuildGridActionsLayout(preview_model_->GetActions(), action_buttons_); + actions_layout_->SetLeftAndRightPadding(0, style.GetDetailsRightMargin().CP(scale)); /////////////////// - full_data_layout_->AddLayout(preview_data_layout, 0); + full_data_layout_->AddLayout(preview_data_layout_, 0); full_data_layout_->AddView(preview_info, 1); - full_data_layout_->AddView(actions_layout, 0); + full_data_layout_->AddView(actions_layout_, 0); ///////////////////// - image_data_layout->AddView(image_.GetPointer(), 0); + image_data_layout_->AddView(image_.GetPointer(), 0); - image_data_layout->AddLayout(full_data_layout_, 1); + image_data_layout_->AddLayout(full_data_layout_, 1); mouse_click.connect(on_mouse_down); - SetLayout(image_data_layout); + SetLayout(image_data_layout_); } void GenericPreview::PreLayoutManagement() @@ -213,22 +218,61 @@ nux::Geometry geo_art(geo.x, geo.y, style.GetAppImageAspectRatio() * geo.height, geo.height); - if (geo.width - geo_art.width - style.GetPanelSplitWidth() - style.GetDetailsLeftMargin() - style.GetDetailsRightMargin() < style.GetDetailsPanelMinimumWidth()) - geo_art.width = MAX(0, geo.width - style.GetPanelSplitWidth() - style.GetDetailsLeftMargin() - style.GetDetailsRightMargin() - style.GetDetailsPanelMinimumWidth()); - image_->SetMinMaxSize(geo_art.width, geo_art.height); + int content_width = geo.width - style.GetPanelSplitWidth().CP(scale) + - style.GetDetailsLeftMargin().CP(scale) + - style.GetDetailsRightMargin().CP(scale); - int details_width = MAX(0, geo.width - geo_art.width - style.GetPanelSplitWidth() - style.GetDetailsLeftMargin() - style.GetDetailsRightMargin()); + if (content_width - geo_art.width < style.GetDetailsPanelMinimumWidth().CP(scale)) + geo_art.width = std::max(0, content_width - style.GetDetailsPanelMinimumWidth().CP(scale)); + + image_->SetMinMaxSize(geo_art.width, geo_art.height); + int details_width = std::max(0, content_width - geo_art.width); if (title_) { title_->SetMaximumWidth(details_width); } if (subtitle_) { subtitle_->SetMaximumWidth(details_width); } if (description_) { description_->SetMaximumWidth(details_width); } + int button_w = CLAMP((details_width - style.GetSpaceBetweenActions().CP(scale)) / 2, 0, style.GetActionButtonMaximumWidth().CP(scale)); + int button_h = style.GetActionButtonHeight().CP(scale); + for (nux::AbstractButton* button : action_buttons_) + button->SetMinMaxSize(button_w, button_h); + + Preview::PreLayoutManagement(); +} + +void GenericPreview::UpdateScale(double scale) +{ + if (image_) + image_->scale = scale; + + if (preview_info_scroll_) + preview_info_scroll_->scale = scale; + + if (preview_info_hints_) + preview_info_hints_->scale = scale; + + previews::Style& style = dash::previews::Style::Instance(); + + if (full_data_layout_) { - button->SetMinMaxSize(CLAMP((details_width - style.GetSpaceBetweenActions()) / 2, 0, style.GetActionButtonMaximumWidth()), style.GetActionButtonHeight()); + full_data_layout_->SetPadding(style.GetDetailsTopMargin().CP(scale), 0, style.GetDetailsBottomMargin().CP(scale), style.GetDetailsLeftMargin().CP(scale)); + full_data_layout_->SetSpaceBetweenChildren(FULL_CHILDREN_SPACE.CP(scale)); } - Preview::PreLayoutManagement(); + if (image_data_layout_) + image_data_layout_->SetSpaceBetweenChildren(style.GetPanelSplitWidth().CP(scale)); + + if (preview_info_layout_) + preview_info_layout_->SetSpaceBetweenChildren(CHILDREN_SPACE.CP(scale)); + + if (preview_data_layout_) + preview_data_layout_->SetSpaceBetweenChildren(style.GetSpaceBetweenTitleAndSubtitle().CP(scale)); + + if (actions_layout_) + actions_layout_->SetLeftAndRightPadding(0, style.GetDetailsRightMargin().CP(scale)); + + Preview::UpdateScale(scale); } diff -Nru unity-7.1.2+14.04.20140303/dash/previews/GenericPreview.h unity-7.2.4+14.04.20141217/dash/previews/GenericPreview.h --- unity-7.1.2+14.04.20140303/dash/previews/GenericPreview.h 2014-03-03 16:47:14.000000000 +0000 +++ unity-7.2.4+14.04.20141217/dash/previews/GenericPreview.h 2014-12-17 20:51:37.000000000 +0000 @@ -23,8 +23,9 @@ #ifndef GENERICPREVIEW_H #define GENERICPREVIEW_H -#include "Preview.h" #include +#include "Preview.h" +#include "unity-shared/OverlayScrollView.h" namespace unity { @@ -52,6 +53,13 @@ virtual void PreLayoutManagement(); virtual void SetupViews(); + virtual void UpdateScale(double scale); + + nux::HLayout* image_data_layout_; + nux::VLayout* preview_info_layout_; + ScrollView* preview_info_scroll_; + nux::VLayout* preview_data_layout_; + nux::Layout* actions_layout_; }; } diff -Nru unity-7.1.2+14.04.20140303/dash/previews/MoviePreview.cpp unity-7.2.4+14.04.20141217/dash/previews/MoviePreview.cpp --- unity-7.1.2+14.04.20140303/dash/previews/MoviePreview.cpp 2014-03-03 16:47:14.000000000 +0000 +++ unity-7.2.4+14.04.20141217/dash/previews/MoviePreview.cpp 2014-12-17 20:51:37.000000000 +0000 @@ -23,7 +23,6 @@ #include "unity-shared/IntrospectableWrappers.h" #include "unity-shared/PreviewStyle.h" #include "unity-shared/CoverArt.h" -#include "unity-shared/PlacesOverlayVScrollBar.h" #include #include #include @@ -41,23 +40,23 @@ { namespace previews { -DECLARE_LOGGER(logger, "unity.dash.preview.movie"); -class DetailsScrollView : public nux::ScrollView +namespace { -public: - DetailsScrollView(NUX_FILE_LINE_PROTO) - : ScrollView(NUX_FILE_LINE_PARAM) - { - SetVScrollBar(new dash::PlacesOverlayVScrollBar(NUX_TRACKER_LOCATION)); - } + const RawPixel CHILDREN_SPACE = 16_em; + const RawPixel PREVIEW_INFO_CHILDREN_SPACE = 12_em; +} -}; +DECLARE_LOGGER(logger, "unity.dash.preview.movie"); NUX_IMPLEMENT_OBJECT_TYPE(MoviePreview); MoviePreview::MoviePreview(dash::Preview::Ptr preview_model) : Preview(preview_model) +, image_data_layout_(nullptr) +, preview_info_layout_(nullptr) +, preview_info_scroll_(nullptr) +, actions_layout_(nullptr) { SetupViews(); } @@ -123,8 +122,8 @@ auto on_mouse_down = [this](int x, int y, unsigned long button_flags, unsigned long key_flags) { this->preview_container_->OnMouseDown(x, y, button_flags, key_flags); }; - nux::HLayout* image_data_layout = new nux::HLayout(); - image_data_layout->SetSpaceBetweenChildren(style.GetPanelSplitWidth()); + image_data_layout_ = new nux::HLayout(); + image_data_layout_->SetSpaceBetweenChildren(style.GetPanelSplitWidth().CP(scale)); ///////////////////// // Image @@ -136,8 +135,8 @@ ///////////////////// // Data Panel full_data_layout_ = new nux::VLayout(); - full_data_layout_->SetPadding(style.GetDetailsTopMargin(), 0, style.GetDetailsBottomMargin(), style.GetDetailsLeftMargin()); - full_data_layout_->SetSpaceBetweenChildren(16); + full_data_layout_->SetPadding(style.GetDetailsTopMargin().CP(scale), 0, style.GetDetailsBottomMargin().CP(scale), style.GetDetailsLeftMargin().CP(scale)); + full_data_layout_->SetSpaceBetweenChildren(CHILDREN_SPACE.CP(scale)); ///////////////////// // Data @@ -148,6 +147,7 @@ title_ = new StaticCairoText(preview_model_->title, true, NUX_TRACKER_LOCATION); AddChild(title_.GetPointer()); title_->SetLines(-1); + title_->SetScale(scale); title_->SetFont(style.title_font().c_str()); title_->mouse_click.connect(on_mouse_down); app_data_layout->AddView(title_.GetPointer(), 1); @@ -157,6 +157,7 @@ subtitle_ = new StaticCairoText(preview_model_->subtitle, true, NUX_TRACKER_LOCATION); AddChild(subtitle_.GetPointer()); subtitle_->SetLines(-1); + subtitle_->SetScale(scale); subtitle_->SetFont(style.subtitle_size_font().c_str()); subtitle_->mouse_click.connect(on_mouse_down); app_data_layout->AddView(subtitle_.GetPointer(), 1); @@ -166,8 +167,8 @@ if (movie_preview_model->rating >= 0) { rating_ = new PreviewRatingsWidget(); AddChild(rating_.GetPointer()); - rating_->SetMaximumHeight(style.GetRatingWidgetHeight()); - rating_->SetMinimumHeight(style.GetRatingWidgetHeight()); + rating_->SetMaximumHeight(style.GetRatingWidgetHeight().CP(scale)); + rating_->SetMinimumHeight(style.GetRatingWidgetHeight().CP(scale)); rating_->SetRating(movie_preview_model->rating); rating_->SetReviews(movie_preview_model->num_ratings); rating_->request_close().connect([this]() { preview_container_->request_close.emit(); }); @@ -175,20 +176,23 @@ ///////////////////// // Description - nux::ScrollView* preview_info = new DetailsScrollView(NUX_TRACKER_LOCATION); + auto* preview_info = new ScrollView(NUX_TRACKER_LOCATION); + preview_info_scroll_ = preview_info; + preview_info->scale = scale(); preview_info->EnableHorizontalScrollBar(false); preview_info->mouse_click.connect(on_mouse_down); - nux::VLayout* preview_info_layout = new nux::VLayout(); - preview_info_layout->SetSpaceBetweenChildren(12); - preview_info->SetLayout(preview_info_layout); + preview_info_layout_ = new nux::VLayout(); + preview_info_layout_->SetSpaceBetweenChildren(PREVIEW_INFO_CHILDREN_SPACE.CP(scale)); + preview_info->SetLayout(preview_info_layout_); if (!preview_model_->GetInfoHints().empty()) { preview_info_hints_ = new PreviewInfoHintWidget(preview_model_, style.GetInfoHintIconSizeWidth()); + preview_info_hints_->scale = scale(); AddChild(preview_info_hints_.GetPointer()); preview_info_hints_->request_close().connect([this]() { preview_container_->request_close.emit(); }); - preview_info_layout->AddView(preview_info_hints_.GetPointer(), 0); + preview_info_layout_->AddView(preview_info_hints_.GetPointer(), 0); } if (!preview_model_->description.Get().empty()) @@ -196,34 +200,35 @@ description_ = new StaticCairoText(preview_model_->description, false, NUX_TRACKER_LOCATION); // not escaped! AddChild(description_.GetPointer()); description_->SetFont(style.description_font().c_str()); + description_->SetScale(scale); description_->SetTextAlignment(StaticCairoText::NUX_ALIGN_TOP); description_->SetLines(-style.GetDescriptionLineCount()); description_->SetLineSpacing(style.GetDescriptionLineSpacing()); description_->mouse_click.connect(on_mouse_down); - preview_info_layout->AddView(description_.GetPointer()); + preview_info_layout_->AddView(description_.GetPointer()); } ///////////////////// ///////////////////// // Actions action_buttons_.clear(); - nux::Layout* actions_layout = BuildGridActionsLayout(preview_model_->GetActions(), action_buttons_); - actions_layout->SetLeftAndRightPadding(0, style.GetDetailsRightMargin()); + actions_layout_ = BuildGridActionsLayout(preview_model_->GetActions(), action_buttons_); + actions_layout_->SetLeftAndRightPadding(0, style.GetDetailsRightMargin().CP(scale)); /////////////////// full_data_layout_->AddLayout(app_data_layout, 0); if (rating_ != NULL) full_data_layout_->AddView(rating_.GetPointer(), 0); full_data_layout_->AddView(preview_info, 1); - full_data_layout_->AddView(actions_layout, 0); + full_data_layout_->AddView(actions_layout_, 0); ///////////////////// - image_data_layout->AddView(image_.GetPointer(), 0); - image_data_layout->AddLayout(full_data_layout_, 1); + image_data_layout_->AddView(image_.GetPointer(), 0); + image_data_layout_->AddLayout(full_data_layout_, 1); mouse_click.connect(on_mouse_down); - SetLayout(image_data_layout); + SetLayout(image_data_layout_); } @@ -235,11 +240,13 @@ nux::Geometry geo_art(geo.x, geo.y, style.GetVideoImageAspectRatio() * geo.height, geo.height); - if (geo.width - geo_art.width - style.GetPanelSplitWidth() - style.GetDetailsLeftMargin() - style.GetDetailsRightMargin() < style.GetDetailsPanelMinimumWidth()) - geo_art.width = MAX(0, geo.width - style.GetPanelSplitWidth() - style.GetDetailsLeftMargin() - style.GetDetailsRightMargin() - style.GetDetailsPanelMinimumWidth()); + int content_width = geo.width - style.GetPanelSplitWidth().CP(scale) - style.GetDetailsLeftMargin().CP(scale) - style.GetDetailsRightMargin().CP(scale); + if (content_width - geo_art.width < style.GetDetailsPanelMinimumWidth().CP(scale)) + geo_art.width = std::max(0, content_width - style.GetDetailsPanelMinimumWidth().CP(scale)); + image_->SetMinMaxSize(geo_art.width, geo_art.height); - int details_width = MAX(0, geo.width - geo_art.width - style.GetPanelSplitWidth() - style.GetDetailsLeftMargin() - style.GetDetailsRightMargin()); + int details_width = std::max(0, geo.width - geo_art.width - style.GetPanelSplitWidth().CP(scale) - style.GetDetailsLeftMargin().CP(scale) - style.GetDetailsRightMargin().CP(scale)); if (title_) { title_->SetMaximumWidth(details_width); } if (subtitle_) { subtitle_->SetMaximumWidth(details_width); } @@ -247,12 +254,49 @@ for (nux::AbstractButton* button : action_buttons_) { - button->SetMinMaxSize(CLAMP((details_width - style.GetSpaceBetweenActions()) / 2, 0, style.GetActionButtonMaximumWidth()), style.GetActionButtonHeight()); + button->SetMinMaxSize(CLAMP((details_width - style.GetSpaceBetweenActions().CP(scale)) / 2, 0, style.GetActionButtonMaximumWidth().CP(scale)), style.GetActionButtonHeight().CP(scale)); } Preview::PreLayoutManagement(); } +void MoviePreview::UpdateScale(double scale) +{ + Preview::UpdateScale(scale); + + if (image_) + image_->scale = scale; + + if (preview_info_hints_) + preview_info_hints_->scale = scale; + + previews::Style& style = dash::previews::Style::Instance(); + + if (full_data_layout_) + { + full_data_layout_->SetPadding(style.GetDetailsTopMargin().CP(scale), 0, style.GetDetailsBottomMargin().CP(scale), style.GetDetailsLeftMargin().CP(scale)); + full_data_layout_->SetSpaceBetweenChildren(CHILDREN_SPACE.CP(scale)); + } + + if (image_data_layout_) + image_data_layout_->SetSpaceBetweenChildren(style.GetPanelSplitWidth().CP(scale)); + + if (rating_) + { + rating_->SetMaximumHeight(style.GetRatingWidgetHeight().CP(scale)); + rating_->SetMinimumHeight(style.GetRatingWidgetHeight().CP(scale)); + } + + if (preview_info_scroll_) + preview_info_scroll_->scale = scale; + + if (preview_info_layout_) + preview_info_layout_->SetSpaceBetweenChildren(PREVIEW_INFO_CHILDREN_SPACE); + + if (actions_layout_) + actions_layout_->SetLeftAndRightPadding(0, style.GetDetailsRightMargin().CP(scale)); +} + } // namespace previews } // namespace dash } // namespace unity diff -Nru unity-7.1.2+14.04.20140303/dash/previews/MoviePreview.h unity-7.2.4+14.04.20141217/dash/previews/MoviePreview.h --- unity-7.1.2+14.04.20140303/dash/previews/MoviePreview.h 2014-03-03 16:47:14.000000000 +0000 +++ unity-7.2.4+14.04.20141217/dash/previews/MoviePreview.h 2014-12-17 20:51:37.000000000 +0000 @@ -24,6 +24,7 @@ #define MOVIEPREVIEW_H #include "Preview.h" +#include "unity-shared/OverlayScrollView.h" namespace unity { @@ -55,9 +56,15 @@ virtual void OnNavigateInComplete(); virtual void SetupViews(); - + virtual void UpdateScale(double scale); + protected: nux::ObjectPtr rating_; + + nux::HLayout* image_data_layout_; + nux::VLayout* preview_info_layout_; + ScrollView* preview_info_scroll_; + nux::Layout* actions_layout_; }; } diff -Nru unity-7.1.2+14.04.20140303/dash/previews/MusicPaymentPreview.cpp unity-7.2.4+14.04.20141217/dash/previews/MusicPaymentPreview.cpp --- unity-7.1.2+14.04.20140303/dash/previews/MusicPaymentPreview.cpp 2014-03-03 16:47:14.000000000 +0000 +++ unity-7.2.4+14.04.20141217/dash/previews/MusicPaymentPreview.cpp 2014-12-17 20:51:37.000000000 +0000 @@ -24,7 +24,6 @@ #include "unity-shared/PreviewStyle.h" #include "unity-shared/CoverArt.h" #include "unity-shared/StaticCairoText.h" -#include "unity-shared/PlacesVScrollBar.h" #include "config.h" #include @@ -49,6 +48,22 @@ { nux::logging::Logger logger("unity.dash.previews.payment.preview.music"); +const RawPixel DATA_MAX_HEIGHT = 76_em; +const RawPixel TITLE_CHILDREN_SPACE = 10_em; +const RawPixel PRIZE_CHILDREN_SPACE = 5_em; +const RawPixel TITLE_MAX_WIDTH = 480_em; +const RawPixel INTRO_MIN_HEIGHT = 50_em; +const RawPixel FORM_MIN_HEIGHT = 107_em; +const RawPixel FORM_PADDING = 20_em; +const RawPixel LABELS_CHILDREN_SPACE = 18_em; +const RawPixel PASSWORD_MIN_HEIGHT = 40_em; +const RawPixel PASSWORD_MIN_WIDTH = 240_em; +const RawPixel ACTIONS_CHILDREN_SPACE_MAX = 16_em; +const RawPixel ACTIONS_CHILDREN_SPACE_MIN = 8_em; +const RawPixel BUTTONS_SPACE = 20_em; +const RawPixel HEADER_CHILDREN_SPACE = 10_em; +const RawPixel HEADER_MAX_SIZE = 76_em; +const RawPixel BODY_CHILDREN_SPACE = 20_em; } // static string definitions @@ -59,17 +74,6 @@ const std::string MusicPaymentPreview::CANCEL_PURCHASE_ACTION = "cancel_purchase"; const std::string MusicPaymentPreview::PURCHASE_ALBUM_ACTION = "purchase_album"; -class DetailsScrollView : public nux::ScrollView -{ -public: - DetailsScrollView(NUX_FILE_LINE_PROTO) - : ScrollView(NUX_FILE_LINE_PARAM) - { - SetVScrollBar(new dash::PlacesVScrollBar(NUX_TRACKER_LOCATION)); - } - -}; - NUX_IMPLEMENT_OBJECT_TYPE(MusicPaymentPreview) MusicPaymentPreview::MusicPaymentPreview(dash::Preview::Ptr preview_model) @@ -77,6 +81,7 @@ { SetupViews(); PaymentPreview::SetupBackground(); + UpdateScale(scale); } std::string MusicPaymentPreview::GetName() const @@ -127,6 +132,7 @@ || MusicPaymentPreview::FORGOT_PASSWORD_ACTION == action_id) { nux::ObjectPtr link = this->CreateLink(action); + link->scale = scale(); link->activate.connect(sigc::mem_fun(this, &MusicPaymentPreview::OnActionLinkActivated)); @@ -137,6 +143,7 @@ nux::ObjectPtr button = this->CreateButton(action); button->activate.connect(sigc::mem_fun(this, &MusicPaymentPreview::OnActionActivated)); + button->scale = scale(); buttons_map_.insert(std::make_pair(action->id, button)); } @@ -148,8 +155,8 @@ { previews::Style& style = dash::previews::Style::Instance(); nux::VLayout* title_data_layout = new nux::VLayout(); - title_data_layout->SetMaximumHeight(76); - title_data_layout->SetSpaceBetweenChildren(10); + title_data_layout->SetMaximumHeight(DATA_MAX_HEIGHT.CP(scale)); + title_data_layout->SetSpaceBetweenChildren(TITLE_CHILDREN_SPACE.CP(scale)); title_ = new StaticCairoText( preview_model_->title.Get(), true, @@ -157,8 +164,9 @@ title_->SetFont(style.payment_title_font()); title_->SetLines(-1); + title_->SetScale(scale); title_->SetFont(style.title_font()); - title_->SetMaximumWidth(480); + title_->SetMaximumWidth(TITLE_MAX_WIDTH.CP(scale)); title_->SetTextEllipsize(StaticCairoText::EllipsizeState::NUX_ELLIPSIZE_END); title_data_layout->AddView(title_.GetPointer(), 1); @@ -166,6 +174,7 @@ preview_model_->subtitle.Get(), true, NUX_TRACKER_LOCATION); subtitle_->SetLines(-1); + subtitle_->SetScale(scale); subtitle_->SetFont(style.payment_subtitle_font()); title_data_layout->AddView(subtitle_.GetPointer(), 1); title_data_layout->AddSpace(1, 1); @@ -176,14 +185,15 @@ { previews::Style& style = dash::previews::Style::Instance(); nux::VLayout *prize_data_layout = new nux::VLayout(); - prize_data_layout->SetMaximumHeight(76); - prize_data_layout->SetSpaceBetweenChildren(5); - prize_data_layout->SetPadding(0, 10, 0, 0); + prize_data_layout->SetMaximumHeight(DATA_MAX_HEIGHT.CP(scale)); + prize_data_layout->SetSpaceBetweenChildren(PRIZE_CHILDREN_SPACE.CP(scale)); + prize_data_layout->SetPadding(0, TITLE_CHILDREN_SPACE.CP(scale), 0, 0); purchase_prize_ = new StaticCairoText( payment_preview_model_->purchase_prize.Get(), true, NUX_TRACKER_LOCATION); purchase_prize_->SetLines(-1); + purchase_prize_->SetScale(scale); purchase_prize_->SetFont(style.payment_prize_title_font()); prize_data_layout->AddView(purchase_prize_.GetPointer(), 1, nux::MINOR_POSITION_END); @@ -192,6 +202,7 @@ _("Ubuntu One best offer"), true, NUX_TRACKER_LOCATION); purchase_hint_->SetLines(-1); + purchase_hint_->SetScale(scale); purchase_hint_->SetFont(style.payment_prize_subtitle_font()); prize_data_layout->AddView(purchase_hint_.GetPointer(), 1, nux::MINOR_POSITION_END); @@ -200,6 +211,7 @@ payment_preview_model_->purchase_type.Get(), true, NUX_TRACKER_LOCATION); purchase_type_->SetLines(-1); + purchase_type_->SetScale(scale); purchase_type_->SetFont(style.payment_prize_subtitle_font()); prize_data_layout->AddView(purchase_type_.GetPointer(), 1, nux::MINOR_POSITION_END); @@ -210,31 +222,30 @@ { previews::Style& style = dash::previews::Style::Instance(); nux::VLayout *body_layout = new nux::VLayout(); - body_layout->SetSpaceBetweenChildren(20); + body_layout->SetSpaceBetweenChildren(BODY_CHILDREN_SPACE.CP(scale)); intro_ = new StaticCairoText( payment_preview_model_->header.Get(), true, NUX_TRACKER_LOCATION); intro_->SetFont(style.payment_intro_font()); - intro_->SetLineSpacing(10); + intro_->SetScale(scale); + intro_->SetLineSpacing(TITLE_CHILDREN_SPACE.CP(scale)); intro_->SetLines(-style.GetDescriptionLineCount()); - intro_->SetMinimumHeight(50); + intro_->SetMinimumHeight(INTRO_MIN_HEIGHT.CP(scale)); form_layout_ = new nux::HLayout(); - form_layout_->SetSpaceBetweenChildren(10); - form_layout_->SetMinimumHeight(107); - form_layout_->SetLeftAndRightPadding(20); - form_layout_->SetTopAndBottomPadding(10); + form_layout_->SetSpaceBetweenChildren(TITLE_CHILDREN_SPACE.CP(scale)); + form_layout_->SetMinimumHeight(FORM_MIN_HEIGHT.CP(scale)); + form_layout_->SetLeftAndRightPadding(FORM_PADDING.CP(scale)); + form_layout_->SetTopAndBottomPadding(TITLE_CHILDREN_SPACE.CP(scale)); form_layout_->AddLayout(GetFormLabels(), 1, nux::MINOR_POSITION_END); form_layout_->AddLayout(GetFormFields(), 1, nux::MINOR_POSITION_END); form_layout_->AddLayout(GetFormActions(), 1, nux::MINOR_POSITION_END); - body_layout->AddView(intro_.GetPointer(), 1); body_layout->AddLayout(form_layout_.GetPointer(), 1); - return body_layout; } @@ -244,17 +255,18 @@ nux::VLayout *labels_layout = new nux::VLayout(); if (error_message_.empty()) { - labels_layout->SetSpaceBetweenChildren(18); + labels_layout->SetSpaceBetweenChildren(LABELS_CHILDREN_SPACE.CP(scale)); } else { - labels_layout->SetSpaceBetweenChildren(10); + labels_layout->SetSpaceBetweenChildren(TITLE_CHILDREN_SPACE.CP(scale)); } email_label_ = new StaticCairoText( _("Ubuntu One email:"), true, NUX_TRACKER_LOCATION); email_label_->SetLines(-1); + email_label_->SetScale(scale); email_label_->SetFont(style.payment_form_labels_font()); labels_layout->AddView(email_label_.GetPointer(), 0, nux::MINOR_POSITION_END); @@ -262,6 +274,7 @@ _("Payment method:"), true, NUX_TRACKER_LOCATION); payment_label_->SetLines(-1); + payment_label_->SetScale(scale); payment_label_->SetFont(style.payment_form_labels_font()); labels_layout->AddView(payment_label_.GetPointer(), 0, nux::MINOR_POSITION_END); @@ -269,8 +282,9 @@ _("Ubuntu One password:"), true, NUX_TRACKER_LOCATION); password_label_->SetLines(-1); + password_label_->SetScale(scale); password_label_->SetFont(style.payment_form_labels_font()); - password_label_->SetMinimumHeight(40); + password_label_->SetMinimumHeight(PASSWORD_MIN_HEIGHT.CP(scale)); labels_layout->AddView(password_label_.GetPointer(), 0, nux::MINOR_POSITION_END); return labels_layout; @@ -282,17 +296,18 @@ nux::VLayout *fields_layout = new nux::VLayout(); if (error_message_.empty()) { - fields_layout->SetSpaceBetweenChildren(18); + fields_layout->SetSpaceBetweenChildren(LABELS_CHILDREN_SPACE.CP(scale)); } else { - fields_layout->SetSpaceBetweenChildren(10); + fields_layout->SetSpaceBetweenChildren(TITLE_CHILDREN_SPACE.CP(scale)); } email_ = new StaticCairoText( payment_preview_model_->email.Get(), true, NUX_TRACKER_LOCATION); email_->SetLines(-1); + email_->SetScale(scale); email_->SetFont(style.payment_form_data_font()); fields_layout->AddView(email_.GetPointer(), 1, nux::MINOR_POSITION_START); @@ -301,13 +316,14 @@ payment_preview_model_->payment_method.Get(), true, NUX_TRACKER_LOCATION); payment_->SetLines(-1); + payment_->SetScale(scale); payment_->SetFont(style.payment_form_data_font()); fields_layout->AddView(payment_.GetPointer(), 1, nux::MINOR_POSITION_START); password_entry_ = new TextInput(); - password_entry_->SetMinimumHeight(40); - password_entry_->SetMinimumWidth(240); + password_entry_->SetMinimumHeight(PASSWORD_MIN_HEIGHT.CP(scale)); + password_entry_->SetMinimumWidth(PASSWORD_MIN_WIDTH.CP(scale)); password_entry_->input_hint = _("Password"); fields_layout->AddView(password_entry_.GetPointer(), @@ -322,6 +338,7 @@ StaticCairoText* error = new StaticCairoText( _("Wrong password"), true, NUX_TRACKER_LOCATION); error->SetLines(-1); + error->SetScale(scale); error->SetFont(style.payment_form_data_font()); // ensure it is an error using red error->SetTextColor(style.payment_error_color()); @@ -337,11 +354,11 @@ nux::VLayout *actions_layout = new nux::VLayout(); if (error_message_.empty()) { - actions_layout->SetSpaceBetweenChildren(16); + actions_layout->SetSpaceBetweenChildren(ACTIONS_CHILDREN_SPACE_MAX.CP(scale)); } else { - actions_layout->SetSpaceBetweenChildren(8); + actions_layout->SetSpaceBetweenChildren(ACTIONS_CHILDREN_SPACE_MIN.CP(scale)); } nux::ObjectPtr empty_; @@ -349,6 +366,7 @@ "", true, NUX_TRACKER_LOCATION); empty_->SetLines(-1); + empty_->SetScale(scale); empty_->SetFont(style.payment_form_labels_font()); actions_layout->AddView(empty_.GetPointer(), 1, nux::MINOR_POSITION_START); @@ -374,14 +392,14 @@ actions_buffer_h->AddSpace(0, 1); nux::HLayout* buttons_data_layout = new nux::HLayout(); - buttons_data_layout->SetSpaceBetweenChildren(style.GetSpaceBetweenActions()); + buttons_data_layout->SetSpaceBetweenChildren(style.GetSpaceBetweenActions().CP(scale)); - lock_texture_ = new IconTexture(style.GetLockIcon(), style.GetPaymentLockWidth(), - style.GetPaymentLockHeight()); + lock_texture_ = new IconTexture(style.GetLockIcon(), style.GetPaymentLockWidth().CP(scale), + style.GetPaymentLockHeight().CP(scale)); buttons_data_layout->AddView(lock_texture_.GetPointer(), 0, nux::MINOR_POSITION_CENTER, nux::MINOR_SIZE_FULL, 100.0f, nux::NUX_LAYOUT_BEGIN); - buttons_data_layout->AddSpace(20, 1); + buttons_data_layout->AddSpace(BUTTONS_SPACE.CP(scale), 1); if(buttons_map_[MusicPaymentPreview::CANCEL_PURCHASE_ACTION].GetPointer()) buttons_data_layout->AddView(buttons_map_[MusicPaymentPreview::CANCEL_PURCHASE_ACTION].GetPointer(), 1, nux::MINOR_POSITION_CENTER, nux::MINOR_SIZE_FULL, 100.0f, @@ -413,7 +431,8 @@ previews::Style& style = dash::previews::Style::Instance(); - int width = std::max(0, geo.width - style.GetPanelSplitWidth() - style.GetDetailsLeftMargin() - style.GetDetailsRightMargin()); + int content_width = geo.width - style.GetPanelSplitWidth().CP(scale) - style.GetDetailsLeftMargin().CP(scale) - style.GetDetailsRightMargin().CP(scale); + int width = std::max(0, content_width); if(full_data_layout_) { full_data_layout_->SetMaximumWidth(width); } if(header_layout_) { header_layout_->SetMaximumWidth(width); } @@ -460,6 +479,49 @@ PaymentPreview::SetupViews(); } +void MusicPaymentPreview::UpdateScale(double scale) +{ + PaymentPreview::UpdateScale(scale); + + if (intro_) + intro_->SetScale(scale); + if (email_label_) + email_label_->SetScale(scale); + if (payment_label_) + payment_label_->SetScale(scale); + if (payment_) + payment_->SetScale(scale); + if (password_label_) + password_label_->SetScale(scale); + if (purchase_hint_) + purchase_hint_->SetScale(scale); + if (purchase_prize_) + purchase_prize_->SetScale(scale); + if (purchase_type_) + purchase_type_->SetScale(scale); + if (change_payment_) + change_payment_->SetScale(scale); + if (error_label_) + error_label_->SetScale(scale); + + previews::Style& style = dash::previews::Style::Instance(); + if (lock_texture_) + lock_texture_->SetSize(std::max(style.GetPaymentLockWidth().CP(scale), style.GetPaymentLockHeight().CP(scale))); + + if (password_entry_) + { + password_entry_->SetMinimumHeight(PASSWORD_MIN_HEIGHT.CP(scale)); + password_entry_->SetMinimumWidth(PASSWORD_MIN_WIDTH.CP(scale)); + } + + if (form_layout_) + { + form_layout_->SetSpaceBetweenChildren(TITLE_CHILDREN_SPACE.CP(scale)); + form_layout_->SetMinimumHeight(FORM_MIN_HEIGHT.CP(scale)); + form_layout_->SetLeftAndRightPadding(FORM_PADDING.CP(scale)); + form_layout_->SetTopAndBottomPadding(TITLE_CHILDREN_SPACE.CP(scale)); + } +} } } diff -Nru unity-7.1.2+14.04.20140303/dash/previews/MusicPaymentPreview.h unity-7.2.4+14.04.20141217/dash/previews/MusicPaymentPreview.h --- unity-7.1.2+14.04.20140303/dash/previews/MusicPaymentPreview.h 2014-03-03 16:47:14.000000000 +0000 +++ unity-7.2.4+14.04.20141217/dash/previews/MusicPaymentPreview.h 2014-12-17 20:51:37.000000000 +0000 @@ -90,6 +90,7 @@ void OnActionLinkActivated(ActionLink* link, std::string const& id); virtual void SetupViews(); + virtual void UpdateScale(double scale) override; void PreLayoutManagement(); diff -Nru unity-7.1.2+14.04.20140303/dash/previews/MusicPreview.cpp unity-7.2.4+14.04.20141217/dash/previews/MusicPreview.cpp --- unity-7.1.2+14.04.20140303/dash/previews/MusicPreview.cpp 2014-03-03 16:47:14.000000000 +0000 +++ unity-7.2.4+14.04.20141217/dash/previews/MusicPreview.cpp 2014-12-17 20:51:37.000000000 +0000 @@ -42,14 +42,27 @@ { namespace previews { + +namespace +{ + const RawPixel CHILDREN_SPACE = 16_em; + const RawPixel ICON_LEFT_RIGHT_PADDING = 10_em; + const RawPixel WARNING_MIN_HEIGHT = 50_em; + const RawPixel WARNING_MAX_WIDTH = 300_em; +} + DECLARE_LOGGER(logger, "unity.dash.preview.music"); NUX_IMPLEMENT_OBJECT_TYPE(MusicPreview); MusicPreview::MusicPreview(dash::Preview::Ptr preview_model) : Preview(preview_model) +, actions_layout_(nullptr) +, image_data_layout_(nullptr) +, icon_layout_(nullptr) { SetupViews(); + UpdateScale(scale); } MusicPreview::~MusicPreview() @@ -130,13 +143,13 @@ auto on_mouse_down = [this](int x, int y, unsigned long button_flags, unsigned long key_flags) { this->preview_container_->OnMouseDown(x, y, button_flags, key_flags); }; - nux::HLayout* image_data_layout = new nux::HLayout(); - image_data_layout->SetSpaceBetweenChildren(style.GetPanelSplitWidth()); + image_data_layout_ = new nux::HLayout(); + image_data_layout_->SetSpaceBetweenChildren(style.GetPanelSplitWidth().CP(scale)); ///////////////////// // Image image_ = new CoverArt(); - + image_->scale = scale(); AddChild(image_.GetPointer()); UpdateCoverArtImage(image_.GetPointer()); ///////////////////// @@ -144,20 +157,21 @@ ///////////////////// // App Data Panel full_data_layout_ = new nux::VLayout(); - full_data_layout_->SetPadding(style.GetDetailsTopMargin(), 0, style.GetDetailsBottomMargin(), style.GetDetailsLeftMargin()); - full_data_layout_->SetSpaceBetweenChildren(16); + full_data_layout_->SetPadding(style.GetDetailsTopMargin().CP(scale), 0, style.GetDetailsBottomMargin().CP(scale), style.GetDetailsLeftMargin().CP(scale)); + full_data_layout_->SetSpaceBetweenChildren(CHILDREN_SPACE.CP(scale)); ///////////////////// // Music Info - nux::VLayout* album_data_layout = new nux::VLayout(); - album_data_layout->SetSpaceBetweenChildren(style.GetSpaceBetweenTitleAndSubtitle()); + album_data_layout_ = new nux::VLayout(); + album_data_layout_->SetSpaceBetweenChildren(style.GetSpaceBetweenTitleAndSubtitle().CP(scale)); title_ = new StaticCairoText(preview_model_->title, true, NUX_TRACKER_LOCATION); AddChild(title_.GetPointer()); title_->SetFont(style.title_font().c_str()); title_->SetLines(-1); + title_->SetScale(scale); title_->mouse_click.connect(on_mouse_down); - album_data_layout->AddView(title_.GetPointer(), 1); + album_data_layout_->AddView(title_.GetPointer(), 1); if (!preview_model_->subtitle.Get().empty()) { @@ -165,8 +179,9 @@ AddChild(subtitle_.GetPointer()); subtitle_->SetFont(style.subtitle_size_font().c_str()); subtitle_->SetLines(-1); + subtitle_->SetScale(scale); subtitle_->mouse_click.connect(on_mouse_down); - album_data_layout->AddView(subtitle_.GetPointer(), 1); + album_data_layout_->AddView(subtitle_.GetPointer(), 1); } ///////////////////// @@ -177,6 +192,7 @@ if (tracks_model) { tracks_ = new previews::Tracks(tracks_model, NUX_TRACKER_LOCATION); + tracks_->scale = scale(); AddChild(tracks_.GetPointer()); tracks_->mouse_click.connect(on_mouse_down); } @@ -187,7 +203,7 @@ ///////////////////// // Hints && Actions nux::VLayout* hints_layout = NULL; - nux::Layout* actions_layout = NULL; + actions_layout_ = NULL; bool has_u1_creds = HasUbuntuOneCredentials(); if (has_u1_creds) @@ -197,70 +213,72 @@ hints_layout = new nux::VLayout(); hints_layout->SetSpaceBetweenChildren(0); hints_layout->AddSpace(0, 1); - preview_info_hints_ = new PreviewInfoHintWidget(preview_model_, style.GetInfoHintIconSizeWidth()); + preview_info_hints_ = new PreviewInfoHintWidget(preview_model_, style.GetInfoHintIconSizeWidth().CP(scale)); + preview_info_hints_->scale = scale(); AddChild(preview_info_hints_.GetPointer()); preview_info_hints_->request_close().connect([this]() { preview_container_->request_close.emit(); }); hints_layout->AddView(preview_info_hints_.GetPointer(), 0); // If there are actions, we use a vertical layout action_buttons_.clear(); - actions_layout = BuildVerticalActionsLayout(preview_model_->GetActions(), action_buttons_); - actions_layout->SetLeftAndRightPadding(0, style.GetDetailsRightMargin()); + actions_layout_ = BuildVerticalActionsLayout(preview_model_->GetActions(), action_buttons_); + actions_layout_->SetLeftAndRightPadding(0, style.GetDetailsRightMargin().CP(scale)); } else // otherwise we add a grid layout. { action_buttons_.clear(); - actions_layout = BuildGridActionsLayout(preview_model_->GetActions(), action_buttons_); + actions_layout_ = BuildGridActionsLayout(preview_model_->GetActions(), action_buttons_); if (action_buttons_.size() < 2) hint_actions_layout->AddSpace(0, 1); - actions_layout->SetLeftAndRightPadding(0, style.GetDetailsRightMargin()); + actions_layout_->SetLeftAndRightPadding(0, style.GetDetailsRightMargin().CP(scale)); } } else { // let the user know he needs to connect previews::Style& style = dash::previews::Style::Instance(); - actions_layout = new nux::HLayout(); - nux::VLayout* icon_layout = new nux::VLayout(); - icon_layout->SetLeftAndRightPadding(10); + nux::HLayout* actions_layout = new nux::HLayout(); + icon_layout_ = new nux::VLayout(); + icon_layout_->SetLeftAndRightPadding(ICON_LEFT_RIGHT_PADDING.CP(scale)); warning_texture_ = new IconTexture(style.GetWarningIcon()); - icon_layout->AddView(warning_texture_.GetPointer(), 0, nux::MINOR_POSITION_START, + icon_layout_->AddView(warning_texture_.GetPointer(), 0, nux::MINOR_POSITION_START, nux::MINOR_SIZE_FULL, 100.0f, nux::NUX_LAYOUT_BEGIN); - actions_layout->AddLayout(icon_layout, 0, nux::MINOR_POSITION_CENTER); + actions_layout->AddLayout(icon_layout_, 0, nux::MINOR_POSITION_CENTER); warning_msg_ = new StaticCairoText( no_credentials_message_, true, NUX_TRACKER_LOCATION); - AddChild(warning_msg_.GetPointer()); + AddChild(warning_msg_.GetPointer()); warning_msg_->SetFont(style.u1_warning_font().c_str()); warning_msg_->SetLines(-2); - warning_msg_->SetMinimumHeight(50); - warning_msg_->SetMaximumWidth(300); + warning_msg_->SetScale(scale); + warning_msg_->SetMinimumHeight(WARNING_MIN_HEIGHT.CP(scale)); + warning_msg_->SetMaximumWidth(WARNING_MAX_WIDTH.CP(scale)); actions_layout->AddView(warning_msg_.GetPointer(), 0, nux::MINOR_POSITION_CENTER); } - + ///////////////////// if (hints_layout) hint_actions_layout->AddView(hints_layout, 1); - hint_actions_layout->AddView(actions_layout, 0); + hint_actions_layout->AddView(actions_layout_, 0); - full_data_layout_->AddLayout(album_data_layout, 0); + full_data_layout_->AddLayout(album_data_layout_, 0); if (tracks_) { full_data_layout_->AddView(tracks_.GetPointer(), 1); } full_data_layout_->AddLayout(hint_actions_layout, 0); ///////////////////// - - image_data_layout->AddView(image_.GetPointer(), 0); - image_data_layout->AddLayout(full_data_layout_, 1); + + image_data_layout_->AddView(image_.GetPointer(), 0); + image_data_layout_->AddLayout(full_data_layout_, 1); mouse_click.connect(on_mouse_down); - SetLayout(image_data_layout); + SetLayout(image_data_layout_); } void MusicPreview::PreLayoutManagement() @@ -272,23 +290,23 @@ nux::Geometry geo_art(geo.x, geo.y, style.GetAppImageAspectRatio() * geo.height, geo.height); - if (geo.width - geo_art.width - style.GetPanelSplitWidth() - style.GetDetailsLeftMargin() - style.GetDetailsRightMargin() < style.GetDetailsPanelMinimumWidth()) - geo_art.width = MAX(0, geo.width - style.GetPanelSplitWidth() - style.GetDetailsLeftMargin() - style.GetDetailsRightMargin() - style.GetDetailsPanelMinimumWidth()); + int content_width = geo.width - style.GetPanelSplitWidth().CP(scale) - style.GetDetailsLeftMargin().CP(scale) - style.GetDetailsRightMargin().CP(scale); + if (content_width - geo_art.width < style.GetDetailsPanelMinimumWidth().CP(scale)) + geo_art.width = MAX(0, content_width - style.GetDetailsPanelMinimumWidth().CP(scale)); image_->SetMinMaxSize(geo_art.width, geo_art.height); - int details_width = MAX(0, geo.width - geo_art.width - style.GetPanelSplitWidth() - style.GetDetailsLeftMargin() - style.GetDetailsRightMargin()); + int details_width = MAX(0, content_width - geo_art.width); if (title_) { title_->SetMaximumWidth(details_width); } if (subtitle_) { subtitle_->SetMaximumWidth(details_width); } for (nux::AbstractButton* button : action_buttons_) { - int action_width = CLAMP((details_width - style.GetSpaceBetweenActions()) / - 2, 0, style.GetActionButtonMaximumWidth()); + int action_width = CLAMP((details_width - style.GetSpaceBetweenActions().CP(scale)) / 2, 0, style.GetActionButtonMaximumWidth().CP(scale)); // do not use SetMinMax because width has to be able to grow button->SetMinimumWidth(action_width); - button->SetMinimumHeight(style.GetActionButtonHeight()); - button->SetMaximumHeight(style.GetActionButtonHeight()); + button->SetMinimumHeight(style.GetActionButtonHeight().CP(scale)); + button->SetMaximumHeight(style.GetActionButtonHeight().CP(scale)); } Preview::PreLayoutManagement(); @@ -300,6 +318,47 @@ player.Stop(); } +void MusicPreview::UpdateScale(double scale) +{ + Preview::UpdateScale(scale); + + if (tracks_) + tracks_->scale = scale; + + if (preview_info_hints_) + preview_info_hints_->scale = scale; + + if (icon_layout_) + icon_layout_->SetLeftAndRightPadding(ICON_LEFT_RIGHT_PADDING.CP(scale)); + + if (warning_msg_) + { + warning_msg_->SetScale(scale); + warning_msg_->SetMinimumHeight(WARNING_MIN_HEIGHT.CP(scale)); + warning_msg_->SetMaximumWidth(WARNING_MAX_WIDTH.CP(scale)); + } + + previews::Style& style = dash::previews::Style::Instance(); + + if (image_data_layout_) + image_data_layout_->SetSpaceBetweenChildren(style.GetPanelSplitWidth().CP(scale)); + + if (full_data_layout_) + { + full_data_layout_->SetPadding(style.GetDetailsTopMargin().CP(scale), 0, style.GetDetailsBottomMargin().CP(scale), style.GetDetailsLeftMargin().CP(scale)); + full_data_layout_->SetSpaceBetweenChildren(CHILDREN_SPACE.CP(scale)); + } + + if (album_data_layout_) + album_data_layout_->SetSpaceBetweenChildren(style.GetSpaceBetweenTitleAndSubtitle().CP(scale)); + + if (actions_layout_) + actions_layout_->SetLeftAndRightPadding(0, style.GetDetailsRightMargin().CP(scale)); + + if (icon_layout_) + icon_layout_->SetLeftAndRightPadding(ICON_LEFT_RIGHT_PADDING.CP(scale)); +} + } // namespace previews } // namespace dash } // namespace unity diff -Nru unity-7.1.2+14.04.20140303/dash/previews/MusicPreview.h unity-7.2.4+14.04.20141217/dash/previews/MusicPreview.h --- unity-7.1.2+14.04.20140303/dash/previews/MusicPreview.h 2014-03-03 16:47:14.000000000 +0000 +++ unity-7.2.4+14.04.20141217/dash/previews/MusicPreview.h 2014-12-17 20:51:37.000000000 +0000 @@ -24,6 +24,7 @@ #define MUSICPREVIEW_H #include "Preview.h" +#include "unity-shared/OverlayScrollView.h" #include "unity-shared/IconTexture.h" namespace unity @@ -53,6 +54,7 @@ virtual void PreLayoutManagement(); virtual void SetupViews(); + virtual void UpdateScale(double scale); virtual void OnNavigateOut(); @@ -64,6 +66,10 @@ nux::ObjectPtr warning_texture_; std::string no_credentials_message_; + nux::Layout* actions_layout_; + nux::HLayout* image_data_layout_; + nux::VLayout* icon_layout_; + nux::VLayout* album_data_layout_; }; } diff -Nru unity-7.1.2+14.04.20140303/dash/previews/PaymentPreview.cpp unity-7.2.4+14.04.20141217/dash/previews/PaymentPreview.cpp --- unity-7.1.2+14.04.20140303/dash/previews/PaymentPreview.cpp 2014-03-03 16:47:14.000000000 +0000 +++ unity-7.2.4+14.04.20141217/dash/previews/PaymentPreview.cpp 2014-12-17 20:51:54.000000000 +0000 @@ -20,9 +20,12 @@ * Manuel de la Pena * */ -#include #include "PaymentPreview.h" + +#include +#include #include "unity-shared/CoverArt.h" +#include "unity-shared/DashStyle.h" #include "unity-shared/PreviewStyle.h" namespace unity @@ -39,6 +42,15 @@ nux::logging::Logger logger("unity.dash.previews.payment.preview"); +const RawPixel CONTENT_DATA_CHILDREN_SPACE = 5_em; +const RawPixel CONTENT_DATA_PADDING = 10_em; +const RawPixel OVERLAY_LAYOUT_SPACE = 20_em; +const RawPixel HEADER_CHILDREN_SPACE = 10_em; +const RawPixel HEADER_MAX_SIZE = 76_em; +const RawPixel IMAGE_MIN_MAX_SIZE = 64_em; +const RawPixel HEADER_SPACE = 10_em; +const RawPixel LINK_MIN_WIDTH = 178_em; +const RawPixel LINK_MAX_HEIGHT = 34_em; } class OverlaySpinner : public unity::debug::Introspectable, public nux::View @@ -47,6 +59,8 @@ public: OverlaySpinner(); + nux::Property scale; + void Draw(nux::GraphicsEngine& GfxContext, bool force_draw); void DrawContent(nux::GraphicsEngine& GfxContext, bool force_draw); @@ -61,7 +75,7 @@ private: bool OnFrameTimeout(); - nux::BaseTexture* spin_; + nux::ObjectPtr spin_; glib::Source::UniquePtr frame_timeout_; @@ -72,15 +86,19 @@ NUX_IMPLEMENT_OBJECT_TYPE(OverlaySpinner); OverlaySpinner::OverlaySpinner() - : nux::View(NUX_TRACKER_LOCATION), - rotation_(0.0f) + : nux::View(NUX_TRACKER_LOCATION) + , scale(1.0) + , rotation_(0.0f) { - previews::Style& style = dash::previews::Style::Instance(); - - spin_ = style.GetSearchSpinIcon(); + spin_ = dash::Style::Instance().GetSearchSpinIcon(scale); rotate_.Identity(); rotate_.Rotate_z(0.0); + + scale.changed.connect([this] (double scale) { + spin_ = dash::Style::Instance().GetSearchSpinIcon(scale); + QueueDraw(); + }); } void OverlaySpinner::Draw(nux::GraphicsEngine& GfxContext, bool force_draw) @@ -183,8 +201,12 @@ : Preview(preview_model) , data_(nullptr) , full_data_layout_(nullptr) -{ -} +, content_data_layout_(nullptr) +, overlay_layout_(nullptr) +, header_layout_(nullptr) +, body_layout_(nullptr) +, footer_layout_(nullptr) +{} std::string PaymentPreview::GetName() const { @@ -199,18 +221,18 @@ nux::Layout* PaymentPreview::GetHeader() { nux::HLayout* header_data_layout = new nux::HLayout(); - header_data_layout->SetSpaceBetweenChildren(10); - header_data_layout->SetMaximumHeight(76); - header_data_layout->SetMinimumHeight(76); + header_data_layout->SetSpaceBetweenChildren(HEADER_CHILDREN_SPACE.CP(scale)); + header_data_layout->SetMaximumHeight(HEADER_MAX_SIZE.CP(scale)); + header_data_layout->SetMinimumHeight(HEADER_MAX_SIZE.CP(scale)); image_ = new CoverArt(); - image_->SetMinMaxSize(64, 64); + image_->SetMinMaxSize(IMAGE_MIN_MAX_SIZE.CP(scale), IMAGE_MIN_MAX_SIZE.CP(scale)); AddChild(image_.GetPointer()); UpdateCoverArtImage(image_.GetPointer()); header_data_layout->AddView(image_.GetPointer(), 0); header_data_layout->AddLayout(GetTitle(), 0); - header_data_layout->AddSpace(10, 1); + header_data_layout->AddSpace(HEADER_SPACE.CP(scale), 1); header_data_layout->AddLayout(GetPrice(), 0); return header_data_layout; } @@ -223,8 +245,8 @@ link = new ActionLink(action->id, action->display_name, NUX_TRACKER_LOCATION); link->font_hint.Set(style.payment_form_labels_font().c_str()); - link->SetMinimumWidth(178); - link->SetMaximumHeight(34); + link->SetMinimumWidth(LINK_MIN_WIDTH.CP(scale)); + link->SetMaximumHeight(LINK_MAX_HEIGHT.CP(scale)); return link; } @@ -239,8 +261,8 @@ NUX_TRACKER_LOCATION); button->SetFont(style.action_font()); button->SetExtraHint(action->extra_text, style.action_extra_font()); - button->SetMinimumWidth(178); - button->SetMaximumHeight(34); + button->SetMinimumWidth(LINK_MIN_WIDTH.CP(scale)); + button->SetMaximumHeight(LINK_MAX_HEIGHT.CP(scale)); return button; } @@ -327,8 +349,8 @@ // layout to be used to show the info content_data_layout_ = new nux::VLayout(); - content_data_layout_->SetSpaceBetweenChildren(5); - content_data_layout_->SetPadding(10, 10, 0, 10); + content_data_layout_->SetSpaceBetweenChildren(CONTENT_DATA_CHILDREN_SPACE.CP(scale)); + content_data_layout_->SetPadding(CONTENT_DATA_PADDING.CP(scale), CONTENT_DATA_PADDING.CP(scale), 0, CONTENT_DATA_PADDING.CP(scale)); header_layout_ = GetHeader(); @@ -344,21 +366,37 @@ // layout to draw an overlay overlay_layout_ = new nux::VLayout(); - StaticCairoText* calculating = new StaticCairoText( + calculating_ = new StaticCairoText( "Performing purchase", true, NUX_TRACKER_LOCATION); OverlaySpinner* spinner_ = new OverlaySpinner(); - overlay_layout_->AddSpace(20, 1); - overlay_layout_->AddView(calculating, 0, nux::MINOR_POSITION_CENTER); + overlay_layout_->AddSpace(OVERLAY_LAYOUT_SPACE.CP(scale), 1); + overlay_layout_->AddView(calculating_, 0, nux::MINOR_POSITION_CENTER); overlay_layout_->AddView(spinner_, 1, nux::MINOR_POSITION_CENTER); - overlay_layout_->AddSpace(20, 1); + overlay_layout_->AddSpace(OVERLAY_LAYOUT_SPACE.CP(scale), 1); + scale.changed.connect([this, spinner_] (double scale) { spinner_->scale = scale; }); full_data_layout_->AddLayout(overlay_layout_.GetPointer()); + UpdateScale(scale); SetLayout(full_data_layout_.GetPointer()); } +void PaymentPreview::UpdateScale(double scale) +{ + Preview::UpdateScale(scale); + + if (calculating_) + calculating_->SetScale(scale); + + if (content_data_layout_) + { + content_data_layout_->SetSpaceBetweenChildren(CONTENT_DATA_CHILDREN_SPACE.CP(scale)); + content_data_layout_->SetPadding(CONTENT_DATA_PADDING.CP(scale), CONTENT_DATA_PADDING.CP(scale), 0, CONTENT_DATA_PADDING.CP(scale)); + } +} + } } diff -Nru unity-7.1.2+14.04.20140303/dash/previews/PaymentPreview.h unity-7.2.4+14.04.20141217/dash/previews/PaymentPreview.h --- unity-7.1.2+14.04.20140303/dash/previews/PaymentPreview.h 2014-03-03 16:47:14.000000000 +0000 +++ unity-7.2.4+14.04.20141217/dash/previews/PaymentPreview.h 2014-12-17 20:51:37.000000000 +0000 @@ -106,6 +106,7 @@ virtual void LoadActions() = 0; virtual void SetupViews(); + virtual void UpdateScale(double scale) override; virtual void SetupBackground(); nux::ObjectPtr full_data_layout_; @@ -115,6 +116,8 @@ nux::ObjectPtr body_layout_; nux::ObjectPtr footer_layout_; + StaticCairoText* calculating_; + // content elements nux::ObjectPtr image_; diff -Nru unity-7.1.2+14.04.20140303/dash/previews/PreviewContainer.cpp unity-7.2.4+14.04.20141217/dash/previews/PreviewContainer.cpp --- unity-7.1.2+14.04.20140303/dash/previews/PreviewContainer.cpp 2014-03-03 16:47:14.000000000 +0000 +++ unity-7.2.4+14.04.20141217/dash/previews/PreviewContainer.cpp 2014-12-17 20:51:37.000000000 +0000 @@ -23,11 +23,11 @@ #include "PreviewContainer.h" #include #include -#include #include "unity-shared/IntrospectableWrappers.h" #include "unity-shared/TimeUtil.h" #include "unity-shared/PreviewStyle.h" +#include "unity-shared/DashStyle.h" #include "unity-shared/GraphicsUtils.h" #include "PreviewNavigator.h" #include @@ -52,13 +52,15 @@ const int PREVIEW_SPINNER_WAIT = 2000; const std::string ANIMATION_IDLE = "animation-idle"; +const RawPixel CHILDREN_SPACE = 6_em; } class PreviewContent : public nux::Layout, public debug::Introspectable { public: PreviewContent(PreviewContainer*const parent) - : parent_(parent) + : scale(1.0) + , parent_(parent) , progress_(0.0) , curve_progress_(0.0) , animating_(false) @@ -73,9 +75,19 @@ // Need to update the preview geometries when updating the container geo. UpdateAnimationProgress(progress_, curve_progress_); }); - Style& style = previews::Style::Instance(); - spin_= style.GetSearchSpinIcon(32); + spin_ = dash::Style::Instance().GetSearchSpinIcon(scale); + scale.changed.connect(sigc::mem_fun(this, &PreviewContent::UpdateScale)); + } + + void UpdateScale(double scale) + { + spin_ = dash::Style::Instance().GetSearchSpinIcon(scale); + + for (auto* area : GetChildren()) + static_cast(area)->scale = scale; + + QueueDraw(); } // From debug::Introspectable @@ -107,6 +119,7 @@ AddChild(preview.GetPointer()); AddView(preview.GetPointer()); preview->SetVisible(false); + preview->scale = scale(); } else { @@ -355,6 +368,7 @@ sigc::signal start_navigation; sigc::signal continue_navigation; sigc::signal end_navigation; + nux::Property scale; private: PreviewContainer*const parent_; @@ -394,6 +408,7 @@ PreviewContainer::PreviewContainer(NUX_FILE_LINE_DECL) : View(NUX_FILE_LINE_PARAM) + , scale(1.0) , preview_layout_(nullptr) , nav_disabled_(Navigation::NONE) , navigation_progress_speed_(0.0) @@ -408,6 +423,7 @@ key_down.connect(sigc::mem_fun(this, &PreviewContainer::OnKeyDown)); mouse_click.connect(sigc::mem_fun(this, &PreviewContainer::OnMouseDown)); + scale.changed.connect(sigc::mem_fun(this, &PreviewContainer::UpdateScale)); } PreviewContainer::~PreviewContainer() @@ -417,13 +433,12 @@ void PreviewContainer::Preview(dash::Preview::Ptr preview_model, Navigation direction) { previews::Preview::Ptr preview_view = preview_model ? previews::Preview::PreviewForModel(preview_model) : previews::Preview::Ptr(); - + if (preview_view) { preview_view->request_close().connect([this]() { request_close.emit(); }); + preview_layout_->PushPreview(preview_view, direction); } - - preview_layout_->PushPreview(preview_view, direction); } void PreviewContainer::DisableNavButton(Navigation button) @@ -458,29 +473,32 @@ nux::VLayout* layout = new nux::VLayout(); SetLayout(layout); - layout->AddLayout(new nux::SpaceLayout(0,0,style.GetPreviewTopPadding(),style.GetPreviewTopPadding())); + + layout->SetTopAndBottomPadding(style.GetPreviewTopPadding().CP(scale), 0); layout_content_ = new nux::HLayout(); - layout_content_->SetSpaceBetweenChildren(6); + layout_content_->SetSpaceBetweenChildren(CHILDREN_SPACE.CP(scale)); layout->AddLayout(layout_content_, 0, nux::MINOR_POSITION_CENTER, nux::MINOR_SIZE_MATCHCONTENT); layout_content_->AddSpace(0, 1); nav_left_ = new PreviewNavigator(Orientation::LEFT, NUX_TRACKER_LOCATION); AddChild(nav_left_); - nav_left_->SetMinimumWidth(style.GetNavigatorWidth()); - nav_left_->SetMaximumWidth(style.GetNavigatorWidth()); + nav_left_->scale = scale(); + nav_left_->SetMinimumWidth(style.GetNavigatorWidth().CP(scale)); + nav_left_->SetMaximumWidth(style.GetNavigatorWidth().CP(scale)); nav_left_->activated.connect([this]() { navigate_left.emit(); }); layout_content_->AddView(nav_left_, 0, nux::MINOR_POSITION_CENTER, nux::MINOR_SIZE_MATCHCONTENT); preview_layout_ = new PreviewContent(this); - preview_layout_->SetMinMaxSize(style.GetPreviewWidth(), style.GetPreviewHeight()); + preview_layout_->SetMinMaxSize(style.GetPreviewWidth().CP(scale), style.GetPreviewHeight().CP(scale)); AddChild(preview_layout_); layout_content_->AddLayout(preview_layout_, 0, nux::MINOR_POSITION_CENTER, nux::MINOR_SIZE_MATCHCONTENT); nav_right_ = new PreviewNavigator(Orientation::RIGHT, NUX_TRACKER_LOCATION); AddChild(nav_right_); - nav_right_->SetMinimumWidth(style.GetNavigatorWidth()); - nav_right_->SetMaximumWidth(style.GetNavigatorWidth()); + nav_right_->scale = scale(); + nav_right_->SetMinimumWidth(style.GetNavigatorWidth().CP(scale)); + nav_right_->SetMaximumWidth(style.GetNavigatorWidth().CP(scale)); nav_right_->activated.connect([this]() { navigate_right.emit(); }); layout_content_->AddView(nav_right_, 0, nux::MINOR_POSITION_CENTER, nux::MINOR_SIZE_MATCHCONTENT); layout_content_->AddSpace(0, 1); @@ -492,7 +510,7 @@ // reset animation clock. if (navigation_count_ == 0) clock_gettime(CLOCK_MONOTONIC, &last_progress_time_); - + float navigation_progress_remaining = CLAMP((1.0 - preview_layout_->GetAnimationProgress()) + navigation_count_, 1.0f, 10.0f); navigation_count_++; @@ -534,7 +552,7 @@ gfx_engine.GetRenderStates().SetBlend(false); gfx_engine.QRP_Color(GetX(), GetY(), GetWidth(), GetHeight(), nux::Color(0.0f, 0.0f, 0.0f, 0.0f)); } - + // rely on the compiz event loop to come back to us in a nice throttling if (AnimationInProgress()) { @@ -595,11 +613,12 @@ bool PreviewContainer::QueueAnimation() { animation_timer_.reset(); - + timespec current; clock_gettime(CLOCK_MONOTONIC, ¤t); float progress = GetSwipeAnimationProgress(current); - preview_layout_->UpdateAnimationProgress(progress, easeInOutQuart(progress)); // ease in/out. + if (preview_layout_) + preview_layout_->UpdateAnimationProgress(progress, easeInOutQuart(progress)); // ease in/out. last_progress_time_ = current; QueueDraw(); @@ -691,7 +710,30 @@ nux::Geometry PreviewContainer::GetLayoutGeometry() const { - return layout_content_->GetAbsoluteGeometry(); + return layout_content_->GetAbsoluteGeometry(); +} + +void PreviewContainer::UpdateScale(double scale) +{ + previews::Style& style = previews::Style::Instance(); + + GetLayout()->SetTopAndBottomPadding(style.GetPreviewTopPadding().CP(scale), 0); + + preview_layout_->SetMinMaxSize(style.GetPreviewWidth().CP(scale), style.GetPreviewHeight().CP(scale)); + preview_layout_->scale = scale; + + layout_content_->SetSpaceBetweenChildren(CHILDREN_SPACE.CP(scale)); + + nav_left_->SetMinimumWidth(style.GetNavigatorWidth().CP(scale)); + nav_left_->SetMaximumWidth(style.GetNavigatorWidth().CP(scale)); + nav_left_->scale = scale; + + nav_right_->SetMinimumWidth(style.GetNavigatorWidth().CP(scale)); + nav_right_->SetMaximumWidth(style.GetNavigatorWidth().CP(scale)); + nav_right_->scale = scale; + + QueueRelayout(); + QueueDraw(); } } // namespace previews diff -Nru unity-7.1.2+14.04.20140303/dash/previews/PreviewContainer.h unity-7.2.4+14.04.20141217/dash/previews/PreviewContainer.h --- unity-7.1.2+14.04.20140303/dash/previews/PreviewContainer.h 2014-03-03 16:47:14.000000000 +0000 +++ unity-7.2.4+14.04.20141217/dash/previews/PreviewContainer.h 2014-12-17 20:51:37.000000000 +0000 @@ -25,6 +25,7 @@ #include #include +#include #include #include "Preview.h" #include "unity-shared/Introspectable.h" @@ -74,6 +75,8 @@ sigc::signal navigate_right; sigc::signal request_close; + nux::Property scale; + bool AcceptKeyNavFocus(); nux::Area* KeyNavIteration(nux::KeyNavDirection direction); @@ -91,7 +94,7 @@ bool InspectKeyEvent(unsigned int eventType, unsigned int keysym, const char* character); void OnKeyDown(unsigned long event_type, unsigned long event_keysym, unsigned long event_state, const TCHAR* character, unsigned short key_repeat_count); - + private: void SetupViews(); @@ -101,6 +104,8 @@ bool QueueAnimation(); private: + void UpdateScale(double scale); + // View related nux::HLayout* layout_content_; PreviewNavigator* nav_left_; @@ -112,7 +117,7 @@ struct timespec last_progress_time_; float navigation_progress_speed_; int navigation_count_; - + glib::Source::UniquePtr animation_timer_; friend class PreviewContent; }; diff -Nru unity-7.1.2+14.04.20140303/dash/previews/Preview.cpp unity-7.2.4+14.04.20141217/dash/previews/Preview.cpp --- unity-7.1.2+14.04.20140303/dash/previews/Preview.cpp 2014-03-03 16:47:14.000000000 +0000 +++ unity-7.2.4+14.04.20141217/dash/previews/Preview.cpp 2014-12-17 20:51:37.000000000 +0000 @@ -38,6 +38,7 @@ #include "MusicPaymentPreview.h" #include "SocialPreview.h" #include "PreviewInfoHintWidget.h" +#include "ActionButton.h" namespace unity { @@ -100,14 +101,16 @@ Preview::Preview(dash::Preview::Ptr preview_model) : View(NUX_TRACKER_LOCATION) + , scale(1.0f) , preview_model_(preview_model) , tab_iterator_(new TabIterator()) , full_data_layout_(nullptr) , image_(nullptr) , title_(nullptr) , subtitle_(nullptr) + , preview_container_(new PreviewContainer) { - preview_container_ = new PreviewContainer; + scale.changed.connect(sigc::mem_fun(this, &Preview::UpdateScale)); } Preview::~Preview() @@ -138,13 +141,13 @@ previews::Style& style = dash::previews::Style::Instance(); nux::VLayout* actions_layout_v = new nux::VLayout(); - actions_layout_v->SetSpaceBetweenChildren(style.GetSpaceBetweenActions()); + actions_layout_v->SetSpaceBetweenChildren(style.GetSpaceBetweenActions().CP(scale)); uint rows = actions.size() / 2 + ((actions.size() % 2 > 0) ? 1 : 0); uint action_iter = 0; for (uint i = 0; i < rows; i++) { nux::HLayout* actions_layout_h = new TabIteratorHLayout(tab_iterator_); - actions_layout_h->SetSpaceBetweenChildren(style.GetSpaceBetweenActions()); + actions_layout_h->SetSpaceBetweenChildren(style.GetSpaceBetweenActions().CP(scale)); for (uint j = 0; j < 2 && action_iter < actions.size(); j++, action_iter++) { @@ -172,7 +175,7 @@ previews::Style& style = dash::previews::Style::Instance(); nux::VLayout* actions_layout_v = new TabIteratorVLayout(tab_iterator_); - actions_layout_v->SetSpaceBetweenChildren(style.GetSpaceBetweenActions()); + actions_layout_v->SetSpaceBetweenChildren(style.GetSpaceBetweenActions().CP(scale)); uint action_iter = 0; for (uint i = 0; i < actions.size(); i++) @@ -215,7 +218,7 @@ else cover_art->SetNoImageAvailable(); cover_art->SetFont(style.no_preview_image_font()); - + cover_art->mouse_click.connect(on_mouse_down); } @@ -279,6 +282,37 @@ return preview_container_->request_close; } +void Preview::UpdateScale(double scale) +{ + if (image_) + image_->scale = scale; + + if (title_) + title_->SetScale(scale); + if (subtitle_) + subtitle_->SetScale(scale); + if (description_) + description_->SetScale(scale); + + if (preview_container_) + preview_container_->scale = scale; + + if (preview_info_hints_) + preview_info_hints_->scale = scale; + + for (nux::AbstractButton* button : action_buttons_) + { + if (ActionButton* bn = dynamic_cast(button)) + bn->scale = scale; + + if (ActionLink* link = dynamic_cast(button)) + link->scale = scale; + } + + QueueRelayout(); + QueueDraw(); } -} -} + +} // preview +} // dash +} // unity diff -Nru unity-7.1.2+14.04.20140303/dash/previews/Preview.h unity-7.2.4+14.04.20141217/dash/previews/Preview.h --- unity-7.1.2+14.04.20140303/dash/previews/Preview.h 2014-03-03 16:47:14.000000000 +0000 +++ unity-7.2.4+14.04.20141217/dash/previews/Preview.h 2014-12-17 20:51:37.000000000 +0000 @@ -74,6 +74,8 @@ unsigned long special_keys_state); virtual nux::Area* KeyNavIteration(nux::KeyNavDirection direction); + nux::Property scale; + protected: virtual void Draw(nux::GraphicsEngine& GfxContext, bool force_draw) {} virtual void DrawContent(nux::GraphicsEngine& GfxContext, bool force_draw) {} @@ -88,6 +90,8 @@ virtual void SetupViews() = 0; + virtual void UpdateScale(double scale); + nux::Layout* BuildGridActionsLayout(dash::Preview::ActionPtrList actions, std::list& buttons); nux::Layout* BuildVerticalActionsLayout(dash::Preview::ActionPtrList actions, std::list& buttons); diff -Nru unity-7.1.2+14.04.20140303/dash/previews/PreviewInfoHintWidget.cpp unity-7.2.4+14.04.20141217/dash/previews/PreviewInfoHintWidget.cpp --- unity-7.1.2+14.04.20140303/dash/previews/PreviewInfoHintWidget.cpp 2014-03-03 16:47:14.000000000 +0000 +++ unity-7.2.4+14.04.20141217/dash/previews/PreviewInfoHintWidget.cpp 2014-12-17 20:51:37.000000000 +0000 @@ -17,6 +17,7 @@ * * * Authored by: Nick Dedekind + * Marco Trevisan * */ @@ -41,21 +42,23 @@ DECLARE_LOGGER(logger, "unity.dash.preview.infohintwidget"); namespace { -const int layout_spacing = 12; +const RawPixel LAYOUT_SPACING = 12_em; +const RawPixel HINTS_SPACING = 6_em; } NUX_IMPLEMENT_OBJECT_TYPE(PreviewInfoHintWidget); PreviewInfoHintWidget::PreviewInfoHintWidget(dash::Preview::Ptr preview_model, int icon_size) : View(NUX_TRACKER_LOCATION) +, scale(1.0) , icon_size_(icon_size) +, layout_(nullptr) +, info_names_layout_(nullptr) +, info_values_layout_(nullptr) , preview_model_(preview_model) { SetupViews(); -} - -PreviewInfoHintWidget::~PreviewInfoHintWidget() -{ + scale.changed.connect(sigc::mem_fun(this, &PreviewInfoHintWidget::UpdateScale)); } void PreviewInfoHintWidget::Draw(nux::GraphicsEngine& gfx_engine, bool force_draw) @@ -96,7 +99,7 @@ { std::stringstream ss; const GVariantType* info_hint_type = g_variant_get_type(variant); - + if (g_variant_type_equal(info_hint_type, G_VARIANT_TYPE_BOOLEAN)) { ss << g_variant_get_int16(variant); @@ -144,96 +147,89 @@ void PreviewInfoHintWidget::SetupViews() { RemoveLayout(); - info_hints_.clear(); - - previews::Style& style = previews::Style::Instance(); + auto& style = previews::Style::Instance(); auto on_mouse_down = [this](int x, int y, unsigned long button_flags, unsigned long key_flags) { this->preview_container_.OnMouseDown(x, y, button_flags, key_flags); }; - nux::VLayout* layout = new nux::VLayout(); - layout->SetSpaceBetweenChildren(6); - - for (dash::Preview::InfoHintPtr info_hint : preview_model_->GetInfoHints()) - { - nux::HLayout* hint_layout = new nux::HLayout(); - hint_layout->SetSpaceBetweenChildren(layout_spacing); + layout_ = new nux::HLayout(); + layout_->SetSpaceBetweenChildren(LAYOUT_SPACING.CP(scale)); - StaticCairoTextPtr info_name; - if (!info_hint->display_name.empty()) - { - // The "%s" is used in the dash preview to display the ": " infos - std::string tmp_display_name = glib::String(g_strdup_printf (_("%s:"), info_hint->display_name.c_str())).Str(); + auto *hint_vlayout = new nux::VLayout(); + hint_vlayout->SetSpaceBetweenChildren(HINTS_SPACING.CP(scale)); + layout_->AddLayout(hint_vlayout); + info_names_layout_ = hint_vlayout; + + hint_vlayout = new nux::VLayout(); + hint_vlayout->SetSpaceBetweenChildren(HINTS_SPACING.CP(scale)); + layout_->AddLayout(hint_vlayout); + info_values_layout_ = hint_vlayout; - info_name = new StaticCairoText(tmp_display_name, true, NUX_TRACKER_LOCATION); - info_name->SetFont(style.info_hint_bold_font()); - info_name->SetLines(-1); - info_name->SetTextAlignment(StaticCairoText::NUX_ALIGN_RIGHT); - info_name->mouse_click.connect(on_mouse_down); - hint_layout->AddView(info_name.GetPointer(), 0, nux::MINOR_POSITION_CENTER); - } + for (dash::Preview::InfoHintPtr const& info_hint : preview_model_->GetInfoHints()) + { + // The "%s" is used in the dash preview to display the ": " infos + auto const& name = glib::String(g_strdup_printf (_("%s:"), info_hint->display_name.c_str())).Str(); + auto* info_name = new StaticCairoText(name == ":" ? "" : name, true, NUX_TRACKER_LOCATION); + info_name->SetFont(style.info_hint_bold_font()); + info_name->SetLines(-1); + info_name->SetScale(scale); + info_name->SetTextAlignment(StaticCairoText::NUX_ALIGN_RIGHT); + info_name->SetMinimumWidth(style.GetInfoHintNameMinimumWidth().CP(scale)); + info_name->SetMaximumWidth(style.GetInfoHintNameMaximumWidth().CP(scale)); + info_name->mouse_click.connect(on_mouse_down); + info_names_layout_->AddView(info_name, 1, nux::MINOR_POSITION_RIGHT); - StaticCairoTextPtr info_value(new StaticCairoText(StringFromVariant(info_hint->value), true, NUX_TRACKER_LOCATION)); + auto* info_value = new StaticCairoText(StringFromVariant(info_hint->value), true, NUX_TRACKER_LOCATION); info_value->SetFont(style.info_hint_font()); info_value->SetLines(-1); + info_value->SetScale(scale); info_value->mouse_click.connect(on_mouse_down); - hint_layout->AddView(info_value.GetPointer(), 1, nux::MINOR_POSITION_CENTER); - - InfoHint info_hint_views(info_name, info_value); - info_hints_.push_back(info_hint_views); - - layout->AddLayout(hint_layout, 0); + info_values_layout_->AddView(info_value, 1, nux::MINOR_POSITION_LEFT); } mouse_click.connect(on_mouse_down); - SetLayout(layout); + SetLayout(layout_); } void PreviewInfoHintWidget::PreLayoutManagement() { - previews::Style& style = previews::Style::Instance(); - nux::Geometry const& geo = GetGeometry(); - - int info_hint_width = 0; - for (InfoHint const& info_hint : info_hints_) + if (info_names_layout_ && info_values_layout_) { - int width = style.GetInfoHintNameMinimumWidth(); - if (info_hint.first) - { - width = info_hint.first->GetTextExtents().width; - - if (width < style.GetInfoHintNameMinimumWidth()) - width = style.GetInfoHintNameMinimumWidth(); - else if (width > style.GetInfoHintNameMaximumWidth()) - width = style.GetInfoHintNameMaximumWidth(); - } + nux::Geometry const& geo = GetGeometry(); + info_names_layout_->SetMaximumWidth(info_names_layout_->GetContentWidth()); + int max_width = std::max(0, geo.width - info_names_layout_->GetWidth() - LAYOUT_SPACING.CP(scale) -1); - if (info_hint_width < width) - { - info_hint_width = width; - } + for (auto value : info_values_layout_->GetChildren()) + value->SetMaximumWidth(max_width); } - int info_value_width = geo.width; - info_value_width -= layout_spacing; - info_value_width -= info_hint_width; - info_value_width = MAX(0, info_value_width); + View::PreLayoutManagement(); +} + +void PreviewInfoHintWidget::UpdateScale(double scale) +{ + if (layout_) + layout_->SetSpaceBetweenChildren(LAYOUT_SPACING.CP(scale)); - for (InfoHint const& info_hint : info_hints_) + if (info_names_layout_) { - if (info_hint.first) - { - info_hint.first->SetMinimumWidth(info_hint_width); - info_hint.first->SetMaximumWidth(info_hint_width); - } - if (info_hint.second) - { - info_hint.second->SetMaximumWidth(info_value_width); - } + info_names_layout_->SetSpaceBetweenChildren(HINTS_SPACING.CP(scale)); + + for (auto* area : info_names_layout_->GetChildren()) + static_cast(area)->SetScale(scale); } - View::PreLayoutManagement(); + if (info_values_layout_) + { + info_values_layout_->SetSpaceBetweenChildren(HINTS_SPACING.CP(scale)); + + for (auto* area : info_values_layout_->GetChildren()) + static_cast(area)->SetScale(scale); + } + + QueueRelayout(); + QueueDraw(); } } // namespace previews diff -Nru unity-7.1.2+14.04.20140303/dash/previews/PreviewInfoHintWidget.h unity-7.2.4+14.04.20141217/dash/previews/PreviewInfoHintWidget.h --- unity-7.1.2+14.04.20140303/dash/previews/PreviewInfoHintWidget.h 2014-03-03 16:47:14.000000000 +0000 +++ unity-7.2.4+14.04.20141217/dash/previews/PreviewInfoHintWidget.h 2014-12-17 20:51:37.000000000 +0000 @@ -48,12 +48,13 @@ NUX_DECLARE_OBJECT_TYPE(PreviewInfoHintWidget, nux::View); PreviewInfoHintWidget(dash::Preview::Ptr preview_model, int icon_size); - virtual ~PreviewInfoHintWidget(); + + nux::Property scale; // From debug::Introspectable std::string GetName() const; void AddProperties(debug::IntrospectionData&); - + void PreLayoutManagement(); sigc::signal request_close() const { return preview_container_.request_close; } @@ -61,7 +62,7 @@ protected: virtual void Draw(nux::GraphicsEngine& GfxContext, bool force_draw); virtual void DrawContent(nux::GraphicsEngine& GfxContext, bool force_draw); - + virtual bool AcceptKeyNavFocus() { return false; } void SetupBackground(); @@ -74,16 +75,16 @@ protected: int icon_size_; + nux::HLayout* layout_; + nux::VLayout* info_names_layout_; + nux::VLayout* info_values_layout_; - typedef nux::ObjectPtr StaticCairoTextPtr; - typedef std::pair InfoHint; - std::list info_hints_; - dash::Preview::Ptr preview_model_; - typedef nux::ObjectPtr BaseTexturePtr; private: PreviewContainer preview_container_; + + void UpdateScale(double scale); }; } // namespace previews diff -Nru unity-7.1.2+14.04.20140303/dash/previews/PreviewNavigator.cpp unity-7.2.4+14.04.20141217/dash/previews/PreviewNavigator.cpp --- unity-7.1.2+14.04.20140303/dash/previews/PreviewNavigator.cpp 2014-03-03 16:47:14.000000000 +0000 +++ unity-7.2.4+14.04.20141217/dash/previews/PreviewNavigator.cpp 2014-12-17 20:51:37.000000000 +0000 @@ -40,12 +40,16 @@ PreviewNavigator::PreviewNavigator(Orientation direction, NUX_FILE_LINE_DECL) : View(NUX_FILE_LINE_PARAM) + , scale(1.0) , direction_(direction) , texture_(nullptr) , visual_state_(VisualState::NORMAL) { SetupViews(); UpdateTexture(); + + UpdateScale(scale); + scale.changed.connect(sigc::mem_fun(this, &PreviewNavigator::UpdateScale)); } void PreviewNavigator::SetEnabled(bool enabled) @@ -97,7 +101,7 @@ void PreviewNavigator::SetupViews() { previews::Style& style = dash::previews::Style::Instance(); - + if (direction_ == Orientation::LEFT || direction_ == Orientation::RIGHT) { nux::VLayout* vlayout = new nux::VLayout(); @@ -107,9 +111,9 @@ layout_ = hlayout; if (direction_ == Orientation::LEFT) - texture_ = new IconTexture(Style::Instance().GetNavLeftIcon(), style.GetNavigatorIconSize(), style.GetNavigatorIconSize()); - else - texture_ = new IconTexture(Style::Instance().GetNavRightIcon(), style.GetNavigatorIconSize(), style.GetNavigatorIconSize()); + texture_ = new IconTexture(Style::Instance().GetNavLeftIcon(), style.GetNavigatorIconSize().CP(scale), style.GetNavigatorIconSize().CP(scale)); + else + texture_ = new IconTexture(Style::Instance().GetNavRightIcon(), style.GetNavigatorIconSize().CP(scale), style.GetNavigatorIconSize().CP(scale)); texture_->SetDrawMode(IconTexture::DrawMode::STRETCH_WITH_ASPECT); vlayout->AddSpace(0,1); @@ -138,7 +142,7 @@ if (texture_) { AddChild(texture_); - layout_->AddView(texture_, 0, nux::MINOR_POSITION_CENTER, nux::MINOR_SIZE_FULL); + layout_->AddView(texture_, 0, nux::MINOR_POSITION_CENTER, nux::MINOR_SIZE_FULL); texture_->mouse_click.connect([this](int, int, unsigned long, unsigned long) { activated.emit(); }); texture_->mouse_enter.connect(sigc::mem_fun(this, &PreviewNavigator::TexRecvMouseEnter)); @@ -179,6 +183,19 @@ } } +void PreviewNavigator::UpdateScale(double scale) +{ + previews::Style& style = dash::previews::Style::Instance(); + + if (texture_) + { + int icon_size = style.GetNavigatorIconSize().CP(scale); + texture_->SetMinMaxSize(icon_size, icon_size); + } + + QueueRelayout(); + QueueDraw(); +} } // namespace previews } // namespace dash diff -Nru unity-7.1.2+14.04.20140303/dash/previews/PreviewNavigator.h unity-7.2.4+14.04.20141217/dash/previews/PreviewNavigator.h --- unity-7.1.2+14.04.20140303/dash/previews/PreviewNavigator.h 2014-03-03 16:47:14.000000000 +0000 +++ unity-7.2.4+14.04.20141217/dash/previews/PreviewNavigator.h 2014-12-17 20:51:37.000000000 +0000 @@ -43,7 +43,7 @@ { NUX_DECLARE_OBJECT_TYPE(PreviewNavigator, nux::View); public: - typedef nux::ObjectPtr Ptr; + typedef nux::ObjectPtr Ptr; PreviewNavigator(Orientation direction, NUX_FILE_LINE_PROTO); void SetEnabled(bool enabled); @@ -53,9 +53,11 @@ void AddProperties(debug::IntrospectionData&); sigc::signal activated; - + virtual bool AcceptKeyNavFocus() { return false; } + nux::Property scale; + private: virtual void Draw(nux::GraphicsEngine& gfx_engine, bool force_draw); virtual void DrawContent(nux::GraphicsEngine& gfx_engine, bool force_draw); @@ -66,6 +68,7 @@ void UpdateTexture(); void SetupViews(); + void UpdateScale(double scale); private: const Orientation direction_; @@ -77,11 +80,12 @@ NORMAL, ACTIVE }; - VisualState visual_state_; + VisualState visual_state_; + }; } // namespace previews } // namespace dash } // namespace unity -#endif // PREVIEWNAVIGATOR_H \ No newline at end of file +#endif // PREVIEWNAVIGATOR_H diff -Nru unity-7.1.2+14.04.20140303/dash/previews/PreviewRatingsWidget.cpp unity-7.2.4+14.04.20141217/dash/previews/PreviewRatingsWidget.cpp --- unity-7.1.2+14.04.20140303/dash/previews/PreviewRatingsWidget.cpp 2014-03-03 16:47:14.000000000 +0000 +++ unity-7.2.4+14.04.20141217/dash/previews/PreviewRatingsWidget.cpp 2014-12-17 20:51:37.000000000 +0000 @@ -29,6 +29,7 @@ #include "unity-shared/RatingsButton.h" #include "unity-shared/StaticCairoText.h" #include "unity-shared/PreviewStyle.h" +#include "unity-shared/DashStyle.h" #include "PreviewRatingsWidget.h" namespace unity @@ -38,35 +39,44 @@ namespace previews { +namespace +{ + const RawPixel CHILDREN_SPACE = 3_em; + const int RATINGS_SIZE = 18; + const int RATINGS_GAP = 2; +} + NUX_IMPLEMENT_OBJECT_TYPE(PreviewRatingsWidget); PreviewRatingsWidget::PreviewRatingsWidget(NUX_FILE_LINE_DECL) : View(NUX_FILE_LINE_PARAM) + , scale(1.0) { - nux::VLayout* layout = new nux::VLayout(); - layout->SetSpaceBetweenChildren(3); + layout_ = new nux::VLayout(); + layout_->SetSpaceBetweenChildren(CHILDREN_SPACE.CP(scale)); previews::Style& style = previews::Style::Instance(); auto on_mouse_down = [this](int x, int y, unsigned long button_flags, unsigned long key_flags) { this->preview_container_.OnMouseDown(x, y, button_flags, key_flags); }; - ratings_ = new RatingsButton(18,2); + ratings_ = new RatingsButton(RATINGS_SIZE, RATINGS_GAP); ratings_->SetEditable(false); ratings_->mouse_click.connect(on_mouse_down); - layout->AddView(ratings_); - + ratings_->scale = scale(); + layout_->AddView(ratings_); + reviews_ = new StaticCairoText("", NUX_TRACKER_LOCATION); reviews_->SetFont(style.user_rating_font()); + reviews_->SetScale(scale); reviews_->mouse_click.connect(on_mouse_down); - layout->AddView(reviews_); + layout_->AddView(reviews_); mouse_click.connect(on_mouse_down); - SetLayout(layout); -} + SetLayout(layout_); -PreviewRatingsWidget::~PreviewRatingsWidget() -{ + UpdateScale(scale); + scale.changed.connect(sigc::mem_fun(this, &PreviewRatingsWidget::UpdateScale)); } void PreviewRatingsWidget::SetRating(float rating) @@ -114,6 +124,17 @@ .add(GetAbsoluteGeometry()); } +void PreviewRatingsWidget::UpdateScale(double scale) +{ + reviews_->SetScale(scale); + ratings_->scale = scale; + preview_container_.scale = scale; + layout_->SetSpaceBetweenChildren(CHILDREN_SPACE.CP(scale)); + + QueueRelayout(); + QueueDraw(); +} + } // namespace previews } // namespace dash } // namespace unity diff -Nru unity-7.1.2+14.04.20140303/dash/previews/PreviewRatingsWidget.h unity-7.2.4+14.04.20141217/dash/previews/PreviewRatingsWidget.h --- unity-7.1.2+14.04.20140303/dash/previews/PreviewRatingsWidget.h 2014-03-03 16:47:14.000000000 +0000 +++ unity-7.2.4+14.04.20141217/dash/previews/PreviewRatingsWidget.h 2014-12-17 20:51:37.000000000 +0000 @@ -45,19 +45,20 @@ NUX_DECLARE_OBJECT_TYPE(PreviewRatingsWidget, nux::View); public: PreviewRatingsWidget(NUX_FILE_LINE_PROTO); - virtual ~PreviewRatingsWidget(); void SetRating(float rating); float GetRating() const; void SetReviews(int count); + nux::Property scale; + sigc::signal request_close() const { return preview_container_.request_close; } protected: virtual void Draw(nux::GraphicsEngine& GfxContext, bool force_draw); virtual void DrawContent(nux::GraphicsEngine& GfxContext, bool force_draw); - + virtual bool AcceptKeyNavFocus() { return false; } // From debug::Introspectable @@ -65,9 +66,13 @@ void AddProperties(debug::IntrospectionData&); private: + void UpdateScale(double scale); + RatingsButton* ratings_; StaticCairoText* reviews_; + nux::VLayout* layout_; + PreviewContainer preview_container_; }; diff -Nru unity-7.1.2+14.04.20140303/dash/previews/SocialPreviewComments.cpp unity-7.2.4+14.04.20141217/dash/previews/SocialPreviewComments.cpp --- unity-7.1.2+14.04.20140303/dash/previews/SocialPreviewComments.cpp 2014-03-03 16:47:14.000000000 +0000 +++ unity-7.2.4+14.04.20141217/dash/previews/SocialPreviewComments.cpp 2014-12-17 20:51:37.000000000 +0000 @@ -40,20 +40,19 @@ namespace { -const int layout_spacing = 12; +const RawPixel LAYOUT_SPACING = 12_em; +const RawPixel CHILDREN_SPACE = 6_em; } NUX_IMPLEMENT_OBJECT_TYPE(SocialPreviewComments); SocialPreviewComments::SocialPreviewComments(dash::Preview::Ptr preview_model, NUX_FILE_LINE_DECL) : View(NUX_FILE_LINE_PARAM) +, scale(1.0) , preview_model_(preview_model) { SetupViews(); -} - -SocialPreviewComments::~SocialPreviewComments() -{ + scale.changed.connect(sigc::hide(sigc::mem_fun(this, &SocialPreviewComments::SetupViews))); } void SocialPreviewComments::Draw(nux::GraphicsEngine& gfx_engine, bool force_draw) @@ -85,24 +84,20 @@ nux::Geometry const& geo = GetGeometry(); int comment_width = 0; + int minimum_detail_width = style.GetDetailsPanelMinimumWidth().CP(scale); + for (Comment const& comment : comments_) { - int width = style.GetDetailsPanelMinimumWidth(); - if (comment.first) - { - width = comment.first->GetTextExtents().width; + int width = minimum_detail_width; - if (width < style.GetDetailsPanelMinimumWidth()) - width = style.GetDetailsPanelMinimumWidth(); - } + if (comment.first) + width = std::max(minimum_detail_width, comment.first->GetTextExtents().width); if (comment_width < width) - { comment_width = width; - } } - int comment_value_width = MAX(0, geo.width - style.GetDetailsLeftMargin() - style.GetDetailsRightMargin()); + int comment_value_width = MAX(0, geo.width - style.GetDetailsLeftMargin().CP(scale) - style.GetDetailsRightMargin().CP(scale)); for (Comment const& comment : comments_) { @@ -122,7 +117,6 @@ { dash::SocialPreview* social_preview_model = dynamic_cast(preview_model_.get()); - RemoveLayout(); comments_.clear(); @@ -131,13 +125,12 @@ auto on_mouse_down = [this](int x, int y, unsigned long button_flags, unsigned long key_flags) { this->preview_container_.OnMouseDown(x, y, button_flags, key_flags); }; nux::VLayout* layout = new nux::VLayout(); - layout->SetSpaceBetweenChildren(6); + layout->SetSpaceBetweenChildren(CHILDREN_SPACE.CP(scale)); for (dash::SocialPreview::CommentPtr comment : social_preview_model->GetComments()) { - nux::HLayout* name_layout = new nux::HLayout(); - name_layout->SetSpaceBetweenChildren(layout_spacing); + name_layout->SetSpaceBetweenChildren(LAYOUT_SPACING.CP(scale)); StaticCairoTextPtr comment_name; if (!comment->display_name.empty()) @@ -145,6 +138,7 @@ comment_name = new StaticCairoText(comment->display_name, true, NUX_TRACKER_LOCATION); comment_name->SetFont(style.info_hint_bold_font()); comment_name->SetLines(-1); + comment_name->SetScale(scale); comment_name->SetTextAlignment(StaticCairoText::NUX_ALIGN_LEFT); comment_name->mouse_click.connect(on_mouse_down); name_layout->AddView(comment_name.GetPointer(), 0, nux::MINOR_POSITION_START); @@ -156,19 +150,20 @@ comment_time = new StaticCairoText(comment->time, true, NUX_TRACKER_LOCATION); comment_time->SetFont(style.info_hint_font()); comment_time->SetLines(-1); + comment_time->SetScale(scale); comment_time->SetTextAlignment(StaticCairoText::NUX_ALIGN_RIGHT); comment_time->mouse_click.connect(on_mouse_down); name_layout->AddView(comment_time.GetPointer(), 0, nux::MINOR_POSITION_START); } - nux::HLayout* comment_layout = new nux::HLayout(); - comment_layout->SetSpaceBetweenChildren(layout_spacing); + comment_layout->SetSpaceBetweenChildren(LAYOUT_SPACING.CP(scale)); StaticCairoTextPtr comment_value(new StaticCairoText(comment->content, false, NUX_TRACKER_LOCATION)); comment_value->SetFont(style.info_hint_font()); comment_value->SetLines(-7); + comment_value->SetScale(scale); comment_value->SetTextAlignment(StaticCairoText::NUX_ALIGN_LEFT); comment_value->mouse_click.connect(on_mouse_down); comment_layout->AddView(comment_value.GetPointer(), 1, nux::MINOR_POSITION_START); @@ -182,7 +177,6 @@ mouse_click.connect(on_mouse_down); SetLayout(layout); - } std::string SocialPreviewComments::GetName() const diff -Nru unity-7.1.2+14.04.20140303/dash/previews/SocialPreviewComments.h unity-7.2.4+14.04.20141217/dash/previews/SocialPreviewComments.h --- unity-7.1.2+14.04.20140303/dash/previews/SocialPreviewComments.h 2014-03-03 16:47:14.000000000 +0000 +++ unity-7.2.4+14.04.20141217/dash/previews/SocialPreviewComments.h 2014-12-17 20:51:37.000000000 +0000 @@ -46,12 +46,11 @@ SocialPreviewComments(dash::Preview::Ptr preview_model, NUX_FILE_LINE_PROTO); - virtual ~SocialPreviewComments(); + nux::Property scale; sigc::signal request_close() const { return preview_container_.request_close; } protected: - typedef nux::ObjectPtr StaticCairoTextPtr; typedef std::pair Comment; std::list comments_; @@ -70,9 +69,6 @@ virtual void AddProperties(debug::IntrospectionData&); private: - - typedef std::unique_ptr NuxCairoPtr; - PreviewContainer preview_container_; }; diff -Nru unity-7.1.2+14.04.20140303/dash/previews/SocialPreviewContent.cpp unity-7.2.4+14.04.20141217/dash/previews/SocialPreviewContent.cpp --- unity-7.1.2+14.04.20140303/dash/previews/SocialPreviewContent.cpp 2014-03-03 16:47:14.000000000 +0000 +++ unity-7.2.4+14.04.20141217/dash/previews/SocialPreviewContent.cpp 2014-12-17 20:51:37.000000000 +0000 @@ -38,16 +38,17 @@ namespace { -const int BUBBLE_WIDTH = 300; -const int BUBBLE_HEIGHT = 250; -const int TAIL_HEIGHT = 50; +const RawPixel BUBBLE_WIDTH = 300_em; +const RawPixel BUBBLE_HEIGHT = 250_em; +const RawPixel TAIL_HEIGHT = 50_em; const int TAIL_POS_FROM_RIGHT = 60; +const RawPixel TEXT_LINE_SPACING = 5_em; } -inline nux::Geometry GetBubbleGeometry(nux::Geometry const& geo) +inline nux::Geometry GetBubbleGeometry(nux::Geometry const& geo, double scale) { - int width = MIN(BUBBLE_WIDTH, geo.width); - int height = MIN(BUBBLE_HEIGHT + TAIL_HEIGHT, geo.height); + int width = std::min(BUBBLE_WIDTH.CP(scale), geo.width); + int height = std::min(BUBBLE_HEIGHT.CP(scale) + TAIL_HEIGHT.CP(scale), geo.height); return nux::Geometry(geo.x + (geo.width - width)/2, geo.y + (geo.height - height)/2, width, height); } @@ -56,14 +57,13 @@ SocialPreviewContent::SocialPreviewContent(std::string const& text, NUX_FILE_LINE_DECL) : View(NUX_FILE_LINE_PARAM) +, scale(1.0) { SetupViews(); if (text.length() > 0) SetText(text); -} - -SocialPreviewContent::~SocialPreviewContent() -{ + UpdateScale(scale); + scale.changed.connect(sigc::mem_fun(this, &SocialPreviewContent::UpdateScale)); } void SocialPreviewContent::SetText(std::string const& text) @@ -94,7 +94,7 @@ nux::ObjectPtr tex = cr_bubble_->GetTexture()->GetDeviceTexture(); - nux::Geometry geo_bubble(GetBubbleGeometry(geo)); + nux::Geometry geo_bubble(GetBubbleGeometry(geo, scale)); gfx_engine.QRP_1Tex(geo_bubble.x, geo_bubble.y, @@ -134,8 +134,9 @@ text_ = new StaticCairoText("", false, NUX_TRACKER_LOCATION); text_->SetLines(-8); + text_->SetScale(scale); text_->SetFont(style.content_font()); - text_->SetLineSpacing(5); + text_->SetLineSpacing(TEXT_LINE_SPACING.CP(scale)); text_->SetTextEllipsize(StaticCairoText::NUX_ELLIPSIZE_MIDDLE); text_->mouse_click.connect(on_mouse_down); @@ -146,17 +147,18 @@ SetLayout(layout); - cr_bubble_.reset(new nux::CairoWrapper(GetGeometry(), sigc::bind(sigc::mem_fun(this, &SocialPreviewContent::RedrawBubble), nux::ButtonVisualState::VISUAL_STATE_PRELIGHT))); + nux::Geometry bubble_geo = GetGeometry(); + cr_bubble_.reset(new nux::CairoWrapper(bubble_geo, sigc::bind(sigc::mem_fun(this, &SocialPreviewContent::RedrawBubble), nux::ButtonVisualState::VISUAL_STATE_PRELIGHT))); } void SocialPreviewContent::UpdateBaloonTexture() { nux::Geometry const& geo = GetGeometry(); - nux::Geometry geo_cr(GetBubbleGeometry(geo)); + nux::Geometry geo_cr(GetBubbleGeometry(geo, scale)); int max_width = std::max(0, (int)(geo_cr.width - 2*(geo_cr.width*0.1))); - int max_height = std::max(0, (int)((geo_cr.height - TAIL_HEIGHT) - 2*((geo_cr.height - TAIL_HEIGHT)*0.1))); + int max_height = std::max(0, (int)((geo_cr.height - TAIL_HEIGHT.CP(scale)) - 2*((geo_cr.height - TAIL_HEIGHT.CP(scale))*0.1))); // this will update the texture with the actual size of the text. text_->SetMaximumHeight(max_height); @@ -165,7 +167,7 @@ // center text text_->SetBaseX(geo_cr.x + geo_cr.width/2 - geo_text.width/2); - text_->SetBaseY(geo_cr.y + geo_cr.height/2 - geo_text.height/2 - TAIL_HEIGHT/2); + text_->SetBaseY(geo_cr.y + geo_cr.height/2 - geo_text.height/2 - TAIL_HEIGHT.CP(scale)/2); if (geo_cr.width > 0 && geo_cr.height > 0) { @@ -175,8 +177,9 @@ void SocialPreviewContent::RedrawBubble(nux::Geometry const& geom, cairo_t* cr, nux::ButtonVisualState faked_state) { - double width = std::max(0, cairo_image_surface_get_width(cairo_get_target(cr))); - double height = std::max(0, cairo_image_surface_get_height(cairo_get_target(cr)) - TAIL_HEIGHT); + auto* surface = cairo_get_target(cr); + double width = std::max(0.0, cairo_image_surface_get_width(surface) / scale()); + double height = std::max(0.0, cairo_image_surface_get_height(surface) / scale() - TAIL_HEIGHT); double tailPosition = width - TAIL_POS_FROM_RIGHT - TAIL_HEIGHT; if (width > 0 && height > 0) @@ -222,11 +225,14 @@ double tailPosition, double tailWidth) { + auto* surface = cairo_get_target(cr); + // sanity check if (cairo_status(cr) != CAIRO_STATUS_SUCCESS && - cairo_surface_get_type(cairo_get_target(cr)) != CAIRO_SURFACE_TYPE_IMAGE) + cairo_surface_get_type(surface) != CAIRO_SURFACE_TYPE_IMAGE) return; + cairo_surface_set_device_scale(surface, scale(), scale()); cairo_set_line_width(cr, line_width); bool odd = line_width != double((int)line_width); @@ -314,6 +320,14 @@ introspection.add(GetAbsoluteGeometry()); } +void SocialPreviewContent::UpdateScale(double scale) +{ + if (text_) + text_->SetScale(scale); + + UpdateBaloonTexture(); +} + } } } diff -Nru unity-7.1.2+14.04.20140303/dash/previews/SocialPreviewContent.h unity-7.2.4+14.04.20141217/dash/previews/SocialPreviewContent.h --- unity-7.1.2+14.04.20140303/dash/previews/SocialPreviewContent.h 2014-03-03 16:47:14.000000000 +0000 +++ unity-7.2.4+14.04.20141217/dash/previews/SocialPreviewContent.h 2014-12-17 20:51:37.000000000 +0000 @@ -46,7 +46,8 @@ NUX_DECLARE_OBJECT_TYPE(SocialPreviewContent, nux::View); SocialPreviewContent(std::string const& text, NUX_FILE_LINE_PROTO); - virtual ~SocialPreviewContent(); + + nux::Property scale; void SetText(std::string const& text); @@ -76,6 +77,8 @@ virtual void AddProperties(debug::IntrospectionData&); private: + void UpdateScale(double scale); + nux::ObjectPtr text_; typedef std::unique_ptr NuxCairoPtr; diff -Nru unity-7.1.2+14.04.20140303/dash/previews/SocialPreview.cpp unity-7.2.4+14.04.20141217/dash/previews/SocialPreview.cpp --- unity-7.1.2+14.04.20140303/dash/previews/SocialPreview.cpp 2014-03-03 16:47:14.000000000 +0000 +++ unity-7.2.4+14.04.20141217/dash/previews/SocialPreview.cpp 2014-12-17 20:51:37.000000000 +0000 @@ -24,7 +24,6 @@ #include "unity-shared/PreviewStyle.h" #include "unity-shared/CoverArt.h" #include "unity-shared/IconTexture.h" -#include "unity-shared/PlacesOverlayVScrollBar.h" #include #include #include @@ -49,23 +48,29 @@ { DECLARE_LOGGER(logger, "unity.dash.preview.social"); -class DetailsScrollView : public nux::ScrollView +namespace { -public: - DetailsScrollView(NUX_FILE_LINE_PROTO) - : ScrollView(NUX_FILE_LINE_PARAM) - { - SetVScrollBar(new dash::PlacesOverlayVScrollBar(NUX_TRACKER_LOCATION)); - } - -}; + const RawPixel CHILDREN_SPACE = 16_em; + const RawPixel ICON_CHILDREN_SPACE = 3_em; + const RawPixel SOCIAL_INFO_CHILDREN_SPACE = 12_em; +} NUX_IMPLEMENT_OBJECT_TYPE(SocialPreview); SocialPreview::SocialPreview(dash::Preview::Ptr preview_model) : Preview(preview_model) +, image_data_layout_(nullptr) +, main_social_info_(nullptr) +, comments_layout_(nullptr) +, social_content_layout_(nullptr) +, social_data_layout_(nullptr) +, social_info_layout_(nullptr) +, social_info_scroll_(nullptr) +, icon_layout_(nullptr) +, actions_layout_(nullptr) { SetupViews(); + UpdateScale(scale); } SocialPreview::~SocialPreview() @@ -122,23 +127,24 @@ auto on_mouse_down = [this](int x, int y, unsigned long button_flags, unsigned long key_flags) { this->preview_container_->OnMouseDown(x, y, button_flags, key_flags); }; - nux::HLayout* image_data_layout = new nux::HLayout(); - image_data_layout->SetSpaceBetweenChildren(style.GetPanelSplitWidth()); + image_data_layout_ = new nux::HLayout(); + image_data_layout_->SetSpaceBetweenChildren(style.GetPanelSplitWidth().CP(scale)); - nux::VLayout* social_content_layout = new nux::VLayout(); - social_content_layout->SetSpaceBetweenChildren(16); - + nux::VLayout* social_content_layout_ = new nux::VLayout(); + social_content_layout_->SetSpaceBetweenChildren(CHILDREN_SPACE.CP(scale)); if (social_preview_model->description.Get().length() > 0) { content_ = new SocialPreviewContent(social_preview_model->description, NUX_TRACKER_LOCATION); content_->request_close().connect([this]() { preview_container_->request_close.emit(); }); - social_content_layout->AddView(content_.GetPointer(), 1); - } else { + social_content_layout_->AddView(content_.GetPointer(), 1); + } + else + { image_ = new CoverArt(); AddChild(image_.GetPointer()); UpdateCoverArtImage(image_.GetPointer()); - social_content_layout->AddView(image_.GetPointer(), 1); + social_content_layout_->AddView(image_.GetPointer(), 1); } ///////////////////// @@ -146,34 +152,35 @@ ///////////////////// // Social Data Panel full_data_layout_ = new nux::VLayout(); - full_data_layout_->SetPadding(style.GetDetailsTopMargin(), 0, style.GetDetailsBottomMargin(), style.GetDetailsLeftMargin()); - full_data_layout_->SetSpaceBetweenChildren(16); + full_data_layout_->SetPadding(style.GetDetailsTopMargin().CP(scale), 0, style.GetDetailsBottomMargin().CP(scale), style.GetDetailsLeftMargin().CP(scale)); + full_data_layout_->SetSpaceBetweenChildren(CHILDREN_SPACE.CP(scale)); ///////////////////// // Main Social Info - nux::HLayout* main_social_info = new nux::HLayout(); - main_social_info->SetSpaceBetweenChildren(style.GetSpaceBetweenIconAndDetails()); + main_social_info_ = new nux::HLayout(); + main_social_info_->SetSpaceBetweenChildren(style.GetSpaceBetweenIconAndDetails().CP(scale)); ///////////////////// // Icon Layout - nux::VLayout* icon_layout = new nux::VLayout(); - icon_layout->SetSpaceBetweenChildren(3); - avatar_ = new IconTexture(social_preview_model->avatar.Get().RawPtr() ? g_icon_to_string(social_preview_model->avatar.Get().RawPtr()) : "", MIN(style.GetAvatarAreaWidth(), style.GetAvatarAreaHeight())); + icon_layout_ = new nux::VLayout(); + icon_layout_->SetSpaceBetweenChildren(ICON_CHILDREN_SPACE.CP(scale)); + avatar_ = new IconTexture(social_preview_model->avatar() ? g_icon_to_string(social_preview_model->avatar()) : "", MIN(style.GetAvatarAreaWidth().CP(scale), style.GetAvatarAreaHeight().CP(scale))); AddChild(avatar_.GetPointer()); - avatar_->SetMinMaxSize(style.GetAvatarAreaWidth(), style.GetAvatarAreaHeight()); + avatar_->SetMinMaxSize(style.GetAvatarAreaWidth().CP(scale), style.GetAvatarAreaHeight().CP(scale)); avatar_->mouse_click.connect(on_mouse_down); - icon_layout->AddView(avatar_.GetPointer(), 0); + icon_layout_->AddView(avatar_.GetPointer(), 0); ///////////////////// ///////////////////// // Data - nux::VLayout* social_data_layout = new nux::VLayout(); - social_data_layout->SetSpaceBetweenChildren(style.GetSpaceBetweenTitleAndSubtitle()); + social_data_layout_ = new nux::VLayout(); + social_data_layout_->SetSpaceBetweenChildren(style.GetSpaceBetweenTitleAndSubtitle().CP(scale)); title_ = new StaticCairoText(preview_model_->title, true, NUX_TRACKER_LOCATION); AddChild(title_.GetPointer()); title_->SetLines(-1); + title_->SetScale(scale); title_->SetFont(style.title_font().c_str()); title_->mouse_click.connect(on_mouse_down); @@ -181,109 +188,171 @@ AddChild(subtitle_.GetPointer()); subtitle_->SetFont(style.content_font().c_str()); subtitle_->SetLines(-1); + subtitle_->SetScale(scale); subtitle_->mouse_click.connect(on_mouse_down); - social_data_layout->AddView(title_.GetPointer(), 0); - social_data_layout->AddView(subtitle_.GetPointer(), 0); - social_data_layout->AddSpace(0, 1); + social_data_layout_->AddView(title_.GetPointer(), 0); + social_data_layout_->AddView(subtitle_.GetPointer(), 0); + social_data_layout_->AddSpace(0, 1); // buffer space ///////////////////// - main_social_info->AddLayout(icon_layout, 0); - main_social_info->AddLayout(social_data_layout, 1); + main_social_info_->AddLayout(icon_layout_, 0); + main_social_info_->AddLayout(social_data_layout_, 1); ///////////////////// ///////////////////// // Details - nux::ScrollView* social_info = new DetailsScrollView(NUX_TRACKER_LOCATION); + auto* social_info = new ScrollView(NUX_TRACKER_LOCATION); + social_info_scroll_ = social_info; + social_info->scale = scale(); social_info->EnableHorizontalScrollBar(false); social_info->mouse_click.connect(on_mouse_down); - nux::VLayout* social_info_layout = new nux::VLayout(); - social_info_layout->SetSpaceBetweenChildren(12); - social_info->SetLayout(social_info_layout); + social_info_layout_ = new nux::VLayout(); + social_info_layout_->SetSpaceBetweenChildren(SOCIAL_INFO_CHILDREN_SPACE.CP(scale)); + social_info->SetLayout(social_info_layout_); if (!preview_model_->GetInfoHints().empty()) { preview_info_hints_ = new PreviewInfoHintWidget(preview_model_, style.GetAvatarAreaWidth()); AddChild(preview_info_hints_.GetPointer()); preview_info_hints_->request_close().connect([this]() { preview_container_->request_close.emit(); }); - social_info_layout->AddView(preview_info_hints_.GetPointer(), 0); + social_info_layout_->AddView(preview_info_hints_.GetPointer(), 0); } ///////////////////// // Comments/Replies if (!social_preview_model->GetComments().empty()) { - nux::HLayout* comments_layout = new nux::HLayout(); - comments_layout->SetSpaceBetweenChildren(12); + comments_layout_ = new nux::HLayout(); + comments_layout_->SetSpaceBetweenChildren(SOCIAL_INFO_CHILDREN_SPACE.CP(scale)); std::string tmp_comments_hint = _("Comments"); tmp_comments_hint += ":"; comments_hint_ = new StaticCairoText(tmp_comments_hint, true, NUX_TRACKER_LOCATION); AddChild(comments_hint_.GetPointer()); comments_hint_->SetLines(-1); + comments_hint_->SetScale(scale); comments_hint_->SetFont(style.info_hint_bold_font().c_str()); comments_hint_->SetTextAlignment(StaticCairoText::NUX_ALIGN_RIGHT); comments_hint_->mouse_click.connect(on_mouse_down); - comments_layout->AddView(comments_hint_.GetPointer(), 0, nux::MINOR_POSITION_START); + comments_layout_->AddView(comments_hint_.GetPointer(), 0, nux::MINOR_POSITION_START); comments_ = new SocialPreviewComments(preview_model_, NUX_TRACKER_LOCATION); AddChild(comments_.GetPointer()); comments_->request_close().connect([this]() { preview_container_->request_close.emit(); }); - comments_layout->AddView(comments_.GetPointer()); - social_info_layout->AddView(comments_layout, 0); + comments_layout_->AddView(comments_.GetPointer()); + social_info_layout_->AddView(comments_layout_, 0); } ///////////////////// // Actions action_buttons_.clear(); - nux::Layout* actions_layout = BuildGridActionsLayout(preview_model_->GetActions(), action_buttons_); - actions_layout->SetLeftAndRightPadding(0, style.GetDetailsRightMargin()); + actions_layout_ = BuildGridActionsLayout(preview_model_->GetActions(), action_buttons_); + actions_layout_->SetLeftAndRightPadding(0, style.GetDetailsRightMargin().CP(scale)); /////////////////// - full_data_layout_->AddLayout(main_social_info, 0, nux::MINOR_POSITION_START); + full_data_layout_->AddLayout(main_social_info_, 0, nux::MINOR_POSITION_START); full_data_layout_->AddView(social_info, 1, nux::MINOR_POSITION_START); //full_data_layout_->AddView(comments_.GetPointer(), 1, nux::MINOR_POSITION_START); - full_data_layout_->AddLayout(actions_layout, 0); + full_data_layout_->AddLayout(actions_layout_, 0); ///////////////////// - - image_data_layout->AddView(social_content_layout, 0); - image_data_layout->AddLayout(full_data_layout_, 1); + + image_data_layout_->AddView(social_content_layout_, 0); + image_data_layout_->AddLayout(full_data_layout_, 1); mouse_click.connect(on_mouse_down); - SetLayout(image_data_layout); + SetLayout(image_data_layout_); } void SocialPreview::PreLayoutManagement() { nux::Geometry geo = GetGeometry(); - previews::Style& style = dash::previews::Style::Instance(); nux::Geometry geo_content(geo.x, geo.y, style.GetAppImageAspectRatio() * geo.height, geo.height); - if (geo.width - geo_content.width - style.GetPanelSplitWidth() - style.GetDetailsLeftMargin() - style.GetDetailsRightMargin() < style.GetDetailsPanelMinimumWidth()) - geo_content.width = std::max(0, geo.width - style.GetPanelSplitWidth() - style.GetDetailsLeftMargin() - style.GetDetailsRightMargin() - style.GetDetailsPanelMinimumWidth()); + int content_width = geo.width - style.GetPanelSplitWidth().CP(scale) + - style.GetDetailsLeftMargin().CP(scale) + - style.GetDetailsRightMargin().CP(scale); + + if (content_width - geo_content.width < style.GetDetailsPanelMinimumWidth().CP(scale)) + geo_content.width = std::max(0, content_width - style.GetDetailsPanelMinimumWidth().CP(scale)); + if (content_) { content_->SetMinMaxSize(geo_content.width, geo_content.height); } if (image_) { image_->SetMinMaxSize(geo_content.width, geo_content.height); } - int details_width = std::max(0, geo.width - geo_content.width - style.GetPanelSplitWidth() - style.GetDetailsLeftMargin() - style.GetDetailsRightMargin()); - int top_social_info_max_width = std::max(0, details_width - style.GetAppIconAreaWidth() - style.GetSpaceBetweenIconAndDetails()); + int details_width = std::max(0, content_width - geo_content.width); + int top_social_info_max_width = std::max(0, details_width - style.GetAppIconAreaWidth().CP(scale) - style.GetSpaceBetweenIconAndDetails().CP(scale)); if (title_) { title_->SetMaximumWidth(top_social_info_max_width); } if (subtitle_) { subtitle_->SetMaximumWidth(top_social_info_max_width); } if (comments_) { comments_->SetMaximumWidth(top_social_info_max_width); } - if (comments_hint_) { comments_hint_->SetMinimumWidth(style.GetInfoHintNameMinimumWidth()); } + if (comments_hint_) { comments_hint_->SetMinimumWidth(style.GetInfoHintNameMinimumWidth().CP(scale)); } + + int button_w = CLAMP((details_width - style.GetSpaceBetweenActions().CP(scale)) / 2, 0, style.GetActionButtonMaximumWidth().CP(scale)); + int button_h = style.GetActionButtonHeight().CP(scale); for (nux::AbstractButton* button : action_buttons_) + button->SetMinMaxSize(button_w, button_h); + + Preview::PreLayoutManagement(); +} + +void SocialPreview::UpdateScale(double scale) +{ + Preview::UpdateScale(scale); + + if (preview_info_hints_) + preview_info_hints_->scale = scale; + + previews::Style& style = dash::previews::Style::Instance(); + + if (avatar_) { - button->SetMinMaxSize(CLAMP((details_width - style.GetSpaceBetweenActions()) / 2, 0, style.GetActionButtonMaximumWidth()), style.GetActionButtonHeight()); + avatar_->SetMinMaxSize(style.GetAvatarAreaWidth().CP(scale), style.GetAvatarAreaHeight().CP(scale)); + avatar_->SetSize(MIN(style.GetAvatarAreaWidth().CP(scale), style.GetAvatarAreaHeight().CP(scale))); + avatar_->ReLoadIcon(); } - Preview::PreLayoutManagement(); + if (image_data_layout_) + image_data_layout_->SetSpaceBetweenChildren(style.GetPanelSplitWidth().CP(scale)); + + if (social_content_layout_) + social_content_layout_->SetSpaceBetweenChildren(CHILDREN_SPACE.CP(scale)); + + if (main_social_info_) + main_social_info_->SetSpaceBetweenChildren(style.GetSpaceBetweenIconAndDetails().CP(scale)); + + if (icon_layout_) + icon_layout_->SetSpaceBetweenChildren(ICON_CHILDREN_SPACE.CP(scale)); + + if (social_data_layout_) + social_data_layout_->SetSpaceBetweenChildren(style.GetSpaceBetweenTitleAndSubtitle().CP(scale)); + + if (social_info_layout_) + social_info_layout_->SetSpaceBetweenChildren(SOCIAL_INFO_CHILDREN_SPACE.CP(scale)); + + if (social_info_scroll_) + social_info_scroll_->scale = scale; + + if (actions_layout_) + actions_layout_->SetLeftAndRightPadding(0, style.GetDetailsRightMargin().CP(scale)); + + if (content_) + content_->scale = scale; + + if (comments_) + comments_->scale = scale; + + if (comments_layout_) + comments_layout_->SetSpaceBetweenChildren(SOCIAL_INFO_CHILDREN_SPACE.CP(scale)); + + if (comments_hint_) + comments_hint_->SetScale(scale); } } // namespace previews diff -Nru unity-7.1.2+14.04.20140303/dash/previews/SocialPreview.h unity-7.2.4+14.04.20141217/dash/previews/SocialPreview.h --- unity-7.1.2+14.04.20140303/dash/previews/SocialPreview.h 2014-03-03 16:47:14.000000000 +0000 +++ unity-7.2.4+14.04.20141217/dash/previews/SocialPreview.h 2014-12-17 20:51:37.000000000 +0000 @@ -24,6 +24,7 @@ #define SOCIALPREVIEW_H #include "Preview.h" +#include "unity-shared/OverlayScrollView.h" namespace unity { @@ -56,11 +57,22 @@ virtual void PreLayoutManagement(); virtual void SetupViews(); + virtual void UpdateScale(double scale) override; protected: nux::VLayout* sender_layout_; nux::VLayout* title_layout_; + nux::HLayout* image_data_layout_; + nux::HLayout* main_social_info_; + nux::HLayout* comments_layout_; + nux::VLayout* social_content_layout_; + nux::VLayout* social_data_layout_; + nux::VLayout* social_info_layout_; + ScrollView* social_info_scroll_; + nux::VLayout* icon_layout_; + nux::Layout* actions_layout_; + nux::ObjectPtr avatar_; nux::ObjectPtr content_; nux::ObjectPtr comments_; diff -Nru unity-7.1.2+14.04.20140303/dash/previews/StandaloneApplicationPreview.cpp unity-7.2.4+14.04.20141217/dash/previews/StandaloneApplicationPreview.cpp --- unity-7.1.2+14.04.20140303/dash/previews/StandaloneApplicationPreview.cpp 2014-03-03 16:47:14.000000000 +0000 +++ unity-7.2.4+14.04.20141217/dash/previews/StandaloneApplicationPreview.cpp 2014-12-17 20:51:37.000000000 +0000 @@ -39,12 +39,14 @@ #include "PreviewContainer.h" -#define WIDTH 972 -#define HEIGHT 452 +const unity::RawPixel WIDTH(1000); +const unity::RawPixel HEIGHT(600); using namespace unity; using namespace unity::dash; +static double scale = 1.0; + class DummyView : public nux::View { public: @@ -146,6 +148,7 @@ container_->navigate_right.connect(sigc::mem_fun(this, &TestRunner::NavRight)); container_->navigate_left.connect(sigc::mem_fun(this, &TestRunner::NavLeft)); container_->request_close.connect([this]() { exit(0); }); + container_->scale = scale; DummyView* dummyView = new DummyView(container_.GetPointer()); layout_ = new nux::VLayout(NUX_TRACKER_LOCATION); @@ -162,9 +165,9 @@ description << "Application description " << i << std::endl; // creates a generic preview object - glib::Object iconHint1(g_icon_new_for_string("/usr/share/unity/5/lens-nav-music.svg", NULL)); - glib::Object iconHint2(g_icon_new_for_string("/usr/share/unity/5/lens-nav-home.svg", NULL)); - glib::Object iconHint3(g_icon_new_for_string("/usr/share/unity/5/lens-nav-people.svg", NULL)); + glib::Object iconHint1(g_icon_new_for_string("/usr/share/unity/icons/lens-nav-music.svg", NULL)); + glib::Object iconHint2(g_icon_new_for_string("/usr/share/unity/icons/lens-nav-home.svg", NULL)); + glib::Object iconHint3(g_icon_new_for_string("/usr/share/unity/icons/lens-nav-people.svg", NULL)); GHashTable* action_hints1(g_hash_table_new(g_direct_hash, g_direct_equal)); g_hash_table_insert (action_hints1, g_strdup ("extra-text"), g_variant_new_string("£30.99")); @@ -207,9 +210,10 @@ The service allows users to communicate with peers by voice, video, and instant messaging over the Internet. Phone calls may be placed to recipients on the traditional telephone networks. Calls to other users within the Skype service are free of charge, while calls to landline telephones and mobile phones are charged via a debit-based user account system."; // creates a generic preview object - glib::Object iconHint1(g_icon_new_for_string("/usr/share/unity/5/lens-nav-music.svg", NULL)); - glib::Object iconHint2(g_icon_new_for_string("/usr/share/unity/5/lens-nav-home.svg", NULL)); - glib::Object iconHint3(g_icon_new_for_string("/usr/share/unity/5/lens-nav-people.svg", NULL)); + glib::Object iconHint1(g_icon_new_for_string("/usr/share/unity/icons/lens-nav-music.svg", NULL)); + glib::Object iconHint2(g_icon_new_for_string("/usr/share/unity/icons/lens-nav-home.svg", NULL)); + glib::Object iconHint3(g_icon_new_for_string("/usr/share/unity/icons/lens-nav-people.svg", NULL)); + glib::Object iconHint4(g_icon_new_for_string("/usr/share/unity/icons/lens-nav-people.svg", NULL)); GHashTable* action_hints1(g_hash_table_new(g_direct_hash, g_direct_equal)); g_hash_table_insert (action_hints1, g_strdup ("extra-text"), g_variant_new_string("£30.99")); @@ -233,6 +237,9 @@ unity_protocol_preview_add_info_hint(proto_obj, "energy", "Energy", iconHint2, g_variant_new("s", "58.07 mWh")); unity_protocol_preview_add_info_hint(proto_obj, "load", "CPU Load", iconHint3, g_variant_new("d", 12.1)); + if (nav_iter % 2 == 0) + unity_protocol_preview_add_info_hint(proto_obj, "desc", "Very long long description", iconHint4, g_variant_new("s", "So looong description that does not fit into")); + glib::Variant v(dee_serializable_serialize(DEE_SERIALIZABLE(proto_obj.RawPtr())), glib::StealRef()); @@ -255,9 +262,9 @@ The service allows users to communicate with peers by voice, video, and instant messaging over the Internet. Phone calls may be placed to recipients on the traditional telephone networks. Calls to other users within the Skype service are free of charge, while calls to landline telephones and mobile phones are charged via a debit-based user account system."; // creates a generic preview object - glib::Object iconHint1(g_icon_new_for_string("/usr/share/unity/5/lens-nav-music.svg", NULL)); - glib::Object iconHint2(g_icon_new_for_string("/usr/share/unity/5/lens-nav-home.svg", NULL)); - glib::Object iconHint3(g_icon_new_for_string("/usr/share/unity/5/lens-nav-people.svg", NULL)); + glib::Object iconHint1(g_icon_new_for_string("/usr/share/unity/icons/lens-nav-music.svg", NULL)); + glib::Object iconHint2(g_icon_new_for_string("/usr/share/unity/icons/lens-nav-home.svg", NULL)); + glib::Object iconHint3(g_icon_new_for_string("/usr/share/unity/icons/lens-nav-people.svg", NULL)); GHashTable* action_hints1(g_hash_table_new(g_direct_hash, g_direct_equal)); g_hash_table_insert (action_hints1, g_strdup ("extra-text"), g_variant_new_string("£30.99")); @@ -313,10 +320,22 @@ unity::dash::previews::Style panel_style; unity::dash::Style dash_style; unity::ThumbnailGenerator thumbnail_generator; + unity::glib::Error err; + + GOptionEntry args_parsed[] = + { + { "scaling-factor", 's', 0, G_OPTION_ARG_DOUBLE, &scale, "The dash scaling factor", "F" }, + { NULL } + }; + + std::shared_ptr ctx(g_option_context_new("Unity Preview"), g_option_context_free); + g_option_context_add_main_entries(ctx.get(), args_parsed, NULL); + if (!g_option_context_parse(ctx.get(), &argc, &argv, &err)) + std::cerr << "Got error when parsing arguments: " << err << std::endl; TestRunner *test_runner = new TestRunner (); wt = nux::CreateGUIThread(TEXT("Unity Preview"), - WIDTH, HEIGHT, + WIDTH.CP(scale), HEIGHT.CP(scale), 0, &TestRunner::InitWindowThread, test_runner); diff -Nru unity-7.1.2+14.04.20140303/dash/previews/StandaloneErrorPreview.cpp unity-7.2.4+14.04.20141217/dash/previews/StandaloneErrorPreview.cpp --- unity-7.1.2+14.04.20140303/dash/previews/StandaloneErrorPreview.cpp 2014-03-03 16:47:14.000000000 +0000 +++ unity-7.2.4+14.04.20141217/dash/previews/StandaloneErrorPreview.cpp 2014-12-17 20:51:37.000000000 +0000 @@ -39,13 +39,14 @@ #include "Preview.h" #include "PreviewContainer.h" - -#define WIDTH 1100 -#define HEIGHT 600 +const unity::RawPixel WIDTH(1100); +const unity::RawPixel HEIGHT(600); using namespace unity; using namespace unity::dash; +static double scale = 1.0; + namespace { nux::logging::Logger logger("unity.dash.StandaloneMusicPreview"); @@ -150,6 +151,7 @@ container_ = new previews::PreviewContainer(NUX_TRACKER_LOCATION); container_->request_close.connect([this]() { exit(0); }); container_->DisableNavButton(previews::Navigation::BOTH); + container_->scale = scale; DummyView* dummyView = new DummyView(container_.GetPointer()); layout_ = new nux::VLayout(NUX_TRACKER_LOCATION); @@ -206,10 +208,22 @@ unity::dash::previews::Style panel_style; unity::dash::Style dash_style; unity::ThumbnailGenerator thumbnail_generator; + unity::glib::Error err; + + GOptionEntry args_parsed[] = + { + { "scaling-factor", 's', 0, G_OPTION_ARG_DOUBLE, &scale, "The dash scaling factor", "F" }, + { NULL } + }; + + std::shared_ptr ctx(g_option_context_new("Unity Preview"), g_option_context_free); + g_option_context_add_main_entries(ctx.get(), args_parsed, NULL); + if (!g_option_context_parse(ctx.get(), &argc, &argv, &err)) + std::cerr << "Got error when parsing arguments: " << err << std::endl; TestRunner *test_runner = new TestRunner (); wt = nux::CreateGUIThread(TEXT("Unity Preview"), - WIDTH, HEIGHT, + WIDTH.CP(scale), HEIGHT.CP(scale), 0, &TestRunner::InitWindowThread, test_runner); diff -Nru unity-7.1.2+14.04.20140303/dash/previews/StandaloneMoviePreview.cpp unity-7.2.4+14.04.20141217/dash/previews/StandaloneMoviePreview.cpp --- unity-7.1.2+14.04.20140303/dash/previews/StandaloneMoviePreview.cpp 2014-03-03 16:47:14.000000000 +0000 +++ unity-7.2.4+14.04.20141217/dash/previews/StandaloneMoviePreview.cpp 2014-12-17 20:51:37.000000000 +0000 @@ -39,12 +39,14 @@ #include "PreviewContainer.h" -#define WIDTH 972 -#define HEIGHT 452 +const unity::RawPixel WIDTH(1000); +const unity::RawPixel HEIGHT(600); using namespace unity; using namespace unity::dash; +static double scale = 1.0; + class DummyView : public nux::View { public: @@ -145,6 +147,7 @@ container_->navigate_right.connect(sigc::mem_fun(this, &TestRunner::NavRight)); container_->navigate_left.connect(sigc::mem_fun(this, &TestRunner::NavLeft)); container_->request_close.connect([this]() { exit(0); }); + container_->scale = scale; DummyView* dummyView = new DummyView(container_.GetPointer()); layout_ = new nux::VLayout(NUX_TRACKER_LOCATION); @@ -234,10 +237,22 @@ unity::dash::previews::Style panel_style; unity::dash::Style dash_style; unity::ThumbnailGenerator thumbnail_generator; + unity::glib::Error err; + + GOptionEntry args_parsed[] = + { + { "scaling-factor", 's', 0, G_OPTION_ARG_DOUBLE, &scale, "The dash scaling factor", "F" }, + { NULL } + }; + + std::shared_ptr ctx(g_option_context_new("Unity Preview"), g_option_context_free); + g_option_context_add_main_entries(ctx.get(), args_parsed, NULL); + if (!g_option_context_parse(ctx.get(), &argc, &argv, &err)) + std::cerr << "Got error when parsing arguments: " << err << std::endl; TestRunner *test_runner = new TestRunner (); wt = nux::CreateGUIThread(TEXT("Unity Preview"), - WIDTH, HEIGHT, + WIDTH.CP(scale), HEIGHT.CP(scale), 0, &TestRunner::InitWindowThread, test_runner); diff -Nru unity-7.1.2+14.04.20140303/dash/previews/StandaloneMusicPaymentPreview.cpp unity-7.2.4+14.04.20141217/dash/previews/StandaloneMusicPaymentPreview.cpp --- unity-7.1.2+14.04.20140303/dash/previews/StandaloneMusicPaymentPreview.cpp 2014-03-03 16:47:14.000000000 +0000 +++ unity-7.2.4+14.04.20141217/dash/previews/StandaloneMusicPaymentPreview.cpp 2014-12-17 20:51:37.000000000 +0000 @@ -38,15 +38,15 @@ #include "Preview.h" #include "PreviewContainer.h" - -#define WIDTH 1100 -#define HEIGHT 600 +const unity::RawPixel WIDTH(1100); +const unity::RawPixel HEIGHT(600); using namespace unity; using namespace unity::dash; namespace { +static double scale = 1.0; nux::logging::Logger logger("unity.dash.StandaloneMusicPreview"); } @@ -190,6 +190,7 @@ dash::Preview::Ptr preview_model(dash::Preview::PreviewForVariant(v)); container_->Preview(preview_model, previews::Navigation::LEFT); + container_->scale = scale; } void TestRunner::InitWindowThread(nux::NThread* thread, void* InitData) @@ -211,10 +212,22 @@ unity::dash::previews::Style panel_style; unity::dash::Style dash_style; unity::ThumbnailGenerator thumbnail_generator; + unity::glib::Error err; + + GOptionEntry args_parsed[] = + { + { "scaling-factor", 's', 0, G_OPTION_ARG_DOUBLE, &scale, "The dash scaling factor", "F" }, + { NULL } + }; + + std::shared_ptr ctx(g_option_context_new("Unity Preview"), g_option_context_free); + g_option_context_add_main_entries(ctx.get(), args_parsed, NULL); + if (!g_option_context_parse(ctx.get(), &argc, &argv, &err)) + std::cerr << "Got error when parsing arguments: " << err << std::endl; TestRunner *test_runner = new TestRunner (); wt = nux::CreateGUIThread(TEXT("Unity Preview"), - WIDTH, HEIGHT, + WIDTH.CP(scale), HEIGHT.CP(scale), 0, &TestRunner::InitWindowThread, test_runner); diff -Nru unity-7.1.2+14.04.20140303/dash/previews/StandaloneSocialPreview.cpp unity-7.2.4+14.04.20141217/dash/previews/StandaloneSocialPreview.cpp --- unity-7.1.2+14.04.20140303/dash/previews/StandaloneSocialPreview.cpp 2014-03-03 16:47:14.000000000 +0000 +++ unity-7.2.4+14.04.20141217/dash/previews/StandaloneSocialPreview.cpp 2014-12-17 20:51:37.000000000 +0000 @@ -38,9 +38,10 @@ #include "Preview.h" #include "PreviewContainer.h" +const unity::RawPixel WIDTH(1000); +const unity::RawPixel HEIGHT(600); -#define WIDTH 910 -#define HEIGHT 400 +static double scale = 1.0; using namespace unity; using namespace unity::dash; @@ -146,6 +147,7 @@ container_->navigate_right.connect(sigc::mem_fun(this, &TestRunner::NavRight)); container_->navigate_left.connect(sigc::mem_fun(this, &TestRunner::NavLeft)); container_->request_close.connect([this]() { exit(0); }); + container_->scale = scale; DummyView* dummyView = new DummyView(container_.GetPointer()); layout_ = new nux::VLayout(NUX_TRACKER_LOCATION); @@ -157,7 +159,8 @@ const char* description = "Lorem ipsum dolor sit amet, id eruditi referrentur cum, et est enim persequeris. Munere docendi intellegebat pro id, nam no delenit facilisis similique, ut usu eros aliquando. Electram postulant accusamus ut ius, cum ad impedit facilis mediocrem. At cum tamquam."; glib::Object iconHint1(g_icon_new_for_string("/usr/share/pixmaps/faces/sunflower.jpg", NULL)); - glib::Object iconHint2(g_icon_new_for_string("/usr/share/unity/6/lens-nav-home.svg", NULL)); + glib::Object iconHint2(g_icon_new_for_string("/usr/share/unity/icons/lens-nav-home.svg", NULL)); + glib::Object iconHint3(g_icon_new_for_string("/usr/share/icons/unity-icon-theme/places/svg/service-twitter.svg", NULL)); glib::Object proto_obj(UNITY_PROTOCOL_PREVIEW(unity_protocol_social_preview_new())); @@ -169,7 +172,7 @@ unity_protocol_preview_set_subtitle(proto_obj, subtitle); unity_protocol_preview_set_description(proto_obj, description); unity_protocol_preview_add_action(proto_obj, "view", "View", iconHint2, 0); - unity_protocol_preview_add_action(proto_obj, "retweet", "Retweet", nullptr, 0); + unity_protocol_preview_add_action(proto_obj, "retweet", "Retweet", iconHint3, 0); unity_protocol_social_preview_add_comment(UNITY_PROTOCOL_SOCIAL_PREVIEW(proto_obj.RawPtr()), "comment", "Stacy", "Lorem ipsum dolor sit amet, id eruditi referrentur cum, et est enim persequeris. Munere docendi intellegebat pro id, nam no delenit facilisis similique, ut usu eros aliquando. Electram postulant accusamus ut ius, cum ad impedit facilis mediocrem. At cum tamquam.", "13 minutes ago"); unity_protocol_social_preview_add_comment(UNITY_PROTOCOL_SOCIAL_PREVIEW(proto_obj.RawPtr()), "comment", "Jeremy", "This is a comment", "4 hours ago"); unity_protocol_social_preview_add_comment(UNITY_PROTOCOL_SOCIAL_PREVIEW(proto_obj.RawPtr()), "comment", "Stacy", "This is a comment", "4 hours ago"); @@ -180,7 +183,6 @@ dash::Preview::Ptr preview_model(dash::Preview::PreviewForVariant(v)); container_->Preview(preview_model, previews::Navigation::RIGHT); - } void TestRunner::NavRight() @@ -191,7 +193,7 @@ // creates a generic preview object glib::Object iconHint1(g_icon_new_for_string("/usr/share/pixmaps/faces/astronaut.jpg", NULL)); - glib::Object iconHint2(g_icon_new_for_string("/usr/share/unity/6/lens-nav-home.svg", NULL)); + glib::Object iconHint2(g_icon_new_for_string("/usr/share/unity/icons/lens-nav-home.svg", NULL)); glib::Object proto_obj(UNITY_PROTOCOL_PREVIEW(unity_protocol_social_preview_new())); @@ -226,7 +228,7 @@ const char* description = "Profile pictures are what people want them to think they look like. Tagged pictures are what they really look like."; glib::Object iconHint1(g_icon_new_for_string("/usr/share/pixmaps/faces/soccerball.png", NULL)); - glib::Object iconHint2(g_icon_new_for_string("/usr/share/unity/6/lens-nav-home.svg", NULL)); + glib::Object iconHint2(g_icon_new_for_string("/usr/share/unity/icons/lens-nav-home.svg", NULL)); glib::Object proto_obj(UNITY_PROTOCOL_PREVIEW(unity_protocol_social_preview_new())); @@ -269,10 +271,22 @@ unity::dash::previews::Style panel_style; unity::dash::Style dash_style; unity::ThumbnailGenerator thumbnail_generator; + unity::glib::Error err; + + GOptionEntry args_parsed[] = + { + { "scaling-factor", 's', 0, G_OPTION_ARG_DOUBLE, &scale, "The dash scaling factor", "F" }, + { NULL } + }; + + std::shared_ptr ctx(g_option_context_new("Unity Preview"), g_option_context_free); + g_option_context_add_main_entries(ctx.get(), args_parsed, NULL); + if (!g_option_context_parse(ctx.get(), &argc, &argv, &err)) + std::cerr << "Got error when parsing arguments: " << err << std::endl; TestRunner *test_runner = new TestRunner (); wt = nux::CreateGUIThread(TEXT("Unity Preview"), - WIDTH, HEIGHT, + WIDTH.CP(scale), HEIGHT.CP(scale), 0, &TestRunner::InitWindowThread, test_runner); diff -Nru unity-7.1.2+14.04.20140303/dash/previews/Track.cpp unity-7.2.4+14.04.20141217/dash/previews/Track.cpp --- unity-7.1.2+14.04.20140303/dash/previews/Track.cpp 2014-03-03 16:47:14.000000000 +0000 +++ unity-7.2.4+14.04.20141217/dash/previews/Track.cpp 2014-12-17 20:51:37.000000000 +0000 @@ -37,6 +37,13 @@ namespace previews { +DECLARE_LOGGER(logger, "unity.dash.preview.music.track"); +namespace +{ +const RawPixel LAYOUT_SPACING = 6_em; +const RawPixel TITLE_PADDING = 3_em; +} + class TmpView : public nux::View { public: @@ -49,17 +56,11 @@ if (GetCompositionLayout()) GetCompositionLayout()->ProcessDraw(gfx_engine, force_draw); } - + virtual bool AcceptKeyNavFocus() { return false; } }; -DECLARE_LOGGER(logger, "unity.dash.preview.music.track"); -namespace -{ -const int layout_spacing = 6; -} - NUX_IMPLEMENT_OBJECT_TYPE(Track); class TrackProgressLayer : public nux::AbstractPaintLayer @@ -126,12 +127,14 @@ Track::Track(NUX_FILE_LINE_DECL) : View(NUX_FILE_LINE_PARAM) + , scale(1.0) , play_state_(PlayerState::STOPPED) , progress_(0.0) , mouse_over_(false) { SetupBackground(); SetupViews(); + scale.changed.connect(sigc::mem_fun(this, &Track::UpdateScale)); } std::string Track::GetName() const @@ -202,23 +205,25 @@ layout->SetLeftAndRightPadding(0,0); nux::BaseTexture* tex_play = style.GetPlayIcon(); - IconTexture* status_play = new IconTexture(tex_play, style.GetStatusIconSize(), style.GetStatusIconSize()); - status_play->SetDrawMode(IconTexture::DrawMode::STRETCH_WITH_ASPECT); + status_play_ = new IconTexture(tex_play, style.GetStatusIconSize().CP(scale), style.GetStatusIconSize().CP(scale)); + status_play_->SetDrawMode(IconTexture::DrawMode::STRETCH_WITH_ASPECT); nux::BaseTexture* tex_pause = style.GetPauseIcon(); - IconTexture* status_pause = new IconTexture(tex_pause, style.GetStatusIconSize(), style.GetStatusIconSize()); - status_pause->SetDrawMode(IconTexture::DrawMode::STRETCH_WITH_ASPECT); + status_pause_ = new IconTexture(tex_pause, style.GetStatusIconSize().CP(scale), style.GetStatusIconSize().CP(scale)); + status_pause_->SetDrawMode(IconTexture::DrawMode::STRETCH_WITH_ASPECT); track_number_ = new StaticCairoText("", NUX_TRACKER_LOCATION); track_number_->SetTextAlignment(StaticCairoText::NUX_ALIGN_CENTRE); track_number_->SetTextVerticalAlignment(StaticCairoText::NUX_ALIGN_CENTRE); track_number_->SetLines(-1); + track_number_->SetScale(scale); track_number_->SetFont(style.track_font()); title_ = new StaticCairoText("", NUX_TRACKER_LOCATION); title_->SetTextAlignment(StaticCairoText::NUX_ALIGN_LEFT); title_->SetTextVerticalAlignment(StaticCairoText::NUX_ALIGN_CENTRE); title_->SetLines(-1); + title_->SetScale(scale); title_->SetFont(style.track_font()); duration_ = new StaticCairoText("", NUX_TRACKER_LOCATION); @@ -226,21 +231,22 @@ duration_->SetTextAlignment(StaticCairoText::NUX_ALIGN_RIGHT); duration_->SetTextVerticalAlignment(StaticCairoText::NUX_ALIGN_CENTRE); duration_->SetLines(-1); + duration_->SetMinimumWidth(style.GetMusicDurationWidth().CP(scale)); + duration_->SetMaximumWidth(style.GetMusicDurationWidth().CP(scale)); + duration_->SetScale(scale); duration_->SetFont(style.track_font()); - duration_->SetMaximumWidth(style.GetMusicDurationWidth()); - duration_->SetMaximumWidth(style.GetMusicDurationWidth()); // Layouts // stick text fields in a layout so they don't alter thier geometry. status_play_layout_ = new TmpView(); status_play_layout_->SetLayout(new nux::HLayout()); status_play_layout_->GetLayout()->AddSpace(0, 1); - status_play_layout_->GetLayout()->AddView(status_play, 0, nux::MINOR_POSITION_CENTER, nux::MINOR_SIZE_FULL); + status_play_layout_->GetLayout()->AddView(status_play_, 0, nux::MINOR_POSITION_CENTER, nux::MINOR_SIZE_FULL); status_play_layout_->GetLayout()->AddSpace(0, 1); status_pause_layout_ = new TmpView(); status_pause_layout_->SetLayout(new nux::HLayout()); status_pause_layout_->GetLayout()->AddSpace(0, 1); - status_pause_layout_->GetLayout()->AddView(status_pause, 0, nux::MINOR_POSITION_CENTER, nux::MINOR_SIZE_FULL); + status_pause_layout_->GetLayout()->AddView(status_pause_, 0, nux::MINOR_POSITION_CENTER, nux::MINOR_SIZE_FULL); status_pause_layout_->GetLayout()->AddSpace(0, 1); track_number_layout_ = new TmpView(); @@ -256,7 +262,7 @@ track_status_layout_->SetActiveLayer(track_number_layout_); title_layout_ = new nux::HLayout(); - title_layout_->SetLeftAndRightPadding(3); + title_layout_->SetLeftAndRightPadding(TITLE_PADDING.CP(scale)); title_layout_->AddView(title_, 1, nux::MINOR_POSITION_CENTER, nux::MINOR_SIZE_FULL); title_layout_->AddSpace(0, 0); @@ -316,7 +322,7 @@ progress_layer_->SetGeometry(geo_progress); nux::GetPainter().RenderSinglePaintLayer(gfx_engine, progress_layer_->GetGeometry(), progress_layer_.get()); } - + gfx_engine.GetRenderStates().SetBlend(alpha, src, dest); } @@ -435,12 +441,29 @@ track_status_layout_->SetMinimumWidth(geo.height); track_status_layout_->SetMaximumWidth(geo.height); - const int max_width = std::max(GetGeometry().width - geo.height - style.GetMusicDurationWidth() - layout_spacing*2, 0); + const int max_width = std::max(GetGeometry().width - geo.height - style.GetMusicDurationWidth().CP(scale) - LAYOUT_SPACING.CP(scale)*2, 0); title_->SetMaximumWidth(max_width); View::PreLayoutManagement(); } +void Track::UpdateScale(double scale) +{ + auto& style = Style::Instance(); + int icon_size = style.GetStatusIconSize().CP(scale); + track_number_->SetScale(scale); + title_->SetScale(scale); + duration_->SetMaximumWidth(style.GetMusicDurationWidth().CP(scale)); + duration_->SetMinimumWidth(style.GetMusicDurationWidth().CP(scale)); + duration_->SetScale(scale); + title_layout_->SetLeftAndRightPadding(TITLE_PADDING.CP(scale)); + status_play_->SetMinMaxSize(icon_size, icon_size); + status_pause_->SetMinMaxSize(icon_size, icon_size); + + QueueRelayout(); + QueueDraw(); +} + } // namespace previews } // namespace dash } // namesapce unity diff -Nru unity-7.1.2+14.04.20140303/dash/previews/Track.h unity-7.2.4+14.04.20141217/dash/previews/Track.h --- unity-7.1.2+14.04.20140303/dash/previews/Track.h 2014-03-03 16:47:14.000000000 +0000 +++ unity-7.2.4+14.04.20141217/dash/previews/Track.h 2014-12-17 20:51:37.000000000 +0000 @@ -55,18 +55,20 @@ void Update(dash::Track const& track_row); + nux::Property scale; + protected: virtual void Draw(nux::GraphicsEngine& gfx_engine, bool force_draw); virtual void DrawContent(nux::GraphicsEngine& gfx_engine, bool force_draw); virtual void PreLayoutManagement(); virtual nux::Area* FindAreaUnderMouse(const nux::Point& mouse_position, nux::NuxEventType event_type); - + // From debug::Introspectable std::string GetName() const; void AddProperties(debug::IntrospectionData&); - + virtual bool AcceptKeyNavFocus() { return false; } - + void SetupBackground(); void SetupViews(); @@ -97,9 +99,14 @@ nux::View* status_pause_layout_; nux::View* track_number_layout_; nux::LayeredLayout* track_status_layout_; + IconTexture* status_play_; + IconTexture* status_pause_; bool mouse_over_; connection::Wrapper player_connection_; + +private: + void UpdateScale(double scale); }; } diff -Nru unity-7.1.2+14.04.20140303/dash/previews/Tracks.cpp unity-7.2.4+14.04.20141217/dash/previews/Tracks.cpp --- unity-7.1.2+14.04.20140303/dash/previews/Tracks.cpp 2014-03-03 16:47:14.000000000 +0000 +++ unity-7.2.4+14.04.20141217/dash/previews/Tracks.cpp 2014-12-17 20:51:37.000000000 +0000 @@ -24,7 +24,6 @@ #include #include #include "unity-shared/IntrospectableWrappers.h" -#include "unity-shared/PlacesOverlayVScrollBar.h" #include "unity-shared/PreviewStyle.h" #include @@ -34,7 +33,12 @@ { namespace previews { + +namespace +{ DECLARE_LOGGER(logger, "unity.dash.preview.music.tracks"); +const RawPixel CHILDREN_SPACE = 1_em; +} NUX_IMPLEMENT_OBJECT_TYPE(Tracks); @@ -54,6 +58,9 @@ for (std::size_t i = 0; i < tracks_->count.Get(); ++i) OnTrackAdded(tracks_->RowAtIndex(i)); } + + UpdateScale(scale); + scale.changed.connect(sigc::mem_fun(this, &Tracks::UpdateScale)); } std::string Tracks::GetName() const @@ -69,11 +76,10 @@ void Tracks::SetupViews() { - SetVScrollBar(new dash::PlacesOverlayVScrollBar(NUX_TRACKER_LOCATION)); EnableHorizontalScrollBar(false); layout_ = new nux::VLayout(); - layout_->SetPadding(0, previews::Style::Instance().GetDetailsRightMargin(), 0, 0); - layout_->SetSpaceBetweenChildren(1); + layout_->SetPadding(0, previews::Style::Instance().GetDetailsRightMargin().CP(scale), 0, 0); + layout_->SetSpaceBetweenChildren(CHILDREN_SPACE.CP(scale)); SetLayout(layout_); } @@ -84,6 +90,7 @@ return; pos->second->Update(track_row); + pos->second->scale = scale(); } void Tracks::OnTrackAdded(dash::Track const& track_row) @@ -100,8 +107,9 @@ AddChild(track_view.GetPointer()); track_view->Update(track_row); - track_view->SetMinimumHeight(style.GetTrackHeight()); - track_view->SetMaximumHeight(style.GetTrackHeight()); + track_view->SetMinimumHeight(style.GetTrackHeight().CP(scale)); + track_view->SetMaximumHeight(style.GetTrackHeight().CP(scale)); + track_view->scale = scale(); layout_->AddView(track_view.GetPointer(), 0); m_tracks[track_uri] = track_view; @@ -111,7 +119,7 @@ void Tracks::OnTrackRemoved(dash::Track const& track_row) { LOG_TRACE(logger) << "OnTrackRemoved for " << track_row.title.Get(); - + auto pos = m_tracks.find(track_row.uri.Get()); if (pos == m_tracks.end()) return; @@ -121,6 +129,27 @@ ComputeContentSize(); } +void Tracks::UpdateScale(double scale) +{ + int track_height = Style::Instance().GetTrackHeight().CP(scale); + + for (auto const& track : m_tracks) + { + track.second->SetMinimumHeight(track_height); + track.second->SetMaximumHeight(track_height); + track.second->scale = scale; + } + + if (layout_) + { + layout_->SetPadding(0, Style::Instance().GetDetailsRightMargin().CP(scale), 0, 0); + layout_->SetSpaceBetweenChildren(CHILDREN_SPACE.CP(scale)); + } + + QueueRelayout(); + QueueDraw(); +} + } // namespace previews } // namespace dash } // namespace unity diff -Nru unity-7.1.2+14.04.20140303/dash/previews/Tracks.h unity-7.2.4+14.04.20141217/dash/previews/Tracks.h --- unity-7.1.2+14.04.20140303/dash/previews/Tracks.h 2014-03-03 16:47:14.000000000 +0000 +++ unity-7.2.4+14.04.20141217/dash/previews/Tracks.h 2014-12-17 20:51:37.000000000 +0000 @@ -27,6 +27,7 @@ #include #include #include +#include "unity-shared/OverlayScrollView.h" #include "unity-shared/Introspectable.h" #include "Track.h" @@ -44,7 +45,7 @@ namespace previews { -class Tracks : public debug::Introspectable, public nux::ScrollView +class Tracks : public debug::Introspectable, public dash::ScrollView { public: typedef nux::ObjectPtr Ptr; @@ -71,6 +72,9 @@ nux::VLayout* layout_; std::map m_tracks; connection::Manager sig_conn_; + +private: + void UpdateScale(double scale); }; } diff -Nru unity-7.1.2+14.04.20140303/dash/ResultRenderer.cpp unity-7.2.4+14.04.20141217/dash/ResultRenderer.cpp --- unity-7.1.2+14.04.20140303/dash/ResultRenderer.cpp 2014-03-03 16:47:14.000000000 +0000 +++ unity-7.2.4+14.04.20141217/dash/ResultRenderer.cpp 2014-12-17 20:51:37.000000000 +0000 @@ -108,6 +108,8 @@ return pbuf; } +double const DEFAULT_SCALE = 1.0; + } NUX_IMPLEMENT_OBJECT_TYPE(ResultRenderer); @@ -116,6 +118,7 @@ : InitiallyUnownedObject(NUX_FILE_LINE_PARAM) , width(50) , height(50) + , scale(DEFAULT_SCALE) {} void ResultRenderer::Render(nux::GraphicsEngine& GfxContext, diff -Nru unity-7.1.2+14.04.20140303/dash/ResultRenderer.h unity-7.2.4+14.04.20141217/dash/ResultRenderer.h --- unity-7.1.2+14.04.20140303/dash/ResultRenderer.h 2014-03-03 16:47:14.000000000 +0000 +++ unity-7.2.4+14.04.20141217/dash/ResultRenderer.h 2014-12-17 20:51:37.000000000 +0000 @@ -65,11 +65,14 @@ // unload any previous grabbed images virtual void Unload(Result const& row); + virtual void ReloadResult(Result const& row) {} + // get a image to drag virtual nux::NBitmapData* GetDndImage(Result const& row) const; nux::Property width; nux::Property height; + nux::Property scale; sigc::signal NeedsRedraw; }; diff -Nru unity-7.1.2+14.04.20140303/dash/ResultRendererHorizontalTile.cpp unity-7.2.4+14.04.20141217/dash/ResultRendererHorizontalTile.cpp --- unity-7.1.2+14.04.20140303/dash/ResultRendererHorizontalTile.cpp 2014-03-03 16:47:14.000000000 +0000 +++ unity-7.2.4+14.04.20141217/dash/ResultRendererHorizontalTile.cpp 2014-12-17 20:51:37.000000000 +0000 @@ -29,6 +29,8 @@ #include "unity-shared/CairoTexture.h" #include "unity-shared/TextureCache.h" +#include "unity-shared/RawPixel.h" +#include "unity-shared/UnitySettings.h" #include @@ -36,14 +38,14 @@ { namespace { -const int CARD_VIEW_PADDING = 4; // pixels -const int CARD_VIEW_ICON_SIZE = 64; // pixels -const int CARD_VIEW_ICON_TEXT_GAP = 10; // pixels -const int CARD_VIEW_WIDTH = 277; // pixels -const int CARD_VIEW_HEIGHT = 74; // pixels -const int CARD_VIEW_HIGHLIGHT_CORNER_RADIUS = 2; // pixels -const int CARD_VIEW_ICON_OUTLINE_WIDTH = 1; // pixels -const int CARD_VIEW_TEXT_LINE_SPACING = 0; // points +const RawPixel CARD_VIEW_PADDING = 4_em; +const RawPixel CARD_VIEW_ICON_SIZE = 64_em; +const RawPixel CARD_VIEW_ICON_TEXT_GAP = 10_em; +const RawPixel CARD_VIEW_WIDTH = 277_em; +const RawPixel CARD_VIEW_HEIGHT = 74_em; +const RawPixel CARD_VIEW_ICON_OUTLINE_WIDTH = 1_em; +const int CARD_VIEW_HIGHLIGHT_CORNER_RADIUS = 2; +const int CARD_VIEW_TEXT_LINE_SPACING = 0; void RenderTexture(nux::GraphicsEngine& GfxContext, int x, @@ -88,19 +90,26 @@ ResultRendererHorizontalTile::ResultRendererHorizontalTile(NUX_FILE_LINE_DECL) : ResultRendererTile(NUX_FILE_LINE_PARAM) { - width = CARD_VIEW_WIDTH; - height = CARD_VIEW_HEIGHT; + ReloadTextures(); + scale.changed.connect([this] (double) { ReloadTextures(); }); +} + +void ResultRendererHorizontalTile::ReloadTextures() +{ + width = CARD_VIEW_WIDTH.CP(scale()); + height = CARD_VIEW_HEIGHT.CP(scale()); // pre-load the highlight texture // try and get a texture from the texture cache TextureCache& cache = TextureCache::GetDefault(); prelight_cache_ = cache.FindTexture("ResultRendererHorizontalTile.PreLightTexture", - CARD_VIEW_WIDTH, - CARD_VIEW_HEIGHT, + width, + height, sigc::mem_fun(this, &ResultRendererHorizontalTile::DrawHighlight)); + normal_cache_ = cache.FindTexture("ResultRendererHorizontalTile.NormalTexture", - CARD_VIEW_WIDTH, - CARD_VIEW_HEIGHT, + width, + height, sigc::mem_fun(this, &ResultRendererHorizontalTile::DrawNormal)); } @@ -120,16 +129,16 @@ // set up our texture mode nux::TexCoordXForm texxform; - int icon_left_hand_side = geometry.x + padding; - int icon_top_side = geometry.y + ((geometry.height - CARD_VIEW_ICON_SIZE) / 2); + int icon_left_hand_side = geometry.x + Padding(); + int icon_top_side = geometry.y + ((geometry.height - CARD_VIEW_ICON_SIZE.CP(scale())) / 2); // render overall tile background "rectangle" if (state == ResultRendererState::RESULT_RENDERER_NORMAL) { int x = icon_left_hand_side; int y = icon_top_side; - int w = CARD_VIEW_WIDTH; - int h = CARD_VIEW_HEIGHT; + int w = CARD_VIEW_WIDTH.CP(scale()); + int h = CARD_VIEW_HEIGHT.CP(scale()); unsigned int alpha = 0; unsigned int src = 0; @@ -155,8 +164,8 @@ { int x = icon_left_hand_side; int y = icon_top_side; - int w = CARD_VIEW_WIDTH; - int h = CARD_VIEW_HEIGHT; + int w = CARD_VIEW_WIDTH.CP(scale()); + int h = CARD_VIEW_HEIGHT.CP(scale()); RenderTexture(GfxContext, x, @@ -172,15 +181,15 @@ // draw the icon if (container->icon) { - int x = icon_left_hand_side + CARD_VIEW_PADDING + CARD_VIEW_ICON_OUTLINE_WIDTH; - int y = icon_top_side + CARD_VIEW_PADDING + CARD_VIEW_ICON_OUTLINE_WIDTH; - int w = CARD_VIEW_ICON_SIZE; - int h = CARD_VIEW_ICON_SIZE; + int x = icon_left_hand_side + CARD_VIEW_PADDING.CP(scale()) + CARD_VIEW_ICON_OUTLINE_WIDTH.CP(scale()); + int y = icon_top_side + CARD_VIEW_PADDING.CP(scale()) + CARD_VIEW_ICON_OUTLINE_WIDTH.CP(scale()); + int w = CARD_VIEW_ICON_SIZE.CP(scale()); + int h = CARD_VIEW_ICON_SIZE.CP(scale()); gPainter.Paint2DQuadColor(GfxContext, - x - CARD_VIEW_ICON_OUTLINE_WIDTH, - y - CARD_VIEW_ICON_OUTLINE_WIDTH, - w + 2 * CARD_VIEW_ICON_OUTLINE_WIDTH, - h + 2 * CARD_VIEW_ICON_OUTLINE_WIDTH, + x - CARD_VIEW_ICON_OUTLINE_WIDTH.CP(scale()), + y - CARD_VIEW_ICON_OUTLINE_WIDTH.CP(scale()), + w + 2 * CARD_VIEW_ICON_OUTLINE_WIDTH.CP(scale()), + h + 2 * CARD_VIEW_ICON_OUTLINE_WIDTH.CP(scale()), nux::color::Black); RenderTexture(GfxContext, x, @@ -195,8 +204,13 @@ if (container->text) { - int x = icon_left_hand_side + CARD_VIEW_PADDING + 2 * CARD_VIEW_ICON_OUTLINE_WIDTH + CARD_VIEW_ICON_SIZE + CARD_VIEW_ICON_TEXT_GAP; - int y = icon_top_side + CARD_VIEW_PADDING; + int x = icon_left_hand_side + + CARD_VIEW_PADDING.CP(scale()) + + 2 * CARD_VIEW_ICON_OUTLINE_WIDTH.CP(scale()) + + CARD_VIEW_ICON_SIZE.CP(scale()) + + CARD_VIEW_ICON_TEXT_GAP.CP(scale()); + + int y = icon_top_side + CARD_VIEW_PADDING.CP(scale()); int w = container->text->GetWidth(); int h = container->text->GetHeight(); @@ -216,6 +230,7 @@ int width, int height) { nux::CairoGraphics cairo_graphics(CAIRO_FORMAT_ARGB32, width, height); + cairo_surface_set_device_scale(cairo_graphics.GetSurface(), scale(), scale()); cairo_t* cr = cairo_graphics.GetInternalContext(); cairo_scale(cr, 1.0f, 1.0f); @@ -232,8 +247,8 @@ 0.0f, 0.0f, CARD_VIEW_HIGHLIGHT_CORNER_RADIUS, - width, - height, + width/scale(), + height/scale(), false); cairo_fill(cr); @@ -244,6 +259,7 @@ int width, int height) { nux::CairoGraphics cairo_graphics(CAIRO_FORMAT_ARGB32, width, height); + cairo_surface_set_device_scale(cairo_graphics.GetSurface(), scale(), scale()); cairo_t* cr = cairo_graphics.GetInternalContext(); cairo_scale(cr, 1.0f, 1.0f); @@ -260,8 +276,8 @@ 0.0f, 0.0f, CARD_VIEW_HIGHLIGHT_CORNER_RADIUS, - width, - height, + width/scale(), + height/scale(), false); cairo_fill(cr); @@ -283,18 +299,21 @@ g_free(comment); nux::CairoGraphics _cairoGraphics(CAIRO_FORMAT_ARGB32, - CARD_VIEW_WIDTH - CARD_VIEW_ICON_SIZE - 2 * CARD_VIEW_ICON_OUTLINE_WIDTH - 2 * CARD_VIEW_PADDING - CARD_VIEW_ICON_TEXT_GAP, - CARD_VIEW_HEIGHT - 2 * CARD_VIEW_PADDING); + CARD_VIEW_WIDTH.CP(scale()) - + CARD_VIEW_ICON_SIZE.CP(scale()) - + 2 * CARD_VIEW_ICON_OUTLINE_WIDTH.CP(scale()) - + 2 * CARD_VIEW_PADDING.CP(scale()) - + CARD_VIEW_ICON_TEXT_GAP.CP(scale()), + CARD_VIEW_HEIGHT.CP(scale()) - + 2 * CARD_VIEW_PADDING.CP(scale())); + cairo_surface_set_device_scale(_cairoGraphics.GetSurface(), scale(), scale()); - cairo_t* cr = _cairoGraphics.GetContext(); + cairo_t* cr = _cairoGraphics.GetInternalContext(); PangoLayout* layout = NULL; PangoFontDescription* desc = NULL; PangoContext* pango_context = NULL; GdkScreen* screen = gdk_screen_get_default(); // not ref'ed - int dpi = -1; - - g_object_get(gtk_settings_get_default(), "gtk-xft-dpi", &dpi, NULL); cairo_set_font_options(cr, gdk_screen_get_font_options(screen)); layout = pango_cairo_create_layout(cr); @@ -306,16 +325,19 @@ pango_layout_set_wrap(layout, PANGO_WRAP_WORD_CHAR); pango_layout_set_ellipsize(layout, PANGO_ELLIPSIZE_END); pango_layout_set_spacing(layout, CARD_VIEW_TEXT_LINE_SPACING * PANGO_SCALE); - pango_layout_set_width(layout, (CARD_VIEW_WIDTH - CARD_VIEW_ICON_SIZE - 2 * CARD_VIEW_ICON_OUTLINE_WIDTH - 2 * CARD_VIEW_PADDING - CARD_VIEW_ICON_TEXT_GAP) * PANGO_SCALE); + pango_layout_set_width(layout, (CARD_VIEW_WIDTH - + CARD_VIEW_ICON_SIZE - + 2 * CARD_VIEW_ICON_OUTLINE_WIDTH - + 2 * CARD_VIEW_PADDING - + CARD_VIEW_ICON_TEXT_GAP) * PANGO_SCALE); + pango_layout_set_height(layout, -4); pango_layout_set_markup(layout, final_text.str().c_str(), -1); pango_context = pango_layout_get_context(layout); // is not ref'ed - pango_cairo_context_set_font_options(pango_context, - gdk_screen_get_font_options(screen)); - pango_cairo_context_set_resolution(pango_context, - dpi == -1 ? 96.0f : dpi/(float) PANGO_SCALE); + pango_cairo_context_set_font_options(pango_context, gdk_screen_get_font_options(screen)); + pango_cairo_context_set_resolution(pango_context, 96.0 * Settings::Instance().font_scaling()); pango_layout_context_changed(layout); cairo_set_operator(cr, CAIRO_OPERATOR_CLEAR); @@ -336,8 +358,6 @@ pango_font_description_free(desc); g_object_unref(layout); - cairo_destroy(cr); - TextureContainer *container = row.renderer(); if (container) container->text = texture_ptr_from_cairo_graphics(_cairoGraphics); @@ -353,9 +373,12 @@ int width = gdk_pixbuf_get_width(container->drag_icon); int height = gdk_pixbuf_get_height(container->drag_icon); - if (width != CARD_VIEW_ICON_SIZE || height != CARD_VIEW_ICON_SIZE) + if (width != CARD_VIEW_ICON_SIZE.CP(scale()) || height != CARD_VIEW_ICON_SIZE.CP(scale())) { - nux::GdkGraphics graphics(gdk_pixbuf_scale_simple(container->drag_icon, CARD_VIEW_ICON_SIZE, CARD_VIEW_ICON_SIZE, GDK_INTERP_BILINEAR)); + nux::GdkGraphics graphics(gdk_pixbuf_scale_simple(container->drag_icon, + CARD_VIEW_ICON_SIZE.CP(scale()), + CARD_VIEW_ICON_SIZE.CP(scale()), + GDK_INTERP_BILINEAR)); bitmap = graphics.GetBitmap(); } } diff -Nru unity-7.1.2+14.04.20140303/dash/ResultRendererHorizontalTile.h unity-7.2.4+14.04.20141217/dash/ResultRendererHorizontalTile.h --- unity-7.1.2+14.04.20140303/dash/ResultRendererHorizontalTile.h 2014-03-03 16:47:14.000000000 +0000 +++ unity-7.2.4+14.04.20141217/dash/ResultRendererHorizontalTile.h 2014-12-17 20:51:37.000000000 +0000 @@ -55,6 +55,8 @@ virtual void LoadText(Result const& row); private: + void ReloadTextures(); + nux::BaseTexture* DrawHighlight(std::string const& texid, int width, int height); nux::BaseTexture* DrawNormal(std::string const& texid, diff -Nru unity-7.1.2+14.04.20140303/dash/ResultRendererTile.cpp unity-7.2.4+14.04.20141217/dash/ResultRendererTile.cpp --- unity-7.1.2+14.04.20140303/dash/ResultRendererTile.cpp 2014-03-03 16:47:14.000000000 +0000 +++ unity-7.2.4+14.04.20141217/dash/ResultRendererTile.cpp 2014-12-17 20:51:37.000000000 +0000 @@ -31,12 +31,7 @@ #include "unity-shared/CairoTexture.h" #include "unity-shared/DashStyle.h" #include "unity-shared/TextureCache.h" - -namespace -{ -bool neko; -#define DEFAULT_GICON ". GThemedIcon text-x-preview" -} +#include "unity-shared/UnitySettings.h" namespace unity { @@ -44,12 +39,16 @@ namespace { -const int FONT_SIZE = 10; -const char REPLACEMENT_CHAR = '?'; +const std::string DEFAULT_GICON = ". GThemedIcon text-x-preview"; +const RawPixel PADDING = 6_em; +const RawPixel SPACING = 10_em; +const int FONT_SIZE = 10; +const int FONT_MULTIPLIER = 1024; -const float CORNER_HIGHTLIGHT_RADIUS = 2.0f; +char const REPLACEMENT_CHAR = '?'; +float const CORNER_HIGHTLIGHT_RADIUS = 2.0f; -void RenderTexture(nux::GraphicsEngine& GfxContext, +void RenderTexture(nux::GraphicsEngine& GfxContext, int x, int y, int width, @@ -92,17 +91,19 @@ ResultRendererTile::ResultRendererTile(NUX_FILE_LINE_DECL) : ResultRenderer(NUX_FILE_LINE_PARAM) - , spacing(10) - , padding(6) { - dash::Style& style = dash::Style::Instance(); - width = style.GetTileWidth(); - height = style.GetTileHeight(); - - gsize tmp; - gchar* tmp1 = (gchar*)g_base64_decode("VU5JVFlfTkVLTw==", &tmp); - neko = (g_getenv(tmp1)); - g_free (tmp1); + UpdateWidthHeight(); + scale.changed.connect([this] (double) { UpdateWidthHeight(); }); +} + +void ResultRendererTile::UpdateWidthHeight() +{ + dash::Style const& style = dash::Style::Instance(); + RawPixel tile_width = style.GetTileWidth(); + RawPixel tile_height = style.GetTileHeight(); + + width = tile_width.CP(scale()); + height = tile_height.CP(scale()); } void ResultRendererTile::Render(nux::GraphicsEngine& GfxContext, @@ -117,8 +118,8 @@ if (container == nullptr) return; - dash::Style& style = dash::Style::Instance(); - int tile_icon_size = style.GetTileImageSize(); + dash::Style const& style = dash::Style::Instance(); + int tile_icon_size = style.GetTileImageSize().CP(scale); // set up our texture mode nux::TexCoordXForm texxform; @@ -135,13 +136,13 @@ } int icon_left_hand_side = geometry.x + (geometry.width - icon_width) / 2; - int icon_top_side = geometry.y + padding + (tile_icon_size - icon_height) / 2; + int icon_top_side = geometry.y + PADDING.CP(scale()) + (tile_icon_size - icon_height) / 2; // render highlight if its needed if (container->prelight && state != ResultRendererState::RESULT_RENDERER_NORMAL) { - int highlight_x = (geometry.x + geometry.width/2) - style.GetTileIconHightlightWidth()/2; - int highlight_y = (geometry.y + padding + tile_icon_size / 2) - style.GetTileIconHightlightHeight()/2; + int highlight_x = (geometry.x + geometry.width/2) - style.GetTileIconHightlightWidth().CP(scale)/2; + int highlight_y = (geometry.y + PADDING.CP(scale) + tile_icon_size / 2) - style.GetTileIconHightlightHeight().CP(scale)/2; RenderTexture(GfxContext, highlight_x, @@ -171,10 +172,10 @@ if (container->text) { RenderTexture(GfxContext, - geometry.x + padding, - geometry.y + tile_icon_size + spacing, - style.GetTileWidth() - (padding * 2), - style.GetTileHeight() - tile_icon_size - spacing, + geometry.x + PADDING.CP(scale), + geometry.y + tile_icon_size + SPACING.CP(scale), + style.GetTileWidth().CP(scale) - (PADDING.CP(scale) * 2), + style.GetTileHeight().CP(scale) - tile_icon_size - SPACING.CP(scale), container->text->GetDeviceTexture(), texxform, color, @@ -185,6 +186,7 @@ nux::BaseTexture* ResultRendererTile::DrawHighlight(std::string const& texid, int width, int height) { nux::CairoGraphics cairo_graphics(CAIRO_FORMAT_ARGB32, width, height); + cairo_surface_set_device_scale(cairo_graphics.GetSurface(), scale(), scale()); cairo_t* cr = cairo_graphics.GetInternalContext(); cairo_scale(cr, 1.0f, 1.0f); @@ -201,14 +203,19 @@ 0.0f, 0.0f, CORNER_HIGHTLIGHT_RADIUS, - width, - height, + width/scale(), + height/scale(), false); cairo_fill(cr); return texture_from_cairo_graphics(cairo_graphics); } +int ResultRendererTile::Padding() const +{ + return PADDING.CP(scale()); +} + void ResultRendererTile::Preload(Result const& row) { if (row.renderer() == nullptr) @@ -220,6 +227,17 @@ } } +void ResultRendererTile::ReloadResult(Result const& row) +{ + Unload(row); + + if (row.renderer() == nullptr) + const_cast(row).set_renderer(new TextureContainer()); + + LoadIcon(row); + LoadText(row); +} + void ResultRendererTile::Unload(Result const& row) { TextureContainer *container = row.renderer(); @@ -247,23 +265,12 @@ void ResultRendererTile::LoadIcon(Result const& row) { - Style& style = Style::Instance(); - std::string icon_hint(row.icon_hint); - std::string icon_name; - if (G_UNLIKELY(neko)) - { - int tmp1 = style.GetTileGIconSize() + (rand() % 16) - 8; - gsize tmp3; - gchar* tmp2 = (gchar*)g_base64_decode("aHR0cDovL3BsYWNla2l0dGVuLmNvbS8laS8laS8=", &tmp3); - gchar* tmp4 = g_strdup_printf(tmp2, tmp1, tmp1); - icon_name = tmp4; - g_free(tmp4); - g_free(tmp2); - } - else - { - icon_name = !icon_hint.empty() ? icon_hint : DEFAULT_GICON; - } + Style const& style = Style::Instance(); + int tile_size = style.GetTileImageSize().CP(scale); + int tile_gsize = style.GetTileGIconSize().CP(scale); + + std::string const& icon_hint = row.icon_hint; + std::string const& icon_name = !icon_hint.empty() ? icon_hint : DEFAULT_GICON; glib::Object icon(g_icon_new_for_string(icon_name.c_str(), NULL)); TextureContainer* container = row.renderer(); @@ -271,8 +278,10 @@ if (container) { TextureCache& cache = TextureCache::GetDefault(); - - BaseTexturePtr texture_prelight(cache.FindTexture("resultview_prelight", style.GetTileIconHightlightWidth(), style.GetTileIconHightlightHeight(), sigc::mem_fun(this, &ResultRendererTile::DrawHighlight))); + BaseTexturePtr texture_prelight(cache.FindTexture("resultview_prelight", + style.GetTileIconHightlightWidth().CP(scale), + style.GetTileIconHightlightHeight().CP(scale), + sigc::mem_fun(this, &ResultRendererTile::DrawHighlight))); container->prelight = texture_prelight; } @@ -281,11 +290,14 @@ if (icon.IsType(G_TYPE_ICON)) { bool use_large_icon = icon.IsType(G_TYPE_FILE_ICON) || !icon.IsType(G_TYPE_THEMED_ICON); - container->slot_handle = IconLoader::GetDefault().LoadFromGIconString(icon_name, style.GetTileImageSize(), use_large_icon ? style.GetTileImageSize() : style.GetTileGIconSize(), slot); + container->slot_handle = IconLoader::GetDefault().LoadFromGIconString(icon_name, + tile_size, + use_large_icon ? + tile_size : tile_gsize, slot); } else { - container->slot_handle = IconLoader::GetDefault().LoadFromIconName(icon_name, -1, style.GetTileGIconSize(), slot); + container->slot_handle = IconLoader::GetDefault().LoadFromIconName(icon_name, -1, tile_gsize, slot); } } @@ -314,12 +326,10 @@ { // slow path for non square icons that must be resized to fit in the square // texture - - Style& style = Style::Instance(); float aspect = static_cast(pixbuf_height) / pixbuf_width; // already sanitized width/height so can not be 0.0 if (aspect < 1.0f) { - pixbuf_width = style.GetTileImageSize(); + pixbuf_width = Style::Instance().GetTileImageSize().CP(scale); pixbuf_height = pixbuf_width * aspect; if (pixbuf_height > height) @@ -342,6 +352,7 @@ } nux::CairoGraphics cairo_graphics(CAIRO_FORMAT_ARGB32, pixbuf_width, pixbuf_height); + cairo_surface_set_device_scale(cairo_graphics.GetSurface(), scale(), scale()); cairo_t* cr = cairo_graphics.GetInternalContext(); cairo_set_operator(cr, CAIRO_OPERATOR_CLEAR); @@ -401,7 +412,7 @@ bool IsBlacklistedChar(gunichar uni_c) { if ((uni_c >= 0x1000 && uni_c <= 0x109F) || - (uni_c >= 0xAA60 && uni_c >= 0xAA7B)) + (uni_c >= 0xAA60 && uni_c <= 0xAA7B)) { return true; } @@ -446,34 +457,34 @@ void ResultRendererTile::LoadText(Result const& row) { - Style& style = Style::Instance(); + Style const& style = Style::Instance(); + nux::CairoGraphics _cairoGraphics(CAIRO_FORMAT_ARGB32, - style.GetTileWidth() - (padding * 2), - style.GetTileHeight() - style.GetTileImageSize() - spacing); + style.GetTileWidth().CP(scale()) - (PADDING.CP(scale()) * 2), + style.GetTileHeight().CP(scale()) - style.GetTileImageSize().CP(scale()) - SPACING.CP(scale())); + cairo_surface_set_device_scale(_cairoGraphics.GetSurface(), scale(), scale()); - cairo_t* cr = _cairoGraphics.GetContext(); + cairo_t* cr = _cairoGraphics.GetInternalContext(); PangoLayout* layout = NULL; PangoFontDescription* desc = NULL; PangoContext* pango_context = NULL; GdkScreen* screen = gdk_screen_get_default(); // not ref'ed glib::String font; - int dpi = -1; g_object_get(gtk_settings_get_default(), "gtk-font-name", &font, NULL); - g_object_get(gtk_settings_get_default(), "gtk-xft-dpi", &dpi, NULL); cairo_set_font_options(cr, gdk_screen_get_font_options(screen)); layout = pango_cairo_create_layout(cr); desc = pango_font_description_from_string(font.Value()); - pango_font_description_set_size (desc, FONT_SIZE * PANGO_SCALE); + pango_font_description_set_size (desc, FONT_SIZE * FONT_MULTIPLIER); pango_layout_set_font_description(layout, desc); pango_layout_set_alignment(layout, PANGO_ALIGN_CENTER); pango_layout_set_wrap(layout, PANGO_WRAP_WORD_CHAR); pango_layout_set_ellipsize(layout, PANGO_ELLIPSIZE_START); - pango_layout_set_width(layout, (style.GetTileWidth() - (padding * 2))* PANGO_SCALE); + pango_layout_set_width(layout, (style.GetTileWidth() - (PADDING * 2))* PANGO_SCALE); pango_layout_set_height(layout, -2); // FIXME bug #1239381 @@ -486,10 +497,8 @@ g_free (escaped_text); pango_context = pango_layout_get_context(layout); // is not ref'ed - pango_cairo_context_set_font_options(pango_context, - gdk_screen_get_font_options(screen)); - pango_cairo_context_set_resolution(pango_context, - dpi == -1 ? 96.0f : dpi/(float) PANGO_SCALE); + pango_cairo_context_set_font_options(pango_context, gdk_screen_get_font_options(screen)); + pango_cairo_context_set_resolution(pango_context, 96.0 * Settings::Instance().font_scaling()); pango_layout_context_changed(layout); cairo_set_operator(cr, CAIRO_OPERATOR_CLEAR); @@ -504,7 +513,6 @@ // clean up pango_font_description_free(desc); g_object_unref(layout); - cairo_destroy(cr); TextureContainer *container = row.renderer(); if (container) diff -Nru unity-7.1.2+14.04.20140303/dash/ResultRendererTile.h unity-7.2.4+14.04.20141217/dash/ResultRendererTile.h --- unity-7.1.2+14.04.20140303/dash/ResultRendererTile.h 2014-03-03 16:47:14.000000000 +0000 +++ unity-7.2.4+14.04.20141217/dash/ResultRendererTile.h 2014-12-17 20:51:37.000000000 +0000 @@ -72,11 +72,11 @@ virtual void Preload(Result const& row); virtual void Unload(Result const& row); - virtual nux::NBitmapData* GetDndImage(Result const& row) const; - int spacing; - int padding; + void ReloadResult(Result const& row); + + int Padding() const; protected: virtual void LoadText(Result const& row); @@ -93,6 +93,8 @@ glib::Object const& pixbuf); nux::BaseTexture* DrawHighlight(std::string const& texid, int width, int height); + + void UpdateWidthHeight(); }; } diff -Nru unity-7.1.2+14.04.20140303/dash/ResultView.cpp unity-7.2.4+14.04.20141217/dash/ResultView.cpp --- unity-7.1.2+14.04.20140303/dash/ResultView.cpp 2014-03-03 16:47:14.000000000 +0000 +++ unity-7.2.4+14.04.20141217/dash/ResultView.cpp 2014-12-17 20:51:37.000000000 +0000 @@ -27,12 +27,18 @@ #include "unity-shared/IntrospectableWrappers.h" #include "unity-shared/GraphicsUtils.h" +#include "unity-shared/UnitySettings.h" namespace unity { namespace dash { +namespace +{ + double const DEFAULT_SCALE = 1.0; +} + NUX_IMPLEMENT_OBJECT_TYPE(ResultView); ResultView::ResultView(NUX_FILE_LINE_DECL) @@ -40,6 +46,7 @@ , expanded(true) , desaturation_progress(0.0) , enable_texture_render(false) + , scale(DEFAULT_SCALE) , renderer_(NULL) , cached_result_(nullptr, nullptr, nullptr) { @@ -54,7 +61,9 @@ NeedRedraw(); }); + Settings::Instance().font_scaling.changed.connect(sigc::mem_fun(this, &ResultView::UpdateFontScale)); enable_texture_render.changed.connect(sigc::mem_fun(this, &ResultView::OnEnableRenderToTexture)); + scale.changed.connect(sigc::mem_fun(this, &ResultView::UpdateScale)); } ResultView::~ResultView() @@ -73,6 +82,30 @@ renderer_->UnReference(); } +void ResultView::UpdateScale(double scale) +{ + if (renderer_) + { + renderer_->scale = scale; + + for (auto const& result : *result_model_) + renderer_->ReloadResult(result); + + QueueDraw(); + } +} + +void ResultView::UpdateFontScale(double scale) +{ + if (renderer_) + { + for (auto const& result : *result_model_) + renderer_->ReloadResult(result); + + QueueDraw(); + } +} + void ResultView::SetModelRenderer(ResultRenderer* renderer) { if (renderer_ != NULL) diff -Nru unity-7.1.2+14.04.20140303/dash/ResultViewGrid.cpp unity-7.2.4+14.04.20141217/dash/ResultViewGrid.cpp --- unity-7.1.2+14.04.20140303/dash/ResultViewGrid.cpp 2014-03-03 16:47:14.000000000 +0000 +++ unity-7.2.4+14.04.20141217/dash/ResultViewGrid.cpp 2014-12-17 20:51:37.000000000 +0000 @@ -33,6 +33,7 @@ #include "unity-shared/UBusWrapper.h" #include "unity-shared/UBusMessages.h" #include "unity-shared/GraphicsUtils.h" +#include "unity-shared/RawPixel.h" #include "unity-shared/UnitySettings.h" #include "unity-shared/WindowManager.h" #include "ResultViewGrid.h" @@ -54,6 +55,9 @@ const float FOCUSED_ICON_SATURATION_REF = 0.5f; const int DOUBLE_CLICK_SPEED = 500; //500 ms (double-click speed hardcoded to 400 ms in nux) + + const RawPixel WIDTH_PADDING = 25_em; + const RawPixel SCROLLBAR_WIDTH = 3_em; } NUX_IMPLEMENT_OBJECT_TYPE(ResultViewGrid); @@ -87,6 +91,7 @@ selected_index_.changed.connect(needredraw_lambda); expanded.changed.connect([this](bool value) { if (value) all_results_preloaded_ = false; }); results_per_row.changed.connect([this](int value) { if (value > 0) all_results_preloaded_ = false; }); + scale.changed.connect(sigc::mem_fun(this, &ResultViewGrid::UpdateScale)); key_nav_focus_change.connect(sigc::mem_fun(this, &ResultViewGrid::OnKeyNavFocusChange)); key_nav_focus_activate.connect([this] (nux::Area *area) @@ -347,7 +352,7 @@ int width = (items_per_row * renderer_->width) + (padding*2) + ((items_per_row - 1) * horizontal_spacing); int geo_width = GetBaseWidth(); - int extra_width = geo_width - (width + 25-3); + int extra_width = geo_width - (width + WIDTH_PADDING.CP(scale()) - SCROLLBAR_WIDTH.CP(scale())); if (items_per_row != 1) extra_horizontal_spacing_ = extra_width / (items_per_row - 1); @@ -1007,6 +1012,12 @@ } void +ResultViewGrid::UpdateScale(double scale) +{ + UpdateRenderTextures(); +} + +void ResultViewGrid::UpdateRenderTextures() { nux::Geometry root_geo(GetAbsoluteGeometry()); diff -Nru unity-7.1.2+14.04.20140303/dash/ResultViewGrid.h unity-7.2.4+14.04.20141217/dash/ResultViewGrid.h --- unity-7.1.2+14.04.20140303/dash/ResultViewGrid.h 2014-03-03 16:47:14.000000000 +0000 +++ unity-7.2.4+14.04.20141217/dash/ResultViewGrid.h 2014-12-17 20:51:37.000000000 +0000 @@ -51,7 +51,7 @@ virtual int GetSelectedIndex() const; virtual void SetSelectedIndex(int index); - + virtual unsigned GetIndexAtPosition(int x, int y); virtual void Activate(LocalResult const& local_result, int index, ActivateType type); @@ -99,6 +99,7 @@ void QueueLazyLoad(); void QueueResultsChanged(); bool DoLazyLoad(); + void UpdateScale(double scale); int GetItemsPerRow(); void SizeReallocate(); @@ -130,7 +131,6 @@ UBusManager ubus_; glib::Source::UniquePtr lazy_load_source_; glib::Source::UniquePtr results_changed_idle_; - glib::Source::UniquePtr activate_timer_; }; diff -Nru unity-7.1.2+14.04.20140303/dash/ResultView.h unity-7.2.4+14.04.20141217/dash/ResultView.h --- unity-7.1.2+14.04.20140303/dash/ResultView.h 2014-03-03 16:47:14.000000000 +0000 +++ unity-7.2.4+14.04.20141217/dash/ResultView.h 2014-12-17 20:51:37.000000000 +0000 @@ -81,6 +81,8 @@ nux::Property unique_id; nux::Property desaturation_progress; nux::Property enable_texture_render; + nux::Property scale; + sigc::signal ResultActivated; std::string GetName() const; @@ -124,6 +126,8 @@ private: void OnRowAdded(DeeModel* model, DeeModelIter* iter); void OnRowRemoved(DeeModel* model, DeeModelIter* iter); + void UpdateScale(double scale); + void UpdateFontScale(double scale); Result cached_result_; connection::Manager result_connections_; diff -Nru unity-7.1.2+14.04.20140303/dash/ScopeBar.cpp unity-7.2.4+14.04.20141217/dash/ScopeBar.cpp --- unity-7.1.2+14.04.20140303/dash/ScopeBar.cpp 2014-03-03 16:47:14.000000000 +0000 +++ unity-7.2.4+14.04.20141217/dash/ScopeBar.cpp 2014-12-17 20:51:37.000000000 +0000 @@ -38,7 +38,8 @@ { // according to Q design the inner area of the scopebar should be 40px // (without any borders) -const int SCOPEBAR_HEIGHT = 41; +RawPixel const SCOPEBAR_HEIGHT = 41_em; +RawPixel const TRIANGLE_SIZE = 5_em; } @@ -46,7 +47,9 @@ ScopeBar::ScopeBar() : nux::View(NUX_TRACKER_LOCATION) + , scale(1.0) { + scale.changed.connect(sigc::mem_fun(this, &ScopeBar::UpdateScale)); SetupBackground(); SetupLayout(); } @@ -60,14 +63,26 @@ bg_layer_.reset(new nux::ColorLayer(nux::Color(0.0f, 0.0f, 0.0f, 0.2f), true, rop)); } +void ScopeBar::UpdateScale(double scale) +{ + SetMinimumHeight(SCOPEBAR_HEIGHT.CP(scale)); + SetMaximumHeight(SCOPEBAR_HEIGHT.CP(scale)); + + for (auto icon : icons_) + icon->scale = scale; + + QueueDraw(); + QueueRelayout(); +} + void ScopeBar::SetupLayout() { layout_ = new nux::HLayout(NUX_TRACKER_LOCATION); layout_->SetContentDistribution(nux::MAJOR_POSITION_CENTER); SetLayout(layout_); - SetMinimumHeight(SCOPEBAR_HEIGHT); - SetMaximumHeight(SCOPEBAR_HEIGHT); + SetMinimumHeight(SCOPEBAR_HEIGHT.CP(scale())); + SetMaximumHeight(SCOPEBAR_HEIGHT.CP(scale())); } void ScopeBar::AddScope(Scope::Ptr const& scope) @@ -75,6 +90,7 @@ ScopeBarIcon* icon = new ScopeBarIcon(scope->id, scope->icon_hint); icon->SetVisible(scope->visible); + icon->scale = scale(); scope->visible.changed.connect([icon](bool visible) { icon->SetVisible(visible); } ); icons_.push_back(icon); layout_->AddView(icon, 0, nux::MINOR_POSITION_CENTER, nux::MINOR_SIZE_FIX); @@ -160,9 +176,9 @@ { nux::Geometry const& geo = icon->GetGeometry(); int middle = geo.x + geo.width/2; - int size = 5; // Nux doesn't draw too well the small triangles, so let's draw a // bigger one and clip part of them using the "-1". + int size = TRIANGLE_SIZE.CP(scale()); int y = base.y - 1; nux::GetPainter().Draw2DTriangleColor(graphics_engine, diff -Nru unity-7.1.2+14.04.20140303/dash/ScopeBar.h unity-7.2.4+14.04.20141217/dash/ScopeBar.h --- unity-7.1.2+14.04.20140303/dash/ScopeBar.h 2014-03-03 16:47:14.000000000 +0000 +++ unity-7.2.4+14.04.20141217/dash/ScopeBar.h 2014-12-17 20:51:37.000000000 +0000 @@ -57,6 +57,8 @@ public: ScopeBar(); + nux::Property scale; + void AddScope(Scope::Ptr const& scope); void Activate(std::string id); void ActivateNext(); @@ -74,6 +76,7 @@ void DrawContent(nux::GraphicsEngine& gfx_context, bool force_draw); void SetActive(ScopeBarIcon* icon); + void UpdateScale(double scale); bool AcceptKeyNavFocus(); std::string GetName() const; diff -Nru unity-7.1.2+14.04.20140303/dash/ScopeBarIcon.cpp unity-7.2.4+14.04.20141217/dash/ScopeBarIcon.cpp --- unity-7.1.2+14.04.20140303/dash/ScopeBarIcon.cpp 2014-03-03 16:47:14.000000000 +0000 +++ unity-7.2.4+14.04.20141217/dash/ScopeBarIcon.cpp 2014-12-17 20:51:37.000000000 +0000 @@ -28,25 +28,25 @@ namespace { -const int FOCUS_OVERLAY_HEIGHT = 44; -const int FOCUS_OVERLAY_WIDTH = 60; +RawPixel const FOCUS_OVERLAY_HEIGHT = 44_em; +RawPixel const FOCUS_OVERLAY_WIDTH = 60_em; +RawPixel const TEXTURE_SIZE = 24_em; +double const DEFAULT_SCALE = 1.0; } NUX_IMPLEMENT_OBJECT_TYPE(ScopeBarIcon); ScopeBarIcon::ScopeBarIcon(std::string id_, std::string icon_hint) - : IconTexture(icon_hint, 24) + : IconTexture(icon_hint, TEXTURE_SIZE) , id(id_) , active(false) + , scale(DEFAULT_SCALE) , inactive_opacity_(0.4f) { - SetMinimumWidth(FOCUS_OVERLAY_WIDTH); - SetMaximumWidth(FOCUS_OVERLAY_WIDTH); - SetMinimumHeight(FOCUS_OVERLAY_HEIGHT); - SetMaximumHeight(FOCUS_OVERLAY_HEIGHT); + SetMinMaxSize(FOCUS_OVERLAY_WIDTH.CP(scale()), FOCUS_OVERLAY_HEIGHT.CP(scale())); - focus_layer_.reset(Style::Instance().FocusOverlay(FOCUS_OVERLAY_WIDTH, FOCUS_OVERLAY_HEIGHT)); + focus_layer_.reset(Style::Instance().FocusOverlay(FOCUS_OVERLAY_WIDTH.CP(scale()), FOCUS_OVERLAY_HEIGHT.CP(scale()))); SetOpacity(inactive_opacity_); @@ -55,11 +55,22 @@ SetAcceptKeyNavFocusOnMouseEnter(true); active.changed.connect(sigc::mem_fun(this, &ScopeBarIcon::OnActiveChanged)); + scale.changed.connect(sigc::mem_fun(this, &ScopeBarIcon::UpdateScale)); key_nav_focus_change.connect([this](nux::Area*, bool, nux::KeyNavDirection){ QueueDraw(); }); } -ScopeBarIcon::~ScopeBarIcon() -{} +void ScopeBarIcon::UpdateScale(double scale) +{ + int overlay_width = FOCUS_OVERLAY_WIDTH.CP(scale); + int overlay_height = FOCUS_OVERLAY_HEIGHT.CP(scale); + + SetMinMaxSize(overlay_width, overlay_height); + focus_layer_.reset(Style::Instance().FocusOverlay(overlay_width, overlay_height)); + + SetSize(TEXTURE_SIZE.CP(scale)); + ReLoadIcon(); + QueueDraw(); +} void ScopeBarIcon::Draw(nux::GraphicsEngine& graphics_engine, bool force_draw) { @@ -88,7 +99,6 @@ int width = 0, height = 0; GetTextureSize(&width, &height); - nux::Color col(1.0f * opacity, 1.0f * opacity, 1.0f * opacity, opacity); nux::TexCoordXForm texxform; texxform.SetTexCoordType(nux::TexCoordXForm::OFFSET_COORD); texxform.SetWrap(nux::TEXWRAP_CLAMP_TO_BORDER, nux::TEXWRAP_CLAMP_TO_BORDER); @@ -99,7 +109,7 @@ height, texture()->GetDeviceTexture(), texxform, - col); + nux::color::White * opacity); graphics_engine.GetRenderStates().SetBlend(current_alpha_blend, current_src_blend_factor, current_dest_blend_factor); } diff -Nru unity-7.1.2+14.04.20140303/dash/ScopeBarIcon.h unity-7.2.4+14.04.20141217/dash/ScopeBarIcon.h --- unity-7.1.2+14.04.20140303/dash/ScopeBarIcon.h 2014-03-03 16:47:14.000000000 +0000 +++ unity-7.2.4+14.04.20141217/dash/ScopeBarIcon.h 2014-12-17 20:51:37.000000000 +0000 @@ -38,14 +38,15 @@ NUX_DECLARE_OBJECT_TYPE(ScopeBarIcon, IconTexture); public: ScopeBarIcon(std::string id, std::string icon_hint); - ~ScopeBarIcon(); nux::Property id; nux::Property active; + nux::Property scale; private: void Draw(nux::GraphicsEngine& gfx_context, bool force_draw); void OnActiveChanged(bool is_active); + void UpdateScale(double scale); // Introspectable std::string GetName() const; diff -Nru unity-7.1.2+14.04.20140303/dash/ScopeView.cpp unity-7.2.4+14.04.20141217/dash/ScopeView.cpp --- unity-7.1.2+14.04.20140303/dash/ScopeView.cpp 2014-03-03 16:47:14.000000000 +0000 +++ unity-7.2.4+14.04.20141217/dash/ScopeView.cpp 2014-12-17 20:51:37.000000000 +0000 @@ -1,6 +1,6 @@ // -*- Mode: C++; indent-tabs-mode: nil; tab-width: 2 -*- /* - * Copyright (C) 2010, 2011 Canonical Ltd + * Copyright (C) 2010-2014 Canonical Ltd * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License version 3 as @@ -29,7 +29,7 @@ #include "ResultRendererHorizontalTile.h" #include "unity-shared/UBusMessages.h" #include "unity-shared/UBusWrapper.h" -#include "unity-shared/PlacesOverlayVScrollBar.h" +#include "unity-shared/OverlayScrollView.h" #include "unity-shared/GraphicsUtils.h" #include "config.h" @@ -44,21 +44,21 @@ namespace { -const int CARD_VIEW_GAP_VERT = 24; // pixels -const int CARD_VIEW_GAP_HORIZ = 25; // pixels +const RawPixel CARD_VIEW_GAP_VERT = 24_em; // pixels +const RawPixel CARD_VIEW_GAP_HORIZ = 25_em; // pixels +const RawPixel FOCUSED_OFFSET = 30_em; +const double DEFAULT_SCALE = 1.0; } // This is so we can access some protected members in scrollview. -class ScopeScrollView: public nux::ScrollView +class ScopeScrollView: public dash::ScrollView { public: - ScopeScrollView(nux::VScrollBar* scroll_bar, NUX_FILE_LINE_DECL) - : nux::ScrollView(NUX_FILE_LINE_PARAM) + ScopeScrollView(NUX_FILE_LINE_DECL) + : ScrollView(NUX_FILE_LINE_PARAM) , right_area_(nullptr) , up_area_(nullptr) { - SetVScrollBar(scroll_bar); - OnVisibleChanged.connect([this] (nux::Area* /*area*/, bool visible) { if (m_horizontal_scrollbar_enable) _hscrollbar->SetVisible(visible); @@ -150,6 +150,7 @@ : nux::View(NUX_TRACKER_LOCATION) , filters_expanded(false) , can_refine_search(false) +, scale(DEFAULT_SCALE) , scope_(scope) , no_results_active_(false) , last_good_filter_model_(-1) @@ -163,6 +164,7 @@ search_string.SetGetterFunction(sigc::mem_fun(this, &ScopeView::get_search_string)); filters_expanded.changed.connect(sigc::mem_fun(this, &ScopeView::OnScopeFilterExpanded)); view_type.changed.connect(sigc::mem_fun(this, &ScopeView::OnViewTypeChanged)); + scale.changed.connect(sigc::mem_fun(this, &ScopeView::UpdateScale)); auto conn = nux::GetWindowCompositor().key_nav_focus_change.connect(sigc::mem_fun(this, &ScopeView::OnCompositorKeyNavFocusChanged)); key_nav_focus_connection_ = conn_manager_.Add(conn); @@ -211,8 +213,8 @@ (expand_label && expand_label->HasKeyFocus())) { focused_pos.x += child->GetGeometry().x; - focused_pos.y += child->GetGeometry().y - 30; - focused_pos.height += 30; + focused_pos.y += child->GetGeometry().y - FOCUSED_OFFSET.CP(scale()); + focused_pos.height += FOCUSED_OFFSET.CP(scale()); scroll_view_->ScrollToPosition(focused_pos); break; } @@ -230,13 +232,10 @@ void ScopeView::SetupViews(nux::Area* show_filters) { - dash::Style& style = dash::Style::Instance(); - layout_ = new nux::HLayout(NUX_TRACKER_LOCATION); - layout_->SetSpaceBetweenChildren(style.GetSpaceBetweenScopeAndFilters()); - scroll_view_ = new ScopeScrollView(new PlacesOverlayVScrollBar(NUX_TRACKER_LOCATION), - NUX_TRACKER_LOCATION); + scroll_view_ = new ScopeScrollView(NUX_TRACKER_LOCATION); + scroll_view_->scale = scale(); scroll_view_->EnableVerticalScrollBar(true); scroll_view_->EnableHorizontalScrollBar(false); layout_->AddView(scroll_view_); @@ -248,9 +247,11 @@ no_results_ = new StaticCairoText("", NUX_TRACKER_LOCATION); no_results_->SetTextColor(nux::color::White); no_results_->SetVisible(false); + no_results_->SetScale(scale); scroll_layout_->AddView(no_results_, 1, nux::MINOR_POSITION_CENTER, nux::MINOR_SIZE_MATCHCONTENT); - fscroll_view_ = new ScopeScrollView(new PlacesOverlayVScrollBar(NUX_TRACKER_LOCATION), NUX_TRACKER_LOCATION); + fscroll_view_ = new ScopeScrollView(NUX_TRACKER_LOCATION); + fscroll_view_->scale = scale(); fscroll_view_->EnableVerticalScrollBar(true); fscroll_view_->EnableHorizontalScrollBar(false); fscroll_view_->SetVisible(false); @@ -261,18 +262,43 @@ fscroll_view_->SetLayout(fscroll_layout_); filter_bar_ = new FilterBar(); - int width = style.GetFilterBarWidth() + - style.GetFilterBarLeftPadding() + - style.GetFilterBarRightPadding(); - - fscroll_view_->SetMinimumWidth(width + style.GetFilterViewRightPadding()); - fscroll_view_->SetMaximumWidth(width + style.GetFilterViewRightPadding()); - filter_bar_->SetMinimumWidth(width); - filter_bar_->SetMaximumWidth(width); + AddChild(filter_bar_); fscroll_layout_->AddView(filter_bar_, 0); SetLayout(layout_); + + UpdateScopeViewSize(); +} + +void ScopeView::UpdateScopeViewSize() +{ + dash::Style const& style = dash::Style::Instance(); + + int right_padding = style.GetFilterViewRightPadding().CP(scale); + int filter_width = style.GetFilterBarWidth().CP(scale) + + style.GetFilterBarLeftPadding().CP(scale) + + style.GetFilterBarRightPadding().CP(scale); + + layout_->SetSpaceBetweenChildren(style.GetSpaceBetweenScopeAndFilters().CP(scale)); + + fscroll_view_->SetMinimumWidth(filter_width + right_padding); + fscroll_view_->SetMaximumWidth(filter_width + right_padding); + filter_bar_->SetMinimumWidth(filter_width); + filter_bar_->SetMaximumWidth(filter_width); +} + +void ScopeView::UpdateScale(double scale) +{ + UpdateScopeViewSize(); + + for (auto& group : category_views_) + group->scale = scale; + + scroll_view_->scale = scale; + fscroll_view_->scale = scale; + filter_bar_->scale = scale; + no_results_->SetScale(scale); } void ScopeView::SetupCategories(Categories::Ptr const& categories) @@ -435,6 +461,7 @@ group->SetIcon(icon_hint); group->SetExpanded(false); group->SetVisible(false); + group->scale = scale(); int view_index = category_order_.size(); auto find_view_index = std::find(category_order_.begin(), category_order_.end(), index); @@ -459,8 +486,8 @@ { results_view = new ResultViewGrid(NUX_TRACKER_LOCATION); results_view->SetModelRenderer(new ResultRendererHorizontalTile(NUX_TRACKER_LOCATION)); - static_cast (results_view)->horizontal_spacing = CARD_VIEW_GAP_HORIZ; - static_cast (results_view)->vertical_spacing = CARD_VIEW_GAP_VERT; + static_cast (results_view)->horizontal_spacing = CARD_VIEW_GAP_HORIZ.CP(scale()); + static_cast (results_view)->vertical_spacing = CARD_VIEW_GAP_VERT.CP(scale()); } else { diff -Nru unity-7.1.2+14.04.20140303/dash/ScopeView.h unity-7.2.4+14.04.20141217/dash/ScopeView.h --- unity-7.1.2+14.04.20140303/dash/ScopeView.h 2014-03-03 16:47:14.000000000 +0000 +++ unity-7.2.4+14.04.20141217/dash/ScopeView.h 2014-12-17 20:51:37.000000000 +0000 @@ -1,6 +1,6 @@ // -*- Mode: C++; indent-tabs-mode: nil; tab-width: 2 -*- /* - * Copyright (C) 2010, 2011 Canonical Ltd + * Copyright (C) 2010-2014 Canonical Ltd * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License version 3 as @@ -36,7 +36,6 @@ #include "PlacesGroup.h" #include "ResultViewGrid.h" #include "unity-shared/UBusWrapper.h" -#include "unity-shared/PlacesVScrollBar.h" namespace unity { @@ -69,6 +68,7 @@ nux::Property filters_expanded; nux::Property view_type; nux::Property can_refine_search; + nux::Property scale; sigc::signal result_activated; @@ -100,7 +100,7 @@ void OnResultRemoved(Result const& result); void OnSearchComplete(std::string const& search_string, glib::HintsMap const& hints, glib::Error const& err); - + void OnGroupExpanded(PlacesGroup* group); void CheckScrollBarState(); void OnColumnsChanged(); @@ -128,9 +128,12 @@ void BuildPreview(std::string const& uri, Preview::Ptr model); + void UpdateScopeViewSize(); + void UpdateScale(double scale); + virtual void Draw(nux::GraphicsEngine& gfx_context, bool force_draw); virtual void DrawContent(nux::GraphicsEngine& gfx_context, bool force_draw); - + virtual bool AcceptKeyNavFocus(); virtual std::string GetName() const; virtual void AddProperties(debug::IntrospectionData&); diff -Nru unity-7.1.2+14.04.20140303/dash/StandaloneDash.cpp unity-7.2.4+14.04.20141217/dash/StandaloneDash.cpp --- unity-7.1.2+14.04.20140303/dash/StandaloneDash.cpp 2014-03-03 16:47:14.000000000 +0000 +++ unity-7.2.4+14.04.20141217/dash/StandaloneDash.cpp 2014-12-17 20:51:37.000000000 +0000 @@ -36,47 +36,50 @@ #include "unity-shared/DashStyle.h" #include "unity-shared/PanelStyle.h" #include "unity-shared/ThumbnailGenerator.h" -#include "UnityCore/GSettingsScopes.h" +#include "unity-shared/UBusMessages.h" +#include "unity-shared/UBusServer.h" +#include +#include -#define WIDTH 1024 -#define HEIGHT 768 +const unity::RawPixel WIDTH(1024); +const unity::RawPixel HEIGHT(768); using namespace unity::dash; class TestRunner { public: - TestRunner (); - ~TestRunner (); + TestRunner(std::string const& scope, double scale) + : scope_(scope) + , scale_(scale) + {} static void InitWindowThread (nux::NThread* thread, void* InitData); void Init (); + std::string scope_; + double scale_; nux::Layout *layout; }; -TestRunner::TestRunner () -{ -} - -TestRunner::~TestRunner () -{ -} - void TestRunner::Init () { layout = new nux::HLayout(NUX_TRACKER_LOCATION); - DashView* view = new DashView(std::make_shared(), + DashView* view = new DashView(std::make_shared(), std::make_shared()); + view->scale = scale_; view->DisableBlur(); - view->SetMinMaxSize(WIDTH, HEIGHT); + view->SetMinMaxSize(WIDTH.CP(scale_), HEIGHT.CP(scale_)); layout->AddView (view, 1, nux::MINOR_POSITION_CENTER); - layout->SetMinMaxSize(WIDTH, HEIGHT); + layout->SetMinMaxSize(WIDTH.CP(scale_), HEIGHT.CP(scale_)); - view->AboutToShow(); + view->AboutToShow(0); nux::GetWindowThread()->SetLayout (layout); nux::GetWindowCompositor().SetKeyFocusArea(view->default_focus()); + + unity::UBusServer().SendMessage(UBUS_PLACE_ENTRY_ACTIVATE_REQUEST, + g_variant_new("(sus)", scope_.c_str(), GOTO_DASH_URI, "")); } void TestRunner::InitWindowThread(nux::NThread* thread, void* InitData) @@ -87,8 +90,6 @@ int main(int argc, char **argv) { - nux::WindowThread* wt = NULL; - gtk_init (&argc, &argv); unity::BGHash bghash; @@ -102,17 +103,30 @@ unity::dash::Style dash_style; unity::panel::Style panel_style; - TestRunner *test_runner = new TestRunner (); - wt = nux::CreateGUIThread(TEXT("Unity Dash"), - WIDTH, HEIGHT, - 0, - &TestRunner::InitWindowThread, - test_runner); + double scale = 1.0; + unity::glib::String scope; + unity::glib::Error err; + + GOptionEntry args_parsed[] = + { + { "scope", 's', 0, G_OPTION_ARG_STRING, &scope, "The default scope ", "S" }, + { "scaling-factor", 'f', 0, G_OPTION_ARG_DOUBLE, &scale, "The dash scaling factor", "F" }, + { NULL } + }; + + std::shared_ptr ctx(g_option_context_new("Standalone Dash"), g_option_context_free); + g_option_context_add_main_entries(ctx.get(), args_parsed, NULL); + if (!g_option_context_parse(ctx.get(), &argc, &argv, &err)) + std::cerr << "Got error when parsing arguments: " << err << std::endl; + + TestRunner *test_runner = new TestRunner(scope.Str(), scale); + std::unique_ptr wt(nux::CreateGUIThread(TEXT("Unity Dash"), + WIDTH.CP(scale), HEIGHT.CP(scale), + 0, &TestRunner::InitWindowThread, test_runner)); nux::NuxTimerTickSource tick_source; nux::animation::AnimationController animation_controller(tick_source); + wt->Run(nullptr); - wt->Run (NULL); - delete wt; - return 0; + return EXIT_SUCCESS; } diff -Nru unity-7.1.2+14.04.20140303/data/CMakeLists.txt unity-7.2.4+14.04.20141217/data/CMakeLists.txt --- unity-7.1.2+14.04.20140303/data/CMakeLists.txt 1970-01-01 00:00:00.000000000 +0000 +++ unity-7.2.4+14.04.20141217/data/CMakeLists.txt 2014-12-17 20:51:54.000000000 +0000 @@ -0,0 +1 @@ +add_subdirectory(pam) \ No newline at end of file diff -Nru unity-7.1.2+14.04.20140303/data/pam/CMakeLists.txt unity-7.2.4+14.04.20141217/data/pam/CMakeLists.txt --- unity-7.1.2+14.04.20140303/data/pam/CMakeLists.txt 1970-01-01 00:00:00.000000000 +0000 +++ unity-7.2.4+14.04.20141217/data/pam/CMakeLists.txt 2014-12-17 20:51:54.000000000 +0000 @@ -0,0 +1 @@ +install(FILES unity DESTINATION ${CMAKE_SYSCONFDIR}/pam.d) \ No newline at end of file diff -Nru unity-7.1.2+14.04.20140303/data/pam/unity unity-7.2.4+14.04.20141217/data/pam/unity --- unity-7.1.2+14.04.20140303/data/pam/unity 1970-01-01 00:00:00.000000000 +0000 +++ unity-7.2.4+14.04.20141217/data/pam/unity 2014-12-17 20:51:54.000000000 +0000 @@ -0,0 +1,2 @@ +@include common-auth +auth optional pam_gnome_keyring.so diff -Nru unity-7.1.2+14.04.20140303/debian/changelog unity-7.2.4+14.04.20141217/debian/changelog --- unity-7.1.2+14.04.20140303/debian/changelog 2014-12-17 20:57:27.000000000 +0000 +++ unity-7.2.4+14.04.20141217/debian/changelog 2014-12-17 20:57:27.000000000 +0000 @@ -1,3 +1,673 @@ +unity (7.2.4+14.04.20141217-0ubuntu1) trusty; urgency=medium + + [ Andrea Azzarone ] + * Share lockscreen password between screens (lp: #1308540) + * Allow a distinct pam config file for greeter and for lock-screen. + (lp: #1305440) + * Add an arrow activator in the lockscreen. (lp: #1332509) + * Make sure GetScreenGeometry returns the correct value (lp: #1374785). + * unmapped all windows prior to shutdown (lp: #1370017) (lp: #1375271) + + [ Brandon Schaefer ] + * fix tooltip for the "Show Desktop / Restore Windows" icon in the Alt-Tab + switcher (lp: #1237132) + * Use CONFIG instead of CACHE to store the first_run.stamp (lp: #1328677) + + [ Eleni Maria Stea ] + * LayoutSystem: make sure the exposed open windows are displayed in the + preserved order (lp: #1349281). + + [ handsome_feng ] + * added support for getting the distro name from /etc/os-release + (lp: #1329584) + + [ Iain Lane ] + * When grabbing keys, try prefixing "XF86" if the key isn't found. GNOME + gives us unprefixed keys sometimes (lp: #1302885). + + [ Marco Trevisan (Treviño) ] + * make the Launcher icon count badge width depend on the text value width + and scaling (lp: #1353070) (lp: #1354498) (lp: #796527) (lp: #1066971) + (lp: #1361713) + * DecoratedWindow: make edges independent from borders and properly update + them on actions change (lp: #1276177), (lp: #1299741), (lp: #1301776), + (lp: #1324104), (lp: #1364225), (lp: #1373695) + * Lockscreen: scale the UI elements based on current monitor scaling + (lp: #1292218) + * UnityScreen: when filtering out windows in spread, make sure we unscale + them (lp: #1316265). + * PanelMenuView: ensure that proper window tiles and buttons are shown at + the right place (lp: #1384910) (lp: #1384958) (lp: #1385285) + * SearchBar, ActionButtons, IconRenderer: include the font scaling when + scaling textual items (lp: #1332947) (lp: #1361751) (lp: #1362162) + (lp: #1362346). + * ApplicationLauncherIcon: make sure we close the dash if DnD is accepted + and the application window is about to be focused (lp: #1350331). + * SwitcherView: set progress on icon render args (lp: #1361679). + * LockScreenController: wait for the primary shield to get the grab + before setting the session locked (lp: #1368427) (lp: #1371764). + * added decorations to windows in non-focused workspaces (lp: #1383468) + + [ Stephen M. Webb ] + * updated the unity(1) manpage to match the actual command (lp: #1059275) + * bumped package version to match upstream + + [ Marco Trevisan (Treviño) ] + * Preparing for unity 7.2.4 + + -- Ubuntu daily release Wed, 17 Dec 2014 20:52:10 +0000 + +unity (7.2.3+14.04.20140826-0ubuntu1) trusty; urgency=medium + + [ Andrea Azzarone ] + * Remove cross fade effect during lock/unlocking. A simple fading + works just fine. (LP: #1312107) + * Manually emit nux::Area::geometry_changed beucase nux can fail to + emit it. (LP: #1292391) + + [ Pawel Szubert ] + * Reduce the scope of the kill command when restarting Compiz. + (LP: #1324114) + + [ Marco Trevisan (Treviño) ] + * LockScreenAcceleratorController: do ther configured action on power + special keys press. We finally can suspend, shutdown, hibernate or + start the screensaver when the screen is locked, using the Suspend, + Sleep, Hibernate and PowerOff hardware keys. Also the Shutdown + dialog doesn't allow now to lock the session if it is not allowed by + settings. (LP: #1306211) (LP: #1320051) (LP: #1320071) + * Previews: scale the dash preview contents to match current monitor + scaling. Improved also the scaling of search-bar, spinner, categories + and many other components. (LP: #1339629) + * FilterWidgets: add support for scaling (LP: #1340171) + * OverlayRendering: correctly scale the overlays borders and edges to + match settings. DashStyle has been modified to return smart pointers + of textures that are loaded depending on the scale level. The cache + will make sure that we don't duplicate the textures and that they + get removed when not needed anymore. Also thanks to this the + SearchBarSpinner textures (and the other spinners as well) uses the + SVGs scaled at the proper size (I desgined a new SVG for the + magnifier, as we only had a PNG). (LP: #1283415) (LP: #1340394) + * Hud: scale to match current DPI settings for monitor. (LP: #1340477) + + [ Eleni Maria Stea ] + * Previews: scale the dash preview contents to match current monitor + scaling. Improved also the scaling of search-bar, spinner, categories + and many other components. (LP: #1339629) + + [ Stephen M. Webb ] + * Reduce the scope of the kill command when restarting Compiz. + (LP: #1324114) + + [ Chris Townsend ] + * Bump version to 7.2.3. + + -- Ubuntu daily release Tue, 26 Aug 2014 13:49:00 +0000 + +unity (7.2.2+14.04.20140714-0ubuntu2) trusty; urgency=medium + + [ Andrea Azzarone ] + * Remove cross fade effect during lock/unlocking. A simple fading + works just fine. (LP: #1312107) + * Manually emit nux::Area::geometry_changed beucase nux can fail to + emit it. (LP: #1292391) + * TextInput: use GdkKeymap to check the caps-lock status (LP: #1347735) + + [ Pawel Szubert ] + * Reduce the scope of the kill command when restarting Compiz. + (LP: #1324114) + + [ Marco Trevisan (Treviño) ] + * LockScreenAcceleratorController: do ther configured action on power + special keys press. We finally can suspend, shutdown, hibernate or + start the screensaver when the screen is locked, using the Suspend, + Sleep, Hibernate and PowerOff hardware keys. Also the Shutdown + dialog doesn't allow now to lock the session if it is not allowed by + settings. (LP: #1306211) (LP: #1320051) (LP: #1320071) + * Previews: scale the dash preview contents to match current monitor + scaling. Improved also the scaling of search-bar, spinner, categories + and many other components. (LP: #1339629) + * FilterWidgets: add support for scaling (LP: #1340171) + * OverlayRendering: correctly scale the overlays borders and edges to + match settings. DashStyle has been modified to return smart pointers + of textures that are loaded depending on the scale level. The cache + will make sure that we don't duplicate the textures and that they + get removed when not needed anymore. Also thanks to this the + SearchBarSpinner textures (and the other spinners as well) uses the + SVGs scaled at the proper size (I desgined a new SVG for the + magnifier, as we only had a PNG). (LP: #1283415) (LP: #1340394) + * Hud: scale to match current DPI settings for monitor. (LP: #1340477) + * PlacesOverlayVScrollBar and VScrollBarOverlayWindow: add support for + scaling. Add a new ScrollView class to create ScrollViews with an + OverlayScrollbar and with scaling support. Using them in dash Scopes and + Previews. (LP: #1340996) + * LockScreenShield: Add GrabScreen function and retry to make sure we really + get the grab. It might happen that the grab is not possible because the + PluginAdapter::IsScreenGrabbed request has still not being fully processed, + and thus nux is not able to grab the pointer/keyboard. By doing this we + instead try to grab the screen, and if this is not happening, we wait a + little until we don't get the ungrab event. In this way, if we eventually + get the grab, all will work as expected. Otherwise, we cancel the lock + request (very unlikely to happen). (LP: #1349128) + * PlacesOverlayVScrollBar: redirect the mouse wheel scroll events coming from + the thumb to the scrollview. This will make the scrollview to handle then and + perform the same scrolling action it would do otherwise. (LP: #1340992) + * SwitcherView, PanelService: correctly handle horizontal and vertical scroll + events (LP: #1342208) (LP: #1342731) + + [ Eleni Maria Stea ] + * Previews: scale the dash preview contents to match current monitor + scaling. Improved also the scaling of search-bar, spinner, categories + and many other components. (LP: #1339629) + + [ Stephen M. Webb ] + * Reduce the scope of the kill command when restarting Compiz. + (LP: #1324114) + + -- Chris Townsend Wed, 23 Jul 2014 11:49:11 -0400 + +unity (7.2.2+14.04.20140714-0ubuntu1.1) trusty-security; urgency=medium + + * SECURITY UPDATE: more screen locking fixes (LP: #1349128) + - debian/patches/lp1349128.patch: flush after ungrabbing the keyboard + in unity-shared/PluginAdapter.cpp, add GrabScreen() function that + retries to lockscreen/LockScreenController.cpp, + lockscreen/LockScreenShield.cpp, lockscreen/LockScreenShield.h. + + -- Marc Deslauriers Wed, 30 Jul 2014 15:13:41 -0400 + +unity (7.2.2+14.04.20140714-0ubuntu1) trusty; urgency=medium + + [ Alfred Neumayer ] + * Restore the launcher position by reversing the animation and + unsetting the DND_PUSHED_OFF quirk. (LP: #1304882) + + [ Brandon Schaefer ] + * TextInput: move the warning icon inside the input field, render it + white (LP: #1307738) + * ShutdownView: Scale up the Buttons and Text plus Borders of the + UnityWindowView. (LP: #1308323) + * Lockscreen warning icon needs a tooltip to say what the warning is + about! (LP: #1308288) + + [ Marco Trevisan (Treviño) ] + * UnityScreen: always paint the lockscreen above, just add menu and + onboard as exceptions Some code cleanup, factorizing similar code. + (LP: #1313280) + * ApplicationLauncherIcon: Focus and, in case, Spread the windows on + DnD After 1 second that an user is over an icon, that icon should + focus the relative application and Spread its windows if it has more + than one opened. Correctly handle the DnD scale in launcher, and + apply glow to the icon under pointer. (LP: #607796) + * ShutdownView: Scale up the Buttons and Text plus Borders of the + UnityWindowView. (LP: #1308323) + * SwitcherView: use RawPixel's for the size values and convert them to + match current scaling (LP: #1317348) + * PluginAdapter: try to grab the screen to make sure that the screen + is not grabbed FocusIn event with NotifyGrab mode is not always + triggered by X when a window takes the grab, then we need to ensure + that there's no grab by trying to get one. We only care about + keyboard here, since pointer grabs don't affect us in general. + (LP: #741869) + * ShortcutView: use RawPixel's for the size values and convert them to + match current scaling Plus dinamically allocate horizontal space, + not to cut the text. (LP: #924840) + + [ Chris Townsend ] + * Fix issue where scaling the edge illumination up and down with the + size of the Launcher icons would cause the illumination border to be + offset and smaller than the icon. (LP: #1309739) + * Fix issue where the number of Launcher icon pips are not always + properly updated when a new window of an already running application + is opened. (LP: #1283775) + * Fix issue where the Panel shadow would get drawn over drop down + windows in full screen windows. (LP: #1316005) + * Bump upstream release to 7.2.2. + + [ Andrea Azzarone ] + * Clear the clipboard when locking the screen. (LP: #1308911) + * Disable switcher gestures if screen is locked. Fixed a regression. + (LP: #1321043) + * Pass the correct options to showLauncherKeyTerminate in + UnityScreen::OnLockScreen (LP: #1320438) + * Fix skype indicator blinking. (LP: #1310200) + * Add a warning in the session dialog if other sessions are still + open. (LP: #1281058) + + [ Ubuntu daily release ] + * New rebuild forced + + -- Ubuntu daily release Mon, 14 Jul 2014 14:31:00 +0000 + +unity (7.2.1+14.04.20140513-0ubuntu2) trusty; urgency=medium + + [ Brandon Schaefer ] + * Set the max width, so our static text wraps. So we don't end up + rendering text out of the view area. (LP: #1312749) + + [ Jnkyu Yi ] + * fixed range of blacklisted Unicode characters (lp: #1251193) + + [ Marco Trevisan (Treviño) ] + * UnityScreen: toggle activation of all the unity compiz actions when + locking the screen Also, make sure that the lockscreen views are + treated as "always-on-front" windows by nux (and this applies to + both visibility and events). + * PanelService: emit an invalid EntryActivated signal if the menu + hasn't actually been shown In addition, if the menu is not visible + after the first popup call, try to show a menu without keyboard + focus. This will make possible to see menus also when there's a key- + grab (although they will be without keyboard support). Finally, + reset the menu state, if that failed. + * PluginAdapter: make sure we don't try to call an invalid + initiate/terminate callback function (LP: #1221673) + * DebugDBusInterface: match properties if they are in the AP array + form [, ] (LP: #1307748) + + [ Stephen M. Webb ] + * lockscreen/LockScreenAccelerators.h: added required header for + std:vector definition (fixes FTBFS in Ubuntu) + * disabled precompiled headers on arm64 Ubuntu package builds + (lp: #1317276) + * bump upstream release to 7.2.1 + + [ William Hua ] + * added proper support for modifier-only shortcuts on the lock screen + (lp: #1291461) + + -- Ubuntu daily release Tue, 13 May 2014 20:46:01 +0000 + +unity (7.2.0+14.04.20140423-0ubuntu1.2) trusty-security; urgency=medium + + * SECURITY UPDATE: more lock screen bypass issues, and regression with + shutdown dialog (LP: #1314247) + - debian/patches/lp1314247.patch: improve popup menu handling in + lockscreen/LockScreenShield.cpp, lockscreen/LockScreenPanel.cpp, + services/panel-service.c, plugins/unityshell/src/unityshell.cpp, + lockscreen/LockScreenController.*, shutdown/SessionController.cpp, + tests/test_session_controller.cpp. + + -- Marc Deslauriers Wed, 30 Apr 2014 11:11:18 -0400 + +unity (7.2.0+14.04.20140423-0ubuntu1.1) trusty-security; urgency=medium + + * SECURITY UPDATE: lock screen bypass (LP: #1313885) + - debian/patches/lp1313885.patch: improve lockscreen logic in + lockscreen/LockScreenController.cpp, lockscreen/LockScreenShield.*, + plugins/unityshell/src/unityshell.*. + + -- Marc Deslauriers Mon, 28 Apr 2014 22:29:13 -0400 + +unity (7.2.0+14.04.20140423-0ubuntu1) trusty; urgency=low + + [ Chris Townsend ] + * When setting the STARTING quirk for Application Launcher icons, only + do it for the monitor specified in the passed in args. (LP: + #1291362) + + [ Andrea Azzarone ] + * Close dash/hud/etc. on signal locked too. (LP: #1308850) + + -- Ubuntu daily release Wed, 23 Apr 2014 14:40:24 +0000 + +unity (7.2.0+14.04.20140416-0ubuntu1) trusty; urgency=low + + [ Andrea Azzarone ] + * Do not allow to activate twice the same entry! (LP: #1308572) + + [ Marco Trevisan (Treviño) ] + * UnityScreen: save a locked.stamp file when locking/unlocking, to + relock on startup This makes unity to relocks if it was locked + before crashing... (LP: #1308572) + + -- Ubuntu daily release Wed, 16 Apr 2014 22:41:19 +0000 + +unity (7.2.0+14.04.20140414.1-0ubuntu1) trusty; urgency=low + + [ Alfred Neumayer ] + * Security issue: Gestures on the lock screen allow to peek inside + running applications. As with keyboard input, gestures should be + blocked while the screen is locked. (LP: #1303041) + + [ Sami Jaktholm ] + * Scale: Correctly detect the activation of a scale and set + scale_just_activated_ to true properly. (LP: #1288789) + + [ Marco Trevisan (Treviño) ] + * CompizUtils: only shadow-decorate alpha windows that have full + decorations as well Since alpha windows might have custom shapes, + it's safer not to shadow-decorate them unless they don't provide, + for sure, a full decoration. This fixes, between the others, the + unity force-quit dialog. (LP: #1281825) + + -- Ubuntu daily release Mon, 14 Apr 2014 14:22:11 +0000 + +unity (7.2.0+14.04.20140411-0ubuntu1) trusty; urgency=low + + [ Sami Jaktholm ] + * Lockscreen: Give proper grabs to the shield before releasing + blank_window_. (LP: #1306417) + + -- Ubuntu daily release Fri, 11 Apr 2014 09:00:46 +0000 + +unity (7.2.0+14.04.20140410.1-0ubuntu1) trusty; urgency=low + + [ Sami Jaktholm ] + * Shortcuts: Listen and react to view close requests. (LP: #1297842) + + [ Brandon Schaefer ] + * When we detect caps lock, or caps lock is pressed, render a warning + icon to show its on. (LP: #1291737) + + [ Marco Trevisan (Treviño) ] + * DecorationsGrabEdge, PanelMenuView: perform proper WM action on + clicks, based on user settings (LP: #1283849) + + [ Alfred Neumayer ] + * Alt-Tab has always respected the alt-tab-bias-viewport setting, but + the 3-finger gesture to switch between windows has not, even though + it does the same thing. They should behave the same way depending on + the CCSM setting. (LP: #1303060) + * Launcher: Show and hide the launcher window OnDragUpdate() to fix + the gesture animations (LP: #1303141) + * If the dash has not been opened before, a 4 finger tap will result + in a dash with no selected scope. Instead, set up the window and + view of the dash by sending DASH_ABOUT_TO_SHOW (same happens when + hovering the mouse pointer over the BFB icon) and open the home + scope. (LP: #1303468) + + [ CI bot ] + * LockScreen: add ability to show without fading in on some system + calls Also, if locking is not enabled, calling Lock causes the + screensaver to be initiated. Many cleanups and misc fixes. (LP: + #1292575) + + [ William Hua ] + * Enable sound buttons and input source switching under lock screen. + + [ Eleni Maria Stea ] + * It fixes the quicklist menu appearance. (LP: #1298859) + + [ Ubuntu daily release ] + * New rebuild forced + + -- Ubuntu daily release Thu, 10 Apr 2014 17:43:46 +0000 + +unity (7.2.0+14.04.20140410-0ubuntu1) trusty; urgency=low + + [ CI bot ] + * GnomeSessionManager: impelement gnome session dbus interface and a + fader to blank the screen (LP: #1291088) + * ScreenSaverDBusManager: start/stop gnome-screensaver if we don't/do + handle the locking This allows to just use the fallback gnome- + screensaver lockscreen if we need to use it. (LP: #1303712) + * Session: Don't lock the screen if screen locking is disabled by + org.gnome.desktop.lockdown disable-lock-screen. (LP: #1292154) + + [ Andrea Azzarone ] + * LockScreen: add ability to show without fading in on some system + calls Also, if locking is not enabled, calling Lock causes the + screensaver to be initiated. Many cleanups and misc fixes. (LP: + #1292575) + + [ Marco Trevisan (Treviño) ] + * LockScreen: add ability to show without fading in on some system + calls Also, if locking is not enabled, calling Lock causes the + screensaver to be initiated. Many cleanups and misc fixes. (LP: + #1292575) + + -- Ubuntu daily release Thu, 10 Apr 2014 12:45:15 +0000 + +unity (7.2.0+14.04.20140404-0ubuntu1) trusty; urgency=low + + [ Chris Townsend ] + * Fix issue where windows that are in Show Desktop mode are selected + for spread have a blank preview. This fix will Fade Out the window + for Spread and Fade In the window again when Spread exits if that + window is not chosen. (LP: #1104236) + + [ Marco Trevisan (Treviño) ] + * ForceQuitDialog: add a new "sheet style" dialog that is shown when a + window hangs Listen to compiz toolkit events and prompt a dialog + that allows to force-quit an hanging application. (LP: #698031) + + -- Ubuntu daily release Fri, 04 Apr 2014 21:35:41 +0000 + +unity (7.2.0+14.04.20140403-0ubuntu1) trusty; urgency=low + + [ Stephen M. Webb ] + * remove libsyncindicator from services/panel-service.c + + [ Dimitri John Ledkov ] + * Drop U1 default shortcuts & indicator-sync recommendation. (LP: + #1300916) (LP: #1300916) + + [ Marco Trevisan (Treviño) ] + * Launcher: hide the launcher window when in auto-hide mode if it's + not presented (LP: #1301394) + * ApplicationLauncherIcon: recompute pips when the screen geometry + changes (LP: #1024101) + * UnityScreen: reset decoration::DataPool on destruction, otherwise we + won't have a valid screen ptr (LP: #1291243) + * DecorationsGrabEdge: Only perform tookit actions on right-click (LP: + #1301459) + + -- Ubuntu daily release Thu, 03 Apr 2014 11:10:36 +0000 + +unity (7.2.0+14.04.20140402-0ubuntu1) trusty; urgency=medium + + [ Stephen M. Webb ] + * Release 7.2.0. + + [ Marco Trevisan (Treviño) ] + * CompizUtils: only shadow-decorate alpha windows that have full + decorations as well Since alpha windows might have custom shapes, + it's safer not to shadow-decorate them unless they don't provide, + for sure, a full decoration. (LP: #1281825) + * Panel, Decorations: draw the background under the text glyphs before + the text itself (LP: #723167) + * PanelMenuView: use panel style context for painting the panel title + (LP: #1296866) + * SpreadFilter: use launcher width, scale on HiDPI, match also + application names Launcher Width is now considered in setting the + offset of the scale filter (fixes padding when launcher is in + autohide mode). The search bar is correctly scaled when in HiDPI + mode. We use ApplicationManager and thus BAMF to match windows by + their name or app name. (LP: #1281297) + + -- Ubuntu daily release Wed, 02 Apr 2014 11:04:11 +0000 + +unity (7.1.2+14.04.20140328.1-0ubuntu1) trusty; urgency=low + + [ Robert Ancell ] + * Call pam_acct_mgmt and pam_chauthtok when unlocking screen (LP: + #1296443) + + [ Stephen M. Webb ] + * restart unity-panel-service for only the current session when + restarting unity from the command line (LP: #777594) + + [ Brandon Schaefer ] + * When we see an escape in lockscreen prompt, clear the password. (LP: + #1292647) + + [ Andrea Azzarone ] + * Fixes the double lockscreen when switching users. (LP: #1291088) + + [ Marco Trevisan (Treviño) ] + * Tooltip, QuicklistView: use the decoration shadow radius for + computing padding (LP: #1291407) + * 02_unity_setup_text_scale_factor: actually make it working, copy the + gnome value to unity (LP: #1298492) + * IconRenderer: scale textures when loading them based on the current + launcher scaling Add SVG textures for tiles and markers (thanks to + Matthieu James) to replace .pngs, also make them themable. (LP: + #1297588) + + -- Ubuntu daily release Fri, 28 Mar 2014 10:16:02 +0000 + +unity (7.1.2+14.04.20140321-0ubuntu1) trusty; urgency=low + + [ Andrea Azzarone ] + * Release the lockscreen_timeout (that we use to get the grab + properly) on unlock. + + [ Marco Trevisan (Treviño) ] + * Dash: Use nux properties for scale and cairo device scaling + * UnitySettings: apply the unity scaling factor to global system + settings We basically use the integer part of our scaling factor as + the Gdk scaling factor, while we apply the point scaling to the Gdk + text-scaling-factor. In this way the readable items will match our + scaling. (LP: #1295436) + + -- Ubuntu daily release Fri, 21 Mar 2014 23:22:23 +0000 + +unity (7.1.2+14.04.20140320.1-0ubuntu1) trusty; urgency=low + + [ Chris Townsend ] + * Change the signal for detecting resuming from Suspend from UPower + (which is unreliable) to logind. (LP: #1210077) + + [ Brandon Schaefer ] + * Use key_code instead of key_sym for the Super+ shortcut. (LP: + #1294885) + + [ Andrea Azzarone ] + * Wait for the grab before showing the lockscreen. (LP: #1291497) + * Do not lock a guest session. (LP: #1295194) + + -- Ubuntu daily release Thu, 20 Mar 2014 23:51:55 +0000 + +unity (7.1.2+14.04.20140318-0ubuntu1) trusty; urgency=low + + [ Brandon Schaefer ] + * Update the DPI when we setup the view. (LP: #1292268) + * Do not avoid rendering the lockscreen when we have a fullscreen app. + This also removes the old fullscreen + lockscreen fix where we force + painted our selfs on top. (LP: #1291571) + + [ Chris Townsend ] + * Add ability to minimize a single window application when clicking on + the Launcher icon of the application. (LP: #733349) + + [ Andrea Azzarone ] + * Whitelist "onboard" for rendering during lockscreen. (LP: #1291402) + * Do not consider minimized windows for cross fade effect. (LP: + #1291402) + + -- Ubuntu daily release Tue, 18 Mar 2014 23:53:51 +0000 + +unity (7.1.2+14.04.20140313-0ubuntu1) trusty; urgency=low + + [ Brandon Schaefer ] + * When the lockscreen is locked, force paint it on top. This isn't the + perfect fix, but it a lot safer of a fix. (LP: #1291571) + * When we are about to LockScreen(). Hide the Dash/Hud if an overlay + is open! (LP: #1291383) + * Clear the tooltips when going into the lockscreen. (LP: #1291503) + * Cleartool tips when entering alt+tab mode. (LP: #1285889) + * If the switcher is open when going into lockscreen, hide it! (LP: + #1292225) + + -- Ubuntu daily release Thu, 13 Mar 2014 23:17:29 +0000 + +unity (7.1.2+14.04.20140312-0ubuntu1) trusty; urgency=low + + [ Brandon Schaefer ] + * When the monitors change, go through and update all the launcher + widths for all launchers. (LP: #1291034) + + [ Marco Trevisan (Treviño) ] + * UnityScreen: show the shortcut hint on first run (LP: #1283619) + * UnityScreen: use switcher's LayoutSystem to compute the scaled + windows geometries Thanks to this, both the Alt+Tab and Spread will + use the same codepath to define the positioning of the scaled + windows. (LP: #925454) + * Decorations and Menus: a bunch of various fixes... (LP: #1283156) + + [ CI bot ] + * fixes the segfault occuring when the scale factor is < 1.0 (LP: + #1288166) + + [ William Hua ] + * Unity shell plugin conflicts with gnomecompat. (LP: #1284532) + + [ Chris Townsend ] + * Remove the test_icon_shows_on_quick_application_reopen Autopilot + test and make it into a unit test since Autopilot has difficult time + dealing with this test as the test fails occasionally. (LP: + #1073990) + * Add option to allow users to restore the scroll-over-inactive- + Launcher-icon-to-focus-window behavior. (LP: #1288957) + * Fix the inconsistent z ordering of windows when using the mouse to + scroll the Launcher icon of the active application. (LP: #1286784) + + [ Luke Yelavich ] + * Present a textual description of the state of applications to screen + reader users when navigating the launcher. (LP: #1266298) + + -- Ubuntu daily release Wed, 12 Mar 2014 23:46:36 +0000 + +unity (7.1.2+14.04.20140311-0ubuntu1) trusty; urgency=low + + [ CI bot ] + * Lockscreen: Multimonitor support, use greeter settings and don't + paint popup windows In detail:  - Use proper fonts for text input  - + Make text cursor to blink as expected (needs + lp:~3v1n0/nux/textentry-toggle-cursor-visibility)  - Use bullet as + password char  - Support multi-monitor correctly, switching view on + mouse movement (as the greeter does)  - Fixed lockscreen not showing + on newly attached monitors  - Never paint windows that might popup + under the lockscreen (such as tooltips or notifications)  - Use + unity greeter gsettings values for painting the Background (support + color, or disable user bg)  - Don't lock guest sessions + + [ Stephen M. Webb ] + * Bump Nux build-dep to 4.0.6 for ABI change. + + [ Andrea Azzarone ] + * Implement the lockscreen in Unity that looks like unity-greeter. + Also allow to fallback to lightdm + greeter (tty switching) in case + you need more pam power. (LP: #878836) + + [ Marco Trevisan (Treviño) ] + * LockScreenPanel: added a light version of PanelView for Lockscreen + only, using PanelIndicatorsView - Indicators scrubbing using mouse + works again - Indicators key navigation is supported (Alt+F10 + included) - Indicators will be correctly visible in light themes as + well - Show hostname (optionally) on the top left side of the panel + - LockScreenSettings now bind settings from unity-greeter dconf path + + -- Ubuntu daily release Tue, 11 Mar 2014 18:37:36 +0000 + +unity (7.1.2+14.04.20140305-0ubuntu1) trusty; urgency=low + + [ Chris Townsend ] + * Fix more Panel Autopilot test failures. (LP: #1287745) + + [ William Hua ] + * Improve debug logging for gnome key grabber. + + [ Brandon Schaefer ] + * Allow the launcher_width to be stored per monitor and retrieved per + monitor. Allowing for correct Dash/Hud offsets. (LP: #1284879) + * When we update the OverlayWindowButtons geometry, make sure we ask + the WindowButtons to update their geo as well. (This means poking it + as if the DPI has changed). This way the overlay window buttons will + be the correct sides per monitor. (LP: #1285366) + + [ Marco Trevisan (Treviño) ] + * CompizShortcutModeller: use proper keys for Spread and be dependent + on workspace setting (LP: #1287825) + + [ Luke Yelavich ] + * Implement accessibility for the optino buttons in the shutdown + dialog. Also improve the parent-child relationship between objects + such that the shutdown message can be read with Orca flat review. + (LP: #1272168) + + -- Ubuntu daily release Wed, 05 Mar 2014 14:18:44 +0000 + unity (7.1.2+14.04.20140303-0ubuntu1) trusty; urgency=low [ Marco Trevisan (Treviño) ] @@ -1579,7 +2249,7 @@ * Automatic snapshot from revision 3317 (ubuntu-unity/next) - -- Ubuntu daily release Wed, 08 May 2013 04:57:49 +0000 + -- Ubuntu daily release Fri, 31 May 2013 04:06:11 +0000 unity (7.0.0daily13.05.01.1ubuntu.unity.next-0ubuntu1) raring; urgency=low diff -Nru unity-7.1.2+14.04.20140303/debian/control unity-7.2.4+14.04.20141217/debian/control --- unity-7.1.2+14.04.20140303/debian/control 2014-12-17 20:57:27.000000000 +0000 +++ unity-7.2.4+14.04.20141217/debian/control 2014-12-17 20:57:27.000000000 +0000 @@ -9,24 +9,21 @@ dh-migrations, dh-translations (>= 94), google-mock (>= 1.6.0+svn437), - google-mock, gsettings-desktop-schemas-dev, gsettings-ubuntu-schemas (>= 0.0.1+14.04.20140219), intltool (>= 0.35.0), libatk1.0-dev, libbamf3-dev (>= 0.5.0+13.10.20130731), libboost-dev, - libboost-serialization-dev, libcairo2-dev, libdbus-1-dev, - libcompizconfig0-dev (>= 1:0.9.11), libdbusmenu-glib-dev (>= 0.3.91), libdee-dev (>= 1.2.6), libgee-dev (>= 0.5.0), libgeis-dev (>= 2.0.10), libgl1-mesa-dri, libglib2.0-dev (>= 2.39.1), - libgrail-dev (>= 1.0.20), + libgnome-desktop-3-dev, libgtest-dev, libgtk-3-dev (>= 3.1), libido3-0.1-dev (>= 13.10.0), @@ -37,17 +34,17 @@ libnih-dbus-dev, libnih-dev, libnotify-dev, - libnux-4.0-dev (>= 4.0.5), + libnux-4.0-dev (>= 4.0.6), + libpam0g-dev, libpango1.0-dev, libsigc++-2.0-dev, libstartup-notification0-dev, libunique-dev, libunity-dev (>= 7.1.0), libunity-misc-dev (>= 4.0.4), - libunity-scopes-json-def-desktop, libupstart-dev, libxcb-icccm4-dev, - libxfixes-dev (>= 1:5.0.1-1), + libxfixes-dev (>= 1:5.0.1), libxi-dev (>= 2:1.7.1.901), libxpathselect-dev (>=1.4), libzeitgeist-2.0-dev, @@ -57,7 +54,7 @@ quilt, xserver-xorg-video-dummy, xsltproc, -Standards-Version: 3.9.3 +Standards-Version: 3.9.5 Homepage: https://launchpad.net/unity # If you aren't a member of ~unity-team but need to upload packaging changes, # just go ahead. ~unity-team will notice and sync up the code again. @@ -77,6 +74,7 @@ nux-tools, dconf-cli, unity-asset-pool (>= 0.8.18), + unity-greeter, bamfdaemon, libxfixes3 (>= 1:5.0.1-1), libxi6 (>= 2:1.7.1.901), @@ -94,7 +92,6 @@ indicator-printers, indicator-power, indicator-session, - indicator-sync, telepathy-indicator, hud, Breaks: unity-lens-applications (<< 5.12.0-0ubuntu2), @@ -122,7 +119,7 @@ to produce what we hope will be the lightest, most elegant and most delightful way to use your PC. . - This package contains the dbus service used for unity. + This package contains the D-Bus service used for unity. Package: libunity-core-6.0-9 Section: libs @@ -133,7 +130,7 @@ Conflicts: unity-common, libunity-core-6.0-6, libunity-core-6.0-7, libunity-core-6.0-8 Replaces: unity-common, libunity-core-6.0-6, libunity-core-6.0-7, libunity-core-6.0-8 Provides: unity-common, unity-common-7.0 -Description: Core library for the Unity interface. +Description: core library for the Unity interface Unity is a desktop experience that sings. Designed by Canonical and the Ayatana community, Unity is all about the combination of familiarity and the future. We bring together visual design, analysis of user experience testing, modern @@ -183,10 +180,11 @@ libxpathselect1.4 (>= 1.4), mesa-utils, Description: Autopiloted tests for Unity - We test Unity automatically through autopilot, a framework which enables us - to trigger keyboard and mouse events on the fly as well as introspecting - objects. This package contains the specific unity introspection bindings - to be able to write tests in python as well as the full test suite for Unity. + Unity is tested automatically through autopilot, a framework which enables + keyboard and mouse events to be triggered on the fly as well as object + introspection. This package contains the specific unity introspection + bindings to be able to write tests in python as well as the full test suite + for Unity. Package: unity-2d Depends: unity, ${misc:Depends} diff -Nru unity-7.1.2+14.04.20140303/debian/rules unity-7.2.4+14.04.20141217/debian/rules --- unity-7.1.2+14.04.20140303/debian/rules 2014-12-17 20:57:27.000000000 +0000 +++ unity-7.2.4+14.04.20141217/debian/rules 2014-12-17 20:57:27.000000000 +0000 @@ -23,13 +23,17 @@ SCOPES_RECOMMENDS := $(shell perl debian/scopes-recommends-generator /usr/share/unity/client-scopes.json) - -override_dh_auto_configure: +cmake_base_options := -DUSE_GSETTINGS=TRUE -DCOMPIZ_BUILD_WITH_RPATH=FALSE -DCOMPIZ_PACKAGING_ENABLED=TRUE -DCMAKE_SYSCONFDIR=/etc -DCOMPIZ_PLUGIN_INSTALL_TYPE=package ifeq ($(DEB_HOST_ARCH),$(findstring $(DEB_HOST_ARCH), $(gles2_architectures))) - dh_auto_configure -- -DUSE_GSETTINGS=TRUE -DCOMPIZ_BUILD_WITH_RPATH=FALSE -DCOMPIZ_PACKAGING_ENABLED=TRUE -DCOMPIZ_PLUGIN_INSTALL_TYPE=package -DBUILD_GLES=TRUE -DDISABLE_MAINTAINER_CFLAGS=ON -else - dh_auto_configure -- -DUSE_GSETTINGS=TRUE -DCOMPIZ_BUILD_WITH_RPATH=FALSE -DCOMPIZ_PACKAGING_ENABLED=TRUE -DCOMPIZ_PLUGIN_INSTALL_TYPE=package + cmake_gl_options := -DBUILD_GLES=TRUE -DDISABLE_MAINTAINER_CFLAGS=ON endif +ifeq ($(DEB_HOST_ARCH),$(findstring $(DEB_HOST_ARCH), arm64)) + cmake_pch_options := -Duse_pch=OFF +endif + + +override_dh_auto_configure: + dh_auto_configure -- $(cmake_base_options) $(cmake_gl_options) $(cmake_pch_options) override_dh_install: # install autopilot tests @@ -56,7 +60,9 @@ dh_shlibdeps -l$(LIBUNITY_PRIVATE) -O--parallel override_dh_auto_test: +ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS))) make -C obj-$(DEB_HOST_GNU_TYPE) check-headless +endif %: dh $@ --with translations,quilt,python2,migrations --parallel diff -Nru unity-7.1.2+14.04.20140303/debian/unity.install unity-7.2.4+14.04.20141217/debian/unity.install --- unity-7.1.2+14.04.20140303/debian/unity.install 2014-12-17 20:57:27.000000000 +0000 +++ unity-7.2.4+14.04.20141217/debian/unity.install 2014-12-17 20:57:27.000000000 +0000 @@ -1,3 +1,4 @@ +etc/pam.d usr/bin usr/lib/compiz usr/share/man/*/unity.1 diff -Nru unity-7.1.2+14.04.20140303/debian/unity.migrations unity-7.2.4+14.04.20141217/debian/unity.migrations --- unity-7.1.2+14.04.20140303/debian/unity.migrations 2014-12-17 20:57:27.000000000 +0000 +++ unity-7.2.4+14.04.20141217/debian/unity.migrations 2014-12-17 20:57:27.000000000 +0000 @@ -1 +1,3 @@ tools/migration-scripts/01_unity_change_dconf_path +tools/migration-scripts/02_unity_setup_text_scale_factor +tools/migration-scripts/03_unity_first_run_stamp_move diff -Nru unity-7.1.2+14.04.20140303/decorations/CMakeLists.txt unity-7.2.4+14.04.20141217/decorations/CMakeLists.txt --- unity-7.1.2+14.04.20140303/decorations/CMakeLists.txt 2014-03-03 16:47:14.000000000 +0000 +++ unity-7.2.4+14.04.20141217/decorations/CMakeLists.txt 2014-12-17 20:51:37.000000000 +0000 @@ -33,6 +33,7 @@ DecorationsMenuLayout.cpp DecorationsMenuEntry.cpp DecorationsMenuDropdown.cpp + DecorationsForceQuitDialog.cpp DecorationsDataPool.cpp ) diff -Nru unity-7.1.2+14.04.20140303/decorations/DecoratedWindow.cpp unity-7.2.4+14.04.20141217/decorations/DecoratedWindow.cpp --- unity-7.1.2+14.04.20140303/decorations/DecoratedWindow.cpp 2014-03-03 16:47:36.000000000 +0000 +++ unity-7.2.4+14.04.20141217/decorations/DecoratedWindow.cpp 2014-12-17 20:51:54.000000000 +0000 @@ -1,6 +1,6 @@ // -*- Mode: C++; indent-tabs-mode: nil; tab-width: 2 -*- /* - * Copyright (C) 2013 Canonical Ltd + * Copyright (C) 2013-2014 Canonical Ltd * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License version 3 as @@ -19,6 +19,7 @@ #include #include "DecorationsPriv.h" +#include "DecorationsForceQuitDialog.h" #include "DecorationsEdgeBorders.h" #include "DecorationsGrabEdge.h" #include "DecorationsWindowButton.h" @@ -45,9 +46,13 @@ , cwin_(CompositeWindow::get(win_)) , glwin_(GLWindow::get(win_)) , frame_(0) - , dirty_geo_(true) , monitor_(0) - , cv_(unity::Settings::Instance().em()) + , dirty_geo_(true) + , dirty_frame_(false) + , deco_elements_(cu::DecorationElement::NONE) + , last_mwm_decor_(win_->mwmDecor()) + , last_actions_(win_->actions()) + , cv_(Settings::Instance().em()) { active.changed.connect([this] (bool active) { bg_textures_.clear(); @@ -106,14 +111,32 @@ void Window::Impl::Update() { - ShouldBeDecorated() ? Decorate() : Undecorate(); + UpdateElements(); + + if (deco_elements_ & (cu::DecorationElement::EDGE | cu::DecorationElement::BORDER)) + Decorate(); + else + Undecorate(); + + last_mwm_decor_ = win_->mwmDecor(); + last_actions_ = win_->actions(); } void Window::Impl::Decorate() { SetupExtents(); UpdateFrame(); - SetupWindowControls(); + SetupWindowEdges(); + + if (deco_elements_ & cu::DecorationElement::BORDER) + { + SetupWindowControls(); + } + else + { + CleanupWindowControls(); + bg_textures_.clear(); + } } void Window::Impl::Undecorate() @@ -121,6 +144,7 @@ UnsetExtents(); UnsetFrame(); CleanupWindowControls(); + CleanupWindowEdges(); bg_textures_.clear(); } @@ -129,7 +153,7 @@ if (win_->hasUnmapReference()) return; - CompWindowExtents empty(0, 0, 0, 0); + CompWindowExtents empty; if (win_->border() != empty || win_->input() != empty) win_->setWindowFrameExtents(&empty, &empty); @@ -140,22 +164,39 @@ if (win_->hasUnmapReference()) return; - auto const& sb = Style::Get()->Border(); - CompWindowExtents border(cv_->CP(sb.left), - cv_->CP(sb.right), - cv_->CP(sb.top), - cv_->CP(sb.bottom)); - - auto const& ib = Style::Get()->InputBorder(); - CompWindowExtents input(cv_->CP(sb.left + ib.left), - cv_->CP(sb.right + ib.right), - cv_->CP(sb.top + ib.top), - cv_->CP(sb.bottom + ib.bottom)); + CompWindowExtents border; + + if (deco_elements_ & cu::DecorationElement::BORDER) + { + auto const& sb = Style::Get()->Border(); + border.left = cv_->CP(sb.left); + border.right = cv_->CP(sb.right); + border.top = cv_->CP(sb.top); + border.bottom = cv_->CP(sb.bottom); + } + + CompWindowExtents input(border); + + if (deco_elements_ & cu::DecorationElement::EDGE) + { + auto const& ib = Style::Get()->InputBorder(); + input.left += cv_->CP(ib.left); + input.right += cv_->CP(ib.right); + input.top += cv_->CP(ib.top); + input.bottom += cv_->CP(ib.bottom); + } if (win_->border() != border || win_->input() != input) win_->setWindowFrameExtents(&border, &input); } +void Window::Impl::SendFrameExtents() +{ + UpdateElements(cu::WindowFilter::UNMAPPED); + SetupExtents(); + win_->setWindowFrameExtents(&win_->border(), &win_->input()); +} + void Window::Impl::UnsetFrame() { if (!frame_) @@ -184,6 +225,15 @@ UpdateFrameGeo(frame_geo); } +void Window::Impl::UpdateFrameActions() +{ + if (!dirty_frame_ && (win_->mwmDecor() != last_mwm_decor_ || win_->actions() != last_actions_)) + { + dirty_frame_ = true; + Damage(); + } +} + void Window::Impl::CreateFrame(nux::Geometry const& frame_geo) { /* Since we're reparenting windows here, we need to grab the server @@ -281,6 +331,42 @@ win_->updateFrameRegion(); } +void Window::Impl::SetupWindowEdges() +{ + if (input_mixer_) + return; + + dpi_changed_ = Settings::Instance().dpi_changed.connect([this] { + Update(); + edge_borders_->scale = cv_->DPIScale(); + if (top_layout_) top_layout_->scale = cv_->DPIScale(); + }); + + input_mixer_ = std::make_shared(); + edge_borders_ = std::make_shared(win_); + edge_borders_->scale = cv_->DPIScale(); + input_mixer_->PushToFront(edge_borders_); + + UpdateWindowEdgesGeo(); +} + +void Window::Impl::UpdateWindowEdgesGeo() +{ + if (!edge_borders_) + return; + + auto const& input = win_->inputRect(); + edge_borders_->SetCoords(input.x(), input.y()); + edge_borders_->SetSize(input.width(), input.height()); +} + +void Window::Impl::CleanupWindowEdges() +{ + input_mixer_.reset(); + edge_borders_.reset(); + dpi_changed_->disconnect(); +} + void Window::Impl::SetupWindowControls() { if (top_layout_) @@ -292,26 +378,7 @@ Decorate(); }); - dpi_changed_ = Settings::Instance().dpi_changed.connect([this] { - Update(); - top_layout_->scale = cv_->DPIScale(); - }); - - input_mixer_ = std::make_shared(); - - if (win_->actions() & CompWindowActionResizeMask) - { - auto edges = std::make_shared(win_); - grab_edge_ = edges->GetEdge(Edge::Type::GRAB); - edge_borders_ = edges; - } - else /*if (win_->actions() & CompWindowActionMoveMask)*/ - { - edge_borders_ = std::make_shared(win_); - grab_edge_ = edge_borders_; - } - - input_mixer_->PushToFront(edge_borders_); + grab_edge_ = std::static_pointer_cast(edge_borders_)->GetEdge(Edge::Type::GRAB); auto padding = style->Padding(Side::TOP); top_layout_ = std::make_shared(); @@ -346,6 +413,7 @@ top_layout_->Append(title_layout); input_mixer_->PushToFront(top_layout_); + dirty_frame_ = false; SetupAppMenu(); RedrawDecorations(); @@ -356,12 +424,12 @@ if (title_) last_title_ = title_->text(); + if (input_mixer_) + input_mixer_->Remove(top_layout_); + UnsetAppMenu(); theme_changed_->disconnect(); - dpi_changed_->disconnect(); top_layout_.reset(); - input_mixer_.reset(); - edge_borders_.reset(); } bool Window::Impl::IsMaximized() const @@ -369,26 +437,25 @@ return (win_->state() & MAXIMIZE_STATE) == MAXIMIZE_STATE; } -bool Window::Impl::ShadowDecorated() const +void Window::Impl::UpdateElements(cu::WindowFilter::Value wf) { if (!parent_->scaled() && IsMaximized()) - return false; + { + deco_elements_ = cu::DecorationElement::NONE; + return; + } - if (!cu::IsWindowShadowDecorable(win_)) - return false; + deco_elements_ = cu::WindowDecorationElements(win_, wf); +} - return true; +bool Window::Impl::ShadowDecorated() const +{ + return deco_elements_ & cu::DecorationElement::SHADOW; } bool Window::Impl::FullyDecorated() const { - if (!parent_->scaled() && IsMaximized()) - return false; - - if (!cu::IsWindowFullyDecorable(win_)) - return false; - - return true; + return deco_elements_ & cu::DecorationElement::BORDER; } bool Window::Impl::ShouldBeDecorated() const @@ -415,6 +482,9 @@ void Window::Impl::RenderDecorationTexture(Side s, nux::Geometry const& geo) { + if (geo.width <= 0 || geo.height <= 0) + return; + auto& deco_tex = bg_textures_[unsigned(s)]; if (deco_tex.quad.box.width() != geo.width || deco_tex.quad.box.height() != geo.height) @@ -427,6 +497,7 @@ } deco_tex.SetCoords(geo.x, geo.y); + deco_tex.quad.region = deco_tex.quad.box; } void Window::Impl::UpdateDecorationTextures() @@ -438,7 +509,6 @@ } auto const& geo = win_->borderRect(); - auto const& input = win_->inputRect(); auto const& border = win_->border(); bg_textures_.resize(4); @@ -450,19 +520,18 @@ top_layout_->SetCoords(geo.x(), geo.y()); top_layout_->SetSize(geo.width(), border.top); - if (edge_borders_) - { - edge_borders_->SetCoords(input.x(), input.y()); - edge_borders_->SetSize(input.width(), input.height()); - } - SyncMenusGeometries(); } void Window::Impl::ComputeShadowQuads() { - if (!ShadowDecorated()) + if (!(deco_elements_ & cu::DecorationElement::SHADOW)) + { + if (!last_shadow_rect_.isEmpty()) + last_shadow_rect_.setGeometry(0, 0, 0, 0); + return; + } const auto* texture = ShadowTexture(); @@ -550,30 +619,56 @@ if (shadows_rect != last_shadow_rect_) { + auto const& win_region = win_->region(); + quads[Quads::Pos::TOP_LEFT].region = CompRegion(quads[Quads::Pos::TOP_LEFT].box) - win_region; + quads[Quads::Pos::TOP_RIGHT].region = CompRegion(quads[Quads::Pos::TOP_RIGHT].box) - win_region; + quads[Quads::Pos::BOTTOM_LEFT].region = CompRegion(quads[Quads::Pos::BOTTOM_LEFT].box) - win_region; + quads[Quads::Pos::BOTTOM_RIGHT].region = CompRegion(quads[Quads::Pos::BOTTOM_RIGHT].box) - win_region; + last_shadow_rect_ = shadows_rect; win_->updateWindowOutputExtents(); } } +void Window::Impl::Paint(GLMatrix const& transformation, + GLWindowPaintAttrib const& attrib, + CompRegion const& region, unsigned mask) +{ + if (!(mask & PAINT_SCREEN_TRANSFORMED_MASK) && win_->defaultViewport() != screen->vp()) + { + return; + } + + if (dirty_geo_) + parent_->UpdateDecorationPosition(); + + if (dirty_frame_) + { + dirty_frame_ = false; + CleanupWindowControls(); + CleanupWindowEdges(); + Update(); + } +} + void Window::Impl::Draw(GLMatrix const& transformation, GLWindowPaintAttrib const& attrib, CompRegion const& region, unsigned mask) { - if (!ShadowDecorated()) + if (last_shadow_rect_.isEmpty() || (!(mask & PAINT_SCREEN_TRANSFORMED_MASK) && win_->defaultViewport() != screen->vp())) + { return; + } auto const& clip_region = (mask & PAINT_WINDOW_TRANSFORMED_MASK) ? infiniteRegion : region; mask |= PAINT_WINDOW_BLEND_MASK; - if (dirty_geo_) - parent_->UpdateDecorationPosition(); - glwin_->vertexBuffer()->begin(); for (unsigned i = 0; i < shadow_quads_.size(); ++i) { auto& quad = shadow_quads_[Quads::Pos(i)]; - glwin_->glAddGeometry({quad.matrix}, CompRegion(quad.box) - win_->region(), clip_region); + glwin_->glAddGeometry(quad.matrices, quad.region, clip_region); } if (glwin_->vertexBuffer()->end()) @@ -581,8 +676,11 @@ for (auto const& dtex : bg_textures_) { + if (!dtex) + continue; + glwin_->vertexBuffer()->begin(); - glwin_->glAddGeometry({dtex.quad.matrix}, dtex.quad.box, clip_region); + glwin_->glAddGeometry(dtex.quad.matrices, dtex.quad.region, clip_region); if (glwin_->vertexBuffer()->end()) glwin_->glDrawTexture(dtex, transformation, attrib, mask); @@ -613,7 +711,7 @@ sliding_layout->SetInputItem(nullptr); sliding_layout->mouse_owner = false; - if (!menu_manager->HasAppMenu()) + if (!menu_manager->HasAppMenu() || !Style::Get()->integrated_menus()) return; auto visibility_cb = sigc::hide(sigc::mem_fun(this, &Impl::UpdateAppMenuVisibility)); @@ -695,6 +793,33 @@ if (top_layout_) top_layout_->scale = cv_->DPIScale(); + + if (edge_borders_) + edge_borders_->scale = cv_->DPIScale(); + } +} + +void Window::Impl::UpdateForceQuitDialogPosition() +{ + if (force_quit_) + force_quit_->UpdateDialogPosition(); +} + +void Window::Impl::ShowForceQuitDialog(bool show, Time time) +{ + if (show) + { + if (!force_quit_) + { + force_quit_ = std::make_shared(win_, time); + force_quit_->close_request.connect([this] { force_quit_.reset(); }); + } + + force_quit_->time = time; + } + else + { + force_quit_.reset(); } } @@ -738,6 +863,12 @@ impl_->Draw(matrix, attrib, region, mask); } +void Window::Paint(GLMatrix const& matrix, GLWindowPaintAttrib const& attrib, + CompRegion const& region, unsigned mask) +{ + impl_->Paint(matrix, attrib, region, mask); +} + void Window::Undecorate() { impl_->Undecorate(); @@ -747,7 +878,9 @@ { impl_->UpdateMonitor(); impl_->ComputeShadowQuads(); + impl_->UpdateWindowEdgesGeo(); impl_->UpdateDecorationTextures(); + impl_->UpdateForceQuitDialogPosition(); impl_->dirty_geo_ = false; } @@ -765,7 +898,8 @@ { data.add(impl_->win_->borderRect()) .add("input_geo", impl_->win_->inputRect()) - .add("content_geo", impl_->win_->region().boundingRect()) + .add("content_geo", impl_->win_->geometry()) + .add("region", impl_->win_->region().boundingRect()) .add("title", title()) .add("active", impl_->active()) .add("scaled", scaled()) diff -Nru unity-7.1.2+14.04.20140303/decorations/DecoratedWindow.h unity-7.2.4+14.04.20141217/decorations/DecoratedWindow.h --- unity-7.1.2+14.04.20140303/decorations/DecoratedWindow.h 2014-03-03 16:47:36.000000000 +0000 +++ unity-7.2.4+14.04.20141217/decorations/DecoratedWindow.h 2014-12-17 20:51:37.000000000 +0000 @@ -51,6 +51,7 @@ void UpdateDecorationPositionDelayed(); void UpdateFrameRegion(CompRegion&); void UpdateOutputExtents(compiz::window::extents::Extents&); + void Paint(GLMatrix const&, GLWindowPaintAttrib const&, CompRegion const&, unsigned mask); void Draw(GLMatrix const&, GLWindowPaintAttrib const&, CompRegion const&, unsigned mask); protected: diff -Nru unity-7.1.2+14.04.20140303/decorations/DecorationsDataPool.cpp unity-7.2.4+14.04.20141217/decorations/DecorationsDataPool.cpp --- unity-7.1.2+14.04.20140303/decorations/DecorationsDataPool.cpp 2014-03-03 16:47:36.000000000 +0000 +++ unity-7.2.4+14.04.20141217/decorations/DecorationsDataPool.cpp 2014-12-17 20:51:37.000000000 +0000 @@ -32,11 +32,11 @@ namespace { DECLARE_LOGGER(logger, "unity.decoration.datapool"); +static DataPool::Ptr instance_; const std::string PLUGIN_NAME = "unityshell"; const int BUTTONS_SIZE = 16; const int BUTTONS_PADDING = 1; const cu::SimpleTexture::Ptr EMPTY_BUTTON; -Display* dpy = nullptr; unsigned EdgeTypeToCursorShape(Edge::Type type) { @@ -67,7 +67,6 @@ DataPool::DataPool() { - dpy = screen->dpy(); SetupCursors(); SetupTextures(); @@ -81,18 +80,28 @@ DataPool::~DataPool() { + auto* dpy = screen->dpy(); for (auto cursor : edge_cursors_) XFreeCursor(dpy, cursor); } DataPool::Ptr const& DataPool::Get() { - static DataPool::Ptr data_pool(new DataPool()); - return data_pool; + if (instance_) + return instance_; + + instance_.reset(new DataPool); + return instance_; +} + +void DataPool::Reset() +{ + instance_.reset(); } void DataPool::SetupCursors() { + auto* dpy = screen->dpy(); for (unsigned c = 0; c < edge_cursors_.size(); ++c) edge_cursors_[c] = XCreateFontCursor(dpy, EdgeTypeToCursorShape(Edge::Type(c))); } diff -Nru unity-7.1.2+14.04.20140303/decorations/DecorationsDataPool.h unity-7.2.4+14.04.20141217/decorations/DecorationsDataPool.h --- unity-7.1.2+14.04.20140303/decorations/DecorationsDataPool.h 2014-03-03 16:47:36.000000000 +0000 +++ unity-7.2.4+14.04.20141217/decorations/DecorationsDataPool.h 2014-12-17 20:51:37.000000000 +0000 @@ -35,6 +35,7 @@ typedef std::shared_ptr Ptr; static DataPool::Ptr const& Get(); + static void Reset(); virtual ~DataPool(); Cursor EdgeCursor(Edge::Type) const; diff -Nru unity-7.1.2+14.04.20140303/decorations/DecorationsEdgeBorders.cpp unity-7.2.4+14.04.20141217/decorations/DecorationsEdgeBorders.cpp --- unity-7.1.2+14.04.20140303/decorations/DecorationsEdgeBorders.cpp 2014-03-03 16:47:14.000000000 +0000 +++ unity-7.2.4+14.04.20141217/decorations/DecorationsEdgeBorders.cpp 2014-12-17 20:51:54.000000000 +0000 @@ -26,21 +26,31 @@ { namespace { -const int MIN_CORNER_EDGE = 10; +const RawPixel MIN_CORNER_EDGE = 10_em; } EdgeBorders::EdgeBorders(CompWindow* win) { - items_.resize(size_t(Edge::Type::Size)); + scale.changed.connect(sigc::hide(sigc::mem_fun(this, &EdgeBorders::Relayout))); - for (unsigned i = 0; i < unsigned(Edge::Type::Size); ++i) + if (win->actions() & CompWindowActionResizeMask) { - auto type = Edge::Type(i); + items_.resize(size_t(Edge::Type::Size)); - if (type == Edge::Type::GRAB) - items_[i] = std::make_shared(win); - else - items_[i] = std::make_shared(win, type); + for (unsigned i = 0; i < unsigned(Edge::Type::Size); ++i) + { + auto type = Edge::Type(i); + + if (type == Edge::Type::GRAB) + items_[i] = std::make_shared(win); + else + items_[i] = std::make_shared(win, type); + } + } + else /*if (win->actions() & CompWindowActionMoveMask)*/ + { + items_.resize(size_t(Edge::Type::GRAB) + 1); + items_[unsigned(Edge::Type::GRAB)] = std::make_shared(win); } Relayout(); @@ -54,10 +64,17 @@ auto const& ib = win->input(); using namespace compiz::window::extents; - Extents edges(std::max(ib.left, MIN_CORNER_EDGE), - std::max(ib.right, MIN_CORNER_EDGE), - std::max(ib.top, MIN_CORNER_EDGE), - std::max(ib.bottom, MIN_CORNER_EDGE)); + int min_corner_edge = MIN_CORNER_EDGE.CP(scale); + Extents edges(std::max(ib.left, min_corner_edge), + std::max(ib.right, min_corner_edge), + std::max(ib.top, min_corner_edge), + std::max(ib.bottom, min_corner_edge)); + + grab_edge->SetCoords(rect_.x() + ib.left, rect_.y() + ib.top - b.top); + grab_edge->SetSize(rect_.width() - ib.left - ib.right, b.top); + + if (items_.size() != size_t(Edge::Type::Size)) + return; auto item = items_[unsigned(Edge::Type::TOP)]; item->SetCoords(rect_.x() + edges.left, rect_.y()); @@ -90,10 +107,6 @@ item = items_[unsigned(Edge::Type::BOTTOM_RIGHT)]; item->SetCoords(rect_.x2() - edges.right, rect_.y2() - edges.bottom); item->SetSize(edges.right, edges.bottom); - - item = items_[unsigned(Edge::Type::GRAB)]; - item->SetCoords(rect_.x() + ib.left, rect_.y() + ib.top - b.top); - item->SetSize(rect_.width() - ib.left - ib.right, b.top); } Item::Ptr const& EdgeBorders::GetEdge(Edge::Type type) const diff -Nru unity-7.1.2+14.04.20140303/decorations/DecorationsForceQuitDialog.cpp unity-7.2.4+14.04.20141217/decorations/DecorationsForceQuitDialog.cpp --- unity-7.1.2+14.04.20140303/decorations/DecorationsForceQuitDialog.cpp 1970-01-01 00:00:00.000000000 +0000 +++ unity-7.2.4+14.04.20141217/decorations/DecorationsForceQuitDialog.cpp 2014-12-17 20:51:54.000000000 +0000 @@ -0,0 +1,469 @@ +// -*- Mode: C++; indent-tabs-mode: nil; tab-width: 2 -*- +/* + * Copyright (C) 2014 Canonical Ltd + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 3 as + * published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + * Authored by: Marco Trevisan + */ + +#include "config.h" + +#include +#include +#include +#include +#include +#include +#include "DecorationsForceQuitDialog.h" +#include "DecorationStyle.h" +#include "WindowManager.h" + +namespace unity +{ +namespace decoration +{ +namespace +{ +DECLARE_LOGGER(logger, "unity.decoration.forcequit.dialog"); + +const std::string CLOSE_BUTTON_INACTIVE_FILE = "sheet_style_close_focused"; +const std::string CLOSE_BUTTON_FOCUSED_FILE = "sheet_style_close_focused_prelight"; +const std::string CLOSE_BUTTON_ACTIVE_FILE = "sheet_style_close_focused_pressed"; + + +// Dialog +struct SheetStyleWindow +{ + GtkWindow parent_instance; +}; + +struct SheetStyleWindowClass +{ + GtkWindowClass parent_class; +}; + +G_DEFINE_TYPE(SheetStyleWindow, sheet_style_window, GTK_TYPE_WINDOW); +static void sheet_style_window_init(SheetStyleWindow*) {} +static void sheet_style_window_class_init(SheetStyleWindowClass*); + +// Box +struct SheetStyleDialog +{ + GtkBox parent_instance; +}; + +struct SheetStyleDialogClass +{ + GtkBoxClass parent_class; +}; + +G_DEFINE_TYPE(SheetStyleDialog, sheet_style_dialog, GTK_TYPE_BOX); +GtkWidget* sheet_style_dialog_new(ForceQuitDialog*, Window, long); +static void sheet_style_dialog_init(SheetStyleDialog*) {} +static void sheet_style_dialog_class_init(SheetStyleDialogClass*); + +// Close button +struct CloseButtonPrivate +{ + GtkImage* img; +}; + +struct CloseButton +{ + GtkButton parent_instance; + CloseButtonPrivate* priv; +}; + +struct CloseButtonClass +{ + GtkButtonClass parent_class; +}; + +#define CLOSE_BUTTON(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), close_button_get_type(), CloseButton)) + +G_DEFINE_TYPE(CloseButton, close_button, GTK_TYPE_BUTTON); +GtkWidget* close_button_new(); +static void close_button_init(CloseButton*); +static void close_button_class_init(CloseButtonClass*); + +// Window implementation +GtkWidget* sheet_style_window_new(ForceQuitDialog* main_dialog, Window parent_xid) +{ + auto* dpy = gdk_x11_get_default_xdisplay(); + auto* self = GTK_WINDOW(g_object_new(sheet_style_window_get_type(), nullptr)); + gtk_window_set_skip_taskbar_hint(self, TRUE); + gtk_window_set_skip_pager_hint(self, TRUE); + gtk_window_set_position(self, GTK_WIN_POS_CENTER_ON_PARENT); + gtk_window_set_type_hint(self, GDK_WINDOW_TYPE_HINT_DIALOG); + gtk_window_set_decorated(self, FALSE); + gtk_window_set_resizable(self, FALSE); + gtk_window_set_urgency_hint(self, TRUE); + gtk_window_set_deletable(self, FALSE); + gtk_window_set_title(self, "Force Quit Dialog"); + + XClassHint parent_class = {nullptr, nullptr}; + XGetClassHint(dpy, parent_xid, &parent_class); + gtk_window_set_wmclass(self, parent_class.res_name, parent_class.res_class); + XFree(parent_class.res_class); + XFree(parent_class.res_name); + + Atom WM_PID = gdk_x11_get_xatom_by_name("_NET_WM_PID"); + Atom WM_CLIENT_MACHINE = gdk_x11_get_xatom_by_name("WM_CLIENT_MACHINE"); + + auto& wm = WindowManager::Default(); + auto parent_hostname = wm.GetStringProperty(parent_xid, WM_CLIENT_MACHINE); + long parent_pid = 0; + + char current_hostname[256]; + if (gethostname(current_hostname, sizeof(current_hostname)) > -1) + { + current_hostname[sizeof(current_hostname)-1] = '\0'; + + if (current_hostname == parent_hostname) + { + auto const& pid_list = wm.GetCardinalProperty(parent_xid, WM_PID); + + if (!pid_list.empty()) + parent_pid = pid_list.front(); + } + } + + auto const& deco_style = decoration::Style::Get(); + auto const& offset = deco_style->ShadowOffset(); + int max_offset = std::max(std::abs(offset.x * 4), std::abs(offset.y * 4)); + gtk_container_set_border_width(GTK_CONTAINER(self), deco_style->ActiveShadowRadius()+max_offset); + + auto* screen = gtk_window_get_screen(self); + gtk_widget_set_visual(GTK_WIDGET(self), gdk_screen_get_rgba_visual(screen)); + gtk_widget_realize(GTK_WIDGET(self)); + gtk_widget_override_background_color(GTK_WIDGET(self), GTK_STATE_FLAG_NORMAL, nullptr); + + gtk_container_add(GTK_CONTAINER(self), sheet_style_dialog_new(main_dialog, parent_xid, parent_pid)); + + gtk_window_set_modal(self, TRUE); + gtk_window_set_destroy_with_parent(self, TRUE); + + auto* gwindow = gtk_widget_get_window(GTK_WIDGET(self)); + gdk_window_set_functions(gwindow, GDK_FUNC_CLOSE); + gtk_widget_realize(GTK_WIDGET(self)); + + gdk_error_trap_push(); + auto xid = gdk_x11_window_get_xid(gwindow); + XSetTransientForHint(dpy, xid, parent_xid); + XSync(dpy, False); + + if (int error_code = gdk_error_trap_pop()) + { + gchar tmp[1024]; + XGetErrorText(dpy, error_code, tmp, sizeof(tmp) - 1); + tmp[sizeof(tmp) - 1] = '\0'; + LOG_ERROR(logger) << "Impossible to reparent dialog: " << tmp; + } + + XChangeProperty(dpy, xid, WM_CLIENT_MACHINE, XA_STRING, 8, PropModeReplace, + (unsigned char *) parent_hostname.c_str(), parent_hostname.size()); + XChangeProperty(dpy, xid, WM_PID, XA_CARDINAL, 32, PropModeReplace, + (unsigned char *) &parent_pid, 1); + XSync(dpy, False); + + return GTK_WIDGET(self); +} + +static void sheet_style_window_class_init(SheetStyleWindowClass* klass) +{ + GTK_WIDGET_CLASS(klass)->delete_event = [] (GtkWidget* self, GdkEventAny*) { + // Don't destroy the window on delete event + return TRUE; + }; + + GTK_WIDGET_CLASS(klass)->draw = [] (GtkWidget* self, cairo_t* cr) { + GtkAllocation a; + gtk_widget_get_allocation(self, &a); + cairo_rectangle(cr, 0, 0, a.width, a.height); + + cairo_save(cr); + int border = gtk_container_get_border_width(GTK_CONTAINER(self)); + cairo_translate(cr, border, border); + gtk_container_forall(GTK_CONTAINER(self), [] (GtkWidget* child, gpointer cr) { + gtk_widget_draw(child, static_cast(cr)); + }, cr); + cairo_restore(cr); + + return TRUE; + }; + + GTK_WIDGET_CLASS(klass)->size_allocate = [] (GtkWidget* self, GtkAllocation* a) { + GTK_WIDGET_CLASS(sheet_style_window_parent_class)->size_allocate(self, a); + + int border = gtk_container_get_border_width(GTK_CONTAINER(self)); + cairo_rectangle_int_t rect = {border, border, a->width-border*2, a->height-border*2}; + + auto* region = cairo_region_create_rectangle(&rect); + gtk_widget_input_shape_combine_region(GTK_WIDGET(self), region); + cairo_region_destroy(region); + }; +} + +// Dialog content Implementation +void on_force_quit_clicked(GtkButton *button, gint64* kill_data) +{ + Display* dpy = gdk_x11_get_default_xdisplay(); + GtkWidget* top_level = gtk_widget_get_toplevel(GTK_WIDGET(button)); + Window parent_xid = kill_data[0]; + long parent_pid = kill_data[1]; + + gtk_widget_hide(top_level); + + gdk_error_trap_push(); + XSync(dpy, False); + + if (int error_code = gdk_error_trap_pop()) + { + gchar tmp[1024]; + XGetErrorText(dpy, error_code, tmp, sizeof(tmp) - 1); + tmp[sizeof(tmp) - 1] = '\0'; + LOG_ERROR(logger) << "Impossible to kill window " << parent_xid << ": " << tmp; + } + + XKillClient(dpy, parent_xid); + XSync(dpy, False); + + if (parent_pid > 0) + kill(parent_pid, 9); +} + +void on_wait_clicked(GtkButton *button, ForceQuitDialog* main_dialog) +{ + main_dialog->close_request.emit(); +} + +GtkWidget* sheet_style_dialog_new(ForceQuitDialog* main_dialog, Window parent_xid, long parent_pid) +{ + auto* self = GTK_WIDGET(g_object_new(sheet_style_dialog_get_type(), nullptr)); + gtk_orientable_set_orientation(GTK_ORIENTABLE(self), GTK_ORIENTATION_VERTICAL); + + glib::Object style(gtk_css_provider_new()); + + auto const& deco_style = decoration::Style::Get(); + auto const& radius = deco_style->CornerRadius(); + auto const& offset = deco_style->ShadowOffset(); + auto const& color = deco_style->ActiveShadowColor(); + auto const& backcolor = deco_style->InactiveShadowColor(); + int decoration_radius = std::max({radius.top, radius.left, radius.right, radius.bottom}); + + gtk_css_provider_load_from_data(style, (R"( + SheetStyleDialog { + background-color: #f7f6f5; + color: #4a4a4a; + border-radius: )"+std::to_string(decoration_radius)+R"(px; + box-shadow: )"+std::to_string(2 * offset.x)+"px "+std::to_string(2 * offset.y)+"px "+ + std::to_string(deco_style->ActiveShadowRadius())+"px "+ + "rgba("+std::to_string(int(color.red * 255.0))+", "+ + std::to_string(int(color.green * 255.0))+", "+ + std::to_string(int(color.blue * 255.0))+", "+ + std::to_string(int(color.alpha))+'.'+std::to_string(int(color.alpha*10000.0))+')'+R"(; + } + + SheetStyleDialog:backdrop { + background-color: shade(#f7f6f5, 1.2); + color: shade(#4a4a4a, 1.5); + border-radius: )"+std::to_string(decoration_radius)+R"(px; + box-shadow: )"+std::to_string(2 * offset.x)+"px "+std::to_string(2 * offset.y)+"px "+ + std::to_string(deco_style->InactiveShadowRadius())+"px "+ + "rgba("+std::to_string(int(backcolor.red * 255.0))+", "+ + std::to_string(int(backcolor.green * 255.0))+", "+ + std::to_string(int(backcolor.blue * 255.0))+", "+ + std::to_string(int(backcolor.alpha))+'.'+std::to_string(int(backcolor.alpha*10000.0))+')'+R"(; + })").c_str(), -1, nullptr); + + auto* style_ctx = gtk_widget_get_style_context(self); + gtk_style_context_add_provider(style_ctx, glib::object_cast(style), GTK_STYLE_PROVIDER_PRIORITY_FALLBACK); + gtk_style_context_add_class(style_ctx, "unity-force-quit"); + + auto* main_box = gtk_box_new(GTK_ORIENTATION_VERTICAL, 5); + gtk_container_set_border_width(GTK_CONTAINER(main_box), 4); + + auto *close_button = close_button_new(); + g_signal_connect(close_button, "clicked", G_CALLBACK(on_wait_clicked), main_dialog); + gtk_box_pack_start(GTK_BOX(main_box), close_button, TRUE, TRUE, 0); + + auto* content_box = gtk_box_new(GTK_ORIENTATION_VERTICAL, 5); + gtk_container_set_border_width(GTK_CONTAINER(content_box), 10); + gtk_widget_set_margin_left(content_box, 20); + gtk_widget_set_margin_right(content_box, 20); + gtk_container_add(GTK_CONTAINER(main_box), content_box); + + auto* title = gtk_label_new(_("This window is not responding")); + auto* font_desc = pango_font_description_from_string("Ubuntu 17"); + gtk_widget_override_font(title, font_desc); + pango_font_description_free(font_desc); + gtk_widget_set_halign(title, GTK_ALIGN_START); + gtk_box_pack_start(GTK_BOX(content_box), title, FALSE, FALSE, 0); + + auto* subtitle = gtk_label_new(_("Do you want to force the application to exit, or wait for it to respond?")); + gtk_widget_set_halign(title, GTK_ALIGN_START); + gtk_box_pack_start(GTK_BOX(content_box), subtitle, FALSE, FALSE, 0); + + auto* buttons_box = gtk_button_box_new(GTK_ORIENTATION_HORIZONTAL); + gtk_box_set_spacing(GTK_BOX(buttons_box), 15); + gtk_container_set_border_width(GTK_CONTAINER(buttons_box), 5); + gtk_button_box_set_layout(GTK_BUTTON_BOX(buttons_box), GTK_BUTTONBOX_END); + + auto* wait_button = gtk_button_new_with_mnemonic(_("_Wait")); + gtk_container_add(GTK_CONTAINER(buttons_box), wait_button); + g_signal_connect(wait_button, "clicked", G_CALLBACK(on_wait_clicked), main_dialog); + + auto *kill_data = g_new(gint64, 2); + kill_data[0] = parent_xid; + kill_data[1] = parent_pid; + auto* quit_button = gtk_button_new_with_mnemonic(_("_Force Quit")); + gtk_container_add(GTK_CONTAINER(buttons_box), quit_button); + g_signal_connect_data(quit_button, "clicked", G_CALLBACK(on_force_quit_clicked), + kill_data, [] (gpointer data, GClosure*) { g_free(data); }, + static_cast(0)); + + auto* buttons_aligment = gtk_alignment_new(1, 1, 0, 0); + gtk_alignment_set_padding(GTK_ALIGNMENT(buttons_aligment), 20, 0, 0, 0); + gtk_container_add(GTK_CONTAINER(buttons_aligment), buttons_box); + gtk_container_add(GTK_CONTAINER(content_box), buttons_aligment); + + gtk_container_add(GTK_CONTAINER(self), main_box); + + return self; +} + +static void sheet_style_dialog_class_init(SheetStyleDialogClass* klass) +{ + GTK_WIDGET_CLASS(klass)->draw = [] (GtkWidget* self, cairo_t* cr) { + GtkAllocation a; + gtk_widget_get_allocation(self, &a); + gtk_render_background(gtk_widget_get_style_context(self), cr, 0, 0, a.width, a.height); + return GTK_WIDGET_CLASS(sheet_style_dialog_parent_class)->draw(self, cr); + }; +} + +// Close button +GtkWidget* close_button_new() +{ + auto* self = GTK_WIDGET(g_object_new(close_button_get_type(), nullptr)); + gtk_button_set_relief(GTK_BUTTON(self), GTK_RELIEF_NONE); + gtk_button_set_focus_on_click(GTK_BUTTON(self), FALSE); + gtk_widget_set_can_focus(self, FALSE); + gtk_widget_set_halign(self, GTK_ALIGN_START); + + auto const& file = decoration::Style::Get()->ThemedFilePath(CLOSE_BUTTON_INACTIVE_FILE, {PKGDATADIR"/"}); + auto* img = gtk_image_new_from_file(file.c_str()); + gtk_container_add(GTK_CONTAINER(self), img); + CLOSE_BUTTON(self)->priv->img = GTK_IMAGE(img); + + glib::Object style(gtk_css_provider_new()); + gtk_css_provider_load_from_data(style, R"( + * {padding: 0px 0px 0px 0px; border: 0px; } + )", -1, nullptr); + + auto* style_ctx = gtk_widget_get_style_context(self); + gtk_style_context_add_provider(style_ctx, glib::object_cast(style), GTK_STYLE_PROVIDER_PRIORITY_APPLICATION); + + return self; +} + +static void close_button_init(CloseButton* self) +{ + self->priv = G_TYPE_INSTANCE_GET_PRIVATE(self, close_button_get_type(), CloseButtonPrivate); +} + +static void close_button_class_init(CloseButtonClass* klass) +{ + GTK_WIDGET_CLASS(klass)->draw = [] (GtkWidget* self, cairo_t* cr) { + gtk_widget_draw(GTK_WIDGET(CLOSE_BUTTON(self)->priv->img), cr); + return TRUE; + }; + + GTK_WIDGET_CLASS(klass)->state_flags_changed = [] (GtkWidget* self, GtkStateFlags prev_state) { + auto* img = CLOSE_BUTTON(self)->priv->img; + if (!img) return; + + auto new_flags = gtk_widget_get_state_flags(self); + auto const& deco_style = decoration::Style::Get(); + auto file = deco_style->ThemedFilePath(CLOSE_BUTTON_INACTIVE_FILE, {PKGDATADIR"/"}); + + if (((new_flags & GTK_STATE_FLAG_PRELIGHT) && !gtk_widget_get_can_focus(self)) || + (new_flags & GTK_STATE_FLAG_FOCUSED)) + { + auto const& basename = (new_flags & GTK_STATE_FLAG_ACTIVE) ? CLOSE_BUTTON_ACTIVE_FILE : CLOSE_BUTTON_FOCUSED_FILE; + file = deco_style->ThemedFilePath(basename, {PKGDATADIR"/"}); + } + + gtk_image_set_from_file(img, file.c_str()); + + return GTK_WIDGET_CLASS(close_button_parent_class)->state_flags_changed(self, prev_state); + }; + + G_OBJECT_CLASS(klass)->finalize = [] (GObject* self) { + CLOSE_BUTTON(self)->priv->img = nullptr; + return G_OBJECT_CLASS(close_button_parent_class)->finalize(self); + }; +} + +} + +struct ForceQuitDialog::Impl : sigc::trackable +{ + Impl(ForceQuitDialog* parent, CompWindow* win) + : parent_(parent) + , win_(win) + , dialog_(sheet_style_window_new(parent, win_->id())) + { + parent_->time.changed.connect(sigc::mem_fun(this, &Impl::UpdateWindowTime)); + UpdateWindowTime(parent_->time()); + } + + ~Impl() + { + gtk_widget_destroy(dialog_); + } + + void UpdateWindowTime(Time time) + { + gdk_x11_window_set_user_time(gtk_widget_get_window(dialog_), time); + gtk_widget_show_all(dialog_); + } + + void UpdateDialogPosition() + { + auto const& win_geo = win_->inputRect(); + nux::Size walloc(gtk_widget_get_allocated_width(dialog_), gtk_widget_get_allocated_height(dialog_)); + gtk_window_move(GTK_WINDOW(dialog_), win_geo.centerX() - walloc.width/2, win_geo.centerY() - walloc.height/2); + } + + ForceQuitDialog* parent_; + CompWindow* win_; + GtkWidget* dialog_; +}; + +ForceQuitDialog::ForceQuitDialog(CompWindow* win, Time tm) + : time(tm) + , impl_(new Impl(this, win)) +{} + +ForceQuitDialog::~ForceQuitDialog() +{} + +void ForceQuitDialog::UpdateDialogPosition() +{ + impl_->UpdateDialogPosition(); +} + +} // decoration namespace +} // unity namespace diff -Nru unity-7.1.2+14.04.20140303/decorations/DecorationsForceQuitDialog.h unity-7.2.4+14.04.20141217/decorations/DecorationsForceQuitDialog.h --- unity-7.1.2+14.04.20140303/decorations/DecorationsForceQuitDialog.h 1970-01-01 00:00:00.000000000 +0000 +++ unity-7.2.4+14.04.20141217/decorations/DecorationsForceQuitDialog.h 2014-12-17 20:51:37.000000000 +0000 @@ -0,0 +1,53 @@ +// -*- Mode: C++; indent-tabs-mode: nil; tab-width: 2 -*- +/* + * Copyright (C) 2014 Canonical Ltd + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 3 as + * published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + * Authored by: Marco Trevisan + */ + +#ifndef __UNITY_DECORATIONS_FORCE_QUIT_DIALOG__ +#define __UNITY_DECORATIONS_FORCE_QUIT_DIALOG__ + +#include +#include "CompizUtils.h" + +namespace unity +{ +namespace decoration +{ + +class ForceQuitDialog +{ +public: + typedef std::shared_ptr Ptr; + + ForceQuitDialog(CompWindow*, Time); + ~ForceQuitDialog(); + + nux::Property + + + + 1 + + + 1.0 + + + 'Ubuntu 11' + + + 24 + + + + + + '/usr/share/unity-greeter/logo.png' + + + 'Ubuntu 11' + + + '/usr/share/backgrounds/warty-final-ubuntu.png' + + + '#2C001E' + + + true + + + true + + + true + + + + + + true + + + true + + + 0 + + + true + + + + + + false + + + + + + false + + + false + + + + + + 'XF86AudioMute' + + + 'XF86AudioLowerVolume' + + + 'XF86AudioRaiseVolume' + + + + + + ["<Shift><Super>space"] + + + ["<Super>space"] + + diff -Nru unity-7.1.2+14.04.20140303/tests/mock-application.h unity-7.2.4+14.04.20141217/tests/mock-application.h --- unity-7.1.2+14.04.20140303/tests/mock-application.h 2014-03-03 16:47:14.000000000 +0000 +++ unity-7.2.4+14.04.20141217/tests/mock-application.h 2014-12-17 20:51:37.000000000 +0000 @@ -27,7 +27,6 @@ #include "unity-shared/ApplicationManager.h" #include "unity-shared/WindowManager.h" -#include "unity-shared/UnitySettings.h" using namespace testing; @@ -379,7 +378,6 @@ unity_app_->actions_log_.clear(); } - unity::Settings settings; MockApplication::Ptr unity_app_; }; diff -Nru unity-7.1.2+14.04.20140303/tests/mock_indicators.h unity-7.2.4+14.04.20141217/tests/mock_indicators.h --- unity-7.1.2+14.04.20140303/tests/mock_indicators.h 2014-03-03 16:47:36.000000000 +0000 +++ unity-7.2.4+14.04.20141217/tests/mock_indicators.h 2014-12-17 20:51:54.000000000 +0000 @@ -36,6 +36,7 @@ // Implementing Indicators virtual functions MOCK_METHOD2(SyncGeometries, void(std::string const&, EntryLocationMap const&)); MOCK_METHOD5(ShowEntriesDropdown, void(Indicator::Entries const&, Entry::Ptr const&, unsigned xid, int x, int y)); + MOCK_METHOD0(CloseActiveEntry, void()); MOCK_CONST_METHOD0(IconPaths, std::vector const&()); MOCK_METHOD2(OnEntryScroll, void(std::string const&, int delta)); MOCK_METHOD5(OnEntryShowMenu, void(std::string const&, unsigned xid, int x, int y, unsigned button)); diff -Nru unity-7.1.2+14.04.20140303/tests/MockSwitcherController.h unity-7.2.4+14.04.20141217/tests/MockSwitcherController.h --- unity-7.1.2+14.04.20140303/tests/MockSwitcherController.h 2014-03-03 16:47:14.000000000 +0000 +++ unity-7.2.4+14.04.20141217/tests/MockSwitcherController.h 2014-12-17 20:51:37.000000000 +0000 @@ -49,11 +49,9 @@ MOCK_CONST_METHOD1(CanShowSwitcher, bool(const std::vector &)); MOCK_METHOD0(NextDetail, void()); MOCK_METHOD0(PrevDetail, void()); - MOCK_METHOD2(SetDetail, void(bool, unsigned int)); MOCK_METHOD0(SelectFirstItem, void()); MOCK_METHOD2(SetWorkspace, void(nux::Geometry, int)); - MOCK_METHOD0(ExternalRenderTargets, unity::ui::LayoutWindow::Vector ()); - MOCK_CONST_METHOD0(GetSwitcherInputWindowId, guint()); + MOCK_CONST_METHOD0(ExternalRenderTargets, unity::ui::LayoutWindow::Vector const&()); MOCK_CONST_METHOD0(IsShowDesktopDisabled, bool()); MOCK_METHOD1(SetShowDesktopDisabled, void(bool)); MOCK_CONST_METHOD0(StartIndex, int()); diff -Nru unity-7.1.2+14.04.20140303/tests/test_action_link.cpp unity-7.2.4+14.04.20141217/tests/test_action_link.cpp --- unity-7.1.2+14.04.20140303/tests/test_action_link.cpp 2014-03-03 16:47:14.000000000 +0000 +++ unity-7.2.4+14.04.20141217/tests/test_action_link.cpp 2014-12-17 20:51:37.000000000 +0000 @@ -22,7 +22,7 @@ #include #include -#include +#include "unity-shared/StaticCairoText.h" #include "dash/previews/ActionLink.cpp" #include "test_utils.h" @@ -75,6 +75,7 @@ { action_link = new ActionLinkMock("action_id", "display_name"); } + nux::ObjectPtr action_link; }; diff -Nru unity-7.1.2+14.04.20140303/tests/test_application_launcher_icon.cpp unity-7.2.4+14.04.20141217/tests/test_application_launcher_icon.cpp --- unity-7.1.2+14.04.20140303/tests/test_application_launcher_icon.cpp 2014-03-03 16:47:14.000000000 +0000 +++ unity-7.2.4+14.04.20141217/tests/test_application_launcher_icon.cpp 2014-12-17 20:51:37.000000000 +0000 @@ -668,8 +668,14 @@ mock_icon->PerformScroll(AbstractLauncherIcon::ScrollDirection::DOWN, 200); EXPECT_THAT(WM->GetWindowsInStackingOrder(), testing::ElementsAre(7, 6, 5, 4, 3, 1, 2)); - mock_icon->PerformScroll(AbstractLauncherIcon::ScrollDirection::UP, 400); - EXPECT_THAT(WM->GetWindowsInStackingOrder(), testing::ElementsAre(7, 6, 4, 3, 1, 2, 5)); + mock_icon->PerformScroll(AbstractLauncherIcon::ScrollDirection::DOWN, 400); + EXPECT_THAT(WM->GetWindowsInStackingOrder(), testing::ElementsAre(7, 6, 5, 4, 2, 1, 3)); + + mock_icon->PerformScroll(AbstractLauncherIcon::ScrollDirection::UP, 600); + EXPECT_THAT(WM->GetWindowsInStackingOrder(), testing::ElementsAre(7, 6, 5, 4, 3, 1, 2)); + + mock_icon->PerformScroll(AbstractLauncherIcon::ScrollDirection::UP, 800); + EXPECT_THAT(WM->GetWindowsInStackingOrder(), testing::ElementsAre(7, 6, 5, 4, 3, 2, 1)); } TEST_F(TestApplicationLauncherIcon, PerformScrollNoWindows) @@ -718,8 +724,8 @@ ASSERT_EQ(WM->GetActiveWindow(), 8); mock_icon->PerformScroll(AbstractLauncherIcon::ScrollDirection::DOWN, 200); - EXPECT_THAT(WM->GetWindowsInStackingOrder(), testing::ElementsAre(7, 6, 5, 4, 3, 2, 1, 8)); - ASSERT_EQ(WM->GetActiveWindow(), 8); + EXPECT_THAT(WM->GetWindowsInStackingOrder(), testing::ElementsAre(7, 6, 5, 4, 3, 2, 8, 1)); + ASSERT_EQ(WM->GetActiveWindow(), 1); } TEST_F(TestApplicationLauncherIcon, PerformScrollSingleUnfocusedWindow) @@ -735,8 +741,8 @@ mock_icon->PerformScroll(AbstractLauncherIcon::ScrollDirection::DOWN, 200); - EXPECT_THAT(WM->GetWindowsInStackingOrder(), testing::ElementsAre(1, 2)); - ASSERT_EQ(WM->GetActiveWindow(), 2); + EXPECT_THAT(WM->GetWindowsInStackingOrder(), testing::ElementsAre(2, 1)); + ASSERT_EQ(WM->GetActiveWindow(), 1); } TEST_F(TestApplicationLauncherIcon, ActiveQuirkWMCrossCheck) diff -Nru unity-7.1.2+14.04.20140303/tests/test_bfb_launcher_icon.cpp unity-7.2.4+14.04.20141217/tests/test_bfb_launcher_icon.cpp --- unity-7.1.2+14.04.20140303/tests/test_bfb_launcher_icon.cpp 2014-03-03 16:47:14.000000000 +0000 +++ unity-7.2.4+14.04.20141217/tests/test_bfb_launcher_icon.cpp 2014-12-17 20:51:37.000000000 +0000 @@ -19,8 +19,6 @@ #include -#include "unity-shared/UnitySettings.h" - #include "BFBLauncherIcon.h" using namespace unity; @@ -39,7 +37,6 @@ struct TestBFBLauncherIcon : testing::Test { - unity::Settings settings; MockBFBLauncherIcon bfb; }; diff -Nru unity-7.1.2+14.04.20140303/tests/test_dash_controller.cpp unity-7.2.4+14.04.20141217/tests/test_dash_controller.cpp --- unity-7.1.2+14.04.20140303/tests/test_dash_controller.cpp 2014-03-03 16:47:14.000000000 +0000 +++ unity-7.2.4+14.04.20141217/tests/test_dash_controller.cpp 2014-12-17 20:51:37.000000000 +0000 @@ -20,7 +20,6 @@ #include "mock-base-window.h" #include "unity-shared/DashStyle.h" #include "unity-shared/PanelStyle.h" -#include "unity-shared/UnitySettings.h" #include "unity-shared/WindowManager.h" #include "test_utils.h" @@ -46,7 +45,6 @@ nux::animation::AnimationController animation_controller; // required to create hidden secret global variables - Settings unity_settings_; dash::Style dash_style_; panel::Style panel_style_; diff -Nru unity-7.1.2+14.04.20140303/tests/test_dashview.cpp unity-7.2.4+14.04.20141217/tests/test_dashview.cpp --- unity-7.1.2+14.04.20140303/tests/test_dashview.cpp 2014-03-03 16:47:14.000000000 +0000 +++ unity-7.2.4+14.04.20141217/tests/test_dashview.cpp 2014-12-17 20:51:37.000000000 +0000 @@ -32,10 +32,8 @@ #include "dash/ApplicationStarter.h" #include "unity-shared/DashStyle.h" #include "unity-shared/PanelStyle.h" -#include "unity-shared/UnitySettings.h" #include "test_mock_scope.h" -#include "test_utils.h" using namespace unity; using namespace unity::dash; @@ -70,9 +68,6 @@ {} virtual ~TestDashView() {} - virtual void SetUp() { Utils::init_gsettings_test_environment(); } - virtual void TearDown() { Utils::reset_gsettings_test_environment(); } - class MockDashView : public DashView { public: @@ -86,7 +81,6 @@ }; protected: - Settings unity_settings_; dash::Style dash_style_; panel::Style panel_style_; MockApplicationStarter::Ptr application_starter_; diff -Nru unity-7.1.2+14.04.20140303/tests/test_desktop_launcher_icon.cpp unity-7.2.4+14.04.20141217/tests/test_desktop_launcher_icon.cpp --- unity-7.1.2+14.04.20140303/tests/test_desktop_launcher_icon.cpp 2014-03-03 16:47:14.000000000 +0000 +++ unity-7.2.4+14.04.20141217/tests/test_desktop_launcher_icon.cpp 2014-12-17 20:51:37.000000000 +0000 @@ -19,7 +19,6 @@ #include -#include "unity-shared/UnitySettings.h" #include "unity-shared/WindowManager.h" #include "launcher/DesktopLauncherIcon.h" @@ -31,7 +30,6 @@ struct TestDesktopLauncherIcon : testing::Test { - unity::Settings settings; DesktopLauncherIcon icon; }; diff -Nru unity-7.1.2+14.04.20140303/tests/test_device_launcher_section.cpp unity-7.2.4+14.04.20141217/tests/test_device_launcher_section.cpp --- unity-7.1.2+14.04.20140303/tests/test_device_launcher_section.cpp 2014-03-03 16:47:14.000000000 +0000 +++ unity-7.2.4+14.04.20141217/tests/test_device_launcher_section.cpp 2014-12-17 20:51:37.000000000 +0000 @@ -22,8 +22,6 @@ #include -#include "unity-shared/UnitySettings.h" - #include "DevicesSettings.h" #include "test_mock_devices.h" #include "test_utils.h" @@ -60,7 +58,6 @@ , section_(monitor_, devices_settings_, notifications_) {} - unity::Settings settings_; MockVolumeMonitorWrapper::Ptr monitor_; DevicesSettings::Ptr devices_settings_; DeviceNotificationDisplay::Ptr notifications_; diff -Nru unity-7.1.2+14.04.20140303/tests/test_error_preview.cpp unity-7.2.4+14.04.20141217/tests/test_error_preview.cpp --- unity-7.1.2+14.04.20140303/tests/test_error_preview.cpp 2014-03-03 16:47:14.000000000 +0000 +++ unity-7.2.4+14.04.20141217/tests/test_error_preview.cpp 2014-12-17 20:51:37.000000000 +0000 @@ -28,7 +28,6 @@ #include #include #include -#include "unity-shared/UnitySettings.h" #include #include "dash/previews/ErrorPreview.h" @@ -100,7 +99,6 @@ UnityProtocolPreviewPaymentType preview_type; // needed for styles - unity::Settings settings; dash::Style dash_style; }; diff -Nru unity-7.1.2+14.04.20140303/tests/test_expo_launcher_icon.cpp unity-7.2.4+14.04.20141217/tests/test_expo_launcher_icon.cpp --- unity-7.1.2+14.04.20140303/tests/test_expo_launcher_icon.cpp 2014-03-03 16:47:14.000000000 +0000 +++ unity-7.2.4+14.04.20141217/tests/test_expo_launcher_icon.cpp 2014-12-17 20:51:37.000000000 +0000 @@ -23,8 +23,6 @@ #include "launcher/ExpoLauncherIcon.h" #include "test_standalone_wm.h" -#include "unity-shared/UnitySettings.h" - using namespace unity; using namespace unity::launcher; @@ -33,7 +31,6 @@ struct TestExpoLauncherIcon : testing::Test { - unity::Settings settings; ExpoLauncherIcon icon; testwrapper::StandaloneWM wm; }; diff -Nru unity-7.1.2+14.04.20140303/tests/test_favorite_store_gsettings.cpp unity-7.2.4+14.04.20141217/tests/test_favorite_store_gsettings.cpp --- unity-7.1.2+14.04.20140303/tests/test_favorite_store_gsettings.cpp 2014-03-03 16:47:14.000000000 +0000 +++ unity-7.2.4+14.04.20141217/tests/test_favorite_store_gsettings.cpp 2014-12-17 20:51:37.000000000 +0000 @@ -23,7 +23,6 @@ #include #include -#include "test_utils.h" #include "FavoriteStore.h" #include "FavoriteStoreGSettings.h" @@ -77,20 +76,12 @@ virtual void SetUp() { - // set the data directory so gsettings can find the schema - Utils::init_gsettings_test_environment(); - favorite_store.reset(new internal::FavoriteStoreGSettings()); // Setting the test values gsettings_client = g_settings_new(SETTINGS_NAME); g_settings_set_strv(gsettings_client, SETTINGS_KEY, base_store_favs); } - - virtual void TearDown() - { - Utils::reset_gsettings_test_environment(); - } }; TEST_F(TestFavoriteStoreGSettings, TestAllocation) diff -Nru unity-7.1.2+14.04.20140303/tests/test_filter_widgets.cpp unity-7.2.4+14.04.20141217/tests/test_filter_widgets.cpp --- unity-7.1.2+14.04.20140303/tests/test_filter_widgets.cpp 2014-03-03 16:47:14.000000000 +0000 +++ unity-7.2.4+14.04.20141217/tests/test_filter_widgets.cpp 2014-12-17 20:51:37.000000000 +0000 @@ -24,7 +24,6 @@ #include #include "test_filter_multirange.h" #include "unity-shared/DashStyle.h" -#include "unity-shared/UnitySettings.h" #include #include @@ -113,7 +112,6 @@ FALSE); } - Settings unity_settings_; dash::Style dash_style_; glib::Object model_; diff -Nru unity-7.1.2+14.04.20140303/tests/test-gestures/LockScreenControllerMock.h unity-7.2.4+14.04.20141217/tests/test-gestures/LockScreenControllerMock.h --- unity-7.1.2+14.04.20140303/tests/test-gestures/LockScreenControllerMock.h 1970-01-01 00:00:00.000000000 +0000 +++ unity-7.2.4+14.04.20141217/tests/test-gestures/LockScreenControllerMock.h 2014-12-17 20:51:37.000000000 +0000 @@ -0,0 +1,43 @@ +// -*- Mode: C++; indent-tabs-mode: nil; tab-width: 2 -*- +/* + * Copyright (C) 2014 Canonical Ltd + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 3 as + * published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + * Authored by: Andrea Azzarone + */ + +#ifndef LOCK_SCREEN_CONTROLLER_MOCK_H +#define LOCK_SCREEN_CONTROLLER_MOCK_H + +#include + +namespace unity +{ +namespace lockscreen +{ + +class ControllerMock +{ +public: + typedef std::shared_ptr Ptr; + + bool IsLocked() { + return false; + } +}; + +} +} + +#endif \ No newline at end of file diff -Nru unity-7.1.2+14.04.20140303/tests/test-gestures/sed_script_switcher unity-7.2.4+14.04.20141217/tests/test-gestures/sed_script_switcher --- unity-7.1.2+14.04.20140303/tests/test-gestures/sed_script_switcher 2014-03-03 16:47:14.000000000 +0000 +++ unity-7.2.4+14.04.20141217/tests/test-gestures/sed_script_switcher 2014-12-17 20:51:37.000000000 +0000 @@ -19,8 +19,10 @@ s|\|NuxMock.h|g s|\|CompTimerMock|g s|\|LauncherControllerMock|g +s|\|LockControllerMock|g s|\|SwitcherControllerMock|g s|\|switcher\:\:ControllerMock|g +s|\|lockscreen\:\:ControllerMock|g s|\|launcher\:\:ControllerMock|g /SwitcherView\.h/d s|\|SwitcherViewMock|g diff -Nru unity-7.1.2+14.04.20140303/tests/test-gestures/unityshell_mock.h unity-7.2.4+14.04.20141217/tests/test-gestures/unityshell_mock.h --- unity-7.1.2+14.04.20140303/tests/test-gestures/unityshell_mock.h 2014-03-03 16:47:14.000000000 +0000 +++ unity-7.2.4+14.04.20141217/tests/test-gestures/unityshell_mock.h 2014-12-17 20:51:37.000000000 +0000 @@ -6,7 +6,7 @@ #include #include "SwitcherControllerMock.h" - +#include "LockScreenControllerMock.h" namespace unity { @@ -29,6 +29,7 @@ UnityScreenMock() { switcher_controller_ = std::make_shared(); + lockscreen_controller_ = std::make_shared(); Reset(); } @@ -59,7 +60,13 @@ return switcher_controller_; } + lockscreen::ControllerMock::Ptr lockscreen_controller() + { + return lockscreen_controller_; + } + switcher::ControllerMock::Ptr switcher_controller_; + lockscreen::ControllerMock::Ptr lockscreen_controller_; int SetUpAndShowSwitcher_count_; }; diff -Nru unity-7.1.2+14.04.20140303/tests/test_gnome_session_manager.cpp unity-7.2.4+14.04.20141217/tests/test_gnome_session_manager.cpp --- unity-7.1.2+14.04.20140303/tests/test_gnome_session_manager.cpp 2014-03-03 16:47:14.000000000 +0000 +++ unity-7.2.4+14.04.20141217/tests/test_gnome_session_manager.cpp 2014-12-17 20:51:37.000000000 +0000 @@ -37,13 +37,16 @@ const std::string SHELL_OBJECT_PATH = "/org/gnome/SessionManager/EndSessionDialog"; const std::string UPOWER_PATH = "/org/freedesktop/UPower"; -const std::string LOGIND_PATH = "/org/freedesktop/login1"; +const std::string LOGIND_MANAGER_PATH = "/org/freedesktop/login1"; +const std::string LOGIND_SESSION_PATH = "/org/freedesktop/login1/session/id0"; const std::string CONSOLE_KIT_PATH = "/org/freedesktop/ConsoleKit/Manager"; -const std::string SCREEN_SAVER_PATH = "/org/gnome/ScreenSaver"; const std::string SESSION_MANAGER_PATH = "/org/gnome/SessionManager"; const std::string SESSION_OPTIONS = "com.canonical.indicator.session"; const std::string SUPPRESS_DIALOGS_KEY = "suppress-logout-restart-shutdown"; + +const std::string GNOME_LOCKDOWN_OPTIONS = "org.gnome.desktop.lockdown"; +const std::string DISABLE_LOCKSCREEN_KEY = "disable-lock-screen"; } namespace introspection @@ -62,7 +65,7 @@ )"; -const std::string LOGIND = +const std::string LOGIND_MANAGER = R"( @@ -89,6 +92,14 @@ )"; +const std::string LOGIND_SESSION = +R"( + + + + +)"; + const std::string CONSOLE_KIT = R"( @@ -100,14 +111,6 @@ )"; -const std::string SCREEN_SAVER = -R"( - - - - -)"; - const std::string SESSION_MANAGER = R"( @@ -134,8 +137,6 @@ { static void SetUpTestCase() { - Utils::init_gsettings_test_environment(); - can_shutdown_ = (g_random_int() % 2) ? true : false; can_suspend_ = (g_random_int() % 2) ? true : false; can_hibernate_ = (g_random_int() % 2) ? true : false; @@ -162,7 +163,8 @@ }); logind_ = std::make_shared(); - logind_->AddObjects(introspection::LOGIND, LOGIND_PATH); + logind_->AddObjects(introspection::LOGIND_MANAGER, LOGIND_MANAGER_PATH); + logind_->AddObjects(introspection::LOGIND_SESSION, LOGIND_SESSION_PATH); logind_->GetObjects().front()->SetMethodsCallsHandler([&] (std::string const& method, GVariant*) -> GVariant* { if (method == "CanSuspend") { @@ -181,9 +183,6 @@ console_kit_ = std::make_shared(); console_kit_->AddObjects(introspection::CONSOLE_KIT, CONSOLE_KIT_PATH); - screen_saver_ = std::make_shared(); - screen_saver_->AddObjects(introspection::SCREEN_SAVER, SCREEN_SAVER_PATH); - session_manager_ = std::make_shared(); session_manager_->AddObjects(introspection::SESSION_MANAGER, SESSION_MANAGER_PATH); session_manager_->GetObjects().front()->SetMethodsCallsHandler([&] (std::string const& method, GVariant*) -> GVariant* { @@ -215,7 +214,6 @@ Utils::WaitUntilMSec([] { return upower_->IsConnected(); }); Utils::WaitUntilMSec([] { return logind_->IsConnected(); }); Utils::WaitUntilMSec([] { return console_kit_->IsConnected(); }); - Utils::WaitUntilMSec([] { return screen_saver_->IsConnected(); }); Utils::WaitUntilMSec([] { return session_manager_->IsConnected(); }); Utils::WaitUntilMSec([] { return shell_proxy_->IsConnected();}); ASSERT_TRUE(shell_proxy_->IsConnected()); @@ -249,8 +247,6 @@ static void TearDownTestCase() { - Utils::reset_gsettings_test_environment(); - bool cancelled = false; bool closed = false; shell_proxy_->Connect("Canceled", [&cancelled] (GVariant*) { cancelled = true; }); @@ -267,7 +263,6 @@ upower_.reset(); logind_.reset(); console_kit_.reset(); - screen_saver_.reset(); session_manager_.reset(); } @@ -299,6 +294,12 @@ g_settings_set_boolean(setting, SUPPRESS_DIALOGS_KEY.c_str(), enable ? FALSE : TRUE); } + void DisableScreenLocking(bool disable) + { + glib::Object setting(g_settings_new(GNOME_LOCKDOWN_OPTIONS.c_str())); + g_settings_set_boolean(setting, DISABLE_LOCKSCREEN_KEY.c_str(), disable ? TRUE : FALSE); + } + enum class Action : unsigned { LOGOUT = 0, @@ -327,7 +328,6 @@ static DBusServer::Ptr upower_; static DBusServer::Ptr console_kit_; static DBusServer::Ptr logind_; - static DBusServer::Ptr screen_saver_; static DBusServer::Ptr session_manager_; static DBusProxy::Ptr shell_proxy_; }; @@ -336,7 +336,6 @@ DBusServer::Ptr TestGnomeSessionManager::upower_; DBusServer::Ptr TestGnomeSessionManager::console_kit_; DBusServer::Ptr TestGnomeSessionManager::logind_; -DBusServer::Ptr TestGnomeSessionManager::screen_saver_; DBusServer::Ptr TestGnomeSessionManager::session_manager_; DBusProxy::Ptr TestGnomeSessionManager::shell_proxy_; bool TestGnomeSessionManager::can_shutdown_; @@ -375,31 +374,17 @@ TEST_F(TestGnomeSessionManager, LockScreen) { - bool lock_called = false; - bool simulate_activity_called = false; - - screen_saver_->GetObjects().front()->SetMethodsCallsHandler([&] (std::string const& method, GVariant*) -> GVariant* { - if (method == "Lock") - { - lock_called = true; - EXPECT_FALSE(simulate_activity_called); - } - else if (method == "SimulateUserActivity") - { - simulate_activity_called = true; - EXPECT_TRUE(lock_called); - } + bool lock_emitted = false; - return nullptr; + manager->lock_requested.connect([&lock_emitted]() + { + lock_emitted = true; }); manager->LockScreen(); - Utils::WaitUntilMSec(lock_called); - EXPECT_TRUE(lock_called); - - Utils::WaitUntilMSec(simulate_activity_called); - EXPECT_TRUE(simulate_activity_called); + Utils::WaitUntilMSec(lock_emitted); + EXPECT_TRUE(lock_emitted); } TEST_F(TestGnomeSessionManager, Logout) @@ -1004,4 +989,51 @@ EXPECT_TRUE(closed); } +TEST_F(TestGnomeSessionManager, DISABLED_LogindLock) +{ + bool lock_emitted = false; + + manager->lock_requested.connect([&lock_emitted]() + { + lock_emitted = true; + }); + + logind_->GetObject("org.freedesktop.login1.Session")->EmitSignal("Lock"); + + Utils::WaitUntilMSec(lock_emitted); + EXPECT_TRUE(lock_emitted); +} + +TEST_F(TestGnomeSessionManager, LogindUnLock) +{ + bool unlock_emitted = false; + + manager->unlock_requested.connect([&unlock_emitted]() + { + unlock_emitted = true; + }); + + logind_->GetObject("org.freedesktop.login1.Session")->EmitSignal("Unlock"); + + Utils::WaitUntilMSec(unlock_emitted); + EXPECT_TRUE(unlock_emitted); +} + +TEST_F(TestGnomeSessionManager, NoLockWhenLockingDisabled) +{ + bool lock_emitted = false; + + manager->lock_requested.connect([&lock_emitted]() + { + lock_emitted = true; + }); + + DisableScreenLocking(true); + + manager->LockScreen(); + EXPECT_FALSE(lock_emitted); + + DisableScreenLocking(false); +} + } // Namespace diff -Nru unity-7.1.2+14.04.20140303/tests/test_gsettings_scopes.cpp unity-7.2.4+14.04.20141217/tests/test_gsettings_scopes.cpp --- unity-7.1.2+14.04.20140303/tests/test_gsettings_scopes.cpp 2014-03-03 16:47:14.000000000 +0000 +++ unity-7.2.4+14.04.20141217/tests/test_gsettings_scopes.cpp 2014-12-17 20:51:37.000000000 +0000 @@ -52,7 +52,6 @@ public: TestGSettingsScopes():scope_added(0),scope_removed(0),scopes_reordered(0) {} - virtual ~TestGSettingsScopes() {} virtual void SetUp() { Utils::init_gsettings_test_environment(); } virtual void TearDown() { Utils::reset_gsettings_test_environment(); } diff -Nru unity-7.1.2+14.04.20140303/tests/test_hud_button.cpp unity-7.2.4+14.04.20141217/tests/test_hud_button.cpp --- unity-7.1.2+14.04.20140303/tests/test_hud_button.cpp 2014-03-03 16:47:14.000000000 +0000 +++ unity-7.2.4+14.04.20141217/tests/test_hud_button.cpp 2014-12-17 20:51:37.000000000 +0000 @@ -28,7 +28,6 @@ #include "hud/HudButton.h" #include "unity-shared/DashStyle.h" #include "unity-shared/StaticCairoText.h" -#include "unity-shared/UnitySettings.h" using namespace unity; @@ -37,7 +36,6 @@ TEST(TestHudButton, TestLabelOpacity) { - Settings unity_settings; dash::Style dash_style; nux::ObjectPtr button(new hud::HudButton()); nux::Layout* layout = button->GetLayout(); diff -Nru unity-7.1.2+14.04.20140303/tests/test_hud_controller.cpp unity-7.2.4+14.04.20141217/tests/test_hud_controller.cpp --- unity-7.1.2+14.04.20140303/tests/test_hud_controller.cpp 2014-03-03 16:47:14.000000000 +0000 +++ unity-7.2.4+14.04.20141217/tests/test_hud_controller.cpp 2014-12-17 20:51:37.000000000 +0000 @@ -27,7 +27,6 @@ #include "mock-base-window.h" #include "unity-shared/DashStyle.h" #include "unity-shared/PanelStyle.h" -#include "unity-shared/UnitySettings.h" #include "unity-shared/WindowManager.h" #include "test_utils.h" using namespace unity; @@ -74,7 +73,6 @@ protected: // required to create hidden secret global variables - Settings unity_settings_; dash::Style dash_style_; panel::Style panel_style_; diff -Nru unity-7.1.2+14.04.20140303/tests/test_hud_launcher_icon.cpp unity-7.2.4+14.04.20141217/tests/test_hud_launcher_icon.cpp --- unity-7.1.2+14.04.20140303/tests/test_hud_launcher_icon.cpp 2014-03-03 16:47:14.000000000 +0000 +++ unity-7.2.4+14.04.20141217/tests/test_hud_launcher_icon.cpp 2014-12-17 20:51:37.000000000 +0000 @@ -21,7 +21,6 @@ #include "HudLauncherIcon.h" -#include "unity-shared/UnitySettings.h" using namespace unity; using namespace unity::launcher; @@ -39,7 +38,6 @@ struct TestHudLauncherIcon : testing::Test { - unity::Settings settings; MockHudLauncherIcon hud; }; diff -Nru unity-7.1.2+14.04.20140303/tests/test_hud_view.cpp unity-7.2.4+14.04.20141217/tests/test_hud_view.cpp --- unity-7.1.2+14.04.20140303/tests/test_hud_view.cpp 2014-03-03 16:47:14.000000000 +0000 +++ unity-7.2.4+14.04.20141217/tests/test_hud_view.cpp 2014-12-17 20:51:37.000000000 +0000 @@ -31,7 +31,6 @@ #include "hud/HudView.h" #include "unity-shared/DashStyle.h" #include "unity-shared/PanelStyle.h" -#include "unity-shared/UnitySettings.h" using namespace unity; @@ -40,7 +39,6 @@ TEST(TestHudView, TestSetQueries) { - Settings unity_settings; dash::Style dash_style; panel::Style panel_style; nux::ObjectPtr view(new hud::View()); diff -Nru unity-7.1.2+14.04.20140303/tests/test_launcher_controller.cpp unity-7.2.4+14.04.20141217/tests/test_launcher_controller.cpp --- unity-7.1.2+14.04.20140303/tests/test_launcher_controller.cpp 2014-03-03 16:47:36.000000000 +0000 +++ unity-7.2.4+14.04.20141217/tests/test_launcher_controller.cpp 2014-12-17 20:51:37.000000000 +0000 @@ -33,7 +33,6 @@ #include "VolumeLauncherIcon.h" #include "SoftwareCenterLauncherIcon.h" #include "PanelStyle.h" -#include "UnitySettings.h" #include "UBusMessages.h" #include "logger_helper.h" #include "test_utils.h" @@ -41,7 +40,8 @@ #include "test_mock_devices.h" #include "test_mock_filemanager.h" #include "mock-application.h" - +#include "BamfApplicationManager.h" +#include "bamf-mock-application.h" using namespace testmocks; using namespace unity::launcher; @@ -278,7 +278,6 @@ std::shared_ptr logger_output_; MockUScreen uscreen; - Settings settings; panel::Style panel_style; MockFavoriteStore favorite_store; MockXdndManager::Ptr xdnd_manager_; @@ -1954,4 +1953,34 @@ EXPECT_TRUE(favorite_store.IsFavorite(icon_uri)); } +TEST_F(TestLauncherController, IconShowsOnQuickApplicationReopen) +{ + MockApplicationManager mock_manager; + unity::glib::Object bamf_mock_application(bamf_mock_application_new()); + ApplicationPtr app(new unity::bamf::Application(mock_manager, unity::glib::object_cast(bamf_mock_application))); + + MockApplicationLauncherIcon::Ptr our_icon; + + mock_manager.Default().application_started.emit(app); + + app->title.changed.emit("Hello"); + auto app_icons = lc.Impl()->model_->GetSublist(); + + for (auto const& icon : app_icons) + { + if (icon->tooltip_text() == "Hello") + { + our_icon = icon; + break; + } + } + ASSERT_TRUE(our_icon); + EXPECT_FALSE(our_icon->removed); + + app->closed.emit(); + app->running.changed(true); + Utils::WaitForTimeout(2); + + EXPECT_FALSE(our_icon->removed); +} } diff -Nru unity-7.1.2+14.04.20140303/tests/test_launcher.cpp unity-7.2.4+14.04.20141217/tests/test_launcher.cpp --- unity-7.1.2+14.04.20140303/tests/test_launcher.cpp 2014-03-03 16:47:36.000000000 +0000 +++ unity-7.2.4+14.04.20141217/tests/test_launcher.cpp 2014-12-17 20:51:37.000000000 +0000 @@ -29,7 +29,6 @@ #include "launcher/MockLauncherIcon.h" #include "launcher/Launcher.h" #include "unity-shared/PanelStyle.h" -#include "unity-shared/UnitySettings.h" #include "unity-shared/IconRenderer.h" #include "unity-shared/UBusMessages.h" #include "test_standalone_wm.h" @@ -187,7 +186,6 @@ return icons; } - Settings settings; panel::Style panel_style; MockUScreen uscreen; testwrapper::StandaloneWM WM; diff -Nru unity-7.1.2+14.04.20140303/tests/test_launcher_icon.cpp unity-7.2.4+14.04.20141217/tests/test_launcher_icon.cpp --- unity-7.1.2+14.04.20140303/tests/test_launcher_icon.cpp 2014-03-03 16:47:14.000000000 +0000 +++ unity-7.2.4+14.04.20141217/tests/test_launcher_icon.cpp 2014-12-17 20:51:37.000000000 +0000 @@ -21,7 +21,6 @@ #include #include "LauncherIcon.h" -#include "UnitySettings.h" using namespace unity; using namespace unity::launcher; @@ -71,7 +70,6 @@ nux::NuxTimerTickSource tick_source_; nux::animation::AnimationController animation_controller; unsigned animations_tick_; - unity::Settings settings; MockLauncherIcon icon; }; diff -Nru unity-7.1.2+14.04.20140303/tests/test_launcher_minimize_speed.cpp unity-7.2.4+14.04.20141217/tests/test_launcher_minimize_speed.cpp --- unity-7.1.2+14.04.20140303/tests/test_launcher_minimize_speed.cpp 2014-03-03 16:47:14.000000000 +0000 +++ unity-7.2.4+14.04.20141217/tests/test_launcher_minimize_speed.cpp 2014-12-17 20:51:37.000000000 +0000 @@ -22,7 +22,6 @@ #include #include -#include "test_utils.h" #include "plugins/unityshell/src/WindowMinimizeSpeedController.h" @@ -36,19 +35,12 @@ { public: glib::Object mSettings; - WindowMinimizeSpeedController* mController; - + std::shared_ptr mController; + /* override */ void SetUp() { - Utils::init_gsettings_test_environment(); mSettings = g_settings_new("com.canonical.Unity"); - mController = new WindowMinimizeSpeedController(); - } - - /* override */ void TearDown() - { - Utils::reset_gsettings_test_environment(); - delete mController; + mController = std::make_shared(); } }; diff -Nru unity-7.1.2+14.04.20140303/tests/test_launcher_tooltip.cpp unity-7.2.4+14.04.20141217/tests/test_launcher_tooltip.cpp --- unity-7.1.2+14.04.20140303/tests/test_launcher_tooltip.cpp 2014-03-03 16:47:14.000000000 +0000 +++ unity-7.2.4+14.04.20141217/tests/test_launcher_tooltip.cpp 2014-12-17 20:51:37.000000000 +0000 @@ -25,7 +25,6 @@ #include "unity-shared/StaticCairoText.h" #include "launcher/Tooltip.h" -#include #include "test_utils.h" namespace unity @@ -73,7 +72,6 @@ protected: TestTooltip() : Test() { - Settings settings; tooltip = new TooltipMock(); } diff -Nru unity-7.1.2+14.04.20140303/tests/test_layout_system.cpp unity-7.2.4+14.04.20141217/tests/test_layout_system.cpp --- unity-7.1.2+14.04.20140303/tests/test_layout_system.cpp 2014-03-03 16:47:14.000000000 +0000 +++ unity-7.2.4+14.04.20141217/tests/test_layout_system.cpp 2014-12-17 20:51:37.000000000 +0000 @@ -57,6 +57,7 @@ EXPECT_EQ(lwin.geo, fake_window->geo); EXPECT_EQ(lwin.decoration_height, 0); EXPECT_EQ(lwin.selected, false); + EXPECT_FLOAT_EQ(lwin.scale, 1.0f); EXPECT_EQ(lwin.aspect_ratio, fake_window->geo().width / static_cast(fake_window->geo().height)); } diff -Nru unity-7.1.2+14.04.20140303/tests/test_lockscreen_controller.cpp unity-7.2.4+14.04.20141217/tests/test_lockscreen_controller.cpp --- unity-7.1.2+14.04.20140303/tests/test_lockscreen_controller.cpp 1970-01-01 00:00:00.000000000 +0000 +++ unity-7.2.4+14.04.20141217/tests/test_lockscreen_controller.cpp 2014-12-17 20:51:54.000000000 +0000 @@ -0,0 +1,262 @@ +// -*- Mode: C++; indent-tabs-mode: nil; tab-width: 2 -*- +/* +* Copyright (C) 2014 Canonical Ltd +* +* This program is free software: you can redistribute it and/or modify +* it under the terms of the GNU General Public License version 3 as +* published by the Free Software Foundation. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with this program. If not, see . +* +* Authored by: Andrea Azzarone +*/ + +#include +using namespace testing; + +#include "lockscreen/UserPromptView.h" +#include "lockscreen/LockScreenController.h" + +#include +#include +#include + + +#include "lockscreen/LockScreenSettings.h" +#include "lockscreen/ScreenSaverDBusManager.h" +#include "unity-shared/DashStyle.h" +#include "unity-shared/PanelStyle.h" +#include "unity-shared/UScreen.h" +#include "test_mock_session_manager.h" +#include "test_uscreen_mock.h" +#include "test_utils.h" + +namespace unity +{ +namespace lockscreen +{ +namespace +{ + +const unsigned ANIMATION_DURATION = 400 * 1000; // in microseconds +const unsigned BLANK_ANIMATION_DURATION = 10000 * 1000; +const unsigned TICK_DURATION = 10 * 1000; + +} + + +struct MockShield : AbstractShield +{ + MockShield() + : AbstractShield(nullptr, nullptr, nullptr, nux::ObjectPtr(), 0, false) + {} + + MOCK_CONST_METHOD0(IsIndicatorOpen, bool()); + MOCK_METHOD0(ActivatePanel, void()); + MOCK_CONST_METHOD0(HasGrab, bool()); +}; + +struct ShieldFactoryMock : ShieldFactoryInterface +{ + nux::ObjectPtr CreateShield(session::Manager::Ptr const&, + indicator::Indicators::Ptr const&, + Accelerators::Ptr const&, + nux::ObjectPtr const&, + int, bool) override + { + return nux::ObjectPtr(new MockShield()); + } +}; + +struct TestLockScreenController : Test +{ + TestLockScreenController() + : animation_controller(tick_source) + , session_manager(std::make_shared>()) + , dbus_manager(std::make_shared(session_manager)) + , upstart_wrapper(std::make_shared()) + , shield_factory(std::make_shared()) + , controller(dbus_manager, session_manager, upstart_wrapper, shield_factory) + {} + + struct ControllerWrap : Controller + { + ControllerWrap(DBusManager::Ptr const& dbus_manager, + session::Manager::Ptr const& session_manager, + UpstartWrapper::Ptr const& upstart_wrapper, + ShieldFactoryInterface::Ptr const& shield_factory) + : Controller(dbus_manager, session_manager, upstart_wrapper, shield_factory, /* test_mode */ true) + {} + + using Controller::shields_; + using Controller::blank_window_; + }; + + nux::NuxTimerTickSource tick_source; + nux::animation::AnimationController animation_controller; + + MockUScreen uscreen; + unity::dash::Style dash_style; + unity::panel::Style panel_style; + unity::lockscreen::Settings lockscreen_settings; + session::MockManager::Ptr session_manager; + DBusManager::Ptr dbus_manager; + unity::UpstartWrapper::Ptr upstart_wrapper; + + ShieldFactoryMock::Ptr shield_factory; + ControllerWrap controller; +}; + +TEST_F(TestLockScreenController, Construct) +{ + EXPECT_TRUE(controller.shields_.empty()); +} + +TEST_F(TestLockScreenController, DisconnectUScreenSignalsOnDestruction) +{ + size_t before = uscreen.changed.size(); + { + Controller dummy(dbus_manager, session_manager); + } + ASSERT_EQ(before, uscreen.changed.size()); + + std::vector monitors; + uscreen.changed.emit(0, monitors); +} + +TEST_F(TestLockScreenController, DisconnectSessionManagerSignalsOnDestruction) +{ + size_t before = session_manager->unlock_requested.size(); + { + Controller dummy(dbus_manager, session_manager); + } + ASSERT_EQ(before, session_manager->unlock_requested.size()); + + session_manager->unlock_requested.emit(); +} + +TEST_F(TestLockScreenController, UScreenChangedIgnoredOnScreenUnlocked) +{ + uscreen.SetupFakeMultiMonitor(/*primary*/ 0, /*emit_change*/ true); + EXPECT_TRUE(controller.shields_.empty()); +} + +TEST_F(TestLockScreenController, LockScreenOnSingleMonitor) +{ + session_manager->lock_requested.emit(); + + Utils::WaitUntilMSec([this]{ return controller.shields_.size() == 1; }); + Utils::WaitUntilMSec([this]{ return uscreen.GetMonitors().at(0) == controller.shields_.at(0)->GetGeometry(); }); +} + +TEST_F(TestLockScreenController, LockScreenOnMultiMonitor) +{ + uscreen.SetupFakeMultiMonitor(); + + session_manager->lock_requested.emit(); + + Utils::WaitUntilMSec([this]{ return controller.shields_.size() == monitors::MAX; }); + ASSERT_EQ(monitors::MAX, controller.shields_.size()); + + for (unsigned int i=0; i < monitors::MAX; ++i) + { + Utils::WaitUntilMSec([this, i]{ return uscreen.GetMonitors().at(i) == controller.shields_.at(i)->GetGeometry(); }); + EXPECT_EQ(uscreen.GetMonitors().at(i), controller.shields_.at(i)->GetAbsoluteGeometry()); + } +} + +TEST_F(TestLockScreenController, SwitchToMultiMonitor) +{ + session_manager->lock_requested.emit(); + + Utils::WaitUntilMSec([this]{ return controller.shields_.size() == 1; }); + ASSERT_EQ(1, controller.shields_.size()); + + Utils::WaitUntilMSec([this]{ return uscreen.GetMonitors().at(0) == controller.shields_.at(0)->GetGeometry(); }); + EXPECT_EQ(uscreen.GetMonitors().at(0), controller.shields_.at(0)->GetGeometry()); + + uscreen.SetupFakeMultiMonitor(/* primary */ 0, /* emit_change */ true); + ASSERT_EQ(monitors::MAX, controller.shields_.size()); + + for (unsigned int i=0; i < monitors::MAX; ++i) + { + ASSERT_EQ(uscreen.GetMonitors().at(i), controller.shields_.at(i)->GetAbsoluteGeometry()); + } +} + +TEST_F(TestLockScreenController, SwitchToSingleMonitor) +{ + uscreen.SetupFakeMultiMonitor(/* primary */ 0, /* emit_change */ true); + session_manager->lock_requested.emit(); + + Utils::WaitUntilMSec([this]{ return controller.shields_.size() == monitors::MAX; }); + ASSERT_EQ(monitors::MAX, controller.shields_.size()); + + for (unsigned int i=0; i < monitors::MAX; ++i) + { + Utils::WaitUntilMSec([this, i]{ return uscreen.GetMonitors().at(i) == controller.shields_.at(i)->GetGeometry(); }); + ASSERT_EQ(uscreen.GetMonitors().at(i), controller.shields_.at(i)->GetAbsoluteGeometry()); + } + + uscreen.Reset(/* emit_change */ true); + + ASSERT_EQ(1, controller.shields_.size()); + EXPECT_EQ(uscreen.GetMonitors().at(0), controller.shields_.at(0)->GetGeometry()); +} + +TEST_F(TestLockScreenController, UnlockScreenOnSingleMonitor) +{ + session_manager->lock_requested.emit(); + + Utils::WaitUntilMSec([this]{ return controller.shields_.size() == 1; }); + ASSERT_EQ(1, controller.shields_.size()); + + session_manager->unlock_requested.emit(); + tick_source.tick(ANIMATION_DURATION); + + EXPECT_TRUE(controller.shields_.empty()); +} + +TEST_F(TestLockScreenController, UnlockScreenOnMultiMonitor) +{ + uscreen.SetupFakeMultiMonitor(/* primary */ 0, /* emit_change */ true); + session_manager->lock_requested.emit(); + + Utils::WaitUntilMSec([this]{ return controller.shields_.size() == monitors::MAX; }); + ASSERT_EQ(monitors::MAX, controller.shields_.size()); + + session_manager->unlock_requested.emit(); + tick_source.tick(ANIMATION_DURATION); + + EXPECT_TRUE(controller.shields_.empty()); +} + +TEST_F(TestLockScreenController, ShieldHasGrabAfterBlank) +{ + + // Lock... + session_manager->lock_requested.emit(); + Utils::WaitUntilMSec([this]{ return controller.shields_.size() == 1; }); + ASSERT_EQ(1, controller.shields_.size()); + + // ...and let the screen blank. + session_manager->presence_status_changed.emit(true); + tick_source.tick(BLANK_ANIMATION_DURATION); + + ASSERT_TRUE(controller.blank_window_->GetOpacity() == 1.0); + ASSERT_TRUE(controller.blank_window_->OwnsPointerGrab()); + + // Wake the screen + dbus_manager->simulate_activity.emit(); + + EXPECT_TRUE(controller.shields_.at(0)->OwnsPointerGrab()); +} + +} // lockscreen +} // unity diff -Nru unity-7.1.2+14.04.20140303/tests/test_main.cpp unity-7.2.4+14.04.20141217/tests/test_main.cpp --- unity-7.1.2+14.04.20140303/tests/test_main.cpp 2014-03-03 16:47:14.000000000 +0000 +++ unity-7.2.4+14.04.20141217/tests/test_main.cpp 2014-12-17 20:51:37.000000000 +0000 @@ -7,7 +7,7 @@ #include "logger_helper.h" #include "test_utils.h" - +#include "UnitySettings.h" int main(int argc, char** argv) { @@ -22,6 +22,7 @@ gtk_init(&argc, &argv); setlocale(LC_ALL, "C"); + unity::Settings settings; nux::NuxInitialize(0); std::unique_ptr win_thread(nux::CreateNuxWindow("Tests", diff -Nru unity-7.1.2+14.04.20140303/tests/test_main_xless.cpp unity-7.2.4+14.04.20141217/tests/test_main_xless.cpp --- unity-7.1.2+14.04.20140303/tests/test_main_xless.cpp 2014-03-03 16:47:14.000000000 +0000 +++ unity-7.2.4+14.04.20141217/tests/test_main_xless.cpp 2014-12-17 20:51:54.000000000 +0000 @@ -3,18 +3,17 @@ #include #include #include - +#include "test_utils.h" const gchar* LOCAL_DATA_DIR = BUILDDIR"/tests/data:/usr/share"; int main(int argc, char** argv) { ::testing::InitGoogleTest(&argc, argv); -#if G_ENCODE_VERSION (GLIB_MAJOR_VERSION, GLIB_MINOR_VERSION) <= GLIB_VERSION_2_34 - g_type_init(); -#endif - setlocale(LC_ALL, "C"); + setlocale(LC_ALL, "C"); + g_setenv("LC_ALL", "C", TRUE); + Utils::init_gsettings_test_environment(); g_setenv("XDG_DATA_DIRS", LOCAL_DATA_DIR, TRUE); // Slightly higher as we're more likely to test things we know will fail diff -Nru unity-7.1.2+14.04.20140303/tests/test_mock_session_manager.h unity-7.2.4+14.04.20141217/tests/test_mock_session_manager.h --- unity-7.1.2+14.04.20140303/tests/test_mock_session_manager.h 2014-03-03 16:47:14.000000000 +0000 +++ unity-7.2.4+14.04.20141217/tests/test_mock_session_manager.h 2014-12-17 20:51:37.000000000 +0000 @@ -31,8 +31,12 @@ MOCK_CONST_METHOD0(RealName, std::string()); MOCK_CONST_METHOD0(UserName, std::string()); + MOCK_CONST_METHOD0(HostName, std::string()); + MOCK_METHOD0(ScreenSaverActivate, void()); + MOCK_METHOD0(ScreenSaverDeactivate, void()); MOCK_METHOD0(LockScreen, void()); + MOCK_METHOD0(PromptLockScreen, void()); MOCK_METHOD0(Logout, void()); MOCK_METHOD0(Reboot, void()); MOCK_METHOD0(Shutdown, void()); @@ -40,9 +44,11 @@ MOCK_METHOD0(Hibernate, void()); MOCK_METHOD0(CancelAction, void()); + MOCK_CONST_METHOD0(CanLock, bool()); MOCK_CONST_METHOD0(CanShutdown, bool()); MOCK_CONST_METHOD0(CanSuspend, bool()); MOCK_CONST_METHOD0(CanHibernate, bool()); + MOCK_CONST_METHOD0(HasInhibitors, bool()); }; } // session diff -Nru unity-7.1.2+14.04.20140303/tests/test_panel_controller.cpp unity-7.2.4+14.04.20141217/tests/test_panel_controller.cpp --- unity-7.1.2+14.04.20140303/tests/test_panel_controller.cpp 2014-03-03 16:47:36.000000000 +0000 +++ unity-7.2.4+14.04.20141217/tests/test_panel_controller.cpp 2014-12-17 20:51:37.000000000 +0000 @@ -22,7 +22,6 @@ #include "PanelController.h" #include "PanelStyle.h" #include "PanelView.h" -#include "UnitySettings.h" #include "mock_menu_manager.h" #include "test_uscreen_mock.h" #include "launcher/LauncherOptions.h" @@ -43,7 +42,6 @@ } MockUScreen uscreen; - Settings settings; Style panel_style; menu::MockManager::Ptr menus; ui::EdgeBarrierController::Ptr edge_barriers; diff -Nru unity-7.1.2+14.04.20140303/tests/test_panel_indicator_entry_dropdown_view.cpp unity-7.2.4+14.04.20141217/tests/test_panel_indicator_entry_dropdown_view.cpp --- unity-7.1.2+14.04.20140303/tests/test_panel_indicator_entry_dropdown_view.cpp 2014-03-03 16:47:14.000000000 +0000 +++ unity-7.2.4+14.04.20141217/tests/test_panel_indicator_entry_dropdown_view.cpp 2014-12-17 20:51:37.000000000 +0000 @@ -23,7 +23,6 @@ #include #include "PanelIndicatorEntryDropdownView.h" #include "PanelStyle.h" -#include "UnitySettings.h" #include "mock_indicators.h" #include "test_standalone_wm.h" @@ -67,7 +66,6 @@ return PanelIndicatorEntryView::Ptr(new PanelIndicatorEntryView(entry)); } - Settings settings_; Style style_; MockIndicators::Ptr indicators_; PanelIndicatorEntryDropdownView dropdown; diff -Nru unity-7.1.2+14.04.20140303/tests/test_panel_indicators_view.cpp unity-7.2.4+14.04.20141217/tests/test_panel_indicators_view.cpp --- unity-7.1.2+14.04.20140303/tests/test_panel_indicators_view.cpp 2014-03-03 16:47:14.000000000 +0000 +++ unity-7.2.4+14.04.20141217/tests/test_panel_indicators_view.cpp 2014-12-17 20:51:37.000000000 +0000 @@ -24,7 +24,6 @@ #include #include "PanelIndicatorsView.h" #include "PanelStyle.h" -#include "UnitySettings.h" #include "mock_indicators.h" namespace unity @@ -52,7 +51,6 @@ struct TestPanelIndicatorsView : testing::Test { - Settings settings_; Style style_; testing::NiceMock indicators; }; diff -Nru unity-7.1.2+14.04.20140303/tests/test_panel_menu_view.cpp unity-7.2.4+14.04.20141217/tests/test_panel_menu_view.cpp --- unity-7.1.2+14.04.20140303/tests/test_panel_menu_view.cpp 2014-03-03 16:47:14.000000000 +0000 +++ unity-7.2.4+14.04.20141217/tests/test_panel_menu_view.cpp 2014-12-17 20:51:37.000000000 +0000 @@ -21,7 +21,6 @@ #include #include "PanelMenuView.h" #include "PanelStyle.h" -#include "UnitySettings.h" #include "UBusMessages.h" #include "mock_menu_manager.h" #include "test_standalone_wm.h" @@ -78,7 +77,6 @@ // The order is important, i.e. menu_view needs // panel::Style that needs Settings MockUScreen uscreen; - Settings settings; panel::Style panelStyle; testwrapper::StandaloneWM WM; testing::NiceMock menu_view; diff -Nru unity-7.1.2+14.04.20140303/tests/test_panel_style.cpp unity-7.2.4+14.04.20141217/tests/test_panel_style.cpp --- unity-7.1.2+14.04.20140303/tests/test_panel_style.cpp 2014-03-03 16:47:36.000000000 +0000 +++ unity-7.2.4+14.04.20141217/tests/test_panel_style.cpp 2014-12-17 20:51:37.000000000 +0000 @@ -25,8 +25,6 @@ #include #include "unity-shared/PanelStyle.h" -#include "unity-shared/UnitySettings.h" -#include "test_utils.h" #include "MultiMonitor.h" @@ -42,23 +40,15 @@ { public: glib::Object gsettings; - Settings unity_settings; std::unique_ptr panel_style_instance; /* override */ void SetUp() { - Utils::init_gsettings_test_environment(); - gsettings = g_settings_new("org.gnome.desktop.wm.preferences"); g_settings_set_string(gsettings, "titlebar-font", TITLEBAR_FONT.c_str()); panel_style_instance.reset(new panel::Style()); } - - /* override */ void TearDown() - { - Utils::reset_gsettings_test_environment(); - } }; TEST_F(TestPanelStyle, TestGetFontDescription) @@ -80,7 +70,7 @@ sleep(1); ASSERT_TRUE(signal_received); - ASSERT_EQ(panel_style_instance->GetFontDescription(panel::PanelItem::TITLE), "Ubuntu Italic 11"); + ASSERT_EQ(panel_style_instance->GetFontDescription(panel::PanelItem::TITLE), "Ubuntu Italic 11"); g_settings_set_string(gsettings, "titlebar-font", old_font); g_free (old_font); diff -Nru unity-7.1.2+14.04.20140303/tests/test_panel_view.cpp unity-7.2.4+14.04.20141217/tests/test_panel_view.cpp --- unity-7.1.2+14.04.20140303/tests/test_panel_view.cpp 2014-03-03 16:47:14.000000000 +0000 +++ unity-7.2.4+14.04.20141217/tests/test_panel_view.cpp 2014-12-17 20:51:37.000000000 +0000 @@ -25,7 +25,6 @@ #include "unity-shared/PanelStyle.h" #include "unity-shared/UBusMessages.h" #include "unity-shared/UBusWrapper.h" -#include "unity-shared/UnitySettings.h" #include "mock_menu_manager.h" #include "test_standalone_wm.h" @@ -39,7 +38,6 @@ class TestPanelView : public testing::Test { public: - Settings unity_settings_; Style panel_style_; UBusManager ubus_manager_; nux::ObjectPtr window_; diff -Nru unity-7.1.2+14.04.20140303/tests/test_places_group.cpp unity-7.2.4+14.04.20141217/tests/test_places_group.cpp --- unity-7.1.2+14.04.20140303/tests/test_places_group.cpp 2014-03-03 16:47:14.000000000 +0000 +++ unity-7.2.4+14.04.20141217/tests/test_places_group.cpp 2014-12-17 20:51:37.000000000 +0000 @@ -40,18 +40,18 @@ } MOCK_METHOD2(FocusOverlay, nux::AbstractPaintLayer*(int width, int height)); - MOCK_METHOD0(GetCategoryBackground, nux::BaseTexture*()); - MOCK_METHOD0(GetCategoryBackgroundNoFilters, nux::BaseTexture*()); + MOCK_CONST_METHOD0(GetCategoryBackground, nux::ObjectPtr const&()); + MOCK_CONST_METHOD0(GetCategoryBackgroundNoFilters, nux::ObjectPtr const&()); - MOCK_METHOD0(GetGroupExpandIcon, nux::BaseTexture*()); - MOCK_METHOD0(GetGroupUnexpandIcon, nux::BaseTexture*()); + MOCK_CONST_METHOD0(GetGroupExpandIcon, nux::ObjectPtr const&()); + MOCK_CONST_METHOD0(GetGroupUnexpandIcon, nux::ObjectPtr const&()); - MOCK_CONST_METHOD0(GetCategoryIconSize, int()); - MOCK_CONST_METHOD0(GetCategoryHeaderLeftPadding, int()); + MOCK_CONST_METHOD0(GetCategoryIconSize, RawPixel()); + MOCK_CONST_METHOD0(GetCategoryHeaderLeftPadding, RawPixel()); - MOCK_CONST_METHOD0(GetPlacesGroupTopSpace, int()); - MOCK_CONST_METHOD0(GetPlacesGroupResultTopPadding, int()); - MOCK_CONST_METHOD0(GetPlacesGroupResultLeftPadding, int()); + MOCK_CONST_METHOD0(GetPlacesGroupTopSpace, RawPixel()); + MOCK_CONST_METHOD0(GetPlacesGroupResultTopPadding, RawPixel()); + MOCK_CONST_METHOD0(GetPlacesGroupResultLeftPadding, RawPixel()); nux::ObjectPtr base_texture_; }; @@ -72,23 +72,32 @@ ON_CALL(dash_style_, FocusOverlay(_, _)) .WillByDefault(Return(new nux::ColorLayer(nux::color::White))); - ON_CALL(dash_style_, GetCategoryBackground()) - .WillByDefault(Return(dash_style_.base_texture_.GetPointer())); + ON_CALL(Const(dash_style_), GetCategoryBackground()) + .WillByDefault(ReturnRef(dash_style_.base_texture_)); - ON_CALL(dash_style_, GetCategoryBackgroundNoFilters()) - .WillByDefault(Return(dash_style_.base_texture_.GetPointer())); + ON_CALL(Const(dash_style_), GetCategoryBackgroundNoFilters()) + .WillByDefault(ReturnRef(dash_style_.base_texture_)); - ON_CALL(dash_style_, GetGroupExpandIcon()) - .WillByDefault(Return(dash_style_.base_texture_.GetPointer())); + ON_CALL(Const(dash_style_), GetGroupExpandIcon()) + .WillByDefault(ReturnRef(dash_style_.base_texture_)); - ON_CALL(dash_style_, GetGroupUnexpandIcon()) - .WillByDefault(Return(dash_style_.base_texture_.GetPointer())); + ON_CALL(Const(dash_style_), GetGroupUnexpandIcon()) + .WillByDefault(ReturnRef(dash_style_.base_texture_)); ON_CALL(dash_style_, GetCategoryHeaderLeftPadding()) - .WillByDefault(Return(19)); + .WillByDefault(Return(19_em)); ON_CALL(dash_style_, GetPlacesGroupTopSpace()) - .WillByDefault(Return(7)); + .WillByDefault(Return(7_em)); + + ON_CALL(dash_style_, GetCategoryIconSize()) + .WillByDefault(Return(0_em)); + + ON_CALL(dash_style_, GetPlacesGroupResultTopPadding()) + .WillByDefault(Return(0_em)); + + ON_CALL(dash_style_, GetPlacesGroupResultLeftPadding()) + .WillByDefault(Return(0_em)); } NiceMock dash_style_; diff -Nru unity-7.1.2+14.04.20140303/tests/test_previews_application.cpp unity-7.2.4+14.04.20141217/tests/test_previews_application.cpp --- unity-7.1.2+14.04.20140303/tests/test_previews_application.cpp 2014-03-03 16:47:14.000000000 +0000 +++ unity-7.2.4+14.04.20141217/tests/test_previews_application.cpp 2014-12-17 20:51:37.000000000 +0000 @@ -27,7 +27,6 @@ #include #include #include -#include "unity-shared/UnitySettings.h" #include #include "UnityCore/ApplicationPreview.h" @@ -99,7 +98,6 @@ nux::ObjectPtr parent_window_; dash::Preview::Ptr preview_model_; - unity::Settings settings; previews::Style panel_style; dash::Style dash_style; ThumbnailGenerator thumbnail_generator; diff -Nru unity-7.1.2+14.04.20140303/tests/test_previews_generic.cpp unity-7.2.4+14.04.20141217/tests/test_previews_generic.cpp --- unity-7.1.2+14.04.20140303/tests/test_previews_generic.cpp 2014-03-03 16:47:14.000000000 +0000 +++ unity-7.2.4+14.04.20141217/tests/test_previews_generic.cpp 2014-12-17 20:51:37.000000000 +0000 @@ -27,7 +27,6 @@ #include #include #include -#include "unity-shared/UnitySettings.h" #include #include "UnityCore/GenericPreview.h" @@ -86,7 +85,6 @@ nux::ObjectPtr parent_window_; dash::Preview::Ptr preview_model_; - unity::Settings settings; previews::Style panel_style; dash::Style dash_style; ThumbnailGenerator thumbnail_generator; diff -Nru unity-7.1.2+14.04.20140303/tests/test_previews_movie.cpp unity-7.2.4+14.04.20141217/tests/test_previews_movie.cpp --- unity-7.1.2+14.04.20140303/tests/test_previews_movie.cpp 2014-03-03 16:47:14.000000000 +0000 +++ unity-7.2.4+14.04.20141217/tests/test_previews_movie.cpp 2014-12-17 20:51:37.000000000 +0000 @@ -27,7 +27,6 @@ #include #include #include -#include "unity-shared/UnitySettings.h" #include #include "UnityCore/MoviePreview.h" @@ -94,7 +93,6 @@ nux::ObjectPtr parent_window_; dash::Preview::Ptr preview_model_; - unity::Settings settings; previews::Style panel_style; dash::Style dash_style; ThumbnailGenerator thumbnail_generator; diff -Nru unity-7.1.2+14.04.20140303/tests/test_previews_music.cpp unity-7.2.4+14.04.20141217/tests/test_previews_music.cpp --- unity-7.1.2+14.04.20140303/tests/test_previews_music.cpp 2014-03-03 16:47:14.000000000 +0000 +++ unity-7.2.4+14.04.20141217/tests/test_previews_music.cpp 2014-12-17 20:51:37.000000000 +0000 @@ -27,7 +27,6 @@ #include #include #include -#include "unity-shared/UnitySettings.h" #include #include "UnityCore/MusicPreview.h" @@ -89,7 +88,6 @@ nux::ObjectPtr parent_window_; dash::Preview::Ptr preview_model_; - unity::Settings settings; previews::Style panel_style; dash::Style dash_style; ThumbnailGenerator thumbnail_generator; diff -Nru unity-7.1.2+14.04.20140303/tests/test_previews_music_payment.cpp unity-7.2.4+14.04.20141217/tests/test_previews_music_payment.cpp --- unity-7.1.2+14.04.20140303/tests/test_previews_music_payment.cpp 2014-03-03 16:47:14.000000000 +0000 +++ unity-7.2.4+14.04.20141217/tests/test_previews_music_payment.cpp 2014-12-17 20:51:54.000000000 +0000 @@ -21,13 +21,13 @@ #include #include +#include #include #include #include #include #include #include -#include "unity-shared/UnitySettings.h" #include #include "dash/previews/MusicPaymentPreview.h" @@ -125,7 +125,6 @@ UnityProtocolPreviewPaymentType preview_type; // needed for styles - unity::Settings settings; dash::Style dash_style; }; diff -Nru unity-7.1.2+14.04.20140303/tests/test_previews_payment.cpp unity-7.2.4+14.04.20141217/tests/test_previews_payment.cpp --- unity-7.1.2+14.04.20140303/tests/test_previews_payment.cpp 2014-03-03 16:47:14.000000000 +0000 +++ unity-7.2.4+14.04.20141217/tests/test_previews_payment.cpp 2014-12-17 20:51:37.000000000 +0000 @@ -28,7 +28,6 @@ #include #include #include -#include "unity-shared/UnitySettings.h" #include #include "dash/previews/PaymentPreview.h" @@ -146,9 +145,7 @@ dash::Preview::Ptr preview_model; // needed for styles - unity::Settings settings; dash::Style dash_style; - }; TEST_F(TestPaymentPreview, GetHeaderCallsCorrectMethods) @@ -159,7 +156,7 @@ ON_CALL(*preview.GetPointer(), GetPrice()).WillByDefault(Return(new nux::VLayout())); EXPECT_CALL(*preview.GetPointer(), GetPrice()).Times(1); - preview->GetHeader(); + preview->GetHeader()->UnReference(); } TEST_F(TestPaymentPreview, SetupViewsCallCorrectMethods) diff -Nru unity-7.1.2+14.04.20140303/tests/test_previews_social.cpp unity-7.2.4+14.04.20141217/tests/test_previews_social.cpp --- unity-7.1.2+14.04.20140303/tests/test_previews_social.cpp 2014-03-03 16:47:14.000000000 +0000 +++ unity-7.2.4+14.04.20141217/tests/test_previews_social.cpp 2014-12-17 20:51:37.000000000 +0000 @@ -27,7 +27,6 @@ #include #include #include -#include "unity-shared/UnitySettings.h" #include #include "UnityCore/SocialPreview.h" @@ -84,7 +83,6 @@ nux::ObjectPtr parent_window_; dash::Preview::Ptr preview_model_; - unity::Settings settings; previews::Style panel_style; dash::Style dash_style; ThumbnailGenerator thumbnail_generator; diff -Nru unity-7.1.2+14.04.20140303/tests/test_quicklist_manager.cpp unity-7.2.4+14.04.20141217/tests/test_quicklist_manager.cpp --- unity-7.1.2+14.04.20140303/tests/test_quicklist_manager.cpp 2014-03-03 16:47:14.000000000 +0000 +++ unity-7.2.4+14.04.20141217/tests/test_quicklist_manager.cpp 2014-12-17 20:51:37.000000000 +0000 @@ -24,7 +24,6 @@ #include "launcher/QuicklistManager.h" #include "launcher/QuicklistView.h" -#include "unity-shared/UnitySettings.h" namespace { @@ -44,7 +43,6 @@ TEST(TestQuicklistManager, RegisterQuicklist) { - unity::Settings unity_settings; nux::ObjectWeakPtr ptr; { diff -Nru unity-7.1.2+14.04.20140303/tests/test_quicklist_view.cpp unity-7.2.4+14.04.20141217/tests/test_quicklist_view.cpp --- unity-7.1.2+14.04.20140303/tests/test_quicklist_view.cpp 2014-03-03 16:47:14.000000000 +0000 +++ unity-7.2.4+14.04.20141217/tests/test_quicklist_view.cpp 2014-12-17 20:51:37.000000000 +0000 @@ -26,7 +26,6 @@ #include "QuicklistMenuItemLabel.h" #include "QuicklistMenuItemRadio.h" #include "QuicklistMenuItemSeparator.h" -#include "unity-shared/UnitySettings.h" using namespace unity; using namespace testing; @@ -76,7 +75,6 @@ } } - unity::Settings unity_settings; nux::ObjectPtr quicklist; }; diff -Nru unity-7.1.2+14.04.20140303/tests/test_result_renderer.cpp unity-7.2.4+14.04.20141217/tests/test_result_renderer.cpp --- unity-7.1.2+14.04.20140303/tests/test_result_renderer.cpp 2014-03-03 16:47:14.000000000 +0000 +++ unity-7.2.4+14.04.20141217/tests/test_result_renderer.cpp 2014-12-17 20:51:37.000000000 +0000 @@ -23,7 +23,6 @@ #include #include "unity-shared/DashStyle.h" -#include "unity-shared/UnitySettings.h" #include "UnityCore/GTKWrapper.h" #include "UnityCore/Result.h" #include "dash/ResultRendererTile.h" @@ -72,7 +71,6 @@ public: TestResultRenderer() {} - unity::Settings settings; dash::Style style; }; diff -Nru unity-7.1.2+14.04.20140303/tests/test_scope_bar.cpp unity-7.2.4+14.04.20141217/tests/test_scope_bar.cpp --- unity-7.1.2+14.04.20140303/tests/test_scope_bar.cpp 2014-03-03 16:47:14.000000000 +0000 +++ unity-7.2.4+14.04.20141217/tests/test_scope_bar.cpp 2014-12-17 20:51:37.000000000 +0000 @@ -22,7 +22,6 @@ #include #include "unity-shared/DashStyle.h" -#include "unity-shared/UnitySettings.h" #include "test_mock_scope.h" namespace unity @@ -42,7 +41,6 @@ EXPECT_EQ(scope_bar.icons_.size(), size); } - unity::Settings settings; dash::Style style; }; diff -Nru unity-7.1.2+14.04.20140303/tests/test_scope_view.cpp unity-7.2.4+14.04.20141217/tests/test_scope_view.cpp --- unity-7.1.2+14.04.20140303/tests/test_scope_view.cpp 2014-03-03 16:47:14.000000000 +0000 +++ unity-7.2.4+14.04.20141217/tests/test_scope_view.cpp 2014-12-17 20:51:37.000000000 +0000 @@ -22,7 +22,6 @@ #include #include #include -#include #include #include "MockCategories.h" @@ -77,7 +76,6 @@ , scope_view_(new FakeScopeView(scope_)) {} - unity::Settings settings; dash::Style style; MockScopeData::Ptr scope_data_; MockScope::Ptr scope_; diff -Nru unity-7.1.2+14.04.20140303/tests/test_searchbar.cpp unity-7.2.4+14.04.20141217/tests/test_searchbar.cpp --- unity-7.1.2+14.04.20140303/tests/test_searchbar.cpp 2014-03-03 16:47:14.000000000 +0000 +++ unity-7.2.4+14.04.20141217/tests/test_searchbar.cpp 2014-12-17 20:51:37.000000000 +0000 @@ -21,7 +21,6 @@ #include #include #include -#include #include "test_utils.h" using namespace unity; @@ -34,7 +33,6 @@ public: TestSearchBar() {} - unity::Settings settings; dash::Style style; }; diff -Nru unity-7.1.2+14.04.20140303/tests/test_session_controller.cpp unity-7.2.4+14.04.20141217/tests/test_session_controller.cpp --- unity-7.1.2+14.04.20140303/tests/test_session_controller.cpp 2014-03-03 16:47:14.000000000 +0000 +++ unity-7.2.4+14.04.20141217/tests/test_session_controller.cpp 2014-12-17 20:51:37.000000000 +0000 @@ -24,7 +24,6 @@ #include "SessionController.h" #include "UBusMessages.h" #include "UBusWrapper.h" -#include "UnitySettings.h" #include "WindowManager.h" #include "test_utils.h" @@ -42,6 +41,7 @@ , manager(std::make_shared>()) , controller(manager) { + ON_CALL(*manager, CanLock()).WillByDefault(testing::Return(true)); ON_CALL(*manager, CanShutdown()).WillByDefault(testing::Return(true)); } @@ -55,7 +55,6 @@ nux::NuxTimerTickSource tick_source; nux::animation::AnimationController animation_controller; - unity::Settings settings; MockManager::Ptr manager ; ControllerWrap controller; }; @@ -107,7 +106,8 @@ tick_source.tick(ANIMATION_DURATION); EXPECT_FALSE(controller.Visible()); - EXPECT_FALSE(controller.view_->live_background()); + EXPECT_FALSE(controller.view_window_.IsValid()); + EXPECT_FALSE(controller.view_.IsValid()); } struct Inhibited : TestSessionController, testing::WithParamInterface {}; diff -Nru unity-7.1.2+14.04.20140303/tests/test_session_view.cpp unity-7.2.4+14.04.20141217/tests/test_session_view.cpp --- unity-7.1.2+14.04.20140303/tests/test_session_view.cpp 2014-03-03 16:47:14.000000000 +0000 +++ unity-7.2.4+14.04.20141217/tests/test_session_view.cpp 2014-12-17 20:51:37.000000000 +0000 @@ -21,7 +21,6 @@ #include "test_mock_session_manager.h" #include "SessionButton.h" #include "SessionView.h" -#include "UnitySettings.h" namespace unity { @@ -91,7 +90,6 @@ nux::GetWindowCompositor().SetKeyFocusArea(nullptr); } - unity::Settings settings; MockManager::Ptr manager; ViewWrap view; }; @@ -139,6 +137,7 @@ TEST_F(TestSessionView, FullModeButtons) { + ON_CALL(*manager, CanLock()).WillByDefault(testing::Return(true)); ON_CALL(*manager, CanShutdown()).WillByDefault(testing::Return(true)); ON_CALL(*manager, CanSuspend()).WillByDefault(testing::Return(true)); ON_CALL(*manager, CanHibernate()).WillByDefault(testing::Return(true)); @@ -168,6 +167,11 @@ view.mode.changed.emit(View::Mode::FULL); EXPECT_EQ(view.GetButtonByAction(Button::Action::HIBERNATE), nullptr); + + ON_CALL(*manager, CanLock()).WillByDefault(testing::Return(false)); + view.mode.changed.emit(View::Mode::FULL); + + EXPECT_EQ(view.GetButtonByAction(Button::Action::LOCK), nullptr); } TEST_F(TestSessionView, ShutdownModeButtons) @@ -183,6 +187,7 @@ TEST_F(TestSessionView, LogoutModeButtons) { + ON_CALL(*manager, CanLock()).WillByDefault(testing::Return(true)); view.mode = View::Mode::LOGOUT; EXPECT_EQ(view.GetButtons().size(), 2); @@ -191,6 +196,16 @@ EXPECT_EQ(view.key_focus_area(), view.GetButtonByAction(Button::Action::LOGOUT)); } +TEST_F(TestSessionView, LogoutLightModeButtons) +{ + ON_CALL(*manager, CanLock()).WillByDefault(testing::Return(false)); + view.mode = View::Mode::LOGOUT; + + EXPECT_EQ(view.GetButtons().size(), 1); + EXPECT_EQ(view.GetButtonPosition(Button::Action::LOGOUT), 0); + EXPECT_EQ(view.key_focus_area(), view.GetButtonByAction(Button::Action::LOGOUT)); +} + TEST_F(TestSessionView, FullModeTitle) { EXPECT_TRUE(view.GetTitle().empty()); @@ -215,8 +230,9 @@ { bool request_hide = false; view.request_hide.connect([&request_hide] { request_hide = true; }); + view.mode = View::Mode::LOGOUT; - auto button = view.GetButtonByAction(Button::Action::LOCK); + auto button = view.GetButtonByAction(Button::Action::LOGOUT); ASSERT_NE(button, nullptr); button->activated.emit(); @@ -225,7 +241,8 @@ TEST_F(TestSessionView, ButtonsActivateDeselectButton) { - auto button = view.GetButtonByAction(Button::Action::LOCK); + view.mode = View::Mode::LOGOUT; + auto button = view.GetButtonByAction(Button::Action::LOGOUT); ASSERT_NE(button, nullptr); button->highlighted = true; button->activated.emit(); @@ -235,6 +252,8 @@ TEST_F(TestSessionView, LockButtonActivateLocks) { + ON_CALL(*manager, CanLock()).WillByDefault(testing::Return(true)); + view.mode = View::Mode::LOGOUT; EXPECT_CALL(*manager, LockScreen()); auto button = view.GetButtonByAction(Button::Action::LOCK); ASSERT_NE(button, nullptr); diff -Nru unity-7.1.2+14.04.20140303/tests/test_shortcut_controller.cpp unity-7.2.4+14.04.20141217/tests/test_shortcut_controller.cpp --- unity-7.1.2+14.04.20140303/tests/test_shortcut_controller.cpp 2014-03-03 16:47:14.000000000 +0000 +++ unity-7.2.4+14.04.20141217/tests/test_shortcut_controller.cpp 2014-12-17 20:51:37.000000000 +0000 @@ -23,7 +23,6 @@ #include "shortcuts/BaseWindowRaiser.h" #include "shortcuts/ShortcutController.h" -#include "unity-shared/UnitySettings.h" #include "WindowManager.h" #include "UBusMessages.h" using namespace unity; @@ -68,6 +67,7 @@ MOCK_METHOD1(SetOpacity, void(double)); using Controller::GetOffsetPerMonitor; using Controller::ConstructView; + using Controller::OnShowTimer; using Controller::view_; void RealSetOpacity(double value) @@ -88,7 +88,6 @@ } MockUScreen uscreen; - Settings unity_settings; MockBaseWindowRaiser::Ptr base_window_raiser_; AbstractModeller::Ptr modeller_; NiceMock controller_; @@ -188,5 +187,49 @@ color_property.changed.emit(nux::color::RandomColor()); } +TEST_F(TestShortcutController, FirstRunFalse) +{ + ASSERT_FALSE(controller_.first_run()); + + controller_.ConstructView(); + EXPECT_FALSE(controller_.view_->closable()); +} + +TEST_F(TestShortcutController, FirstRunTrue) +{ + ASSERT_FALSE(controller_.first_run()); + + controller_.first_run = true; + controller_.ConstructView(); + EXPECT_TRUE(controller_.view_->closable()); +} + +TEST_F(TestShortcutController, UnsetFirstRunOnHide) +{ + controller_.first_run = true; + controller_.ConstructView(); + + ASSERT_TRUE(controller_.view_->closable()); + controller_.Show(); + controller_.OnShowTimer(); + tick_source_.tick(100 * 1000); + controller_.Hide(); + + EXPECT_FALSE(controller_.first_run()); + EXPECT_FALSE(controller_.view_->closable()); +} + +TEST_F(TestShortcutController, CloseRequestIsHandled) +{ + controller_.first_run = true; + controller_.ConstructView(); + controller_.Show(); + controller_.OnShowTimer(); + tick_source_.tick(100 * 1000); + controller_.view_->request_close.emit(); + + EXPECT_FALSE(controller_.Visible()); +} + } } diff -Nru unity-7.1.2+14.04.20140303/tests/test_shortcut_view.cpp unity-7.2.4+14.04.20141217/tests/test_shortcut_view.cpp --- unity-7.1.2+14.04.20140303/tests/test_shortcut_view.cpp 2014-03-03 16:47:14.000000000 +0000 +++ unity-7.2.4+14.04.20141217/tests/test_shortcut_view.cpp 2014-12-17 20:51:37.000000000 +0000 @@ -23,7 +23,6 @@ #include "ShortcutView.h" #include "ShortcutModel.h" #include "MockShortcutHint.h" -#include "UnitySettings.h" #include "LineSeparator.h" namespace unity @@ -54,7 +53,6 @@ return std::make_shared(hints); } - Settings settings; MockShortcutView view; }; diff -Nru unity-7.1.2+14.04.20140303/tests/test_single_monitor_launcher_icon.cpp unity-7.2.4+14.04.20141217/tests/test_single_monitor_launcher_icon.cpp --- unity-7.1.2+14.04.20140303/tests/test_single_monitor_launcher_icon.cpp 2014-03-03 16:47:14.000000000 +0000 +++ unity-7.2.4+14.04.20141217/tests/test_single_monitor_launcher_icon.cpp 2014-12-17 20:51:37.000000000 +0000 @@ -20,7 +20,6 @@ #include #include "SingleMonitorLauncherIcon.h" -#include "unity-shared/UnitySettings.h" using namespace unity; using namespace launcher; @@ -30,7 +29,6 @@ struct TestSingleMonitorLauncherIconMock : testing::Test { - unity::Settings settings; }; TEST_F(TestSingleMonitorLauncherIconMock, Construction) diff -Nru unity-7.1.2+14.04.20140303/tests/test_spread_filter.cpp unity-7.2.4+14.04.20141217/tests/test_spread_filter.cpp --- unity-7.1.2+14.04.20140303/tests/test_spread_filter.cpp 2014-03-03 16:47:14.000000000 +0000 +++ unity-7.2.4+14.04.20141217/tests/test_spread_filter.cpp 2014-12-17 20:51:37.000000000 +0000 @@ -23,7 +23,6 @@ #include #include "SpreadFilter.h" -#include "UnitySettings.h" #include "DashStyle.h" #include "test_utils.h" @@ -64,7 +63,6 @@ tick_source.tick(big_tick_); } - Settings settings_; dash::Style style_; nux::NuxTimerTickSource tick_source; nux::animation::AnimationController animation_controller; diff -Nru unity-7.1.2+14.04.20140303/tests/test_switcher_controller.cpp unity-7.2.4+14.04.20141217/tests/test_switcher_controller.cpp --- unity-7.1.2+14.04.20140303/tests/test_switcher_controller.cpp 2014-03-03 16:47:14.000000000 +0000 +++ unity-7.2.4+14.04.20141217/tests/test_switcher_controller.cpp 2014-12-17 20:51:37.000000000 +0000 @@ -83,27 +83,27 @@ { controller_->Show(ShowMode::ALL, SortMode::LAUNCHER_ORDER, icons_); controller_->InitiateDetail(); - EXPECT_TRUE(controller_->IsDetailViewShown()); + EXPECT_TRUE(controller_->detail()); auto const& view = controller_->GetView(); view->switcher_stop_detail.emit(); - EXPECT_FALSE(controller_->IsDetailViewShown()); + EXPECT_FALSE(controller_->detail()); view->switcher_start_detail.emit(); - EXPECT_TRUE(controller_->IsDetailViewShown()); + EXPECT_TRUE(controller_->detail()); } TEST_F(TestSwitcherController, StopDetailMode) { controller_->Show(ShowMode::ALL, SortMode::LAUNCHER_ORDER, icons_); controller_->InitiateDetail(); - EXPECT_TRUE(controller_->IsDetailViewShown()); + EXPECT_TRUE(controller_->detail()); auto const& view = controller_->GetView(); view->switcher_stop_detail.emit(); - EXPECT_FALSE(controller_->IsDetailViewShown()); + EXPECT_FALSE(controller_->detail()); } TEST_F(TestSwitcherController, StartDetailModeMovesNextRows) @@ -117,7 +117,7 @@ model->SetRowSizes({2,2}); view->switcher_start_detail.emit(); - EXPECT_TRUE(controller_->IsDetailViewShown()); + EXPECT_TRUE(controller_->detail()); view->switcher_start_detail.emit(); @@ -137,7 +137,7 @@ auto const& view = controller_->GetView(); view->switcher_start_detail.emit(); - EXPECT_TRUE(controller_->IsDetailViewShown()); + EXPECT_TRUE(controller_->detail()); auto model = view->GetModel(); model->SetRowSizes({2,2}); @@ -153,7 +153,7 @@ // Now we are in index 0, stoping detail mode must exit detail mode view->switcher_stop_detail.emit(); - EXPECT_FALSE(controller_->IsDetailViewShown()); + EXPECT_FALSE(controller_->detail()); } TEST_F(TestSwitcherController, ShowSwitcher) diff -Nru unity-7.1.2+14.04.20140303/tests/test_switcher_controller.h unity-7.2.4+14.04.20141217/tests/test_switcher_controller.h --- unity-7.1.2+14.04.20140303/tests/test_switcher_controller.h 2014-03-03 16:47:14.000000000 +0000 +++ unity-7.2.4+14.04.20141217/tests/test_switcher_controller.h 2014-12-17 20:51:37.000000000 +0000 @@ -31,7 +31,6 @@ #include "SwitcherController.h" #include "SwitcherView.h" #include "TimeUtil.h" -#include "unity-shared/UnitySettings.h" #include "mock-base-window.h" #include "test_standalone_wm.h" @@ -92,9 +91,6 @@ protected: TestSwitcherController(); - // required to create hidden secret global variables before test objects - unity::Settings unity_settings_; - unity::testwrapper::StandaloneWM WM; nux::animation::TickSource tick_source_; nux::animation::AnimationController animation_controller_; diff -Nru unity-7.1.2+14.04.20140303/tests/test_switcher_controller_slow.cpp unity-7.2.4+14.04.20141217/tests/test_switcher_controller_slow.cpp --- unity-7.1.2+14.04.20140303/tests/test_switcher_controller_slow.cpp 2014-03-03 16:47:14.000000000 +0000 +++ unity-7.2.4+14.04.20141217/tests/test_switcher_controller_slow.cpp 2014-12-17 20:51:37.000000000 +0000 @@ -107,8 +107,8 @@ EXPECT_EQ(controller_->GetCurrentSelection().window_, 0); // Manually open-close the detail mode before that the timeout has occurred - controller_->SetDetail(true); - controller_->SetDetail(false); + controller_->detail = true; + controller_->detail = false; Utils::WaitForTimeoutMSec(initial_details_timeout * 1.1); EXPECT_EQ(controller_->GetCurrentSelection().window_, 0); diff -Nru unity-7.1.2+14.04.20140303/tests/test_switcher_view.cpp unity-7.2.4+14.04.20141217/tests/test_switcher_view.cpp --- unity-7.1.2+14.04.20140303/tests/test_switcher_view.cpp 2014-03-03 16:47:14.000000000 +0000 +++ unity-7.2.4+14.04.20141217/tests/test_switcher_view.cpp 2014-12-17 20:51:37.000000000 +0000 @@ -24,8 +24,6 @@ #include "SwitcherView.h" #include "MockLauncherIcon.h" #include "test_standalone_wm.h" -#include "unity-shared/IconRenderer.h" -#include "unity-shared/UnitySettings.h" namespace unity { @@ -42,6 +40,13 @@ WindowList windows_; }; + struct MockIconRenderer : ui::AbstractIconRenderer + { + MOCK_METHOD2(PreprocessIcons, void(std::list&, nux::Geometry const&)); + MOCK_METHOD4(RenderIcon, void(nux::GraphicsEngine&, ui::RenderArg const&, nux::Geometry const&, nux::Geometry const&)); + MOCK_METHOD3(SetTargetSize, void(int tile_size, int image_size, int spacing)); + }; + int rand_coord() { return g_random_int_range(1, 1024); } } @@ -49,6 +54,10 @@ { struct MockSwitcherView : SwitcherView { + MockSwitcherView() + : SwitcherView(std::make_shared>()) + {} + MOCK_METHOD0(QueueDraw, void()); double GetCurrentProgress() const { return animation_.GetCurrentValue(); } @@ -93,7 +102,6 @@ } testwrapper::StandaloneWM WM; - unity::Settings settings; testing::NiceMock switcher; }; @@ -109,8 +117,7 @@ EXPECT_EQ(switcher.vertical_size, switcher.tile_size + VERTICAL_PADDING * 2); EXPECT_EQ(switcher.text_size, 15); EXPECT_EQ(switcher.animation_length, 250); - EXPECT_EQ(switcher.monitor, -1); - EXPECT_EQ(switcher.spread_size, 3.5f); + EXPECT_EQ(switcher.monitor, 0); ASSERT_NE(switcher.text_view_, nullptr); ASSERT_NE(switcher.icon_renderer_, nullptr); EXPECT_EQ(switcher.icon_renderer_->pip_style, ui::OVER_TILE); diff -Nru unity-7.1.2+14.04.20140303/tests/test_text_input.cpp unity-7.2.4+14.04.20141217/tests/test_text_input.cpp --- unity-7.1.2+14.04.20140303/tests/test_text_input.cpp 2014-03-03 16:47:14.000000000 +0000 +++ unity-7.2.4+14.04.20141217/tests/test_text_input.cpp 2014-12-17 20:51:54.000000000 +0000 @@ -22,6 +22,8 @@ #include +#include "unity-shared/DashStyle.h" +#include "unity-shared/StaticCairoText.h" #include "unity-shared/TextInput.h" #include "test_utils.h" @@ -33,7 +35,6 @@ class TextInputMock : public TextInput { public: - using TextInput::Init; using TextInput::OnInputHintChanged; using TextInput::OnMouseButtonDown; using TextInput::OnEndKeyFocus; @@ -50,11 +51,11 @@ TestTextInput() { entry = new TextInputMock(); - entry->Init(); hint = entry->GetHint(); pango_entry = entry->GetPangoEntry(); } + dash::Style dash_style_; nux::ObjectPtr entry; StaticCairoText* hint; IMTextEntry* pango_entry; diff -Nru unity-7.1.2+14.04.20140303/tests/test_unity_settings.cpp unity-7.2.4+14.04.20141217/tests/test_unity_settings.cpp --- unity-7.1.2+14.04.20140303/tests/test_unity_settings.cpp 2014-03-03 16:47:14.000000000 +0000 +++ unity-7.2.4+14.04.20141217/tests/test_unity_settings.cpp 2014-12-17 20:51:37.000000000 +0000 @@ -19,34 +19,46 @@ */ #include -#include +#include +#include "UnitySettings.h" #include "test_utils.h" -#include "unity-shared/UnitySettings.h" +#include #include namespace { +struct SigReceiver : sigc::trackable +{ + typedef testing::NiceMock Nice; + + SigReceiver(std::shared_ptr const& settings) + { + settings->form_factor.changed.connect(sigc::mem_fun(this, &SigReceiver::FormFactorChanged)); + } -class TestUnitySettings : public testing::Test + MOCK_CONST_METHOD1(FormFactorChanged, void(unity::FormFactor)); +}; + +struct TestUnitySettings : testing::Test { -public: unity::glib::Object gsettings; - std::unique_ptr unity_settings; + std::shared_ptr unity_settings; + SigReceiver::Nice sig_receiver; - void SetUp() + TestUnitySettings() + : gsettings(g_settings_new("com.canonical.Unity")) + , unity_settings(std::make_shared()) + , sig_receiver(unity_settings) { - Utils::init_gsettings_test_environment(); - gsettings = g_settings_new("com.canonical.Unity"); g_settings_set_enum(gsettings, "form-factor", static_cast(unity::FormFactor::DESKTOP)); - - unity_settings.reset(new unity::Settings); } - void TearDown() + ~TestUnitySettings() { - Utils::reset_gsettings_test_environment(); + sig_receiver.notify_callbacks(); + g_settings_reset(gsettings, "form-factor"); } }; @@ -60,7 +72,7 @@ TEST_F(TestUnitySettings, GetFormFactor) { - EXPECT_EQ(unity_settings->form_factor(), unity::FormFactor::DESKTOP); + ASSERT_NE(unity_settings->form_factor(), unity::FormFactor::NETBOOK); g_settings_set_enum(gsettings, "form-factor", static_cast(unity::FormFactor::NETBOOK)); EXPECT_EQ(unity_settings->form_factor(), unity::FormFactor::NETBOOK); @@ -68,42 +80,24 @@ TEST_F(TestUnitySettings, FormFactorChangedSignal_Extern) { - bool signal_received = false; - unity::FormFactor new_form_factor; - unity_settings->form_factor.changed.connect([&](unity::FormFactor form_factor) { - signal_received = true; - new_form_factor = form_factor; - }); + EXPECT_CALL(sig_receiver, FormFactorChanged(unity::FormFactor::NETBOOK)); g_settings_set_enum(gsettings, "form-factor", static_cast(unity::FormFactor::NETBOOK)); - Utils::WaitUntilMSec(signal_received); - EXPECT_EQ(new_form_factor, unity::FormFactor::NETBOOK); } TEST_F(TestUnitySettings, FormFactorChangedSignal_Extern_OtherKeys) { - bool signal_received = false; - unity_settings->form_factor.changed.connect([&](unity::FormFactor form_factor) { - signal_received = true; - }); + EXPECT_CALL(sig_receiver, FormFactorChanged(testing::_)).Times(0); g_settings_set_int(gsettings, "minimize-count", 0); Utils::WaitForTimeoutMSec(100); - EXPECT_FALSE(signal_received); } TEST_F(TestUnitySettings, FormFactorChangedSignal_Inter) { - bool signal_received = false; - unity::FormFactor new_form_factor; - unity_settings->form_factor.changed.connect([&](unity::FormFactor form_factor) { - signal_received = true; - new_form_factor = form_factor; - }); + EXPECT_CALL(sig_receiver, FormFactorChanged(unity::FormFactor::NETBOOK)); unity_settings->form_factor = unity::FormFactor::NETBOOK; - Utils::WaitUntilMSec(signal_received); - EXPECT_EQ(new_form_factor, unity::FormFactor::NETBOOK); } } diff -Nru unity-7.1.2+14.04.20140303/tests/test_unity_window_view.cpp unity-7.2.4+14.04.20141217/tests/test_unity_window_view.cpp --- unity-7.1.2+14.04.20140303/tests/test_unity_window_view.cpp 2014-03-03 16:47:14.000000000 +0000 +++ unity-7.2.4+14.04.20141217/tests/test_unity_window_view.cpp 2014-12-17 20:51:37.000000000 +0000 @@ -19,7 +19,6 @@ #include #include "UnityWindowView.h" -#include "UnitySettings.h" #include "WindowManager.h" #include @@ -51,7 +50,6 @@ nux::Geometry background_geo_; }; - Settings settings; testing::NiceMock view; }; @@ -84,10 +82,10 @@ view.closable = true; ASSERT_NE(view.close_button_, nullptr); - EXPECT_EQ(view.close_button_->texture(), view.style()->GetCloseIcon()); + EXPECT_EQ(view.close_button_->texture(), view.style()->GetTexture(view.scale, WindowTextureType::CLOSE_ICON)); EXPECT_EQ(view.close_button_->GetParentObject(), &view); - int padding = view.style()->GetCloseButtonPadding(); + int padding = view.style()->GetCloseButtonPadding(view.scale); EXPECT_EQ(view.close_button_->GetBaseX(), padding); EXPECT_EQ(view.close_button_->GetBaseY(), padding); } @@ -98,16 +96,16 @@ ASSERT_NE(view.close_button_, nullptr); view.close_button_->mouse_enter.emit(0, 0, 0, 0); - EXPECT_EQ(view.close_button_->texture(), view.style()->GetCloseIconHighligted()); + EXPECT_EQ(view.close_button_->texture(), view.style()->GetTexture(view.scale, WindowTextureType::CLOSE_ICON_HIGHLIGHTED)); view.close_button_->mouse_leave.emit(0, 0, 0, 0); - EXPECT_EQ(view.close_button_->texture(), view.style()->GetCloseIcon()); + EXPECT_EQ(view.close_button_->texture(), view.style()->GetTexture(view.scale, WindowTextureType::CLOSE_ICON)); view.close_button_->mouse_down.emit(0, 0, 0, 0); - EXPECT_EQ(view.close_button_->texture(), view.style()->GetCloseIconPressed()); + EXPECT_EQ(view.close_button_->texture(), view.style()->GetTexture(view.scale, WindowTextureType::CLOSE_ICON_PRESSED)); view.close_button_->mouse_up.emit(0, 0, 0, 0); - EXPECT_EQ(view.close_button_->texture(), view.style()->GetCloseIcon()); + EXPECT_EQ(view.close_button_->texture(), view.style()->GetTexture(view.scale, WindowTextureType::CLOSE_ICON)); } TEST_F(TestUnityWindowView, CloseButtonClicksRequestsClose) @@ -187,7 +185,7 @@ view.SetLayout(layout); view.ComputeContentSize(); - int offset = view.style()->GetInternalOffset(); + int offset = view.style()->GetInternalOffset(view.scale); EXPECT_EQ(layout->GetBaseX(), offset); EXPECT_EQ(layout->GetBaseY(), offset); } @@ -201,7 +199,7 @@ TEST_F(TestUnityWindowView, GetInternalBackground) { - int offset = view.style()->GetInternalOffset(); + int offset = view.style()->GetInternalOffset(view.scale); view.background_geo_.Set(g_random_int(), g_random_int(), g_random_int(), g_random_int()); EXPECT_EQ(view.GetInternalBackground(), view.background_geo_.GetExpand(-offset, -offset)); } @@ -242,4 +240,4 @@ } } // ui -} // unity \ No newline at end of file +} // unity diff -Nru unity-7.1.2+14.04.20140303/tests/test_upstart_wrapper.cpp unity-7.2.4+14.04.20141217/tests/test_upstart_wrapper.cpp --- unity-7.1.2+14.04.20140303/tests/test_upstart_wrapper.cpp 1970-01-01 00:00:00.000000000 +0000 +++ unity-7.2.4+14.04.20141217/tests/test_upstart_wrapper.cpp 2014-12-17 20:51:37.000000000 +0000 @@ -0,0 +1,90 @@ +// -*- Mode: C++; indent-tabs-mode: nil; tab-width: 2 -*- +/* +* Copyright (C) 2014 Canonical Ltd +* +* This program is free software: you can redistribute it and/or modify +* it under the terms of the GNU General Public License version 3 as +* published by the Free Software Foundation. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with this program. If not, see . +* +* Authored by: Andrea Azzarone +*/ + +#include +using namespace testing; + +#include "unity-shared/UpstartWrapper.h" + +#include +#include + +#include "test_utils.h" + +namespace +{ + +const std::string UPSTART = +R"( + + + + + + + + + + + + +)"; + +struct MockUpstartWrapper : unity::UpstartWrapper { + MockUpstartWrapper() + : UpstartWrapper(UpstartWrapper::TestMode()) + {} +}; + +struct TestUpstartWrapper : public Test +{ + TestUpstartWrapper() + { + upstart_server_ = std::make_shared("com.canonical.Unity.Test.Upstart"); + upstart_server_->AddObjects(UPSTART, "/com/ubuntu/Upstart"); + + Utils::WaitUntilMSec([this] { return upstart_server_->IsConnected(); }); + } + + unity::glib::DBusServer::Ptr upstart_server_; + MockUpstartWrapper upstart_wrapper_; +}; + + +TEST_F(TestUpstartWrapper, Emit) +{ + bool event_emitted = false; + + upstart_server_->GetObjects().front()->SetMethodsCallsHandler([&] (std::string const& method, GVariant* par) -> GVariant* { + if (method == "EmitEvent") + { + event_emitted = true; + + std::string event_name = glib::Variant(g_variant_get_child_value(par, 0)).GetString(); + EXPECT_EQ("desktop-lock", event_name); + } + + return nullptr; + }); + + upstart_wrapper_.Emit("desktop-lock"); + Utils::WaitUntil(event_emitted); +} + +} diff -Nru unity-7.1.2+14.04.20140303/tests/test_user_authenticator_pam.cpp unity-7.2.4+14.04.20141217/tests/test_user_authenticator_pam.cpp --- unity-7.1.2+14.04.20140303/tests/test_user_authenticator_pam.cpp 1970-01-01 00:00:00.000000000 +0000 +++ unity-7.2.4+14.04.20141217/tests/test_user_authenticator_pam.cpp 2014-12-17 20:51:37.000000000 +0000 @@ -0,0 +1,68 @@ +// -*- Mode: C++; indent-tabs-mode: nil; tab-width: 2 -*- +/* + * Copyright (C) 2013 Canonical Ltd + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 3 as + * published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + * Authored by: Andrea Azzarone + */ + +#include + +#include "lockscreen/UserAuthenticatorPam.h" +#include "test_utils.h" + +using unity::lockscreen::UserAuthenticatorPam; + +#include + +// Would be nice to build a testing pam module, but writing a +// pam_authenticate function here works just fine for the moment. +int pam_authenticate(pam_handle_t *pamh, int flags) +{ + pam_conv* conversation; + struct pam_message msg; + const struct pam_message *msgp; + + pam_get_item(pamh, PAM_CONV, (const void**) &conversation); + + msg.msg_style = PAM_PROMPT_ECHO_OFF; + msgp = &msg; + + pam_response* resp = nullptr; + conversation->conv(1, &msgp, &resp, conversation->appdata_ptr); + + return strcmp(resp[0].resp, "password"); +} + +int pam_acct_mgmt(pam_handle_t *pamh, int flags) +{ + return PAM_SUCCESS; +} + +int pam_setcred(pam_handle_t *pamh, int flags) +{ + return PAM_SUCCESS; +} + +namespace +{ + +struct TestUserAuthenticatorPam : public ::testing::Test +{ + UserAuthenticatorPam user_authenticator_pam_; +}; + +// FIXME (add tests) + +} diff -Nru unity-7.1.2+14.04.20140303/tests/test_utils.h unity-7.2.4+14.04.20141217/tests/test_utils.h --- unity-7.1.2+14.04.20140303/tests/test_utils.h 2014-03-03 16:47:14.000000000 +0000 +++ unity-7.2.4+14.04.20141217/tests/test_utils.h 2014-12-17 20:51:37.000000000 +0000 @@ -46,7 +46,7 @@ if (result == expected_result) g_source_remove(timeout_id); - EXPECT_EQ(result, expected_result) << (error_msg.empty() ? "" : ("Error: " + error_msg)); + EXPECT_EQ(expected_result, result) << (error_msg.empty() ? "" : ("Error: " + error_msg)); } static void WaitUntil(std::function const& check_function, bool result = true, unsigned max_wait = 1, std::string const& error_msg = "") diff -Nru unity-7.1.2+14.04.20140303/tests/test_volume_launcher_icon.cpp unity-7.2.4+14.04.20141217/tests/test_volume_launcher_icon.cpp --- unity-7.1.2+14.04.20140303/tests/test_volume_launcher_icon.cpp 2014-03-03 16:47:14.000000000 +0000 +++ unity-7.2.4+14.04.20141217/tests/test_volume_launcher_icon.cpp 2014-12-17 20:51:37.000000000 +0000 @@ -20,7 +20,6 @@ #include using namespace testing; -#include "unity-shared/UnitySettings.h" #include "DevicesSettings.h" #include "VolumeLauncherIcon.h" @@ -78,7 +77,6 @@ return *menuitem; } - unity::Settings u_settings_; MockVolume::Ptr volume_; MockDevicesSettings::Ptr settings_; MockDeviceNotificationDisplay::Ptr notifications_; diff -Nru unity-7.1.2+14.04.20140303/tests/test_window_buttons.cpp unity-7.2.4+14.04.20141217/tests/test_window_buttons.cpp --- unity-7.1.2+14.04.20140303/tests/test_window_buttons.cpp 2014-03-03 16:47:14.000000000 +0000 +++ unity-7.2.4+14.04.20141217/tests/test_window_buttons.cpp 2014-12-17 20:51:37.000000000 +0000 @@ -23,7 +23,6 @@ #include #include "PanelStyle.h" #include "test_standalone_wm.h" -#include "UnitySettings.h" #include "unity-shared/WindowButtons.h" #include "unity-shared/WindowButtonPriv.h" @@ -60,7 +59,6 @@ MOCK_METHOD0(QueueDraw, void()); }; - Settings settings; panel::Style panel_style; testing::NiceMock wbuttons; testwrapper::StandaloneWM wm; @@ -163,7 +161,6 @@ MOCK_METHOD0(QueueDraw, void()); }; - Settings settings; panel::Style panel_style; testing::NiceMock button; }; diff -Nru unity-7.1.2+14.04.20140303/tools/migration-scripts/02_unity_setup_text_scale_factor unity-7.2.4+14.04.20141217/tools/migration-scripts/02_unity_setup_text_scale_factor --- unity-7.1.2+14.04.20140303/tools/migration-scripts/02_unity_setup_text_scale_factor 1970-01-01 00:00:00.000000000 +0000 +++ unity-7.2.4+14.04.20141217/tools/migration-scripts/02_unity_setup_text_scale_factor 2014-12-17 20:51:37.000000000 +0000 @@ -0,0 +1,41 @@ +#!/usr/bin/python +# -*- coding: utf-8 -*- +# Copyright (C) 2014 Canonical +# +# Authors: +# Marco Trevisan +# +# This program is free software; you can redistribute it and/or modify it under +# the terms of the GNU General Public License as published by the Free Software +# Foundation; version 3. +# +# This program is distributed in the hope that it will be useful, but WITHOUTa +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more +# details. +# +# You should have received a copy of the GNU General Public License along with +# this program; if not, write to the Free Software Foundation, Inc., +# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +from gi.repository import Gio +import os,sys + +GNOME_UI_SETTINGS = "org.gnome.desktop.interface"; +GNOME_TEXT_SCALE_FACTOR = "text-scaling-factor"; + +UNITY_UI_SETTINGS = "com.canonical.Unity.Interface"; +UNITY_UI_SETTINGS_PATH = "/com/canonical/unity/interface/" +UNITY_TEXT_SCALE_FACTOR = "text-scale-factor"; + +if GNOME_UI_SETTINGS not in Gio.Settings.list_schemas(): + print("No gnome desktop interface schemas found, no migration needed") + sys.exit(0) + +text_scale_factor = Gio.Settings(schema=GNOME_UI_SETTINGS).get_double(GNOME_TEXT_SCALE_FACTOR) + +# gsettings doesn't work directly, the key is somewhat reverted. Work one level under then: dconf! +# Gio.Settings(schema=UNITY_UI_SETTINGS).set_int(UNITY_TEXT_SCALE_FACTOR, text_scale_factor) +from subprocess import Popen, PIPE, STDOUT +p = Popen(("dconf load "+UNITY_UI_SETTINGS_PATH).split(), stdout=PIPE, stdin=PIPE, stderr=STDOUT) +p.communicate(input="[/]\n"+UNITY_TEXT_SCALE_FACTOR+"={}".format(text_scale_factor).encode('utf-8')) diff -Nru unity-7.1.2+14.04.20140303/tools/migration-scripts/03_unity_first_run_stamp_move unity-7.2.4+14.04.20141217/tools/migration-scripts/03_unity_first_run_stamp_move --- unity-7.1.2+14.04.20140303/tools/migration-scripts/03_unity_first_run_stamp_move 1970-01-01 00:00:00.000000000 +0000 +++ unity-7.2.4+14.04.20141217/tools/migration-scripts/03_unity_first_run_stamp_move 2014-12-17 20:51:54.000000000 +0000 @@ -0,0 +1,35 @@ +#!/usr/bin/python +# -*- coding: utf-8 -*- +# Copyright (C) 2014 Canonical +# +# Authors: +# Brandon Schaefer +# +# This program is free software; you can redistribute it and/or modify it under +# the terms of the GNU General Public License as published by the Free Software +# Foundation; version 3. +# +# This program is distributed in the hope that it will be useful, but WITHOUTa +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more +# details. +# +# You should have received a copy of the GNU General Public License along with +# this program; if not, write to the Free Software Foundation, Inc., +# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +from gi.repository import GLib +from os import path, rename, mkdir + +old_first_run_path = GLib.get_user_cache_dir() + "/unity/first_run.stamp" +new_first_run_path = GLib.get_user_config_dir() + "/unity" + +# If we have the old first_run.stamp file, we must move it to the new location +if path.isfile(old_first_run_path): + + # make sure the new dir exists before attempting to move + if not path.isdir(new_first_run_path): + mkdir(new_first_run_path) + + new_first_run_path += "/first_run.stamp" + rename(old_first_run_path, new_first_run_path) diff -Nru unity-7.1.2+14.04.20140303/tools/unity.cmake unity-7.2.4+14.04.20141217/tools/unity.cmake --- unity-7.1.2+14.04.20140303/tools/unity.cmake 2014-03-03 16:47:14.000000000 +0000 +++ unity-7.2.4+14.04.20141217/tools/unity.cmake 2014-12-17 20:51:37.000000000 +0000 @@ -22,6 +22,7 @@ import glob from optparse import OptionParser import os +import re import shutil import signal import subprocess @@ -100,7 +101,19 @@ # kill a previous compiz if was there (this is a hack as compiz can # sometimes get stuck and not exit on --replace) - subprocess.call (["pkill", "-9", "compiz"]) + display = "DISPLAY=" + os.environ["DISPLAY"] + pids = [pid for pid in os.listdir("/proc") if pid.isdigit()] + + for pid in pids: + try: + pid_path = os.path.join("/proc", pid) + cmdline = open(os.path.join(pid_path, "cmdline"), "rb").read() + if re.match(r"^compiz\b", cmdline): + compiz_env = open(os.path.join(pid_path, "environ"), "rb").read() + if display in compiz_env: + subprocess.call (["kill", "-9", pid]) + except IOError: + continue # shell = True as it's the simpest way to | tee. # In this case, we need a string and not a list @@ -113,8 +126,9 @@ try: debug_mode = 2 if advanced_debug else 1 if debug else 0 + subprocess.call(["stop", "unity-panel-service"]) unity_instance = process_and_start_unity (verbose, debug_mode, compiz_path, compiz_args, log_file) - subprocess.Popen(["killall", "unity-panel-service"]) + subprocess.call(["start", "unity-panel-service"]) unity_instance.wait() except KeyboardInterrupt, e: try: diff -Nru unity-7.1.2+14.04.20140303/UnityCore/DBusIndicators.cpp unity-7.2.4+14.04.20141217/UnityCore/DBusIndicators.cpp --- unity-7.1.2+14.04.20140303/UnityCore/DBusIndicators.cpp 2014-03-03 16:47:36.000000000 +0000 +++ unity-7.2.4+14.04.20141217/UnityCore/DBusIndicators.cpp 2014-12-17 20:51:54.000000000 +0000 @@ -36,7 +36,8 @@ namespace { -const std::string SERVICE_NAME("com.canonical.Unity.Panel.Service"); +const std::string SERVICE_NAME_DESKTOP("com.canonical.Unity.Panel.Service.Desktop"); +const std::string SERVICE_NAME_LOCKSCREEN("com.canonical.Unity.Panel.Service.LockScreen"); const std::string SERVICE_PATH("/com/canonical/Unity/Panel/Service"); const std::string SERVICE_IFACE("com.canonical.Unity.Panel.Service"); } // anonymous namespace @@ -54,6 +55,7 @@ void Sync(GVariant* args, glib::Error const&); void SyncGeometries(std::string const& name, EntryLocationMap const& locations); void ShowEntriesDropdown(Indicator::Entries const&, Entry::Ptr const&, unsigned xid, int x, int y); + void CloseActiveEntry(); void OnConnected(); void OnDisconnected(); @@ -312,6 +314,11 @@ gproxy_.Call("ScrollEntry", g_variant_new("(si)", entry_id.c_str(), delta)); } +void DBusIndicators::Impl::CloseActiveEntry() +{ + gproxy_.Call("CloseActiveEntry"); +} + void DBusIndicators::Impl::Sync(GVariant* args, glib::Error const& error) { if (!args || error) @@ -456,13 +463,17 @@ } DBusIndicators::DBusIndicators() - : pimpl(new Impl(SERVICE_NAME, this)) + : pimpl(new Impl(SERVICE_NAME_DESKTOP, this)) {} DBusIndicators::DBusIndicators(std::string const& dbus_name) : pimpl(new Impl(dbus_name, this)) {} +LockScreenDBusIndicators::LockScreenDBusIndicators() + : DBusIndicators(SERVICE_NAME_LOCKSCREEN) +{} + DBusIndicators::~DBusIndicators() {} @@ -484,6 +495,11 @@ pimpl->ShowEntriesDropdown(entries, selected, xid, x, y); } +void DBusIndicators::CloseActiveEntry() +{ + pimpl->CloseActiveEntry(); +} + void DBusIndicators::OnEntryScroll(std::string const& entry_id, int delta) { pimpl->OnEntryScroll(entry_id, delta); diff -Nru unity-7.1.2+14.04.20140303/UnityCore/DBusIndicators.h unity-7.2.4+14.04.20141217/UnityCore/DBusIndicators.h --- unity-7.1.2+14.04.20140303/UnityCore/DBusIndicators.h 2014-03-03 16:47:36.000000000 +0000 +++ unity-7.2.4+14.04.20141217/UnityCore/DBusIndicators.h 2014-12-17 20:51:54.000000000 +0000 @@ -22,7 +22,6 @@ #include "Indicators.h" - namespace unity { namespace indicator @@ -41,6 +40,7 @@ std::vector const& IconPaths() const; void ShowEntriesDropdown(Indicator::Entries const&, Entry::Ptr const&, unsigned xid, int x, int y); void SyncGeometries(std::string const& name, EntryLocationMap const& locations); + void CloseActiveEntry(); protected: virtual void OnEntryScroll(std::string const& entry_id, int delta); @@ -56,6 +56,11 @@ std::unique_ptr pimpl; }; +struct LockScreenDBusIndicators : DBusIndicators +{ + LockScreenDBusIndicators(); +}; + } } diff -Nru unity-7.1.2+14.04.20140303/UnityCore/DesktopUtilities.cpp unity-7.2.4+14.04.20141217/UnityCore/DesktopUtilities.cpp --- unity-7.1.2+14.04.20140303/UnityCore/DesktopUtilities.cpp 2014-03-03 16:47:14.000000000 +0000 +++ unity-7.2.4+14.04.20141217/UnityCore/DesktopUtilities.cpp 2014-12-17 20:51:54.000000000 +0000 @@ -23,12 +23,17 @@ #include #include +#include #include "DesktopUtilities.h" #include "GLibWrapper.h" namespace unity { +namespace +{ +DECLARE_LOGGER(logger, "unity.desktop.utilities"); +} std::string DesktopUtilities::GetUserDataDirectory() { @@ -49,6 +54,42 @@ return ""; } +std::string DesktopUtilities::GetUserCacheDirectory() +{ + const char *cache_dir = g_get_user_cache_dir(); + auto unity_cache = glib::gchar_to_string(cache_dir).append(G_DIR_SEPARATOR_S "unity" G_DIR_SEPARATOR_S); + + if (g_mkdir_with_parents(unity_cache.c_str(), 0700) >= 0) + return unity_cache; + + LOG_ERROR(logger) << "Impossible to create unity cache folder '"<< unity_cache <<"' !"; + return ""; +} + +std::string DesktopUtilities::GetUserConfigDirectory() +{ + const char *config_dir = g_get_user_config_dir(); + auto unity_config = glib::gchar_to_string(config_dir).append(G_DIR_SEPARATOR_S "unity" G_DIR_SEPARATOR_S); + + if (g_mkdir_with_parents(unity_config.c_str(), 0700) >= 0) + return unity_config; + + LOG_ERROR(logger) << "Impossible to create unity config folder '"<< unity_config <<"' !"; + return ""; +} + +std::string DesktopUtilities::GetUserRuntimeDirectory() +{ + const char *runtime_dir = g_get_user_runtime_dir(); + auto unity_runtime = glib::gchar_to_string(runtime_dir).append(G_DIR_SEPARATOR_S "unity" G_DIR_SEPARATOR_S); + + if (g_mkdir_with_parents(unity_runtime.c_str(), 0700) >= 0) + return unity_runtime; + + LOG_ERROR(logger) << "Impossible to create unity runtime folder '"<< unity_runtime <<"' !"; + return ""; +} + std::vector DesktopUtilities::GetSystemDataDirectories() { const char* const* system_dirs = g_get_system_data_dirs(); diff -Nru unity-7.1.2+14.04.20140303/UnityCore/DesktopUtilities.h unity-7.2.4+14.04.20141217/UnityCore/DesktopUtilities.h --- unity-7.1.2+14.04.20140303/UnityCore/DesktopUtilities.h 2014-03-03 16:47:14.000000000 +0000 +++ unity-7.2.4+14.04.20141217/UnityCore/DesktopUtilities.h 2014-12-17 20:51:54.000000000 +0000 @@ -30,6 +30,9 @@ { public: static std::string GetUserDataDirectory(); + static std::string GetUserCacheDirectory(); + static std::string GetUserRuntimeDirectory(); + static std::string GetUserConfigDirectory(); static std::vector GetSystemDataDirectories(); static std::vector GetDataDirectories(); diff -Nru unity-7.1.2+14.04.20140303/UnityCore/GLibDBusProxy.cpp unity-7.2.4+14.04.20141217/UnityCore/GLibDBusProxy.cpp --- unity-7.1.2+14.04.20140303/UnityCore/GLibDBusProxy.cpp 2014-03-03 16:47:14.000000000 +0000 +++ unity-7.2.4+14.04.20141217/UnityCore/GLibDBusProxy.cpp 2014-12-17 20:51:54.000000000 +0000 @@ -21,7 +21,7 @@ #include "GLibDBusProxy.h" -#include +#include #include #include #include @@ -30,6 +30,8 @@ #include "GLibSignal.h" #include "GLibSource.h" +#include + namespace unity { namespace glib @@ -47,7 +49,7 @@ { public: typedef std::vector Callbacks; - typedef std::map SignalHandlers; + typedef std::unordered_map SignalHandlers; Impl(DBusProxy* owner, string const& name, @@ -74,6 +76,12 @@ GCancellable *cancellable, GDBusCallFlags flags, int timeout_msec); + void CallWithUnixFdList(std::string const& method_name, + GVariant* parameters, + CallFinishedCallback const& callback, + GCancellable *cancellable, + GDBusCallFlags flags, + int timeout_msec); void Connect(string const& signal_name, ReplyCallback const& callback); void DisconnectSignal(string const& signal_name); @@ -85,6 +93,7 @@ static void OnProxyConnectCallback(GObject* source, GAsyncResult* res, gpointer impl); static void OnCallCallback(GObject* source, GAsyncResult* res, gpointer call_data); + static void OnCallWithUnixFdListCallback(GObject* source, GAsyncResult* res, gpointer call_data); struct CallData { @@ -399,6 +408,50 @@ data); } +void DBusProxy::Impl::CallWithUnixFdList(string const& method_name, + GVariant* parameters, + CallFinishedCallback const& callback, + GCancellable* cancellable, + GDBusCallFlags flags, + int timeout_msec) +{ + GCancellable* target_canc = cancellable != NULL ? cancellable : cancellable_; + + if (!proxy_) + { + glib::Variant sinked_parameters(parameters); + glib::Object canc(target_canc, glib::AddRef()); + WaitForProxy(canc, timeout_msec, [this, method_name, sinked_parameters, callback, canc, flags, timeout_msec] (glib::Error const& err) + { + if (err) + { + callback(glib::Variant(), err); + LOG_WARNING(logger) << "Cannot call method " << method_name + << ": " << err; + } + else + { + CallWithUnixFdList(method_name, sinked_parameters, callback, canc, flags, timeout_msec); + } + }); + return; + } + + CallData* data = new CallData(); + data->callback = callback; + data->method_name = method_name; + + g_dbus_proxy_call_with_unix_fd_list(proxy_, + method_name.c_str(), + parameters, + flags, + timeout_msec, + nullptr, + target_canc, + DBusProxy::Impl::OnCallWithUnixFdListCallback, + data); +} + void DBusProxy::Impl::OnCallCallback(GObject* source, GAsyncResult* res, gpointer call_data) { glib::Error error; @@ -407,7 +460,7 @@ if (error) { - if (g_error_matches (error, G_IO_ERROR, G_IO_ERROR_CANCELLED)) + if (g_error_matches(error, G_IO_ERROR, G_IO_ERROR_CANCELLED)) { // silently ignore, don't even invoke callback, FIXME: really? return; @@ -425,6 +478,39 @@ data->callback(result, error); } +void DBusProxy::Impl::OnCallWithUnixFdListCallback(GObject* source, GAsyncResult* res, gpointer call_data) +{ + glib::Object fd_list; + + glib::Error error; + std::unique_ptr data(static_cast(call_data)); + glib::Variant result(g_dbus_proxy_call_with_unix_fd_list_finish(G_DBUS_PROXY(source), &fd_list, res, &error), glib::StealRef()); + + if (error) + { + if (g_error_matches(error, G_IO_ERROR, G_IO_ERROR_CANCELLED)) + { + // silently ignore, don't even invoke callback, FIXME: really? + return; + } + else + { + LOG_WARNING(logger) << "Calling method \"" << data->method_name + << "\" on object path: \"" + << g_dbus_proxy_get_object_path(G_DBUS_PROXY(source)) + << "\" failed: " << error; + } + } + + if (data->callback) + { + gint idx; + g_variant_get(result, "(h)", &idx); + gint fd = g_unix_fd_list_get(fd_list, idx, nullptr); + data->callback(glib::Variant(fd), error); + } +} + void DBusProxy::Impl::Connect(std::string const& signal_name, ReplyCallback const& callback) { if (!callback) @@ -487,6 +573,17 @@ timeout_msec); } +void DBusProxy::CallWithUnixFdList(std::string const& method_name, + GVariant* parameters, + CallFinishedCallback const& callback, + GCancellable *cancellable, + GDBusCallFlags flags, + int timeout_msec) +{ + pimpl->CallWithUnixFdList(method_name, parameters, callback, cancellable, + flags, timeout_msec); +} + glib::Variant DBusProxy::GetProperty(std::string const& name) const { if (IsConnected()) diff -Nru unity-7.1.2+14.04.20140303/UnityCore/GLibDBusProxy.h unity-7.2.4+14.04.20141217/UnityCore/GLibDBusProxy.h --- unity-7.1.2+14.04.20140303/UnityCore/GLibDBusProxy.h 2014-03-03 16:47:14.000000000 +0000 +++ unity-7.2.4+14.04.20141217/UnityCore/GLibDBusProxy.h 2014-12-17 20:51:54.000000000 +0000 @@ -64,6 +64,12 @@ GCancellable *cancellable = nullptr, GDBusCallFlags flags = G_DBUS_CALL_FLAGS_NONE, int timeout_msec = -1); + void CallWithUnixFdList(std::string const& method_name, + GVariant* parameters = nullptr, + CallFinishedCallback const& callback = nullptr, + GCancellable *cancellable = nullptr, + GDBusCallFlags flags = G_DBUS_CALL_FLAGS_NONE, + int timeout_msec = -1); bool IsConnected() const; diff -Nru unity-7.1.2+14.04.20140303/UnityCore/GLibDBusServer.cpp unity-7.2.4+14.04.20141217/UnityCore/GLibDBusServer.cpp --- unity-7.1.2+14.04.20140303/UnityCore/GLibDBusServer.cpp 2014-03-03 16:47:14.000000000 +0000 +++ unity-7.2.4+14.04.20141217/UnityCore/GLibDBusServer.cpp 2014-12-17 20:51:37.000000000 +0000 @@ -501,10 +501,10 @@ , owner_name_(0) {} - Impl(DBusServer* server, std::string const& name, GBusType bus_type) + Impl(DBusServer* server, std::string const& name, GBusType bus_type, GBusNameOwnerFlags flags) : Impl(server, name) { - owner_name_ = g_bus_own_name(bus_type, name.c_str(), G_BUS_NAME_OWNER_FLAGS_NONE, + owner_name_ = g_bus_own_name(bus_type, name.c_str(), flags, [] (GDBusConnection* conn, const gchar* name, gpointer data) { auto self = static_cast(data); @@ -665,8 +665,8 @@ std::vector> pending_objects_; }; -DBusServer::DBusServer(std::string const& name, GBusType bus_type) - : impl_(new DBusServer::Impl(this, name, bus_type)) +DBusServer::DBusServer(std::string const& name, GBusType bus_type, GBusNameOwnerFlags flags) + : impl_(new DBusServer::Impl(this, name, bus_type, flags)) {} DBusServer::DBusServer(GBusType bus_type) diff -Nru unity-7.1.2+14.04.20140303/UnityCore/GLibDBusServer.h unity-7.2.4+14.04.20141217/UnityCore/GLibDBusServer.h --- unity-7.1.2+14.04.20140303/UnityCore/GLibDBusServer.h 2014-03-03 16:47:14.000000000 +0000 +++ unity-7.2.4+14.04.20141217/UnityCore/GLibDBusServer.h 2014-12-17 20:51:37.000000000 +0000 @@ -81,7 +81,7 @@ typedef std::shared_ptr Ptr; DBusServer(GBusType bus_type = G_BUS_TYPE_SESSION); - DBusServer(std::string const& name, GBusType bus_type = G_BUS_TYPE_SESSION); + DBusServer(std::string const& name, GBusType bus_type = G_BUS_TYPE_SESSION, GBusNameOwnerFlags flags = G_BUS_NAME_OWNER_FLAGS_NONE); virtual ~DBusServer(); void AddObjects(std::string const& introspection_xml, std::string const& path); diff -Nru unity-7.1.2+14.04.20140303/UnityCore/GLibWrapper.h unity-7.2.4+14.04.20141217/UnityCore/GLibWrapper.h --- unity-7.1.2+14.04.20140303/UnityCore/GLibWrapper.h 2014-03-03 16:47:14.000000000 +0000 +++ unity-7.2.4+14.04.20141217/UnityCore/GLibWrapper.h 2014-12-17 20:51:54.000000000 +0000 @@ -56,6 +56,7 @@ operator T* () const; operator bool() const; T* operator->() const; + T** operator&(); T* RawPtr() const; // Release ownership of the object. No unref will occur. T* Release(); diff -Nru unity-7.1.2+14.04.20140303/UnityCore/GLibWrapper-inl.h unity-7.2.4+14.04.20141217/UnityCore/GLibWrapper-inl.h --- unity-7.1.2+14.04.20140303/UnityCore/GLibWrapper-inl.h 2014-03-03 16:47:14.000000000 +0000 +++ unity-7.2.4+14.04.20141217/UnityCore/GLibWrapper-inl.h 2014-12-17 20:51:54.000000000 +0000 @@ -94,6 +94,18 @@ } template +T** Object::operator&() +{ + if (object_) + { + g_object_unref(object_); + object_ = nullptr; + } + + return &object_; +} + +template Object::operator bool() const { return bool(object_); diff -Nru unity-7.1.2+14.04.20140303/UnityCore/GnomeSessionManager.cpp unity-7.2.4+14.04.20141217/UnityCore/GnomeSessionManager.cpp --- unity-7.1.2+14.04.20140303/UnityCore/GnomeSessionManager.cpp 2014-03-03 16:47:14.000000000 +0000 +++ unity-7.2.4+14.04.20141217/UnityCore/GnomeSessionManager.cpp 2014-12-17 20:51:54.000000000 +0000 @@ -72,6 +72,9 @@ { const std::string SESSION_OPTIONS = "com.canonical.indicator.session"; const std::string SUPPRESS_DIALOGS_KEY = "suppress-logout-restart-shutdown"; + +const std::string GNOME_LOCKDOWN_OPTIONS = "org.gnome.desktop.lockdown"; +const std::string DISABLE_LOCKSCREEN_KEY = "disable-lock-screen"; } GnomeManager::Impl::Impl(GnomeManager* manager, bool test_mode) @@ -82,11 +85,69 @@ , can_hibernate_(false) , pending_action_(shell::Action::NONE) , shell_server_(test_mode_ ? testing::DBUS_NAME : shell::DBUS_NAME) + , open_sessions_(0) { shell_server_.AddObjects(shell::INTROSPECTION_XML, shell::DBUS_OBJECT_PATH); shell_object_ = shell_server_.GetObject(shell::DBUS_INTERFACE); shell_object_->SetMethodsCallsHandler(sigc::mem_fun(this, &Impl::OnShellMethodCall)); + manager_->is_locked = false; + manager_->is_locked.changed.connect([this] (bool locked) { + locked ? manager_->locked.emit() : manager_->unlocked.emit(); + }); + + { + const char* session_id = test_mode_ ? "id0" : g_getenv("XDG_SESSION_ID"); + + login_proxy_ = std::make_shared(test_mode_ ? testing::DBUS_NAME : "org.freedesktop.login1", + "/org/freedesktop/login1/session/" + glib::gchar_to_string(session_id), + "org.freedesktop.login1.Session", + test_mode_ ? G_BUS_TYPE_SESSION : G_BUS_TYPE_SYSTEM); + + login_proxy_->Connect("Lock", [this](GVariant*){ + manager_->PromptLockScreen(); + }); + + login_proxy_->Connect("Unlock", [this](GVariant*){ + manager_->unlock_requested.emit(); + }); + } + + { + presence_proxy_ = std::make_shared("org.gnome.SessionManager", + "/org/gnome/SessionManager/Presence", + "org.gnome.SessionManager.Presence"); + + presence_proxy_->Connect("StatusChanged", [this](GVariant* variant) { + enum class PresenceStatus : unsigned + { + AVAILABLE = 0, + INVISIBLE, + BUSY, + IDLE + }; + + auto status = PresenceStatus(glib::Variant(variant).GetUInt32()); + manager_->presence_status_changed.emit(status == PresenceStatus::IDLE); + }); + } + + { + dm_proxy_ = std::make_shared("org.freedesktop.DisplayManager", + "/org/freedesktop/DisplayManager", + "org.freedesktop.DisplayManager", + G_BUS_TYPE_SYSTEM); + + dm_proxy_->Connect("SessionAdded", sigc::hide(sigc::mem_fun(this, &Impl::UpdateHaveOtherOpenSessions))); + dm_proxy_->Connect("SessionRemoved", sigc::hide(sigc::mem_fun(this, &Impl::UpdateHaveOtherOpenSessions))); + + UpdateHaveOtherOpenSessions(); + + manager_->have_other_open_sessions.SetGetterFunction([this]() { + return open_sessions_ > 1; + }); + } + CallLogindMethod("CanHibernate", nullptr, [this] (GVariant* variant, glib::Error const& err) { if (err) { @@ -361,6 +422,67 @@ }); } +void GnomeManager::Impl::LockScreen(bool prompt) +{ + EnsureCancelPendingAction(); + + if (!manager_->CanLock()) + { + manager_->ScreenSaverActivate(); + return; + } + + prompt ? manager_->prompt_lock_requested.emit() : manager_->lock_requested.emit(); +} + +void GnomeManager::Impl::UpdateHaveOtherOpenSessions() +{ + dm_proxy_->GetProperty("Sessions", [this](GVariant* variant) { + GVariantIter *sessions; + g_variant_get(variant, "ao", &sessions); + int open_sessions = g_variant_iter_n_children(sessions); + + if (open_sessions_ != open_sessions) + { + open_sessions_ = open_sessions; + manager_->have_other_open_sessions.changed.emit(open_sessions_); + } + }); +} + +bool GnomeManager::Impl::HasInhibitors() +{ + glib::Error error; + glib::Object bus(g_bus_get_sync(G_BUS_TYPE_SESSION, nullptr, &error)); + + if (error) + { + LOG_ERROR(logger) << "Impossible to get the session bus, to fetch the inhibitors: " << error; + return false; + } + + enum class Inhibited : unsigned + { + LOGOUT = 1, + USER_SWITCH = 2, + SUSPEND = 4, + IDLE_SET = 8 + }; + + glib::Variant inhibitors(g_dbus_connection_call_sync(bus, test_mode_ ? testing::DBUS_NAME.c_str() : "org.gnome.SessionManager", + "/org/gnome/SessionManager", "org.gnome.SessionManager", + "IsInhibited", g_variant_new("(u)", Inhibited::LOGOUT), nullptr, + G_DBUS_CALL_FLAGS_NONE, 500, nullptr, &error)); + + if (error) + { + LOG_ERROR(logger) << "Impossible to get the inhibitors: " << error; + return false; + } + + return inhibitors.GetBool(); +} + // Public implementation GnomeManager::GnomeManager() @@ -376,9 +498,7 @@ std::string GnomeManager::RealName() const { - const char* name = g_get_real_name(); - - std::string real_name(name ? name : ""); + std::string real_name = glib::gchar_to_string(g_get_real_name()); if (real_name == "Unknown") real_name.clear(); @@ -388,22 +508,32 @@ std::string GnomeManager::UserName() const { - const char* name = g_get_user_name(); + return glib::gchar_to_string(g_get_user_name()); +} - return name ? name : ""; +std::string GnomeManager::HostName() const +{ + return glib::gchar_to_string(g_get_host_name()); } -void GnomeManager::LockScreen() +void GnomeManager::ScreenSaverActivate() { - impl_->EnsureCancelPendingAction(); + screensaver_requested.emit(true); +} + +void GnomeManager::ScreenSaverDeactivate() +{ + screensaver_requested.emit(false); +} - auto proxy = std::make_shared(impl_->test_mode_ ? testing::DBUS_NAME : "org.gnome.ScreenSaver", - "/org/gnome/ScreenSaver", "org.gnome.ScreenSaver"); +void GnomeManager::LockScreen() +{ + impl_->LockScreen(false); +} - // By passing the proxy to the lambda we ensure that it will stay alive - // until we get the last callback. - proxy->Call("Lock", nullptr, [proxy] (GVariant*) {}); - proxy->Call("SimulateUserActivity", nullptr, [proxy] (GVariant*) {}); +void GnomeManager::PromptLockScreen() +{ + impl_->LockScreen(true); } void GnomeManager::Logout() @@ -501,7 +631,7 @@ impl_->EnsureCancelPendingAction(); impl_->CallLogindMethod("Suspend", g_variant_new("(b)", FALSE), [this] (GVariant* variant, glib::Error const& err) { // fallback to UPower - if (err) + if (err) impl_->CallUPowerMethod("Suspend"); }); } @@ -516,6 +646,19 @@ }); } +bool GnomeManager::CanLock() const +{ + glib::Object lockdown_settings(g_settings_new(GNOME_LOCKDOWN_OPTIONS.c_str())); + + if (g_settings_get_boolean(lockdown_settings, DISABLE_LOCKSCREEN_KEY.c_str()) || + UserName().find("guest-") == 0 || is_locked()) + { + return false; + } + + return true; +} + bool GnomeManager::CanShutdown() const { return impl_->can_shutdown_; @@ -531,6 +674,11 @@ return impl_->can_hibernate_; } +bool GnomeManager::HasInhibitors() const +{ + return impl_->HasInhibitors(); +} + void GnomeManager::CancelAction() { impl_->CancelAction(); diff -Nru unity-7.1.2+14.04.20140303/UnityCore/GnomeSessionManager.h unity-7.2.4+14.04.20141217/UnityCore/GnomeSessionManager.h --- unity-7.1.2+14.04.20140303/UnityCore/GnomeSessionManager.h 2014-03-03 16:47:14.000000000 +0000 +++ unity-7.2.4+14.04.20141217/UnityCore/GnomeSessionManager.h 2014-12-17 20:51:37.000000000 +0000 @@ -35,17 +35,23 @@ std::string RealName() const; std::string UserName() const; + std::string HostName() const; + void ScreenSaverActivate(); + void ScreenSaverDeactivate(); void LockScreen(); + void PromptLockScreen(); void Logout(); void Reboot(); void Shutdown(); void Suspend(); void Hibernate(); + bool CanLock() const; bool CanShutdown() const; bool CanSuspend() const; bool CanHibernate() const; + bool HasInhibitors() const; void CancelAction(); diff -Nru unity-7.1.2+14.04.20140303/UnityCore/GnomeSessionManagerImpl.h unity-7.2.4+14.04.20141217/UnityCore/GnomeSessionManagerImpl.h --- unity-7.1.2+14.04.20140303/UnityCore/GnomeSessionManagerImpl.h 2014-03-03 16:47:14.000000000 +0000 +++ unity-7.2.4+14.04.20141217/UnityCore/GnomeSessionManagerImpl.h 2014-12-17 20:51:37.000000000 +0000 @@ -1,3 +1,4 @@ + // -*- Mode: C++; indent-tabs-mode: nil; tab-width: 2 -*- /* * Copyright (C) 2013 Canonical Ltd @@ -50,7 +51,9 @@ void ConfirmShutdown(); void CancelAction(); void ClosedDialog(); + bool HasInhibitors(); void EnsureCancelPendingAction(); + void LockScreen(bool prompt); GVariant* OnShellMethodCall(std::string const& method, GVariant* parameters); void CallGnomeSessionMethod(std::string const& method, GVariant* parameters = nullptr, @@ -59,6 +62,7 @@ void CallLogindMethod(std::string const& method, GVariant* parameters = nullptr, glib::DBusProxy::CallFinishedCallback const& cb = nullptr); void CallConsoleKitMethod(std::string const& method, GVariant* parameters = nullptr); bool InteractiveMode(); + void UpdateHaveOtherOpenSessions(); GnomeManager* manager_; bool test_mode_; @@ -69,6 +73,11 @@ shell::Action pending_action_; glib::DBusServer shell_server_; glib::DBusObject::Ptr shell_object_; + glib::DBusProxy::Ptr login_proxy_; + glib::DBusProxy::Ptr presence_proxy_; + glib::DBusProxy::Ptr dm_proxy_; + + int open_sessions_; }; } // namespace session diff -Nru unity-7.1.2+14.04.20140303/UnityCore/Indicators.h unity-7.2.4+14.04.20141217/UnityCore/Indicators.h --- unity-7.1.2+14.04.20140303/UnityCore/Indicators.h 2014-03-03 16:47:36.000000000 +0000 +++ unity-7.2.4+14.04.20141217/UnityCore/Indicators.h 2014-12-17 20:51:54.000000000 +0000 @@ -44,6 +44,7 @@ virtual void SyncGeometries(std::string const& panel, EntryLocationMap const&) = 0; virtual void ShowEntriesDropdown(Indicator::Entries const&, Entry::Ptr const&, unsigned xid, int x, int y) = 0; + virtual void CloseActiveEntry() = 0; // Signals sigc::signal on_object_added; diff -Nru unity-7.1.2+14.04.20140303/UnityCore/SessionManager.h unity-7.2.4+14.04.20141217/UnityCore/SessionManager.h --- unity-7.1.2+14.04.20140303/UnityCore/SessionManager.h 2014-03-03 16:47:14.000000000 +0000 +++ unity-7.2.4+14.04.20141217/UnityCore/SessionManager.h 2014-12-17 20:51:37.000000000 +0000 @@ -23,6 +23,8 @@ #include #include +#include + namespace unity { namespace session @@ -36,19 +38,28 @@ Manager() = default; virtual ~Manager() = default; + nux::ROProperty have_other_open_sessions; + nux::Property is_locked; + virtual std::string RealName() const = 0; virtual std::string UserName() const = 0; + virtual std::string HostName() const = 0; + virtual void ScreenSaverActivate() = 0; + virtual void ScreenSaverDeactivate() = 0; virtual void LockScreen() = 0; + virtual void PromptLockScreen() = 0; virtual void Logout() = 0; virtual void Reboot() = 0; virtual void Shutdown() = 0; virtual void Suspend() = 0; virtual void Hibernate() = 0; + virtual bool CanLock() const = 0; virtual bool CanShutdown() const = 0; virtual bool CanSuspend() const = 0; virtual bool CanHibernate() const = 0; + virtual bool HasInhibitors() const = 0; virtual void CancelAction() = 0; @@ -56,9 +67,16 @@ Manager(const Manager&) = delete; Manager& operator=(const Manager&) = delete; + sigc::signal lock_requested; + sigc::signal unlock_requested; + sigc::signal prompt_lock_requested; + sigc::signal locked; + sigc::signal unlocked; sigc::signal logout_requested; sigc::signal reboot_requested; sigc::signal shutdown_requested; + sigc::signal presence_status_changed; + sigc::signal screensaver_requested; sigc::signal cancel_requested; }; diff -Nru unity-7.1.2+14.04.20140303/unity-shared/CMakeLists.txt unity-7.2.4+14.04.20141217/unity-shared/CMakeLists.txt --- unity-7.1.2+14.04.20140303/unity-shared/CMakeLists.txt 2014-03-03 16:47:14.000000000 +0000 +++ unity-7.2.4+14.04.20141217/unity-shared/CMakeLists.txt 2014-12-17 20:51:37.000000000 +0000 @@ -44,6 +44,7 @@ LineSeparator.cpp MenuManager.cpp OverlayRenderer.cpp + OverlayScrollView.cpp OverlayWindowButtons.cpp PanelStyle.cpp PlacesVScrollBar.cpp @@ -67,6 +68,7 @@ UnitySettings.cpp UnityWindowStyle.cpp UnityWindowView.cpp + UpstartWrapper.cpp UserThumbnailProvider.cpp VScrollBarOverlayWindow.cpp WindowButtons.cpp diff -Nru unity-7.1.2+14.04.20140303/unity-shared/CompizUtils.cpp unity-7.2.4+14.04.20141217/unity-shared/CompizUtils.cpp --- unity-7.1.2+14.04.20140303/unity-shared/CompizUtils.cpp 2014-03-03 16:47:36.000000000 +0000 +++ unity-7.2.4+14.04.20141217/unity-shared/CompizUtils.cpp 2014-12-17 20:51:54.000000000 +0000 @@ -1,6 +1,6 @@ // -*- Mode: C++; indent-tabs-mode: nil; tab-width: 2 -*- /* -* Copyright (C) 2013 Canonical Ltd +* Copyright (C) 2013-2014 Canonical Ltd * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License version 3 as @@ -30,6 +30,11 @@ { const unsigned PIXMAP_DEPTH = 32; const float DEFAULT_SCALE = 1.0f; + const unsigned DECORABLE_WINDOW_TYPES = CompWindowTypeDialogMask | + CompWindowTypeModalDialogMask | + CompWindowTypeUtilMask | + CompWindowTypeMenuMask | + CompWindowTypeNormalMask; } SimpleTexture::SimpleTexture(GLTexture::List const& tex) @@ -39,7 +44,7 @@ // SimpleTextureQuad::SimpleTextureQuad() - : scale(DEFAULT_SCALE) + : scale_(DEFAULT_SCALE) {} bool SimpleTextureQuad::SetTexture(SimpleTexture::Ptr const& simple_texture) @@ -52,24 +57,27 @@ if (st && st->texture()) { auto* tex = st->texture(); - CompPoint old_coords(quad.box.x(), quad.box.y()); - short invalid = std::numeric_limits::min(); - quad.box.setGeometry(invalid, invalid, tex->width() * scale, tex->height() * scale); - SetCoords(old_coords.x(), old_coords.y()); + CompSize size(tex->width() * scale_, tex->height() * scale_); + + if (quad.box.width() != size.width() || quad.box.height() != size.height()) + { + quad.box.setSize(size); + UpdateMatrix(); + } } return true; } -bool SimpleTextureQuad::SetScale(float s) +bool SimpleTextureQuad::SetScale(double s) { - if (!st || scale == s) + if (!st || scale_ == s) return false; - scale = s; + scale_ = s; auto* tex = st->texture(); - quad.box.setWidth(tex->width() * scale); - quad.box.setHeight(tex->height() * scale); + quad.box.setWidth(tex->width() * scale_); + quad.box.setHeight(tex->height() * scale_); UpdateMatrix(); return true; } @@ -91,8 +99,8 @@ int y = quad.box.y(); quad.matrix = (st && st->texture()) ? st->texture()->matrix() : GLTexture::Matrix(); - quad.matrix.xx /= scale; - quad.matrix.yy /= scale; + quad.matrix.xx /= scale_; + quad.matrix.yy /= scale_; quad.matrix.x0 = 0.0f - COMP_TEX_COORD_X(quad.matrix, x); quad.matrix.y0 = 0.0f - COMP_TEX_COORD_Y(quad.matrix, y); } @@ -110,9 +118,13 @@ // PixmapTexture::PixmapTexture(int w, int h) - : pixmap_(XCreatePixmap(screen->dpy(), screen->root(), w, h, PIXMAP_DEPTH)) + : pixmap_(0) { - texture_ = GLTexture::bindPixmapToTexture(pixmap_, w, h, PIXMAP_DEPTH); + if (w > 0 && h > 0) + { + pixmap_ = XCreatePixmap(screen->dpy(), screen->root(), w, h, PIXMAP_DEPTH); + texture_ = GLTexture::bindPixmapToTexture(pixmap_, w, h, PIXMAP_DEPTH); + } } PixmapTexture::~PixmapTexture() @@ -162,49 +174,68 @@ return cairo_xlib_surface_get_height(surface_); } -bool IsWindowShadowDecorable(CompWindow* win) +// +// + +unsigned WindowDecorationElements(CompWindow* win, WindowFilter::Value wf) { + unsigned elements = DecorationElement::NONE; + if (!win) - return false; + return elements; - if (!win->isViewable()) - return false; + if (!win->isViewable() && wf == WindowFilter::NONE) + return elements; if (win->wmType() & (CompWindowTypeDockMask | CompWindowTypeDesktopMask)) - return false; + return elements; - if (win->region().numRects() != 1) // Non rectangular windows - return false; + if (win->inShowDesktopMode()) + return elements; - if (win->overrideRedirect() && win->alpha()) - return false; + auto const& region = win->region(); + bool rectangular = (region.numRects() == 1); + bool alpha = win->alpha(); - return true; -} + if (!rectangular && alpha) // Non-rectangular windows with alpha channel + return elements; -bool IsWindowFullyDecorable(CompWindow* win) -{ - if (!win) - return false; + if (region.boundingRect() != win->geometry()) // Shaped windows + return elements; - if (!IsWindowShadowDecorable(win)) - return false; + if (rectangular) + elements |= DecorationElement::SHADOW; - if (win->overrideRedirect()) - return false; - - switch (win->type()) + if (!win->overrideRedirect() && + (win->type() & DECORABLE_WINDOW_TYPES) && + (win->frame() || win->hasUnmapReference() || wf == WindowFilter::UNMAPPED)) { - case CompWindowTypeDialogMask: - case CompWindowTypeModalDialogMask: - case CompWindowTypeUtilMask: - case CompWindowTypeMenuMask: - case CompWindowTypeNormalMask: - if (win->mwmDecor() & (MwmDecorAll | MwmDecorTitle)) - return true; + if (win->actions() & CompWindowActionResizeMask) + elements |= DecorationElement::EDGE; + + if (rectangular && (win->mwmDecor() & (MwmDecorAll | MwmDecorTitle))) + elements |= DecorationElement::BORDER; } - return false; + if (alpha && !(elements & DecorationElement::BORDER) && !(win->mwmDecor() & MwmDecorBorder)) + elements &= ~DecorationElement::SHADOW; + + return elements; +} + +bool IsWindowEdgeDecorable(CompWindow* win) +{ + return WindowDecorationElements(win) & DecorationElement::EDGE; +} + +bool IsWindowShadowDecorable(CompWindow* win) +{ + return WindowDecorationElements(win) & DecorationElement::SHADOW; +} + +bool IsWindowFullyDecorable(CompWindow* win) +{ + return WindowDecorationElements(win) & DecorationElement::BORDER; } } // compiz_utils namespace diff -Nru unity-7.1.2+14.04.20140303/unity-shared/CompizUtils.h unity-7.2.4+14.04.20141217/unity-shared/CompizUtils.h --- unity-7.1.2+14.04.20140303/unity-shared/CompizUtils.h 2014-03-03 16:47:36.000000000 +0000 +++ unity-7.2.4+14.04.20141217/unity-shared/CompizUtils.h 2014-12-17 20:51:54.000000000 +0000 @@ -31,8 +31,15 @@ struct TextureQuad { + TextureQuad() + : matrices(1) + , matrix(matrices[0]) + {} + CompRect box; - GLTexture::Matrix matrix; + CompRegion region; + GLTexture::MatrixList matrices; + GLTexture::Matrix& matrix; }; struct SimpleTexture @@ -59,11 +66,13 @@ { SimpleTextureQuad(); bool SetTexture(SimpleTexture::Ptr const&); - bool SetScale(float scale); + bool SetScale(double scale); bool SetCoords(int x, int y); bool SetX(int x); bool SetY(int y); + void UpdateMatrix(); + operator SimpleTexture::Ptr() const { return st; } operator bool() const { return st && st->texture(); } operator GLTexture*() const { return st ? st->texture() : nullptr; } @@ -73,8 +82,7 @@ TextureQuad quad; private: - void UpdateMatrix(); - float scale; + double scale_; }; struct PixmapTexture : SimpleTexture @@ -111,6 +119,30 @@ cairo_t *cr_; }; +namespace WindowFilter +{ +enum Value +{ + NONE, + UNMAPPED +}; +} + +namespace DecorationElement +{ +enum +{ + NONE = 0, + EDGE = (1 << 0), + SHADOW = (1 << 1), + BORDER = (1 << 2), + FULL = EDGE|SHADOW|BORDER +}; +} + +unsigned WindowDecorationElements(CompWindow*, WindowFilter::Value wf = WindowFilter::NONE); + +bool IsWindowEdgeDecorable(CompWindow*); bool IsWindowShadowDecorable(CompWindow*); bool IsWindowFullyDecorable(CompWindow*); diff -Nru unity-7.1.2+14.04.20140303/unity-shared/CoverArt.cpp unity-7.2.4+14.04.20141217/unity-shared/CoverArt.cpp --- unity-7.1.2+14.04.20140303/unity-shared/CoverArt.cpp 2014-03-03 16:47:14.000000000 +0000 +++ unity-7.2.4+14.04.20141217/unity-shared/CoverArt.cpp 2014-12-17 20:51:37.000000000 +0000 @@ -42,7 +42,8 @@ namespace { -const int ICON_SIZE = 256; +const RawPixel ICON_SIZE = 256_em; +const RawPixel THUMBNAIL_SIZE = 512_em; const int IMAGE_TIMEOUT = 30; } @@ -50,6 +51,7 @@ CoverArt::CoverArt() : View(NUX_TRACKER_LOCATION) + , scale(1.0) , overlay_text_(nullptr) , thumb_handle_(0) , slot_handle_(0) @@ -58,6 +60,7 @@ , rotation_(0.0) { SetupViews(); + scale.changed.connect(sigc::mem_fun(this, &CoverArt::UpdateScale)); } CoverArt::~CoverArt() @@ -118,12 +121,12 @@ if (icon.IsType(G_TYPE_ICON)) { StartWaiting(); - slot_handle_ = IconLoader::GetDefault().LoadFromGIconString(image_hint, ICON_SIZE, ICON_SIZE, sigc::mem_fun(this, &CoverArt::IconLoaded)); + slot_handle_ = IconLoader::GetDefault().LoadFromGIconString(image_hint, ICON_SIZE.CP(scale), ICON_SIZE.CP(scale), sigc::mem_fun(this, &CoverArt::IconLoaded)); } else { StartWaiting(); - slot_handle_ = IconLoader::GetDefault().LoadFromIconName(image_hint, ICON_SIZE, ICON_SIZE, sigc::mem_fun(this, &CoverArt::IconLoaded)); + slot_handle_ = IconLoader::GetDefault().LoadFromIconName(image_hint, ICON_SIZE.CP(scale), ICON_SIZE.CP(scale), sigc::mem_fun(this, &CoverArt::IconLoaded)); } } else @@ -134,7 +137,7 @@ void CoverArt::GenerateImage(std::string const& uri) { - notifier_ = ThumbnailGenerator::Instance().GetThumbnail(uri, 512); + notifier_ = ThumbnailGenerator::Instance().GetThumbnail(uri, THUMBNAIL_SIZE.CP(scale)); if (notifier_) { StartWaiting(); @@ -144,7 +147,7 @@ else { StopWaiting(); - SetNoImageAvailable(); + SetNoImageAvailable(); } } @@ -168,7 +171,7 @@ SetNoImageAvailable(); return false; })); - + QueueDraw(); } @@ -186,7 +189,7 @@ GetLayout()->RemoveChildObject(overlay_text_); GetLayout()->AddView(overlay_text_, 0, nux::MINOR_POSITION_CENTER, nux::MINOR_SIZE_FULL, 100.0, nux::LayoutPosition(1)); ComputeContentSize(); - + QueueDraw(); } } @@ -221,7 +224,7 @@ GetLayout()->RemoveChildObject(overlay_text_); if (pixbuf_width == pixbuf_height) - { + { // quick path for square icons texture_screenshot_.Adopt(nux::CreateTexture2DFromPixbuf(pixbuf, true)); } @@ -257,14 +260,16 @@ return; } - nux::CairoGraphics cairo_graphics(CAIRO_FORMAT_ARGB32, pixbuf_width, pixbuf_height); + nux::CairoGraphics cairo_graphics(CAIRO_FORMAT_ARGB32, RawPixel(pixbuf_width).CP(scale), RawPixel(pixbuf_height).CP(scale)); + cairo_surface_set_device_scale(cairo_graphics.GetSurface(), scale, scale); + cairo_t* cr = cairo_graphics.GetInternalContext(); cairo_set_operator(cr, CAIRO_OPERATOR_CLEAR); cairo_paint(cr); - float scale = float(pixbuf_height) / gdk_pixbuf_get_height(pixbuf); - cairo_scale(cr, scale, scale); + float size_ratio = float(pixbuf_height) / gdk_pixbuf_get_height(pixbuf); + cairo_scale(cr, size_ratio, size_ratio); cairo_set_operator(cr, CAIRO_OPERATOR_OVER); gdk_cairo_set_source_pixbuf(cr, pixbuf, 0, 0); @@ -349,7 +354,7 @@ if (image_aspect > base_apsect) { imageDest.SetHeight(float(imageDest.GetWidth()) / image_aspect); - } + } if (image_aspect < base_apsect) { imageDest.SetWidth(image_aspect * imageDest.GetHeight()); @@ -360,16 +365,10 @@ imageDest = nux::Geometry(0, 0, texture_screenshot_->GetWidth(), texture_screenshot_->GetHeight()); } - texxform.SetTexCoordType(nux::TexCoordXForm::OFFSET_SCALE_COORD); texxform.SetWrap(nux::TEXWRAP_CLAMP_TO_BORDER, nux::TEXWRAP_CLAMP_TO_BORDER); texxform.SetFilter(nux::TEXFILTER_LINEAR, nux::TEXFILTER_LINEAR); - texxform.u0 = 0; - texxform.v0 = 0; - texxform.u1 = imageDest.width; - texxform.v1 = imageDest.height; - gfx_engine.QRP_1Tex(base.x + (float(base.GetWidth() - imageDest.GetWidth()) / 2), base.y + (float(base.GetHeight() - imageDest.GetHeight()) / 2), imageDest.width, @@ -384,14 +383,14 @@ { nux::TexCoordXForm texxform; texxform.SetTexCoordType(nux::TexCoordXForm::OFFSET_COORD); - texxform.SetWrap(nux::TEXWRAP_REPEAT, nux::TEXWRAP_REPEAT); - texxform.min_filter = nux::TEXFILTER_LINEAR; - texxform.mag_filter = nux::TEXFILTER_LINEAR; - - nux::Geometry spin_geo(base.x + ((base.width - spin_->GetWidth()) / 2), - base.y + ((base.height - spin_->GetHeight()) / 2), - spin_->GetWidth(), - spin_->GetHeight()); + texxform.SetWrap(nux::TEXWRAP_CLAMP_TO_BORDER, nux::TEXWRAP_CLAMP_TO_BORDER); + texxform.SetFilter(nux::TEXFILTER_LINEAR, nux::TEXFILTER_LINEAR); + + nux::Size spin_size(spin_->GetWidth(), spin_->GetHeight()); + nux::Geometry spin_geo(base.x + ((base.width - spin_size.width) / 2), + base.y + ((base.height - spin_size.height) / 2), + spin_size.width, + spin_size.height); // Geometry (== Rect) uses integers which were rounded above, // hence an extra 0.5 offset for odd sizes is needed // because pure floating point is not being used. @@ -425,7 +424,7 @@ } } } - + gfx_engine.GetRenderStates().SetBlend(alpha, src, dest); if (GetLayout()) @@ -449,10 +448,10 @@ overlay_text_->SetTextAlignment(StaticCairoText::NUX_ALIGN_CENTRE); overlay_text_->SetFont("Ubuntu 14"); overlay_text_->SetLines(-3); + overlay_text_->SetScale(scale); overlay_text_->SetText(_("No Image Available")); - dash::Style& style = dash::Style::Instance(); - spin_ = style.GetSearchSpinIcon(); + spin_ = dash::Style::Instance().GetSearchSpinIcon(scale); rotate_matrix_.Identity(); rotate_matrix_.Rotate_z(0.0); @@ -496,6 +495,16 @@ return false; } +void CoverArt::UpdateScale(double scale) +{ + if (overlay_text_) + overlay_text_->SetScale(scale); + + spin_ = dash::Style::Instance().GetSearchSpinIcon(scale); + + QueueDraw(); +} + } } } diff -Nru unity-7.1.2+14.04.20140303/unity-shared/CoverArt.h unity-7.2.4+14.04.20141217/unity-shared/CoverArt.h --- unity-7.1.2+14.04.20140303/unity-shared/CoverArt.h 2014-03-03 16:47:14.000000000 +0000 +++ unity-7.2.4+14.04.20141217/unity-shared/CoverArt.h 2014-12-17 20:51:37.000000000 +0000 @@ -58,10 +58,12 @@ void SetFont(std::string const& font); + nux::Property scale; + protected: virtual void Draw(nux::GraphicsEngine& gfx_engine, bool force_draw); virtual void DrawContent(nux::GraphicsEngine& gfx_engine, bool force_draw); - + virtual bool AcceptKeyNavFocus() { return false; } void SetupViews(); @@ -80,6 +82,8 @@ virtual void AddProperties(debug::IntrospectionData&); private: + void UpdateScale(double scale); + nux::ObjectPtr texture_screenshot_; StaticCairoText* overlay_text_; @@ -88,10 +92,10 @@ int slot_handle_; bool stretch_image_; ThumbnailNotifier::Ptr notifier_; - + // Spinner bool waiting_; - nux::BaseTexture* spin_; + nux::ObjectPtr spin_; glib::Source::UniquePtr spinner_timeout_; glib::Source::UniquePtr frame_timeout_; nux::Matrix4 rotate_matrix_; diff -Nru unity-7.1.2+14.04.20140303/unity-shared/DashStyle.cpp unity-7.2.4+14.04.20141217/unity-shared/DashStyle.cpp --- unity-7.1.2+14.04.20140303/unity-shared/DashStyle.cpp 2014-03-03 16:47:14.000000000 +0000 +++ unity-7.2.4+14.04.20141217/unity-shared/DashStyle.cpp 2014-12-17 20:51:54.000000000 +0000 @@ -48,8 +48,6 @@ #define DASH_WIDGETS_FILE DATADIR"/unity/themes/dash-widgets.json" -typedef nux::ObjectPtr BaseTexturePtr; - namespace unity { namespace dash @@ -92,11 +90,21 @@ } } +template +inline void get_actual_cairo_size(cairo_t* cr, T* width, T* height) +{ + double w_scale, h_scale; + auto* surface = cairo_get_target(cr); + cairo_surface_get_device_scale(surface, &w_scale, &h_scale); + *width = cairo_image_surface_get_width(surface) / w_scale; + *height = cairo_image_surface_get_height(surface) / h_scale; +} + class LazyLoadTexture { public: LazyLoadTexture(std::string const& filename, int size = -1); - nux::BaseTexture* texture(); + BaseTexturePtr const& texture(); private: void LoadTexture(); private: @@ -108,9 +116,8 @@ } // anon namespace -class Style::Impl +struct Style::Impl : sigc::trackable { -public: Impl(Style* owner); ~Impl(); @@ -165,8 +172,16 @@ nux::ButtonVisualState state); void Refresh(); + void UpdateFormFactor(FormFactor); void OnFontChanged(GtkSettings* object, GParamSpec* pspec); + BaseTexturePtr LoadScaledTexture(std::string const& name, double scale) + { + int w, h; + gdk_pixbuf_get_file_info((PKGDATADIR"/" + name).c_str(), &w, &h); + return TextureCache::GetDefault().FindTexture(name, RawPixel(w).CP(scale), RawPixel(h).CP(scale)); + } + // Members Style* owner_; @@ -207,32 +222,12 @@ int text_width_; int text_height_; - int number_of_columns_; LazyLoadTexture category_texture_; LazyLoadTexture category_texture_no_filters_; - LazyLoadTexture dash_bottom_texture_; - LazyLoadTexture dash_bottom_texture_mask_; - LazyLoadTexture dash_right_texture_; - LazyLoadTexture dash_right_texture_mask_; - LazyLoadTexture dash_corner_texture_; - LazyLoadTexture dash_corner_texture_mask_; - LazyLoadTexture dash_fullscreen_icon_; - LazyLoadTexture dash_left_edge_; - LazyLoadTexture dash_left_corner_; - LazyLoadTexture dash_left_corner_mask_; - LazyLoadTexture dash_left_tile_; - LazyLoadTexture dash_top_corner_; - LazyLoadTexture dash_top_corner_mask_; - LazyLoadTexture dash_top_tile_; LazyLoadTexture dash_shine_; - LazyLoadTexture search_magnify_texture_; - LazyLoadTexture search_circle_texture_; - LazyLoadTexture search_close_texture_; - LazyLoadTexture search_spin_texture_; - LazyLoadTexture information_texture_; LazyLoadTexture refine_gradient_corner_; @@ -258,28 +253,9 @@ , text_color_(nux::color::White) , text_width_(0) , text_height_(0) - , number_of_columns_(6) , category_texture_("/category_gradient.png") , category_texture_no_filters_("/category_gradient_no_refine.png") - , dash_bottom_texture_("/dash_bottom_border_tile.png") - , dash_bottom_texture_mask_("/dash_bottom_border_tile_mask.png") - , dash_right_texture_("/dash_right_border_tile.png") - , dash_right_texture_mask_("/dash_right_border_tile_mask.png") - , dash_corner_texture_("/dash_bottom_right_corner.png") - , dash_corner_texture_mask_("/dash_bottom_right_corner_mask.png") - , dash_fullscreen_icon_("/dash_fullscreen_icon.png") - , dash_left_edge_("/dash_left_edge.png") - , dash_left_corner_("/dash_bottom_left_corner.png") - , dash_left_corner_mask_("/dash_bottom_left_corner_mask.png") - , dash_left_tile_("/dash_left_tile.png") - , dash_top_corner_("/dash_top_right_corner.png") - , dash_top_corner_mask_("/dash_top_right_corner_mask.png") - , dash_top_tile_("/dash_top_tile.png") , dash_shine_("/dash_sheen.png") - , search_magnify_texture_("/search_magnify.png") - , search_circle_texture_("/search_circle.svg", 32) - , search_close_texture_("/search_close.svg", 32) - , search_spin_texture_("/search_spin.svg", 32) , information_texture_("/information_icon.svg") , refine_gradient_corner_("/refine_gradient_corner.png") , refine_gradient_dash_("/refine_gradient_dash.png") @@ -293,11 +269,13 @@ (gtk_settings_get_default(), "notify::gtk-font-name", sigc::mem_fun(this, &Impl::OnFontChanged))); - signal_manager_.Add(new glib::Signal - (gtk_settings_get_default(), - "notify::gtk-xft-dpi", - sigc::mem_fun(this, &Impl::OnFontChanged))); + + auto& settings = Settings::Instance(); + settings.font_scaling.changed.connect(sigc::hide(sigc::mem_fun(this, &Impl::Refresh))); + settings.form_factor.changed.connect(sigc::mem_fun(this, &Impl::UpdateFormFactor)); + Refresh(); + UpdateFormFactor(settings.form_factor()); // create fallback font-options default_font_options_ = cairo_font_options_create(); @@ -388,11 +366,7 @@ cairo_t* cr = util_cg.GetInternalContext(); glib::String font_description; - int dpi = 0; - ::g_object_get(settings, - "gtk-font-name", &font_description, - "gtk-xft-dpi", &dpi, - NULL); + ::g_object_get(settings, "gtk-font-name", &font_description, nullptr); PangoFontDescription* desc = ::pango_font_description_from_string(font_description); ::pango_font_description_set_weight(desc, PANGO_WEIGHT_NORMAL); ::pango_font_description_set_size(desc, 9 * PANGO_SCALE); @@ -405,29 +379,32 @@ GdkScreen* screen = ::gdk_screen_get_default(); ::pango_cairo_context_set_font_options(cxt, ::gdk_screen_get_font_options(screen)); - float pango_scale = PANGO_SCALE; - ::pango_cairo_context_set_resolution(cxt, dpi / pango_scale); + ::pango_cairo_context_set_resolution(cxt, 96.0 * Settings::Instance().font_scaling()); ::pango_layout_context_changed(layout); PangoRectangle log_rect; - ::pango_layout_get_extents(layout, NULL, &log_rect); - text_width_ = log_rect.width / PANGO_SCALE; - text_height_ = log_rect.height / PANGO_SCALE; + ::pango_layout_get_pixel_extents(layout, NULL, &log_rect); + text_width_ = log_rect.width; + text_height_ = log_rect.height; owner_->changed.emit(); pango_font_description_free(desc); } - void Style::Impl::OnFontChanged(GtkSettings* object, GParamSpec* pspec) { Refresh(); } +void Style::Impl::UpdateFormFactor(FormFactor form_factor) +{ + owner_->always_maximised = (form_factor == FormFactor::NETBOOK || form_factor == FormFactor::TV); +} Style::Style() - : always_maximised(false) + : columns_number(6) + , always_maximised(false) , pimpl(new Impl(this)) { if (style_instance) @@ -438,15 +415,6 @@ { style_instance = this; } - - auto formfactor_lambda = [this] (FormFactor) - { - FormFactor formfactor = Settings::Instance().form_factor(); - always_maximised = (formfactor == FormFactor::NETBOOK || formfactor == FormFactor::TV); - }; - - Settings::Instance().form_factor.changed.connect(formfactor_lambda); - formfactor_lambda(FormFactor()); } Style::~Style () @@ -691,9 +659,8 @@ cairo_surface_flush(surface); pixels = cairo_image_surface_get_data(surface); - width = cairo_image_surface_get_width(surface); - height = cairo_image_surface_get_height(surface); format = cairo_image_surface_get_format(surface); + get_actual_cairo_size(cr, &width, &height); switch (format) { @@ -791,8 +758,8 @@ { double x = 0.0; double y = 0.0; - double w = cairo_image_surface_get_width(cairo_get_target(cr)); - double h = cairo_image_surface_get_height(cairo_get_target(cr)); + double w, h; + get_actual_cairo_size(cr, &w, &h); /*double xt = 0.0; double yt = 0.0;*/ @@ -839,8 +806,11 @@ { double x = 2.0; double y = 2.0; - double w = cairo_image_surface_get_width(cairo_get_target(cr)) - 4.0; - double h = cairo_image_surface_get_height(cairo_get_target(cr)) - 4.0; + + double w, h; + get_actual_cairo_size(cr, &w, &h); + w -= 4.0; + h -= 4.0; // - these absolute values are the "cost" of getting only a SVG from design // and not a generic formular how to approximate the curve-shape, thus @@ -1221,8 +1191,10 @@ { double x = 0.0; double y = 2.0; - double w = cairo_image_surface_get_width(cairo_get_target(cr)); - double h = cairo_image_surface_get_height(cairo_get_target(cr)) - 4.0; + + double w, h; + get_actual_cairo_size(cr, &w, &h); + h -= 4.0; // - these absolute values are the "cost" of getting only a SVG from design // and not a generic formular how to approximate the curve-shape, thus @@ -1384,7 +1356,6 @@ PangoFontDescription* desc = NULL; PangoContext* pangoCtx = NULL; PangoRectangle inkRect = {0, 0, 0, 0}; - int dpi = 0; char* fontName = NULL; GdkScreen* screen = gdk_screen_get_default(); // is not ref'ed GtkSettings* settings = gtk_settings_get_default();// is not ref'ed @@ -1423,22 +1394,12 @@ pango_cairo_context_set_font_options(pangoCtx, gdk_screen_get_font_options(screen)); - g_object_get(settings, "gtk-xft-dpi", &dpi, NULL); - if (dpi == -1) - { - // use some default DPI-value - pango_cairo_context_set_resolution(pangoCtx, 96.0f); - } - else - { - pango_cairo_context_set_resolution(pangoCtx, - (float) dpi / (float) PANGO_SCALE); - } + pango_cairo_context_set_resolution(pangoCtx, 96.0 * Settings::Instance().font_scaling()); pango_layout_context_changed(layout); - pango_layout_get_extents(layout, &inkRect, NULL); + pango_layout_get_pixel_extents(layout, &inkRect, NULL); - width = inkRect.width / PANGO_SCALE; - height = inkRect.height / PANGO_SCALE; + width = inkRect.width; + height = inkRect.height; // clean up pango_font_description_free(desc); @@ -1461,15 +1422,12 @@ PangoLayout* layout = NULL; PangoFontDescription* desc = NULL; PangoContext* pangoCtx = NULL; - int dpi = 0; GdkScreen* screen = gdk_screen_get_default(); // not ref'ed GtkSettings* settings = gtk_settings_get_default(); // not ref'ed gchar* fontName = NULL; //double horizMargin = 10.0; - w = cairo_image_surface_get_width(cairo_get_target(cr)); - h = cairo_image_surface_get_height(cairo_get_target(cr)); - + get_actual_cairo_size(cr, &w, &h); w -= 2 * horizMargin; if (!screen) @@ -1480,17 +1438,14 @@ g_object_get(settings, "gtk-font-name", &fontName, NULL); if (!fontName) - desc = pango_font_description_from_string("Sans 10"); + desc = pango_font_description_from_string("Ubuntu 10"); else desc = pango_font_description_from_string(fontName); if (text_size > 0) { - pango_font_description_set_absolute_size(desc, text_size * PANGO_SCALE); - } - else if (desc) - { - text_size = pango_font_description_get_size(desc) / PANGO_SCALE; + text_size = pango_units_from_double(Settings::Instance().font_scaling() * text_size); + pango_font_description_set_absolute_size(desc, text_size); } PangoWeight weight; @@ -1543,17 +1498,7 @@ pango_cairo_context_set_font_options(pangoCtx, gdk_screen_get_font_options(screen)); - g_object_get(settings, "gtk-xft-dpi", &dpi, NULL); - if (dpi == -1) - { - // use some default DPI-value - pango_cairo_context_set_resolution(pangoCtx, 96.0f); - } - else - { - pango_cairo_context_set_resolution(pangoCtx, - (float) dpi / (float) PANGO_SCALE); - } + pango_cairo_context_set_resolution(pangoCtx, 96.0 * Settings::Instance().font_scaling()); cairo_set_operator(cr, CAIRO_OPERATOR_OVER); cairo_set_source_rgba(cr, color); @@ -1608,6 +1553,8 @@ const unsigned char* data = NULL; int width = 0; int height = 0; + double w_scale = 0; + double h_scale = 0; int stride = 0; unsigned char* buffer = NULL; cairo_surface_t* surface = NULL; @@ -1617,9 +1564,9 @@ // aquire info about image-surface target = cairo_get_target(cr); data = cairo_image_surface_get_data(target); - width = cairo_image_surface_get_width(target); - height = cairo_image_surface_get_height(target); stride = cairo_image_surface_get_stride(target); + get_actual_cairo_size(cr, &width, &height); + cairo_surface_get_device_scale(target, &w_scale, &h_scale); cairo_format_t format = cairo_image_surface_get_format(target); // get buffer @@ -1652,6 +1599,7 @@ } // blur and blend overlay onto initial image-surface + cairo_surface_set_device_scale(surface, w_scale, h_scale); Blur(blurred_cr, blurSize); cairo_set_source_surface(cr, surface, 0.0, 0.0); old = SetBlendMode(cr, mode); @@ -1680,8 +1628,8 @@ garnish = GetButtonGarnishSize(); //ButtonOutlinePath(cr, true); - double w = cairo_image_surface_get_width(cairo_get_target(cr)); - double h = cairo_image_surface_get_height(cairo_get_target(cr)); + double w, h; + get_actual_cairo_size(cr, &w, &h); cairo_set_line_width(cr, pimpl->button_label_border_size_[state]); @@ -1774,8 +1722,8 @@ if (zeromargin == false) garnish = GetButtonGarnishSize(); - double w = cairo_image_surface_get_width(cairo_get_target(cr)); - double h = cairo_image_surface_get_height(cairo_get_target(cr)); + double w, h; + get_actual_cairo_size(cr, &w, &h); double x = garnish; double y = garnish; @@ -1885,8 +1833,8 @@ if (cairo_surface_get_type(cairo_get_target(cr)) != CAIRO_SURFACE_TYPE_IMAGE) return false; - double w = cairo_image_surface_get_width(cairo_get_target(cr)); - double h = cairo_image_surface_get_height(cairo_get_target(cr)); + double w, h; + get_actual_cairo_size(cr, &w, &h); nux::Color color(nux::color::White); color.alpha = alpha; @@ -1922,10 +1870,11 @@ return false; //ButtonOutlinePathSegment(cr, segment); - double x = 0.0; - double y = 2.0; - double w = cairo_image_surface_get_width(cairo_get_target(cr)); - double h = cairo_image_surface_get_height(cairo_get_target(cr)) - 4.0; + double x = 0.0; + double y = 2.0; + double w, h; + get_actual_cairo_size(cr, &w, &h); + h -= 4.0; if (segment == Segment::LEFT) { @@ -2000,8 +1949,9 @@ double x = 0.0; double y = 2.0; - double w = cairo_image_surface_get_width(cairo_get_target(cr)); - double h = cairo_image_surface_get_height(cairo_get_target(cr)) - 4.0; + double w, h; + get_actual_cairo_size(cr, &w, &h); + h -= 4.0; if (segment == Segment::LEFT) { @@ -2093,8 +2043,8 @@ if (cairo_surface_get_type(cairo_get_target(cr)) != CAIRO_SURFACE_TYPE_IMAGE) return false; - double w = cairo_image_surface_get_width(cairo_get_target(cr)); - double h = cairo_image_surface_get_height(cairo_get_target(cr)); + double w, h; + get_actual_cairo_size(cr, &w, &h); double x = w / 2.0; double y = 2.0; @@ -2121,8 +2071,8 @@ if (cairo_surface_get_type(cairo_get_target(cr)) != CAIRO_SURFACE_TYPE_IMAGE) return false; - double w = cairo_image_surface_get_width(cairo_get_target(cr)); - double h = cairo_image_surface_get_height(cairo_get_target(cr)); + double w, h; + get_actual_cairo_size(cr, &w, &h); double x = 2.0; double y = h / 2.0; @@ -2140,389 +2090,363 @@ return true; } -int Style::GetButtonGarnishSize() +BaseTexturePtr Style::GetDashBottomTile(double scale) const { - int maxBlurSize = 0; - - for (int i = 0; i < STATES; i++) - { - if (maxBlurSize < pimpl->button_label_blur_size_[i]) - maxBlurSize = pimpl->button_label_blur_size_[i]; - } - - return 2 * maxBlurSize; + return pimpl->LoadScaledTexture("dash_bottom_border_tile.png", scale); } -int Style::GetSeparatorGarnishSize() +BaseTexturePtr Style::GetDashBottomTileMask(double scale) const { - return pimpl->separator_blur_size_; + return pimpl->LoadScaledTexture("dash_bottom_border_tile_mask.png", scale); } -int Style::GetScrollbarGarnishSize() +BaseTexturePtr Style::GetDashRightTile(double scale) const { - return pimpl->scrollbar_blur_size_; + return pimpl->LoadScaledTexture("dash_right_border_tile.png", scale); } -nux::Color const& Style::GetTextColor() const +BaseTexturePtr Style::GetDashRightTileMask(double scale) const { - return pimpl->text_color_; + return pimpl->LoadScaledTexture("dash_right_border_tile_mask.png", scale); } -int Style::GetDefaultNColumns() const +BaseTexturePtr Style::GetDashLeftTile(double scale) const { - return pimpl->number_of_columns_; + return pimpl->LoadScaledTexture("dash_left_tile.png", scale); } -void Style::SetDefaultNColumns(int n_cols) +BaseTexturePtr Style::GetDashTopTile(double scale) const { - if (pimpl->number_of_columns_ == n_cols) - return; - - pimpl->number_of_columns_ = n_cols; - - columns_changed.emit(); + return pimpl->LoadScaledTexture("dash_top_tile.png", scale); } -int Style::GetTileGIconSize() const +BaseTexturePtr Style::GetDashCorner(double scale) const { - return 64; + return pimpl->LoadScaledTexture("dash_bottom_right_corner.png", scale); } -int Style::GetTileImageSize() const +BaseTexturePtr Style::GetDashCornerMask(double scale) const { - return 96; + return pimpl->LoadScaledTexture("dash_bottom_right_corner_mask.png", scale); } -int Style::GetTileWidth() const +BaseTexturePtr Style::GetDashLeftCorner(double scale) const { - return std::max(pimpl->text_width_, 150); + return pimpl->LoadScaledTexture("dash_bottom_left_corner.png", scale); } -int Style::GetTileHeight() const +BaseTexturePtr Style::GetDashLeftCornerMask(double scale) const { - return std::max(GetTileImageSize() + (pimpl->text_height_ * 2) + 15, - GetTileImageSize() + 32); // magic design numbers. + return pimpl->LoadScaledTexture("dash_bottom_left_corner_mask.png", scale); } -int Style::GetTileIconHightlightHeight() const +BaseTexturePtr Style::GetDashTopCorner(double scale) const { - return 106; + return pimpl->LoadScaledTexture("dash_top_right_corner.png", scale); } -int Style::GetTileIconHightlightWidth() const +BaseTexturePtr Style::GetDashTopCornerMask(double scale) const { - return 106; + return pimpl->LoadScaledTexture("dash_top_right_corner_mask.png", scale); } -int Style::GetHomeTileIconSize() const +BaseTexturePtr Style::GetSearchMagnifyIcon(double scale) const { - return 104; + return pimpl->LoadScaledTexture("search_magnify.svg", scale); } -int Style::GetHomeTileWidth() const +BaseTexturePtr Style::GetSearchCircleIcon(double scale) const { - return pimpl->text_width_ * 1.2; + return pimpl->LoadScaledTexture("search_circle.svg", scale); } -int Style::GetHomeTileHeight() const +BaseTexturePtr Style::GetSearchCloseIcon(double scale) const { - return GetHomeTileIconSize() + (pimpl->text_height_ * 5); + return pimpl->LoadScaledTexture("search_close.svg", scale); } -int Style::GetTextLineHeight() const +BaseTexturePtr Style::GetSearchSpinIcon(double scale) const { - return pimpl->text_height_; + return pimpl->LoadScaledTexture("search_spin.svg", scale); } -nux::BaseTexture* Style::GetCategoryBackground() +RawPixel Style::GetButtonGarnishSize() const { - return pimpl->category_texture_.texture(); -} - -nux::BaseTexture* Style::GetCategoryBackgroundNoFilters() -{ - return pimpl->category_texture_no_filters_.texture(); -} + int maxBlurSize = 0; -nux::BaseTexture* Style::GetDashBottomTile() -{ - return pimpl->dash_bottom_texture_.texture(); -} + for (int i = 0; i < STATES; i++) + { + if (maxBlurSize < pimpl->button_label_blur_size_[i]) + maxBlurSize = pimpl->button_label_blur_size_[i]; + } -nux::BaseTexture* Style::GetDashBottomTileMask() -{ - return pimpl->dash_bottom_texture_mask_.texture(); + return 2 * maxBlurSize; } -nux::BaseTexture* Style::GetDashRightTile() +RawPixel Style::GetSeparatorGarnishSize() const { - return pimpl->dash_right_texture_.texture(); + return pimpl->separator_blur_size_; } -nux::BaseTexture* Style::GetDashRightTileMask() +RawPixel Style::GetScrollbarGarnishSize() const { - return pimpl->dash_right_texture_mask_.texture(); + return pimpl->scrollbar_blur_size_; } -nux::BaseTexture* Style::GetDashCorner() +nux::Color const& Style::GetTextColor() const { - return pimpl->dash_corner_texture_.texture(); + return pimpl->text_color_; } -nux::BaseTexture* Style::GetDashCornerMask() +RawPixel Style::GetTileGIconSize() const { - return pimpl->dash_corner_texture_mask_.texture(); + return 64; } -nux::BaseTexture* Style::GetDashLeftEdge() +RawPixel Style::GetTileImageSize() const { - return pimpl->dash_left_edge_.texture(); + return 96; } -nux::BaseTexture* Style::GetDashLeftCorner() +RawPixel Style::GetTileWidth() const { - return pimpl->dash_left_corner_.texture(); + return std::max(pimpl->text_width_, 150); } -nux::BaseTexture* Style::GetDashLeftCornerMask() +RawPixel Style::GetTileHeight() const { - return pimpl->dash_left_corner_mask_.texture(); + return std::max(GetTileImageSize() + (pimpl->text_height_ * 2) + 15, + GetTileImageSize() + 32); // magic design numbers. } -nux::BaseTexture* Style::GetDashLeftTile() +RawPixel Style::GetTileIconHightlightHeight() const { - return pimpl->dash_left_tile_.texture(); + return 106; } -nux::BaseTexture* Style::GetDashTopCorner() +RawPixel Style::GetTileIconHightlightWidth() const { - return pimpl->dash_top_corner_.texture(); + return 106; } -nux::BaseTexture* Style::GetDashTopCornerMask() +RawPixel Style::GetHomeTileIconSize() const { - return pimpl->dash_top_corner_mask_.texture(); + return 104; } -nux::BaseTexture* Style::GetDashTopTile() +RawPixel Style::GetHomeTileWidth() const { - return pimpl->dash_top_tile_.texture(); + return pimpl->text_width_ * 1.2; } -nux::BaseTexture* Style::GetDashFullscreenIcon() +RawPixel Style::GetHomeTileHeight() const { - return pimpl->dash_fullscreen_icon_.texture(); + return GetHomeTileIconSize() + (pimpl->text_height_ * 5); } -nux::BaseTexture* Style::GetSearchMagnifyIcon() +RawPixel Style::GetTextLineHeight() const { - return pimpl->search_magnify_texture_.texture(); + return pimpl->text_height_; } -nux::BaseTexture* Style::GetSearchCircleIcon() -{ - return pimpl->search_circle_texture_.texture(); -} -nux::BaseTexture* Style::GetSearchCloseIcon() +BaseTexturePtr const& Style::GetCategoryBackground() const { - return pimpl->search_close_texture_.texture(); + return pimpl->category_texture_.texture(); } -nux::BaseTexture* Style::GetSearchSpinIcon() +BaseTexturePtr const& Style::GetCategoryBackgroundNoFilters() const { - return pimpl->search_spin_texture_.texture(); + return pimpl->category_texture_no_filters_.texture(); } -nux::BaseTexture* Style::GetInformationTexture() +BaseTexturePtr const& Style::GetInformationTexture() const { return pimpl->information_texture_.texture(); } -nux::BaseTexture* Style::GetRefineTextureCorner() +BaseTexturePtr const& Style::GetRefineTextureCorner() const { return pimpl->refine_gradient_corner_.texture(); } -nux::BaseTexture* Style::GetRefineTextureDash() +BaseTexturePtr const& Style::GetRefineTextureDash() const { return pimpl->refine_gradient_dash_.texture(); } -nux::BaseTexture* Style::GetGroupUnexpandIcon() +BaseTexturePtr const& Style::GetGroupUnexpandIcon() const { return pimpl->group_unexpand_texture_.texture(); } -nux::BaseTexture* Style::GetGroupExpandIcon() +BaseTexturePtr const& Style::GetGroupExpandIcon() const { return pimpl->group_expand_texture_.texture(); } -nux::BaseTexture* Style::GetStarDeselectedIcon() +BaseTexturePtr const& Style::GetStarDeselectedIcon() const { return pimpl->star_deselected_texture_.texture(); } -nux::BaseTexture* Style::GetStarSelectedIcon() +BaseTexturePtr const& Style::GetStarSelectedIcon() const { return pimpl->star_selected_texture_.texture(); } -nux::BaseTexture* Style::GetStarHighlightIcon() +BaseTexturePtr const& Style::GetStarHighlightIcon() const { return pimpl->star_highlight_texture_.texture(); } -nux::BaseTexture* Style::GetDashShine() +BaseTexturePtr const& Style::GetDashShine() const { return pimpl->dash_shine_.texture(); } -int Style::GetDashBottomTileHeight() const +RawPixel Style::GetDashBottomTileHeight() const { return 30; } -int Style::GetDashRightTileWidth() const +RawPixel Style::GetDashRightTileWidth() const { return 30; } -int Style::GetVSeparatorSize() const +RawPixel Style::GetVSeparatorSize() const { return 1; } -int Style::GetHSeparatorSize() const +RawPixel Style::GetHSeparatorSize() const { return 1; - } -int Style::GetFilterBarWidth() const +RawPixel Style::GetFilterBarWidth() const { return 300; } - -int Style::GetFilterBarLeftPadding() const +RawPixel Style::GetFilterBarLeftPadding() const { return 5; } -int Style::GetFilterBarRightPadding() const +RawPixel Style::GetFilterBarRightPadding() const { return 5; } -int Style::GetDashViewTopPadding() const +RawPixel Style::GetDashViewTopPadding() const { return 10; } -int Style::GetSearchBarLeftPadding() const +RawPixel Style::GetSearchBarLeftPadding() const { return 10; } -int Style::GetSearchBarRightPadding() const +RawPixel Style::GetSearchBarRightPadding() const { return 10; } -int Style::GetSearchBarHeight() const +RawPixel Style::GetSearchBarHeight() const { return 42; } -int Style::GetFilterResultsHighlightRightPadding() const +RawPixel Style::GetFilterResultsHighlightRightPadding() const { return 5; } -int Style::GetFilterResultsHighlightLeftPadding() const +RawPixel Style::GetFilterResultsHighlightLeftPadding() const { return 5; } -int Style::GetFilterBarTopPadding() const +RawPixel Style::GetFilterBarTopPadding() const { return 10; } -int Style::GetFilterHighlightPadding() const +RawPixel Style::GetFilterHighlightPadding() const { return 2; } -int Style::GetSpaceBetweenFilterWidgets() const +RawPixel Style::GetSpaceBetweenFilterWidgets() const { return 12; } -int Style::GetAllButtonHeight() const +RawPixel Style::GetAllButtonHeight() const { return 30; } -int Style::GetFilterButtonHeight() const +RawPixel Style::GetFilterButtonHeight() const { return 30; } -int Style::GetSpaceBetweenScopeAndFilters() const +RawPixel Style::GetSpaceBetweenScopeAndFilters() const { return 10; } -int Style::GetFilterViewRightPadding() const +RawPixel Style::GetFilterViewRightPadding() const { return 10; } -int Style::GetScrollbarWidth() const +RawPixel Style::GetScrollbarWidth() const { return 3; } -int Style::GetCategoryIconSize() const +RawPixel Style::GetCategoryIconSize() const { return 22; } -int Style::GetCategoryHighlightHeight() const +RawPixel Style::GetCategoryHighlightHeight() const { return 24; } -int Style::GetPlacesGroupTopSpace() const +RawPixel Style::GetPlacesGroupTopSpace() const { return 7; } -int Style::GetPlacesGroupResultTopPadding() const +RawPixel Style::GetPlacesGroupResultTopPadding() const { return 2; } -int Style::GetPlacesGroupResultLeftPadding() const +RawPixel Style::GetPlacesGroupResultLeftPadding() const { return 25; } -int Style::GetCategoryHeaderLeftPadding() const +RawPixel Style::GetCategoryHeaderLeftPadding() const { return 19; } -int Style::GetCategorySeparatorLeftPadding() const +RawPixel Style::GetCategorySeparatorLeftPadding() const { return 15; } -int Style::GetCategorySeparatorRightPadding() const +RawPixel Style::GetCategorySeparatorRightPadding() const { return 15; } @@ -2536,11 +2460,11 @@ { } -nux::BaseTexture* LazyLoadTexture::texture() +BaseTexturePtr const& LazyLoadTexture::texture() { if (!texture_) LoadTexture(); - return texture_.GetPointer(); + return texture_; } void LazyLoadTexture::LoadTexture() diff -Nru unity-7.1.2+14.04.20140303/unity-shared/DashStyle.h unity-7.2.4+14.04.20141217/unity-shared/DashStyle.h --- unity-7.1.2+14.04.20140303/unity-shared/DashStyle.h 2014-03-03 16:47:14.000000000 +0000 +++ unity-7.2.4+14.04.20141217/unity-shared/DashStyle.h 2014-12-17 20:51:37.000000000 +0000 @@ -37,6 +37,7 @@ { namespace dash { +typedef nux::ObjectPtr BaseTexturePtr; enum class StockIcon { CHECKMARK, @@ -135,11 +136,11 @@ virtual bool SeparatorHoriz(cairo_t* cr); - virtual int GetButtonGarnishSize(); + RawPixel GetButtonGarnishSize() const; - virtual int GetSeparatorGarnishSize(); + RawPixel GetSeparatorGarnishSize() const; - virtual int GetScrollbarGarnishSize(); + RawPixel GetScrollbarGarnishSize() const; void Blur(cairo_t* cr, int size); @@ -153,111 +154,104 @@ nux::Color const& GetTextColor() const; - // TODO nux::Property - int GetDefaultNColumns() const; - void SetDefaultNColumns(int n_cols); - sigc::signal columns_changed; - - int GetTileGIconSize() const; - int GetTileImageSize() const; - int GetTileWidth() const; - int GetTileHeight() const; - int GetTileIconHightlightHeight() const; - int GetTileIconHightlightWidth() const; - - int GetHomeTileIconSize() const; - int GetHomeTileWidth() const; - int GetHomeTileHeight() const; - - int GetTextLineHeight() const; - - nux::BaseTexture* GetCategoryBackground(); - nux::BaseTexture* GetCategoryBackgroundNoFilters(); - nux::BaseTexture* GetDashBottomTile(); - nux::BaseTexture* GetDashBottomTileMask(); - nux::BaseTexture* GetDashRightTile(); - nux::BaseTexture* GetDashRightTileMask(); - nux::BaseTexture* GetDashCorner(); - nux::BaseTexture* GetDashCornerMask(); - nux::BaseTexture* GetDashFullscreenIcon(); - nux::BaseTexture* GetDashLeftEdge(); - nux::BaseTexture* GetDashLeftCorner(); - nux::BaseTexture* GetDashLeftCornerMask(); - nux::BaseTexture* GetDashLeftTile(); - nux::BaseTexture* GetDashTopCorner(); - nux::BaseTexture* GetDashTopCornerMask(); - nux::BaseTexture* GetDashTopTile(); - - int GetDashBottomTileHeight() const; - int GetDashRightTileWidth() const; - - nux::BaseTexture* GetDashShine(); - - nux::BaseTexture* GetSearchMagnifyIcon(); - nux::BaseTexture* GetSearchCircleIcon(); - nux::BaseTexture* GetSearchCloseIcon(); - nux::BaseTexture* GetSearchSpinIcon(); - - nux::BaseTexture* GetGroupUnexpandIcon(); - nux::BaseTexture* GetGroupExpandIcon(); - - nux::BaseTexture* GetStarDeselectedIcon(); - nux::BaseTexture* GetStarSelectedIcon(); - nux::BaseTexture* GetStarHighlightIcon(); - - nux::BaseTexture* GetInformationTexture(); - - nux::BaseTexture* GetRefineTextureCorner(); - nux::BaseTexture* GetRefineTextureDash(); - + RawPixel GetTileGIconSize() const; + RawPixel GetTileImageSize() const; + RawPixel GetTileWidth() const; + RawPixel GetTileHeight() const; + RawPixel GetTileIconHightlightHeight() const; + RawPixel GetTileIconHightlightWidth() const; + + RawPixel GetHomeTileIconSize() const; + RawPixel GetHomeTileWidth() const; + RawPixel GetHomeTileHeight() const; + + RawPixel GetTextLineHeight() const; + + BaseTexturePtr const& GetCategoryBackground() const; + BaseTexturePtr const& GetCategoryBackgroundNoFilters() const; + + BaseTexturePtr GetDashBottomTile(double scale) const; + BaseTexturePtr GetDashBottomTileMask(double scale) const; + BaseTexturePtr GetDashRightTile(double scale) const; + BaseTexturePtr GetDashRightTileMask(double scale) const; + BaseTexturePtr GetDashLeftTile(double scale) const; + BaseTexturePtr GetDashTopTile(double scale) const; + + BaseTexturePtr GetDashCorner(double scale) const; + BaseTexturePtr GetDashCornerMask(double scale) const; + BaseTexturePtr GetDashLeftCorner(double scale) const; + BaseTexturePtr GetDashLeftCornerMask(double scale) const; + BaseTexturePtr GetDashTopCorner(double scale) const; + BaseTexturePtr GetDashTopCornerMask(double scale) const; + + RawPixel GetDashBottomTileHeight() const; + RawPixel GetDashRightTileWidth() const; + + BaseTexturePtr const& GetDashShine() const; + + BaseTexturePtr GetSearchMagnifyIcon(double scale) const; + BaseTexturePtr GetSearchCircleIcon(double scale) const; + BaseTexturePtr GetSearchCloseIcon(double scale) const; + BaseTexturePtr GetSearchSpinIcon(double scale) const; + + BaseTexturePtr const& GetGroupUnexpandIcon() const; + BaseTexturePtr const& GetGroupExpandIcon() const; + + BaseTexturePtr const& GetStarDeselectedIcon() const; + BaseTexturePtr const& GetStarSelectedIcon() const; + BaseTexturePtr const& GetStarHighlightIcon() const; + + BaseTexturePtr const& GetInformationTexture() const; + + BaseTexturePtr const& GetRefineTextureCorner() const; + BaseTexturePtr const& GetRefineTextureDash() const; + // Returns the width of the separator between the dash and the launcher. - int GetVSeparatorSize() const; + RawPixel GetVSeparatorSize() const; // Returns the height of the separator between the dash and the top panel. - int GetHSeparatorSize() const; + RawPixel GetHSeparatorSize() const; // Practically it is the space between the top border of the dash and the searchbar. - int GetDashViewTopPadding() const; + RawPixel GetDashViewTopPadding() const; + - // Search bar - int GetSearchBarLeftPadding() const; - int GetSearchBarRightPadding() const; - int GetSearchBarHeight() const; - int GetFilterResultsHighlightRightPadding() const; - int GetFilterResultsHighlightLeftPadding() const; + RawPixel GetSearchBarLeftPadding() const; + RawPixel GetSearchBarRightPadding() const; + RawPixel GetSearchBarHeight() const; // Filter bar - int GetFilterBarTopPadding() const; - int GetFilterHighlightPadding() const; - int GetSpaceBetweenFilterWidgets() const; - int GetAllButtonHeight() const; - int GetFilterBarLeftPadding() const; - int GetFilterBarRightPadding() const; - int GetFilterBarWidth() const; - int GetFilterButtonHeight() const; - int GetFilterViewRightPadding() const; + RawPixel GetFilterResultsHighlightRightPadding() const; + RawPixel GetFilterResultsHighlightLeftPadding() const; + RawPixel GetFilterBarTopPadding() const; + RawPixel GetFilterHighlightPadding() const; + RawPixel GetSpaceBetweenFilterWidgets() const; + RawPixel GetAllButtonHeight() const; + RawPixel GetFilterBarLeftPadding() const; + RawPixel GetFilterBarRightPadding() const; + RawPixel GetFilterBarWidth() const; + RawPixel GetFilterButtonHeight() const; + RawPixel GetFilterViewRightPadding() const; - int GetSpaceBetweenScopeAndFilters() const; + RawPixel GetSpaceBetweenScopeAndFilters() const; // Scrollbars - int GetScrollbarWidth() const; + RawPixel GetScrollbarWidth() const; // Places Group - int GetCategoryIconSize() const; - int GetCategoryHighlightHeight() const; - int GetPlacesGroupTopSpace() const; - int GetPlacesGroupResultTopPadding() const; - int GetPlacesGroupResultLeftPadding() const; - int GetCategoryHeaderLeftPadding() const; - int GetCategorySeparatorLeftPadding() const; - int GetCategorySeparatorRightPadding() const; - - bool GetUseBlur() const; - + RawPixel GetCategoryIconSize() const; + RawPixel GetCategoryHighlightHeight() const; + RawPixel GetPlacesGroupTopSpace() const; + RawPixel GetPlacesGroupResultTopPadding() const; + RawPixel GetPlacesGroupResultLeftPadding() const; + RawPixel GetCategoryHeaderLeftPadding() const; + RawPixel GetCategorySeparatorLeftPadding() const; + RawPixel GetCategorySeparatorRightPadding() const; sigc::signal changed; + nux::Property columns_number; nux::Property always_maximised; nux::Property preview_mode; diff -Nru unity-7.1.2+14.04.20140303/unity-shared/DashStyleInterface.h unity-7.2.4+14.04.20141217/unity-shared/DashStyleInterface.h --- unity-7.1.2+14.04.20140303/unity-shared/DashStyleInterface.h 2014-03-03 16:47:14.000000000 +0000 +++ unity-7.2.4+14.04.20141217/unity-shared/DashStyleInterface.h 2014-12-17 20:51:37.000000000 +0000 @@ -21,10 +21,12 @@ #define UNITYSHELL_DASH_STYLE_INTERFACE_H #include +#include "unity-shared/RawPixel.h" namespace nux { class AbstractPaintLayer; class BaseTexture; + template class ObjectPtr; } namespace unity { @@ -37,17 +39,17 @@ virtual nux::AbstractPaintLayer* FocusOverlay(int width, int height) = 0; - virtual nux::BaseTexture* GetCategoryBackground() = 0; - virtual nux::BaseTexture* GetCategoryBackgroundNoFilters() = 0; + virtual nux::ObjectPtr const& GetCategoryBackground() const = 0; + virtual nux::ObjectPtr const& GetCategoryBackgroundNoFilters() const = 0; - virtual nux::BaseTexture* GetGroupUnexpandIcon() = 0; - virtual nux::BaseTexture* GetGroupExpandIcon() = 0; + virtual nux::ObjectPtr const& GetGroupUnexpandIcon() const = 0; + virtual nux::ObjectPtr const& GetGroupExpandIcon() const = 0; - virtual int GetCategoryIconSize() const = 0; - virtual int GetCategoryHeaderLeftPadding() const = 0; - virtual int GetPlacesGroupTopSpace() const = 0; - virtual int GetPlacesGroupResultTopPadding() const = 0; - virtual int GetPlacesGroupResultLeftPadding() const = 0; + virtual RawPixel GetCategoryIconSize() const = 0; + virtual RawPixel GetCategoryHeaderLeftPadding() const = 0; + virtual RawPixel GetPlacesGroupTopSpace() const = 0; + virtual RawPixel GetPlacesGroupResultTopPadding() const = 0; + virtual RawPixel GetPlacesGroupResultLeftPadding() const = 0; }; } diff -Nru unity-7.1.2+14.04.20140303/unity-shared/DebugDBusInterface.cpp unity-7.2.4+14.04.20141217/unity-shared/DebugDBusInterface.cpp --- unity-7.1.2+14.04.20140303/unity-shared/DebugDBusInterface.cpp 2014-03-03 16:47:14.000000000 +0000 +++ unity-7.2.4+14.04.20141217/unity-shared/DebugDBusInterface.cpp 2014-12-17 20:51:37.000000000 +0000 @@ -84,7 +84,8 @@ { if (!g_variant_is_of_type(prop_value, G_VARIANT_TYPE_STRING)) { - LOG_WARNING(logger) << "Unable to match '"<< name << "', it's not a string property."; + LOG_WARNING(logger) << "Unable to match '"<< name << "', '" << + prop_value << "' is not a string property."; return false; } @@ -102,7 +103,8 @@ { if (!g_variant_is_of_type(prop_value, G_VARIANT_TYPE_BOOLEAN)) { - LOG_WARNING(logger) << "Unable to match '"<< name << "', it's not a boolean property."; + LOG_WARNING(logger) << "Unable to match '"<< name << "', '" << + prop_value << "' is not a boolean property."; return false; } @@ -138,7 +140,8 @@ case G_VARIANT_CLASS_UINT64: return static_cast(value) == prop_value.GetUInt64(); default: - LOG_WARNING(logger) << "Unable to match '"<< name << "' against property of unknown integer type."; + LOG_WARNING(logger) << "Unable to match '"<< name << "', '" << + prop_value << "' is not a known integer property."; }; } @@ -152,7 +155,24 @@ IntrospectionData introspection; node_->AddProperties(introspection); - return g_variant_lookup_value(glib::Variant(introspection.Get()), name.c_str(), nullptr); + + glib::Variant value(g_variant_lookup_value(glib::Variant(introspection.Get()), name.c_str(), nullptr), glib::StealRef()); + + if (!value) + return nullptr; + + if (!g_variant_is_of_type(value, G_VARIANT_TYPE_ARRAY) || g_variant_n_children(value) != 2) + { + LOG_ERROR(logger) << "Property value for '"<< name << "' should be a 2-sized array, got instead '" << value << "'"; + return nullptr; + } + + glib::Variant child(g_variant_get_child_value(value, 1), glib::StealRef()); + + if (g_variant_is_of_type(child, G_VARIANT_TYPE_VARIANT)) + return child.GetVariant(); + + return child; } std::vector Children() const diff -Nru unity-7.1.2+14.04.20140303/unity-shared/DecorationStyle.cpp unity-7.2.4+14.04.20141217/unity-shared/DecorationStyle.cpp --- unity-7.1.2+14.04.20140303/unity-shared/DecorationStyle.cpp 2014-03-03 16:47:36.000000000 +0000 +++ unity-7.2.4+14.04.20141217/unity-shared/DecorationStyle.cpp 2014-12-17 20:51:54.000000000 +0000 @@ -61,6 +61,9 @@ const std::string SETTINGS_NAME = "org.gnome.desktop.wm.preferences"; const std::string FONT_KEY = "titlebar-font"; const std::string USE_SYSTEM_FONT_KEY = "titlebar-uses-system-font"; +const std::string ACTION_DOUBLE_CLICK = "action-double-click-titlebar"; +const std::string ACTION_MIDDLE_CLICK = "action-middle-click-titlebar"; +const std::string ACTION_RIGHT_CLICK = "action-right-click-titlebar"; const std::string UNITY_SETTINGS_NAME = "com.canonical.Unity.Decorations"; const std::string GRAB_WAIT_KEY = "grab-wait"; @@ -144,8 +147,8 @@ , ctx_(gtk_style_context_new()) , settings_(g_settings_new(SETTINGS_NAME.c_str())) , usettings_(g_settings_new(UNITY_SETTINGS_NAME.c_str())) - , title_pango_ctx_(gdk_pango_context_get_for_screen(gdk_screen_get_default())) - , menu_item_pango_ctx_(gdk_pango_context_get_for_screen(gdk_screen_get_default())) + , title_pango_ctx_(gdk_pango_context_get()) + , menu_item_pango_ctx_(gdk_pango_context_get()) , title_alignment_(0) , title_indent_(0) , title_fade_(0) @@ -157,6 +160,7 @@ parent_->integrated_menus = false; parent_->theme = glib::String(GetSettingValue("gtk-theme-name")).Str(); parent_->font = glib::String(GetSettingValue("gtk-font-name")).Str(); + parent_->font_scale = 1.0; SetTitleFont(); UpdateTitlePangoContext(parent_->title_font); @@ -185,14 +189,12 @@ LOG_INFO(logger) << "gtk-font-name changed to " << parent_->font(); }); - signals_.Add(settings, "notify::gtk-xft-dpi", [this] (GtkSettings*, GParamSpec*) { - title_pango_ctx_ = gdk_pango_context_get_for_screen(gdk_screen_get_default()); - menu_item_pango_ctx_ = gdk_pango_context_get_for_screen(gdk_screen_get_default()); + parent_->font_scale.changed.connect([this] (bool scale) { UpdateTitlePangoContext(parent_->title_font); UpdateMenuItemPangoContext(parent_->font); gtk_style_context_invalidate(ctx_); parent_->theme.changed.emit(parent_->theme()); - LOG_INFO(logger) << "gtk-xft-dpi changed to " << GetSettingValue("gtk-xft-dpi"); + LOG_INFO(logger) << "font scale changed to " << scale; }); signals_.Add(settings_, "changed::" + FONT_KEY, [this] (GSettings*, gchar*) { @@ -255,6 +257,7 @@ std::shared_ptr desc(pango_font_description_from_string(font.c_str()), pango_font_description_free); pango_context_set_font_description(ctx, desc.get()); pango_context_set_language(ctx, gtk_get_default_language()); + pango_cairo_context_set_resolution(ctx, 96.0 * parent_->font_scale()); } void UpdateTitlePangoContext(std::string const& font) @@ -299,6 +302,49 @@ return value; } + WMAction WMActionFromString(std::string const& action) const + { + if (action == "toggle-shade") + return WMAction::TOGGLE_SHADE; + else if (action == "toggle-maximize") + return WMAction::TOGGLE_MAXIMIZE; + else if (action == "toggle-maximize-horizontally") + return WMAction::TOGGLE_MAXIMIZE_HORIZONTALLY; + else if (action == "toggle-maximize-vertically") + return WMAction::TOGGLE_MAXIMIZE_VERTICALLY; + else if (action == "minimize") + return WMAction::MINIMIZE; + else if (action == "shade") + return WMAction::SHADE; + else if (action == "menu") + return WMAction::MENU; + else if (action == "lower") + return WMAction::LOWER; + + return WMAction::NONE; + } + + WMAction WindowManagerAction(WMEvent event) const + { + std::string action_setting; + + switch (event) + { + case WMEvent::DOUBLE_CLICK: + action_setting = ACTION_DOUBLE_CLICK; + break; + case WMEvent::MIDDLE_CLICK: + action_setting = ACTION_MIDDLE_CLICK; + break; + case WMEvent::RIGHT_CLICK: + action_setting = ACTION_RIGHT_CLICK; + break; + } + + glib::String action_string(g_settings_get_string(settings_, action_setting.c_str())); + return WMActionFromString(action_string.Str()); + } + inline GtkStateFlags GtkStateFromWidgetState(WidgetState ws) { switch (ws) @@ -324,12 +370,13 @@ return GTK_STATE_FLAG_NORMAL; } - void AddContextClasses(Side s, WidgetState ws) + void AddContextClasses(Side s, WidgetState ws, GtkStyleContext* ctx = nullptr) { - gtk_style_context_add_class(ctx_, "gnome-panel-menu-bar"); - if (s == Side::TOP) { gtk_style_context_add_class(ctx_, "header-bar"); } - gtk_style_context_add_class(ctx_, GetBorderClass(s).c_str()); - gtk_style_context_set_state(ctx_, GtkStateFromWidgetState(ws)); + ctx = ctx ? ctx : ctx_; + gtk_style_context_add_class(ctx, "gnome-panel-menu-bar"); + if (s == Side::TOP) { gtk_style_context_add_class(ctx, "header-bar"); } + gtk_style_context_add_class(ctx, GetBorderClass(s).c_str()); + gtk_style_context_set_state(ctx, GtkStateFromWidgetState(ws)); } void DrawSide(Side s, WidgetState ws, cairo_t* cr, double w, double h) @@ -499,24 +546,42 @@ return extents; } - void DrawTitle(std::string const& text, WidgetState ws, cairo_t* cr, double w, double h) + void DrawTextBackground(GtkStyleContext* ctx, cairo_t* cr, glib::Object const& layout, nux::Rect const& bg_geo) { - gtk_style_context_save(ctx_); - AddContextClasses(Side::TOP, ws); + if (bg_geo.IsNull()) + return; + + // We need to render the background under the text glyphs, or the edge + // of the text won't be correctly anti-aliased. See bug #723167 + cairo_push_group(cr); + gtk_render_layout(ctx, cr, 0, 0, layout); + std::shared_ptr pat(cairo_pop_group(cr), cairo_pattern_destroy); + + cairo_push_group(cr); + gtk_render_background(ctx, cr, bg_geo.x, bg_geo.y, bg_geo.width, bg_geo.height); + cairo_pop_group_to_source(cr); + cairo_mask(cr, pat.get()); + } + + void DrawTitle(std::string const& text, WidgetState ws, cairo_t* cr, double w, double h, nux::Rect const& bg_geo, GtkStyleContext* ctx) + { + gtk_style_context_save(ctx); + AddContextClasses(Side::TOP, ws, ctx); auto const& layout = BuildPangoLayout(title_pango_ctx_, text); nux::Size extents; pango_layout_get_pixel_size(layout, &extents.width, &extents.height); - pango_layout_set_height(layout, (h > 0) ? h * PANGO_SCALE : -1); + pango_layout_set_height(layout, (h >= 0) ? h * PANGO_SCALE : -1); - if (extents.width > w) + if (w >= 0 && extents.width > w) { double out_pixels = extents.width - w; double fading_width = std::min(title_fade_, out_pixels); cairo_push_group(cr); - gtk_render_layout(ctx_, cr, 0, 0, layout); + DrawTextBackground(ctx, cr, layout, bg_geo); + gtk_render_layout(ctx, cr, 0, 0, layout); cairo_pop_group_to_source(cr); std::shared_ptr linpat(cairo_pattern_create_linear(w - fading_width, 0, w, 0), @@ -528,11 +593,12 @@ } else { - pango_layout_set_width(layout, w * PANGO_SCALE); - gtk_render_layout(ctx_, cr, 0, 0, layout); + pango_layout_set_width(layout, (w >= 0) ? w * PANGO_SCALE : -1); + DrawTextBackground(ctx, cr, layout, bg_geo); + gtk_render_layout(ctx, cr, 0, 0, layout); } - gtk_style_context_restore(ctx_); + gtk_style_context_restore(ctx); } inline void AddContextClassesForMenuItem(WidgetState ws) @@ -554,7 +620,7 @@ gtk_style_context_restore(ctx_); } - void DrawMenuItemEntry(std::string const& text, WidgetState ws, cairo_t* cr, double w, double h) + void DrawMenuItemEntry(std::string const& text, WidgetState ws, cairo_t* cr, double w, double h, nux::Rect const& bg_geo) { gtk_style_context_save(ctx_); AddContextClassesForMenuItem(ws); @@ -571,8 +637,9 @@ pango_attr_list_unref(text_attribs); } - pango_layout_set_width(layout, w * PANGO_SCALE); - pango_layout_set_height(layout, (h > 0) ? h * PANGO_SCALE : -1); + pango_layout_set_width(layout, (w >= 0) ? w * PANGO_SCALE : -1); + pango_layout_set_height(layout, (h >= 0) ? h * PANGO_SCALE : -1); + DrawTextBackground(ctx_, cr, layout, bg_geo); gtk_render_layout(ctx_, cr, 0, 0, layout); gtk_style_context_restore(ctx_); @@ -659,9 +726,9 @@ impl_->DrawSide(s, ws, cr, w, h); } -void Style::DrawTitle(std::string const& t, WidgetState ws, cairo_t* cr, double w, double h) +void Style::DrawTitle(std::string const& t, WidgetState ws, cairo_t* cr, double w, double h, nux::Rect const& bg_geo, GtkStyleContext* ctx) { - impl_->DrawTitle(t, ws, cr, w, h); + impl_->DrawTitle(t, ws, cr, w, h, bg_geo, ctx ? ctx : impl_->ctx_); } void Style::DrawMenuItem(WidgetState ws, cairo_t* cr, double w, double h) @@ -669,9 +736,9 @@ impl_->DrawMenuItem(ws, cr, w, h); } -void Style::DrawMenuItemEntry(std::string const& t, WidgetState ws, cairo_t* cr, double w, double h) +void Style::DrawMenuItemEntry(std::string const& t, WidgetState ws, cairo_t* cr, double w, double h, nux::Rect const& bg_geo) { - impl_->DrawMenuItemEntry(t, ws, cr, w, h); + impl_->DrawMenuItemEntry(t, ws, cr, w, h, bg_geo); } void Style::DrawMenuItemIcon(std::string const& i, WidgetState ws, cairo_t* cr, int s) @@ -755,6 +822,11 @@ return impl_->glow_color_; } +WMAction Style::WindowManagerAction(WMEvent event) const +{ + return impl_->WindowManagerAction(event); +} + int Style::DoubleClickMaxDistance() const { return impl_->GetSettingValue("gtk-double-click-distance"); diff -Nru unity-7.1.2+14.04.20140303/unity-shared/DecorationStyle.h unity-7.2.4+14.04.20141217/unity-shared/DecorationStyle.h --- unity-7.1.2+14.04.20140303/unity-shared/DecorationStyle.h 2014-03-03 16:47:36.000000000 +0000 +++ unity-7.2.4+14.04.20141217/unity-shared/DecorationStyle.h 2014-12-17 20:51:37.000000000 +0000 @@ -21,10 +21,11 @@ #define UNITY_DECORATION_STYLE #include -#include -#include +#include #include +struct _GtkStyleContext; + namespace unity { namespace decoration @@ -67,6 +68,26 @@ Size }; +enum class WMEvent +{ + DOUBLE_CLICK = 1, + MIDDLE_CLICK = 2, + RIGHT_CLICK = 3 +}; + +enum class WMAction +{ + TOGGLE_SHADE, + TOGGLE_MAXIMIZE, + TOGGLE_MAXIMIZE_HORIZONTALLY, + TOGGLE_MAXIMIZE_VERTICALLY, + MINIMIZE, + SHADE, + MENU, + LOWER, + NONE +}; + struct Border { Border(int top, int left, int right, int bottom) @@ -99,6 +120,7 @@ nux::Property title_font; nux::Property integrated_menus; nux::Property grab_wait; + nux::Property font_scale; decoration::Border const& Border() const; decoration::Border const& InputBorder() const; @@ -125,13 +147,14 @@ std::string WindowButtonFile(WindowButtonType, WidgetState) const; void DrawWindowButton(WindowButtonType, WidgetState, cairo_t*, double width, double height); + WMAction WindowManagerAction(WMEvent) const; int DoubleClickMaxDistance() const; int DoubleClickMaxTimeDelta() const; void DrawSide(Side, WidgetState, cairo_t*, double width, double height); - void DrawTitle(std::string const&, WidgetState, cairo_t*, double width, double height); + void DrawTitle(std::string const&, WidgetState, cairo_t*, double width, double height, nux::Rect const& bg_geo = nux::Rect(), _GtkStyleContext* ctx = nullptr); void DrawMenuItem(WidgetState, cairo_t*, double width, double height); - void DrawMenuItemEntry(std::string const&, WidgetState, cairo_t*, double width, double height); + void DrawMenuItemEntry(std::string const&, WidgetState, cairo_t*, double width, double height, nux::Rect const& bg_geo = nux::Rect()); void DrawMenuItemIcon(std::string const&, WidgetState, cairo_t*, int size); private: diff -Nru unity-7.1.2+14.04.20140303/unity-shared/EMConverter.cpp unity-7.2.4+14.04.20141217/unity-shared/EMConverter.cpp --- unity-7.1.2+14.04.20140303/unity-shared/EMConverter.cpp 2014-03-03 16:47:36.000000000 +0000 +++ unity-7.2.4+14.04.20141217/unity-shared/EMConverter.cpp 2014-12-17 20:51:37.000000000 +0000 @@ -17,6 +17,7 @@ * Authored by: Brandon Schaefer */ +#include #include "EMConverter.h" namespace unity @@ -104,8 +105,7 @@ double EMConverter::CP(int pixels) const { - double pixels_em = PixelsToBaseEM(pixels); - return EMToPixels(pixels_em); + return std::round(pixels * DPIScale()); } double EMConverter::DPIScale() const diff -Nru unity-7.1.2+14.04.20140303/unity-shared/GnomeKeyGrabber.cpp unity-7.2.4+14.04.20141217/unity-shared/GnomeKeyGrabber.cpp --- unity-7.1.2+14.04.20140303/unity-shared/GnomeKeyGrabber.cpp 2014-03-03 16:47:14.000000000 +0000 +++ unity-7.2.4+14.04.20141217/unity-shared/GnomeKeyGrabber.cpp 2014-12-17 20:51:54.000000000 +0000 @@ -96,6 +96,8 @@ if (screen_) screen_->addAction(&actions_.back()); + LOG_DEBUG(logger) << "addAction (\"" << action.keyToString() << "\", " << addressable << ") = " << current_action_id_; + return current_action_id_; } @@ -114,6 +116,8 @@ auto j = actions_.begin() + (i - action_ids_.begin()); auto k = actions_by_action_id_.find(action_id); + LOG_DEBUG(logger) << "removeAction (" << action_id << " \"" << j->keyToString() << "\")"; + if (screen_) screen_->removeAction(&(*j)); @@ -196,10 +200,20 @@ CompAction action; action.keyFromString(accelerator); + if (action.key().toString().empty()) + { + CompString prefixed = "XF86" + CompString(accelerator); + LOG_DEBUG(logger) << "Can't grab \"" << accelerator << "\", trying \"" << prefixed << "\""; + action.keyFromString(prefixed); + } + else + LOG_DEBUG(logger) << "grabAccelerator \"" << accelerator << "\""; + if (!isActionPostponed(action)) { action.setState(CompAction::StateInitKey); action.setInitiate([this](CompAction* action, CompAction::State state, CompOption::Vector& options) { + LOG_DEBUG(logger) << "pressed \"" << action->keyToString() << "\""; activateAction(action, 0); return true; }); @@ -208,8 +222,13 @@ { action.setState(CompAction::StateInitKey | CompAction::StateTermKey); action.setTerminate([this](CompAction* action, CompAction::State state, CompOption::Vector& options) { + auto key = action->keyToString(); + + LOG_DEBUG(logger) << "released \"" << key << "\""; + if (state & CompAction::StateTermTapped) { + LOG_DEBUG(logger) << "tapped \"" << key << "\""; activateAction(action, 0); return true; } @@ -226,7 +245,12 @@ ptrdiff_t i = action - &actions_.front(); if (0 <= i && i < static_cast(action_ids_.size())) - shell_object_->EmitSignal("AcceleratorActivated", g_variant_new("(uu)", action_ids_[i], device)); + { + auto action_id = action_ids_[i]; + + LOG_DEBUG(logger) << "activateAction (" << action_id << " \"" << action->keyToString() << "\")"; + shell_object_->EmitSignal("AcceleratorActivated", g_variant_new("(uu)", action_id, device)); + } } bool GnomeGrabber::Impl::isActionPostponed(CompAction const& action) const diff -Nru unity-7.1.2+14.04.20140303/unity-shared/GtkTexture.h unity-7.2.4+14.04.20141217/unity-shared/GtkTexture.h --- unity-7.1.2+14.04.20140303/unity-shared/GtkTexture.h 1970-01-01 00:00:00.000000000 +0000 +++ unity-7.2.4+14.04.20141217/unity-shared/GtkTexture.h 2014-12-17 20:51:37.000000000 +0000 @@ -0,0 +1,64 @@ +// -*- Mode: C++; indent-tabs-mode: nil; tab-width: 2 -*- +/* + * Copyright 2013 Canonical Ltd. + * + * This program is free software: you can redistribute it and/or modify it + * under the terms of the GNU Lesser General Public License version 3, as + * published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranties of + * MERCHANTABILITY, SATISFACTORY QUALITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the applicable version of the GNU Lesser General Public + * License for more details. + * + * You should have received a copy of both the GNU Lesser General Public + * License version 3 along with this program. If not, see + * + * + * Authored by: Andrea Azzarone + * + */ + +#ifndef UNITY_GDK_TEXTURE_H +#define UNITY_GDK_TEXTURE_H + +#include +#include +#include +#include + +namespace unity +{ + +typedef nux::ObjectPtr BaseTexturePtr; + +// Create a texture from the GdkGraphics object. +// +// Returns a new BaseTexture that has a ref count of 1. +inline nux::BaseTexture* texture_from_gdk_graphics(nux::GdkGraphics const& cg) +{ + nux::NBitmapData* bitmap = cg.GetBitmap(); + nux::BaseTexture* tex = nux::GetGraphicsDisplay()->GetGpuDevice()->CreateSystemCapableTexture(); + tex->Update(bitmap); + delete bitmap; + return tex; +} + +// Create a texture from the GdkGraphics object. +// +// Returns a new smart pointer to a texture where that smart pointer is the +// sole owner of the texture object. +inline BaseTexturePtr texture_ptr_from_gdk_graphics(nux::GdkGraphics const& cg) +{ + BaseTexturePtr result(texture_from_gdk_graphics(cg)); + // Since the ObjectPtr takes a reference, and the texture is initially + // owned, the reference count now is two. + nuxAssert(result->GetReferenceCount() == 2); + result->UnReference(); + return result; +} + +} + +#endif diff -Nru unity-7.1.2+14.04.20140303/unity-shared/IconLoader.cpp unity-7.2.4+14.04.20141217/unity-shared/IconLoader.cpp --- unity-7.1.2+14.04.20140303/unity-shared/IconLoader.cpp 2014-03-03 16:47:14.000000000 +0000 +++ unity-7.2.4+14.04.20141217/unity-shared/IconLoader.cpp 2014-12-17 20:51:37.000000000 +0000 @@ -35,6 +35,7 @@ #include #include "unity-shared/Timer.h" +#include "unity-shared/UnitySettings.h" namespace unity { @@ -313,10 +314,8 @@ PangoContext* pango_context = NULL; GdkScreen* screen = gdk_screen_get_default(); // not ref'ed glib::String font; - int dpi = -1; g_object_get(gtk_settings_get_default(), "gtk-font-name", &font, NULL); - g_object_get(gtk_settings_get_default(), "gtk-xft-dpi", &dpi, NULL); cairo_set_font_options(cr, gdk_screen_get_font_options(screen)); layout = pango_cairo_create_layout(cr); std::shared_ptr desc(pango_font_description_from_string(font), pango_font_description_free); @@ -345,10 +344,8 @@ pango_layout_set_markup(layout, escaped_text, -1); pango_context = pango_layout_get_context(layout); // is not ref'ed - pango_cairo_context_set_font_options(pango_context, - gdk_screen_get_font_options(screen)); - pango_cairo_context_set_resolution(pango_context, - dpi == -1 ? 96.0f : dpi/(float) PANGO_SCALE); + pango_cairo_context_set_font_options(pango_context, gdk_screen_get_font_options(screen)); + pango_cairo_context_set_resolution(pango_context, 96.0 * Settings::Instance().font_scaling()); pango_layout_context_changed(layout); // find proper font size @@ -923,11 +920,7 @@ cairo_t* cr = util_cg.GetInternalContext(); glib::String font; - int dpi = 0; - g_object_get(settings, - "gtk-font-name", &font, - "gtk-xft-dpi", &dpi, - NULL); + g_object_get(settings, "gtk-font-name", &font, nullptr); std::shared_ptr desc(pango_font_description_from_string(font), pango_font_description_free); pango_font_description_set_weight(desc.get(), PANGO_WEIGHT_BOLD); pango_font_description_set_size(desc.get(), FONT_SIZE * PANGO_SCALE); @@ -939,7 +932,7 @@ PangoContext* cxt = pango_layout_get_context(layout); GdkScreen* screen = gdk_screen_get_default(); pango_cairo_context_set_font_options(cxt, gdk_screen_get_font_options(screen)); - pango_cairo_context_set_resolution(cxt, dpi / (double) PANGO_SCALE); + pango_cairo_context_set_resolution(cxt, 96.0 * Settings::Instance().font_scaling()); pango_layout_context_changed(layout); PangoRectangle log_rect; diff -Nru unity-7.1.2+14.04.20140303/unity-shared/IconRenderer.cpp unity-7.2.4+14.04.20141217/unity-shared/IconRenderer.cpp --- unity-7.1.2+14.04.20140303/unity-shared/IconRenderer.cpp 2014-03-03 16:47:36.000000000 +0000 +++ unity-7.2.4+14.04.20141217/unity-shared/IconRenderer.cpp 2014-12-17 20:51:54.000000000 +0000 @@ -26,9 +26,13 @@ #include #include +#include #include #include "unity-shared/CairoTexture.h" +#include "unity-shared/DecorationStyle.h" #include "unity-shared/TextureCache.h" +#include "unity-shared/UnitySettings.h" +#include "unity-shared/WindowManager.h" #include "GraphicsUtils.h" #include @@ -193,6 +197,12 @@ BIG, SIZE, }; + +const std::array TILE_SIZES = { 54, 150 }; +const std::array GLOW_SIZES = { 62, 200 }; +const std::array MARKER_SIZES = { 19, 37 }; + +constexpr double count_scaling(double icon_size, bool switcher) { return icon_size / (TILE_SIZES[local::IconSize::SMALL] * (switcher ? 2.0 : 1.0)); } } // anonymous namespace } // local namespace @@ -204,31 +214,6 @@ return instance; } - nux::ObjectPtr RenderLabelTexture(char label, int icon_size, nux::Color const& bg_color); - - BaseTexturePtr pip_ltr; - BaseTexturePtr large_pip_ltr; - // BaseTexturePtr pip_rtl; - // BaseTexturePtr large_pip_rtl; - BaseTexturePtr arrow_ltr; - BaseTexturePtr arrow_rtl; - BaseTexturePtr arrow_empty_ltr; - // BaseTexturePtr arrow_empty_rtl; - - // BaseTexturePtr squircle_base; - // BaseTexturePtr squircle_base_selected; - // BaseTexturePtr squircle_edge; - // BaseTexturePtr squircle_glow; - // BaseTexturePtr squircle_shadow; - // BaseTexturePtr squircle_shine; - - BaseTexturePtr icon_background[local::IconSize::SIZE]; - BaseTexturePtr icon_selected_background[local::IconSize::SIZE]; - BaseTexturePtr icon_edge[local::IconSize::SIZE]; - BaseTexturePtr icon_glow[local::IconSize::SIZE]; - BaseTexturePtr icon_shadow[local::IconSize::SIZE]; - BaseTexturePtr icon_shine[local::IconSize::SIZE]; - nux::ObjectPtr offscreen_progress_texture; nux::ObjectPtr shader_program_uv_persp_correction; #ifndef USE_GLES @@ -242,8 +227,6 @@ int ColorifyColor; int DesatFactor; - std::map labels; - private: TexturesPool(); @@ -264,15 +247,97 @@ struct IconRenderer::LocalTextures { + LocalTextures(IconRenderer* parent) + : parent_(parent) + { + connections_.Add(decoration::Style::Get()->theme.changed.connect([this] (std::string const&) { + auto& cache = TextureCache::GetDefault(); + + for (auto const& tex_data : texture_files_) + cache.Invalidate(tex_data.name, tex_data.size, tex_data.size); + + ReloadIconSizedTextures(parent_->icon_size, parent_->image_size); + })); + + auto clear_labels = sigc::hide(sigc::mem_fun(this, &LocalTextures::ClearLabels)); + connections_.Add(Settings::Instance().font_scaling.changed.connect(clear_labels)); + connections_.Add(WindowManager::Default().average_color.changed.connect(clear_labels)); + } + void ReloadIconSizedTextures(int icon_size, int image_size) { + using namespace local; + IconSize tex_size = icon_size > 100 ? IconSize::BIG : IconSize::SMALL; + auto const& tile_sufix = std::to_string(TILE_SIZES[tex_size]); + + int icon_glow_size = std::round(icon_size * (GLOW_SIZES[tex_size] / static_cast(TILE_SIZES[tex_size]))); + auto const& glow_sufix = std::to_string(GLOW_SIZES[tex_size]); + + int marker_size = std::round(icon_size * (MARKER_SIZES[tex_size] / static_cast(TILE_SIZES[tex_size]))); + auto const& marker_sufix = std::to_string(MARKER_SIZES[tex_size]); + + texture_files_ = { + {&icon_background, "launcher_icon_back_"+tile_sufix, icon_size}, + {&icon_selected_background, "launcher_icon_selected_back_"+tile_sufix, icon_size}, + {&icon_edge, "launcher_icon_edge_"+tile_sufix, icon_size}, + {&icon_glow, "launcher_icon_glow_"+glow_sufix, icon_glow_size}, + {&icon_shadow, "launcher_icon_shadow_"+glow_sufix, icon_glow_size}, + {&icon_shine, "launcher_icon_shine_"+tile_sufix, icon_size}, + {&arrow_ltr, "launcher_arrow_ltr_"+marker_sufix, marker_size}, + {&arrow_rtl, "launcher_arrow_rtl_"+marker_sufix, marker_size}, + {&arrow_empty_ltr, "launcher_arrow_outline_ltr_"+marker_sufix, marker_size}, + {&pip_ltr, "launcher_pip_ltr_"+marker_sufix, marker_size}, + {&progress_bar_trough, "progress_bar_trough", icon_size}, + {&progress_bar_fill, "progress_bar_fill", image_size - (icon_size - image_size)}, + }; + + auto texture_loader = [] (std::string const& basename, int w, int h) + { + int size = std::max(w, h); + auto const& file = decoration::Style::Get()->ThemedFilePath(basename, {PKGDATADIR"/"}); + return nux::CreateTexture2DFromFile(file.c_str(), (size <= 0 ? -1 : size), true); + }; + auto& cache = TextureCache::GetDefault(); - progress_bar_trough = cache.FindTexture("progress_bar_trough.svg", icon_size, icon_size); - progress_bar_fill = cache.FindTexture("progress_bar_fill.svg", image_size - (icon_size - image_size)); + for (auto const& tex_data : texture_files_) + *tex_data.tex_ptr = cache.FindTexture(tex_data.name, tex_data.size, tex_data.size, texture_loader); } + nux::BaseTexture* RenderLabelTexture(char label, int icon_size, nux::Color const&); + + BaseTexturePtr const& GetLabelTexture(char label, int icon_size, nux::Color const& color) + { + labels_.push_back(TextureCache::GetDefault().FindTexture(std::string(1, label), icon_size, icon_size, [this, &color] (std::string const& label, int size, int) { + return RenderLabelTexture(label[0], size, color); + })); + + return labels_.back(); + } + + void ClearLabels() + { + labels_.clear(); + } + + BaseTexturePtr icon_background; + BaseTexturePtr icon_selected_background; + BaseTexturePtr icon_edge; + BaseTexturePtr icon_glow; + BaseTexturePtr icon_shadow; + BaseTexturePtr icon_shine; + BaseTexturePtr arrow_ltr; + BaseTexturePtr arrow_rtl; + BaseTexturePtr arrow_empty_ltr; + BaseTexturePtr pip_ltr; BaseTexturePtr progress_bar_trough; BaseTexturePtr progress_bar_fill; + +private: + IconRenderer* parent_; + struct TextureData { BaseTexturePtr* tex_ptr; std::string name; int size; }; + std::vector texture_files_; + std::vector labels_; + connection::Manager connections_; }; IconRenderer::IconRenderer() @@ -280,7 +345,7 @@ , image_size(0) , spacing(0) , textures_(TexturesPool::Get()) - , local_textures_(std::make_shared()) + , local_textures_(std::make_shared(this)) { pip_style = OUTSIDE_TILE; } @@ -292,6 +357,7 @@ icon_size = tile_size; image_size = image_size_; local_textures_->ReloadIconSizedTextures(icon_size, image_size); + local_textures_->ClearLabels(); } spacing = spacing_; @@ -309,6 +375,7 @@ GetInverseScreenPerspectiveMatrix(ViewMatrix, ProjectionMatrix, geo.width, geo.height, 0.1f, 1000.0f, DEGTORAD(90)); nux::Matrix4 const& PremultMatrix = ProjectionMatrix * ViewMatrix; + int monitor = this->monitor(); std::list::iterator it; int i; @@ -320,6 +387,7 @@ it->logical_center == launcher_icon->LastLogicalCenter(monitor) && it->rotation == launcher_icon->LastRotation(monitor) && it->skip == launcher_icon->WasSkipping(monitor) && + launcher_icon->Count() == launcher_icon->LastCount(monitor) && (launcher_icon->Emblem() != nullptr) == launcher_icon->HadEmblem(monitor)) { continue; @@ -329,6 +397,7 @@ launcher_icon->RememberRotation(monitor, it->rotation); launcher_icon->RememberSkip(monitor, it->skip); launcher_icon->RememberEmblem(monitor, launcher_icon->Emblem() != nullptr); + launcher_icon->RememberCount(monitor, launcher_icon->Count()); float w = icon_size; float h = icon_size; @@ -362,20 +431,10 @@ UpdateIconTransform(launcher_icon, ViewProjectionMatrix, geo, x, y, w, h, z, ui::IconTextureSource::TRANSFORM_IMAGE); - // hardcode values for now until SVG's are in place and we can remove this - // 200 == size of large glow - // 150 == size of large tile - // 62 == size of small glow - // 54 == size of small tile - float icon_glow_size = 0.0f; - if (icon_size > 100) - icon_glow_size = icon_size * (200.0f / 150.0f); - else - icon_glow_size = icon_size * (62.0f / 54.0f); - w = icon_glow_size; - h = icon_glow_size; - x = it->render_center.x - icon_glow_size / 2.0f; - y = it->render_center.y - icon_glow_size / 2.0f; + w = local_textures_->icon_glow->GetWidth(); + h = local_textures_->icon_glow->GetHeight(); + x = it->render_center.x - w / 2.0f; + y = it->render_center.y - h / 2.0f; z = it->render_center.z; UpdateIconTransform(launcher_icon, ViewProjectionMatrix, geo, x, y, w, h, z, ui::IconTextureSource::TRANSFORM_GLOW); @@ -390,16 +449,26 @@ UpdateIconTransform(launcher_icon, ViewProjectionMatrix, geo, x, y, w, h, z, ui::IconTextureSource::TRANSFORM_HIT_AREA); - if (launcher_icon->Emblem()) + float emb_w, emb_h; + nux::BaseTexture* emblem = launcher_icon->Emblem(); + + if (nux::BaseTexture* count_texture = launcher_icon->CountTexture(local::count_scaling(icon_size, pip_style != OUTSIDE_TILE))) + { + emblem = count_texture; + emb_w = emblem->GetWidth(); + emb_h = emblem->GetHeight(); + } + else if (emblem) { - nux::BaseTexture* emblem = launcher_icon->Emblem(); + emb_w = std::round(emblem->GetWidth() * scale()); + emb_h = std::round(emblem->GetHeight() * scale()); + } + if (emblem) + { float w = icon_size; float h = icon_size; - float emb_w = emblem->GetWidth(); - float emb_h = emblem->GetHeight(); - x = it->render_center.x + (icon_size * 0.50f - emb_w - icon_size * 0.05f); // puts right edge of emblem just over the edge of the launcher icon y = it->render_center.y - icon_size * 0.50f; // y = top left corner position of emblem z = it->render_center.z; @@ -470,8 +539,6 @@ if (!texture_for_size) return; - local::IconSize size = icon_size > 100 ? local::IconSize::BIG : local::IconSize::SMALL; - GfxContext.GetRenderStates().SetBlend(true); GfxContext.GetRenderStates().SetPremultipliedBlend(nux::SRC_OVER); GfxContext.GetRenderStates().SetColorMask(true, true, true, true); @@ -487,11 +554,11 @@ float glow_intensity = arg.glow_intensity * glow_multiplier; float shadow_intensity = 0.6f; - BaseTexturePtr background = textures_->icon_background[size]; - BaseTexturePtr const& edge = textures_->icon_edge[size]; - BaseTexturePtr const& glow = textures_->icon_glow[size]; - BaseTexturePtr const& shine = textures_->icon_shine[size]; - BaseTexturePtr const& shadow = textures_->icon_shadow[size]; + BaseTexturePtr background = local_textures_->icon_background; + BaseTexturePtr const& edge = local_textures_->icon_edge; + BaseTexturePtr const& glow = local_textures_->icon_glow; + BaseTexturePtr const& shine = local_textures_->icon_shine; + BaseTexturePtr const& shadow = local_textures_->icon_shadow; nux::Color shortcut_color = arg.colorify; @@ -529,7 +596,7 @@ glow_intensity = 1.0f; shadow_intensity = 0.0f; - background = textures_->icon_selected_background[size]; + background = local_textures_->icon_selected_background; } else { @@ -571,7 +638,7 @@ arg.icon->GetTransform(ui::IconTextureSource::TRANSFORM_GLOW, monitor)); } - auto tile_transform = arg.icon->GetTransform(ui::IconTextureSource::TRANSFORM_TILE, monitor); + auto const& tile_transform = arg.icon->GetTransform(ui::IconTextureSource::TRANSFORM_TILE, monitor); // draw tile if (backlight_intensity > 0 && !arg.draw_edge_only) @@ -656,7 +723,7 @@ RenderElement(GfxContext, arg, - textures_->icon_glow[size]->GetDeviceTexture(), + local_textures_->icon_glow->GetDeviceTexture(), arg.icon->GlowColor(), nux::color::White, fade_out * arg.alpha, @@ -687,17 +754,28 @@ tile_transform); } - if (arg.icon->Emblem()) + if (nux::BaseTexture* count_texture = arg.icon->CountTexture(local::count_scaling(icon_size, pip_style != OUTSIDE_TILE))) { RenderElement(GfxContext, arg, - arg.icon->Emblem()->GetDeviceTexture(), + count_texture->GetDeviceTexture(), nux::color::White, nux::color::White, arg.alpha, force_filter, arg.icon->GetTransform(ui::IconTextureSource::TRANSFORM_EMBLEM, monitor)); } + else if (arg.icon->Emblem()) + { + RenderElement(GfxContext, + arg, + arg.icon->Emblem()->GetDeviceTexture(), + nux::color::White, + nux::color::White, + arg.alpha, + force_filter || scale != 1.0, + arg.icon->GetTransform(ui::IconTextureSource::TRANSFORM_EMBLEM, monitor)); + } // draw indicators RenderIndicators(GfxContext, @@ -710,20 +788,8 @@ // draw superkey-shortcut label if (arg.draw_shortcut && arg.shortcut_label) { - char shortcut = (char) arg.shortcut_label; - - BaseTexturePtr label; - auto label_it = textures_->labels.find(shortcut); - - if (label_it != textures_->labels.end()) - { - label = label_it->second; - } - else - { - label = textures_->RenderLabelTexture(shortcut, icon_size, shortcut_color); - textures_->labels[shortcut] = label; - } + char shortcut = static_cast(arg.shortcut_label); + auto const& label = local_textures_->GetLabelTexture(shortcut, icon_size, shortcut_color); RenderElement(GfxContext, arg, @@ -736,7 +802,7 @@ } } -nux::ObjectPtr IconRenderer::TexturesPool::RenderLabelTexture(char label, int icon_size, nux::Color const& bg_color) +nux::BaseTexture* IconRenderer::LocalTextures::RenderLabelTexture(char label, int icon_size, nux::Color const& bg_color) { nux::CairoGraphics cg(CAIRO_FORMAT_ARGB32, icon_size, icon_size); cairo_t* cr = cg.GetInternalContext(); @@ -760,27 +826,27 @@ cairo_set_source_rgba(cr, bg_color.red, bg_color.green, bg_color.blue, 0.20f); cairo_fill(cr); - const double text_ratio = 0.75; - double text_size = label_size * text_ratio; glib::Object layout(pango_cairo_create_layout(cr)); g_object_get(gtk_settings_get_default(), "gtk-font-name", &font_name, NULL); std::shared_ptr desc(pango_font_description_from_string(font_name), pango_font_description_free); - pango_font_description_set_absolute_size(desc.get(), text_size * PANGO_SCALE); + const double text_ratio = 0.75; + int text_size = pango_units_from_double(label_size * text_ratio * Settings::Instance().font_scaling()); + pango_font_description_set_absolute_size(desc.get(), text_size); pango_layout_set_font_description(layout, desc.get()); pango_layout_set_text(layout, &label, 1); - nux::Size extents; - pango_layout_get_pixel_size(layout, &extents.width, &extents.height); + PangoRectangle ink_rect; + pango_layout_get_pixel_extents(layout, &ink_rect, nullptr); // position and paint text cairo_set_source_rgba(cr, 1.0f, 1.0f, 1.0f, 1.0f); - double x = label_x - std::round((extents.width - label_w) / 2.0f); - double y = label_y - std::round((extents.height - label_h) / 2.0f); + double x = label_x - std::round((ink_rect.width - label_w) / 2.0f) - ink_rect.x; + double y = label_y - std::round((ink_rect.height - label_h) / 2.0f) - ink_rect.y; cairo_move_to(cr, x, y); pango_cairo_show_layout(cr, layout); - return texture_ptr_from_cairo_graphics(cg); + return texture_from_cairo_graphics(cg); } void IconRenderer::RenderElement(nux::GraphicsEngine& GfxContext, @@ -960,10 +1026,8 @@ int markerCenter = (int) arg.render_center.y; markerCenter -= (int)(arg.rotation.x / (2 * M_PI) * icon_size); - if (running > 0) { - int scale = 1; int markerX; if (pip_style == OUTSIDE_TILE) @@ -972,7 +1036,7 @@ } else { - auto bounds = arg.icon->GetTransform(ui::IconTextureSource::TRANSFORM_TILE, monitor); + auto const& bounds = arg.icon->GetTransform(ui::IconTextureSource::TRANSFORM_TILE, monitor); markerX = bounds[0].x + 1; } @@ -994,47 +1058,32 @@ if (!arg.running_on_viewport) { - scale = (pip_style == OUTSIDE_TILE) ? 1 : 2; markers[0] = markerCenter; - texture = textures_->arrow_empty_ltr; + texture = local_textures_->arrow_empty_ltr; } else if (running == 1) { - scale = (pip_style == OUTSIDE_TILE) ? 1 : 2; markers[0] = markerCenter; - texture = textures_->arrow_ltr; + texture = local_textures_->arrow_ltr; } else if (running == 2) { - if (pip_style == OUTSIDE_TILE) - { - texture = textures_->pip_ltr; - markers[0] = markerCenter - 2; - markers[1] = markerCenter + 2; - } - else - { - texture = textures_->large_pip_ltr; - markers[0] = markerCenter - 4; - markers[1] = markerCenter + 4; - } + texture = local_textures_->pip_ltr; + + double default_tex_height = local::MARKER_SIZES[local::IconSize::SMALL]; + int offset = std::max(1.0, std::round(2.0 * texture->GetHeight() / default_tex_height)); + markers[0] = markerCenter - offset; + markers[1] = markerCenter + offset; } else { - if (pip_style == OUTSIDE_TILE) - { - texture = textures_->pip_ltr; - markers[0] = markerCenter - 4; - markers[1] = markerCenter; - markers[2] = markerCenter + 4; - } - else - { - texture = textures_->large_pip_ltr; - markers[0] = markerCenter - 8; - markers[1] = markerCenter; - markers[2] = markerCenter + 8; - } + texture = local_textures_->pip_ltr; + + double default_tex_height = local::MARKER_SIZES[local::IconSize::SMALL]; + int offset = std::max(1.0, std::round(4.0 * texture->GetHeight() / default_tex_height)); + markers[0] = markerCenter - offset; + markers[1] = markerCenter; + markers[2] = markerCenter + offset; } for (int i = 0; i < 3; i++) @@ -1044,9 +1093,9 @@ break; GfxContext.QRP_1Tex(markerX, - center - std::round((texture->GetHeight() * scale) / 2.0f), - texture->GetWidth() * scale, - texture->GetHeight() * scale, + center - std::round(texture->GetHeight() / 2.0f), + texture->GetWidth(), + texture->GetHeight(), texture->GetDeviceTexture(), texxform, color); @@ -1057,12 +1106,13 @@ { nux::TexCoordXForm texxform; + auto const& arrow_rtl = local_textures_->arrow_rtl; nux::Color color = nux::color::LightGrey * alpha; - GfxContext.QRP_1Tex((geo.x + geo.width) - textures_->arrow_rtl->GetWidth(), - markerCenter - std::round(textures_->arrow_rtl->GetHeight() / 2.0f), - textures_->arrow_rtl->GetWidth(), - textures_->arrow_rtl->GetHeight(), - textures_->arrow_rtl->GetDeviceTexture(), + GfxContext.QRP_1Tex((geo.x + geo.width) - arrow_rtl->GetWidth(), + markerCenter - std::round(arrow_rtl->GetHeight() / 2.0f), + arrow_rtl->GetWidth(), + arrow_rtl->GetHeight(), + arrow_rtl->GetDeviceTexture(), texxform, color); } @@ -1138,11 +1188,6 @@ unity::graphics::PopOffscreenRenderTarget(); } -void IconRenderer::DestroyShortcutTextures() -{ - TexturesPool::Get()->labels.clear(); -} - void IconRenderer::GetInverseScreenPerspectiveMatrix(nux::Matrix4& ViewMatrix, nux::Matrix4& PerspectiveMatrix, int ViewportWidth, int ViewportHeight, @@ -1237,48 +1282,6 @@ , ColorifyColor(0) , DesatFactor(0) { - LoadTexture(pip_ltr, PKGDATADIR"/launcher_pip_ltr.png"); - LoadTexture(large_pip_ltr, PKGDATADIR"/launcher_pip_large_ltr.png"); - // LoadTexture(pip_rtl, PKGDATADIR"/launcher_pip_rtl.png"); - // LoadTexture(large_pip_rtl, PKGDATADIR"/launcher_pip_large_rtl.png"); - LoadTexture(arrow_ltr, PKGDATADIR"/launcher_arrow_ltr.png"); - LoadTexture(arrow_rtl, PKGDATADIR"/launcher_arrow_rtl.png"); - LoadTexture(arrow_empty_ltr, PKGDATADIR"/launcher_arrow_outline_ltr.png"); - // LoadTexture(arrow_empty_rtl, PKGDATADIR"/launcher_arrow_outline_rtl.png"); - - // LoadTexture(squircle_base, PKGDATADIR"/squircle_base_54.png"); - // LoadTexture(squircle_base_selected, PKGDATADIR"/squircle_base_selected_54.png"); - // LoadTexture(squircle_edge, PKGDATADIR"/squircle_edge_54.png"); - // LoadTexture(squircle_glow, PKGDATADIR"/squircle_glow_62.png"); - // LoadTexture(squircle_shadow, PKGDATADIR"/squircle_shadow_62.png"); - // LoadTexture(squircle_shine, PKGDATADIR"/squircle_shine_54.png"); - - // BaseTexturePtr icon_background[local::IconSize::SIZE]; - // BaseTexturePtr icon_selected_background[local::IconSize::SIZE]; - // BaseTexturePtr icon_edge[local::IconSize::SIZE]; - // BaseTexturePtr icon_glow[local::IconSize::SIZE]; - // BaseTexturePtr icon_shadow[local::IconSize::SIZE]; - // BaseTexturePtr icon_shine[local::IconSize::SIZE]; - - GenerateTextures(icon_background, - PKGDATADIR"/launcher_icon_back_150.png", - PKGDATADIR"/launcher_icon_back_54.png"); - GenerateTextures(icon_selected_background, - PKGDATADIR"/launcher_icon_selected_back_150.png", - PKGDATADIR"/launcher_icon_back_54.png"); - GenerateTextures(icon_edge, - PKGDATADIR"/launcher_icon_edge_150.png", - PKGDATADIR"/launcher_icon_edge_54.png"); - GenerateTextures(icon_glow, - PKGDATADIR"/launcher_icon_glow_200.png", - PKGDATADIR"/launcher_icon_glow_62.png"); - GenerateTextures(icon_shadow, - PKGDATADIR"/launcher_icon_shadow_200.png", - PKGDATADIR"/launcher_icon_shadow_62.png"); - GenerateTextures(icon_shine, - PKGDATADIR"/launcher_icon_shine_150.png", - PKGDATADIR"/launcher_icon_shine_54.png"); - SetupShaders(); } diff -Nru unity-7.1.2+14.04.20140303/unity-shared/IconRenderer.h unity-7.2.4+14.04.20141217/unity-shared/IconRenderer.h --- unity-7.1.2+14.04.20140303/unity-shared/IconRenderer.h 2014-03-03 16:47:36.000000000 +0000 +++ unity-7.2.4+14.04.20141217/unity-shared/IconRenderer.h 2014-12-17 20:51:54.000000000 +0000 @@ -44,8 +44,6 @@ void SetTargetSize(int tile_size, int image_size, int spacing); - static void DestroyShortcutTextures(); - protected: void RenderElement(nux::GraphicsEngine& GfxContext, RenderArg const& arg, diff -Nru unity-7.1.2+14.04.20140303/unity-shared/IconTexture.cpp unity-7.2.4+14.04.20141217/unity-shared/IconTexture.cpp --- unity-7.1.2+14.04.20140303/unity-shared/IconTexture.cpp 2014-03-03 16:47:14.000000000 +0000 +++ unity-7.2.4+14.04.20141217/unity-shared/IconTexture.cpp 2014-12-17 20:51:54.000000000 +0000 @@ -110,6 +110,20 @@ SetByIconName(file_path, size); } +void IconTexture::SetSize(unsigned size) +{ + _size = size; +} + +void IconTexture::ReLoadIcon() +{ + IconLoader::GetDefault().DisconnectHandle(_handle); + _handle = 0; + _loading = false; + + LoadIcon(); +} + void IconTexture::LoadIcon() { LOG_DEBUG(logger) << "LoadIcon called (" << _icon_name << ") - loading: " << _loading; @@ -128,7 +142,7 @@ -1, _size, sigc::mem_fun(this, &IconTexture::IconLoaded)); } - else if (_icon_name.find("http://") == 0) + else if (_icon_name.find("://") != std::string::npos) { _handle = IconLoader::GetDefault().LoadFromURI(_icon_name, -1, _size, sigc::mem_fun(this, &IconTexture::IconLoaded)); @@ -212,37 +226,27 @@ if (_draw_mode == DrawMode::STRETCH_WITH_ASPECT) { nux::Geometry imageDest = geo; - - float geo_apsect = float(geo.GetWidth()) / geo.GetHeight(); + + float geo_apsect = float(geo.width) / geo.width; float image_aspect = float(_texture_cached->GetWidth()) / _texture_cached->GetHeight(); if (image_aspect > geo_apsect) { imageDest.SetHeight(float(imageDest.GetWidth()) / image_aspect); - } + } if (image_aspect < geo_apsect) { imageDest.SetWidth(image_aspect * imageDest.GetHeight()); } - else - { - imageDest = nux::Geometry(0, 0, _texture_cached->GetWidth(), _texture_cached->GetHeight()); - } texxform.SetTexCoordType(nux::TexCoordXForm::OFFSET_SCALE_COORD); texxform.SetWrap(nux::TEXWRAP_CLAMP_TO_BORDER, nux::TEXWRAP_CLAMP_TO_BORDER); texxform.SetFilter(nux::TEXFILTER_LINEAR, nux::TEXFILTER_LINEAR); - texxform.u0 = 0; - texxform.v0 = 0; - texxform.u1 = imageDest.width; - texxform.v1 = imageDest.height; - - int border_width = 1; - GfxContext.QRP_1Tex(geo.x + (float(geo.GetWidth() - imageDest.GetWidth()) / 2) + border_width, - geo.y + (float(geo.GetHeight() - imageDest.GetHeight()) / 2) + border_width, - imageDest.width - (border_width * 2), - imageDest.height - (border_width * 2), + GfxContext.QRP_1Tex(geo.x + (float(geo.GetWidth() - imageDest.GetWidth()) / 2), + geo.y + (float(geo.GetHeight() - imageDest.GetHeight()) / 2), + imageDest.width, + imageDest.height, _texture_cached.GetPointer()->GetDeviceTexture(), texxform, col); diff -Nru unity-7.1.2+14.04.20140303/unity-shared/IconTexture.h unity-7.2.4+14.04.20141217/unity-shared/IconTexture.h --- unity-7.1.2+14.04.20140303/unity-shared/IconTexture.h 2014-03-03 16:47:14.000000000 +0000 +++ unity-7.2.4+14.04.20141217/unity-shared/IconTexture.h 2014-12-17 20:51:37.000000000 +0000 @@ -52,7 +52,10 @@ void SetByFilePath(std::string const& file_path, unsigned int size); void GetTextureSize(int* width, int* height); + void SetSize(unsigned size); + void LoadIcon(); + void ReLoadIcon(); void SetOpacity(float opacity); diff -Nru unity-7.1.2+14.04.20140303/unity-shared/IconTextureSource.cpp unity-7.2.4+14.04.20141217/unity-shared/IconTextureSource.cpp --- unity-7.1.2+14.04.20140303/unity-shared/IconTextureSource.cpp 2014-03-03 16:47:14.000000000 +0000 +++ unity-7.2.4+14.04.20141217/unity-shared/IconTextureSource.cpp 2014-12-17 20:51:54.000000000 +0000 @@ -19,6 +19,7 @@ #include "IconTextureSource.h" #include "MultiMonitor.h" +#include "unity-shared/UnitySettings.h" namespace unity { @@ -34,11 +35,16 @@ IconTextureSource::IconTextureSource() : skip_(RENDERERS_SIZE, false) , had_emblem_(RENDERERS_SIZE, false) + , last_count_(RENDERERS_SIZE, 0) , last_render_center_(RENDERERS_SIZE) , last_logical_center_(RENDERERS_SIZE) , last_rotation_(RENDERERS_SIZE) , transformations_(RENDERERS_SIZE, decltype(transformations_)::value_type(TRANSFORM_SIZE, std::vector(4))) -{} +{ + auto reset_count_cb = sigc::mem_fun(this, &IconTextureSource::ResetLastCount); + Settings::Instance().dpi_changed.connect(reset_count_cb); + Settings::Instance().font_scaling.changed.connect(sigc::hide(reset_count_cb)); +} std::vector & IconTextureSource::GetTransform(TransformIndex index, int monitor) { @@ -91,5 +97,35 @@ return had_emblem_[monitor]; } +void IconTextureSource::RememberCount(int monitor, unsigned count) +{ + last_count_[monitor] = count; +} + +unsigned IconTextureSource::LastCount(int monitor) const +{ + return last_count_[monitor]; +} + +unsigned IconTextureSource::Count() const +{ + return 0; +} + +void IconTextureSource::ResetLastCount() +{ + std::fill(last_count_.begin(), last_count_.end(), 0); +} + +nux::BaseTexture* IconTextureSource::Emblem() const +{ + return nullptr; +} + +nux::BaseTexture* IconTextureSource::CountTexture(double scale) +{ + return nullptr; +} + } } \ No newline at end of file diff -Nru unity-7.1.2+14.04.20140303/unity-shared/IconTextureSource.h unity-7.2.4+14.04.20141217/unity-shared/IconTextureSource.h --- unity-7.1.2+14.04.20140303/unity-shared/IconTextureSource.h 2014-03-03 16:47:14.000000000 +0000 +++ unity-7.2.4+14.04.20141217/unity-shared/IconTextureSource.h 2014-12-17 20:51:54.000000000 +0000 @@ -46,7 +46,7 @@ }; IconTextureSource(); - virtual ~IconTextureSource() {} + virtual ~IconTextureSource() = default; std::vector & GetTransform(TransformIndex index, int monitor); @@ -62,17 +62,23 @@ void RememberEmblem(int monitor, bool has_emblem); bool HadEmblem(int monitor) const; - virtual nux::Color BackgroundColor() const = 0; + void RememberCount(int monitor, unsigned count); + unsigned LastCount(int monitor) const; + virtual nux::Color BackgroundColor() const = 0; virtual nux::Color GlowColor() = 0; - virtual nux::BaseTexture* TextureForSize(int size) = 0; - virtual nux::BaseTexture* Emblem() = 0; + virtual unsigned Count() const; + virtual nux::BaseTexture* CountTexture(double scale); + virtual nux::BaseTexture* Emblem() const; private: + void ResetLastCount(); + std::vector skip_; std::vector had_emblem_; + std::vector last_count_; std::vector last_render_center_; std::vector last_logical_center_; std::vector last_rotation_; diff -Nru unity-7.1.2+14.04.20140303/unity-shared/IMTextEntry.cpp unity-7.2.4+14.04.20141217/unity-shared/IMTextEntry.cpp --- unity-7.1.2+14.04.20140303/unity-shared/IMTextEntry.cpp 2014-03-03 16:47:14.000000000 +0000 +++ unity-7.2.4+14.04.20141217/unity-shared/IMTextEntry.cpp 2014-12-17 20:51:37.000000000 +0000 @@ -1,4 +1,4 @@ -// -*- Mode: C++; indent-tabs-mode: ni; tab-width: 2 -*- +// -*- Mode: C++; indent-tabs-mode: nil; tab-width: 2 -*- /* * Copyright (C) 2011-2012 Canonical Ltd * @@ -26,11 +26,15 @@ NUX_IMPLEMENT_OBJECT_TYPE(IMTextEntry); IMTextEntry::IMTextEntry() -: TextEntry("", NUX_TRACKER_LOCATION) + : TextEntry("", NUX_TRACKER_LOCATION) + , clipboard_enabled(true) {} void IMTextEntry::CopyClipboard() { + if (!clipboard_enabled()) + return; + int start, end; if (GetSelectionBounds(&start, &end)) @@ -52,6 +56,9 @@ void IMTextEntry::Paste(bool primary) { + if (!clipboard_enabled()) + return; + GdkAtom origin = primary ? GDK_SELECTION_PRIMARY : GDK_SELECTION_CLIPBOARD; GtkClipboard* clip = gtk_clipboard_get(origin); @@ -85,4 +92,5 @@ { return !preedit_.empty(); } + } diff -Nru unity-7.1.2+14.04.20140303/unity-shared/IMTextEntry.h unity-7.2.4+14.04.20141217/unity-shared/IMTextEntry.h --- unity-7.1.2+14.04.20140303/unity-shared/IMTextEntry.h 2014-03-03 16:47:14.000000000 +0000 +++ unity-7.2.4+14.04.20141217/unity-shared/IMTextEntry.h 2014-12-17 20:51:37.000000000 +0000 @@ -32,7 +32,9 @@ NUX_DECLARE_OBJECT_TYPE(IMTextEntry, nux::TextEntry); public: IMTextEntry(); - virtual ~IMTextEntry() {} + + nux::Property clipboard_enabled; + bool im_preedit(); protected: diff -Nru unity-7.1.2+14.04.20140303/unity-shared/LayoutSystem.cpp unity-7.2.4+14.04.20141217/unity-shared/LayoutSystem.cpp --- unity-7.1.2+14.04.20140303/unity-shared/LayoutSystem.cpp 2014-03-03 16:47:14.000000000 +0000 +++ unity-7.2.4+14.04.20141217/unity-shared/LayoutSystem.cpp 2014-12-17 20:51:54.000000000 +0000 @@ -32,7 +32,33 @@ if (windows.empty()) return; - LayoutGridWindows(windows, max_bounds, final_bounds); + LayoutGridWindows(windows, GetRows(windows, max_bounds), max_bounds, final_bounds); +} + +void LayoutSystem::LayoutWindowsNearest(LayoutWindow::Vector& windows, nux::Geometry const& max_bounds, nux::Geometry& final_bounds) +{ + if (windows.empty()) + return; + + std::stable_sort(windows.begin(), windows.end(), [](LayoutWindow::Ptr const& a, LayoutWindow::Ptr const& b) { + return a->geo.y < b->geo.y; + }); + + std::vector rows = GetRows(windows, max_bounds); + LayoutWindow::Vector ordered_windows; + + for (auto& row : rows) + { + std::stable_sort(row.begin(), row.end(), [](LayoutWindow::Ptr const& a, LayoutWindow::Ptr const& b) { + return (a->geo.x + a->geo.width / 2) < (b->geo.x + b->geo.width / 2); + }); + + for (auto const& win : row) + ordered_windows.push_back(win); + } + + LayoutGridWindows(ordered_windows, rows, max_bounds, final_bounds); + windows = ordered_windows; } nux::Size LayoutSystem::GridSizeForWindows(LayoutWindow::Vector const& windows, nux::Geometry const& max_bounds) const @@ -125,12 +151,12 @@ for (LayoutWindow::Ptr const& window : row) { // we dont allow scaling up - float final_scalar = std::min(1.0f, (unpadded_bounds.height / (float)window->geo.height) * global_scalar); + window->scale = std::min(1.0f, (unpadded_bounds.height / (float)window->geo.height) * global_scalar); window->result.x = x; window->result.y = y; - window->result.width = window->geo.width * final_scalar; - window->result.height = window->geo.height * final_scalar; + window->result.width = window->geo.width * window->scale; + window->result.height = window->geo.height * window->scale; x += window->result.width; } @@ -229,10 +255,8 @@ return rows; } -void LayoutSystem::LayoutGridWindows(LayoutWindow::Vector const& windows, nux::Geometry const& max_bounds, nux::Geometry& final_bounds) +void LayoutSystem::LayoutGridWindows(LayoutWindow::Vector const& windows, std::vector const& rows, nux::Geometry const& max_bounds, nux::Geometry& final_bounds) { - std::vector const& rows = GetRows(windows, max_bounds); - int height = rows.size(); int non_spacing_height = max_bounds.height - ((height - 1) * spacing); int row_height = std::min (max_row_height(), non_spacing_height / height); @@ -275,6 +299,7 @@ , decoration_height(0) , selected(false) , aspect_ratio(geo.width / static_cast(geo.height)) + , scale(1.0f) , alpha(0.0f) { auto& wm = WindowManager::Default(); diff -Nru unity-7.1.2+14.04.20140303/unity-shared/LayoutSystem.h unity-7.2.4+14.04.20141217/unity-shared/LayoutSystem.h --- unity-7.1.2+14.04.20140303/unity-shared/LayoutSystem.h 2014-03-03 16:47:14.000000000 +0000 +++ unity-7.2.4+14.04.20141217/unity-shared/LayoutSystem.h 2014-12-17 20:51:54.000000000 +0000 @@ -46,6 +46,7 @@ bool selected; float aspect_ratio; + float scale; float alpha; protected: @@ -63,10 +64,11 @@ LayoutSystem(); void LayoutWindows(LayoutWindow::Vector const& windows, nux::Geometry const& max_bounds, nux::Geometry& final_bounds); + void LayoutWindowsNearest(LayoutWindow::Vector& windows, nux::Geometry const& max_bounds, nux::Geometry& final_bounds); std::vector GetRowSizes(LayoutWindow::Vector const& windows, nux::Geometry const& max_bounds) const; protected: - void LayoutGridWindows(LayoutWindow::Vector const& windows, nux::Geometry const& max_bounds, nux::Geometry& final_bounds); + void LayoutGridWindows(LayoutWindow::Vector const& windows, std::vector const& rows, nux::Geometry const& max_bounds, nux::Geometry& final_bounds); nux::Geometry LayoutRow(LayoutWindow::Vector const& row, nux::Geometry const& row_bounds); nux::Geometry CompressAndPadRow(LayoutWindow::Vector const& windows, nux::Geometry const& max_bounds); diff -Nru unity-7.1.2+14.04.20140303/unity-shared/MenuManager.cpp unity-7.2.4+14.04.20141217/unity-shared/MenuManager.cpp --- unity-7.1.2+14.04.20140303/unity-shared/MenuManager.cpp 2014-03-03 16:47:36.000000000 +0000 +++ unity-7.2.4+14.04.20141217/unity-shared/MenuManager.cpp 2014-12-17 20:51:37.000000000 +0000 @@ -19,6 +19,7 @@ */ #include +#include #include #include #include @@ -29,6 +30,8 @@ { namespace menu { +DECLARE_LOGGER(logger, "unity.menu.manager"); + using namespace indicator; struct Manager::Impl : sigc::trackable @@ -98,7 +101,8 @@ action->keyFromString(accelerator); action->setState(CompAction::StateInitKey); - action->setInitiate([this, id] (CompAction*, CompAction::State, CompOption::Vector&) { + action->setInitiate([this, id] (CompAction* action, CompAction::State, CompOption::Vector&) { + LOG_DEBUG(logger) << "pressed \"" << action->keyToString() << "\""; return parent_->key_activate_entry.emit(id); }); diff -Nru unity-7.1.2+14.04.20140303/unity-shared/MockableBaseWindow.h unity-7.2.4+14.04.20141217/unity-shared/MockableBaseWindow.h --- unity-7.1.2+14.04.20140303/unity-shared/MockableBaseWindow.h 2014-03-03 16:47:14.000000000 +0000 +++ unity-7.2.4+14.04.20141217/unity-shared/MockableBaseWindow.h 2014-12-17 20:51:37.000000000 +0000 @@ -37,7 +37,6 @@ : nux::BaseWindow(window_name, NUX_TRACKER_LOCATION) , struts_enabled_(false) {} - virtual ~MockableBaseWindow() {} /** * Sets the window opacity. diff -Nru unity-7.1.2+14.04.20140303/unity-shared/OverlayRenderer.cpp unity-7.2.4+14.04.20141217/unity-shared/OverlayRenderer.cpp --- unity-7.1.2+14.04.20140303/unity-shared/OverlayRenderer.cpp 2014-03-03 16:47:14.000000000 +0000 +++ unity-7.2.4+14.04.20141217/unity-shared/OverlayRenderer.cpp 2014-12-17 20:51:37.000000000 +0000 @@ -35,8 +35,19 @@ DECLARE_LOGGER(logger, "unity.overlayrenderer"); namespace { -const int INNER_CORNER_RADIUS = 5; -const int EXCESS_BORDER = 10; +const RawPixel INNER_CORNER_RADIUS = 5_em; +const RawPixel EXCESS_BORDER = 10_em; + +const RawPixel LEFT_CORNER_OFFSET = 10_em; +const RawPixel TOP_CORNER_OFFSET = 10_em; + +const nux::Color LINE_COLOR = nux::color::White * 0.07f; +const RawPixel GRADIENT_HEIGHT = 50_em; +const RawPixel VERTICAL_PADDING = 20_em; + +// Now that we mask the corners of the dash, +// draw longer lines to fill the minimal gaps +const RawPixel CORNER_OVERLAP = 3_em; } // Impl class @@ -45,8 +56,9 @@ public: OverlayRendererImpl(OverlayRenderer *parent_); - void ComputeLargerGeometries(nux::Geometry& larger_absolute_geo, nux::Geometry& larger_content_geo, bool force_edges); void UpdateTextures(); + void LoadScaledTextures(); + void ComputeLargerGeometries(nux::Geometry& larger_absolute_geo, nux::Geometry& larger_content_geo, bool force_edges); void OnBgColorChanged(nux::Color const& new_color); void Draw(nux::GraphicsEngine& gfx_context, nux::Geometry const& content_geo, nux::Geometry const& absolute_geo, nux::Geometry const& geometry, bool force_draw); @@ -63,6 +75,20 @@ std::unique_ptr bg_refine_gradient_; + nux::ObjectPtr bottom_texture_; + nux::ObjectPtr bottom_texture_mask_; + nux::ObjectPtr right_texture_; + nux::ObjectPtr right_texture_mask_; + nux::ObjectPtr left_texture_; + nux::ObjectPtr top_texture_; + + nux::ObjectPtr corner_; + nux::ObjectPtr corner_mask_; + nux::ObjectPtr left_corner_; + nux::ObjectPtr left_corner_mask_; + nux::ObjectPtr top_corner_; + nux::ObjectPtr top_corner_mask_; + // temporary variable that stores the number of backgrounds we have rendered int bgs; bool visible; @@ -88,7 +114,29 @@ : visible(false) , parent(parent_) { + parent->scale = Settings::Instance().em()->DPIScale(); + parent->scale.changed.connect(sigc::hide(sigc::mem_fun(this, &OverlayRendererImpl::LoadScaledTextures))); UpdateTextures(); + LoadScaledTextures(); +} + +void OverlayRendererImpl::LoadScaledTextures() +{ + double scale = parent->scale; + auto& style = dash::Style::Instance(); + bottom_texture_ = style.GetDashBottomTile(scale); + bottom_texture_mask_ = style.GetDashBottomTileMask(scale); + right_texture_ = style.GetDashRightTile(scale); + right_texture_mask_ = style.GetDashRightTileMask(scale); + left_texture_ = style.GetDashLeftTile(scale); + top_texture_ = style.GetDashTopTile(scale); + + corner_ = style.GetDashCorner(scale); + corner_mask_ = style.GetDashCornerMask(scale); + left_corner_ = style.GetDashLeftCorner(scale); + left_corner_mask_ = style.GetDashLeftCornerMask(scale); + top_corner_ = style.GetDashTopCorner(scale); + top_corner_mask_ = style.GetDashTopCornerMask(scale); } void OverlayRendererImpl::OnBgColorChanged(nux::Color const& new_color) @@ -133,9 +181,10 @@ } bg_darken_layer_ = std::make_shared(darken_colour, false, rop); - bg_shine_texture_ = unity::dash::Style::Instance().GetDashShine()->GetDeviceTexture(); + bg_shine_texture_ = dash::Style::Instance().GetDashShine()->GetDeviceTexture(); + + auto const& bg_refine_tex = dash::Style::Instance().GetRefineTextureDash(); - nux::BaseTexture* bg_refine_tex = unity::dash::Style::Instance().GetRefineTextureDash(); if (bg_refine_tex) { rop.Blend = true; @@ -397,7 +446,7 @@ void OverlayRendererImpl::ComputeLargerGeometries(nux::Geometry& larger_absolute_geo, nux::Geometry& larger_content_geo, bool force_edges) { - int excess_border = (Settings::Instance().form_factor() != FormFactor::NETBOOK || force_edges) ? EXCESS_BORDER : 0; + int excess_border = (Settings::Instance().form_factor() != FormFactor::NETBOOK || force_edges) ? EXCESS_BORDER.CP(parent->scale) : 0; larger_absolute_geo.OffsetSize(excess_border, excess_border); larger_content_geo.OffsetSize(excess_border, excess_border); } @@ -427,6 +476,7 @@ void OverlayRendererImpl::Draw(nux::GraphicsEngine& gfx_context, nux::Geometry const& content_geo, nux::Geometry const& absolute_geo, nux::Geometry const& geometry, bool force_edges) { nux::Geometry geo(content_geo); + double scale = parent->scale; nux::Geometry larger_content_geo = content_geo; nux::Geometry larger_absolute_geo = absolute_geo; @@ -480,32 +530,22 @@ gfx_context.GetRenderStates().SetBlend(true); gfx_context.GetRenderStates().SetPremultipliedBlend(nux::SRC_OVER); - const double line_opacity = 0.1f; - const int gradient_height = 50; - const int vertical_padding = 20; - - // Now that we mask the corners of the dash, - // draw longer lines to fill the minimal gaps - const int corner_overlap = 3; - - nux::Color line_color = nux::color::White * line_opacity; - // Vertical lancher/dash separator nux::GetPainter().Paint2DQuadColor(gfx_context, nux::Geometry(geometry.x, - geometry.y + vertical_padding, - style.GetVSeparatorSize(), - gradient_height), + geometry.y + VERTICAL_PADDING.CP(scale), + style.GetVSeparatorSize().CP(scale), + GRADIENT_HEIGHT.CP(scale)), nux::color::Transparent, - line_color * 0.7f, // less opacity - line_color * 0.7f, // less opacity + LINE_COLOR, + LINE_COLOR, nux::color::Transparent); nux::GetPainter().Draw2DLine(gfx_context, geometry.x, - geometry.y + vertical_padding + gradient_height, - style.GetVSeparatorSize(), - geometry.y + content_geo.height + INNER_CORNER_RADIUS + corner_overlap, - line_color * 0.7f); // less opacity + geometry.y + VERTICAL_PADDING.CP(scale) + GRADIENT_HEIGHT.CP(scale), + style.GetVSeparatorSize().CP(scale), + geometry.y + content_geo.height + INNER_CORNER_RADIUS.CP(scale) + CORNER_OVERLAP.CP(scale), + LINE_COLOR); //Draw the background bg_darken_layer_->SetGeometry(larger_content_geo); @@ -544,9 +584,9 @@ int gradien_width = std::min(bg_refine_gradient_->GetDeviceTexture()->GetWidth(), larger_content_geo.width); int gradien_height = std::min(bg_refine_gradient_->GetDeviceTexture()->GetHeight(), larger_content_geo.height); - nux::Geometry geo_refine(larger_content_geo.x + larger_content_geo.width - gradien_width, + nux::Geometry geo_refine(larger_content_geo.x + larger_content_geo.width - gradien_width, larger_content_geo.y, - gradien_width, + gradien_width, gradien_height); bg_refine_gradient_->SetGeometry(geo_refine); @@ -565,36 +605,38 @@ gfx_context.GetRenderStates().SetBlend(true); gfx_context.GetRenderStates().SetPremultipliedBlend(nux::SRC_OVER); - dash::Style& style = dash::Style::Instance(); - nux::BaseTexture* bottom = style.GetDashBottomTile(); - nux::BaseTexture* bottom_mask = style.GetDashBottomTileMask(); - nux::BaseTexture* right = style.GetDashRightTile(); - nux::BaseTexture* right_mask = style.GetDashRightTileMask(); - nux::BaseTexture* corner = style.GetDashCorner(); - nux::BaseTexture* corner_mask = style.GetDashCornerMask(); - nux::BaseTexture* left_corner = style.GetDashLeftCorner(); - nux::BaseTexture* left_corner_mask = style.GetDashLeftCornerMask(); - nux::BaseTexture* left_tile = style.GetDashLeftTile(); - nux::BaseTexture* top_corner = style.GetDashTopCorner(); - nux::BaseTexture* top_corner_mask = style.GetDashTopCornerMask(); - nux::BaseTexture* top_tile = style.GetDashTopTile(); nux::TexCoordXForm texxform; + auto const& bottom = bottom_texture_; + auto const& bottom_mask = bottom_texture_mask_; + auto const& right = right_texture_; + auto const& right_mask = right_texture_mask_; + auto const& corner = corner_; + auto const& corner_mask = corner_mask_; + auto const& left_corner = left_corner_; + auto const& left_corner_mask = left_corner_mask_; + auto const& left_tile = left_texture_; + auto const& top_corner = top_corner_; + auto const& top_corner_mask = top_corner_mask_; + auto const& top_tile = top_texture_; + + int left_corner_offset = LEFT_CORNER_OFFSET.CP(scale); + int top_corner_offset = TOP_CORNER_OFFSET.CP(scale); + nux::Size corner_size(corner->GetWidth(), corner->GetHeight()); + nux::Size top_corner_size(top_corner->GetWidth(), top_corner->GetHeight()); + nux::Size left_corner_size(left_corner->GetWidth(), left_corner->GetHeight()); - int left_corner_offset = 10; - int top_corner_offset = 10; - - geo.width += corner->GetWidth() - 10; - geo.height += corner->GetHeight() - 10; + geo.width += corner_size.width - left_corner_offset; + geo.height += corner_size.height - top_corner_offset; { // Corner texxform.SetTexCoordType(nux::TexCoordXForm::OFFSET_COORD); texxform.SetWrap(nux::TEXWRAP_CLAMP_TO_BORDER, nux::TEXWRAP_CLAMP_TO_BORDER); // Selectively erase blur region in the curbe - gfx_context.QRP_ColorModTexAlpha(geo.x + (geo.width - corner->GetWidth()), - geo.y + (geo.height - corner->GetHeight()), - corner->GetWidth(), - corner->GetHeight(), + gfx_context.QRP_ColorModTexAlpha(geo.x + (geo.width - corner_size.width), + geo.y + (geo.height - corner_size.height), + corner_size.width, + corner_size.height, corner_mask->GetDeviceTexture(), texxform, nux::color::Black); @@ -602,10 +644,10 @@ // Write correct alpha gfx_context.GetRenderStates().SetBlend(false); gfx_context.GetRenderStates().SetColorMask(false, false, false, true); - RenderInverseMask(gfx_context, geo.x + (geo.width - corner->GetWidth()), - geo.y + (geo.height - corner->GetHeight()), - corner->GetWidth(), - corner->GetHeight(), + RenderInverseMask(gfx_context, geo.x + (geo.width - corner_size.width), + geo.y + (geo.height - corner_size.height), + corner_size.width, + corner_size.height, corner_mask->GetDeviceTexture(), texxform, nux::color::White); @@ -614,24 +656,24 @@ gfx_context.GetRenderStates().SetPremultipliedBlend(nux::SRC_OVER); gfx_context.GetRenderStates().SetColorMask(true, true, true, true); - gfx_context.QRP_1Tex(geo.x + (geo.width - corner->GetWidth()), - geo.y + (geo.height - corner->GetHeight()), - corner->GetWidth(), - corner->GetHeight(), + gfx_context.QRP_1Tex(geo.x + (geo.width - corner_size.width), + geo.y + (geo.height - corner_size.height), + corner_size.width, + corner_size.height, corner->GetDeviceTexture(), texxform, nux::color::White); } { // Bottom repeated texture - int real_width = geo.width - (left_corner->GetWidth() - left_corner_offset) - corner->GetWidth(); + int real_width = geo.width - (left_corner_size.width - left_corner_offset) - corner_size.width; int offset = real_width % bottom->GetWidth(); texxform.SetTexCoordType(nux::TexCoordXForm::OFFSET_COORD); texxform.SetWrap(nux::TEXWRAP_REPEAT, nux::TEXWRAP_REPEAT); // Selectively erase blur region in the curbe - gfx_context.QRP_ColorModTexAlpha(left_corner->GetWidth() - left_corner_offset - offset, + gfx_context.QRP_ColorModTexAlpha(left_corner_size.width - left_corner_offset - offset, geo.y + (geo.height - bottom->GetHeight()), real_width + offset, bottom->GetHeight(), @@ -642,7 +684,7 @@ // Write correct alpha gfx_context.GetRenderStates().SetBlend(false); gfx_context.GetRenderStates().SetColorMask(false, false, false, true); - RenderInverseMask(gfx_context, left_corner->GetWidth() - left_corner_offset - offset, + RenderInverseMask(gfx_context, left_corner_size.width - left_corner_offset - offset, geo.y + (geo.height - bottom->GetHeight()), real_width + offset, bottom->GetHeight(), @@ -654,7 +696,7 @@ gfx_context.GetRenderStates().SetPremultipliedBlend(nux::SRC_OVER); gfx_context.GetRenderStates().SetColorMask(true, true, true, true); - gfx_context.QRP_1Tex(left_corner->GetWidth() - left_corner_offset - offset, + gfx_context.QRP_1Tex(left_corner_size.width - left_corner_offset - offset, geo.y + (geo.height - bottom->GetHeight()), real_width + offset, bottom->GetHeight(), @@ -669,9 +711,9 @@ // Selectively erase blur region in the curbe gfx_context.QRP_ColorModTexAlpha(geo.x - left_corner_offset, - geo.y + (geo.height - left_corner->GetHeight()), - left_corner->GetWidth(), - left_corner->GetHeight(), + geo.y + (geo.height - left_corner_size.height), + left_corner_size.width, + left_corner_size.height, left_corner_mask->GetDeviceTexture(), texxform, nux::color::Black); @@ -680,9 +722,9 @@ gfx_context.GetRenderStates().SetBlend(false); gfx_context.GetRenderStates().SetColorMask(false, false, false, true); RenderInverseMask(gfx_context, geo.x - left_corner_offset, - geo.y + (geo.height - left_corner->GetHeight()), - left_corner->GetWidth(), - left_corner->GetHeight(), + geo.y + (geo.height - left_corner_size.height), + left_corner_size.width, + left_corner_size.height, left_corner_mask->GetDeviceTexture(), texxform, nux::color::White); @@ -692,9 +734,9 @@ gfx_context.GetRenderStates().SetColorMask(true, true, true, true); gfx_context.QRP_1Tex(geo.x - left_corner_offset, - geo.y + (geo.height - left_corner->GetHeight()), - left_corner->GetWidth(), - left_corner->GetHeight(), + geo.y + (geo.height - left_corner_size.height), + left_corner_size.width, + left_corner_size.height, left_corner->GetDeviceTexture(), texxform, nux::color::White); @@ -708,7 +750,7 @@ texxform.SetTexCoordType(nux::TexCoordXForm::OFFSET_COORD); texxform.SetWrap(nux::TEXWRAP_REPEAT, nux::TEXWRAP_REPEAT); - gfx_context.QRP_1Tex(geo.x - 10, + gfx_context.QRP_1Tex(geo.x - left_corner_offset, geo.y + geo.height, left_tile->GetWidth(), real_height + offset, @@ -723,9 +765,9 @@ // Selectively erase blur region in the curbe gfx_context.QRP_ColorModTexAlpha(geo.x + geo.width - right->GetWidth(), - geo.y + top_corner->GetHeight() - top_corner_offset, + geo.y + top_corner_size.height - top_corner_offset, right->GetWidth(), - geo.height - corner->GetHeight() - (top_corner->GetHeight() - top_corner_offset), + geo.height - corner_size.height - (top_corner_size.height - top_corner_offset), right_mask->GetDeviceTexture(), texxform, nux::color::Black); @@ -734,9 +776,9 @@ gfx_context.GetRenderStates().SetBlend(false); gfx_context.GetRenderStates().SetColorMask(false, false, false, true); RenderInverseMask(gfx_context, geo.x + geo.width - right->GetWidth(), - geo.y + top_corner->GetHeight() - top_corner_offset, + geo.y + top_corner_size.height - top_corner_offset, right->GetWidth(), - geo.height - corner->GetHeight() - (top_corner->GetHeight() - top_corner_offset), + geo.height - corner_size.height - (top_corner_size.height - top_corner_offset), right_mask->GetDeviceTexture(), texxform, nux::color::White); @@ -746,9 +788,9 @@ gfx_context.GetRenderStates().SetColorMask(true, true, true, true); gfx_context.QRP_1Tex(geo.x + geo.width - right->GetWidth(), - geo.y + top_corner->GetHeight() - top_corner_offset, + geo.y + top_corner_size.height - top_corner_offset, right->GetWidth(), - geo.height - corner->GetHeight() - (top_corner->GetHeight() - top_corner_offset), + geo.height - corner_size.height - (top_corner_size.height - top_corner_offset), right->GetDeviceTexture(), texxform, nux::color::White); @@ -761,8 +803,8 @@ // Selectively erase blur region in the curbe gfx_context.QRP_ColorModTexAlpha(geo.x + geo.width - right->GetWidth(), geo.y - top_corner_offset, - top_corner->GetWidth(), - top_corner->GetHeight(), + top_corner_size.width, + top_corner_size.height, top_corner_mask->GetDeviceTexture(), texxform, nux::color::Black); @@ -772,8 +814,8 @@ gfx_context.GetRenderStates().SetColorMask(false, false, false, true); RenderInverseMask(gfx_context, geo.x + geo.width - right->GetWidth(), geo.y - top_corner_offset, - top_corner->GetWidth(), - top_corner->GetHeight(), + top_corner_size.width, + top_corner_size.height, top_corner_mask->GetDeviceTexture(), texxform, nux::color::White); @@ -783,8 +825,8 @@ gfx_context.GetRenderStates().SetColorMask(true, true, true, true); gfx_context.QRP_1Tex(geo.x + geo.width - right->GetWidth(), geo.y - top_corner_offset, - top_corner->GetWidth(), - top_corner->GetHeight(), + top_corner_size.width, + top_corner_size.height, top_corner->GetDeviceTexture(), texxform, nux::color::White); @@ -796,7 +838,7 @@ gfx_context.GetRenderStates().SetPremultipliedBlend(nux::SRC_OVER); gfx_context.QRP_1Tex(geo.x + geo.width, - geo.y - 10, + geo.y - top_corner_offset, geometry.width - (geo.x + geo.width), top_tile->GetHeight(), top_tile->GetDeviceTexture(), @@ -925,9 +967,7 @@ OverlayRenderer::OverlayRenderer() : pimpl_(new OverlayRendererImpl(this)) -{ - -} +{} OverlayRenderer::~OverlayRenderer() diff -Nru unity-7.1.2+14.04.20140303/unity-shared/OverlayRenderer.h unity-7.2.4+14.04.20141217/unity-shared/OverlayRenderer.h --- unity-7.1.2+14.04.20140303/unity-shared/OverlayRenderer.h 2014-03-03 16:47:14.000000000 +0000 +++ unity-7.2.4+14.04.20141217/unity-shared/OverlayRenderer.h 2014-12-17 20:51:37.000000000 +0000 @@ -39,6 +39,7 @@ nux::Property x_offset; nux::Property y_offset; + nux::Property scale; OverlayRenderer(); ~OverlayRenderer(); diff -Nru unity-7.1.2+14.04.20140303/unity-shared/OverlayScrollView.cpp unity-7.2.4+14.04.20141217/unity-shared/OverlayScrollView.cpp --- unity-7.1.2+14.04.20140303/unity-shared/OverlayScrollView.cpp 1970-01-01 00:00:00.000000000 +0000 +++ unity-7.2.4+14.04.20141217/unity-shared/OverlayScrollView.cpp 2014-12-17 20:51:37.000000000 +0000 @@ -0,0 +1,56 @@ +// -*- Mode: C++; indent-tabs-mode: nil; tab-width: 2 -*- +/* + * Copyright (C) 2014 Canonical Ltd + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 3 as + * published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + * Authored by: Marco Trevisan + */ + +#include "OverlayScrollView.h" +#include "PlacesOverlayVScrollBar.h" +#include "RawPixel.h" + +namespace unity +{ +namespace dash +{ +namespace +{ + const RawPixel MOUSE_WHEEL_SCROLL_SIZE = 32_em; +} + +ScrollView::ScrollView(NUX_FILE_LINE_DECL) + : nux::ScrollView(NUX_FILE_LINE_PARAM) +{ + auto* scrollbar = new PlacesOverlayVScrollBar(NUX_TRACKER_LOCATION); + SetVScrollBar(scrollbar); + + scale.SetGetterFunction([scrollbar] { return scrollbar->scale(); }); + scale.SetSetterFunction([scrollbar] (double scale) { + if (scrollbar->scale() == scale) + return false; + + scrollbar->scale = scale; + return true; + }); + + m_MouseWheelScrollSize = MOUSE_WHEEL_SCROLL_SIZE.CP(scale); + + scale.changed.connect([this] (double scale) { + m_MouseWheelScrollSize = MOUSE_WHEEL_SCROLL_SIZE.CP(scale); + }); +} + +} // dash namespace +} // unity namespace \ No newline at end of file diff -Nru unity-7.1.2+14.04.20140303/unity-shared/OverlayScrollView.h unity-7.2.4+14.04.20141217/unity-shared/OverlayScrollView.h --- unity-7.1.2+14.04.20140303/unity-shared/OverlayScrollView.h 1970-01-01 00:00:00.000000000 +0000 +++ unity-7.2.4+14.04.20141217/unity-shared/OverlayScrollView.h 2014-12-17 20:51:37.000000000 +0000 @@ -0,0 +1,43 @@ +// -*- Mode: C++; indent-tabs-mode: nil; tab-width: 2 -*- +/* + * Copyright (C) 2014 Canonical Ltd + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 3 as + * published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + * Authored by: Marco Trevisan + */ + +#ifndef _UNITY_SCROLL_VIEW_H_ +#define _UNITY_SCROLL_VIEW_H_ + +#include + +namespace unity +{ +namespace dash +{ + +class ScrollView : public nux::ScrollView +{ +public: + ScrollView(NUX_FILE_LINE_PROTO); + + nux::RWProperty scale; + + using nux::ScrollView::SetVScrollBar; +}; + +} // dash namespace +} // unity namespace + +#endif // _UNITY_SCROLL_VIEW_H_ diff -Nru unity-7.1.2+14.04.20140303/unity-shared/OverlayWindowButtons.cpp unity-7.2.4+14.04.20141217/unity-shared/OverlayWindowButtons.cpp --- unity-7.1.2+14.04.20140303/unity-shared/OverlayWindowButtons.cpp 2014-03-03 16:47:36.000000000 +0000 +++ unity-7.2.4+14.04.20141217/unity-shared/OverlayWindowButtons.cpp 2014-12-17 20:51:37.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2013 Canonical Ltd + * Copyright (C) 2013-2014 Canonical Ltd * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License version 3 as @@ -56,13 +56,18 @@ void OverlayWindowButtons::UpdateGeometry() { int monitor = unity::UScreen::GetDefault()->GetMonitorWithMouse(); + int height = panel::Style::Instance().PanelHeight(monitor); nux::Geometry const& geo = unity::UScreen::GetDefault()->GetMonitorGeometry(monitor); SetX(geo.x + MAIN_LEFT_PADDING); - SetY(geo.y + MENUBAR_PADDING); - SetHeight(panel::Style::Instance().PanelHeight(monitor)); + SetY(geo.y); + SetHeight(height); window_buttons_->monitor = monitor; + + window_buttons_->SetMinimumHeight(height); + window_buttons_->SetMaximumHeight(height); + window_buttons_->UpdateDPIChanged(); } void OverlayWindowButtons::Show() diff -Nru unity-7.1.2+14.04.20140303/unity-shared/PanelStyle.cpp unity-7.2.4+14.04.20141217/unity-shared/PanelStyle.cpp --- unity-7.1.2+14.04.20140303/unity-shared/PanelStyle.cpp 2014-03-03 16:47:36.000000000 +0000 +++ unity-7.2.4+14.04.20141217/unity-shared/PanelStyle.cpp 2014-12-17 20:51:37.000000000 +0000 @@ -43,6 +43,7 @@ const int BUTTONS_SIZE = 16; const int BUTTONS_PADDING = 1; const int BASE_PANEL_HEIGHT = 24; +const std::string PANEL_STYLE_CSS_NAME = "UnityPanelWidget"; inline std::string button_id(std::string const& prefix, double scale, WindowButtonType type, WindowState ws) { @@ -79,16 +80,14 @@ style_instance = this; } - GtkWidgetPath* widget_path = gtk_widget_path_new(); - gint pos = gtk_widget_path_append_type(widget_path, GTK_TYPE_WINDOW); - gtk_widget_path_iter_set_name(widget_path, pos, "UnityPanelWidget"); + std::shared_ptr widget_path(gtk_widget_path_new(), gtk_widget_path_free); + gtk_widget_path_append_type(widget_path.get(), GTK_TYPE_WIDGET); + gtk_widget_path_iter_set_name(widget_path.get(), -1, PANEL_STYLE_CSS_NAME.c_str()); - gtk_style_context_set_path(style_context_, widget_path); + gtk_style_context_set_path(style_context_, widget_path.get()); gtk_style_context_add_class(style_context_, "gnome-panel-menu-bar"); gtk_style_context_add_class(style_context_, "unity-panel"); - gtk_widget_path_free(widget_path); - Settings::Instance().dpi_changed.connect(sigc::mem_fun(this, &Style::DPIChanged)); auto const& deco_style = decoration::Style::Get(); auto refresh_cb = sigc::hide(sigc::mem_fun(this, &Style::RefreshContext)); @@ -161,8 +160,41 @@ changed.emit(); } -GtkStyleContext* Style::GetStyleContext() +GtkStyleContext* Style::GetStyleContext(PanelItem type) { + auto const* current_path = gtk_style_context_get_path(style_context_); + + switch (type) + { + case PanelItem::MENU: + case PanelItem::INDICATOR: + if (gtk_widget_path_is_type(current_path, GTK_TYPE_MENU_ITEM)) + return style_context_; + break; + case PanelItem::TITLE: + if (gtk_widget_path_get_object_type(current_path) == GTK_TYPE_WIDGET) + return style_context_; + break; + } + + std::shared_ptr widget_path(gtk_widget_path_new(), gtk_widget_path_free); + gtk_widget_path_append_type(widget_path.get(), GTK_TYPE_WIDGET); + + switch (type) + { + case PanelItem::MENU: + case PanelItem::INDICATOR: + gtk_widget_path_append_type(widget_path.get(), GTK_TYPE_MENU_BAR); + gtk_widget_path_append_type(widget_path.get(), GTK_TYPE_MENU_ITEM); + break; + case PanelItem::TITLE: + gtk_widget_path_append_type(widget_path.get(), GTK_TYPE_WIDGET); + break; + } + + gtk_widget_path_iter_set_name(widget_path.get(), -1, PANEL_STYLE_CSS_NAME.c_str()); + gtk_style_context_set_path(style_context_, widget_path.get()); + return style_context_; } @@ -179,8 +211,9 @@ // Use the internal context as we know it is good and shiny new. cairo_t* cr = context.GetInternalContext(); - gtk_render_background(style_context_, cr, 0, 0, width, height); - gtk_render_frame(style_context_, cr, 0, 0, width, height); + GtkStyleContext* style_ctx = GetStyleContext(PanelItem::TITLE); + gtk_render_background(style_ctx, cr, 0, 0, width, height); + gtk_render_frame(style_ctx, cr, 0, 0, width, height); bg_texture = texture_ptr_from_cairo_graphics(context); return bg_texture; diff -Nru unity-7.1.2+14.04.20140303/unity-shared/PanelStyle.h unity-7.2.4+14.04.20141217/unity-shared/PanelStyle.h --- unity-7.1.2+14.04.20140303/unity-shared/PanelStyle.h 2014-03-03 16:47:36.000000000 +0000 +++ unity-7.2.4+14.04.20141217/unity-shared/PanelStyle.h 2014-12-17 20:51:37.000000000 +0000 @@ -62,11 +62,11 @@ static Style& Instance(); - GtkStyleContext* GetStyleContext(); + GtkStyleContext* GetStyleContext(PanelItem); BaseTexturePtr GetBackground(int monitor = 0); BaseTexturePtr GetWindowButton(WindowButtonType type, WindowState state, int monitor = 0); BaseTexturePtr GetDashWindowButton(WindowButtonType type, WindowState state, int monitor = 0); - std::string GetFontDescription(PanelItem item); + std::string GetFontDescription(PanelItem); int PanelHeight(int monitor = 0) const; diff -Nru unity-7.1.2+14.04.20140303/unity-shared/PlacesOverlayVScrollBar.cpp unity-7.2.4+14.04.20141217/unity-shared/PlacesOverlayVScrollBar.cpp --- unity-7.1.2+14.04.20140303/unity-shared/PlacesOverlayVScrollBar.cpp 2014-03-03 16:47:14.000000000 +0000 +++ unity-7.2.4+14.04.20141217/unity-shared/PlacesOverlayVScrollBar.cpp 2014-12-17 20:51:37.000000000 +0000 @@ -19,33 +19,46 @@ #include -#include "PlacesOverlayVScrollBar.h" #include "CairoTexture.h" - -namespace -{ - int const PROXIMITY = 7; - int const SCROLL_ANIMATION = 400; - int const MAX_CONNECTOR_ANIMATION = 200; -} +#include "PlacesOverlayVScrollBar.h" +#include "RawPixel.h" namespace unity { namespace dash { +namespace +{ + const RawPixel PROXIMITY = 7_em; + const int SCROLL_ANIMATION = 400; + const int MAX_CONNECTOR_ANIMATION = 200; + const nux::Color CONNECTOR_COLOR = nux::color::Gray; +} + +class PlacesOverlayVScrollBar::ProximityArea : public nux::InputAreaProximity, public sigc::trackable +{ +public: + ProximityArea(nux::InputArea* area, unsigned prox) + : nux::InputAreaProximity(area, prox) + , proximity([this] { return proximity_; }, [this] (unsigned px) { proximity_ = px; return false; }) + {} + + nux::RWProperty proximity; +}; PlacesOverlayVScrollBar::PlacesOverlayVScrollBar(NUX_FILE_LINE_DECL) : PlacesVScrollBar(NUX_FILE_LINE_PARAM) , overlay_window_(new VScrollBarOverlayWindow(_track->GetAbsoluteGeometry())) - , area_prox_(this, PROXIMITY) + , area_prox_(std::make_shared(this, PROXIMITY.CP(scale))) , thumb_above_slider_(false) , connector_height_(0) , mouse_down_offset_(0) , delta_update_(0) { - area_prox_.mouse_near.connect(sigc::mem_fun(this, &PlacesOverlayVScrollBar::OnMouseNear)); - area_prox_.mouse_beyond.connect(sigc::mem_fun(this, &PlacesOverlayVScrollBar::OnMouseBeyond)); + area_prox_->mouse_near.connect(sigc::mem_fun(this, &PlacesOverlayVScrollBar::OnMouseNear)); + area_prox_->mouse_beyond.connect(sigc::mem_fun(this, &PlacesOverlayVScrollBar::OnMouseBeyond)); + overlay_window_->scale = scale(); overlay_window_->mouse_enter.connect(sigc::mem_fun(this, &PlacesOverlayVScrollBar::OnMouseEnter)); overlay_window_->mouse_leave.connect(sigc::mem_fun(this, &PlacesOverlayVScrollBar::OnMouseLeave)); overlay_window_->mouse_down.connect(sigc::mem_fun(this, &PlacesOverlayVScrollBar::OnMouseDown)); @@ -53,11 +66,17 @@ overlay_window_->mouse_click.connect(sigc::mem_fun(this, &PlacesOverlayVScrollBar::OnMouseClick)); overlay_window_->mouse_move.connect(sigc::mem_fun(this, &PlacesOverlayVScrollBar::OnMouseMove)); overlay_window_->mouse_drag.connect(sigc::mem_fun(this, &PlacesOverlayVScrollBar::OnMouseDrag)); + overlay_window_->mouse_wheel.connect(sigc::mem_fun(this, &PlacesOverlayVScrollBar::OnMouseWheel)); overlay_window_->sigHidden.connect(sigc::hide(sigc::mem_fun(this, &PlacesOverlayVScrollBar::ResetConnector))); _track->geometry_changed.connect(sigc::mem_fun(this, &PlacesOverlayVScrollBar::OnTrackGeometryChanged)); OnVisibleChanged.connect(sigc::mem_fun(this, &PlacesOverlayVScrollBar::OnVisibilityChanged)); OnSensitiveChanged.connect(sigc::mem_fun(this, &PlacesOverlayVScrollBar::OnSensitivityChanged)); + + scale.changed.connect([this] (double scale) { + area_prox_->proximity = PROXIMITY.CP(scale); + overlay_window_->scale = scale; + }); } void PlacesOverlayVScrollBar::OnTrackGeometryChanged(nux::Area* /*area*/, nux::Geometry& /*geo*/) @@ -353,6 +372,12 @@ MouseDraggingOverlay(y, dy); } +void PlacesOverlayVScrollBar::OnMouseWheel(int x, int y, int delta, unsigned long mouse_state, unsigned long key_state) +{ + mouse_wheel.emit(x, y, delta, mouse_state, key_state); + UpdateConnectorPosition(); +} + void PlacesOverlayVScrollBar::MouseDraggingOverlay(int y, int dy) { int const thumb_offset = overlay_window_->GetThumbOffsetY() + mouse_down_offset_; @@ -410,31 +435,25 @@ if (connector_height_ < 0) return; - int width = 3; + int width = _slider->GetWidth(); int height = connector_height_; - float const radius = 1.5f; - float const aspect = 1.0f; - - cairo_t* cr = NULL; - nux::color::RedGreenBlue const& connector_bg = nux::color::Gray; + if (connector_texture_ && connector_texture_->GetWidth() == width && connector_texture_->GetHeight() == height) + return; nux::CairoGraphics cairoGraphics(CAIRO_FORMAT_ARGB32, width, height); - cr = cairoGraphics.GetContext(); - cairo_save(cr); + cairo_t* cr = cairoGraphics.GetInternalContext(); + cairo_surface_set_device_scale(cairo_get_target(cr), scale, scale); cairo_set_operator(cr, CAIRO_OPERATOR_CLEAR); cairo_paint(cr); cairo_set_operator(cr, CAIRO_OPERATOR_OVER); - cairo_save(cr); - - cairo_set_source_rgba(cr, connector_bg.red, connector_bg.green, connector_bg.blue, 0.8); - cairoGraphics.DrawRoundedRectangle(cr, aspect, 0.0f, 0.0f, radius, width, height); - cairo_fill_preserve(cr); + cairo_set_source_rgba(cr, CONNECTOR_COLOR.red, CONNECTOR_COLOR.green, CONNECTOR_COLOR.blue, 0.8); + cairo_rectangle(cr, 0, 0, static_cast(width)/scale(), static_cast(height)/scale()); + cairo_fill(cr); - connector_texture_.Adopt(texture_from_cairo_graphics(cairoGraphics)); - cairo_destroy(cr); + connector_texture_ = texture_ptr_from_cairo_graphics(cairoGraphics); QueueDraw(); } diff -Nru unity-7.1.2+14.04.20140303/unity-shared/PlacesOverlayVScrollBar.h unity-7.2.4+14.04.20141217/unity-shared/PlacesOverlayVScrollBar.h --- unity-7.1.2+14.04.20140303/unity-shared/PlacesOverlayVScrollBar.h 2014-03-03 16:47:14.000000000 +0000 +++ unity-7.2.4+14.04.20141217/unity-shared/PlacesOverlayVScrollBar.h 2014-12-17 20:51:37.000000000 +0000 @@ -67,10 +67,10 @@ void OnMouseDown(int x, int y, unsigned int button_flags, unsigned int key_flags); void OnMouseUp(int x, int y, unsigned int button_flags, unsigned int key_flags); - void OnMouseMove(int x, int y, int dx, int dy, unsigned int button_flags, unsigned int key_flags); - void OnMouseDrag(int x, int y, int dx, int dy, unsigned int button_flags, unsigned int key_flags); + void OnMouseWheel(int x, int y, int delta, unsigned long mouse_state, unsigned long key_state); + void MouseDraggingOverlay(int y, int dy); bool IsMouseInTopHalfOfThumb(int y); @@ -80,7 +80,7 @@ void UpdateConnectorPosition(); void ResetConnector(); - + void UpdateStepY(); void SetupAnimation(int start, int stop, int milliseconds); @@ -93,7 +93,9 @@ void UpdateConnectorTexture(); nux::ObjectPtr overlay_window_; - nux::InputAreaProximity area_prox_; + + class ProximityArea; + std::shared_ptr area_prox_; nux::animation::AnimateValue animation_; connection::Wrapper tweening_connection_; diff -Nru unity-7.1.2+14.04.20140303/unity-shared/PlacesVScrollBar.cpp unity-7.2.4+14.04.20141217/unity-shared/PlacesVScrollBar.cpp --- unity-7.1.2+14.04.20140303/unity-shared/PlacesVScrollBar.cpp 2014-03-03 16:47:14.000000000 +0000 +++ unity-7.2.4+14.04.20141217/unity-shared/PlacesVScrollBar.cpp 2014-12-17 20:51:37.000000000 +0000 @@ -1,6 +1,6 @@ // -*- Mode: C++; indent-tabs-mode: nil; tab-width: 2 -*- /* - * Copyright (C) 2011 Canonical Ltd + * Copyright (C) 2011-2014 Canonical Ltd * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License version 3 as @@ -15,44 +15,53 @@ * along with this program. If not, see . * * Authored by: Mirco Müller + * Marco Trevisan */ #include +#include #include "unity-shared/CairoTexture.h" +#include "unity-shared/RawPixel.h" #include "PlacesVScrollBar.h" -using unity::texture_from_cairo_graphics; - namespace unity { namespace dash { +namespace +{ +const RawPixel BUTTONS_HEIGHT = 15_em; +const RawPixel WIDTH = 3_em; +} PlacesVScrollBar::PlacesVScrollBar(NUX_FILE_LINE_DECL) - : VScrollBar(NUX_FILE_LINE_PARAM), - _slider_texture(NULL) + : nux::VScrollBar(NUX_FILE_LINE_PARAM) + , scale(1.0) { - _scroll_up_button->SetMaximumHeight(15); - _scroll_up_button->SetMinimumHeight(15); - - _scroll_down_button->SetMaximumHeight(15); - _scroll_down_button->SetMinimumHeight(15); - - _slider->SetMinimumWidth(3); - _slider->SetMaximumWidth(3); - SetMinimumWidth(3); - SetMaximumWidth(3); + UpdateSize(); + scale.changed.connect([this] (double scale) { + UpdateSize(); + QueueRelayout(); + QueueDraw(); + }); } -PlacesVScrollBar::~PlacesVScrollBar() +void PlacesVScrollBar::UpdateSize() { - if (_slider_texture) - _slider_texture->UnReference(); + _scroll_up_button->SetMaximumHeight(BUTTONS_HEIGHT.CP(scale)); + _scroll_up_button->SetMinimumHeight(BUTTONS_HEIGHT.CP(scale)); + + _scroll_down_button->SetMaximumHeight(BUTTONS_HEIGHT.CP(scale)); + _scroll_down_button->SetMinimumHeight(BUTTONS_HEIGHT.CP(scale)); + + _slider->SetMinimumWidth(WIDTH.CP(scale)); + _slider->SetMaximumWidth(WIDTH.CP(scale)); + SetMinimumWidth(WIDTH.CP(scale)); + SetMaximumWidth(WIDTH.CP(scale)); } -void -PlacesVScrollBar::PreLayoutManagement() +void PlacesVScrollBar::PreLayoutManagement() { nux::VScrollBar::PreLayoutManagement(); } @@ -69,8 +78,8 @@ void PlacesVScrollBar::Draw(nux::GraphicsEngine& graphics_engine, bool force_draw) { - if(!RedirectedAncestor()) - { + if (!RedirectedAncestor()) + { DrawScrollbar(graphics_engine); } } @@ -78,15 +87,19 @@ void PlacesVScrollBar::DrawContent(nux::GraphicsEngine& graphics_engine, bool force_draw) { - if(RedirectedAncestor()) - { - DrawScrollbar(graphics_engine); + if (RedirectedAncestor()) + { + DrawScrollbar(graphics_engine); } } void PlacesVScrollBar::DrawScrollbar(nux::GraphicsEngine& graphics_engine) { + // check if textures have been computed... if they haven't, exit function + if (!slider_texture_) + return; + nux::Color color = nux::color::White; nux::Geometry const& base = GetGeometry(); nux::TexCoordXForm texxform; @@ -95,9 +108,6 @@ unsigned int alpha = 0, src = 0, dest = 0; graphics_engine.GetRenderStates().GetBlend(alpha, src, dest); - // check if textures have been computed... if they haven't, exit function - if (!_slider_texture) - return; texxform.SetTexCoordType(nux::TexCoordXForm::OFFSET_SCALE_COORD); @@ -112,7 +122,7 @@ slider_geo.y, slider_geo.width, slider_geo.height, - _slider_texture->GetDeviceTexture(), + slider_texture_->GetDeviceTexture(), texxform, color); } @@ -123,35 +133,26 @@ void PlacesVScrollBar::UpdateTexture() { - nux::CairoGraphics* cairoGraphics = NULL; - cairo_t* cr = NULL; - // update texture of slider int width = _slider->GetBaseWidth(); int height = _slider->GetBaseHeight(); - cairoGraphics = new nux::CairoGraphics(CAIRO_FORMAT_ARGB32, width, height); - cr = cairoGraphics->GetContext(); + + if (slider_texture_ && slider_texture_->GetWidth() == width && slider_texture_->GetHeight() == height) + return; + + nux::CairoGraphics cg(CAIRO_FORMAT_ARGB32, width, height); + auto* cr = cg.GetContext(); + cairo_surface_set_device_scale(cairo_get_target(cr), scale, scale); cairo_set_operator(cr, CAIRO_OPERATOR_CLEAR); cairo_paint(cr); cairo_set_operator(cr, CAIRO_OPERATOR_OVER); cairo_set_source_rgba(cr, 1.0f, 1.0f, 1.0f, 1.0f); - cairoGraphics->DrawRoundedRectangle(cr, - 1.0f, - 0.0, - 0.0, - 1.5, - 3.0, - (double) height - 3.0); + cg.DrawRoundedRectangle(cr, 1.0f, 0.0, 0.0, 1.5, 3.0, static_cast(height)/scale() - 3.0); cairo_fill(cr); - if (_slider_texture) - _slider_texture->UnReference(); - _slider_texture = texture_from_cairo_graphics(*cairoGraphics); - - cairo_destroy(cr); - delete cairoGraphics; + slider_texture_ = texture_ptr_from_cairo_graphics(cg); } } // namespace dash diff -Nru unity-7.1.2+14.04.20140303/unity-shared/PlacesVScrollBar.h unity-7.2.4+14.04.20141217/unity-shared/PlacesVScrollBar.h --- unity-7.1.2+14.04.20140303/unity-shared/PlacesVScrollBar.h 2014-03-03 16:47:14.000000000 +0000 +++ unity-7.2.4+14.04.20141217/unity-shared/PlacesVScrollBar.h 2014-12-17 20:51:37.000000000 +0000 @@ -20,12 +20,7 @@ #ifndef PLACES_VSCROLLBAR_H #define PLACES_VSCROLLBAR_H -#include -#include -#include -#include #include -#include namespace unity { @@ -36,23 +31,23 @@ { public: PlacesVScrollBar(NUX_FILE_LINE_PROTO); - virtual ~PlacesVScrollBar(); + + nux::Property scale; protected: virtual void PreLayoutManagement(); virtual long PostLayoutManagement(long LayoutResult); - void Draw(nux::GraphicsEngine& gfxContext, - bool forceDraw); - void DrawContent(nux::GraphicsEngine& gfxContext, - bool forceDraw); + void Draw(nux::GraphicsEngine& gfxContext, bool forceDraw); + void DrawContent(nux::GraphicsEngine& gfxContext, bool forceDraw); private: + void UpdateSize(); void UpdateTexture(); void DrawScrollbar(nux::GraphicsEngine& graphics_engine); private: - nux::BaseTexture* _slider_texture; + nux::ObjectPtr slider_texture_; }; } // namespace dash diff -Nru unity-7.1.2+14.04.20140303/unity-shared/PluginAdapter.cpp unity-7.2.4+14.04.20141217/unity-shared/PluginAdapter.cpp --- unity-7.1.2+14.04.20140303/unity-shared/PluginAdapter.cpp 2014-03-03 16:47:36.000000000 +0000 +++ unity-7.2.4+14.04.20141217/unity-shared/PluginAdapter.cpp 2014-12-17 20:51:54.000000000 +0000 @@ -190,15 +190,34 @@ _vp_switch_started = false; screen_viewport_switch_ended.emit(); } - else if (IsScaleActive() && g_strcmp0(plugin, "scale") == 0 && - g_strcmp0(event, "activate") == 0) + else if (g_strcmp0(plugin, "scale") == 0 && g_strcmp0(event, "activate") == 0) { - // If the scale plugin is activated again while is already grabbing the screen - // it means that is switching the view (i.e. switching from a spread application - // to another), so we need to notify our clients that it has really terminated - // and initiated again. - terminate_spread.emit(); - initiate_spread.emit(); + bool new_state = CompOption::getBoolOptionNamed(option, "active"); + + if (_spread_state != new_state) + { + _spread_state = new_state; + _spread_state ? initiate_spread.emit() : terminate_spread.emit(); + + if (!_spread_state) + _spread_windows_state = false; + } + else if (_spread_state && new_state) + { + // If the scale plugin is activated again while is already grabbing the screen + // it means that is switching the view (i.e. switching from a spread application + // to another), so we need to notify our clients that it has really terminated + // and initiated again. + + bool old_windows_state = _spread_windows_state; + _spread_state = false; + _spread_windows_state = false; + terminate_spread.emit(); + + _spread_state = true; + _spread_windows_state = old_windows_state; + initiate_spread.emit(); + } } } @@ -248,7 +267,8 @@ argument.push_back(arg); /* Initiate the selected action with the arguments */ - action->initiate()(action, state, argument); + if (CompAction::CallBack const& initiate_cb = primary_action_->initiate()) + initiate_cb(action, state, argument); } void MultiActionList::InitiateAll(CompOption::Vector const& extra_args, int state) const @@ -291,8 +311,11 @@ if (primary_action_) { - primary_action_->terminate()(primary_action_, CompAction::StateCancel, argument); - return; + if (CompAction::CallBack const& terminate_cb = primary_action_->terminate()) + { + terminate_cb(primary_action_, CompAction::StateCancel, argument); + return; + } } for (auto const& it : actions_) @@ -304,7 +327,8 @@ CompAction::StateTermEdge | CompAction::StateTermEdgeDnd)) { - action->terminate()(action, 0, argument); + if (CompAction::CallBack const& terminate_cb = primary_action_->terminate()) + terminate_cb(action, 0, argument); } } } @@ -530,9 +554,10 @@ bool PluginAdapter::IsWindowObscured(Window window_id) const { - CompWindow* window = m_Screen->findWindow(window_id); + if (_spread_state) + return false; - if (window) + if (CompWindow* window = m_Screen->findWindow(window_id)) { if (window->inShowDesktopMode()) return true; @@ -573,6 +598,14 @@ return false; } +bool PluginAdapter::IsWindowShaded(Window window_id) const +{ + if (CompWindow* window = m_Screen->findWindow(window_id)) + return (window->state() & CompWindowStateShadedMask); + + return false; +} + bool PluginAdapter::IsWindowOnTop(Window window_id) const { if (window_id == GetTopMostValidWindowInViewport()) @@ -683,7 +716,19 @@ void PluginAdapter::Maximize(Window window_id) { if (CompWindow* window = m_Screen->findWindow(window_id)) - window->maximize(MAXIMIZE_STATE); + window->maximize(CompWindowStateMaximizedVertMask); +} + +void PluginAdapter::VerticallyMaximize(Window window_id) +{ + if (CompWindow* window = m_Screen->findWindow(window_id)) + window->maximize(CompWindowStateMaximizedVertMask); +} + +void PluginAdapter::HorizontallyMaximize(Window window_id) +{ + if (CompWindow* window = m_Screen->findWindow(window_id)) + window->maximize(CompWindowStateMaximizedHorzMask); } void PluginAdapter::Restore(Window window_id) @@ -699,21 +744,14 @@ if (window && (window->state() & MAXIMIZE_STATE)) { nux::Geometry new_geo(GetWindowSavedGeometry(window_id)); - decoration::Border border; - double scale = 1.0f; - - if (compiz_utils::IsWindowFullyDecorable(window)) - { - auto& settings = Settings::Instance(); - border = decoration::Style::Get()->Border(); - scale = settings.em(MonitorGeometryIn(new_geo))->DPIScale(); - } + window->maximize(0); + auto const& border = window->border(); new_geo.x = x; - new_geo.y = y; - new_geo.width -= (border.left - border.right) * scale; - new_geo.height -= (border.top - border.bottom) * scale; - window->maximize(0); + new_geo.y = y + border.top; + new_geo.width -= (border.left + border.right); + new_geo.height -= (border.top + border.bottom); + MoveResizeWindow(window_id, new_geo); } } @@ -737,6 +775,26 @@ window->unminimize(); } +void PluginAdapter::Shade(Window window_id) +{ + CompWindow* window = m_Screen->findWindow(window_id); + if (window && (window->actions() & CompWindowActionShadeMask)) + { + window->changeState(window->state() | CompWindowStateShadedMask); + window->updateAttributes(CompStackingUpdateModeNone); + } +} + +void PluginAdapter::UnShade(Window window_id) +{ + CompWindow* window = m_Screen->findWindow(window_id); + if (window && (window->actions() & CompWindowActionShadeMask)) + { + window->changeState(window->state() & ~CompWindowStateShadedMask); + window->updateAttributes(CompStackingUpdateModeNone); + } +} + void PluginAdapter::Close(Window window_id) { CompWindow* window = m_Screen->findWindow(window_id); @@ -948,11 +1006,13 @@ void PluginAdapter::OnShowDesktop() { _in_show_desktop = true; + show_desktop_changed.emit(); } void PluginAdapter::OnLeaveDesktop() { _in_show_desktop = false; + show_desktop_changed.emit(); } void PluginAdapter::UpdateShowDesktopState() @@ -1188,7 +1248,22 @@ bool PluginAdapter::IsScreenGrabbed() const { - return m_Screen->grabbed(); + if (m_Screen->grabbed()) + return true; + + auto* dpy = m_Screen->dpy(); + auto ret = XGrabKeyboard(dpy, m_Screen->root(), True, GrabModeAsync, GrabModeAsync, CurrentTime); + + if (ret == GrabSuccess) + { + XUngrabKeyboard(dpy, CurrentTime); + XFlush(dpy); + + if (CompWindow* w = m_Screen->findWindow(m_Screen->activeWindow())) + w->moveInputFocusTo(); + } + + return (ret == AlreadyGrabbed); } bool PluginAdapter::IsViewPortSwitchStarted() const @@ -1380,6 +1455,40 @@ _last_focused_window = NULL; } +void PluginAdapter::UnmapAllNoNuxWindowsSync() +{ + for (auto const& window : m_Screen->windows()) + { + if (!IsNuxWindow(window) && (window->isMapped() || window->isViewable())) + { + if (window->overrideRedirect()) + { + XUnmapWindow(m_Screen->dpy(), window->id()); + } + else + { + window->hide(); + } + } + } + + XSync(m_Screen->dpy(), False); +} + +bool PluginAdapter::IsNuxWindow(CompWindow* value) +{ + std::vector const& xwns = nux::XInputWindow::NativeHandleList(); + auto id = value->id(); + + unsigned int size = xwns.size(); + for (unsigned int i = 0; i < size; ++i) + { + if (xwns[i] == id) + return true; + } + return false; +} + void PluginAdapter::AddProperties(debug::IntrospectionData& wrapper) { wrapper.add(GetScreenGeometry()) diff -Nru unity-7.1.2+14.04.20140303/unity-shared/PluginAdapter.h unity-7.2.4+14.04.20141217/unity-shared/PluginAdapter.h --- unity-7.1.2+14.04.20140303/unity-shared/PluginAdapter.h 2014-03-03 16:47:14.000000000 +0000 +++ unity-7.2.4+14.04.20141217/unity-shared/PluginAdapter.h 2014-12-17 20:51:54.000000000 +0000 @@ -128,6 +128,7 @@ bool IsWindowMapped(Window window_id) const; bool IsWindowVisible(Window window_id) const; bool IsWindowOnTop(Window window_id) const; + bool IsWindowShaded(Window window_id) const; bool IsWindowClosable(Window window_id) const; bool IsWindowMinimized(Window window_id) const; bool IsWindowMinimizable(Window window_id) const; @@ -136,10 +137,14 @@ void ShowActionMenu(Time, Window, unsigned button, nux::Point const&); void Maximize(Window window_id); + void VerticallyMaximize(Window window_id); + void HorizontallyMaximize(Window window_id); void Restore(Window window_id); void RestoreAt(Window window_id, int x, int y); void Minimize(Window window_id); void UnMinimize(Window window_id); + void Shade(Window window_id); + void UnShade(Window window_id); void Close(Window window_id); void Activate(Window window_id); void Raise(Window window_id); @@ -188,6 +193,9 @@ Window GetTopWindowAbove(Window xid) const; + void UnmapAllNoNuxWindowsSync(); + static bool IsNuxWindow(CompWindow* value); + protected: PluginAdapter(CompScreen* screen); void AddProperties(debug::IntrospectionData&); diff -Nru unity-7.1.2+14.04.20140303/unity-shared/PreviewStyle.cpp unity-7.2.4+14.04.20141217/unity-shared/PreviewStyle.cpp --- unity-7.1.2+14.04.20140303/unity-shared/PreviewStyle.cpp 2014-03-03 16:47:14.000000000 +0000 +++ unity-7.2.4+14.04.20141217/unity-shared/PreviewStyle.cpp 2014-12-17 20:51:37.000000000 +0000 @@ -40,8 +40,8 @@ { Style* style_instance = nullptr; -const int preview_width = 770; -const int preview_height = 380; +const RawPixel preview_width = 770_em; +const RawPixel preview_height = 380_em; typedef nux::ObjectPtr BaseTexturePtr; @@ -98,7 +98,6 @@ , preview_nav_right_texture_("/preview_next.svg") , preview_play_texture_("/preview_play.svg") , preview_pause_texture_("/preview_pause.svg") - , preview_spin_texture_("/search_spin.svg") , warning_icon_texture_("/warning_icon.png") { } @@ -110,7 +109,6 @@ LazyLoadTexture<32> preview_nav_right_texture_; LazyLoadTexture<32> preview_play_texture_; LazyLoadTexture<32> preview_pause_texture_; - LazyLoadTexture<32> preview_spin_texture_; LazyLoadTexture<22> warning_icon_texture_; }; @@ -153,100 +151,99 @@ return new nux::ColorLayer(nux::Color(0.0f, 0.0f, 0.0f, 0.1f), true, rop); } -int Style::GetNavigatorWidth() const +RawPixel Style::GetNavigatorWidth() const { - return 42; + return 42_em; } -int Style::GetNavigatorIconSize() const +RawPixel Style::GetNavigatorIconSize() const { - return 24; + return 24_em; } -int Style::GetPreviewWidth() const +RawPixel Style::GetPreviewWidth() const { return preview_width; } -int Style::GetPreviewHeight() const +RawPixel Style::GetPreviewHeight() const { return preview_height; } - -int Style::GetPreviewTopPadding() const +RawPixel Style::GetPreviewTopPadding() const { - return 100; + return 100_em; } -int Style::GetDetailsTopMargin() const +RawPixel Style::GetDetailsTopMargin() const { - return 5; + return 5_em; } -int Style::GetDetailsBottomMargin() const +RawPixel Style::GetDetailsBottomMargin() const { - return 10; + return 10_em; } -int Style::GetDetailsRightMargin() const +RawPixel Style::GetDetailsRightMargin() const { - return 10; + return 10_em; } -int Style::GetDetailsLeftMargin() const +RawPixel Style::GetDetailsLeftMargin() const { - return 10; + return 10_em; } -int Style::GetPanelSplitWidth() const +RawPixel Style::GetPanelSplitWidth() const { - return 10; + return 10_em; } -int Style::GetAppIconAreaWidth() const +RawPixel Style::GetAppIconAreaWidth() const { - return 105; + return 105_em; } -int Style::GetSpaceBetweenTitleAndSubtitle() const +RawPixel Style::GetSpaceBetweenTitleAndSubtitle() const { - return 6; + return 6_em; } -int Style::GetSpaceBetweenIconAndDetails() const +RawPixel Style::GetSpaceBetweenIconAndDetails() const { - return 18; + return 18_em; } -int Style::GetTrackHeight() const +RawPixel Style::GetTrackHeight() const { - return 28; + return 28_em; } -int Style::GetMusicDurationWidth() const +RawPixel Style::GetMusicDurationWidth() const { - return 40; + return 40_em; } -int Style::GetActionButtonHeight() const +RawPixel Style::GetActionButtonHeight() const { - return 34; + return 34_em; } -int Style::GetActionButtonMaximumWidth() const +RawPixel Style::GetActionButtonMaximumWidth() const { - return 175; + return 175_em; } -int Style::GetSpaceBetweenActions() const +RawPixel Style::GetSpaceBetweenActions() const { - return 10; + return 10_em; } -int Style::GetTrackBarHeight() const +RawPixel Style::GetTrackBarHeight() const { - return 25; + return 25_em; } float Style::GetAppImageAspectRatio() const @@ -254,24 +251,24 @@ return 1.0; } -int Style::GetDetailsPanelMinimumWidth() const +RawPixel Style::GetDetailsPanelMinimumWidth() const { - return 300; + return 300_em; } -int Style::GetInfoHintIconSizeWidth() const +RawPixel Style::GetInfoHintIconSizeWidth() const { - return 24; + return 24_em; } -int Style::GetInfoHintNameMinimumWidth() const +RawPixel Style::GetInfoHintNameMinimumWidth() const { - return 100; + return 100_em; } -int Style::GetInfoHintNameMaximumWidth() const +RawPixel Style::GetInfoHintNameMaximumWidth() const { - return 160; + return 160_em; } float Style::GetDescriptionLineSpacing() const @@ -279,19 +276,19 @@ return 2.0; } -int Style::GetDescriptionLineCount() const +RawPixel Style::GetDescriptionLineCount() const { - return 20; + return 20_em; } -int Style::GetRatingWidgetHeight() const +RawPixel Style::GetRatingWidgetHeight() const { - return 36; + return 36_em; } -int Style::GetStatusIconSize() const +RawPixel Style::GetStatusIconSize() const { - return 12; + return 10_em; } std::string Style::payment_title_font() const @@ -344,39 +341,39 @@ return nux::Color(255, 0, 0); } -int Style::GetPaymentIconAreaWidth() const +RawPixel Style::GetPaymentIconAreaWidth() const { - return 64; + return 64_em; } -int Style::GetPaymentTextInputHeight() const +RawPixel Style::GetPaymentTextInputHeight() const { - return 40; + return 40_em; } -int Style::GetPaymentLockWidth() const +RawPixel Style::GetPaymentLockWidth() const { - return 22; + return 22_em; } -int Style::GetPaymentLockHeight() const +RawPixel Style::GetPaymentLockHeight() const { - return 22; + return 22_em; } -int Style::GetPaymentHeaderWidth() const +RawPixel Style::GetPaymentHeaderWidth() const { - return 850; + return 850_em; } -int Style::GetPaymentHeaderSpace() const +RawPixel Style::GetPaymentHeaderSpace() const { - return 0; + return 0_em; } -int Style::GetPaymentFormSpace() const +RawPixel Style::GetPaymentFormSpace() const { - return 5; + return 5_em; } std::string Style::u1_warning_font() const @@ -389,14 +386,14 @@ return float(540)/380; } -int Style::GetAvatarAreaWidth() const +RawPixel Style::GetAvatarAreaWidth() const { - return 100; + return 100_em; } -int Style::GetAvatarAreaHeight() const +RawPixel Style::GetAvatarAreaHeight() const { - return 100; + return 100_em; } std::string Style::content_font() const @@ -504,11 +501,6 @@ return pimpl->warning_icon_texture_.texture(); } -nux::BaseTexture* Style::GetSearchSpinIcon(int size) -{ - return pimpl->preview_spin_texture_.texture(size); -} - } // namespace previews } // namespace dash diff -Nru unity-7.1.2+14.04.20140303/unity-shared/PreviewStyle.h unity-7.2.4+14.04.20141217/unity-shared/PreviewStyle.h --- unity-7.1.2+14.04.20140303/unity-shared/PreviewStyle.h 2014-03-03 16:47:14.000000000 +0000 +++ unity-7.2.4+14.04.20141217/unity-shared/PreviewStyle.h 2014-12-17 20:51:37.000000000 +0000 @@ -29,6 +29,8 @@ #include #include +#include "unity-shared/RawPixel.h" + namespace nux { class BaseTexture; @@ -57,38 +59,38 @@ static Style& Instance(); - int GetNavigatorWidth() const; - int GetNavigatorIconSize() const; + RawPixel GetNavigatorWidth() const; + RawPixel GetNavigatorIconSize() const; - int GetPreviewWidth() const; - int GetPreviewHeight() const; - int GetPreviewTopPadding() const; + RawPixel GetPreviewWidth() const; + RawPixel GetPreviewHeight() const; + RawPixel GetPreviewTopPadding() const; - int GetDetailsTopMargin() const; - int GetDetailsBottomMargin() const; - int GetDetailsRightMargin() const; - int GetDetailsLeftMargin() const; - int GetPanelSplitWidth() const; + RawPixel GetDetailsTopMargin() const; + RawPixel GetDetailsBottomMargin() const; + RawPixel GetDetailsRightMargin() const; + RawPixel GetDetailsLeftMargin() const; + RawPixel GetPanelSplitWidth() const; - int GetSpaceBetweenTitleAndSubtitle() const; + RawPixel GetSpaceBetweenTitleAndSubtitle() const; - int GetActionButtonHeight() const; - int GetSpaceBetweenActions() const; - int GetActionButtonMaximumWidth() const; + RawPixel GetActionButtonHeight() const; + RawPixel GetSpaceBetweenActions() const; + RawPixel GetActionButtonMaximumWidth() const; - int GetDetailsPanelMinimumWidth() const; + RawPixel GetDetailsPanelMinimumWidth() const; - int GetInfoHintIconSizeWidth() const; - int GetInfoHintNameMinimumWidth() const; - int GetInfoHintNameMaximumWidth() const; + RawPixel GetInfoHintIconSizeWidth() const; + RawPixel GetInfoHintNameMinimumWidth() const; + RawPixel GetInfoHintNameMaximumWidth() const; - int GetCommentNameMinimumWidth() const; - int GetCommentNameMaximumWidth() const; + RawPixel GetCommentNameMinimumWidth() const; + RawPixel GetCommentNameMaximumWidth() const; float GetDescriptionLineSpacing() const; - int GetDescriptionLineCount() const; + RawPixel GetDescriptionLineCount() const; - int GetRatingWidgetHeight() const; + RawPixel GetRatingWidgetHeight() const; bool GetShadowBackgroundEnabled() const; @@ -113,8 +115,8 @@ float GetAppImageAspectRatio() const; - int GetAppIconAreaWidth() const; - int GetSpaceBetweenIconAndDetails() const; + RawPixel GetAppIconAreaWidth() const; + RawPixel GetSpaceBetweenIconAndDetails() const; //////////////////////////////// //////////////////////////////// @@ -123,22 +125,22 @@ std::string u1_warning_font() const; nux::BaseTexture* GetWarningIcon(); - int GetTrackHeight() const; + RawPixel GetTrackHeight() const; //////////////////////////////// //////////////////////////////// // Movie Preview float GetVideoImageAspectRatio() const; - int GetTrackBarHeight() const; - int GetMusicDurationWidth() const; - int GetStatusIconSize() const; + RawPixel GetTrackBarHeight() const; + RawPixel GetMusicDurationWidth() const; + RawPixel GetStatusIconSize() const; //////////////////////////////// //////////////////////////////// // Social Preview - int GetAvatarAreaWidth() const; - int GetAvatarAreaHeight() const; + RawPixel GetAvatarAreaWidth() const; + RawPixel GetAvatarAreaHeight() const; std::string content_font() const; @@ -149,7 +151,6 @@ nux::BaseTexture* GetPlayIcon(); nux::BaseTexture* GetPauseIcon(); nux::BaseTexture* GetLockIcon(); - nux::BaseTexture* GetSearchSpinIcon(int size = -1); //////////////////////////////// // Payment Preview @@ -165,13 +166,13 @@ nux::Color payment_error_color() const; - int GetPaymentIconAreaWidth() const; - int GetPaymentTextInputHeight() const; - int GetPaymentLockWidth() const; - int GetPaymentLockHeight() const; - int GetPaymentHeaderWidth() const; - int GetPaymentHeaderSpace() const; - int GetPaymentFormSpace() const; + RawPixel GetPaymentIconAreaWidth() const; + RawPixel GetPaymentTextInputHeight() const; + RawPixel GetPaymentLockWidth() const; + RawPixel GetPaymentLockHeight() const; + RawPixel GetPaymentHeaderWidth() const; + RawPixel GetPaymentHeaderSpace() const; + RawPixel GetPaymentFormSpace() const; ///////////////////////////////// diff -Nru unity-7.1.2+14.04.20140303/unity-shared/RatingsButton.cpp unity-7.2.4+14.04.20141217/unity-shared/RatingsButton.cpp --- unity-7.1.2+14.04.20140303/unity-shared/RatingsButton.cpp 2014-03-03 16:47:14.000000000 +0000 +++ unity-7.2.4+14.04.20141217/unity-shared/RatingsButton.cpp 2014-12-17 20:51:37.000000000 +0000 @@ -29,18 +29,19 @@ namespace { -const int num_stars = 5; +const int NUM_STARS = 5; } namespace unity { RatingsButton::RatingsButton(int star_size, int star_gap, NUX_FILE_LINE_DECL) : nux::ToggleButton(NUX_FILE_LINE_PARAM) + , scale(1.0) + , star_size_(star_size) + , star_gap_(star_gap) , editable_(true) , rating_(0.0) , focused_star_(-1) - , star_size_(star_size) - , star_gap_(star_gap) { SetAcceptKeyNavFocusOnMouseDown(false); SetAcceptKeyNavFocusOnMouseEnter(true); @@ -58,12 +59,11 @@ QueueDraw(); }); - key_nav_focus_activate.connect([this](nux::Area*) { SetRating(static_cast(focused_star_+1)/num_stars); }); + + key_nav_focus_activate.connect([this](nux::Area*) { SetRating(static_cast(focused_star_+1)/NUM_STARS); }); key_down.connect(sigc::mem_fun(this, &RatingsButton::OnKeyDown)); -} -RatingsButton::~RatingsButton() -{ + scale.changed.connect(sigc::hide(sigc::mem_fun(this, &RatingsButton::QueueDraw))); } void RatingsButton::SetEditable(bool editable) @@ -76,7 +76,7 @@ void RatingsButton::SetRating(float rating) { - rating_ = rating; + rating_ = rating; QueueDraw(); } @@ -87,7 +87,7 @@ void RatingsButton::Draw(nux::GraphicsEngine& GfxContext, bool force_draw) { - int rating = static_cast(rating_ * num_stars); + int rating = static_cast(GetRating() * NUM_STARS); // FIXME: 9/26/2011 // We should probably support an API for saying whether the ratings // should or shouldn't support half stars...but our only consumer at @@ -99,8 +99,8 @@ nux::Geometry const& geo = GetGeometry(); nux::Geometry geo_star(geo); - geo_star.width = star_size_; - geo_star.height = star_size_; + geo_star.width = star_size_.CP(scale); + geo_star.height = star_size_.CP(scale); gPainter.PaintBackground(GfxContext, geo); // set up our texture mode @@ -123,10 +123,10 @@ geo.height, col); - for (int index = 0; index < num_stars; ++index) + for (int index = 0; index < NUM_STARS; ++index) { dash::Style& style = dash::Style::Instance(); - nux::BaseTexture* texture = style.GetStarSelectedIcon(); + auto texture = style.GetStarSelectedIcon(); if (index < total_full_stars) { if (GetVisualState() == nux::ButtonVisualState::VISUAL_STATE_NORMAL) @@ -165,7 +165,7 @@ nux::Color(1.0f, 1.0f, 1.0f, 0.5f)); } - geo_star.x += geo_star.width + star_gap_; + geo_star.x += geo_star.width + star_gap_.CP(scale); } @@ -175,11 +175,11 @@ void RatingsButton::UpdateRatingToMouse(int x) { - int width = num_stars*star_size_ + (num_stars-1)*star_gap_; + int width = NUM_STARS*star_size_.CP(scale) + (NUM_STARS-1)*star_gap_.CP(scale); float new_rating = (static_cast(x) / width); // FIXME: change to * 2 once we decide to support also half-stars - new_rating = ceil((num_stars * 1) * new_rating) / (num_stars * 1); + new_rating = ceil((NUM_STARS * 1) * new_rating) / (NUM_STARS * 1); new_rating = (new_rating > 1) ? 1 : ((new_rating < 0) ? 0 : new_rating); SetRating(new_rating); @@ -210,8 +210,8 @@ if (!editable_) return; - int width = num_stars*star_size_+ (num_stars-1)*star_gap_; - focused_star_ = std::max(0, std::min(static_cast(ceil((static_cast(x) / width) * num_stars) - 1), num_stars - 1)); + int width = NUM_STARS*star_size_.CP(scale)+ (NUM_STARS-1)*star_gap_.CP(scale); + focused_star_ = std::max(0, std::min(static_cast(ceil((static_cast(x) / width) * NUM_STARS) - 1), NUM_STARS - 1)); if (!HasKeyFocus()) nux::GetWindowCompositor().SetKeyFocusArea(this); @@ -240,7 +240,7 @@ return false; else if (direction == nux::KEY_NAV_LEFT && (focused_star_ <= 0)) return false; - else if (direction == nux::KEY_NAV_RIGHT && (focused_star_ >= num_stars - 1)) + else if (direction == nux::KEY_NAV_RIGHT && (focused_star_ >= NUM_STARS - 1)) return false; else return true; @@ -283,7 +283,7 @@ { introspection .add(GetAbsoluteGeometry()) - .add("rating", rating_) + .add("rating", GetRating()) .add("focused-star", focused_star_) .add("editable", editable_); } diff -Nru unity-7.1.2+14.04.20140303/unity-shared/RatingsButton.h unity-7.2.4+14.04.20141217/unity-shared/RatingsButton.h --- unity-7.1.2+14.04.20140303/unity-shared/RatingsButton.h 2014-03-03 16:47:14.000000000 +0000 +++ unity-7.2.4+14.04.20141217/unity-shared/RatingsButton.h 2014-12-17 20:51:37.000000000 +0000 @@ -27,6 +27,7 @@ #include #include #include "unity-shared/Introspectable.h" +#include "unity-shared/RawPixel.h" namespace unity { @@ -35,7 +36,8 @@ { public: RatingsButton(int star_size, int star_gap, NUX_FILE_LINE_PROTO); - virtual ~RatingsButton(); + + nux::Property scale; void SetEditable(bool editable); virtual void SetRating(float rating); @@ -62,13 +64,12 @@ void RecvMouseMove(int x, int y, int dx, int dy, unsigned long button_flags, unsigned long key_flags); void UpdateRatingToMouse(int x); - protected: + RawPixel star_size_; + RawPixel star_gap_; bool editable_; float rating_; int focused_star_; - int star_size_; - int star_gap_; }; } // namespace unity diff -Nru unity-7.1.2+14.04.20140303/unity-shared/RawPixel.cpp unity-7.2.4+14.04.20141217/unity-shared/RawPixel.cpp --- unity-7.1.2+14.04.20140303/unity-shared/RawPixel.cpp 2014-03-03 16:47:36.000000000 +0000 +++ unity-7.2.4+14.04.20141217/unity-shared/RawPixel.cpp 2014-12-17 20:51:37.000000000 +0000 @@ -39,7 +39,7 @@ int RawPixel::CP(EMConverter::Ptr const& converter) const { - return std::round(converter->CP(raw_pixel_)); + return converter->CP(raw_pixel_); } int RawPixel::CP(double scale) const diff -Nru unity-7.1.2+14.04.20140303/unity-shared/RawPixel.h unity-7.2.4+14.04.20141217/unity-shared/RawPixel.h --- unity-7.1.2+14.04.20140303/unity-shared/RawPixel.h 2014-03-03 16:47:36.000000000 +0000 +++ unity-7.2.4+14.04.20141217/unity-shared/RawPixel.h 2014-12-17 20:51:37.000000000 +0000 @@ -28,7 +28,7 @@ class RawPixel { public: - RawPixel(double raw_pixel); + RawPixel(double raw_pixel = 0); int CP(EMConverter::Ptr const&) const; int CP(double scale) const; diff -Nru unity-7.1.2+14.04.20140303/unity-shared/SearchBar.cpp unity-7.2.4+14.04.20141217/unity-shared/SearchBar.cpp --- unity-7.1.2+14.04.20140303/unity-shared/SearchBar.cpp 2014-03-03 16:47:36.000000000 +0000 +++ unity-7.2.4+14.04.20141217/unity-shared/SearchBar.cpp 2014-12-17 20:51:54.000000000 +0000 @@ -1,6 +1,6 @@ // -*- Mode: C++; indent-tabs-mode: nil; tab-width: 2 -*- /* - * Copyright (C) 2010-2011 Canonical Ltd + * Copyright (C) 2010-2014 Canonical Ltd * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License version 3 as @@ -20,37 +20,64 @@ #include "config.h" #include +#include #include #include +#include #include +#include #include #include "SearchBar.h" #include "CairoTexture.h" #include "DashStyle.h" #include "GraphicsUtils.h" +#include "IconTexture.h" +#include "IMTextEntry.h" +#include "RawPixel.h" +#include "SearchBarSpinner.h" +#include "StaticCairoText.h" +#include "UnitySettings.h" + +namespace unity +{ namespace { +const double DEFAULT_SCALE = 1.0; const float DEFAULT_ICON_OPACITY = 1.0f; const int DEFAULT_LIVE_SEARCH_TIMEOUT = 40; const int SPINNER_TIMEOUT = 100; +const int CORNER_RADIUS = 5; + +const RawPixel SPACE_BETWEEN_SPINNER_AND_TEXT = 5_em; +const RawPixel SPACE_BETWEEN_ENTRY_AND_HIGHLIGHT = 10_em; +const RawPixel LEFT_INTERNAL_PADDING = 4_em; +const RawPixel SEARCH_ENTRY_RIGHT_BORDER = 10_em; +const RawPixel LEFT_PADDING = 0_em; +const RawPixel RIGHT_PADDING = 10_em; + +const RawPixel HIGHLIGHT_HEIGHT = 24_em; + +const RawPixel ARROW_MIN_WIDTH = 2_em; +const RawPixel ARROW_MAX_WIDTH = 2_em; -const int SPACE_BETWEEN_SPINNER_AND_TEXT = 5; -const int SPACE_BETWEEN_ENTRY_AND_HIGHLIGHT = 10; -const int LEFT_INTERNAL_PADDING = 4; -const int SEARCH_ENTRY_RIGHT_BORDER = 10; +const RawPixel TOP_ARROW_MIN_HEIGHT = 12_em; +const RawPixel TOP_ARROW_MAX_HEIGHT = 12_em; -const int HIGHLIGHT_HEIGHT = 24; +const RawPixel BOT_ARROW_MIN_HEIGHT = 8_em; +const RawPixel BOT_ARROW_MAX_HEIGHT = 8_em; + +const RawPixel FILTER_HORIZONTAL_MARGIN = 8_em; // Fonts -const std::string HINT_LABEL_FONT_SIZE = "20px"; +const std::string HINT_LABEL_FONT_SIZE = "15"; // == 20px const std::string HINT_LABEL_FONT_STYLE = "Italic"; const std::string HINT_LABEL_DEFAULT_FONT = "Ubuntu " + HINT_LABEL_FONT_STYLE + " " + HINT_LABEL_FONT_SIZE; const std::string PANGO_ENTRY_DEFAULT_FONT_FAMILY = "Ubuntu"; -const int PANGO_ENTRY_FONT_SIZE = 22; +const RawPixel PANGO_ENTRY_FONT_SIZE = 22_em; const std::string SHOW_FILTERS_LABEL_FONT_SIZE = "13"; const std::string SHOW_FILTERS_LABEL_FONT_STYLE = ""; @@ -58,6 +85,8 @@ } +} + DECLARE_LOGGER(logger, "unity.dash.searchbar"); namespace { @@ -113,6 +142,7 @@ , showing_filters(false) , can_refine_search(false) , live_search_wait(DEFAULT_LIVE_SEARCH_TIMEOUT) + , scale(DEFAULT_SCALE) , show_filter_hint_(show_filter_hint) , expander_view_(nullptr) , show_filters_(nullptr) @@ -120,35 +150,29 @@ , last_height_(-1) { dash::Style& style = dash::Style::Instance(); - nux::BaseTexture* icon = style.GetSearchMagnifyIcon(); bg_layer_.reset(new nux::ColorLayer(nux::Color(0xff595853), true)); layout_ = new nux::HLayout(NUX_TRACKER_LOCATION); - layout_->SetLeftAndRightPadding(LEFT_INTERNAL_PADDING, SEARCH_ENTRY_RIGHT_BORDER); - layout_->SetSpaceBetweenChildren(SPACE_BETWEEN_ENTRY_AND_HIGHLIGHT); SetLayout(layout_); entry_layout_ = new nux::HLayout(NUX_TRACKER_LOCATION); - entry_layout_->SetLeftAndRightPadding(0, 10); layout_->AddLayout(entry_layout_); spinner_ = new SearchBarSpinner(); - spinner_->SetMinMaxSize(icon->GetWidth(), icon->GetHeight()); + spinner_->scale = scale(); spinner_->mouse_click.connect(sigc::mem_fun(this, &SearchBar::OnClearClicked)); entry_layout_->AddView(spinner_, 0, nux::MINOR_POSITION_CENTER, nux::MINOR_SIZE_FULL); - entry_layout_->SetSpaceBetweenChildren(SPACE_BETWEEN_SPINNER_AND_TEXT); nux::HLayout* hint_layout = new nux::HLayout(NUX_TRACKER_LOCATION); - hint_ = new StaticCairoText(" "); + hint_ = new StaticCairoText(""); hint_->SetTextColor(nux::Color(1.0f, 1.0f, 1.0f, 0.5f)); hint_->SetFont(HINT_LABEL_DEFAULT_FONT.c_str()); hint_layout->AddView(hint_, 0, nux::MINOR_POSITION_CENTER, nux::MINOR_SIZE_FULL); pango_entry_ = new IMTextEntry(); pango_entry_->SetFontFamily(PANGO_ENTRY_DEFAULT_FONT_FAMILY.c_str()); - pango_entry_->SetFontSize(PANGO_ENTRY_FONT_SIZE); pango_entry_->text_changed.connect(sigc::mem_fun(this, &SearchBar::OnSearchChanged)); pango_entry_->activated.connect([this]() { activated.emit(); }); pango_entry_->cursor_moved.connect([this](int i) { QueueDraw(); }); @@ -177,26 +201,29 @@ show_filters_->SetFont(SHOW_FILTERS_LABEL_DEFAULT_FONT.c_str()); show_filters_->SetTextColor(nux::color::White); show_filters_->SetTextAlignment(StaticCairoText::NUX_ALIGN_RIGHT); + show_filters_->SetScale(scale); show_filters_->SetLines(-1); - nux::BaseTexture* arrow; - arrow = style.GetGroupExpandIcon(); - expand_icon_ = new IconTexture(arrow, - arrow->GetWidth(), - arrow->GetHeight()); + expand_icon_ = new IconTexture(style.GetGroupExpandIcon()); expand_icon_->SetOpacity(DEFAULT_ICON_OPACITY); - expand_icon_->SetMinimumSize(arrow->GetWidth(), arrow->GetHeight()); + expand_icon_->SetDrawMode(IconTexture::DrawMode::STRETCH_WITH_ASPECT); expand_icon_->SetVisible(false); filter_layout_ = new nux::HLayout(); - filter_layout_->SetHorizontalInternalMargin(8); - filter_layout_->SetLeftAndRightPadding(style.GetFilterResultsHighlightLeftPadding(), style.GetFilterResultsHighlightRightPadding()); filter_layout_->SetContentDistribution(nux::MAJOR_POSITION_END); filter_layout_->AddView(show_filters_, 0, nux::MINOR_POSITION_CENTER); arrow_layout_ = new nux::VLayout(); - arrow_top_space_ = new nux::SpaceLayout(2, 2, 12, 12); - arrow_bottom_space_ = new nux::SpaceLayout(2, 2, 8, 8); + arrow_top_space_ = new nux::SpaceLayout(ARROW_MIN_WIDTH.CP(scale()), + ARROW_MAX_WIDTH.CP(scale()), + TOP_ARROW_MIN_HEIGHT.CP(scale()), + TOP_ARROW_MAX_HEIGHT.CP(scale())); + + arrow_bottom_space_ = new nux::SpaceLayout(ARROW_MIN_WIDTH.CP(scale()), + ARROW_MAX_WIDTH.CP(scale()), + BOT_ARROW_MIN_HEIGHT.CP(scale()), + BOT_ARROW_MAX_HEIGHT.CP(scale())); + arrow_layout_->AddView(arrow_top_space_, 0, nux::MINOR_POSITION_CENTER); arrow_layout_->AddView(expand_icon_, 0, nux::MINOR_POSITION_CENTER); arrow_layout_->AddView(arrow_bottom_space_, 0, nux::MINOR_POSITION_CENTER); @@ -208,14 +235,6 @@ expander_view_->SetLayout(filter_layout_); layout_->AddView(expander_view_, 0, nux::MINOR_POSITION_END, nux::MINOR_SIZE_FULL); - int width = style.GetFilterBarWidth() + - style.GetFilterResultsHighlightLeftPadding() + - style.GetFilterResultsHighlightRightPadding(); - - expander_view_->SetMaximumWidth(width); - expander_view_->SetMinimumWidth(width); - show_filters_->SetMaximumWidth(style.GetFilterBarWidth() - arrow_layout_->GetBaseWidth() - 8); - // Lambda functions auto mouse_expand = [this](int, int, unsigned long, unsigned long) { @@ -240,9 +259,8 @@ expand_icon_->mouse_click.connect(mouse_expand); } - sig_manager_.Add(gtk_settings_get_default(), "notify::gtk-font-name", - sigc::mem_fun(this, &SearchBar::OnFontChanged)); - OnFontChanged(gtk_settings_get_default()); + sig_manager_.Add(gtk_settings_get_default(), "notify::gtk-font-name", sigc::hide(sigc::mem_fun(this, &SearchBar::OnFontChanged))); + OnFontChanged(); search_hint.changed.connect([this](std::string const& s) { OnSearchHintChanged(); }); search_string.SetGetterFunction(sigc::mem_fun(this, &SearchBar::get_search_string)); @@ -250,6 +268,8 @@ im_active.SetGetterFunction(sigc::mem_fun(this, &SearchBar::get_im_active)); im_preedit.SetGetterFunction(sigc::mem_fun(this, &SearchBar::get_im_preedit)); showing_filters.changed.connect(sigc::mem_fun(this, &SearchBar::OnShowingFiltersChanged)); + scale.changed.connect(sigc::mem_fun(this, &SearchBar::UpdateScale)); + Settings::Instance().font_scaling.changed.connect(sigc::hide(sigc::mem_fun(this, &SearchBar::UpdateSearchBarSize))); can_refine_search.changed.connect([this] (bool can_refine) { if (show_filter_hint_) @@ -259,21 +279,95 @@ expand_icon_->SetVisible(can_refine); } }); + + UpdateSearchBarSize(); } -void SearchBar::OnFontChanged(GtkSettings* settings, GParamSpec* pspec) +void SearchBar::UpdateSearchBarSize() +{ + auto& style = dash::Style::Instance(); + + layout_->SetLeftAndRightPadding(LEFT_INTERNAL_PADDING.CP(scale()), + SEARCH_ENTRY_RIGHT_BORDER.CP(scale())); + layout_->SetSpaceBetweenChildren(SPACE_BETWEEN_ENTRY_AND_HIGHLIGHT.CP(scale())); + + entry_layout_->SetLeftAndRightPadding(LEFT_PADDING.CP(scale()), + RIGHT_PADDING.CP(scale())); + + entry_layout_->SetSpaceBetweenChildren(SPACE_BETWEEN_SPINNER_AND_TEXT.CP(scale())); + + double font_scaling = scale() * Settings::Instance().font_scaling(); + pango_entry_->SetFontSize(PANGO_ENTRY_FONT_SIZE.CP(font_scaling)); + + if (show_filter_hint_) + { + arrow_top_space_->SetMinimumSize(ARROW_MIN_WIDTH.CP(scale()), + TOP_ARROW_MIN_HEIGHT.CP(scale())); + arrow_top_space_->SetMaximumSize(ARROW_MAX_WIDTH.CP(scale()), + TOP_ARROW_MAX_HEIGHT.CP(scale())); + + arrow_bottom_space_->SetMinimumSize(ARROW_MIN_WIDTH.CP(scale()), + BOT_ARROW_MIN_HEIGHT.CP(scale())); + arrow_bottom_space_->SetMaximumSize(ARROW_MAX_WIDTH.CP(scale()), + BOT_ARROW_MAX_HEIGHT.CP(scale())); + + int highlight_left_padding = style.GetFilterResultsHighlightLeftPadding().CP(scale); + int highlight_right_padding = style.GetFilterResultsHighlightRightPadding().CP(scale); + int filter_bar_width = style.GetFilterBarWidth().CP(scale); + + filter_layout_->SetHorizontalInternalMargin(FILTER_HORIZONTAL_MARGIN.CP(scale)); + filter_layout_->SetLeftAndRightPadding(highlight_left_padding, highlight_right_padding); + show_filters_->SetMaximumWidth(filter_bar_width - arrow_layout_->GetBaseWidth() - (8_em).CP(scale)); + + int width = filter_bar_width + highlight_right_padding + highlight_right_padding; + expander_view_->SetMaximumWidth(width); + expander_view_->SetMinimumWidth(width); + + auto const& arrow = expand_icon_->texture(); + expand_icon_->SetMinMaxSize(RawPixel(arrow->GetWidth()).CP(scale), RawPixel(arrow->GetHeight()).CP(scale)); + } + + // Based on the Font size, the MinHeight is changing in TextEntry. From there the + // layered_layout grows to match the MinHeight, but when the MinHeight is shurnk it + // is not changing (since the MaxHeight is int::MAX). Now we grab the MinHeight from + // PangoEntry, and set it for layered_layout. + int entry_min = pango_entry_->GetMinimumHeight(); + + pango_entry_->SetMaximumHeight(entry_min); + layered_layout_->SetMinimumHeight(entry_min); + layered_layout_->SetMaximumHeight(entry_min); + + int search_bar_height = style.GetSearchBarHeight().CP(font_scaling); + SetMinimumHeight(search_bar_height); + SetMaximumHeight(search_bar_height); +} + +void SearchBar::UpdateScale(double scale) +{ + hint_->SetMinimumSize(nux::AREA_MIN_WIDTH, nux::AREA_MIN_HEIGHT); + hint_->SetMaximumSize(nux::AREA_MAX_WIDTH, nux::AREA_MAX_HEIGHT); + hint_->SetScale(scale); + spinner_->scale = scale; + + if (show_filter_hint_) + show_filters_->SetScale(scale); + + UpdateSearchBarSize(); +} + +void SearchBar::OnFontChanged() { glib::String font_name; PangoFontDescription* desc; std::ostringstream font_desc; - g_object_get(settings, "gtk-font-name", &font_name, NULL); + g_object_get(gtk_settings_get_default(), "gtk-font-name", &font_name, NULL); desc = pango_font_description_from_string(font_name.Value()); if (desc) { pango_entry_->SetFontFamily(pango_font_description_get_family(desc)); - pango_entry_->SetFontSize(PANGO_ENTRY_FONT_SIZE); + pango_entry_->SetFontSize(PANGO_ENTRY_FONT_SIZE.CP(scale * Settings::Instance().font_scaling())); pango_entry_->SetFontOptions(gdk_screen_get_font_options(gdk_screen_get_default())); font_desc << pango_font_description_get_family(desc) << " " << HINT_LABEL_FONT_STYLE << " " << HINT_LABEL_FONT_SIZE; @@ -293,11 +387,7 @@ void SearchBar::OnSearchHintChanged() { - gchar* tmp = g_markup_escape_text(search_hint().c_str(), -1); - - hint_->SetText(tmp); - - g_free(tmp); + hint_->SetText(glib::String(g_markup_escape_text(search_hint().c_str(), -1)).Str()); } void SearchBar::OnSearchChanged(nux::TextEntry* text_entry) @@ -344,6 +434,9 @@ expand_icon_->SetTexture(style.GetGroupUnexpandIcon()); else expand_icon_->SetTexture(style.GetGroupExpandIcon()); + + auto const& arrow = expand_icon_->texture(); + expand_icon_->SetMinMaxSize(RawPixel(arrow->GetWidth()).CP(scale), RawPixel(arrow->GetHeight()).CP(scale)); } } @@ -370,8 +463,8 @@ nux::Geometry geo(expander_view_->GetGeometry()); - geo.y -= (HIGHLIGHT_HEIGHT- geo.height) / 2; - geo.height = HIGHLIGHT_HEIGHT; + geo.y -= (HIGHLIGHT_HEIGHT.CP(scale()) - geo.height) / 2; + geo.height = HIGHLIGHT_HEIGHT.CP(scale()); if (!highlight_layer_) highlight_layer_.reset(style.FocusOverlay(geo.width, geo.height)); @@ -463,12 +556,11 @@ void SearchBar::UpdateBackground(bool force) { - int RADIUS = 5; nux::Geometry geo(GetGeometry()); geo.width = layered_layout_->GetAbsoluteX() + layered_layout_->GetAbsoluteWidth() - GetAbsoluteX() + - SEARCH_ENTRY_RIGHT_BORDER; + SEARCH_ENTRY_RIGHT_BORDER.CP(scale()); LOG_TRACE(logger) << "height: " << geo.height << " - " @@ -486,12 +578,13 @@ nux::CairoGraphics cairo_graphics(CAIRO_FORMAT_ARGB32, last_width_, last_height_); cairo_t* cr = cairo_graphics.GetInternalContext(); + cairo_surface_set_device_scale(cairo_get_target(cr), scale, scale); cairo_graphics.DrawRoundedRectangle(cr, 1.0f, 0.5, 0.5, - RADIUS, - last_width_ - 1, last_height_ - 1, + CORNER_RADIUS, + (last_width_/scale) - 1, (last_height_/scale) - 1, false); cairo_set_operator(cr, CAIRO_OPERATOR_SOURCE); @@ -501,7 +594,7 @@ cairo_set_source_rgba(cr, 1.0f, 1.0f, 1.0f, 0.7f); cairo_stroke(cr); - nux::BaseTexture* texture2D = texture_from_cairo_graphics(cairo_graphics); + auto texture2D = texture_ptr_from_cairo_graphics(cairo_graphics); nux::TexCoordXForm texxform; texxform.SetTexCoordType(nux::TexCoordXForm::OFFSET_COORD); @@ -517,8 +610,6 @@ nux::color::White, true, rop)); - - texture2D->UnReference(); } void SearchBar::OnMouseButtonDown(int x, int y, unsigned long button, unsigned long key) diff -Nru unity-7.1.2+14.04.20140303/unity-shared/SearchBar.h unity-7.2.4+14.04.20141217/unity-shared/SearchBar.h --- unity-7.1.2+14.04.20140303/unity-shared/SearchBar.h 2014-03-03 16:47:14.000000000 +0000 +++ unity-7.2.4+14.04.20141217/unity-shared/SearchBar.h 2014-12-17 20:51:54.000000000 +0000 @@ -1,6 +1,6 @@ // -*- Mode: C++; indent-tabs-mode: nil; tab-width: 2 -*- /* - * Copyright (C) 2010 Canonical Ltd + * Copyright (C) 2010-2014 Canonical Ltd * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License version 3 as @@ -20,28 +20,28 @@ #ifndef SEARCH_BAR_H #define SEARCH_BAR_H -#include -#include -#include -#include #include +#include #include #include -#include "SearchBarSpinner.h" -#include "unity-shared/IconTexture.h" -#include "unity-shared/IMTextEntry.h" #include "unity-shared/Introspectable.h" -#include "unity-shared/StaticCairoText.h" namespace nux { class AbstractPaintLayer; +class LayeredLayout; class LinearLayout; +class SpaceLayout; +class VLayout; } namespace unity { +class IconTexture; +class IMTextEntry; +class SearchBarSpinner; +class StaticCairoText; class SearchBar : public unity::debug::Introspectable, public nux::View { @@ -64,13 +64,14 @@ nux::ROProperty im_active; nux::ROProperty im_preedit; nux::Property live_search_wait; + nux::Property scale; sigc::signal activated; sigc::signal search_changed; sigc::signal live_search_reached; private: - void OnFontChanged(GtkSettings* settings, GParamSpec* pspec=NULL); + void OnFontChanged(); void OnSearchHintChanged(); void Draw(nux::GraphicsEngine& GfxContext, bool force_draw); @@ -97,9 +98,10 @@ void AddProperties(debug::IntrospectionData&); bool AcceptKeyNavFocus(); -private: bool ShouldBeHighlighted(); - + void UpdateSearchBarSize(); + void UpdateScale(double scale); + std::unique_ptr bg_layer_; std::unique_ptr highlight_layer_; nux::HLayout* layout_; diff -Nru unity-7.1.2+14.04.20140303/unity-shared/SearchBarSpinner.cpp unity-7.2.4+14.04.20141217/unity-shared/SearchBarSpinner.cpp --- unity-7.1.2+14.04.20140303/unity-shared/SearchBarSpinner.cpp 2014-03-03 16:47:14.000000000 +0000 +++ unity-7.2.4+14.04.20141217/unity-shared/SearchBarSpinner.cpp 2014-12-17 20:51:37.000000000 +0000 @@ -22,6 +22,7 @@ #include #include "unity-shared/DashStyle.h" +#include "unity-shared/RawPixel.h" namespace unity { @@ -29,24 +30,33 @@ NUX_IMPLEMENT_OBJECT_TYPE(SearchBarSpinner); SearchBarSpinner::SearchBarSpinner() - : nux::View(NUX_TRACKER_LOCATION), - state_(STATE_READY), - search_timeout_(-1), - rotation_(0.0f) + : nux::View(NUX_TRACKER_LOCATION) + , scale(1.0) + , state_(STATE_READY) + , search_timeout_(-1) + , rotation_(0.0f) { - dash::Style& style = dash::Style::Instance(); - - magnify_ = style.GetSearchMagnifyIcon(); - circle_ = style.GetSearchCircleIcon(); - close_ = style.GetSearchCloseIcon(); - spin_ = style.GetSearchSpinIcon(); - rotate_.Identity(); rotate_.Rotate_z(0.0); + UpdateScale(scale); + + scale.changed.connect(sigc::mem_fun(this, &SearchBarSpinner::UpdateScale)); } -void -SearchBarSpinner::Draw(nux::GraphicsEngine& GfxContext, bool force_draw) +void SearchBarSpinner::UpdateScale(double scale) +{ + auto& style = dash::Style::Instance(); + + magnify_ = style.GetSearchMagnifyIcon(scale); + circle_ = style.GetSearchCircleIcon(scale); + close_ = style.GetSearchCloseIcon(scale); + spin_ = style.GetSearchSpinIcon(scale); + + SetMinMaxSize(magnify_->GetWidth(), magnify_->GetHeight()); + QueueDraw(); +} + +void SearchBarSpinner::Draw(nux::GraphicsEngine& GfxContext, bool force_draw) { nux::Geometry const& geo = GetGeometry(); nux::TexCoordXForm texxform; @@ -56,9 +66,8 @@ nux::GetPainter().PaintBackground(GfxContext, geo); texxform.SetTexCoordType(nux::TexCoordXForm::OFFSET_COORD); - texxform.SetWrap(nux::TEXWRAP_REPEAT, nux::TEXWRAP_REPEAT); - texxform.min_filter = nux::TEXFILTER_LINEAR; - texxform.mag_filter = nux::TEXFILTER_LINEAR; + texxform.SetWrap(nux::TEXWRAP_CLAMP_TO_BORDER, nux::TEXWRAP_CLAMP_TO_BORDER); + texxform.SetFilter(nux::TEXFILTER_LINEAR, nux::TEXFILTER_LINEAR); unsigned int current_alpha_blend; unsigned int current_src_blend_factor; @@ -68,20 +77,23 @@ if (state_ == STATE_READY) { - GfxContext.QRP_1Tex(geo.x + ((geo.width - magnify_->GetWidth()) / 2), - geo.y + ((geo.height - magnify_->GetHeight()) / 2), - magnify_->GetWidth(), - magnify_->GetHeight(), + nux::Size magnifier_size(magnify_->GetWidth(), magnify_->GetHeight()); + + GfxContext.QRP_1Tex(geo.x + ((geo.width - magnifier_size.width) / 2), + geo.y + ((geo.height - magnifier_size.height) / 2), + magnifier_size.width, + magnifier_size.height, magnify_->GetDeviceTexture(), texxform, nux::color::White); } else if (state_ == STATE_SEARCHING) { - nux::Geometry spin_geo(geo.x + ((geo.width - spin_->GetWidth()) / 2), - geo.y + ((geo.height - spin_->GetHeight()) / 2), - spin_->GetWidth(), - spin_->GetHeight()); + nux::Size spin_size(spin_->GetWidth(), spin_->GetHeight()); + nux::Geometry spin_geo(geo.x + ((geo.width - spin_size.width) / 2), + geo.y + ((geo.height - spin_size.height) / 2), + spin_size.width, + spin_size.height); // Geometry (== Rect) uses integers which were rounded above, // hence an extra 0.5 offset for odd sizes is needed // because pure floating point is not being used. @@ -110,18 +122,20 @@ } else { - GfxContext.QRP_1Tex(geo.x + ((geo.width - circle_->GetWidth()) / 2), - geo.y + ((geo.height - circle_->GetHeight()) / 2), - circle_->GetWidth(), - circle_->GetHeight(), + nux::Size circle_size(circle_->GetWidth(), circle_->GetHeight()); + GfxContext.QRP_1Tex(geo.x + ((geo.width - circle_size.width) / 2), + geo.y + ((geo.height - circle_size.height) / 2), + circle_size.width, + circle_size.height, circle_->GetDeviceTexture(), texxform, nux::color::White); - GfxContext.QRP_1Tex(geo.x + ((geo.width - close_->GetWidth()) / 2), - geo.y + ((geo.height - close_->GetHeight()) / 2), - close_->GetWidth(), - close_->GetHeight(), + nux::Size close_size(close_->GetWidth(), close_->GetHeight()); + GfxContext.QRP_1Tex(geo.x + ((geo.width - close_size.width) / 2), + geo.y + ((geo.height - close_size.height) / 2), + close_size.width, + close_size.height, close_->GetDeviceTexture(), texxform, nux::color::White); diff -Nru unity-7.1.2+14.04.20140303/unity-shared/SearchBarSpinner.h unity-7.2.4+14.04.20141217/unity-shared/SearchBarSpinner.h --- unity-7.1.2+14.04.20140303/unity-shared/SearchBarSpinner.h 2014-03-03 16:47:14.000000000 +0000 +++ unity-7.2.4+14.04.20141217/unity-shared/SearchBarSpinner.h 2014-12-17 20:51:54.000000000 +0000 @@ -22,8 +22,6 @@ #include #include -#include -#include #include #include #include "unity-shared/Introspectable.h" @@ -44,6 +42,8 @@ public: SearchBarSpinner(); + nux::Property scale; + void Draw(nux::GraphicsEngine& GfxContext, bool force_draw); void DrawContent(nux::GraphicsEngine& GfxContext, bool force_draw); @@ -62,13 +62,14 @@ private: bool OnFrameTimeout(); + void UpdateScale(double); SpinnerState state_; - nux::BaseTexture* magnify_; - nux::BaseTexture* circle_; - nux::BaseTexture* close_; - nux::BaseTexture* spin_; + nux::ObjectPtr magnify_; + nux::ObjectPtr circle_; + nux::ObjectPtr close_; + nux::ObjectPtr spin_; glib::Source::UniquePtr spinner_timeout_; glib::Source::UniquePtr frame_timeout_; diff -Nru unity-7.1.2+14.04.20140303/unity-shared/SpreadFilter.cpp unity-7.2.4+14.04.20141217/unity-shared/SpreadFilter.cpp --- unity-7.1.2+14.04.20140303/unity-shared/SpreadFilter.cpp 2014-03-03 16:47:14.000000000 +0000 +++ unity-7.2.4+14.04.20141217/unity-shared/SpreadFilter.cpp 2014-12-17 20:51:54.000000000 +0000 @@ -20,9 +20,14 @@ #include "SpreadFilter.h" #include +#include + #include "AnimationUtils.h" +#include "ApplicationManager.h" #include "SearchBar.h" +#include "UnitySettings.h" #include "WindowManager.h" +#include "RawPixel.h" namespace unity { @@ -32,15 +37,31 @@ { const unsigned FADE_DURATION = 100; const unsigned DEFAULT_SEARCH_WAIT = 300; -const nux::Point OFFSET(10, 15); -const nux::Size SIZE(620, 42); +const RawPixel OFFSET_X = 10_em; +const RawPixel OFFSET_Y = 15_em; +const RawPixel WIDTH = 620_em; + +// For some reason std::to_lower or boost::to_lower_copy doesn't seem to handle well utf8 +std::string casefold_copy(std::string const& str) +{ + return glib::String(g_utf8_casefold(str.c_str(), -1)).Str(); +} } Filter::Filter() : fade_animator_(FADE_DURATION) { + auto& wm = WindowManager::Default(); + auto& settings = Settings::Instance(); + auto const& work_area = wm.GetWorkAreaGeometry(0); + int monitor = wm.MonitorGeometryIn(work_area); + int launcher_width = settings.LauncherWidth(monitor); + auto const& cv = settings.em(monitor); + search_bar_ = SearchBar::Ptr(new SearchBar()); - search_bar_->SetMinMaxSize(SIZE.width, SIZE.height); + search_bar_->SetMinimumWidth(WIDTH.CP(cv)); + search_bar_->SetMaximumWidth(WIDTH.CP(cv)); + search_bar_->scale = cv->DPIScale(); search_bar_->live_search_wait = DEFAULT_SEARCH_WAIT; text.SetGetterFunction([this] { return search_bar_->search_string(); }); text.SetSetterFunction([this] (std::string const& t) { search_bar_->search_string = t; return false; }); @@ -51,7 +72,6 @@ layout->SetHorizontalExternalMargin(0); layout->AddView(search_bar_.GetPointer()); - auto const& work_area = WindowManager::Default().GetWorkAreaGeometry(0); view_window_ = new nux::BaseWindow(GetName().c_str()); view_window_->SetLayout(layout); view_window_->SetBackgroundColor(nux::color::Transparent); @@ -61,7 +81,7 @@ view_window_->SetOpacity(0.0f); view_window_->SetEnterFocusInputArea(search_bar_.GetPointer()); view_window_->SetInputFocus(); - view_window_->SetXY(OFFSET.x + work_area.x, OFFSET.y + work_area.y); + view_window_->SetXY(OFFSET_X.CP(cv) + std::max(work_area.x, launcher_width), OFFSET_Y.CP(cv) + work_area.y); fade_animator_.updated.connect([this] (double opacity) { view_window_->SetOpacity(opacity); }); nux::GetWindowCompositor().SetKeyFocusArea(search_bar_->text_entry()); @@ -72,6 +92,7 @@ if (search.empty()) { + UpdateFilteredWindows(); text.changed.emit(search); animation::StartOrReverse(fade_animator_, animation::Direction::BACKWARD); } @@ -80,6 +101,7 @@ search_bar_->live_search_reached.connect([this] (std::string const& search) { if (!search.empty()) { + UpdateFilteredWindows(); text.changed.emit(search); search_bar_->SetSearchFinished(); } @@ -102,6 +124,37 @@ return view_window_->GetGeometry(); } +std::set const& Filter::FilteredWindows() const +{ + return filtered_windows_; +} + +void Filter::UpdateFilteredWindows() +{ + auto const& lower_search = casefold_copy(text()); + filtered_windows_.clear(); + + if (lower_search.empty()) + return; + + for (auto const& app : ApplicationManager::Default().GetRunningApplications()) + { + if (casefold_copy(app->title()).find(lower_search) != std::string::npos) + { + for (auto const& win : app->GetWindows()) + filtered_windows_.insert(win->window_id()); + + continue; + } + + for (auto const& win : app->GetWindows()) + { + if (casefold_copy(win->title()).find(lower_search) != std::string::npos) + filtered_windows_.insert(win->window_id()); + } + } +} + // // Introspection // diff -Nru unity-7.1.2+14.04.20140303/unity-shared/SpreadFilter.h unity-7.2.4+14.04.20141217/unity-shared/SpreadFilter.h --- unity-7.1.2+14.04.20140303/unity-shared/SpreadFilter.h 2014-03-03 16:47:14.000000000 +0000 +++ unity-7.2.4+14.04.20141217/unity-shared/SpreadFilter.h 2014-12-17 20:51:37.000000000 +0000 @@ -47,15 +47,20 @@ bool Visible() const; nux::Geometry const& GetAbsoluteGeometry() const; + std::set const& FilteredWindows() const; + protected: // Introspectable std::string GetName() const; void AddProperties(debug::IntrospectionData&); private: + void UpdateFilteredWindows(); + nux::ObjectPtr search_bar_; nux::ObjectPtr view_window_; nux::animation::AnimateValue fade_animator_; + std::set filtered_windows_; }; } // namespace spread diff -Nru unity-7.1.2+14.04.20140303/unity-shared/StandaloneDecorationStyle.cpp unity-7.2.4+14.04.20141217/unity-shared/StandaloneDecorationStyle.cpp --- unity-7.1.2+14.04.20140303/unity-shared/StandaloneDecorationStyle.cpp 2014-03-03 16:47:14.000000000 +0000 +++ unity-7.2.4+14.04.20141217/unity-shared/StandaloneDecorationStyle.cpp 2014-12-17 20:51:37.000000000 +0000 @@ -40,6 +40,33 @@ return os; } +std::ostream& operator<<(std::ostream &os, WMAction const& a) +{ + switch (a) + { + case WMAction::TOGGLE_SHADE: + return os << "toggle-shade"; + case WMAction::TOGGLE_MAXIMIZE: + return os << "toggle-maximize"; + case WMAction::TOGGLE_MAXIMIZE_HORIZONTALLY: + return os << "toggle-maximize_horizontally"; + case WMAction::TOGGLE_MAXIMIZE_VERTICALLY: + return os << "toggle-maximize_vertically"; + case WMAction::MINIMIZE: + return os << "minimize"; + case WMAction::SHADE: + return os << "shade"; + case WMAction::MENU: + return os << "menu"; + case WMAction::LOWER: + return os << "lower"; + case WMAction::NONE: + return os << "none"; + } + + return os; +} + std::ostream& operator<<(std::ostream &os, Border const& b) { return os << "top " << b.top << ", left " << b.left << ", right " << b.right << ", bottom " << b.bottom; @@ -132,6 +159,13 @@ std::cout << "Button 'maximize' state 'backdrop_pressed' '" << style->WindowButtonFile(WindowButtonType::MAXIMIZE, WidgetState::BACKDROP_PRESSED) << "'" << std::endl; std::cout << "---" << std::endl; + std::cout << "---" << std::endl; + + std::cout << "Double click action " << style->WindowManagerAction(WMEvent::DOUBLE_CLICK) << std::endl; + std::cout << "Middle click action " << style->WindowManagerAction(WMEvent::MIDDLE_CLICK) << std::endl; + std::cout << "Right click action " << style->WindowManagerAction(WMEvent::RIGHT_CLICK) << std::endl; + std::cout << "---" << std::endl; + std::cout << "Maximum Double click distance " << style->DoubleClickMaxDistance() << "px" << std::endl; std::cout << "Maximum Double click Time delta " << style->DoubleClickMaxTimeDelta() << "ms " << std::endl; std::cout << "---" << std::endl; diff -Nru unity-7.1.2+14.04.20140303/unity-shared/StandaloneWindowManager.cpp unity-7.2.4+14.04.20141217/unity-shared/StandaloneWindowManager.cpp --- unity-7.1.2+14.04.20140303/unity-shared/StandaloneWindowManager.cpp 2014-03-03 16:47:14.000000000 +0000 +++ unity-7.2.4+14.04.20141217/unity-shared/StandaloneWindowManager.cpp 2014-12-17 20:51:37.000000000 +0000 @@ -45,6 +45,7 @@ , v_maximized(false) , h_maximized(false) , minimized(false) + , shaded(false) , decorated(true) , has_decorations(true) , on_top(false) @@ -72,15 +73,16 @@ maximized.SetSetterFunction([this] (bool value) { if (maximized() == value) return false; - + v_maximized = value; h_maximized = value; decorated = !value; return true; }); - + v_maximized.changed.connect([this] (bool value) { maximized.changed.emit(maximized()); }); h_maximized.changed.connect([this] (bool value) { maximized.changed.emit(maximized()); }); + shaded.changed.connect([this] (bool value) { minimized = value; }); } WindowManagerPtr create_window_manager() @@ -156,16 +158,16 @@ auto window = GetWindowByXid(window_id); if (window) return window->v_maximized; - + return false; } - + bool StandaloneWindowManager::IsWindowHorizontallyMaximized(Window window_id) const { auto window = GetWindowByXid(window_id); if (window) return window->h_maximized; - + return false; } @@ -285,6 +287,28 @@ } } +void StandaloneWindowManager::VerticallyMaximize(Window window_id) +{ + auto window = GetWindowByXid(window_id); + if (window) + { + window->h_maximized = false; + window->v_maximized = true; + window->decorated = true; + } +} + +void StandaloneWindowManager::HorizontallyMaximize(Window window_id) +{ + auto window = GetWindowByXid(window_id); + if (window) + { + window->v_maximized = false; + window->h_maximized = true; + window->decorated = true; + } +} + void StandaloneWindowManager::Restore(Window window_id) { auto window = GetWindowByXid(window_id); @@ -589,6 +613,30 @@ return std::vector(); } +bool StandaloneWindowManager::IsWindowShaded(Window window_id) const +{ + auto window = GetWindowByXid(window_id); + if (window) + return window->shaded; + + return false; +} + +void StandaloneWindowManager::Shade(Window window_id) +{ + auto window = GetWindowByXid(window_id); + if (window) + window->shaded = true; +} + +void StandaloneWindowManager::UnShade(Window window_id) +{ + auto window = GetWindowByXid(window_id); + if (window) + window->shaded = false; +} + + // Mock functions diff -Nru unity-7.1.2+14.04.20140303/unity-shared/StandaloneWindowManager.h unity-7.2.4+14.04.20141217/unity-shared/StandaloneWindowManager.h --- unity-7.1.2+14.04.20140303/unity-shared/StandaloneWindowManager.h 2014-03-03 16:47:14.000000000 +0000 +++ unity-7.2.4+14.04.20141217/unity-shared/StandaloneWindowManager.h 2014-12-17 20:51:54.000000000 +0000 @@ -52,6 +52,7 @@ nux::Property v_maximized; nux::Property h_maximized; nux::Property minimized; + nux::Property shaded; nux::Property decorated; nux::Property has_decorations; nux::Property on_top; @@ -83,6 +84,7 @@ virtual bool IsWindowMapped(Window window_id) const; virtual bool IsWindowVisible(Window window_id) const; virtual bool IsWindowOnTop(Window window_id) const; + virtual bool IsWindowShaded(Window window_id) const; virtual bool IsWindowClosable(Window window_id) const; virtual bool IsWindowMinimized(Window window_id) const; virtual bool IsWindowMinimizable(Window window_id) const; @@ -94,10 +96,14 @@ virtual void ShowActionMenu(Time, Window, unsigned button, nux::Point const&) {} virtual void Maximize(Window window_id); + virtual void VerticallyMaximize(Window window_id); + virtual void HorizontallyMaximize(Window window_id); virtual void Restore(Window window_id); virtual void RestoreAt(Window window_id, int x, int y); virtual void Minimize(Window window_id); virtual void UnMinimize(Window window_id); + virtual void Shade(Window window_id); + virtual void UnShade(Window window_id); virtual void Close(Window window_id); virtual void Activate(Window window_id); @@ -157,6 +163,8 @@ virtual std::string GetStringProperty(Window window_id, Atom) const; virtual std::vector GetCardinalProperty(Window window_id, Atom) const; + virtual void UnmapAllNoNuxWindowsSync() {}; + // Mock functions StandaloneWindow::Ptr GetWindowByXid(Window window_id) const; void AddStandaloneWindow(StandaloneWindow::Ptr const& window); diff -Nru unity-7.1.2+14.04.20140303/unity-shared/StaticCairoText.cpp unity-7.2.4+14.04.20141217/unity-shared/StaticCairoText.cpp --- unity-7.1.2+14.04.20140303/unity-shared/StaticCairoText.cpp 2014-03-03 16:47:36.000000000 +0000 +++ unity-7.2.4+14.04.20141217/unity-shared/StaticCairoText.cpp 2014-12-17 20:51:37.000000000 +0000 @@ -36,12 +36,13 @@ #include #include "CairoTexture.h" +#include "UnitySettings.h" using namespace nux; namespace unity { -struct StaticCairoText::Impl +struct StaticCairoText::Impl : sigc::trackable { Impl(StaticCairoText* parent, std::string const& text); ~Impl(); @@ -128,8 +129,8 @@ GtkSettings* settings = gtk_settings_get_default(); // not ref'ed g_signal_connect(settings, "notify::gtk-font-name", (GCallback)FontChanged, this); - g_signal_connect(settings, "notify::gtk-xft-dpi", - (GCallback)FontChanged, this); + + Settings::Instance().font_scaling.changed.connect(sigc::hide(sigc::mem_fun(this, &Impl::OnFontChanged))); } StaticCairoText::Impl::~Impl() @@ -552,9 +553,7 @@ PangoLayout* layout = NULL; PangoFontDescription* desc = NULL; PangoContext* pangoCtx = NULL; - int dpi = 0; GdkScreen* screen = gdk_screen_get_default(); // is not ref'ed - GtkSettings* settings = gtk_settings_get_default(); // is not ref'ed if (!need_new_extent_cache_) { @@ -581,19 +580,8 @@ pango_layout_set_spacing(layout, line_spacing_ * PANGO_SCALE); pangoCtx = pango_layout_get_context(layout); // is not ref'ed - pango_cairo_context_set_font_options(pangoCtx, - gdk_screen_get_font_options(screen)); - g_object_get(settings, "gtk-xft-dpi", &dpi, NULL); - if (dpi == -1) - { - // use some default DPI-value - pango_cairo_context_set_resolution(pangoCtx, 96.0f); - } - else - { - pango_cairo_context_set_resolution(pangoCtx, - (float) dpi / (float) PANGO_SCALE); - } + pango_cairo_context_set_font_options(pangoCtx, gdk_screen_get_font_options(screen)); + pango_cairo_context_set_resolution(pangoCtx, 96.0 * Settings::Instance().font_scaling()); pango_layout_context_changed(layout); PangoRectangle ink_rect, logic_rect; @@ -721,9 +709,7 @@ PangoLayout* layout = NULL; PangoFontDescription* desc = NULL; PangoContext* pangoCtx = NULL; - int dpi = 0; GdkScreen* screen = gdk_screen_get_default(); // not ref'ed - GtkSettings* settings = gtk_settings_get_default(); // not ref'ed std::string text = text_.substr(texture->start_index, texture->length); @@ -746,22 +732,11 @@ SetAttributes(layout); pangoCtx = pango_layout_get_context(layout); // is not ref'ed - pango_cairo_context_set_font_options(pangoCtx, - gdk_screen_get_font_options(screen)); - g_object_get(settings, "gtk-xft-dpi", &dpi, NULL); - if (dpi == -1) - { - // use some default DPI-value - pango_cairo_context_set_resolution(pangoCtx, 96.0f); - } - else - { - pango_cairo_context_set_resolution(pangoCtx, - (float) dpi / (float) PANGO_SCALE); - } + pango_cairo_context_set_font_options(pangoCtx, gdk_screen_get_font_options(screen)); + pango_cairo_context_set_resolution(pangoCtx, 96.0 * Settings::Instance().font_scaling()); + pango_layout_context_changed(layout); Size result; - pango_layout_context_changed(layout); pango_layout_get_pixel_size(layout, &result.width, &result.height); if (std::ceil(result.width * scale_) > parent_->GetMaximumWidth()) diff -Nru unity-7.1.2+14.04.20140303/unity-shared/TextInput.cpp unity-7.2.4+14.04.20141217/unity-shared/TextInput.cpp --- unity-7.1.2+14.04.20140303/unity-shared/TextInput.cpp 2014-03-03 16:47:36.000000000 +0000 +++ unity-7.2.4+14.04.20141217/unity-shared/TextInput.cpp 2014-12-17 20:51:54.000000000 +0000 @@ -17,77 +17,168 @@ * Authored by: Manuel de la Pena */ +#include "config.h" #include "TextInput.h" -namespace -{ -const float kExpandDefaultIconOpacity = 1.0f; +#include +#include -const int SPACE_BETWEEN_ENTRY_AND_HIGHLIGHT = 10; -const int LEFT_INTERNAL_PADDING = 6; -const int TEXT_INPUT_RIGHT_BORDER = 10; +#include +#include +#include +#include + +#include "CairoTexture.h" +#include "StaticCairoText.h" +#include "IconTexture.h" +#include "IMTextEntry.h" +#include "DashStyle.h" +#include "PreviewStyle.h" +#include "RawPixel.h" +#include "TextureCache.h" +#include "UnitySettings.h" -const int HIGHLIGHT_HEIGHT = 24; +namespace unity +{ +namespace +{ +const int BORDER_RADIUS = 5; +const int TOOLTIP_WAIT = 500; +const RawPixel SPACE_BETWEEN_ENTRY_AND_HIGHLIGHT = 10_em; +const RawPixel LEFT_INTERNAL_PADDING = 6_em; +const RawPixel TEXT_INPUT_RIGHT_BORDER = 10_em; +const RawPixel HINT_PADDING = 3_em; + +const RawPixel TOOLTIP_Y_OFFSET = 3_em; +const RawPixel TOOLTIP_OFFSET = 10_em; +const RawPixel DEFAULT_ICON_SIZE = 22_em; + +std::string WARNING_ICON = "dialog-warning-symbolic"; // Fonts -const std::string HINT_LABEL_FONT_SIZE = "12px"; -const std::string HINT_LABEL_FONT_STYLE = "Italic"; -const std::string HINT_LABEL_DEFAULT_FONT = "Ubuntu " + HINT_LABEL_FONT_STYLE + " " + HINT_LABEL_FONT_SIZE; +const std::string HINT_LABEL_DEFAULT_FONT_NAME = "Ubuntu"; +const int HINT_LABEL_FONT_SIZE = 11; const std::string PANGO_ENTRY_DEFAULT_FONT_FAMILY = "Ubuntu"; -const int PANGO_ENTRY_FONT_SIZE = 14; +const RawPixel PANGO_ENTRY_FONT_SIZE = 14_em; -} +nux::logging::Logger logger("unity.textinput"); -namespace unity +std::shared_ptr CreateWarningLayer(nux::BaseTexture* texture) { + // Create the texture layer + nux::TexCoordXForm texxform; + + texxform.SetTexCoordType(nux::TexCoordXForm::OFFSET_COORD); + texxform.SetWrap(nux::TEXWRAP_REPEAT, nux::TEXWRAP_REPEAT); + texxform.min_filter = nux::TEXFILTER_LINEAR; + texxform.mag_filter = nux::TEXFILTER_LINEAR; -nux::logging::Logger logger("unity.dash.textinput"); + nux::ROPConfig rop; + rop.Blend = true; + + rop.SrcBlend = GL_ONE; + rop.DstBlend = GL_ONE_MINUS_SRC_ALPHA; + + return std::make_shared(texture->GetDeviceTexture(), texxform, nux::color::White, true, rop); +} +} NUX_IMPLEMENT_OBJECT_TYPE(TextInput); TextInput::TextInput(NUX_FILE_LINE_DECL) : View(NUX_FILE_LINE_PARAM) , input_hint("") + , hint_font_name(HINT_LABEL_DEFAULT_FONT_NAME) + , hint_font_size(HINT_LABEL_FONT_SIZE) + , show_activator(false) + , show_caps_lock(false) + , scale(1.0) + , bg_layer_(new nux::ColorLayer(nux::Color(0xff595853), true)) + , caps_lock_on(false) , last_width_(-1) , last_height_(-1) { - Init(); -} - -void TextInput::Init() -{ - bg_layer_.reset(new nux::ColorLayer(nux::Color(0xff595853), true)); - layout_ = new nux::HLayout(NUX_TRACKER_LOCATION); - layout_->SetLeftAndRightPadding(LEFT_INTERNAL_PADDING, TEXT_INPUT_RIGHT_BORDER); - layout_->SetSpaceBetweenChildren(SPACE_BETWEEN_ENTRY_AND_HIGHLIGHT); + layout_->SetLeftAndRightPadding(LEFT_INTERNAL_PADDING.CP(scale), TEXT_INPUT_RIGHT_BORDER.CP(scale)); + layout_->SetSpaceBetweenChildren(SPACE_BETWEEN_ENTRY_AND_HIGHLIGHT.CP(scale)); SetLayout(layout_); - nux::HLayout* hint_layout = new nux::HLayout(NUX_TRACKER_LOCATION); + hint_layout_ = new nux::HLayout(NUX_TRACKER_LOCATION); + hint_layout_->SetLeftAndRightPadding(HINT_PADDING.CP(scale), HINT_PADDING.CP(scale)); - hint_ = new StaticCairoText(" "); + hint_ = new StaticCairoText(""); hint_->SetTextColor(nux::Color(1.0f, 1.0f, 1.0f, 0.5f)); - hint_->SetFont(HINT_LABEL_DEFAULT_FONT.c_str()); - hint_layout->AddView(hint_, 0, nux::MINOR_POSITION_CENTER, nux::MINOR_SIZE_FULL); + hint_->SetScale(scale); + hint_layout_->AddView(hint_, 0, nux::MINOR_POSITION_CENTER, nux::MINOR_SIZE_FULL); + hint_font_name.changed.connect(sigc::hide(sigc::mem_fun(this, &TextInput::UpdateHintFont))); + hint_font_size.changed.connect(sigc::hide(sigc::mem_fun(this, &TextInput::UpdateHintFont))); + UpdateHintFont(); pango_entry_ = new IMTextEntry(); pango_entry_->SetFontFamily(PANGO_ENTRY_DEFAULT_FONT_FAMILY.c_str()); - pango_entry_->SetFontSize(PANGO_ENTRY_FONT_SIZE); pango_entry_->cursor_moved.connect([this](int i) { QueueDraw(); }); pango_entry_->mouse_down.connect(sigc::mem_fun(this, &TextInput::OnMouseButtonDown)); pango_entry_->end_key_focus.connect(sigc::mem_fun(this, &TextInput::OnEndKeyFocus)); + pango_entry_->text_changed.connect([this](nux::TextEntry*) { + hint_->SetVisible(input_string().empty()); + }); layered_layout_ = new nux::LayeredLayout(); - layered_layout_->AddLayout(hint_layout); + layered_layout_->AddLayer(hint_layout_); layered_layout_->AddLayer(pango_entry_); layered_layout_->SetPaintAll(true); layered_layout_->SetActiveLayerN(1); layout_->AddView(layered_layout_, 1, nux::MINOR_POSITION_CENTER, nux::MINOR_SIZE_FIX); - sig_manager_.Add(gtk_settings_get_default(), - "notify::gtk-font-name", sigc::mem_fun(this, &TextInput::OnFontChanged)); - OnFontChanged(gtk_settings_get_default()); + UpdateSize(); + + // Caps lock warning + warning_ = new IconTexture(LoadWarningIcon(DEFAULT_ICON_SIZE.CP(scale))); + warning_->SetVisible(caps_lock_on()); + layout_->AddView(warning_, 0, nux::MINOR_POSITION_CENTER, nux::MINOR_SIZE_FULL); + caps_lock_on.changed.connect([this] (bool on) { + if (show_caps_lock) + { + warning_->SetVisible(on); + QueueRelayout(); + QueueDraw(); + } + }); + + show_caps_lock.changed.connect(sigc::hide(sigc::mem_fun(this, &TextInput::CheckIfCapsLockOn))); + scale.changed.connect(sigc::mem_fun(this, &TextInput::UpdateScale)); + Settings::Instance().font_scaling.changed.connect(sigc::hide(sigc::mem_fun(this, &TextInput::UpdateSize))); + + // Activator + activator_ = new IconTexture(LoadActivatorIcon(DEFAULT_ICON_SIZE.CP(scale))); + activator_->SetVisible(show_activator()); + layout_->AddView(activator_, 0, nux::MINOR_POSITION_CENTER, nux::MINOR_SIZE_FULL); + + show_activator.changed.connect([this] (bool value) { + activator_->SetVisible(value); + }); + + activator_->mouse_click.connect([this](int, int, unsigned long, unsigned long) { + pango_entry_->activated.emit(); + }); + + // Spinner + spinner_ = new SearchBarSpinner(); + spinner_->SetVisible(false); + spinner_->scale = scale(); + layout_->AddView(spinner_, 0, nux::MINOR_POSITION_CENTER, nux::MINOR_SIZE_FULL); + + sig_manager_.Add(gtk_settings_get_default(), "notify::gtk-font-name", sigc::hide(sigc::mem_fun(this, &TextInput::OnFontChanged))); + OnFontChanged(); + + sig_manager_.Add(gdk_keymap_get_default(), "state-changed", [this](GdkKeymap*) { + CheckIfCapsLockOn(); + }); + + sig_manager_.Add(gdk_keymap_get_default(), "state-changed", [this](GdkKeymap*) { + CheckIfCapsLockOn(); + }); input_string.SetGetterFunction(sigc::mem_fun(this, &TextInput::get_input_string)); input_string.SetSetterFunction(sigc::mem_fun(this, &TextInput::set_input_string)); @@ -95,28 +186,166 @@ im_preedit.SetGetterFunction(sigc::mem_fun(this, &TextInput::get_im_preedit)); input_hint.changed.connect([this](std::string const& s) { OnInputHintChanged(); }); + warning_->mouse_enter.connect([this] (int x, int y, int button, int key_flags) { + tooltip_timeout_.reset(new glib::Timeout(TOOLTIP_WAIT, [this] { + tooltip_timeout_.reset(); + QueueDraw(); + return false; + })); + }); + + warning_->mouse_leave.connect([this] (int x, int y, int button, int key_flags) { + tooltip_timeout_ ? tooltip_timeout_.reset() : QueueDraw(); + }); +} + +void TextInput::UpdateSize() +{ + pango_entry_->SetFontSize(PANGO_ENTRY_FONT_SIZE.CP(scale * Settings::Instance().font_scaling())); + int entry_min = pango_entry_->GetMinimumHeight(); + pango_entry_->SetMaximumHeight(entry_min); + layered_layout_->SetMinimumHeight(entry_min); + layered_layout_->SetMaximumHeight(entry_min); +} + +void TextInput::UpdateScale(double scale) +{ + layout_->SetLeftAndRightPadding(LEFT_INTERNAL_PADDING.CP(scale), TEXT_INPUT_RIGHT_BORDER.CP(scale)); + layout_->SetSpaceBetweenChildren(SPACE_BETWEEN_ENTRY_AND_HIGHLIGHT.CP(scale)); + + UpdateSize(); + + hint_layout_->SetLeftAndRightPadding(HINT_PADDING.CP(scale), HINT_PADDING.CP(scale)); + hint_->SetScale(scale); + hint_->SetMaximumHeight(pango_entry_->GetMinimumHeight()); + + spinner_->scale = scale; + activator_->SetTexture(LoadActivatorIcon(DEFAULT_ICON_SIZE.CP(scale))); + warning_->SetTexture(LoadWarningIcon(DEFAULT_ICON_SIZE.CP(scale))); + warning_tooltip_.Release(); + + QueueRelayout(); + QueueDraw(); } -void TextInput::OnFontChanged(GtkSettings* settings, GParamSpec* pspec) +void TextInput::CheckIfCapsLockOn() +{ + GdkKeymap* keymap = gdk_keymap_get_default(); + caps_lock_on = gdk_keymap_get_caps_lock_state(keymap) == FALSE ? false : true; +} + +void TextInput::SetSpinnerVisible(bool visible) +{ + spinner_->SetVisible(visible); + activator_->SetVisible(!visible && show_activator()); +} + +void TextInput::SetSpinnerState(SpinnerState spinner_state) +{ + spinner_->SetState(spinner_state); +} + +void TextInput::UpdateHintFont() +{ + hint_->SetFont((hint_font_name() + " " + std::to_string(hint_font_size())).c_str()); +} + +nux::ObjectPtr TextInput::LoadActivatorIcon(int icon_size) +{ + TextureCache& cache = TextureCache::GetDefault(); + return cache.FindTexture("arrow_right.png", icon_size, icon_size); +} + +nux::ObjectPtr TextInput::LoadWarningIcon(int icon_size) +{ + auto* theme = gtk_icon_theme_get_default(); + GtkIconLookupFlags flags = GTK_ICON_LOOKUP_FORCE_SIZE; + glib::Error error; + glib::Object pixbuf(gtk_icon_theme_load_icon(theme, WARNING_ICON.c_str(), icon_size, flags, &error)); + + if (pixbuf != nullptr) + { + nux::CairoGraphics cg(CAIRO_FORMAT_ARGB32, gdk_pixbuf_get_width(pixbuf), gdk_pixbuf_get_height(pixbuf)); + cairo_t* cr = cg.GetInternalContext(); + + cairo_push_group(cr); + gdk_cairo_set_source_pixbuf(cr, pixbuf, 0, 0); + cairo_paint_with_alpha(cr, 1.0); + std::shared_ptr pat(cairo_pop_group(cr), cairo_pattern_destroy); + + cairo_set_source_rgba(cr, 1.0f, 1.0f, 1.0f, 1.0f); + cairo_rectangle(cr, 0, 0, gdk_pixbuf_get_width(pixbuf), gdk_pixbuf_get_height(pixbuf)); + cairo_mask(cr, pat.get()); + + return texture_ptr_from_cairo_graphics(cg); + } + // Use fallback icon (this one is a png, and does not scale!) + else + { + dash::previews::Style& preview_style = dash::previews::Style::Instance(); + return nux::ObjectPtr(preview_style.GetWarningIcon()); + } +} + +void TextInput::LoadWarningTooltip() +{ + glib::String font_name; + g_object_get(gtk_settings_get_default(), "gtk-font-name", &font_name, NULL); + + glib::Object style_context(gtk_style_context_new()); + std::shared_ptr widget_path(gtk_widget_path_new(), gtk_widget_path_free); + gtk_widget_path_append_type(widget_path.get(), GTK_TYPE_TOOLTIP); + + gtk_style_context_set_path(style_context, widget_path.get()); + gtk_style_context_add_class(style_context, "tooltip"); + + glib::Object context(gdk_pango_context_get()); + glib::Object layout(pango_layout_new(context)); + + std::shared_ptr desc(pango_font_description_from_string(font_name), pango_font_description_free); + pango_context_set_font_description(context, desc.get()); + pango_context_set_language(context, gtk_get_default_language()); + pango_cairo_context_set_resolution(context, 96.0 * Settings::Instance().font_scaling()); + + pango_layout_set_height(layout, -1); //avoid wrap lines + pango_layout_set_text(layout, _("Caps lock is on"), -1); + + nux::Size extents; + pango_layout_get_pixel_size(layout, &extents.width, &extents.height); + extents.width += TOOLTIP_OFFSET; + extents.height += TOOLTIP_OFFSET; + + nux::CairoGraphics cg(CAIRO_FORMAT_ARGB32, RawPixel(extents.width).CP(scale), RawPixel(extents.height).CP(scale)); + cairo_surface_set_device_scale(cg.GetSurface(), scale, scale); + cairo_t* cr = cg.GetInternalContext(); + + gtk_render_background(style_context, cr, 0, 0, extents.width, extents.height); + gtk_render_frame(style_context, cr, 0, 0, extents.width, extents.height); + gtk_render_layout(style_context, cr, TOOLTIP_OFFSET/2, TOOLTIP_OFFSET/2, layout); + + warning_tooltip_ = texture_ptr_from_cairo_graphics(cg); +} + +void TextInput::OnFontChanged() { glib::String font_name; PangoFontDescription* desc; - std::ostringstream font_desc; - g_object_get(settings, "gtk-font-name", &font_name, NULL); + g_object_get(gtk_settings_get_default(), "gtk-font-name", &font_name, NULL); desc = pango_font_description_from_string(font_name.Value()); if (desc) { pango_entry_->SetFontFamily(pango_font_description_get_family(desc)); - pango_entry_->SetFontSize(PANGO_ENTRY_FONT_SIZE); pango_entry_->SetFontOptions(gdk_screen_get_font_options(gdk_screen_get_default())); + UpdateSize(); - font_desc << pango_font_description_get_family(desc) << " " << HINT_LABEL_FONT_STYLE << " " << HINT_LABEL_FONT_SIZE; - hint_->SetFont(font_desc.str().c_str()); - - font_desc.str(""); - font_desc.clear(); + if (hint_font_name() == HINT_LABEL_DEFAULT_FONT_NAME) + { + std::ostringstream font_desc; + font_desc << pango_font_description_get_family(desc) << " " << hint_font_size(); + hint_->SetFont(font_desc.str().c_str()); + } pango_font_description_free(desc); } @@ -124,8 +353,7 @@ void TextInput::OnInputHintChanged() { - glib::String tmp(g_markup_escape_text(input_hint().c_str(), -1)); - hint_->SetText(tmp); + hint_->SetText(input_hint().c_str(), true); } void TextInput::Draw(nux::GraphicsEngine& GfxContext, bool force_draw) @@ -156,7 +384,6 @@ nux::GetPainter().PushLayer(GfxContext, highlight_layer_->GetGeometry(), highlight_layer_.get()); } - if (!IsFullRedraw()) { gPainter.PushLayer(GfxContext, bg_layer_->GetGeometry(), bg_layer_.get()); @@ -168,6 +395,9 @@ layout_->ProcessDraw(GfxContext, force_draw); + if (caps_lock_on && warning_->IsMouseInside() && !tooltip_timeout_) + PaintWarningTooltip(GfxContext); + if (!IsFullRedraw()) { gPainter.PopBackground(); @@ -180,36 +410,41 @@ GfxContext.PopClippingRectangle(); } +void TextInput::PaintWarningTooltip(nux::GraphicsEngine& graphics_engine) +{ + nux::Geometry const& warning_geo = warning_->GetGeometry(); + + if (!warning_tooltip_.IsValid()) + LoadWarningTooltip(); + + nux::Geometry tooltip_geo = {warning_geo.x - (warning_tooltip_->GetWidth() + TOOLTIP_OFFSET.CP(scale) / 2), + warning_geo.y - TOOLTIP_Y_OFFSET.CP(scale), + warning_tooltip_->GetWidth(), + warning_tooltip_->GetHeight()}; + + auto const& warning_layer = CreateWarningLayer(warning_tooltip_.GetPointer()); + nux::GetPainter().PushDrawLayer(graphics_engine, tooltip_geo, warning_layer.get()); +} + void TextInput::UpdateBackground(bool force) { - int RADIUS = 5; nux::Geometry geo(GetGeometry()); - geo.width = layered_layout_->GetAbsoluteX() + - layered_layout_->GetAbsoluteWidth() - - GetAbsoluteX() + - TEXT_INPUT_RIGHT_BORDER; - - LOG_DEBUG(logger) << "height: " - << geo.height << " - " - << layered_layout_->GetGeometry().height << " - " - << pango_entry_->GetGeometry().height; - - if (geo.width == last_width_ - && geo.height == last_height_ - && force == false) + + if (geo.width == last_width_ && geo.height == last_height_ && !force) return; last_width_ = geo.width; last_height_ = geo.height; nux::CairoGraphics cairo_graphics(CAIRO_FORMAT_ARGB32, last_width_, last_height_); + cairo_surface_set_device_scale(cairo_graphics.GetSurface(), scale, scale); cairo_t* cr = cairo_graphics.GetInternalContext(); cairo_graphics.DrawRoundedRectangle(cr, 1.0f, 0.5, 0.5, - RADIUS, - last_width_ - 1, last_height_ - 1, + BORDER_RADIUS, + (last_width_/scale) - 1, (last_height_/scale) - 1, false); cairo_set_operator(cr, CAIRO_OPERATOR_SOURCE); @@ -219,7 +454,7 @@ cairo_set_source_rgba(cr, 1.0f, 1.0f, 1.0f, 0.7f); cairo_stroke(cr); - nux::BaseTexture* texture2D = texture_from_cairo_graphics(cairo_graphics); + auto texture2D = texture_ptr_from_cairo_graphics(cairo_graphics); nux::TexCoordXForm texxform; texxform.SetTexCoordType(nux::TexCoordXForm::OFFSET_COORD); @@ -235,8 +470,6 @@ nux::color::White, true, rop)); - - texture2D->UnReference(); } void TextInput::OnMouseButtonDown(int x, int y, unsigned long button, unsigned long key) @@ -250,7 +483,7 @@ } -nux::TextEntry* TextInput::text_entry() const +IMTextEntry* TextInput::text_entry() const { return pango_entry_; } diff -Nru unity-7.1.2+14.04.20140303/unity-shared/TextInput.h unity-7.2.4+14.04.20141217/unity-shared/TextInput.h --- unity-7.1.2+14.04.20140303/unity-shared/TextInput.h 2014-03-03 16:47:14.000000000 +0000 +++ unity-7.2.4+14.04.20141217/unity-shared/TextInput.h 2014-12-17 20:51:54.000000000 +0000 @@ -20,35 +20,28 @@ #ifndef TEXTINPUT_H #define TEXTINPUT_H -#include "config.h" - -#include -#include - #include -#include -#include -#include -#include -#include -#include #include #include -#include "CairoTexture.h" -#include "unity-shared/IconTexture.h" -#include "unity-shared/IMTextEntry.h" -#include "unity-shared/Introspectable.h" -#include "unity-shared/StaticCairoText.h" +#include "Introspectable.h" +#include "IMTextEntry.h" +#include "SearchBarSpinner.h" namespace nux { class AbstractPaintLayer; +class LayeredLayout; class LinearLayout; +class HLayout; } namespace unity { +class IconTexture; +class StaticCairoText; +class SearchBarSpinner; + class TextInput : public unity::debug::Introspectable, public nux::View { NUX_DECLARE_OBJECT_TYPE(TextInput, nux::View); @@ -56,33 +49,52 @@ public: typedef nux::ObjectPtr Ptr; TextInput(NUX_FILE_LINE_PROTO); - TextInput(bool show_filter_hint, NUX_FILE_LINE_PROTO); - nux::TextEntry* text_entry() const; + void SetSpinnerVisible(bool visible); + void SetSpinnerState(SpinnerState spinner_state); + + void EnableCapsLockWarning() const; + + IMTextEntry* text_entry() const; nux::RWProperty input_string; nux::Property input_hint; + nux::Property hint_font_name; + nux::Property hint_font_size; nux::ROProperty im_active; nux::ROProperty im_preedit; + nux::Property show_activator; + nux::Property show_caps_lock; + nux::Property scale; private: - - void OnFontChanged(GtkSettings* settings, GParamSpec* pspec=NULL); + void OnFontChanged(); + void UpdateHintFont(); void Draw(nux::GraphicsEngine& GfxContext, bool force_draw); void DrawContent(nux::GraphicsEngine& GfxContext, bool force_draw); void UpdateBackground(bool force); + void UpdateScale(double); + void UpdateSize(); std::string GetName() const; void AddProperties(debug::IntrospectionData&); bool AcceptKeyNavFocus(); -protected: + bool ShouldBeHighlighted(); + + nux::Geometry GetWaringIconGeometry() const; + void CheckIfCapsLockOn(); - void Init(); + nux::ObjectPtr LoadActivatorIcon(int icon_size); + nux::ObjectPtr LoadWarningIcon(int icon_size); + void LoadWarningTooltip(); + + void PaintWarningTooltip(nux::GraphicsEngine& graphics_engine); + +protected: void OnInputHintChanged(); - void OnMouseButtonDown(int x, int y, unsigned long button_flags, - unsigned long key_flags); + void OnMouseButtonDown(int x, int y, unsigned long button_flags, unsigned long key_flags); void OnEndKeyFocus(); // getters & setters @@ -97,19 +109,23 @@ IMTextEntry* pango_entry_; private: - - bool ShouldBeHighlighted(); - std::unique_ptr bg_layer_; std::unique_ptr highlight_layer_; nux::HLayout* layout_; + nux::HLayout* hint_layout_; nux::LayeredLayout* layered_layout_; + SearchBarSpinner* spinner_; + nux::Property caps_lock_on; int last_width_; int last_height_; - glib::SignalManager sig_manager_; + IconTexture* warning_; + IconTexture* activator_; + nux::ObjectPtr warning_tooltip_; + glib::Source::UniquePtr tooltip_timeout_; + glib::SignalManager sig_manager_; }; } diff -Nru unity-7.1.2+14.04.20140303/unity-shared/TextureCache.cpp unity-7.2.4+14.04.20141217/unity-shared/TextureCache.cpp --- unity-7.1.2+14.04.20140303/unity-shared/TextureCache.cpp 2014-03-03 16:47:36.000000000 +0000 +++ unity-7.2.4+14.04.20141217/unity-shared/TextureCache.cpp 2014-12-17 20:51:37.000000000 +0000 @@ -27,6 +27,15 @@ namespace unity { DECLARE_LOGGER(logger, "unity.internal.texturecache"); +namespace +{ +// Stolen from boost +template +inline std::size_t hash_combine(std::size_t seed, T const& v) +{ + return seed ^ (std::hash()(v) + 0x9e3779b9 + (seed << 6) + (seed >> 2)); +} +} TextureCache& TextureCache::GetDefault() { @@ -37,14 +46,12 @@ nux::BaseTexture* TextureCache::DefaultTexturesLoader(std::string const& name, int w, int h) { int size = std::max(w, h); - return nux::CreateTexture2DFromFile((PKGDATADIR"/" + name).c_str(), (!size ? -1 : size), true); + return nux::CreateTexture2DFromFile((PKGDATADIR"/" + name).c_str(), (size <= 0 ? -1 : size), true); } std::size_t TextureCache::Hash(std::string const& id, int width, int height) { - return ((std::hash()(id) - ^ (std::hash()(width) << 1)) >> 1) - ^ (std::hash()(height) << 1); + return hash_combine(hash_combine(std::hash()(id), width), height); } TextureCache::BaseTexturePtr TextureCache::FindTexture(std::string const& texture_id, diff -Nru unity-7.1.2+14.04.20140303/unity-shared/UnitySettings.cpp unity-7.2.4+14.04.20141217/unity-shared/UnitySettings.cpp --- unity-7.1.2+14.04.20140303/unity-shared/UnitySettings.cpp 2014-03-03 16:47:36.000000000 +0000 +++ unity-7.2.4+14.04.20141217/unity-shared/UnitySettings.cpp 2014-12-17 20:51:54.000000000 +0000 @@ -20,6 +20,7 @@ #include #include +#include #include #include "DecorationStyle.h" @@ -37,13 +38,30 @@ const std::string SETTINGS_NAME = "com.canonical.Unity"; const std::string FORM_FACTOR = "form-factor"; const std::string DOUBLE_CLICK_ACTIVATE = "double-click-activate"; -const std::string SCALE_FACTOR = "scale-factor"; const std::string LIM_KEY = "integrated-menus"; + const std::string LIM_SETTINGS = "com.canonical.Unity.IntegratedMenus"; const std::string CLICK_MOVEMENT_THRESHOLD = "click-movement-threshold"; const std::string DOUBLE_CLICK_WAIT = "double-click-wait"; -const std::string UI_SETTINGS = "com.ubuntu.user-interface"; +const std::string UI_SETTINGS = "com.canonical.Unity.Interface"; +const std::string TEXT_SCALE_FACTOR = "text-scale-factor"; +const std::string CURSOR_SCALE_FACTOR = "cursor-scale-factor"; +const std::string APP_SCALE_MONITOR = "app-scale-factor-monitor"; +const std::string APP_USE_MAX_SCALE = "app-fallback-to-maximum-scale-factor"; + +const std::string UBUNTU_UI_SETTINGS = "com.ubuntu.user-interface"; +const std::string SCALE_FACTOR = "scale-factor"; + +const std::string GNOME_UI_SETTINGS = "org.gnome.desktop.interface"; +const std::string GNOME_FONT_NAME = "font-name"; +const std::string GNOME_CURSOR_SIZE = "cursor-size"; +const std::string GNOME_SCALE_FACTOR = "scaling-factor"; +const std::string GNOME_TEXT_SCALE_FACTOR = "text-scaling-factor"; + +const int DEFAULT_LAUNCHER_WIDTH = 64; +const int MINIMUM_DESKTOP_HEIGHT = 800; +const int GNOME_SETTINGS_CHANGED_WAIT_SECONDS = 1; const double DEFAULT_DPI = 96.0f; } @@ -55,41 +73,85 @@ public: Impl(Settings* owner) : parent_(owner) - , gsettings_(g_settings_new(SETTINGS_NAME.c_str())) - , ubuntu_settings_(g_settings_new(UI_SETTINGS.c_str())) , usettings_(g_settings_new(SETTINGS_NAME.c_str())) , lim_settings_(g_settings_new(LIM_SETTINGS.c_str())) + , ui_settings_(g_settings_new(UI_SETTINGS.c_str())) + , ubuntu_ui_settings_(g_settings_new(UBUNTU_UI_SETTINGS.c_str())) + , gnome_ui_settings_(g_settings_new(GNOME_UI_SETTINGS.c_str())) + , launcher_widths_(monitors::MAX, DEFAULT_LAUNCHER_WIDTH) , cached_form_factor_(FormFactor::DESKTOP) + , cursor_scale_(1.0) , cached_double_click_activate_(true) + , changing_gnome_settings_(false) , lowGfx_(false) { + parent_->form_factor.SetGetterFunction(sigc::mem_fun(this, &Impl::GetFormFactor)); + parent_->form_factor.SetSetterFunction(sigc::mem_fun(this, &Impl::SetFormFactor)); + parent_->double_click_activate.SetGetterFunction(sigc::mem_fun(this, &Impl::GetDoubleClickActivate)); + for (unsigned i = 0; i < monitors::MAX; ++i) - em_converters_.push_back(std::make_shared()); + em_converters_.emplace_back(std::make_shared()); + + // The order is important here, DPI is the last thing to be updated + UpdateLimSetting(); + UpdateTextScaleFactor(); + UpdateCursorScaleFactor(); + UpdateFontSize(); + UpdateDPI(); CacheFormFactor(); CacheDoubleClickActivate(); - UpdateEMConverter(); - UpdateLimSetting(); - UScreen::GetDefault()->changed.connect(sigc::hide(sigc::hide(sigc::mem_fun(this, &Impl::UpdateEMConverter)))); + UScreen::GetDefault()->changed.connect(sigc::hide(sigc::hide(sigc::mem_fun(this, &Impl::UpdateDPI)))); signals_.Add(usettings_, "changed::" + FORM_FACTOR, [this] (GSettings*, const gchar*) { CacheFormFactor(); - parent_->form_factor.changed.emit(cached_form_factor_); }); signals_.Add(usettings_, "changed::" + DOUBLE_CLICK_ACTIVATE, [this] (GSettings*, const gchar*) { CacheDoubleClickActivate(); parent_->double_click_activate.changed.emit(cached_double_click_activate_); }); - signals_.Add(ubuntu_settings_, "changed::" + SCALE_FACTOR, [this] (GSettings*, const gchar* t) { - UpdateEMConverter(); - }); signals_.Add(usettings_, "changed::" + LIM_KEY, [this] (GSettings*, const gchar*) { UpdateLimSetting(); }); + signals_.Add(ubuntu_ui_settings_, "changed::" + SCALE_FACTOR, [this] (GSettings*, const gchar* t) { + UpdateDPI(); + }); + + signals_.Add(ui_settings_, "changed::" + TEXT_SCALE_FACTOR, [this] (GSettings*, const gchar* t) { + UpdateTextScaleFactor(); + UpdateDPI(); + }); + + signals_.Add(ui_settings_, "changed::" + CURSOR_SCALE_FACTOR, [this] (GSettings*, const gchar* t) { + UpdateCursorScaleFactor(); + UpdateDPI(); + }); + + signals_.Add(ui_settings_, "changed::" + APP_SCALE_MONITOR, [this] (GSettings*, const gchar* t) { + UpdateDPI(); + }); + + signals_.Add(ui_settings_, "changed::" + APP_USE_MAX_SCALE, [this] (GSettings*, const gchar* t) { + UpdateDPI(); + }); + + signals_.Add(gnome_ui_settings_, "changed::" + GNOME_FONT_NAME, [this] (GSettings*, const gchar* t) { + UpdateFontSize(); + UpdateDPI(); + }); + + signals_.Add(gnome_ui_settings_, "changed::" + GNOME_TEXT_SCALE_FACTOR, [this] (GSettings*, const gchar* t) { + if (!changing_gnome_settings_) + { + double new_scale_factor = g_settings_get_double(gnome_ui_settings_, GNOME_TEXT_SCALE_FACTOR.c_str()); + g_settings_set_double(ui_settings_, TEXT_SCALE_FACTOR.c_str(), new_scale_factor); + } + }); + signals_.Add(lim_settings_, "changed", [this] (GSettings*, const gchar*) { UpdateLimSetting(); }); @@ -98,18 +160,26 @@ void CacheFormFactor() { int raw_from_factor = g_settings_get_enum(usettings_, FORM_FACTOR.c_str()); + FormFactor new_form_factor; if (raw_from_factor == 0) //Automatic { auto uscreen = UScreen::GetDefault(); - int primary_monitor = uscreen->GetMonitorWithMouse(); + int primary_monitor = uscreen->GetPrimaryMonitor(); auto const& geo = uscreen->GetMonitorGeometry(primary_monitor); + double monitor_scaling = em(primary_monitor)->DPIScale(); - cached_form_factor_ = geo.height > 799 ? FormFactor::DESKTOP : FormFactor::NETBOOK; + new_form_factor = (geo.height * monitor_scaling) >= MINIMUM_DESKTOP_HEIGHT ? FormFactor::DESKTOP : FormFactor::NETBOOK; } else { - cached_form_factor_ = static_cast(raw_from_factor); + new_form_factor = static_cast(raw_from_factor); + } + + if (new_form_factor != cached_form_factor_) + { + cached_form_factor_ = new_form_factor; + parent_->form_factor.changed.emit(cached_form_factor_); } } @@ -133,7 +203,7 @@ bool SetFormFactor(FormFactor factor) { g_settings_set_enum(usettings_, FORM_FACTOR.c_str(), static_cast(factor)); - return true; + return false; } bool GetDoubleClickActivate() const @@ -146,72 +216,124 @@ gint font_size; PangoFontDescription* desc; - desc = pango_font_description_from_string(decoration::Style::Get()->font().c_str()); + glib::String font_name(g_settings_get_string(gnome_ui_settings_, GNOME_FONT_NAME.c_str())); + desc = pango_font_description_from_string(font_name); font_size = pango_font_description_get_size(desc); pango_font_description_free(desc); return font_size / 1024; } - int GetDPI(glib::Variant const& dict, int monitor) const + void UpdateFontSize() { - auto* uscreen = UScreen::GetDefault(); - - if (monitor < 0 || monitor >= uscreen->GetPluggedMonitorsNumber()) - return DEFAULT_DPI; + int font_size = GetFontSize(); - auto const& monitor_name = UScreen::GetDefault()->GetMonitorName(monitor); - double ui_scale = 1.0f; - int value; + for (auto const& em : em_converters_) + em->SetFontSize(font_size); + } - if (g_variant_lookup(dict, monitor_name.c_str(), "i", &value)) - ui_scale = static_cast(value)/8.0f; + void UpdateTextScaleFactor() + { + parent_->font_scaling = g_settings_get_double(ui_settings_, TEXT_SCALE_FACTOR.c_str()); + decoration::Style::Get()->font_scale = parent_->font_scaling(); + } - return (DEFAULT_DPI * ui_scale); + void UpdateCursorScaleFactor() + { + cursor_scale_ = g_settings_get_double(ui_settings_, CURSOR_SCALE_FACTOR.c_str()); } - void UpdateFontSize() + EMConverter::Ptr const& em(int monitor) const { - int font_size = GetFontSize(); + if (monitor < 0 || monitor >= (int)monitors::MAX) + { + LOG_ERROR(logger) << "Invalid monitor index: " << monitor << ". Returning index 0 monitor instead."; + return em_converters_[0]; + } - for (auto const& em : em_converters_) - em->SetFontSize(font_size); + return em_converters_[monitor]; } void UpdateDPI() { - glib::Variant dict; - g_settings_get(ubuntu_settings_, SCALE_FACTOR.c_str(), "@a{si}", &dict); + auto* uscreen = UScreen::GetDefault(); + double min_scale = 4.0; + double max_scale = 0.0; bool any_changed = false; - for (unsigned i = 0; i < em_converters_.size(); ++i) + glib::Variant dict; + g_settings_get(ubuntu_ui_settings_, SCALE_FACTOR.c_str(), "@a{si}", &dict); + + glib::String app_target_monitor(g_settings_get_string(ui_settings_, APP_SCALE_MONITOR.c_str())); + double app_target_scale = 0; + + for (unsigned monitor = 0; monitor < em_converters_.size(); ++monitor) { - int dpi = GetDPI(dict, i); + int dpi = DEFAULT_DPI; - if (em_converters_[i]->SetDPI(dpi)) + if (monitor < uscreen->GetMonitors().size()) + { + auto const& monitor_name = uscreen->GetMonitorName(monitor); + double ui_scale = 1.0f; + int value; + + if (g_variant_lookup(dict, monitor_name.c_str(), "i", &value) && value > 0) + ui_scale = static_cast(value)/8.0f; + + if (app_target_monitor.Str() == monitor_name) + app_target_scale = ui_scale; + + dpi = DEFAULT_DPI * ui_scale; + min_scale = std::min(min_scale, ui_scale); + max_scale = std::max(max_scale, ui_scale); + } + + if (em_converters_[monitor]->SetDPI(dpi)) any_changed = true; } + if (app_target_scale == 0) + app_target_scale = (g_settings_get_boolean(ui_settings_, APP_USE_MAX_SCALE.c_str())) ? max_scale : min_scale; + + UpdateAppsScaling(app_target_scale); + if (any_changed) parent_->dpi_changed.emit(); } - void UpdateEMConverter() + void UpdateAppsScaling(double scale) { - UpdateFontSize(); - UpdateDPI(); + changing_gnome_settings_ = true; + changing_gnome_settings_timeout_.reset(); + unsigned integer_scaling = std::max(1, scale); + double point_scaling = scale / static_cast(integer_scaling); + double text_scale_factor = parent_->font_scaling() * point_scaling; + glib::Variant default_cursor_size(g_settings_get_default_value(gnome_ui_settings_, GNOME_CURSOR_SIZE.c_str()), glib::StealRef()); + int cursor_size = std::round(default_cursor_size.GetInt32() * point_scaling * cursor_scale_); + g_settings_set_int(gnome_ui_settings_, GNOME_CURSOR_SIZE.c_str(), cursor_size); + g_settings_set_uint(gnome_ui_settings_, GNOME_SCALE_FACTOR.c_str(), integer_scaling); + g_settings_set_double(gnome_ui_settings_, GNOME_TEXT_SCALE_FACTOR.c_str(), text_scale_factor); + + changing_gnome_settings_timeout_.reset(new glib::TimeoutSeconds(GNOME_SETTINGS_CHANGED_WAIT_SECONDS, [this] { + changing_gnome_settings_ = false; + return false; + }, glib::Source::Priority::LOW)); } Settings* parent_; - glib::Object gsettings_; - glib::Object ubuntu_settings_; glib::Object usettings_; glib::Object lim_settings_; - glib::Object gnome_settings_; + glib::Object ui_settings_; + glib::Object ubuntu_ui_settings_; + glib::Object gnome_ui_settings_; + glib::Source::UniquePtr changing_gnome_settings_timeout_; glib::SignalManager signals_; std::vector em_converters_; + std::vector launcher_widths_; FormFactor cached_form_factor_; + double cursor_scale_; bool cached_double_click_activate_; + bool changing_gnome_settings_; bool lowGfx_; }; @@ -226,17 +348,10 @@ if (settings_instance) { LOG_ERROR(logger) << "More than one unity::Settings created."; + return; } - else - { - form_factor.SetGetterFunction(sigc::mem_fun(*pimpl, &Impl::GetFormFactor)); - form_factor.SetSetterFunction(sigc::mem_fun(*pimpl, &Impl::SetFormFactor)); - - double_click_activate.SetGetterFunction(sigc::mem_fun(*pimpl, &Impl::GetDoubleClickActivate)); - - settings_instance = this; - } + settings_instance = this; } Settings::~Settings() @@ -267,13 +382,30 @@ EMConverter::Ptr const& Settings::em(int monitor) const { + return pimpl->em(monitor); +} + +void Settings::SetLauncherWidth(int launcher_width, int monitor) +{ + if (monitor < 0 || monitor >= (int)monitors::MAX) + { + LOG_ERROR(logger) << "Invalid monitor index: " << monitor << ". Not updating laucher width."; + } + else + { + pimpl->launcher_widths_[monitor] = launcher_width; + } +} + +int Settings::LauncherWidth(int monitor) const +{ if (monitor < 0 || monitor >= (int)monitors::MAX) { - LOG_ERROR(logger) << "Invalid monitor index: " << monitor << ". Returning index 0 monitor instead."; - return pimpl->em_converters_[0]; + LOG_ERROR(logger) << "Invalid monitor index: " << monitor << ". Returning 0."; + return 0; } - return pimpl->em_converters_[monitor]; + return pimpl->launcher_widths_[monitor]; } } // namespace unity diff -Nru unity-7.1.2+14.04.20140303/unity-shared/UnitySettings.h unity-7.2.4+14.04.20141217/unity-shared/UnitySettings.h --- unity-7.1.2+14.04.20140303/unity-shared/UnitySettings.h 2014-03-03 16:47:14.000000000 +0000 +++ unity-7.2.4+14.04.20141217/unity-shared/UnitySettings.h 2014-12-17 20:51:37.000000000 +0000 @@ -46,11 +46,15 @@ void SetLowGfxMode(const bool low_gfx); EMConverter::Ptr const& em(int monitor = 0) const; + void SetLauncherWidth(int launcher_width, int monitor); + int LauncherWidth(int monitor) const; + nux::RWProperty form_factor; nux::Property is_standalone; nux::ROProperty double_click_activate; nux::Property lim_movement_thresold; nux::Property lim_double_click_wait; + nux::Property font_scaling; sigc::signal dpi_changed; diff -Nru unity-7.1.2+14.04.20140303/unity-shared/UnityWindowStyle.cpp unity-7.2.4+14.04.20141217/unity-shared/UnityWindowStyle.cpp --- unity-7.1.2+14.04.20140303/unity-shared/UnityWindowStyle.cpp 2014-03-03 16:47:14.000000000 +0000 +++ unity-7.2.4+14.04.20141217/unity-shared/UnityWindowStyle.cpp 2014-12-17 20:51:37.000000000 +0000 @@ -16,82 +16,155 @@ * * Authored by: Jason Smith * Marco Trevisan + * Brandon Schaefer */ +#include + +#include "UnitySettings.h" #include "UnityWindowStyle.h" +#include "UScreen.h" #include "config.h" -namespace unity { -namespace ui { +#include -UnityWindowStyle::UnityWindowStyle() +namespace unity +{ +namespace ui +{ +namespace { - background_top_.Adopt(nux::CreateTexture2DFromFile(PKGDATADIR"/switcher_top.png", -1, true)); - background_left_.Adopt(nux::CreateTexture2DFromFile(PKGDATADIR"/switcher_left.png", -1, true)); - background_corner_.Adopt(nux::CreateTexture2DFromFile(PKGDATADIR"/switcher_corner.png", -1, true)); + const char* const SWITCHER_TOP = PKGDATADIR"/switcher_top.png"; + const char* const SWITCHER_LEFT = PKGDATADIR"/switcher_left.png"; + const char* const SWITCHER_CORNER = PKGDATADIR"/switcher_corner.png"; + + const char* const DIALOG_CLOSE = PKGDATADIR"/dialog_close.png"; + const char* const DIALOG_HIGHLIGHT = PKGDATADIR"/dialog_close_highlight.png"; + const char* const DIALOG_PRESS = PKGDATADIR"/dialog_close_press.png"; + + + RawPixel const INTERNAL_OFFSET = 20_em; + RawPixel const BORDER_SIZE = 30_em; + RawPixel const CLOSE_PADDING = 3_em; } -UnityWindowStyle::Ptr const& UnityWindowStyle::Get() +DECLARE_LOGGER(logger, "unity.ui.unity.window.style"); + + +UnityWindowStyle::UnityWindowStyle() { - // This is set only the first time; - static UnityWindowStyle::Ptr instance(new UnityWindowStyle()); - return instance; + unsigned monitors = UScreen::GetDefault()->GetPluggedMonitorsNumber(); + auto& settings = Settings::Instance(); + + // Pre-load scale values per monitor + for (unsigned i = 0; i < monitors; ++i) + { + double scale = settings.Instance().em(i)->DPIScale(); + + if (unity_window_textures_.find(scale) == unity_window_textures_.end()) + LoadAllTextureInScale(scale); + } + + settings.Instance().dpi_changed.connect(sigc::mem_fun(this, &UnityWindowStyle::CleanUpUnusedTextures)); + UScreen::GetDefault()->changed.connect(sigc::mem_fun(this, &UnityWindowStyle::OnMonitorChanged)); } -int UnityWindowStyle::GetBorderSize() const +void UnityWindowStyle::LoadAllTextureInScale(double scale) { - return 30; // as measured from textures + auto& window_textures = unity_window_textures_[scale]; + + window_textures[unsigned(WindowTextureType::BACKGROUND_TOP)] = LoadTexture(scale, SWITCHER_TOP); + window_textures[unsigned(WindowTextureType::BACKGROUND_LEFT)] = LoadTexture(scale, SWITCHER_LEFT); + window_textures[unsigned(WindowTextureType::BACKGROUND_CORNER)] = LoadTexture(scale, SWITCHER_CORNER); + + window_textures[unsigned(WindowTextureType::CLOSE_ICON)] = LoadTexture(scale, DIALOG_CLOSE); + window_textures[unsigned(WindowTextureType::CLOSE_ICON_HIGHLIGHTED)] = LoadTexture(scale, DIALOG_HIGHLIGHT); + window_textures[unsigned(WindowTextureType::CLOSE_ICON_PRESSED)] = LoadTexture(scale, DIALOG_PRESS); } -int UnityWindowStyle::GetInternalOffset() const +nux::BaseTexture* UnityWindowStyle::LoadTexture(double scale, const char* const texture_name) const { - return 20; + RawPixel max_size = GetDefaultMaxTextureSize(texture_name); + return nux::CreateTexture2DFromFile(texture_name, max_size.CP(scale), true); } -int UnityWindowStyle::GetCloseButtonPadding() const +RawPixel UnityWindowStyle::GetDefaultMaxTextureSize(const char* const texture_name) const { - return 3; + nux::Size size; + gdk_pixbuf_get_file_info(texture_name, &size.width, &size.height); + RawPixel max_size = std::max(std::round(size.width), std::round(size.height)); + + return max_size; } -UnityWindowStyle::BaseTexturePtr UnityWindowStyle::GetCloseIcon() +void UnityWindowStyle::OnMonitorChanged(int primary, std::vector const& monitors) { - if (!close_icon_) - close_icon_.Adopt(nux::CreateTexture2DFromFile(PKGDATADIR"/dialog_close.png", -1, true)); - - return close_icon_; + CleanUpUnusedTextures(); } -UnityWindowStyle::BaseTexturePtr UnityWindowStyle::GetCloseIconHighligted() +// Get current in use scale values, if a scaled value is allocated, but +// not in use clean up the scaled textures in unity_window_textures +void UnityWindowStyle::CleanUpUnusedTextures() { - if (!close_icon_highlighted_) - close_icon_highlighted_.Adopt(nux::CreateTexture2DFromFile(PKGDATADIR"/dialog_close_highlight.png", -1, true)); + unsigned monitors = UScreen::GetDefault()->GetPluggedMonitorsNumber(); + auto& settings = Settings::Instance(); + std::unordered_set used_scales; + + for (unsigned i = 0; i < monitors; ++i) + used_scales.insert(settings.em(i)->DPIScale()); - return close_icon_highlighted_; + for (auto it = unity_window_textures_.begin(); it != unity_window_textures_.end();) + { + if (used_scales.find(it->first) == used_scales.end()) + { + it = unity_window_textures_.erase(it); + } + else + { + ++it; + } + } } -UnityWindowStyle::BaseTexturePtr UnityWindowStyle::GetCloseIconPressed() +UnityWindowStyle::Ptr const& UnityWindowStyle::Get() { - if (!close_icon_pressed_) - close_icon_pressed_.Adopt(nux::CreateTexture2DFromFile(PKGDATADIR"/dialog_close_press.png", -1, true)); - - return close_icon_pressed_; + // This is set only the first time; + static UnityWindowStyle::Ptr instance(new UnityWindowStyle()); + return instance; } -UnityWindowStyle::BaseTexturePtr UnityWindowStyle::GetBackgroundTop() const +int UnityWindowStyle::GetBorderSize(double scale) const { - return background_top_; + return BORDER_SIZE.CP(scale); // as measured from textures } -UnityWindowStyle::BaseTexturePtr UnityWindowStyle::GetBackgroundLeft() const +int UnityWindowStyle::GetInternalOffset(double scale) const { - return background_left_; + return INTERNAL_OFFSET.CP(scale); } -UnityWindowStyle::BaseTexturePtr UnityWindowStyle::GetBackgroundCorner() const +int UnityWindowStyle::GetCloseButtonPadding(double scale) const { - return background_corner_; + return CLOSE_PADDING.CP(scale); } +UnityWindowStyle::BaseTexturePtr UnityWindowStyle::GetTexture(double scale, WindowTextureType const& type) +{ + auto it = unity_window_textures_.find(scale); + if (it == unity_window_textures_.end()) + { + LoadAllTextureInScale(scale); + it = unity_window_textures_.find(scale); + if (it == unity_window_textures_.end()) + { + LOG_ERROR(logger) << "Failed to create unity window style textures, for scale size: " << scale; + return BaseTexturePtr(nullptr); + } + } + + return it->second[unsigned(type)]; } -} + +} // namespace ui +} // namespace unity diff -Nru unity-7.1.2+14.04.20140303/unity-shared/UnityWindowStyle.h unity-7.2.4+14.04.20141217/unity-shared/UnityWindowStyle.h --- unity-7.1.2+14.04.20140303/unity-shared/UnityWindowStyle.h 2014-03-03 16:47:14.000000000 +0000 +++ unity-7.2.4+14.04.20141217/unity-shared/UnityWindowStyle.h 2014-12-17 20:51:37.000000000 +0000 @@ -16,6 +16,7 @@ * * Authored by: Jason Smith * Marco Trevisan + * Brandon Schaefer */ #ifndef UNITYWINDOWSTYLE_H @@ -24,8 +25,23 @@ #include #include -namespace unity { -namespace ui { +#include "RawPixel.h" + +namespace unity +{ +namespace ui +{ + +enum class WindowTextureType : unsigned +{ + BACKGROUND_TOP, + BACKGROUND_LEFT, + BACKGROUND_CORNER, + CLOSE_ICON, + CLOSE_ICON_HIGHLIGHTED, + CLOSE_ICON_PRESSED, + Size +}; class UnityWindowStyle { @@ -35,29 +51,28 @@ static UnityWindowStyle::Ptr const& Get(); - BaseTexturePtr GetCloseIcon(); - BaseTexturePtr GetCloseIconHighligted(); - BaseTexturePtr GetCloseIconPressed(); - int GetCloseButtonPadding() const; - - BaseTexturePtr GetBackgroundTop() const; - BaseTexturePtr GetBackgroundLeft() const; - BaseTexturePtr GetBackgroundCorner() const; - int GetBorderSize() const; - int GetInternalOffset() const; + BaseTexturePtr GetTexture(double scale, WindowTextureType const& type); + int GetCloseButtonPadding(double scale) const; + int GetBorderSize(double scale) const; + int GetInternalOffset(double scale) const; private: UnityWindowStyle(); - BaseTexturePtr background_top_; - BaseTexturePtr background_left_; - BaseTexturePtr background_corner_; - BaseTexturePtr close_icon_; - BaseTexturePtr close_icon_highlighted_; - BaseTexturePtr close_icon_pressed_; + void ReloadIcons(); + void LoadAllTextureInScale(double scale); + nux::BaseTexture* LoadTexture(double scale, const char* const texture_name) const; + RawPixel GetDefaultMaxTextureSize(const char* const texture_name) const; + + void OnMonitorChanged(int primary, std::vector const& monitors); + void CleanUpUnusedTextures(); + + typedef std::array UnityWindowTextures; + std::unordered_map unity_window_textures_; + }; -} -} +} // namespace ui +} // namespace unity #endif diff -Nru unity-7.1.2+14.04.20140303/unity-shared/UnityWindowView.cpp unity-7.2.4+14.04.20141217/unity-shared/UnityWindowView.cpp --- unity-7.1.2+14.04.20140303/unity-shared/UnityWindowView.cpp 2014-03-03 16:47:14.000000000 +0000 +++ unity-7.2.4+14.04.20141217/unity-shared/UnityWindowView.cpp 2014-12-17 20:51:37.000000000 +0000 @@ -32,6 +32,8 @@ : View(NUX_FILE_LINE_PARAM) , style(UnityWindowStyle::Get()) , closable(false) + , monitor(0) + , scale(Settings::Instance().em()->DPIScale()) , internal_layout_(nullptr) , bg_helper_(this) { @@ -47,6 +49,8 @@ live_background = false; + monitor.changed.connect(sigc::hide(sigc::mem_fun(this, &UnityWindowView::OnDPIChanged))); + Settings::Instance().dpi_changed.connect(sigc::mem_fun(this, &UnityWindowView::OnDPIChanged)); closable.changed.connect(sigc::mem_fun(this, &UnityWindowView::OnClosableChanged)); background_color.changed.connect(sigc::hide(sigc::mem_fun(this, &View::QueueDraw))); } @@ -60,6 +64,17 @@ bounding_area_->UnParentObject(); } +void UnityWindowView::OnDPIChanged() +{ + scale = Settings::Instance().em(monitor())->DPIScale(); + + if (internal_layout_) + { + int offset = style()->GetInternalOffset(scale); + view_layout_->SetPadding(offset, offset); + } +} + void UnityWindowView::SetBackgroundHelperGeometryGetter(BackgroundEffectHelper::GeometryGetterFunc const& func) { bg_helper_.SetGeometryGetter(func); @@ -109,6 +124,11 @@ return View::FindKeyFocusArea(etype, key_code, modifiers); } +void UnityWindowView::ReloadCloseButtonTexture() +{ + OnClosableChanged(closable); +} + void UnityWindowView::OnClosableChanged(bool closable) { if (!closable) @@ -117,34 +137,38 @@ return; } - auto const& texture = style()->GetCloseIcon(); - int padding = style()->GetCloseButtonPadding(); + auto const& texture = style()->GetTexture(scale, WindowTextureType::CLOSE_ICON); + int padding = style()->GetCloseButtonPadding(scale); + close_button_ = new IconTexture(texture); close_button_->SetBaseXY(padding, padding); close_button_->SetParentObject(this); close_button_->mouse_enter.connect([this](int, int, unsigned long, unsigned long) { if (close_button_->IsMouseOwner()) - close_button_->SetTexture(style()->GetCloseIconPressed()); + close_button_->SetTexture(style()->GetTexture(scale, WindowTextureType::CLOSE_ICON_PRESSED)); else - close_button_->SetTexture(style()->GetCloseIconHighligted()); + close_button_->SetTexture(style()->GetTexture(scale, WindowTextureType::CLOSE_ICON_HIGHLIGHTED)); }); close_button_->mouse_leave.connect([this](int, int, unsigned long, unsigned long) { - close_button_->SetTexture(style()->GetCloseIcon()); + close_button_->SetTexture(style()->GetTexture(scale, WindowTextureType::CLOSE_ICON)); }); close_button_->mouse_down.connect([this](int, int, unsigned long, unsigned long) { - close_button_->SetTexture(style()->GetCloseIconPressed()); + close_button_->SetTexture(style()->GetTexture(scale, WindowTextureType::CLOSE_ICON_PRESSED)); }); close_button_->mouse_up.connect([this](int, int, unsigned long, unsigned long) { bool inside = close_button_->IsMouseInside(); - close_button_->SetTexture(inside ? style()->GetCloseIconHighligted() : style()->GetCloseIcon()); + if (inside) + close_button_->SetTexture(style()->GetTexture(scale, WindowTextureType::CLOSE_ICON_HIGHLIGHTED)); + else + close_button_->SetTexture(style()->GetTexture(scale, WindowTextureType::CLOSE_ICON)); }); close_button_->mouse_click.connect([this](int, int, unsigned long, unsigned long) { - close_button_->SetTexture(style()->GetCloseIcon()); + close_button_->SetTexture(style()->GetTexture(scale, WindowTextureType::CLOSE_ICON)); request_close.emit(); }); @@ -155,7 +179,7 @@ { if (layout && layout->IsLayout()) { - int offset = style()->GetInternalOffset(); + int offset = style()->GetInternalOffset(scale); // We wrap the internal layout adding some padding, so that inherited classes // can ignore the offsets we define here. @@ -180,7 +204,8 @@ nux::Geometry UnityWindowView::GetInternalBackground() { - int offset = style()->GetInternalOffset(); + int offset = style()->GetInternalOffset(scale); + return GetBackgroundGeometry().GetExpand(-offset, -offset); } @@ -245,7 +270,7 @@ auto temp_background_color = background_color(); auto blend_mode = nux::LAYER_BLEND_MODE_OVERLAY; - if (Settings::Instance().GetLowGfxMode()) + if (Settings::Instance().GetLowGfxMode() || BackgroundEffectHelper::blur_type == BLUR_NONE) { temp_background_color.alpha = 1.0f; blend_mode = nux::LAYER_BLEND_MODE_NORMAL; @@ -330,7 +355,9 @@ void UnityWindowView::DrawBackground(nux::GraphicsEngine& GfxContext, nux::Geometry const& geo) { - int border = style()->GetBorderSize(); + int border = style()->GetBorderSize(scale); + + auto background_corner_textrue = style()->GetTexture(scale, WindowTextureType::BACKGROUND_CORNER)->GetDeviceTexture(); GfxContext.GetRenderStates().SetBlend(true, GL_ONE, GL_ONE_MINUS_SRC_ALPHA); @@ -344,7 +371,7 @@ texxform.u1 = border; texxform.v1 = border; GfxContext.QRP_1Tex (geo.x, geo.y, - border, border, style()->GetBackgroundCorner()->GetDeviceTexture(), texxform, nux::color::White); + border, border, background_corner_textrue, texxform, nux::color::White); // Draw TOP-RIGHT CORNER texxform.u0 = 0; @@ -354,7 +381,7 @@ texxform.flip_u_coord = true; texxform.flip_v_coord = false; GfxContext.QRP_1Tex (geo.x + geo.width - border, geo.y, - border, border, style()->GetBackgroundCorner()->GetDeviceTexture(), texxform, nux::color::White); + border, border, background_corner_textrue, texxform, nux::color::White); // Draw BOTTOM-LEFT CORNER texxform.u0 = 0; @@ -364,7 +391,7 @@ texxform.flip_u_coord = false; texxform.flip_v_coord = true; GfxContext.QRP_1Tex (geo.x, geo.y + geo.height - border, - border, border, style()->GetBackgroundCorner()->GetDeviceTexture(), texxform, nux::color::White); + border, border, background_corner_textrue, texxform, nux::color::White); // Draw BOTTOM-RIGHT CORNER texxform.u0 = 0; @@ -374,10 +401,11 @@ texxform.flip_u_coord = true; texxform.flip_v_coord = true; GfxContext.QRP_1Tex (geo.x + geo.width - border, geo.y + geo.height - border, - border, border, style()->GetBackgroundCorner()->GetDeviceTexture(), texxform, nux::color::White); + border, border, background_corner_textrue, texxform, nux::color::White); - int top_width = style()->GetBackgroundTop()->GetWidth(); - int top_height = style()->GetBackgroundTop()->GetHeight(); + auto background_top = style()->GetTexture(scale, WindowTextureType::BACKGROUND_TOP); + int top_width = background_top->GetWidth(); + int top_height = background_top->GetHeight(); // Draw TOP BORDER texxform.u0 = 0; @@ -386,7 +414,7 @@ texxform.v1 = top_height; texxform.flip_u_coord = false; texxform.flip_v_coord = false; - GfxContext.QRP_1Tex (geo.x + border, geo.y, geo.width - border - border, border, style()->GetBackgroundTop()->GetDeviceTexture(), texxform, nux::color::White); + GfxContext.QRP_1Tex (geo.x + border, geo.y, geo.width - border - border, border, background_top->GetDeviceTexture(), texxform, nux::color::White); // Draw BOTTOM BORDER texxform.u0 = 0; @@ -395,11 +423,11 @@ texxform.v1 = top_height; texxform.flip_u_coord = false; texxform.flip_v_coord = true; - GfxContext.QRP_1Tex (geo.x + border, geo.y + geo.height - border, geo.width - border - border, border, style()->GetBackgroundTop()->GetDeviceTexture(), texxform, nux::color::White); - + GfxContext.QRP_1Tex (geo.x + border, geo.y + geo.height - border, geo.width - border - border, border, background_top->GetDeviceTexture(), texxform, nux::color::White); - int left_width = style()->GetBackgroundLeft()->GetWidth(); - int left_height = style()->GetBackgroundLeft()->GetHeight(); + auto background_left = style()->GetTexture(scale, WindowTextureType::BACKGROUND_LEFT); + int left_width = background_left->GetWidth(); + int left_height = background_left->GetHeight(); // Draw LEFT BORDER texxform.u0 = 0; @@ -408,7 +436,7 @@ texxform.v1 = left_height; texxform.flip_u_coord = false; texxform.flip_v_coord = false; - GfxContext.QRP_1Tex (geo.x, geo.y + border, border, geo.height - border - border, style()->GetBackgroundLeft()->GetDeviceTexture(), texxform, nux::color::White); + GfxContext.QRP_1Tex (geo.x, geo.y + border, border, geo.height - border - border, background_left->GetDeviceTexture(), texxform, nux::color::White); // Draw RIGHT BORDER texxform.u0 = 0; @@ -417,7 +445,7 @@ texxform.v1 = left_height; texxform.flip_u_coord = true; texxform.flip_v_coord = false; - GfxContext.QRP_1Tex (geo.x + geo.width - border, geo.y + border, border, geo.height - border - border, style()->GetBackgroundLeft()->GetDeviceTexture(), texxform, nux::color::White); + GfxContext.QRP_1Tex (geo.x + geo.width - border, geo.y + border, border, geo.height - border - border, background_left->GetDeviceTexture(), texxform, nux::color::White); GfxContext.GetRenderStates().SetBlend(false); } diff -Nru unity-7.1.2+14.04.20140303/unity-shared/UnityWindowView.h unity-7.2.4+14.04.20141217/unity-shared/UnityWindowView.h --- unity-7.1.2+14.04.20140303/unity-shared/UnityWindowView.h 2014-03-03 16:47:14.000000000 +0000 +++ unity-7.2.4+14.04.20141217/unity-shared/UnityWindowView.h 2014-12-17 20:51:37.000000000 +0000 @@ -23,6 +23,7 @@ #include "unity-shared/BackgroundEffectHelper.h" #include "unity-shared/IconTexture.h" + #include "Introspectable.h" #include "UnityWindowStyle.h" #include @@ -41,6 +42,8 @@ nux::Property background_color; nux::Property style; nux::Property closable; + nux::Property monitor; + nux::Property scale; UnityWindowView(NUX_FILE_LINE_PROTO); virtual ~UnityWindowView(); @@ -64,6 +67,8 @@ virtual nux::Geometry GetBlurredBackgroundGeometry(); void SetBackgroundHelperGeometryGetter(BackgroundEffectHelper::GeometryGetterFunc const&); + void ReloadCloseButtonTexture(); + // Introspectable methods std::string GetName() const; void AddProperties(debug::IntrospectionData&); @@ -71,6 +76,7 @@ private: friend class TestUnityWindowView; + void OnDPIChanged(); void OnClosableChanged(bool closable); void DrawBackground(nux::GraphicsEngine& GfxContext, nux::Geometry const& geo); diff -Nru unity-7.1.2+14.04.20140303/unity-shared/UpstartWrapper.cpp unity-7.2.4+14.04.20141217/unity-shared/UpstartWrapper.cpp --- unity-7.1.2+14.04.20140303/unity-shared/UpstartWrapper.cpp 1970-01-01 00:00:00.000000000 +0000 +++ unity-7.2.4+14.04.20141217/unity-shared/UpstartWrapper.cpp 2014-12-17 20:51:37.000000000 +0000 @@ -0,0 +1,74 @@ +// -*- Mode: C++; indent-tabs-mode: nil; tab-width: 2 -*- +/* +* Copyright (C) 2014 Canonical Ltd +* +* This program is free software: you can redistribute it and/or modify +* it under the terms of the GNU General Public License version 3 as +* published by the Free Software Foundation. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with this program. If not, see . +* +* Authored by: Andrea Azzarone +*/ + +#include "UpstartWrapper.h" + +#include + +namespace unity +{ + +// +// Start private implementation +// + +class UpstartWrapper::Impl +{ +public: + Impl(bool test_mode = false); + + void Emit(std::string const& name); + +private: + glib::DBusProxy::Ptr upstart_proxy_; +}; + +UpstartWrapper::Impl::Impl(bool test_mode) +{ + upstart_proxy_ = std::make_shared(test_mode ? "com.canonical.Unity.Test.Upstart" : "com.ubuntu.Upstart", + "/com/ubuntu/Upstart", + "com.ubuntu.Upstart0_6"); +} + +void UpstartWrapper::Impl::Emit(std::string const& name) +{ + upstart_proxy_->Call("EmitEvent", g_variant_new("(sasb)", name.c_str(), nullptr, 0)); +} + +// +// End private implementation +// + +UpstartWrapper::UpstartWrapper() + : pimpl_(new Impl) +{} + +UpstartWrapper::UpstartWrapper(UpstartWrapper::TestMode const& tm) + : pimpl_(new Impl(true)) +{} + +UpstartWrapper::~UpstartWrapper() +{} + +void UpstartWrapper::Emit(std::string const& name) +{ + pimpl_->Emit(name); +} + +} diff -Nru unity-7.1.2+14.04.20140303/unity-shared/UpstartWrapper.h unity-7.2.4+14.04.20141217/unity-shared/UpstartWrapper.h --- unity-7.1.2+14.04.20140303/unity-shared/UpstartWrapper.h 1970-01-01 00:00:00.000000000 +0000 +++ unity-7.2.4+14.04.20141217/unity-shared/UpstartWrapper.h 2014-12-17 20:51:37.000000000 +0000 @@ -0,0 +1,53 @@ +// -*- Mode: C++; indent-tabs-mode: nil; tab-width: 2 -*- +/* +* Copyright (C) 2014 Canonical Ltd +* +* This program is free software: you can redistribute it and/or modify +* it under the terms of the GNU General Public License version 3 as +* published by the Free Software Foundation. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with this program. If not, see . +* +* Authored by: Andrea Azzarone +*/ + +#ifndef UNITY_UPSTART_WRAPPER +#define UNITY_UPSTART_WRAPPER + +#include + +namespace unity +{ + +class UpstartWrapper +{ +public: + typedef std::shared_ptr Ptr; + + UpstartWrapper(); + ~UpstartWrapper(); + + void Emit(std::string const& name); + +protected: + struct TestMode {}; + UpstartWrapper(TestMode const&); + +private: + // Noncopyable + UpstartWrapper(UpstartWrapper const&) = delete; + UpstartWrapper& operator=(UpstartWrapper const&) = delete; + + class Impl; + std::unique_ptr pimpl_; +}; + +} + +#endif diff -Nru unity-7.1.2+14.04.20140303/unity-shared/UScreen.cpp unity-7.2.4+14.04.20141217/unity-shared/UScreen.cpp --- unity-7.1.2+14.04.20140303/unity-shared/UScreen.cpp 2014-03-03 16:47:36.000000000 +0000 +++ unity-7.2.4+14.04.20141217/unity-shared/UScreen.cpp 2014-12-17 20:51:54.000000000 +0000 @@ -28,14 +28,19 @@ UScreen::UScreen() : primary_(0) , screen_(gdk_screen_get_default(), glib::AddRef()) - , proxy_("org.freedesktop.UPower", - "/org/freedesktop/UPower", - "org.freedesktop.UPower", + , proxy_("org.freedesktop.login1", + "/org/freedesktop/login1", + "org.freedesktop.login1.Manager", G_BUS_TYPE_SYSTEM) { size_changed_signal_.Connect(screen_, "size-changed", sigc::mem_fun(this, &UScreen::Changed)); monitors_changed_signal_.Connect(screen_, "monitors-changed", sigc::mem_fun(this, &UScreen::Changed)); - proxy_.Connect("Resuming", [this] (GVariant* data) { resuming.emit(); }); + proxy_.Connect("PrepareForSleep", [this] (GVariant* data) { + gboolean val; + g_variant_get(data, "(b)", &val); + if (!val) + resuming.emit(); + }); Refresh(); } @@ -76,6 +81,15 @@ int UScreen::GetMonitorAtPosition(int x, int y) const { + int idx = 0; + + for (auto const& monitor : monitors_) + { + if (monitor.IsPointInside(x, y)) + return idx; + ++idx; + } + return gdk_screen_get_monitor_at_point(screen_, x, y); } @@ -91,23 +105,35 @@ nux::Geometry UScreen::GetScreenGeometry() const { - int width = gdk_screen_get_width(screen_); - int height = gdk_screen_get_height(screen_); - return nux::Geometry(0, 0, width, height); + if (monitors_.empty()) + return {}; + + auto rightmost_geo = max_element(monitors_.begin(), monitors_.end(), [](nux::Geometry const& a, nux::Geometry const& b) { + return a.x + a.width < b.x + b.width; + }); + + auto lower_geo = max_element(monitors_.begin(), monitors_.end(), [](nux::Geometry const& a, nux::Geometry const& b) { + return a.y + a.height < b.y + b.height; + }); + + auto width = rightmost_geo->x + rightmost_geo->width; + auto height = lower_geo->y + lower_geo->height; + + return {0, 0, width, height}; } const std::string UScreen::GetMonitorName(int output_number = 0) const { - if (output_number < 0 || output_number > gdk_screen_get_n_monitors(screen_)) + if (output_number < 0 || output_number >= gdk_screen_get_n_monitors(screen_)) { - LOG_ERROR(logger) << "UScreen::GetMonitorName: Invalid monitor number" << output_number; + LOG_WARN(logger) << "UScreen::GetMonitorName: Invalid monitor number" << output_number; return ""; } glib::String output_name(gdk_screen_get_monitor_plug_name(screen_, output_number)); if (!output_name) { - LOG_ERROR(logger) << "UScreen::GetMonitorName: Failed to get monitor name for monitor" << output_number; + LOG_WARN(logger) << "UScreen::GetMonitorName: Failed to get monitor name for monitor" << output_number; return ""; } diff -Nru unity-7.1.2+14.04.20140303/unity-shared/VScrollBarOverlayWindow.cpp unity-7.2.4+14.04.20141217/unity-shared/VScrollBarOverlayWindow.cpp --- unity-7.1.2+14.04.20140303/unity-shared/VScrollBarOverlayWindow.cpp 2014-03-03 16:47:36.000000000 +0000 +++ unity-7.2.4+14.04.20141217/unity-shared/VScrollBarOverlayWindow.cpp 2014-12-17 20:51:37.000000000 +0000 @@ -31,15 +31,15 @@ namespace { - int const THUMB_WIDTH = 21; - int const THUMB_HEIGHT = 68; - int const THUMB_RADIUS = 3; - int const ANIMATION_DURATION = 90; + const RawPixel THUMB_WIDTH = 21_em; + const RawPixel THUMB_HEIGHT = 68_em; + const int THUMB_RADIUS = 3; + const int ANIMATION_DURATION = 90; } - VScrollBarOverlayWindow::VScrollBarOverlayWindow(nux::Geometry const& geo) : nux::BaseWindow("") + , scale(1.0) , content_size_(geo) , content_offset_x_(0) , mouse_offset_y_(0) @@ -47,8 +47,9 @@ , current_action_(ThumbAction::NONE) , show_animator_(ANIMATION_DURATION) { - Area::SetGeometry(content_size_.x, content_size_.y, THUMB_WIDTH, content_size_.height); + Area::SetGeometry(content_size_.x, content_size_.y, THUMB_WIDTH.CP(scale), content_size_.height); SetBackgroundColor(nux::color::Transparent); + SetAcceptMouseWheelEvent(true); show_animator_.updated.connect(sigc::mem_fun(this, &BaseWindow::SetOpacity)); show_animator_.finished.connect([this] { @@ -58,6 +59,17 @@ SetOpacity(0.0f); UpdateTexture(); + + scale.changed.connect([this] (double scale) { + UpdateContentGeometry(); + UpdateTexture(); + }); +} + +void VScrollBarOverlayWindow::UpdateContentGeometry() +{ + UpdateMouseOffsetX(); + Area::SetGeometry(content_size_.x + content_offset_x_, content_size_.y, THUMB_WIDTH.CP(scale), content_size_.height); } void VScrollBarOverlayWindow::UpdateGeometry(nux::Geometry const& geo) @@ -67,9 +79,7 @@ content_size_.height != geo.height) { content_size_ = geo; - UpdateMouseOffsetX(); - - Area::SetGeometry(content_size_.x + content_offset_x_, content_size_.y, THUMB_WIDTH, content_size_.height); + UpdateContentGeometry(); } } @@ -91,8 +101,8 @@ { if (new_offset < 0) return 0; - else if (new_offset > content_size_.height - THUMB_HEIGHT) - return content_size_.height - THUMB_HEIGHT; + else if (new_offset > content_size_.height - THUMB_HEIGHT.CP(scale)) + return content_size_.height - THUMB_HEIGHT.CP(scale); return new_offset; } @@ -102,15 +112,15 @@ int monitor = unity::UScreen::GetDefault()->GetMonitorWithMouse(); nux::Geometry const& geo = unity::UScreen::GetDefault()->GetMonitorGeometry(monitor); - if (content_size_.x + THUMB_WIDTH > geo.x + geo.width) - content_offset_x_ = geo.x + geo.width - (content_size_.x + THUMB_WIDTH); + if (content_size_.x + THUMB_WIDTH.CP(scale) > geo.x + geo.width) + content_offset_x_ = geo.x + geo.width - (content_size_.x + THUMB_WIDTH.CP(scale)); else content_offset_x_ = 0; } bool VScrollBarOverlayWindow::IsMouseInsideThumb(int y) const { - nux::Geometry const thumb(0, mouse_offset_y_, THUMB_WIDTH, THUMB_HEIGHT); + nux::Geometry const thumb(0, mouse_offset_y_, THUMB_WIDTH.CP(scale), THUMB_HEIGHT.CP(scale)); return thumb.IsPointInside(0,y); } @@ -121,7 +131,7 @@ int VScrollBarOverlayWindow::GetThumbHeight() const { - return THUMB_HEIGHT; + return THUMB_HEIGHT.CP(scale); } int VScrollBarOverlayWindow::GetThumbOffsetY() const @@ -133,7 +143,7 @@ { return nux::Geometry(content_size_.x + content_offset_x_, content_size_.y + mouse_offset_y_, - THUMB_WIDTH, THUMB_HEIGHT); + THUMB_WIDTH.CP(scale), THUMB_HEIGHT.CP(scale)); } void VScrollBarOverlayWindow::MouseDown() @@ -267,7 +277,7 @@ if (!thumb_texture_) return; - nux::Geometry base(0, mouse_offset_y_, THUMB_WIDTH, THUMB_HEIGHT); + nux::Geometry base(0, mouse_offset_y_, THUMB_WIDTH.CP(scale), THUMB_HEIGHT.CP(scale)); nux::TexCoordXForm texxform; graphics_engine.QRP_1Tex(base.x, @@ -372,7 +382,7 @@ } -void DrawArrow (cairo_t* cr, nux::color::RedGreenBlue const& rgb, double x, double y, double width, double height) +void DrawArrow(cairo_t* cr, nux::color::RedGreenBlue const& rgb, double x, double y, double width, double height) { cairo_save (cr); @@ -417,37 +427,30 @@ { int width = THUMB_WIDTH; int height = THUMB_HEIGHT; - int radius = THUMB_RADIUS; float const aspect = 1.0f; float current_x = 0.0f; float current_y = 0.0f; - cairo_t* cr = NULL; - cairo_pattern_t* pat = NULL; - - nux::color::RedGreenBlue const& bg = nux::color::WhiteSmoke; - nux::color::RedGreenBlue const& bg_selected = nux::color::White; - nux::color::RedGreenBlue const& bg_active = nux::color::Gray; - nux::color::RedGreenBlue const& arrow_color = nux::color::DarkSlateGray; - - nux::color::RedGreenBlue const& bg_arrow_up = ProduceColorShade(bg, 0.86); - nux::color::RedGreenBlue const& bg_arrow_down = ProduceColorShade(bg, 1.1); - nux::color::RedGreenBlue const& bg_shadow = ProduceColorShade(bg, 0.2); - - nux::color::RedGreenBlue const& bg_dark_line = ProduceColorShade(bg, 0.4); - nux::color::RedGreenBlue const& bg_bright_line = ProduceColorShade(bg, 1.2); - - nux::CairoGraphics cairoGraphics(CAIRO_FORMAT_ARGB32, width, height); - cr = cairoGraphics.GetInternalContext(); - - cairo_save(cr); + auto const& bg = nux::color::WhiteSmoke; + auto const& bg_selected = nux::color::White; + auto const& bg_active = nux::color::Gray; + auto const& arrow_color = nux::color::DarkSlateGray; + + auto const& bg_arrow_up = ProduceColorShade(bg, 0.86); + auto const& bg_arrow_down = ProduceColorShade(bg, 1.1); + auto const& bg_shadow = ProduceColorShade(bg, 0.2); + + auto const& bg_dark_line = ProduceColorShade(bg, 0.4); + auto const& bg_bright_line = ProduceColorShade(bg, 1.2); + + nux::CairoGraphics cairoGraphics(CAIRO_FORMAT_ARGB32, THUMB_WIDTH.CP(scale), THUMB_HEIGHT.CP(scale)); + cairo_t* cr = cairoGraphics.GetInternalContext(); + cairo_surface_set_device_scale(cairo_get_target(cr), scale, scale); cairo_set_operator(cr, CAIRO_OPERATOR_CLEAR); cairo_paint(cr); - cairo_save(cr); - cairo_translate (cr, 0.5, 0.5); width--; height--; @@ -455,15 +458,14 @@ cairo_set_line_width (cr, 1.0); cairo_set_operator(cr, CAIRO_OPERATOR_OVER); - cairo_save(cr); // Draw backgound SetSourceRGB(cr, bg, 1.0); - cairoGraphics.DrawRoundedRectangle(cr, aspect, current_x, current_y, radius, width, height); + cairoGraphics.DrawRoundedRectangle(cr, aspect, current_x, current_y, THUMB_RADIUS, width, height); cairo_fill_preserve(cr); // Draw shaded background - pat = cairo_pattern_create_linear(0, 0, 0, height); + cairo_pattern_t* pat = cairo_pattern_create_linear(0, 0, 0, height); PatternAddRGBStop(pat, bg_arrow_up, 0.0, 0.8); PatternAddRGBStop(pat, bg_arrow_down, 1.0, 0.8); @@ -502,7 +504,7 @@ current_x += 0.5; current_y += 0.5; - cairoGraphics.DrawRoundedRectangle(cr, aspect, current_x, current_y, radius - 1, width - 1, height - 1); + cairoGraphics.DrawRoundedRectangle(cr, aspect, current_x, current_y, THUMB_RADIUS - 1, width - 1, height - 1); if (HasState(ThumbState::INSIDE_SLIDER)) SetSourceRGB(cr, bg_selected, 1.0); @@ -545,12 +547,12 @@ current_x += 0.5; current_y += 0.5; - cairoGraphics.DrawRoundedRectangle(cr, aspect, current_x, current_y, radius, width- 2, height - 2); + cairoGraphics.DrawRoundedRectangle(cr, aspect, current_x, current_y, THUMB_RADIUS, width- 2, height - 2); cairo_stroke(cr); current_x += 1.0; current_y += 1.0; - cairoGraphics.DrawRoundedRectangle(cr, aspect, current_x, current_y, radius - 1, width - 4, height- 4); + cairoGraphics.DrawRoundedRectangle(cr, aspect, current_x, current_y, THUMB_RADIUS - 1, width - 4, height- 4); SetSourceRGB(cr, bg_bright_line, 0.6); cairo_stroke(cr); @@ -558,7 +560,7 @@ DrawLineSeperator(cr, bg_dark_line, bg_bright_line, width, height); DrawBothArrows(cr, arrow_color, width, height); - thumb_texture_.Adopt(unity::texture_from_cairo_graphics(cairoGraphics)); + thumb_texture_ = texture_ptr_from_cairo_graphics(cairoGraphics); QueueDraw(); } diff -Nru unity-7.1.2+14.04.20140303/unity-shared/VScrollBarOverlayWindow.h unity-7.2.4+14.04.20141217/unity-shared/VScrollBarOverlayWindow.h --- unity-7.1.2+14.04.20140303/unity-shared/VScrollBarOverlayWindow.h 2014-03-03 16:47:14.000000000 +0000 +++ unity-7.2.4+14.04.20141217/unity-shared/VScrollBarOverlayWindow.h 2014-12-17 20:51:37.000000000 +0000 @@ -32,7 +32,8 @@ { public: VScrollBarOverlayWindow(nux::Geometry const& geo); - virtual ~VScrollBarOverlayWindow() {} + + nux::Property scale; void UpdateGeometry(nux::Geometry const& geo); void SetThumbOffsetY(int y); @@ -85,6 +86,7 @@ void MouseDragging(); void UpdateMouseOffsetX(); + void UpdateContentGeometry(); int GetValidOffsetYValue(int y) const; void ShouldShow(); diff -Nru unity-7.1.2+14.04.20140303/unity-shared/WindowManager.h unity-7.2.4+14.04.20141217/unity-shared/WindowManager.h --- unity-7.1.2+14.04.20140303/unity-shared/WindowManager.h 2014-03-03 16:47:14.000000000 +0000 +++ unity-7.2.4+14.04.20141217/unity-shared/WindowManager.h 2014-12-17 20:51:54.000000000 +0000 @@ -89,6 +89,7 @@ virtual bool IsWindowMapped(Window window_id) const = 0; virtual bool IsWindowVisible(Window window_id) const = 0; virtual bool IsWindowOnTop(Window window_id) const = 0; + virtual bool IsWindowShaded(Window window_id) const = 0; virtual bool IsWindowClosable(Window window_id) const = 0; virtual bool IsWindowMinimized(Window window_id) const = 0; virtual bool IsWindowMinimizable(Window window_id) const = 0; @@ -100,10 +101,14 @@ virtual void ShowActionMenu(Time, Window, unsigned button, nux::Point const&) = 0; virtual void Maximize(Window window_id) = 0; + virtual void VerticallyMaximize(Window window_id) = 0; + virtual void HorizontallyMaximize(Window window_id) = 0; virtual void Restore(Window window_id) = 0; virtual void RestoreAt(Window window_id, int x, int y) = 0; virtual void Minimize(Window window_id) = 0; virtual void UnMinimize(Window window_id) = 0; + virtual void Shade(Window window_id) = 0; + virtual void UnShade(Window window_id) = 0; virtual void Close(Window window_id) = 0; virtual void Activate(Window window_id) = 0; @@ -164,8 +169,12 @@ virtual std::string GetStringProperty(Window, Atom) const = 0; virtual std::vector GetCardinalProperty(Window, Atom) const = 0; + virtual void UnmapAllNoNuxWindowsSync() = 0; + + // Nux Modifiers, Nux Keycode (= X11 KeySym) nux::Property> close_window_key; + nux::Property> activate_indicators_key; nux::Property average_color; // Signals @@ -183,6 +192,8 @@ sigc::signal window_moved; sigc::signal window_focus_changed; + sigc::signal show_desktop_changed; + sigc::signal initiate_spread; sigc::signal terminate_spread; diff -Nru unity-7.1.2+14.04.20140303/unity-shared/XWindowManager.cpp unity-7.2.4+14.04.20141217/unity-shared/XWindowManager.cpp --- unity-7.1.2+14.04.20140303/unity-shared/XWindowManager.cpp 2014-03-03 16:47:14.000000000 +0000 +++ unity-7.2.4+14.04.20141217/unity-shared/XWindowManager.cpp 2014-12-17 20:51:54.000000000 +0000 @@ -83,7 +83,7 @@ { LOG_ERROR(logger) << "Impossible to get the property " << gdk_x11_get_xatom_name(atom) << " for window " << window_id << ": invalid string type: " - << gdk_x11_get_xatom_name(Atoms::utf8String); + << gdk_x11_get_xatom_name(type); return std::string(); } diff -Nru unity-7.1.2+14.04.20140303/unity-standalone/StandaloneUnity.cpp unity-7.2.4+14.04.20141217/unity-standalone/StandaloneUnity.cpp --- unity-7.1.2+14.04.20140303/unity-standalone/StandaloneUnity.cpp 2014-03-03 16:47:14.000000000 +0000 +++ unity-7.2.4+14.04.20141217/unity-standalone/StandaloneUnity.cpp 2014-12-17 20:51:37.000000000 +0000 @@ -112,9 +112,6 @@ launcher_controller = std::make_shared(xdnd_manager, edge_barriers); panel_controller = std::make_shared(menu_manager, edge_barriers); dash_controller = std::make_shared(); - - dash_controller->launcher_width = launcher_controller->launcher().GetAbsoluteWidth() - 1; - panel_controller->launcher_width = launcher_controller->launcher().GetAbsoluteWidth() - 1; } void UnityStandalone::InitWindowThread(nux::NThread* thread, void* InitData) @@ -146,7 +143,6 @@ auto edge_barriers = std::make_shared(); launcher_controller = std::make_shared(xdnd_manager, edge_barriers); dash_controller = std::make_shared(); - dash_controller->launcher_width = launcher_controller->launcher().GetAbsoluteWidth() - 1; UBusManager().SendMessage(UBUS_DASH_EXTERNAL_ACTIVATION, nullptr); }