diff options
| author | Andrea Azzarone <azzaronea@gmail.com> | 2012-08-13 14:56:50 +0200 |
|---|---|---|
| committer | Andrea Azzarone <azzaronea@gmail.com> | 2012-08-13 14:56:50 +0200 |
| commit | ea0765eb94bc92a722ce4bad6d3b7286f2809536 (patch) | |
| tree | d6673e8b490218fb47dd2113bf0e48c67dfc7cb7 | |
| parent | 7a8e2ca94508f8c95fa791cf2a922976e2e2fbea (diff) | |
| parent | e9142ea6bee337e5e618914c535812d1814d3226 (diff) | |
Merge trunk.
(bzr r2540.5.5)
37 files changed, 1973 insertions, 370 deletions
@@ -37,6 +37,7 @@ Didier Roche <didrocks@ubuntu.com> foxoman <foxoman.u@gmail.com> Gabor Kelemen <kelemeng@ubuntu.com> + Gary Lasker <gary.lasker@canonical.com> Gordon Allott <gord.allott@canonical.com> Henri De Veene <henri.deveene@gmail.com> Jani Monoses <jani.monoses@canonical.com> @@ -55,6 +56,7 @@ Jay Taoko <jay.taoko@canonical.com>, Mirco Müller <mirco.mueller@ubuntu.com> Jay Taoko <jay.taoko@canonical.com>, Robert Carr <racarr@canonical.com> Jeremy Bicha <jbicha@ubuntu.com> + jokerdino@bvm128.zdom.org Kevin DuBois <kevin.dubois@canonical.com> Koichi Akabe <vbkaisetsu@gmail.com> Lars Uebernickel <lars.uebernickel@canonical.com> @@ -75,7 +77,9 @@ Marco Trevisan (Treviño) <mail@3v1n0.net>, Thomi Richards <thomi.richards@canonical.com> Marius Gedminas <marius@gedmin.as> Martin Albisetti <argentina@gmail.com> + Martin Mrazik <martin.mrazik@canonical.com> Martin Mrazik <mrazik@gmail.com> + MC Return <mc.return@gmx.net> Michael Rawson <michaelrawson76@gmail.com> Michael Terry <michael.terry@canonical.com> Michael Terry <mike@mterry.name> @@ -91,6 +95,7 @@ Paolo Rotolo <paolorotolo@ubuntu-it.org> Paul Sladen <sladen@canonical.com> Paul Sladen <sladen@canonical.com>, Andrea Cimitan <andrea.cimitan@canonical.com> + Pawel Stolowski <pawel.stolowski@canonical.com> Rafał Cieślak <rafalcieslak256@gmail.com> Ricardo Mendoza <ricardo.mendoza@canonical.com> Robert Carr <racarr@canonical.com> diff --git a/CMakeLists.txt b/CMakeLists.txt index bd00a6737..ef345f187 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -8,7 +8,7 @@ include (cmake/Documentation.cmake) # set (PROJECT_NAME "unity") set (UNITY_MAJOR 6) -set (UNITY_MINOR 0) +set (UNITY_MINOR 2) set (UNITY_MICRO 0) set (UNITY_VERSION "${UNITY_MAJOR}.${UNITY_MINOR}.${UNITY_MICRO}") set (UNITY_API_VERSION "6.0") @@ -134,7 +134,7 @@ endif (DISABLE_MAINTAINER_CFLAGS) # Compiz Plugins # -set (UNITY_PLUGIN_DEPS "compiz;nux-3.0>=3.0.0;libbamf3;dee-1.0;gio-2.0;gio-unix-2.0;dbusmenu-glib-0.4;dbus-glib-1;x11;libstartup-notification-1.0;gthread-2.0;indicator3-0.4>=0.4.90;atk;unity-misc>=0.4.0;gtk+-3.0>=3.1;sigc++-2.0;json-glib-1.0;libnotify;xfixes;unity-protocol-private>=5.93.1") +set (UNITY_PLUGIN_DEPS "compiz;nux-3.0>=3.0.0;libbamf3;dee-1.0;gio-2.0;gio-unix-2.0;dbusmenu-glib-0.4;dbus-glib-1;x11;libstartup-notification-1.0;gthread-2.0;indicator3-0.4>=0.4.90;atk;unity-misc>=0.4.0;gtk+-3.0>=3.1;sigc++-2.0;json-glib-1.0;libnotify;xfixes;unity-protocol-private>=5.93.1;libgeis") # FIXME: unity-protocol-private shouldn't be there, but building of unityshell is just broken set (UNITY_PROTOCOL_PRIVATE_DEPS "unity-protocol-private>=5.93.1") @@ -1,3 +1,1508 @@ +2012-08-09 Brandon Schaefer <brandontschaefer@gmail.com> + + Calculator and Mahjongg can only have 1 instances now; this breaks AP tests. Character map is now used when you need more then 1 instance.. Fixes: . Approved by Łukasz Zemczak. + +2012-08-09 Brandon Schaefer <brandontschaefer@gmail.com> + + * Fixs panel test + +2012-08-08 Brandon Schaefer <brandontschaefer@gmail.com> + + * You cannot have 2 gcalctools open anymore. Switched to Character map + +2012-08-09 Thomi Richards <thomi.richards@canonical.com> + + Use the new clipboard emulator in autopilot. Fixes some hanging tests.. Fixes: . Approved by Brandon Schaefer. + +2012-08-03 Thomi Richards <thomi.richards@canonical.com> + + Don't use the gtk Clipboard class. Instead, use the new clipboard emulator in autopilot. + +2012-08-09 Andrea Azzarone <azzaronea@gmail.com> + + Cherrypick rev 2539 from lp:~3v1n0/unity/launcher-icon-construction-type.. Fixes: . Approved by Łukasz Zemczak. + +2012-08-09 Andrea Azzarone <azzaronea@gmail.com> + + Cherrypick rev 2539 from lp:~3v1n0/unity/launcher-icon-construction-type. Thank you Marco. + +2012-08-09 Sebastien Bacher <seb128@ubuntu.com> + + Update the POTFILE.in list of sources. Fixes: . Approved by Łukasz Zemczak. + +2012-08-09 Sebastien Bacher <seb128@ubuntu.com> + + Update sources in POTFILES.in + +2012-08-03 Andrea Azzarone <azzaronea@gmail.com> + + Revert rev 2525. Fixes: . Approved by Michal Hruby. + +2012-08-03 Andrea Azzarone <azzaronea@gmail.com> + + Merge trunk. + +2012-08-03 Andrea Azzarone <azzaronea@gmail.com> + + Revert rev 2525. + +2012-08-03 Marco Trevisan (Treviño) <mail@3v1n0.net> + + FavoriteStoreGSettings: remove unneeded methods, use glib::Signal, refactor tests to use memory backend. Fixes: . Approved by Brandon Schaefer. + +2012-08-01 Marco Trevisan (Treviño) <mail@3v1n0.net> + + FavoriteStoreGSettings: use constant values for settings name and keys + +2012-08-01 Marco Trevisan (Treviño) <mail@3v1n0.net> + + FavoriteStoreGSettings: remove unneeded methods, use glib::Signal + +2012-08-01 Marco Trevisan (Treviño) <mail@3v1n0.net> + + test_favorite_store_gsettings: refactored to use gsettings memory backend + + Plus remove unneeded timeouts + +2012-08-03 Sebastien Bacher <seb128@ubuntu.com> + + Don't specify a specific destination for the dbus signals. Fixes: https://bugs.launchpad.net/bugs/1014850. Approved by Michal Hruby. + +2012-08-02 Sebastien Bacher <seb128@ubuntu.com> + + Don't specify a specific destination for the dbus signals, that + creates issues with the new dbus eavedropping behaviour, + thanks Neil J. Patel for the fix! + +2012-08-03 Łukasz 'sil2100' Zemczak <lukasz.zemczak@canonical.com> + + Add the libunity private directory to unityshell.so and libunity-core-6.0.so RPATHs, so that they can easily find the libunity-protocol-private.so library on load.. Fixes: . Approved by Michal Hruby. + +2012-08-03 Łukasz 'sil2100' Zemczak <lukasz.zemczak@canonical.com> + + As proposed by mhr3, we just re-add unity-protocol-private to the main deps + +2012-08-03 Łukasz 'sil2100' Zemczak <lukasz.zemczak@canonical.com> + + Fixed some build issues to incomplete merges and invalid thought process + +2012-08-03 Łukasz 'sil2100' Zemczak <lukasz.zemczak@canonical.com> + + Merge in latest trunk changes + +2012-08-03 Łukasz 'sil2100' Zemczak <lukasz.zemczak@canonical.com> + + Also added the same RPATH for unity-core. + +2012-08-02 Łukasz 'sil2100' Zemczak <lukasz.zemczak@canonical.com> + + Add the libunity private directory to unityshell.so RPATH, so that it can easily find the libunity-protocol-private.so library on load. + +2012-08-03 Marco Trevisan (Treviño) <mail@3v1n0.net> + + unityshell: fix the nvidia crash on glDrawArrays disabling/enabling the client state on nuxPrologue/Epilogue (LP: #982626) (LP: #1031554). Fixes: https://bugs.launchpad.net/bugs/982626, https://bugs.launchpad.net/bugs/1031554. Approved by Daniel van Vugt, Sam Spilsbury. + +2012-08-01 Marco Trevisan (Treviño) <mail@3v1n0.net> + + unityshell: fix the nvidia crash on glDrawArrays disabling/enabling the client state on nuxPrologue/Epilogue + +2012-08-03 jokerdino@bvm128.zdom.org + + Add keyboard shortcut for the video lens in the shortcut overlay.. Fixes: https://bugs.launchpad.net/bugs/937334. Approved by Łukasz Zemczak. + +2012-07-16 jokerdino@bvm128.zdom.org + + Add shortcut for video lens + +2012-08-03 MC Return <mc.return@gmx.net> + + Optimized performance and style following suggestions reported by cppcheck: + + 1. Reduced the scope of various variables. + + 2. Used prefix ++ operators for non-primitive types, because those can be more efficient than post-increment. Post-increment usually keeps a copy of the previous value, adds extra code and is slower.. Fixes: . Approved by Brandon Schaefer, Marco Trevisan (Treviño). + +2012-07-30 MC Return <mc.return@gmx.net> + + Reduced the scope of the variable 'TextureObjectLocation' in IconRenderer.cpp + +2012-07-30 MC Return <mc.return@gmx.net> + + Reduced the scope of the variable 'radius' in DashStyle.cpp + +2012-07-30 MC Return <mc.return@gmx.net> + + Reduced the scope of the variable 'closest_diff' in BGHash.cpp + +2012-07-30 MC Return <mc.return@gmx.net> + + Reduced the scope of the variable 'useFbo' in unityshell.cpp + +2012-07-30 MC Return <mc.return@gmx.net> + + Reduced the scope of the variable 'key_code' in unityshell.cpp + +2012-07-30 MC Return <mc.return@gmx.net> + + Reduced the scope of the variables 'hdirection' and 'vdirection' in unitydialog.cpp + +2012-07-30 MC Return <mc.return@gmx.net> + + Reduced the scope of the variable 'fading_pixels' in PanelMenuView.cpp + +2012-07-30 MC Return <mc.return@gmx.net> + + Reduced the scope of the variable 'text_width' in PanelIndicatorEntryView.cpp + +2012-07-30 MC Return <mc.return@gmx.net> + + Fixed possible performance issue in PluginAdapterCompiz.cpp by replacement of postfix ++ operator with prefix one + +2012-07-30 MC Return <mc.return@gmx.net> + + Fixed possible performance issue in IconRenderer.cpp by replacement of postfix ++ operator with prefix one + +2012-07-30 MC Return <mc.return@gmx.net> + + Fixed possible performance issue in unityshell.cpp by replacement of postfix ++ operator with prefix one + +2012-07-30 MC Return <mc.return@gmx.net> + + Fixed possible performance issue in unity-switcher-accessible.cpp by replacement of postfix ++ operator with prefix one + +2012-07-30 MC Return <mc.return@gmx.net> + + Fixed possible performance issue in unity-launcher-accessible.cpp by replacement of postfix ++ operator with prefix one + +2012-07-30 MC Return <mc.return@gmx.net> + + Fixed possible performance issue in nux-layout-accessible.cpp by replacement of postfix ++ operator with prefix one + +2012-07-30 MC Return <mc.return@gmx.net> + + Fixed possible performance issue in unitydialog.cpp by replacement of postfix ++ operator with prefix one + +2012-07-30 MC Return <mc.return@gmx.net> + + Fixed possible performance issue in unity-mt-grab-handles.cpp by replacement of postfix ++ operator with prefix one + +2012-07-30 MC Return <mc.return@gmx.net> + + Fixed possible performance issues in LauncherModel.cpp by replacement of postfix ++ operators with prefix ones + +2012-07-30 MC Return <mc.return@gmx.net> + + Fixed possible performance issue in LauncherController.cpp by replacement of postfix ++ operator with prefix one + +2012-07-30 MC Return <mc.return@gmx.net> + + Fixed possible performance issues in Launcher.cpp by replacement of postfix ++ operators with prefix ones + +2012-07-30 MC Return <mc.return@gmx.net> + + Fixed possible performance issue in ResultViewGrid.cpp by replacement of postfix ++ operator with prefix one + +2012-07-30 MC Return <mc.return@gmx.net> + + Fixed possible performance issue in ResultView.cpp by replacement of postfix ++ operator with prefix one + +2012-07-30 MC Return <mc.return@gmx.net> + + Fixed possible performance issues in HomeLens.cpp by replacement of postfix ++ operators with prefix ones + +2012-08-03 Andrea Azzarone <azzaronea@gmail.com> + + Don't set mouse position on mouse leaving.. Fixes: https://bugs.launchpad.net/bugs/980942. Approved by Brandon Schaefer. + +2012-08-02 Andrea Azzarone <azzaronea@gmail.com> + + Fix bug 980942. + +2012-08-03 Andrea Azzarone <azzaronea@gmail.com> + + Remove gconf dep in panel::Style.. Fixes: . Approved by Marco Trevisan (Treviño). + +2012-08-01 Andrea Azzarone <azzaronea@gmail.com> + + Use glib::Signal. + +2012-08-01 Andrea Azzarone <azzaronea@gmail.com> + + Fix indent bug. + +2012-08-01 Andrea Azzarone <azzaronea@gmail.com> + + Use g_setenv("GSETTINGS_BACKEND", "memory", TRUE); + +2012-08-01 Andrea Azzarone <azzaronea@gmail.com> + + Minor changes. + +2012-08-01 Andrea Azzarone <azzaronea@gmail.com> + + Add unit test. + +2012-08-01 Andrea Azzarone <azzaronea@gmail.com> + + Remove check. This key is installed on precise too. + +2012-08-01 Andrea Azzarone <azzaronea@gmail.com> + + Don't use glib::Signal for "changed" signal. + +2012-07-31 Andrea Azzarone <azzaronea@gmail.com> + + Remove gconf dep in panel::Style. + +2012-08-03 Daniel d'Andrada <daniel.dandrada@canonical.com> + + use the gestures support from nux instead of talking to libgeis directly.. Fixes: . Approved by . + +2012-07-27 Daniel d'Andrada <daniel.dandrada@canonical.com> + + make tests compilation succeed even if compiz lib is at a non-standard dir + +2012-07-27 Daniel d'Andrada <daniel.dandrada@canonical.com> + + Use gestures support from Nux and adapt code for regular gesture rules + + Remove GeisAdapter as we are getting gesture events from Nux instead. + + Then modify code to handle geisv2-style gestures. They require + acceptance/rejection and enable multiple simultaneous gestures + +2012-08-02 Brandon Schaefer <brandontschaefer@gmail.com> + + The switcher causes a crash if the current desktop has zero results. (Can only happen if you disable Show Desktop Icon). Fixes: . Approved by Marco Trevisan (Treviño). + +2012-08-01 Brandon Schaefer <brandontschaefer@gmail.com> + + * added and fixed test + +2012-08-01 Brandon Schaefer <brandontschaefer@gmail.com> + + * fixes a crash if zero results are there in a current workspace + +2012-07-30 Brandon Schaefer <brandontschaefer@gmail.com> + + Add the option to disable the ShowDesktop icon in the switcher in CCSM.. Fixes: . Approved by Marco Trevisan (Treviño). + +2012-07-30 Brandon Schaefer <brandontschaefer@gmail.com> + + * Adds a unit test + +2012-07-27 Brandon Schaefer <brandontschaefer@gmail.com> + + * Removed extra space + +2012-07-27 Brandon Schaefer <brandontschaefer@gmail.com> + + *Merged trunk. Fixed an AP test + +2012-07-26 Brandon Schaefer <brandontschaefer@gmail.com> + + * Fixed AP test, as well as the switcher code + +2012-07-26 Brandon Schaefer <brandontschaefer@gmail.com> + + * Now the switcher ap test will run all test with and with out the Show Desktop icon. + +2012-07-26 Brandon Schaefer <brandontschaefer@gmail.com> + + * Adds the option to disable the ShowDesktop icon in the switcher + +2012-07-30 Andrea Azzarone <azzaronea@gmail.com> + + Avoid extra calls to GetGeometry and GetAbsoluteGeometry.. Fixes: . Approved by Marco Trevisan (Treviño). + +2012-07-26 Andrea Azzarone <azzaronea@gmail.com> + + Avoid calls to GetGeometry and GetAbsoluteGeometry. + +2012-07-29 Andrea Azzarone <azzaronea@gmail.com> + + Fix typo in QuicklistView::RecvItemMouseDrag. It was the cause of the bug #1027955.. Fixes: https://bugs.launchpad.net/bugs/1027955. Approved by Marco Trevisan (Treviño). + +2012-07-25 Andrea Azzarone <azzaronea@gmail.com> + + Fix typo. + +2012-07-25 Andrea Azzarone <azzaronea@gmail.com> + + Fix bug 1027955. + +2012-07-27 Pawel Stolowski <pawel.stolowski@canonical.com> + + Added image_source_uri property to Preview base class. Fixes: . Approved by Michal Hruby. + +2012-07-26 Pawel Stolowski <pawel.stolowski@canonical.com> + + Previews: renamed image_source to image_source_uri in unity protocol lib. + +2012-07-26 Pawel Stolowski <pawel.stolowski@canonical.com> + + Require unity-protocol-private 5.93.1, not 5.94.0. + +2012-07-26 Pawel Stolowski <pawel.stolowski@canonical.com> + + Previews: renamed thumbnail to image in protocol lib. + +2012-07-26 Pawel Stolowski <pawel.stolowski@canonical.com> + + Bumped required verison of unity-protocol-private. + +2012-07-26 Pawel Stolowski <pawel.stolowski@canonical.com> + + Previews: renamed image_source preview property to image_source_uri. + +2012-07-26 Pawel Stolowski <pawel.stolowski@canonical.com> + + Previews - added image_source preview property (wraps thumbnail_source from the libunity protocol). + +2012-07-27 Andrea Azzarone <azzaronea@gmail.com> + + Remove "strut hack" in launcher.cpp. Fixes: https://bugs.launchpad.net/bugs/1024113. Approved by Marco Trevisan (Treviño), jenkins. + +2012-07-27 Andrea Azzarone <azzaronea@gmail.com> + + Minor change. + +2012-07-19 Andrea Azzarone <azzaronea@gmail.com> + + Fix typo. + +2012-07-19 Andrea Azzarone <azzaronea@gmail.com> + + Add manual test. + +2012-07-19 Andrea Azzarone <azzaronea@gmail.com> + + Merge trunk. + +2012-07-13 Andrea Azzarone <azzaronea@gmail.com> + + Remove strut hack. It seems to cause bug 1024113. + +2012-07-26 Brandon Schaefer <brandontschaefer@gmail.com> + + The switcher in detail mode will now focus the last active window, instead of the current one. If the current focus window activated the switcher.. Fixes: https://bugs.launchpad.net/bugs/1029215. Approved by Christopher Lee. + +2012-07-25 Brandon Schaefer <brandontschaefer@gmail.com> + + * Fixes detail mode not selecting the last active window. + * This also fixes the problem with Detail mode swaping icons. + +2012-07-26 Martin Mrazik <martin.mrazik@canonical.com> + + Fixed few manual test-cases which were not consistent with the TEST_TEMPLATE.txt and other manual test-cases.. Fixes: . Approved by Thomi Richards. + +2012-07-25 Martin Mrazik <martin.mrazik@canonical.com> + + Fixed occurence of Expected Result_s_ + +2012-07-25 Martin Mrazik <martin.mrazik@canonical.com> + + Changing few manual tests to be consistent with the TEST_TEMPLATE.txt + +2012-07-26 Thomi Richards <thomi.richards@canonical.com> + + Make the autopilot unity logging functions more stable when unity crashes & restarts.. Fixes: . Approved by Christopher Lee. + +2012-07-27 Thomi Richards <thomi.richards@canonical.com> + + Don't cache the unity debug logging dbus interface, so if unity crashes and comes back we can continue the test run. + +2012-07-26 Marco Trevisan (Treviño) <mail@3v1n0.net> + + LauncherController: Rewritten EnsureLaunchers() added tests, fix a crash caused by invalid barrier subscriptions.. Fixes: https://bugs.launchpad.net/bugs/1020075. Approved by Andrea Azzarone. + +2012-07-26 Marco Trevisan (Treviño) <mail@3v1n0.net> + + test_launcher_controller: initialize also GeisAdapter + +2012-07-26 Marco Trevisan (Treviño) <mail@3v1n0.net> + + EdgeBarrierController: use auto const& for type + +2012-07-26 Marco Trevisan (Treviño) <mail@3v1n0.net> + + Merging with trunk + +2012-07-26 Marco Trevisan (Treviño) <mail@3v1n0.net> + + test_launcher_controller: more barrier subscriptions tests + +2012-07-26 Marco Trevisan (Treviño) <mail@3v1n0.net> + + test_launcher_controller: check the barrier controller subscriptions + +2012-07-26 Marco Trevisan (Treviño) <mail@3v1n0.net> + + LauncherController: make TestLauncherController friend of it + +2012-07-26 Marco Trevisan (Treviño) <mail@3v1n0.net> + + EdgeBarrierController: make GetSubscriber public + +2012-07-25 Marco Trevisan (Treviño) <mail@3v1n0.net> + + LauncherController: move launcher::Controller::Impl definition in LauncherControllerPrivate + + So that we can test it! + +2012-07-24 Marco Trevisan (Treviño) <mail@3v1n0.net> + + test_edge_barrier_controller: add subscribing tests + +2012-07-24 Marco Trevisan (Treviño) <mail@3v1n0.net> + + test_edge_barrier_controller: Add test for GetSubscriber + +2012-07-24 Marco Trevisan (Treviño) <mail@3v1n0.net> + + EdgeBarrierController: fix the monitor/size comparisons + + This fixes a crash, plus add GetSubscriber protected member + +2012-07-24 Marco Trevisan (Treviño) <mail@3v1n0.net> + + test_edge_barrier_controller: check the breaking events with invalid monitor values + +2012-07-24 Marco Trevisan (Treviño) <mail@3v1n0.net> + + test_uscreen_mock.h: add MockUscreen and use it in tests + +2012-07-24 Marco Trevisan (Treviño) <mail@3v1n0.net> + + LauncherController: use only one cycle to ensure launchers, and correctly unsubscribe barriers + +2012-07-24 Marco Trevisan (Treviño) <mail@3v1n0.net> + + test_launcher_controller: test removal of internal monitors + +2012-07-24 Marco Trevisan (Treviño) <mail@3v1n0.net> + + test_launcher_controller: add switching tests + +2012-07-24 Marco Trevisan (Treviño) <mail@3v1n0.net> + + test_launcher_controller: added multimonitor launchers tests + +2012-07-24 Marco Trevisan (Treviño) <mail@3v1n0.net> + + EdgeBarrierController: be safer, always resize the barrier list on setup barriers + +2012-07-24 Marco Trevisan (Treviño) <mail@3v1n0.net> + + UScreen: make the default screen a static member, so that we can mock it + +2012-07-24 Marco Trevisan (Treviño) <mail@3v1n0.net> + + test_launcher_controller: added basic LauncherController test + +2012-07-24 Bilal Akhtar <bilalakhtar@ubuntu.com> + + SoftwareCenterLauncherIcon: avoid the "Waiting to Install" tooltip to stay after installation + + Be consistent with auto-hiding launcher.. Fixes: https://bugs.launchpad.net/bugs/925014. Approved by Brandon Schaefer, Tim Penhey, Marco Trevisan (Treviño). + +2012-06-06 Bilal Akhtar <bilalakhtar@ubuntu.com> + + Fix string{,.h} include, thanks Tim + +2012-06-05 Bilal Akhtar <bilalakhtar@ubuntu.com> + + If the aptdaemon transaction ID isn't supplied, then don't change tooltip to "Waiting to install" (Bug #925014) + +2012-07-24 Bilal Akhtar <bilalakhtar@ubuntu.com> + + The launcher will auto hide when installing a program from the software center now.. Fixes: https://bugs.launchpad.net/bugs/1002440. Approved by Brandon Schaefer, Marco Trevisan (Treviño). + +2012-06-17 Bilal Akhtar <bilalakhtar@ubuntu.com> + + Fix string comparison with SC agent, thanks Tim + +2012-06-13 Bilal Akhtar <bilalakhtar@ubuntu.com> + + Merge from trunk + +2012-06-13 Bilal Akhtar <bilalakhtar@ubuntu.com> + + Semicolon missed, ah well, blame Python. + +2012-06-13 Bilal Akhtar <bilalakhtar@ubuntu.com> + + Return early if the desktop file wasn't specified, or is set to SC agent + +2012-06-09 Bilal Akhtar <bilalakhtar@ubuntu.com> + + Unhide launcher only when the animation is feasable (with a desktop file and all) LP: #1002440 + +2012-07-24 Gary Lasker <gary.lasker@canonical.com> + + manual-tests/SoftwareCenter.txt: added tests for Ubuntu Software Center/Unity launcher integration feature. Fixes: . Approved by Brandon Schaefer, jenkins. + +2012-07-22 Gary Lasker <gary.lasker@canonical.com> + + fix typo + +2012-07-21 Gary Lasker <gary.lasker@canonical.com> + + clarify tests per Brandon Schaefer's recommendations in the corresponding Unity 5.0 branch MR, https://code.launchpad.net/~gary-lasker/unity/software-center-launcher-integration-tests-for-5.0/+merge/114241 + +2012-07-21 Gary Lasker <gary.lasker@canonical.com> + + merge trunk + +2012-06-25 Gary Lasker <gary.lasker@canonical.com> + + more test details + +2012-06-25 Gary Lasker <gary.lasker@canonical.com> + + additional tests to round out the suite, these will thoroughly test all of the bug fixes for Unity branch https://code.launchpad.net/~bilalakhtar/unity/5.0series-sru-software-center-integration-fixes/+merge/110214 and the corresponding Software Center branch https://code.launchpad.net/~gary-lasker/software-center/unity-launcher-integration-fixes + +2012-06-25 Gary Lasker <gary.lasker@canonical.com> + + start adding a suite of manual tests for the Ubuntu Software Center Unity launcher integration feature + +2012-07-24 Marco Trevisan (Treviño) <mail@3v1n0.net> + + BarrierEdgeController, PointerBarrier: release the sticky edge after that the user has broken it for configurable ms. Fixes: https://bugs.launchpad.net/bugs/1020058. Approved by jenkins, Brandon Schaefer. + +2012-07-20 Marco Trevisan (Treviño) <mail@3v1n0.net> + + EdgeBarrierController: disable the lambda based proxy version + + Nux does not support that yet + +2012-07-20 Marco Trevisan (Treviño) <mail@3v1n0.net> + + test_edge_barrier_controller: add test for sticky edge property + +2012-07-20 Marco Trevisan (Treviño) <mail@3v1n0.net> + + EdgeBarrierController: make sticky_edges property a proxy to launcher options + +2012-07-20 Marco Trevisan (Treviño) <mail@3v1n0.net> + + unityshell.xml.in: changed the short name of the setting + +2012-07-20 Marco Trevisan (Treviño) <mail@3v1n0.net> + + merging with trunk + +2012-07-20 Marco Trevisan (Treviño) <mail@3v1n0.net> + + test_edge_barrier_controller: added tests for temporary released barrier + +2012-07-19 Marco Trevisan (Treviño) <mail@3v1n0.net> + + test_edge_barrier_controller: no need to explictly set an unhandling subscriber + +2012-07-19 Marco Trevisan (Treviño) <mail@3v1n0.net> + + test_edge_barrier_controller: add MakeBarrierEvent function to generate events + +2012-07-19 Marco Trevisan (Treviño) <mail@3v1n0.net> + + test_edge_barrier_controller: add tests to check the event Processing + +2012-07-19 Marco Trevisan (Treviño) <mail@3v1n0.net> + + EdgeBarrierController: add ProcessBarrierEvent as protected member + + So we can use it for testing + +2012-07-19 Marco Trevisan (Treviño) <mail@3v1n0.net> + + test_edge_barrier_controller: added skeleton test + +2012-07-19 Marco Trevisan (Treviño) <mail@3v1n0.net> + + EdgeBarrierController: use make_shared, avoid unneeded namespaces + +2012-07-19 Marco Trevisan (Treviño) <mail@3v1n0.net> + + test_pointer_barrier.cpp can be xless + +2012-07-19 Marco Trevisan (Treviño) <mail@3v1n0.net> + + test_pointer_barrier: added tests for PointerBarrier + +2012-07-19 Marco Trevisan (Treviño) <mail@3v1n0.net> + + PointerBarrier: make pointer barrier more testable + +2012-07-19 Marco Trevisan (Treviño) <mail@3v1n0.net> + + PointerBarrier: use reinterpret cast + +2012-07-19 Marco Trevisan (Treviño) <mail@3v1n0.net> + + unityshell: add option to set the launcher sticky edge disabled duration + +2012-07-19 Marco Trevisan (Treviño) <mail@3v1n0.net> + + EdgeBarrierController: use the launcher option to set the disable timeout duration + +2012-07-19 Marco Trevisan (Treviño) <mail@3v1n0.net> + + LauncherOptions: add edge_passed_disabled_time option + +2012-07-19 Marco Trevisan (Treviño) <mail@3v1n0.net> + + LauncherOptions: use initializer list + +2012-07-19 Marco Trevisan (Treviño) <mail@3v1n0.net> + + EdgeBarrierController: use the barrier's released property to disable the sticky edge + +2012-07-19 Marco Trevisan (Treviño) <mail@3v1n0.net> + + PointerBarrier: add released property, if set remove the notify delay + +2012-07-18 Marco Trevisan (Treviño) <mail@3v1n0.net> + + EdgeBarrierController: temporary disable the barrier when just passed through + +2012-07-18 Marco Trevisan (Treviño) <mail@3v1n0.net> + + GLibSource: use std::to_string instead of lexical cast + +2012-07-18 Marco Trevisan (Treviño) <mail@3v1n0.net> + + PointerBarrier: use by-value callback data instead of class data in timeout + + Also use initializer list in BarrierEvent + +2012-07-18 Marco Trevisan (Treviño) <mail@3v1n0.net> + + LauncherHideMachine, LauncherHoverMachine: use std::to_string instead of boost + +2012-07-17 Marco Trevisan (Treviño) <mail@3v1n0.net> + + EdgeBarrierController: use unsigned integers for monitor + + (remove evil casts) + +2012-07-17 Marco Trevisan (Treviño) <mail@3v1n0.net> + + LauncherHideMachine, EdgeBarrierController: use stack allocated Decaymulator + +2012-07-17 Marco Trevisan (Treviño) <mail@3v1n0.net> + + EdgeBarrierController: use std::unique_ptr for pimpl + + FIXES MEMORY LEAK! + +2012-07-17 Marco Trevisan (Treviño) <mail@3v1n0.net> + + LauncherController: use stack allcoated EdgeBarrierController + +2012-07-23 Martin Mrazik <martin.mrazik@canonical.com> + + Adding gtest_output=xml to unit tests to generate Junit XML. Fixes: . Approved by Tim Penhey, jenkins, Sam Spilsbury. + +2012-06-13 Martin Mrazik <martin.mrazik@canonical.com> + + Adding gtest_output=xml to unit tests to generate Junit XML + +2012-07-23 Marco Trevisan (Treviño) <mail@3v1n0.net> + + KeyboardUtil: fix possible crash if XkbGetKeyboard returns null + + Also use initializer list. Fixes: https://bugs.launchpad.net/bugs/920258. Approved by Tim Penhey, Andrea Azzarone, jenkins. + +2012-07-06 Marco Trevisan (Treviño) <mail@3v1n0.net> + + KeyboardUtil: fixed typo + +2012-07-06 Marco Trevisan (Treviño) <mail@3v1n0.net> + + KeyboardUtil: oops fix return value. + +2012-07-06 Marco Trevisan (Treviño) <mail@3v1n0.net> + + KeyboardUtil: fix possible crash if XkbGetKeyboard returns null + + Also use initializer list + +2012-07-22 Tim Penhey <tim.penhey@canonical.com> + + Remove the -Wno-uninitialized to bring back the compiler warning for uninitialized variables.. Fixes: . Approved by Christopher Lee. + +2012-07-23 Tim Penhey <tim.penhey@canonical.com> + + Initialize some colors. + +2012-07-23 Tim Penhey <tim.penhey@canonical.com> + + Make sure that weight is always set. + +2012-07-23 Tim Penhey <tim.penhey@canonical.com> + + Merge trunk. + +2012-07-18 Tim Penhey <tim.penhey@canonical.com> + + Stop turning off the uninitialized check. + +2012-07-19 Martin Mrazik <martin.mrazik@canonical.com> + + Making manual test-cases consistent with TEST_TEMPLATE.txt. Fixes: . Approved by Tim Penhey, jenkins. + +2012-07-12 Martin Mrazik <martin.mrazik@canonical.com> + + updated README.txt + +2012-07-12 Martin Mrazik <martin.mrazik@canonical.com> + + Making manual test-cases consistent with TEST_TEMPLATE.txt + +2012-07-19 Didier Roche <didier.roche@canonical.com> + + Migration session from /desktop/unity/ to /com/canonical/unity/ as the dconf + documentation recommends. Fixes: . Approved by jenkins, Michal Hruby. + +2012-07-19 Didier Roche <didier.roche@canonical.com> + + move schema and value from old /desktop/unity/ location to /com/canonical/unity/ new one as the dconf documentation recommends + +2012-07-18 Andrea Azzarone <azzaronea@gmail.com> + + Fix duplicated device launcher icons.. Fixes: https://bugs.launchpad.net/bugs/1010714, https://bugs.launchpad.net/bugs/1010858. Approved by Marco Trevisan (Treviño). + +2012-07-19 Andrea Azzarone <azzaronea@gmail.com> + + Fix build issue on precise. + +2012-07-19 Andrea Azzarone <azzaronea@gmail.com> + + Remove _ prefix. + +2012-07-18 Andrea Azzarone <azzaronea@gmail.com> + + Minor change. + +2012-07-18 Andrea Azzarone <azzaronea@gmail.com> + + Fix build issue. + +2012-07-18 Andrea Azzarone <azzaronea@gmail.com> + + Fix build issue. + +2012-07-18 Andrea Azzarone <azzaronea@gmail.com> + + Mock GVolume too. + +2012-07-18 Andrea Azzarone <azzaronea@gmail.com> + + Minor changes. + +2012-07-17 Andrea Azzarone <azzaronea@gmail.com> + + Minor changes. + +2012-07-17 Andrea Azzarone <azzaronea@gmail.com> + + Add unit test. + +2012-07-17 Andrea Azzarone <azzaronea@gmail.com> + + Add a wrapper for GVolumeMonitor. + +2012-07-17 Andrea Azzarone <azzaronea@gmail.com> + + Don't duplicate device launcher icons. + +2012-07-18 Michal Hruby <michal.mhr@gmail.com> + + Updated the Preview API present in UnityCore to match latest protocol used by libunity. Fixes: . Approved by Marco Trevisan (Treviño), Gord Allott. + +2012-07-17 Michal Hruby <michal.mhr@gmail.com> + + Get rid of NoReplyCallback usage, as it disappeared + +2012-07-17 Michal Hruby <michal.mhr@gmail.com> + + Merge trunk + +2012-07-17 Michal Hruby <michal.mhr@gmail.com> + + Use enum for Track play_state, not just a bool + +2012-07-10 Michal Hruby <michal.mhr@gmail.com> + + Add missing properties to ApplicationPreview and LayoutHint enum + +2012-07-04 Michal Hruby <michal.mhr@gmail.com> + + Merge trunk + +2012-07-02 Michal Hruby <michal.mhr@gmail.com> + + Use unique_ptr for pimpl even in Preview subclasses (and it actually works when one uses proper incantations) + +2012-07-02 Michal Hruby <michal.mhr@gmail.com> + + Make Marco happy, get rid of g_strdup... + +2012-06-29 Michal Hruby <michal.mhr@gmail.com> + + A couple of issues brought up during review + +2012-06-29 Michal Hruby <michal.mhr@gmail.com> + + Merge trunk + +2012-06-29 Michal Hruby <michal.mhr@gmail.com> + + Add more tests + +2012-06-29 Michal Hruby <michal.mhr@gmail.com> + + Propagate preview_lens and uri to child preview + +2012-06-29 Michal Hruby <michal.mhr@gmail.com> + + Implement Preview::PerformAction + +2012-06-29 Michal Hruby <michal.mhr@gmail.com> + + Added TestPreviewSignal + +2012-06-28 Michal Hruby <michal.mhr@gmail.com> + + Enable TestLens.TestPreview + +2012-06-28 Michal Hruby <michal.mhr@gmail.com> + + Whoops parent_lens can't be a shared_ptr + +2012-06-28 Michal Hruby <michal.mhr@gmail.com> + + Fix segfault caused by TestFilter + +2012-06-28 Michal Hruby <michal.mhr@gmail.com> + + Commit the music signals + +2012-06-26 Michal Hruby <michal.mhr@gmail.com> + + Signal lens when SeriesPreview::selected_item_index changes + +2012-06-26 Michal Hruby <michal.mhr@gmail.com> + + Prepare base Preview methods for interaction with previews + +2012-06-21 Michal Hruby <michal.mhr@gmail.com> + + Merge trunk + +2012-06-19 Michal Hruby <michal.mhr@gmail.com> + + Implement SeriesPreview + +2012-06-19 Michal Hruby <michal.mhr@gmail.com> + + Add test for MusicPreview + +2012-06-19 Michal Hruby <michal.mhr@gmail.com> + + Implement MusicPreview + +2012-06-19 Michal Hruby <michal.mhr@gmail.com> + + Implement ApplicationPreview + +2012-06-19 Michal Hruby <michal.mhr@gmail.com> + + Implement MoviePreview + +2012-06-19 Michal Hruby <michal.mhr@gmail.com> + + Hide stuff under pimpl + +2012-06-18 Michal Hruby <michal.mhr@gmail.com> + + Hook up the Preview method + +2012-06-18 Michal Hruby <michal.mhr@gmail.com> + + Add a few tests + +2012-06-18 Michal Hruby <michal.mhr@gmail.com> + + Wrap actions and info hints + +2012-06-18 Michal Hruby <michal.mhr@gmail.com> + + Make it link as well + +2012-06-15 Michal Hruby <michal.mhr@gmail.com> + + Start new Preview API + +2012-07-17 Marco Trevisan (Treviño) <mail@3v1n0.net> + + GLibDBusProxy: use glib::Variant instead of std::shared_ptr. Fixes: . Approved by Michal Hruby. + +2012-07-17 Marco Trevisan (Treviño) <mail@3v1n0.net> + + GLibDBusProxy: use glib::Variant instead of std::shared_ptr + +2012-07-17 Andrea Azzarone <azzaronea@gmail.com> + + Fix 'Launcher Edge Stop Overcome Pressure' when the Launcher is set to autohide and 'Sticky edges' are turned off.. Fixes: https://bugs.launchpad.net/bugs/987955. Approved by Marco Trevisan (Treviño), jenkins. + +2012-06-29 Andrea Azzarone <azzaronea@gmail.com> + + Minor changes. + +2012-06-28 Andrea Azzarone <azzaronea@gmail.com> + + Add AP test. + +2012-06-28 Andrea Azzarone <azzaronea@gmail.com> + + Fix bug 987955. + +2012-07-16 Thomi Richards <thomi.richards@canonical.com> + + Fix an autopilot panel test and add additional logging to other autopilot tests.. Fixes: . Approved by jenkins, Brandon Schaefer. + +2012-07-17 Thomi Richards <thomi.richards@canonical.com> + + Made the test much simpler. + +2012-07-17 Thomi Richards <thomi.richards@canonical.com> + + Fixed failing test. + +2012-07-16 Thomi Richards <thomi.richards@canonical.com> + + Made the panel assertion a bit more verbose, and removed an error about the Try object being missing. + +2012-07-16 Marco Trevisan (Treviño) <mail@3v1n0.net> + + test_bamflaunchericon: don't try to run an application, just test for the icon name. Fixes: . Approved by jenkins, Brandon Schaefer. + +2012-07-16 Marco Trevisan (Treviño) <mail@3v1n0.net> + + test_bamflaunchericon: updated copyright + +2012-07-16 Marco Trevisan (Treviño) <mail@3v1n0.net> + + test_bamflaunchericon: check default icon for empty application + +2012-07-16 Marco Trevisan (Treviño) <mail@3v1n0.net> + + PluginAdapterStandalone: remove the unneeded close implementation + +2012-07-16 Marco Trevisan (Treviño) <mail@3v1n0.net> + + test_bamflaunchericon: don't try to run an application, just test for the icon name + +2012-07-16 Andrea Azzarone <azzaronea@gmail.com> + + Fix launcher autoscroll during dnd.. Fixes: https://bugs.launchpad.net/bugs/987223. Approved by Brandon Schaefer, jenkins. + +2012-07-11 Andrea Azzarone <azzaronea@gmail.com> + + Add a manual test. + +2012-07-11 Andrea Azzarone <azzaronea@gmail.com> + + Fix bug 987223. + +2012-07-16 Daniel van Vugt <daniel.van.vugt@canonical.com> + + Fix blinking/flickering of the launcher and panel, especially when running + LibreOffice or Emacs. (LP: #1024459). Fixes: https://bugs.launchpad.net/bugs/1024459. Approved by jenkins, Łukasz Zemczak. + +2012-07-16 Daniel van Vugt <daniel.van.vugt@canonical.com> + + Don't force shell repaint on every fullscreen redraw. That will cause the + panel and launcher to appear over the top of fullscreen windows, + intermittently. Which is bad. + +2012-07-16 Daniel van Vugt <daniel.van.vugt@canonical.com> + + Rebase on latest upstream lp:unity + +2012-07-16 Daniel van Vugt <daniel.van.vugt@canonical.com> + + Add test cases. + +2012-07-16 Daniel van Vugt <daniel.van.vugt@canonical.com> + + Fix blinking/flickering of the launcher and panel, especially when running + LibreOffice or Emacs. (LP: #1024459) + +2012-07-16 Daniel van Vugt <daniel.van.vugt@canonical.com> + + Don't bind the FBO if it's possible it won't get painted and unbound. That + could lead the the screen freezing while fullscreen windows are open. + (LP: #1024911) + . Fixes: https://bugs.launchpad.net/bugs/1024911. Approved by Łukasz Zemczak, jenkins. + +2012-07-16 Daniel van Vugt <daniel.van.vugt@canonical.com> + + Add test case. + +2012-07-16 Daniel van Vugt <daniel.van.vugt@canonical.com> + + Don't bind the FBO if it's possible it won't get painted and unbound. That + could lead the the screen freezing while fullscreen windows are open. + (LP: #1024911) + +2012-07-15 Marco Trevisan (Treviño) <mail@3v1n0.net> + + Use std::function instead of sigc::slot. Fixes: . Approved by jenkins, Tim Penhey. + +2012-07-16 Marco Trevisan (Treviño) <mail@3v1n0.net> + + GLibDBusProxy: always return on error + +2012-07-16 Marco Trevisan (Treviño) <mail@3v1n0.net> + + GLibDBusProxy: use std::shared_ptr with deleter to unref the variant + +2012-07-16 Marco Trevisan (Treviño) <mail@3v1n0.net> + + ShortcutView: pass values to lambda by value instead of using sigc::bind + +2012-07-16 Marco Trevisan (Treviño) <mail@3v1n0.net> + + Fix various code depending on sigc::slot + +2012-07-16 Marco Trevisan (Treviño) <mail@3v1n0.net> + + TextureCache: replace sigc::slot with std::function + +2012-07-16 Marco Trevisan (Treviño) <mail@3v1n0.net> + + UBusWrapper: replace sigc::slot with std::function + + Also make UBusConnection struct private and remove the unneeded manager field + +2012-07-16 Marco Trevisan (Treviño) <mail@3v1n0.net> + + IconLoader: replace sigc::slot with std::function + + Also don't accept requests from invalid slots + +2012-07-16 Marco Trevisan (Treviño) <mail@3v1n0.net> + + GLibDBusProxy: replace sigc::slot with std::function + + Also remove the NoReplyCallback and use default nullptr value + +2012-07-16 Marco Trevisan (Treviño) <mail@3v1n0.net> + + GLibSignal: replace sigc::slot with std::function + +2012-07-16 Marco Trevisan (Treviño) <mail@3v1n0.net> + + GLibSource: replace sigc::slot with std::function + +2012-07-13 Andrea Azzarone <azzaronea@gmail.com> + + Add test for bug 1020891.. Fixes: https://bugs.launchpad.net/bugs/1020891. Approved by Gord Allott, jenkins. + +2012-07-12 Andrea Azzarone <azzaronea@gmail.com> + + Add unit test for branch lp:~andyrock/unity/fix-1020891 + +2012-07-12 Brandon Schaefer <brandontschaefer@gmail.com> + + Scale mode now does not skip the first super to open the dash.. Fixes: https://bugs.launchpad.net/bugs/1023811. Approved by Thomi Richards. + +2012-07-12 Brandon Schaefer <brandontschaefer@gmail.com> + + * Merged trunk, and fixed ap test + +2012-07-12 Brandon Schaefer <brandontschaefer@gmail.com> + + * Dont set scale_just_active if super was not pressed to start scale. + +2012-07-12 Thomi Richards <thomi.richards@canonical.com> + + Fix up panel autopilot tests.. Fixes: . Approved by Christopher Lee, jenkins, Brandon Schaefer. + +2012-07-13 Thomi Richards <thomi.richards@canonical.com> + + Well behaved checks now use assertProperty, thereby giving us some grace time. + +2012-07-13 Thomi Richards <thomi.richards@canonical.com> + + Merged branch that fixes regressions. + +2012-07-12 Thomi Richards <thomi.richards@canonical.com> + + Fixed failing show desktop test. + +2012-07-12 Thomi Richards <thomi.richards@canonical.com> + + Fixed failing autopilot test. + +2012-07-12 Thomi Richards <thomi.richards@canonical.com> + + Converted a hud test that failed to use the Eventually matcher. + +2012-07-12 Thomi Richards <thomi.richards@canonical.com> + + Fixed an error waiting for the Bamf model to update. + +2012-07-12 Thomi Richards <thomi.richards@canonical.com> + + Hud now closes correctly. + +2012-07-12 Thomi Richards <thomi.richards@canonical.com> + + Made the panel menu entry tests more reliable. + +2012-07-13 Thomi Richards <thomi.richards@canonical.com> + + Merged parent. + +2012-07-10 Thomi Richards <thomi.richards@canonical.com> + + Fixed erroring panel test. + +2012-07-10 Thomi Richards <thomi.richards@canonical.com> + + FIxed an issue in the hud emulator. + +2012-07-10 Thomi Richards <thomi.richards@canonical.com> + + Merged trunk. + +2012-07-09 Thomi Richards <thomi.richards@canonical.com> + + Merged prerequisite branch. + +2012-07-09 Thomi Richards <thomi.richards@canonical.com> + + Undo the workaround for the panel tests that was needed to avoid a bug in Unity. + +2012-07-09 Thomi Richards <thomi.richards@canonical.com> + + Change panel tests to use the new assertProperty method available in autopilot. + +2012-07-09 Thomi Richards <thomi.richards@canonical.com> + + Changed case of custom assert methods to be camelCase. + +2012-07-12 Brandon Schaefer <brandontschaefer@gmail.com> + + Default Icon used if one isn't found by bamf.. Fixes: https://bugs.launchpad.net/bugs/886778. Approved by Tim Penhey, Thomi Richards. + +2012-07-11 Brandon Schaefer <brandontschaefer@gmail.com> + + * removed debugging + +2012-07-11 Brandon Schaefer <brandontschaefer@gmail.com> + + * Added gtest for blank icon + +2012-07-10 Brandon Schaefer <brandontschaefer@gmail.com> + + * test was bad... + +2012-07-10 Brandon Schaefer <brandontschaefer@gmail.com> + + * Adds a gtest + +2012-07-10 Brandon Schaefer <brandontschaefer@gmail.com> + + * If no icon is found, then use a default one. + +2012-07-12 smspillaz <sam.spilsbury@canonical.com> + + Scale the generated fbo tex by the screen dimentions as its screen size + and ensure nux sets the reference viewport back to output size. + + (LP: #1016789). Fixes: https://bugs.launchpad.net/bugs/1016789. Approved by Daniel van Vugt, jenkins. + +2012-06-23 smspillaz <sam.spilsbury@canonical.com> + + Scale the generated fbo tex by the screen dimentions as its screen size + and ensure nux sets the reference viewport back to output size. + + (LP: #1016789) + +2012-07-11 Brandon Schaefer <brandontschaefer@gmail.com> + + Quicklist closes when opening the Dash.. Fixes: https://bugs.launchpad.net/bugs/913994. Approved by Thomi Richards. + +2012-07-11 Brandon Schaefer <brandontschaefer@gmail.com> + + * small fixes + +2012-07-11 Brandon Schaefer <brandontschaefer@gmail.com> + + * Merged trunk, fixed conflicts + +2012-07-03 Brandon Schaefer <brandontschaefer@gmail.com> + + * mistakes in the ap test + +2012-07-02 Brandon Schaefer <brandontschaefer@gmail.com> + + * Quickilist closes when dash is activated + +2012-07-11 Thomi Richards <thomi.richards@canonical.com> + + Fix up switcher test suite to use new assert methods available in the latest autopilot.. Fixes: . Approved by jenkins, Brandon Schaefer. + +2012-07-10 Thomi Richards <thomi.richards@canonical.com> + + Made new start_applications() method that starts test apps for the switcher tests. Fixed the rest of the switcher tests to not sleep so much, use new style asserts instead. + +2012-07-10 Thomi Richards <thomi.richards@canonical.com> + + Fixed more switcher tests. + +2012-07-10 Thomi Richards <thomi.richards@canonical.com> + + Converted the switcher window management tests to use the assertProperty method in favour of the lambda-based Eventually matcher. + +2012-07-10 Thomi Richards <thomi.richards@canonical.com> + + Several cleanups to the basic switcher tests. + +2012-07-11 Andrea Azzarone <azzaronea@gmail.com> + + Tint the launcher icons that are *not* valid drop receptacles.. Fixes: https://bugs.launchpad.net/bugs/1020891. Approved by Andrea Azzarone. + +2012-07-11 Andrea Azzarone <azzaronea@gmail.com> + + Merge trunk. + +2012-07-04 Andrea Azzarone <azzaronea@gmail.com> + + Fix bug 1020891. + +2012-07-11 Andrea Azzarone <azzaronea@gmail.com> + + Fix padding issues in quicklist view.. Fixes: https://bugs.launchpad.net/bugs/955158. Approved by Andrea Azzarone. + +2012-06-27 Andrea Azzarone <azzaronea@gmail.com> + + Minor changes. + +2012-06-26 Andrea Azzarone <azzaronea@gmail.com> + + Fix padding issues in QuicklistView.cpp + +2012-07-11 Thomi Richards <thomi.richards@canonical.com> + + Autopilot launcher model cleanup.. Fixes: . Approved by Christopher Lee. + +2012-07-11 Thomi Richards <thomi.richards@canonical.com> + + Merged trunk, fixed conflicts. + +2012-07-11 Thomi Richards <thomi.richards@canonical.com> + + Fixed docstring. + +2012-07-11 Thomi Richards <thomi.richards@canonical.com> + + Fixed a spot where we were using filter(...) and we didn't need to. + +2012-07-11 Thomi Richards <thomi.richards@canonical.com> + + Removed a bunch of methods that weren't being used in the launcher model, and updated lots of places in the code where we were using get_icon_by_desktop_id and replaced it with get_icon(...) calls, as this is safer. + +2012-07-11 Thomi Richards <thomi.richards@canonical.com> + + A couple of quicklist test changes, and added the new get_icon method to the launcher mode. + +2012-07-11 Thomi Richards <thomi.richards@canonical.com> + + PEP8 fixes in test_shortcut_hint.py + +2012-07-11 Christopher Lee <chris.lee@canonical.com> + + Removed references to files that have been removed. Fixes: . Approved by Tim Penhey. + +2012-07-11 Christopher Lee <chris.lee@canonical.com> + + Removed references to files that where removed (revno: 2414) + +2012-07-10 Brandon Schaefer <brandontschaefer@gmail.com> + + Hud closes when a Quicklist is open.. Fixes: https://bugs.launchpad.net/bugs/1020246. Approved by Thomi Richards. + +2012-07-09 Brandon Schaefer <brandontschaefer@gmail.com> + + * Merged with trunk, fixed conflicts + +2012-07-05 Brandon Schaefer <brandontschaefer@gmail.com> + + * Merged with trunk and fix confict. + +2012-07-05 Brandon Schaefer <brandontschaefer@gmail.com> + + * Fixed ap test + +2012-07-02 Brandon Schaefer <brandontschaefer@gmail.com> + + * The hud will now open if a quicklist is open + +2012-07-10 Andrea Azzarone <azzaronea@gmail.com> + + Unfold valid drop icons.. Fixes: https://bugs.launchpad.net/bugs/839717. Approved by jenkins, Marco Trevisan (Treviño). + +2012-07-10 Andrea Azzarone <azzaronea@gmail.com> + + Merge trunk. + +2012-07-04 Andrea Azzarone <azzaronea@gmail.com> + + Minor changes to the manual test. + +2012-07-04 Andrea Azzarone <azzaronea@gmail.com> + + Add manual test. + +2012-07-04 Andrea Azzarone <azzaronea@gmail.com> + + Minor changes. + +2012-07-04 Andrea Azzarone <azzaronea@gmail.com> + + Don't link QUIRK_DROP_PRELIGHT and QUIRK_PRESENTED. + +2012-07-04 Andrea Azzarone <azzaronea@gmail.com> + + Fix bug #839717. + +2012-07-10 Thomi Richards <thomi.richards@canonical.com> + + Show desktop autopilot tests now use new-style autopilot assertions.. Fixes: . Approved by Christopher Lee. + +2012-07-11 Thomi Richards <thomi.richards@canonical.com> + + Merged trunk. + +2012-07-11 Thomi Richards <thomi.richards@canonical.com> + + Pushed switcher icon selection code into the switcher emulator. + +2012-07-10 Thomi Richards <thomi.richards@canonical.com> + + Fixed errors. + +2012-07-10 Thomi Richards <thomi.richards@canonical.com> + + No commit message +2012-07-10 Andrea Azzarone <azzaronea@gmail.com> + + Revert revision 2398.. Fixes: . Approved by Tim Penhey. + +2012-07-04 Andrea Azzarone <azzaronea@gmail.com> + + Revert revision 2398. + +2012-07-10 Michal Hruby <michal.mhr@gmail.com> + + Added Object::IsType method. Fixes: . Approved by Marco Trevisan (Treviño). + +2012-07-04 Michal Hruby <michal.mhr@gmail.com> + + Added Object::IsType method + +2012-07-10 Tim Penhey <tim.penhey@canonical.com> + + Reduce the amount of logging spam from bamf by checking for null first.. Fixes: . Approved by Thomi Richards. + +2012-07-05 Tim Penhey <tim.penhey@canonical.com> + + Bamf logging changes. + +2012-07-10 Christopher Lee <chris.lee@canonical.com> + + Removed 2 fast-switching tests, made them manual tests instead.. Fixes: . Approved by Thomi Richards. + +2012-07-09 Christopher Lee <chris.lee@canonical.com> + + Made instructions a little more explicit + +2012-07-09 Christopher Lee <chris.lee@canonical.com> + + Removed fast-switching tests, made them manual tests + +2012-07-10 Marco Trevisan (Treviño) <mail@3v1n0.net> + + GLibSource, SourceManager: add utility functions to add timeouts and idles + + Update the code to use them.. Fixes: . Approved by Marco Trevisan (Treviño). + +2012-07-09 Marco Trevisan (Treviño) <mail@3v1n0.net> + + LauncherController: use AddIdle + +2012-07-09 Marco Trevisan (Treviño) <mail@3v1n0.net> + + Merge with trunk + +2012-06-09 Marco Trevisan (Treviño) <mail@3v1n0.net> + + tests, glib::SourceManager: added tests for adding timeouts and idles + +2012-06-09 Marco Trevisan (Treviño) <mail@3v1n0.net> + + Use glib::SourceManager Add utility functions to add Idles and Timeouts + +2012-06-09 Marco Trevisan (Treviño) <mail@3v1n0.net> + + GLibSource, SourceManager: add utility functions to add timeouts and idles + +2012-06-09 Marco Trevisan (Treviño) <mail@3v1n0.net> + + glib::Source, rename Source::SourceCallback to Source::Callback + +2012-07-10 Andrea Azzarone <azzaronea@gmail.com> + + Fix freezes during dnd.. Fixes: https://bugs.launchpad.net/bugs/772445. Approved by Gord Allott. + +2012-07-09 Andrea Azzarone <azzaronea@gmail.com> + + Add manual test. + +2012-07-09 Andrea Azzarone <azzaronea@gmail.com> + + Replace g_file_info_get_content_type with g_content_type_guess. + +2012-07-10 Thomi Richards <thomi.richards@canonical.com> + + Dash and hud now close on Alt+F4 even when the caps lock or num lock keys are active.. Fixes: https://bugs.launchpad.net/bugs/1022801. Approved by Tim Penhey. + +2012-07-10 Thomi Richards <thomi.richards@canonical.com> + + Dash test passes now too. + +2012-07-10 Thomi Richards <thomi.richards@canonical.com> + + Hud test passes. + +2012-07-10 Thomi Richards <thomi.richards@canonical.com> + + Have failing dash test too. + +2012-07-10 Thomi Richards <thomi.richards@canonical.com> + + Have failing test. + +2012-07-09 Łukasz 'sil2100' Zemczak <lukasz.zemczak@canonical.com> + + Release\ 6.0.0 + 2012-07-09 Thomi Richards <thomi.richards@canonical.com> Fix several intermittently failing tests.. Fixes: . Approved by Tim Penhey. diff --git a/launcher/AbstractLauncherIcon.h b/launcher/AbstractLauncherIcon.h index 1f4341536..73f0395af 100644 --- a/launcher/AbstractLauncherIcon.h +++ b/launcher/AbstractLauncherIcon.h @@ -80,41 +80,41 @@ public: typedef nux::ObjectPtr<AbstractLauncherIcon> Ptr; typedef std::vector<nux::Vector4> TransformVector; - typedef enum + enum class IconType { - TYPE_NONE, - TYPE_BEGIN, - TYPE_HOME, - TYPE_HUD, - TYPE_FAVORITE, - TYPE_APPLICATION, - TYPE_EXPO, - TYPE_DESKTOP, - TYPE_PLACE, - TYPE_DEVICE, - TYPE_TRASH, - TYPE_END, - } IconType; - - typedef enum + NONE, + BEGIN, + HOME, + HUD, + FAVORITE, + APPLICATION, + EXPO, + DESKTOP, + PLACE, + DEVICE, + TRASH, + END + }; + + enum class Quirk { - QUIRK_VISIBLE, - QUIRK_ACTIVE, - QUIRK_RUNNING, - QUIRK_URGENT, - QUIRK_PRESENTED, - QUIRK_STARTING, - QUIRK_SHIMMER, - QUIRK_CENTER_SAVED, - QUIRK_PROGRESS, - QUIRK_DROP_PRELIGHT, - QUIRK_DROP_DIM, - QUIRK_DESAT, - QUIRK_PULSE_ONCE, - QUIRK_LAST_ACTION, - - QUIRK_LAST, - } Quirk; + VISIBLE = 0, + ACTIVE, + RUNNING, + URGENT, + PRESENTED, + STARTING, + SHIMMER, + CENTER_SAVED, + PROGRESS, + DROP_PRELIGHT, + DROP_DIM, + DESAT, + PULSE_ONCE, + LAST_ACTION, + + LAST + }; virtual ~AbstractLauncherIcon() {} @@ -205,9 +205,9 @@ public: virtual void SetVisibleOnMonitor(int monitor, bool visible) = 0; virtual void AboutToRemove() = 0; - + virtual void Stick(bool save = true) = 0; - + virtual void UnStick() = 0; sigc::signal<void, int, int, unsigned long> mouse_down; diff --git a/launcher/BFBLauncherIcon.cpp b/launcher/BFBLauncherIcon.cpp index cdcc4f0e2..d66f2deaa 100644 --- a/launcher/BFBLauncherIcon.cpp +++ b/launcher/BFBLauncherIcon.cpp @@ -39,9 +39,9 @@ BFBLauncherIcon::BFBLauncherIcon(LauncherHideMode hide_mode) { tooltip_text = _("Dash Home"); icon_name = PKGDATADIR"/launcher_bfb.png"; - SetQuirk(QUIRK_VISIBLE, true); - SetQuirk(QUIRK_RUNNING, false); - SetIconType(TYPE_HOME); + SetQuirk(Quirk::VISIBLE, true); + SetQuirk(Quirk::RUNNING, false); + SetIconType(IconType::HOME); background_color_ = nux::color::White; @@ -66,7 +66,7 @@ void BFBLauncherIcon::OnOverlayShown(GVariant *data, bool visible) if (overlay_identity.Str() == "dash" && IsVisibleOnMonitor(overlay_monitor)) { tooltip_enabled = !visible; - SetQuirk(QUIRK_ACTIVE, visible); + SetQuirk(Quirk::ACTIVE, visible); EmitNeedsRedraw(); } // If the hud is open, we hide the BFB if we have a locked launcher diff --git a/launcher/BamfLauncherIcon.cpp b/launcher/BamfLauncherIcon.cpp index 699a6b0f1..62f70dbdb 100644 --- a/launcher/BamfLauncherIcon.cpp +++ b/launcher/BamfLauncherIcon.cpp @@ -71,15 +71,15 @@ BamfLauncherIcon::BamfLauncherIcon(BamfApplication* app) tooltip_text = BamfName(); icon_name = (icon ? icon.Str() : DEFAULT_ICON); - SetIconType(TYPE_APPLICATION); + SetIconType(IconType::APPLICATION); if (IsSticky()) - SetQuirk(QUIRK_VISIBLE, true); + SetQuirk(Quirk::VISIBLE, true); else - SetQuirk(QUIRK_VISIBLE, bamf_view_user_visible(bamf_view)); + SetQuirk(Quirk::VISIBLE, bamf_view_user_visible(bamf_view)); - SetQuirk(QUIRK_ACTIVE, bamf_view_is_active(bamf_view)); - SetQuirk(QUIRK_RUNNING, bamf_view_is_running(bamf_view)); + SetQuirk(Quirk::ACTIVE, bamf_view_is_active(bamf_view)); + SetQuirk(Quirk::RUNNING, bamf_view_is_running(bamf_view)); glib::SignalBase* sig; @@ -97,19 +97,19 @@ BamfLauncherIcon::BamfLauncherIcon(BamfApplication* app) sig = new glib::Signal<void, BamfView*, gboolean>(bamf_view, "urgent-changed", [&] (BamfView*, gboolean urgent) { - SetQuirk(QUIRK_URGENT, urgent); + SetQuirk(Quirk::URGENT, urgent); }); _gsignals.Add(sig); sig = new glib::Signal<void, BamfView*, gboolean>(bamf_view, "active-changed", [&] (BamfView*, gboolean active) { - SetQuirk(QUIRK_ACTIVE, active); + SetQuirk(Quirk::ACTIVE, active); }); _gsignals.Add(sig); sig = new glib::Signal<void, BamfView*, gboolean>(bamf_view, "running-changed", [&] (BamfView*, gboolean running) { - SetQuirk(QUIRK_RUNNING, running); + SetQuirk(Quirk::RUNNING, running); if (running) { @@ -123,7 +123,7 @@ BamfLauncherIcon::BamfLauncherIcon(BamfApplication* app) sig = new glib::Signal<void, BamfView*, gboolean>(bamf_view, "user-visible-changed", [&] (BamfView*, gboolean visible) { if (!IsSticky()) - SetQuirk(QUIRK_VISIBLE, visible); + SetQuirk(Quirk::VISIBLE, visible); }); _gsignals.Add(sig); @@ -131,7 +131,7 @@ BamfLauncherIcon::BamfLauncherIcon(BamfApplication* app) [&] (BamfView*) { if (!IsSticky()) { - SetQuirk(QUIRK_VISIBLE, false); + SetQuirk(Quirk::VISIBLE, false); /* Use a timeout to remove the icon, this avoids * that we remove an application that is going @@ -196,22 +196,22 @@ bool BamfLauncherIcon::IsSticky() const bool BamfLauncherIcon::IsVisible() const { - return GetQuirk(QUIRK_VISIBLE); + return GetQuirk(Quirk::VISIBLE); } bool BamfLauncherIcon::IsActive() const { - return GetQuirk(QUIRK_ACTIVE); + return GetQuirk(Quirk::ACTIVE); } bool BamfLauncherIcon::IsRunning() const { - return GetQuirk(QUIRK_RUNNING); + return GetQuirk(Quirk::RUNNING); } bool BamfLauncherIcon::IsUrgent() const { - return GetQuirk(QUIRK_URGENT); + return GetQuirk(Quirk::URGENT); } void BamfLauncherIcon::ActivateLauncherIcon(ActionArg arg) @@ -303,7 +303,7 @@ void BamfLauncherIcon::ActivateLauncherIcon(ActionArg arg) if (!IsRunning() || (IsRunning() && !user_visible)) // #1 above { - if (GetQuirk(QUIRK_STARTING)) + if (GetQuirk(Quirk::STARTING)) return; if (scaleWasActive) @@ -311,7 +311,7 @@ void BamfLauncherIcon::ActivateLauncherIcon(ActionArg arg) wm->TerminateScale(); } - SetQuirk(QUIRK_STARTING, true); + SetQuirk(Quirk::STARTING, true); OpenInstanceLauncherIcon(ActionArg()); } else // app is running @@ -455,7 +455,7 @@ void BamfLauncherIcon::OnWindowMinimized(guint32 xid) return; Present(0.5f, 600); - UpdateQuirkTimeDelayed(300, QUIRK_SHIMMER); + UpdateQuirkTimeDelayed(300, Quirk::SHIMMER); } void BamfLauncherIcon::OnWindowMoved(guint32 moved_win) @@ -610,7 +610,7 @@ void BamfLauncherIcon::OpenInstanceWithUris(std::set<std::string> uris) if (error) g_warning("%s\n", error.Message().c_str()); - UpdateQuirkTime(QUIRK_STARTING); + UpdateQuirkTime(Quirk::STARTING); } void BamfLauncherIcon::OpenInstanceLauncherIcon(ActionArg arg) diff --git a/launcher/BamfLauncherIcon.h b/launcher/BamfLauncherIcon.h index 75097012b..5c00d3b52 100644 --- a/launcher/BamfLauncherIcon.h +++ b/launcher/BamfLauncherIcon.h @@ -53,9 +53,9 @@ public: bool IsRunning() const; bool IsUrgent() const; - void Quit(); - void Stick(bool save = true); - void UnStick(); + virtual void Quit(); + virtual void Stick(bool save = true); + virtual void UnStick(); virtual bool ShowInSwitcher(bool current); virtual unsigned long long SwitcherPriority(); diff --git a/launcher/DesktopLauncherIcon.cpp b/launcher/DesktopLauncherIcon.cpp index ca1587357..715fd9ac8 100644 --- a/launcher/DesktopLauncherIcon.cpp +++ b/launcher/DesktopLauncherIcon.cpp @@ -33,9 +33,9 @@ DesktopLauncherIcon::DesktopLauncherIcon() { tooltip_text = _("Show Desktop"); icon_name = "desktop"; - SetQuirk(QUIRK_VISIBLE, true); - SetQuirk(QUIRK_RUNNING, false); - SetIconType(TYPE_DESKTOP); + SetQuirk(Quirk::VISIBLE, true); + SetQuirk(Quirk::RUNNING, false); + SetIconType(IconType::DESKTOP); } DesktopLauncherIcon::~DesktopLauncherIcon() diff --git a/launcher/DeviceLauncherIcon.cpp b/launcher/DeviceLauncherIcon.cpp index fe5b46d8f..017f5aacb 100644 --- a/launcher/DeviceLauncherIcon.cpp +++ b/launcher/DeviceLauncherIcon.cpp @@ -80,21 +80,21 @@ void DeviceLauncherIcon::UpdateVisibility() switch (DevicesSettings::GetDefault().GetDevicesOption()) { case DevicesSettings::NEVER: - SetQuirk(QUIRK_VISIBLE, false); + SetQuirk(Quirk::VISIBLE, false); break; case DevicesSettings::ONLY_MOUNTED: if (keep_in_launcher_) { - SetQuirk(QUIRK_VISIBLE, true); + SetQuirk(Quirk::VISIBLE, true); } else { glib::Object<GMount> mount(g_volume_get_mount(volume_)); - SetQuirk(QUIRK_VISIBLE, mount); + SetQuirk(Quirk::VISIBLE, mount); } break; case DevicesSettings::ALWAYS: - SetQuirk(QUIRK_VISIBLE, true); + SetQuirk(Quirk::VISIBLE, true); break; } } @@ -109,8 +109,8 @@ void DeviceLauncherIcon::UpdateDeviceIcon() tooltip_text = name_; icon_name = icon_string.Str(); - SetIconType(TYPE_DEVICE); - SetQuirk(QUIRK_RUNNING, false); + SetIconType(IconType::DEVICE); + SetQuirk(Quirk::RUNNING, false); } bool @@ -262,7 +262,7 @@ void DeviceLauncherIcon::ShowMount(GMount* mount) void DeviceLauncherIcon::ActivateLauncherIcon(ActionArg arg) { SimpleLauncherIcon::ActivateLauncherIcon(arg); - SetQuirk(QUIRK_STARTING, true); + SetQuirk(Quirk::STARTING, true); glib::Object<GMount> mount(g_volume_get_mount(volume_)); @@ -351,7 +351,7 @@ void DeviceLauncherIcon::OnTogglePin(DbusmenuMenuitem* item, glib::Object<GMount> mount(g_volume_get_mount(self->volume_)); if (!mount) - self->SetQuirk(QUIRK_VISIBLE, false); + self->SetQuirk(Quirk::VISIBLE, false); // Remove from favorites if (!uuid.Str().empty()) diff --git a/launcher/HudLauncherIcon.cpp b/launcher/HudLauncherIcon.cpp index 22ada7182..3a7c64ef6 100644 --- a/launcher/HudLauncherIcon.cpp +++ b/launcher/HudLauncherIcon.cpp @@ -44,10 +44,10 @@ HudLauncherIcon::HudLauncherIcon(LauncherHideMode hide_mode) { tooltip_text = _("HUD"); icon_name = PKGDATADIR"/launcher_bfb.png"; - SetQuirk(QUIRK_VISIBLE, false); - SetQuirk(QUIRK_RUNNING, false); - SetQuirk(QUIRK_ACTIVE, true); - SetIconType(TYPE_HUD); + SetQuirk(Quirk::VISIBLE, false); + SetQuirk(Quirk::RUNNING, false); + SetQuirk(Quirk::ACTIVE, true); + SetIconType(IconType::HUD); background_color_ = nux::color::White; @@ -82,7 +82,7 @@ void HudLauncherIcon::SetHideMode(LauncherHideMode hide_mode) launcher_hide_mode_ = hide_mode; if (launcher_hide_mode_ == LAUNCHER_HIDE_AUTOHIDE) - SetQuirk(QUIRK_VISIBLE, false); + SetQuirk(Quirk::VISIBLE, false); } } @@ -99,8 +99,8 @@ void HudLauncherIcon::OnOverlayShown(GVariant* data, bool visible) launcher_hide_mode_ == LAUNCHER_HIDE_NEVER) { SetMonitor(overlay_monitor); - SetQuirk(QUIRK_VISIBLE, visible); - SetQuirk(QUIRK_ACTIVE, visible); + SetQuirk(Quirk::VISIBLE, visible); + SetQuirk(Quirk::ACTIVE, visible); tooltip_enabled = !visible; EmitNeedsRedraw(); } @@ -118,7 +118,7 @@ nux::Color HudLauncherIcon::GlowColor() void HudLauncherIcon::ActivateLauncherIcon(ActionArg arg) { - if (GetQuirk(QUIRK_VISIBLE)) + if (GetQuirk(Quirk::VISIBLE)) { ubus_manager_.SendMessage(UBUS_HUD_CLOSE_REQUEST); } diff --git a/launcher/Launcher.cpp b/launcher/Launcher.cpp index 5d4eff150..901d7247f 100644 --- a/launcher/Launcher.cpp +++ b/launcher/Launcher.cpp @@ -373,51 +373,51 @@ void Launcher::EnsureAnimation() bool Launcher::IconNeedsAnimation(AbstractLauncherIcon::Ptr icon, struct timespec const& current) const { - struct timespec time = icon->GetQuirkTime(AbstractLauncherIcon::QUIRK_VISIBLE); + struct timespec time = icon->GetQuirkTime(AbstractLauncherIcon::Quirk::VISIBLE); if (unity::TimeUtil::TimeDelta(¤t, &time) < ANIM_DURATION_SHORT) return true; - time = icon->GetQuirkTime(AbstractLauncherIcon::QUIRK_RUNNING); + time = icon->GetQuirkTime(AbstractLauncherIcon::Quirk::RUNNING); if (unity::TimeUtil::TimeDelta(¤t, &time) < ANIM_DURATION_SHORT) return true; - time = icon->GetQuirkTime(AbstractLauncherIcon::QUIRK_STARTING); + time = icon->GetQuirkTime(AbstractLauncherIcon::Quirk::STARTING); if (unity::TimeUtil::TimeDelta(¤t, &time) < (ANIM_DURATION_LONG * MAX_STARTING_BLINKS * STARTING_BLINK_LAMBDA * 2)) return true; - time = icon->GetQuirkTime(AbstractLauncherIcon::QUIRK_URGENT); + time = icon->GetQuirkTime(AbstractLauncherIcon::Quirk::URGENT); if (unity::TimeUtil::TimeDelta(¤t, &time) < (ANIM_DURATION_LONG * URGENT_BLINKS * 2)) return true; - time = icon->GetQuirkTime(AbstractLauncherIcon::QUIRK_PULSE_ONCE); + time = icon->GetQuirkTime(AbstractLauncherIcon::Quirk::PULSE_ONCE); if (unity::TimeUtil::TimeDelta(¤t, &time) < (ANIM_DURATION_LONG * PULSE_BLINK_LAMBDA * 2)) return true; - time = icon->GetQuirkTime(AbstractLauncherIcon::QUIRK_PRESENTED); + time = icon->GetQuirkTime(AbstractLauncherIcon::Quirk::PRESENTED); if (unity::TimeUtil::TimeDelta(¤t, &time) < ANIM_DURATION) return true; - time = icon->GetQuirkTime(AbstractLauncherIcon::QUIRK_SHIMMER); + time = icon->GetQuirkTime(AbstractLauncherIcon::Quirk::SHIMMER); if (unity::TimeUtil::TimeDelta(¤t, &time) < ANIM_DURATION_LONG) return true; - time = icon->GetQuirkTime(AbstractLauncherIcon::QUIRK_CENTER_SAVED); + time = icon->GetQuirkTime(AbstractLauncherIcon::Quirk::CENTER_SAVED); if (unity::TimeUtil::TimeDelta(¤t, &time) < ANIM_DURATION) return true; - time = icon->GetQuirkTime(AbstractLauncherIcon::QUIRK_PROGRESS); + time = icon->GetQuirkTime(AbstractLauncherIcon::Quirk::PROGRESS); if (unity::TimeUtil::TimeDelta(¤t, &time) < ANIM_DURATION) return true; - time = icon->GetQuirkTime(AbstractLauncherIcon::QUIRK_DROP_DIM); + time = icon->GetQuirkTime(AbstractLauncherIcon::Quirk::DROP_DIM); if (unity::TimeUtil::TimeDelta(¤t, &time) < ANIM_DURATION) return true; - time = icon->GetQuirkTime(AbstractLauncherIcon::QUIRK_DESAT); + time = icon->GetQuirkTime(AbstractLauncherIcon::Quirk::DESAT); if (unity::TimeUtil::TimeDelta(¤t, &time) < ANIM_DURATION_SHORT_SHORT) return true; - time = icon->GetQuirkTime(AbstractLauncherIcon::QUIRK_DROP_PRELIGHT); + time = icon->GetQuirkTime(AbstractLauncherIcon::Quirk::DROP_PRELIGHT); if (unity::TimeUtil::TimeDelta(¤t, &time) < ANIM_DURATION) return true; @@ -496,20 +496,20 @@ float Launcher::IconVisibleProgress(AbstractLauncherIcon::Ptr icon, struct times if (!icon->IsVisibleOnMonitor(monitor)) return 0.0f; - if (icon->GetIconType() == AbstractLauncherIcon::TYPE_HUD) + if (icon->GetIconType() == AbstractLauncherIcon::IconType::HUD) { - return (icon->GetQuirk(AbstractLauncherIcon::QUIRK_VISIBLE)) ? 1.0f : 0.0f; + return (icon->GetQuirk(AbstractLauncherIcon::Quirk::VISIBLE)) ? 1.0f : 0.0f; } - if (icon->GetQuirk(AbstractLauncherIcon::QUIRK_VISIBLE)) + if (icon->GetQuirk(AbstractLauncherIcon::Quirk::VISIBLE)) { - struct timespec icon_visible_time = icon->GetQuirkTime(AbstractLauncherIcon::QUIRK_VISIBLE); + struct timespec icon_visible_time = icon->GetQuirkTime(AbstractLauncherIcon::Quirk::VISIBLE); int enter_ms = unity::TimeUtil::TimeDelta(¤t, &icon_visible_time); return CLAMP((float) enter_ms / (float) ANIM_DURATION_SHORT, 0.0f, 1.0f); } else { - struct timespec icon_hide_time = icon->GetQuirkTime(AbstractLauncherIcon::QUIRK_VISIBLE); + struct timespec icon_hide_time = icon->GetQuirkTime(AbstractLauncherIcon::Quirk::VISIBLE); int hide_ms = unity::TimeUtil::TimeDelta(¤t, &icon_hide_time); return 1.0f - CLAMP((float) hide_ms / (float) ANIM_DURATION_SHORT, 0.0f, 1.0f); } @@ -542,11 +542,11 @@ void Launcher::SetDndDelta(float x, float y, nux::Geometry const& geo, timespec float Launcher::IconPresentProgress(AbstractLauncherIcon::Ptr icon, struct timespec const& current) const { - struct timespec icon_present_time = icon->GetQuirkTime(AbstractLauncherIcon::QUIRK_PRESENTED); + struct timespec icon_present_time = icon->GetQuirkTime(AbstractLauncherIcon::Quirk::PRESENTED); int ms = unity::TimeUtil::TimeDelta(¤t, &icon_present_time); float result = CLAMP((float) ms / (float) ANIM_DURATION, 0.0f, 1.0f); - if (icon->GetQuirk(AbstractLauncherIcon::QUIRK_PRESENTED)) + if (icon->GetQuirk(AbstractLauncherIcon::Quirk::PRESENTED)) return result; else return 1.0f - result; @@ -554,7 +554,7 @@ float Launcher::IconPresentProgress(AbstractLauncherIcon::Ptr icon, struct times float Launcher::IconUrgentProgress(AbstractLauncherIcon::Ptr icon, struct timespec const& current) const { - struct timespec urgent_time = icon->GetQuirkTime(AbstractLauncherIcon::QUIRK_URGENT); + struct timespec urgent_time = icon->GetQuirkTime(AbstractLauncherIcon::Quirk::URGENT); int urgent_ms = unity::TimeUtil::TimeDelta(¤t, &urgent_time); float result; @@ -563,7 +563,7 @@ float Launcher::IconUrgentProgress(AbstractLauncherIcon::Ptr icon, struct timesp else result = CLAMP((float) urgent_ms / (float)(ANIM_DURATION_LONG * URGENT_BLINKS * 2), 0.0f, 1.0f); - if (icon->GetQuirk(AbstractLauncherIcon::QUIRK_URGENT)) + if (icon->GetQuirk(AbstractLauncherIcon::Quirk::URGENT)) return result; else return 1.0f - result; @@ -571,11 +571,11 @@ float Launcher::IconUrgentProgress(AbstractLauncherIcon::Ptr icon, struct timesp float Launcher::IconDropDimValue(AbstractLauncherIcon::Ptr icon, struct timespec const& current) const { - struct timespec dim_time = icon->GetQuirkTime(AbstractLauncherIcon::QUIRK_DROP_DIM); + struct timespec dim_time = icon->GetQuirkTime(AbstractLauncherIcon::Quirk::DROP_DIM); int dim_ms = unity::TimeUtil::TimeDelta(¤t, &dim_time); float result = CLAMP((float) dim_ms / (float) ANIM_DURATION, 0.0f, 1.0f); - if (icon->GetQuirk(AbstractLauncherIcon::QUIRK_DROP_DIM)) + if (icon->GetQuirk(AbstractLauncherIcon::Quirk::DROP_DIM)) return 1.0f - result; else return result; @@ -583,11 +583,11 @@ float Launcher::IconDropDimValue(AbstractLauncherIcon::Ptr icon, struct timespec float Launcher::IconDesatValue(AbstractLauncherIcon::Ptr icon, struct timespec const& current) const { - struct timespec dim_time = icon->GetQuirkTime(AbstractLauncherIcon::QUIRK_DESAT); + struct timespec dim_time = icon->GetQuirkTime(AbstractLauncherIcon::Quirk::DESAT); int ms = unity::TimeUtil::TimeDelta(¤t, &dim_time); float result = CLAMP((float) ms / (float) ANIM_DURATION_SHORT_SHORT, 0.0f, 1.0f); - if (icon->GetQuirk(AbstractLauncherIcon::QUIRK_DESAT)) + if (icon->GetQuirk(AbstractLauncherIcon::Quirk::DESAT)) return 1.0f - result; else return result; @@ -595,21 +595,21 @@ float Launcher::IconDesatValue(AbstractLauncherIcon::Ptr icon, struct timespec c float Launcher::IconShimmerProgress(AbstractLauncherIcon::Ptr icon, struct timespec const& current) const { - struct timespec shimmer_time = icon->GetQuirkTime(AbstractLauncherIcon::QUIRK_SHIMMER); + struct timespec shimmer_time = icon->GetQuirkTime(AbstractLauncherIcon::Quirk::SHIMMER); int shimmer_ms = unity::TimeUtil::TimeDelta(¤t, &shimmer_time); return CLAMP((float) shimmer_ms / (float) ANIM_DURATION_LONG, 0.0f, 1.0f); } float Launcher::IconCenterTransitionProgress(AbstractLauncherIcon::Ptr icon, struct timespec const& current) const { - struct timespec save_time = icon->GetQuirkTime(AbstractLauncherIcon::QUIRK_CENTER_SAVED); + struct timespec save_time = icon->GetQuirkTime(AbstractLauncherIcon::Quirk::CENTER_SAVED); int save_ms = unity::TimeUtil::TimeDelta(¤t, &save_time); return CLAMP((float) save_ms / (float) ANIM_DURATION, 0.0f, 1.0f); } float Launcher::IconUrgentPulseValue(AbstractLauncherIcon::Ptr icon, struct timespec const& current) const { - if (!icon->GetQuirk(AbstractLauncherIcon::QUIRK_URGENT)) + if (!icon->GetQuirk(AbstractLauncherIcon::Quirk::URGENT)) return 1.0f; // we are full on in a normal condition double urgent_progress = (double) IconUrgentProgress(icon, current); @@ -618,19 +618,19 @@ float Launcher::IconUrgentPulseValue(AbstractLauncherIcon::Ptr icon, struct time float Launcher::IconPulseOnceValue(AbstractLauncherIcon::Ptr icon, struct timespec const ¤t) const { - struct timespec pulse_time = icon->GetQuirkTime(AbstractLauncherIcon::QUIRK_PULSE_ONCE); + struct timespec pulse_time = icon->GetQuirkTime(AbstractLauncherIcon::Quirk::PULSE_ONCE); int pulse_ms = unity::TimeUtil::TimeDelta(¤t, &pulse_time); double pulse_progress = (double) CLAMP((float) pulse_ms / (ANIM_DURATION_LONG * PULSE_BLINK_LAMBDA * 2), 0.0f, 1.0f); if (pulse_progress == 1.0f) - icon->SetQuirk(AbstractLauncherIcon::QUIRK_PULSE_ONCE, false); + icon->SetQuirk(AbstractLauncherIcon::Quirk::PULSE_ONCE, false); return 0.5f + (float) (std::cos(M_PI * 2.0 * pulse_progress)) * 0.5f; } float Launcher::IconUrgentWiggleValue(AbstractLauncherIcon::Ptr icon, struct timespec const& current) const { - if (!icon->GetQuirk(AbstractLauncherIcon::QUIRK_URGENT)) + if (!icon->GetQuirk(AbstractLauncherIcon::Quirk::URGENT)) return 0.0f; // we are full on in a normal condition double urgent_progress = (double) IconUrgentProgress(icon, current); @@ -639,7 +639,7 @@ float Launcher::IconUrgentWiggleValue(AbstractLauncherIcon::Ptr icon, struct tim float Launcher::IconStartingBlinkValue(AbstractLauncherIcon::Ptr icon, struct timespec const& current) const { - struct timespec starting_time = icon->GetQuirkTime(AbstractLauncherIcon::QUIRK_STARTING); + struct timespec starting_time = icon->GetQuirkTime(AbstractLauncherIcon::Quirk::STARTING); int starting_ms = unity::TimeUtil::TimeDelta(¤t, &starting_time); double starting_progress = (double) CLAMP((float) starting_ms / (float)(ANIM_DURATION_LONG * STARTING_BLINK_LAMBDA), 0.0f, 1.0f); double val = IsBackLightModeToggles() ? 3.0f : 4.0f; @@ -648,14 +648,14 @@ float Launcher::IconStartingBlinkValue(AbstractLauncherIcon::Ptr icon, struct ti float Launcher::IconStartingPulseValue(AbstractLauncherIcon::Ptr icon, struct timespec const& current) const { - struct timespec starting_time = icon->GetQuirkTime(AbstractLauncherIcon::QUIRK_STARTING); + struct timespec starting_time = icon->GetQuirkTime(AbstractLauncherIcon::Quirk::STARTING); int starting_ms = unity::TimeUtil::TimeDelta(¤t, &starting_time); double starting_progress = (double) CLAMP((float) starting_ms / (float)(ANIM_DURATION_LONG * MAX_STARTING_BLINKS * STARTING_BLINK_LAMBDA * 2), 0.0f, 1.0f); - if (starting_progress == 1.0f && !icon->GetQuirk(AbstractLauncherIcon::QUIRK_RUNNING)) + if (starting_progress == 1.0f && !icon->GetQuirk(AbstractLauncherIcon::Quirk::RUNNING)) { - icon->SetQuirk(AbstractLauncherIcon::QUIRK_STARTING, false); - icon->ResetQuirkTime(AbstractLauncherIcon::QUIRK_STARTING); + icon->SetQuirk(AbstractLauncherIcon::Quirk::STARTING, false); + icon->ResetQuirkTime(AbstractLauncherIcon::Quirk::STARTING); } return 0.5f + (float)(std::cos(M_PI * (float)(MAX_STARTING_BLINKS * 2) * starting_progress)) * 0.5f; @@ -665,16 +665,16 @@ float Launcher::IconBackgroundIntensity(AbstractLauncherIcon::Ptr icon, struct t { float result = 0.0f; - struct timespec running_time = icon->GetQuirkTime(AbstractLauncherIcon::QUIRK_RUNNING); + struct timespec running_time = icon->GetQuirkTime(AbstractLauncherIcon::Quirk::RUNNING); int running_ms = unity::TimeUtil::TimeDelta(¤t, &running_time); float running_progress = CLAMP((float) running_ms / (float) ANIM_DURATION_SHORT, 0.0f, 1.0f); - if (!icon->GetQuirk(AbstractLauncherIcon::QUIRK_RUNNING)) + if (!icon->GetQuirk(AbstractLauncherIcon::Quirk::RUNNING)) running_progress = 1.0f - running_progress; // After we finish a fade in from running, we can reset the quirk - if (running_progress == 1.0f && icon->GetQuirk(AbstractLauncherIcon::QUIRK_RUNNING)) - icon->SetQuirk(AbstractLauncherIcon::QUIRK_STARTING, false); + if (running_progress == 1.0f && icon->GetQuirk(AbstractLauncherIcon::Quirk::RUNNING)) + icon->SetQuirk(AbstractLauncherIcon::Quirk::STARTING, false); float backlight_strength; if (options()->backlight_mode() == BACKLIGHT_ALWAYS_ON) @@ -698,8 +698,8 @@ float Launcher::IconBackgroundIntensity(AbstractLauncherIcon::Ptr icon, struct t result = backlight_strength; // The blink concept is a failure in this case (it just doesn't work right) break; case LAUNCH_ANIMATION_PULSE: - if (running_progress == 1.0f && icon->GetQuirk(AbstractLauncherIcon::QUIRK_RUNNING)) - icon->ResetQuirkTime(AbstractLauncherIcon::QUIRK_STARTING); + if (running_progress == 1.0f && icon->GetQuirk(AbstractLauncherIcon::Quirk::RUNNING)) + icon->ResetQuirkTime(AbstractLauncherIcon::Quirk::STARTING); result = backlight_strength; if (options()->backlight_mode() == BACKLIGHT_ALWAYS_ON) @@ -711,7 +711,7 @@ float Launcher::IconBackgroundIntensity(AbstractLauncherIcon::Ptr icon, struct t break; } - if (icon->GetQuirk(AbstractLauncherIcon::QUIRK_PULSE_ONCE)) + if (icon->GetQuirk(AbstractLauncherIcon::Quirk::PULSE_ONCE)) { if (options()->backlight_mode() == BACKLIGHT_ALWAYS_ON) result *= CLAMP(running_progress + IconPulseOnceValue(icon, current), 0.0f, 1.0f); @@ -722,7 +722,7 @@ float Launcher::IconBackgroundIntensity(AbstractLauncherIcon::Ptr icon, struct t } // urgent serves to bring the total down only - if (icon->GetQuirk(AbstractLauncherIcon::QUIRK_URGENT) && options()->urgent_animation() == URGENT_ANIMATION_PULSE) + if (icon->GetQuirk(AbstractLauncherIcon::Quirk::URGENT) && options()->urgent_animation() == URGENT_ANIMATION_PULSE) result *= 0.2f + 0.8f * IconUrgentPulseValue(icon, current); return result; @@ -730,11 +730,11 @@ float Launcher::IconBackgroundIntensity(AbstractLauncherIcon::Ptr icon, struct t float Launcher::IconProgressBias(AbstractLauncherIcon::Ptr icon, struct timespec const& current) const { - struct timespec icon_progress_time = icon->GetQuirkTime(AbstractLauncherIcon::QUIRK_PROGRESS); + struct timespec icon_progress_time = icon->GetQuirkTime(AbstractLauncherIcon::Quirk::PROGRESS); int ms = unity::TimeUtil::TimeDelta(¤t, &icon_progress_time); float result = CLAMP((float) ms / (float) ANIM_DURATION, 0.0f, 1.0f); - if (icon->GetQuirk(AbstractLauncherIcon::QUIRK_PROGRESS)) + if (icon->GetQuirk(AbstractLauncherIcon::Quirk::PROGRESS)) return -1.0f + result; else return result; @@ -758,8 +758,8 @@ void Launcher::SetupRenderArg(AbstractLauncherIcon::Ptr icon, struct timespec co arg.alpha = 0.2f + 0.8f * desat_value; arg.saturation = desat_value; arg.colorify = nux::color::White; - arg.running_arrow = icon->GetQuirk(AbstractLauncherIcon::QUIRK_RUNNING); - arg.running_colored = icon->GetQuirk(AbstractLauncherIcon::QUIRK_URGENT); + arg.running_arrow = icon->GetQuirk(AbstractLauncherIcon::Quirk::RUNNING); + arg.running_colored = icon->GetQuirk(AbstractLauncherIcon::Quirk::URGENT); arg.draw_edge_only = IconDrawEdgeOnly(icon); arg.active_colored = false; arg.x_rotation = 0.0f; @@ -771,14 +771,14 @@ void Launcher::SetupRenderArg(AbstractLauncherIcon::Ptr icon, struct timespec co arg.progress_bias = IconProgressBias(icon, current); arg.progress = CLAMP(icon->GetProgress(), 0.0f, 1.0f); arg.draw_shortcut = _shortcuts_shown && !_hide_machine.GetQuirk(LauncherHideMachine::PLACES_VISIBLE); - arg.system_item = icon->GetIconType() == AbstractLauncherIcon::TYPE_HOME || - icon->GetIconType() == AbstractLauncherIcon::TYPE_HUD; - arg.colorify_background = icon->GetIconType() == AbstractLauncherIcon::TYPE_HOME || - icon->GetIconType() == AbstractLauncherIcon::TYPE_HUD || - icon->GetIconType() == AbstractLauncherIcon::TYPE_TRASH || - icon->GetIconType() == AbstractLauncherIcon::TYPE_DESKTOP || - icon->GetIconType() == AbstractLauncherIcon::TYPE_DEVICE || - icon->GetIconType() == AbstractLauncherIcon::TYPE_EXPO; + arg.system_item = icon->GetIconType() == AbstractLauncherIcon::IconType::HOME || + icon->GetIconType() == AbstractLauncherIcon::IconType::HUD; + arg.colorify_background = icon->GetIconType() == AbstractLauncherIcon::IconType::HOME || + icon->GetIconType() == AbstractLauncherIcon::IconType::HUD || + icon->GetIconType() == AbstractLauncherIcon::IconType::TRASH || + icon->GetIconType() == AbstractLauncherIcon::IconType::DESKTOP || + icon->GetIconType() == AbstractLauncherIcon::IconType::DEVICE || + icon->GetIconType() == AbstractLauncherIcon::IconType::EXPO; // trying to protect against flickering when icon is dragged from dash LP: #863230 if (arg.alpha < 0.2) @@ -787,13 +787,13 @@ void Launcher::SetupRenderArg(AbstractLauncherIcon::Ptr icon, struct timespec co arg.saturation = 0.0; } - arg.active_arrow = icon->GetQuirk(AbstractLauncherIcon::QUIRK_ACTIVE); + arg.active_arrow = icon->GetQuirk(AbstractLauncherIcon::Quirk::ACTIVE); /* BFB or HUD icons don't need the active arrow if the overaly is opened * in another monitor */ if (arg.active_arrow && !IsOverlayOpen() && - (icon->GetIconType() == AbstractLauncherIcon::TYPE_HOME || - icon->GetIconType() == AbstractLauncherIcon::TYPE_HUD)) + (icon->GetIconType() == AbstractLauncherIcon::IconType::HOME || + icon->GetIconType() == AbstractLauncherIcon::IconType::HUD)) { arg.active_arrow = false; } @@ -810,9 +810,9 @@ void Launcher::SetupRenderArg(AbstractLauncherIcon::Ptr icon, struct timespec co arg.shortcut_label = 0; // we dont need to show strays - if (!icon->GetQuirk(AbstractLauncherIcon::QUIRK_RUNNING)) + if (!icon->GetQuirk(AbstractLauncherIcon::Quirk::RUNNING)) { - if (icon->GetQuirk(AbstractLauncherIcon::QUIRK_URGENT)) + if (icon->GetQuirk(AbstractLauncherIcon::Quirk::URGENT)) { arg.running_arrow = true; arg.window_indicators = 1; @@ -833,13 +833,13 @@ void Launcher::SetupRenderArg(AbstractLauncherIcon::Ptr icon, struct timespec co float urgent_progress = IconUrgentProgress(icon, current); - if (icon->GetQuirk(AbstractLauncherIcon::QUIRK_URGENT)) + if (icon->GetQuirk(AbstractLauncherIcon::Quirk::URGENT)) urgent_progress = CLAMP(urgent_progress * 3.0f, 0.0f, 1.0f); // we want to go 3x faster than the urgent normal cycle else urgent_progress = CLAMP(urgent_progress * 3.0f - 2.0f, 0.0f, 1.0f); // we want to go 3x faster than the urgent normal cycle arg.glow_intensity = urgent_progress; - if (icon->GetQuirk(AbstractLauncherIcon::QUIRK_URGENT) && options()->urgent_animation() == URGENT_ANIMATION_WIGGLE) + if (icon->GetQuirk(AbstractLauncherIcon::Quirk::URGENT) && options()->urgent_animation() == URGENT_ANIMATION_WIGGLE) { arg.z_rotation = IconUrgentWiggleValue(icon, current); } @@ -1181,10 +1181,10 @@ void Launcher::DesaturateIcons() { for (auto icon : *_model) { - if (icon->GetIconType () != AbstractLauncherIcon::TYPE_HOME && - icon->GetIconType () != AbstractLauncherIcon::TYPE_HUD) + if (icon->GetIconType () != AbstractLauncherIcon::IconType::HOME && + icon->GetIconType () != AbstractLauncherIcon::IconType::HUD) { - icon->SetQuirk(AbstractLauncherIcon::QUIRK_DESAT, true); + icon->SetQuirk(AbstractLauncherIcon::Quirk::DESAT, true); } icon->HideTooltip(); @@ -1195,7 +1195,7 @@ void Launcher::SaturateIcons() { for (auto icon : *_model) { - icon->SetQuirk(AbstractLauncherIcon::QUIRK_DESAT, false); + icon->SetQuirk(AbstractLauncherIcon::Quirk::DESAT, false); } } @@ -1473,11 +1473,14 @@ void Launcher::SetHideMode(LauncherHideMode hidemode) } else { + static bool first_time = true; + _parent->EnableInputWindow(true, launcher::window_title, false, false); - if (!sources_.GetSource(STRUT_HACK_TIMEOUT)) + if (first_time && !sources_.GetSource(STRUT_HACK_TIMEOUT)) { sources_.AddTimeout(1000, sigc::mem_fun(this, &Launcher::StrutHack), STRUT_HACK_TIMEOUT); + first_time = false; } _parent->InputWindowEnableStruts(true); @@ -1712,7 +1715,7 @@ void Launcher::EnsureIconOnScreen(AbstractLauncherIcon::Ptr selection) int natural_y = 0; for (auto icon : *_model) { - if (!icon->GetQuirk(AbstractLauncherIcon::QUIRK_VISIBLE) || !icon->IsVisibleOnMonitor(monitor)) + if (!icon->GetQuirk(AbstractLauncherIcon::Quirk::VISIBLE) || !icon->IsVisibleOnMonitor(monitor)) continue; if (icon == selection) @@ -2015,7 +2018,7 @@ void Launcher::StartIconDragRequest(int x, int y) // FIXME: nux doesn't give nux::GetEventButton (button_flags) there, relying // on an internal Launcher property then - if (drag_icon && (_last_button_press == 1) && _model->IconHasSister(drag_icon)) + if (drag_icon && _last_button_press == 1 && _model->IconHasSister(drag_icon)) { SetActionState(ACTION_DRAG_ICON); StartIconDrag(drag_icon); @@ -2065,9 +2068,9 @@ void Launcher::EndIconDrag() { AbstractLauncherIcon::Ptr hovered_icon = MouseIconIntersection(_mouse_position.x, _mouse_position.y); - if (hovered_icon && hovered_icon->GetIconType() == AbstractLauncherIcon::TYPE_TRASH) + if (hovered_icon && hovered_icon->GetIconType() == AbstractLauncherIcon::IconType::TRASH) { - hovered_icon->SetQuirk(AbstractLauncherIcon::QUIRK_PULSE_ONCE, true); + hovered_icon->SetQuirk(AbstractLauncherIcon::Quirk::PULSE_ONCE, true); launcher_removerequest.emit(_drag_icon); @@ -2126,7 +2129,7 @@ void Launcher::UpdateDragWindowPosition(int x, int y) LauncherModel::iterator prevIt = _model->end(); for (it = _model->begin(); it != _model->end(); ++it) { - if (!(*it)->GetQuirk(AbstractLauncherIcon::QUIRK_VISIBLE) || !(*it)->IsVisibleOnMonitor(monitor)) + if (!(*it)->GetQuirk(AbstractLauncherIcon::Quirk::VISIBLE) || !(*it)->IsVisibleOnMonitor(monitor)) continue; if ((*it) == hovered_icon) { @@ -2144,6 +2147,15 @@ void Launcher::UpdateDragWindowPosition(int x, int y) } } } + + if (progress >= 1.0f) + { + _model->ReorderSmart(_drag_icon, hovered_icon, true); + } + else if (progress == 0.0f) + { + _model->ReorderBefore(_drag_icon, hovered_icon, false); + } } } } @@ -2470,7 +2482,7 @@ AbstractLauncherIcon::Ptr Launcher::MouseIconIntersection(int x, int y) for (it = _model->begin(); it != _model->end(); ++it) { - if (!(*it)->GetQuirk(AbstractLauncherIcon::QUIRK_VISIBLE) || !(*it)->IsVisibleOnMonitor(monitor)) + if (!(*it)->GetQuirk(AbstractLauncherIcon::Quirk::VISIBLE) || !(*it)->IsVisibleOnMonitor(monitor)) continue; nux::Point2 screen_coord [4]; @@ -2587,13 +2599,13 @@ void Launcher::OnDNDDataCollected(const std::list<char*>& mimes) { if (it->ShouldHighlightOnDrag(_dnd_data)) { - it->SetQuirk(AbstractLauncherIcon::QUIRK_DESAT, false); - it->SetQuirk(AbstractLauncherIcon::QUIRK_PRESENTED, true); + it->SetQuirk(AbstractLauncherIcon::Quirk::DESAT, false); + it->SetQuirk(AbstractLauncherIcon::Quirk::PRESENTED, true); } else { - it->SetQuirk(AbstractLauncherIcon::QUIRK_DESAT, true); - it->SetQuirk(AbstractLauncherIcon::QUIRK_PRESENTED, false); + it->SetQuirk(AbstractLauncherIcon::Quirk::DESAT, true); + it->SetQuirk(AbstractLauncherIcon::Quirk::PRESENTED, false); } } } @@ -2624,8 +2636,8 @@ void Launcher::DndReset() for (auto it : *_model) { - it->SetQuirk(AbstractLauncherIcon::QUIRK_DESAT, is_overlay_open); - it->SetQuirk(AbstractLauncherIcon::QUIRK_PRESENTED, false); + it->SetQuirk(AbstractLauncherIcon::Quirk::DESAT, is_overlay_open); + it->SetQuirk(AbstractLauncherIcon::Quirk::PRESENTED, false); } DndHoveredIconReset(); @@ -2638,7 +2650,7 @@ void Launcher::DndHoveredIconReset() if (_steal_drag && _dnd_hovered_icon) { - _dnd_hovered_icon->SetQuirk(AbstractLauncherIcon::QUIRK_VISIBLE, false); + _dnd_hovered_icon->SetQuirk(AbstractLauncherIcon::Quirk::VISIBLE, false); _dnd_hovered_icon->remove.emit(_dnd_hovered_icon); } @@ -2695,9 +2707,9 @@ void Launcher::ProcessDndMove(int x, int y, std::list<char*> mimes) for (auto it : *_model) { if (it->ShouldHighlightOnDrag(_dnd_data)) - it->SetQuirk(AbstractLauncherIcon::QUIRK_DESAT, false); + it->SetQuirk(AbstractLauncherIcon::Quirk::DESAT, false); else - it->SetQuirk(AbstractLauncherIcon::QUIRK_DESAT, true); + it->SetQuirk(AbstractLauncherIcon::Quirk::DESAT, true); } } } @@ -2726,10 +2738,10 @@ void Launcher::ProcessDndMove(int x, int y, std::list<char*> mimes) bool hovered_icon_is_appropriate = false; if (hovered_icon) { - if (hovered_icon->GetIconType() == AbstractLauncherIcon::TYPE_TRASH) + if (hovered_icon->GetIconType() == AbstractLauncherIcon::IconType::TRASH) _steal_drag = false; - if (hovered_icon->GetIconType() == AbstractLauncherIcon::TYPE_APPLICATION || hovered_icon->GetIconType() == AbstractLauncherIcon::TYPE_EXPO) + if (hovered_icon->GetIconType() == AbstractLauncherIcon::IconType::APPLICATION || hovered_icon->GetIconType() == AbstractLauncherIcon::IconType::EXPO) hovered_icon_is_appropriate = true; } @@ -2753,7 +2765,7 @@ void Launcher::ProcessDndMove(int x, int y, std::list<char*> mimes) } else { - _dnd_hovered_icon->SetQuirk(AbstractLauncherIcon::QUIRK_VISIBLE, false); + _dnd_hovered_icon->SetQuirk(AbstractLauncherIcon::Quirk::VISIBLE, false); _dnd_hovered_icon->remove.emit(_dnd_hovered_icon); _dnd_hovered_icon = nullptr; } diff --git a/launcher/Launcher.h b/launcher/Launcher.h index a44671a3d..5c469cb54 100644 --- a/launcher/Launcher.h +++ b/launcher/Launcher.h @@ -24,6 +24,7 @@ #include <Nux/View.h> #include <Nux/BaseWindow.h> #include <Nux/TimerProc.h> +#include <NuxGraphics/GestureEvent.h> #include <NuxGraphics/IOpenGLAsmShader.h> #include "PointerBarrier.h" @@ -389,6 +390,8 @@ private: UBusManager ubus_; glib::SourceManager sources_; + + friend class TestLauncher; }; } diff --git a/launcher/LauncherController.cpp b/launcher/LauncherController.cpp index 9b627daad..2ee6150c3 100644 --- a/launcher/LauncherController.cpp +++ b/launcher/LauncherController.cpp @@ -361,7 +361,7 @@ Controller::Impl::OnLauncherAddRequestSpecial(std::string const& path, if (result) { - result->SetQuirk(AbstractLauncherIcon::QUIRK_VISIBLE, false); + result->SetQuirk(AbstractLauncherIcon::Quirk::VISIBLE, false); result->Animate(CurrentLauncher(), icon_x, icon_y, icon_size); RegisterIcon(result); Save(); @@ -370,7 +370,7 @@ Controller::Impl::OnLauncherAddRequestSpecial(std::string const& path, void Controller::Impl::OnSCIconAnimationComplete(AbstractLauncherIcon::Ptr icon) { - icon->SetQuirk(AbstractLauncherIcon::QUIRK_VISIBLE, true); + icon->SetQuirk(AbstractLauncherIcon::Quirk::VISIBLE, true); launcher_->ForceReveal(false); } @@ -410,7 +410,7 @@ void Controller::Impl::OnLauncherRemoveRequest(AbstractLauncherIcon::Ptr icon) { switch (icon->GetIconType()) { - case AbstractLauncherIcon::TYPE_APPLICATION: + case AbstractLauncherIcon::IconType::APPLICATION: { BamfLauncherIcon* bamf_icon = dynamic_cast<BamfLauncherIcon*>(icon.GetPointer()); @@ -422,7 +422,7 @@ void Controller::Impl::OnLauncherRemoveRequest(AbstractLauncherIcon::Ptr icon) break; } - case AbstractLauncherIcon::TYPE_DEVICE: + case AbstractLauncherIcon::IconType::DEVICE: { DeviceLauncherIcon* device_icon = dynamic_cast<DeviceLauncherIcon*>(icon.GetPointer()); @@ -469,7 +469,7 @@ void Controller::Impl::OnFavoriteStoreFavoriteAdded(std::string const& entry, st { for (auto it : bamf_list) { - if (it->GetQuirk(AbstractLauncherIcon::QUIRK_VISIBLE) && pos == it->DesktopFile()) + if (it->GetQuirk(AbstractLauncherIcon::Quirk::VISIBLE) && pos == it->DesktopFile()) other = it; } } @@ -502,13 +502,13 @@ void Controller::Impl::OnFavoriteStoreFavoriteAdded(std::string const& entry, st void Controller::Impl::OnFavoriteStoreFavoriteRemoved(std::string const& entry) { - for (auto it : model_->GetSublist<BamfLauncherIcon> ()) + for (auto icon : model_->GetSublist<BamfLauncherIcon> ()) { - if (it->DesktopFile() == entry) + if (icon->DesktopFile() == entry) { - OnLauncherRemoveRequest(it); + icon->UnStick(); break; - } + } } } @@ -570,9 +570,9 @@ void Controller::Impl::InsertExpoAction() SimpleLauncherIcon* icon = static_cast<SimpleLauncherIcon*>(expo_icon_.GetPointer()); icon->tooltip_text = _("Workspace Switcher"); icon->icon_name = "workspace-switcher"; - icon->SetQuirk(AbstractLauncherIcon::QUIRK_VISIBLE, true); - icon->SetQuirk(AbstractLauncherIcon::QUIRK_RUNNING, false); - icon->SetIconType(AbstractLauncherIcon::TYPE_EXPO); + icon->SetQuirk(AbstractLauncherIcon::Quirk::VISIBLE, true); + icon->SetQuirk(AbstractLauncherIcon::Quirk::RUNNING, false); + icon->SetIconType(AbstractLauncherIcon::IconType::EXPO); icon->SetShortcut('s'); on_expoicon_activate_connection_ = icon->activate.connect(sigc::mem_fun(this, &Impl::OnExpoActivated)); @@ -788,7 +788,7 @@ std::vector<AbstractLauncherIcon::Ptr> Controller::GetAltTabIcons(bool current, if (icon->ShowInSwitcher(current)) { //otherwise we get two desktop icons in the switcher. - if (icon->GetIconType() != AbstractLauncherIcon::IconType::TYPE_DESKTOP) + if (icon->GetIconType() != AbstractLauncherIcon::IconType::DESKTOP) { results.push_back(icon); } @@ -946,7 +946,7 @@ bool Controller::HandleLauncherKeyEvent(Display *display, unsigned int key_sym, if ((XKeysymToKeycode(display, (*it)->GetShortcut()) == key_code) || ((gchar)((*it)->GetShortcut()) == key_string[0])) { - struct timespec last_action_time = (*it)->GetQuirkTime(AbstractLauncherIcon::QUIRK_LAST_ACTION); + struct timespec last_action_time = (*it)->GetQuirkTime(AbstractLauncherIcon::Quirk::LAST_ACTION); struct timespec current; TimeUtil::SetTimeStruct(¤t); if (TimeUtil::TimeDelta(¤t, &last_action_time) > local::ignore_repeat_shortcut_duration) @@ -1052,7 +1052,7 @@ void Controller::KeyNavTerminate(bool activate) { /* If the selected icon is running, we must not restore the input to the old */ AbstractLauncherIcon::Ptr const& icon = pimpl->model_->Selection(); - pimpl->keynav_restore_window_ = !icon->GetQuirk(AbstractLauncherIcon::QUIRK_RUNNING); + pimpl->keynav_restore_window_ = !icon->GetQuirk(AbstractLauncherIcon::Quirk::RUNNING); } pimpl->keyboard_launcher_->ExitKeyNavMode(); diff --git a/launcher/LauncherIcon.cpp b/launcher/LauncherIcon.cpp index e0eead166..71f49acbc 100644 --- a/launcher/LauncherIcon.cpp +++ b/launcher/LauncherIcon.cpp @@ -81,14 +81,14 @@ LauncherIcon::LauncherIcon() , _background_color(nux::color::White) , _glow_color(nux::color::White) , _shortcut(0) - , _icon_type(TYPE_NONE) + , _icon_type(IconType::NONE) , _center(max_num_monitors) , _has_visible_window(max_num_monitors) , _last_stable(max_num_monitors) , _parent_geo(max_num_monitors) , _saved_center(max_num_monitors) { - for (int i = 0; i < QUIRK_LAST; i++) + for (unsigned i = 0; i < unsigned(Quirk::LAST); i++) { _quirks[i] = false; _quirk_times[i].tv_sec = 0; @@ -119,7 +119,7 @@ LauncherIcon::LauncherIcon() LauncherIcon::~LauncherIcon() { - SetQuirk(QUIRK_URGENT, false); + SetQuirk(Quirk::URGENT, false); // clean up the whole signal-callback mess if (needs_redraw_connection.connected()) @@ -190,19 +190,19 @@ LauncherIcon::AddProperties(GVariantBuilder* builder) .add("center_x", _center[0].x) .add("center_y", _center[0].y) .add("center_z", _center[0].z) - .add("related_windows", static_cast<unsigned int>(Windows().size())) - .add("icon_type", _icon_type) + .add("related_windows", Windows().size()) + .add("icon_type", unsigned(_icon_type)) .add("tooltip_text", tooltip_text()) .add("sort_priority", _sort_priority) .add("shortcut", _shortcut) .add("monitors_visibility", g_variant_builder_end(&monitors_builder)) - .add("active", GetQuirk(QUIRK_ACTIVE)) - .add("visible", GetQuirk(QUIRK_VISIBLE)) - .add("urgent", GetQuirk(QUIRK_URGENT)) - .add("running", GetQuirk(QUIRK_RUNNING)) - .add("starting", GetQuirk(QUIRK_STARTING)) - .add("desaturated", GetQuirk(QUIRK_DESAT)) - .add("presented", GetQuirk(QUIRK_PRESENTED)); + .add("active", GetQuirk(Quirk::ACTIVE)) + .add("visible", GetQuirk(Quirk::VISIBLE)) + .add("urgent", GetQuirk(Quirk::URGENT)) + .add("running", GetQuirk(Quirk::RUNNING)) + .add("starting", GetQuirk(Quirk::STARTING)) + .add("desaturated", GetQuirk(Quirk::DESAT)) + .add("presented", GetQuirk(Quirk::PRESENTED)); } void @@ -215,7 +215,7 @@ LauncherIcon::Activate(ActionArg arg) ActivateLauncherIcon(arg); - UpdateQuirkTime(QUIRK_LAST_ACTION); + UpdateQuirkTime(Quirk::LAST_ACTION); } void @@ -226,7 +226,7 @@ LauncherIcon::OpenInstance(ActionArg arg) OpenInstanceLauncherIcon(arg); - UpdateQuirkTime(QUIRK_LAST_ACTION); + UpdateQuirkTime(Quirk::LAST_ACTION); } nux::Color LauncherIcon::BackgroundColor() const @@ -715,7 +715,7 @@ void LauncherIcon::SaveCenter() { _saved_center = _center; - UpdateQuirkTime(QUIRK_CENTER_SAVED); + UpdateQuirkTime(Quirk::CENTER_SAVED); } void @@ -747,7 +747,7 @@ LauncherIcon::IsVisibleOnMonitor(int monitor) const bool LauncherIcon::OnPresentTimeout() { - if (!GetQuirk(QUIRK_PRESENTED)) + if (!GetQuirk(Quirk::PRESENTED)) return false; Unpresent(); @@ -763,7 +763,7 @@ float LauncherIcon::PresentUrgency() void LauncherIcon::Present(float present_urgency, int length) { - if (GetQuirk(QUIRK_PRESENTED)) + if (GetQuirk(Quirk::PRESENTED)) return; if (length >= 0) @@ -773,17 +773,17 @@ LauncherIcon::Present(float present_urgency, int length) } _present_urgency = CLAMP(present_urgency, 0.0f, 1.0f); - SetQuirk(QUIRK_PRESENTED, true); + SetQuirk(Quirk::PRESENTED, true); } void LauncherIcon::Unpresent() { - if (!GetQuirk(QUIRK_PRESENTED)) + if (!GetQuirk(Quirk::PRESENTED)) return; _source_manager.Remove(PRESENT_TIMEOUT); - SetQuirk(QUIRK_PRESENTED, false); + SetQuirk(Quirk::PRESENTED, false); } void @@ -792,7 +792,7 @@ LauncherIcon::Remove() if (_quicklist && _quicklist->IsVisible()) _quicklist->Hide(); - SetQuirk(QUIRK_VISIBLE, false); + SetQuirk(Quirk::VISIBLE, false); EmitRemove(); } @@ -823,26 +823,26 @@ LauncherIcon::GetIconType() bool LauncherIcon::GetQuirk(LauncherIcon::Quirk quirk) const { - return _quirks[quirk]; + return _quirks[unsigned(quirk)]; } void LauncherIcon::SetQuirk(LauncherIcon::Quirk quirk, bool value) { - if (_quirks[quirk] == value) + if (_quirks[unsigned(quirk)] == value) return; - _quirks[quirk] = value; - if (quirk == QUIRK_VISIBLE) - TimeUtil::SetTimeStruct(&(_quirk_times[quirk]), &(_quirk_times[quirk]), Launcher::ANIM_DURATION_SHORT); + _quirks[unsigned(quirk)] = value; + if (quirk == Quirk::VISIBLE) + TimeUtil::SetTimeStruct(&(_quirk_times[unsigned(quirk)]), &(_quirk_times[unsigned(quirk)]), Launcher::ANIM_DURATION_SHORT); else - clock_gettime(CLOCK_MONOTONIC, &(_quirk_times[quirk])); + clock_gettime(CLOCK_MONOTONIC, &(_quirk_times[unsigned(quirk)])); EmitNeedsRedraw(); // Present on urgent as a general policy - if (quirk == QUIRK_VISIBLE && value) + if (quirk == Quirk::VISIBLE && value) Present(0.5f, 1500); - if (quirk == QUIRK_URGENT) + if (quirk == Quirk::URGENT) { if (value) { @@ -853,7 +853,7 @@ LauncherIcon::SetQuirk(LauncherIcon::Quirk quirk, bool value) ubus_server_send_message(ubus, UBUS_LAUNCHER_ICON_URGENT_CHANGED, g_variant_new_boolean(value)); } - if (quirk == QUIRK_VISIBLE) + if (quirk == Quirk::VISIBLE) { visibility_changed.emit(); } @@ -871,21 +871,21 @@ LauncherIcon::UpdateQuirkTimeDelayed(guint ms, LauncherIcon::Quirk quirk) void LauncherIcon::UpdateQuirkTime(LauncherIcon::Quirk quirk) { - clock_gettime(CLOCK_MONOTONIC, &(_quirk_times[quirk])); + clock_gettime(CLOCK_MONOTONIC, &(_quirk_times[unsigned(quirk)])); EmitNeedsRedraw(); } void LauncherIcon::ResetQuirkTime(LauncherIcon::Quirk quirk) { - _quirk_times[quirk].tv_sec = 0; - _quirk_times[quirk].tv_nsec = 0; + _quirk_times[unsigned(quirk)].tv_sec = 0; + _quirk_times[unsigned(quirk)].tv_nsec = 0; } struct timespec LauncherIcon::GetQuirkTime(LauncherIcon::Quirk quirk) { - return _quirk_times[quirk]; + return _quirk_times[unsigned(quirk)]; } void @@ -1072,10 +1072,10 @@ LauncherIcon::RemoveEntryRemote(LauncherEntryRemote::Ptr const& remote) RemoveChild(remote.get()); DeleteEmblem(); - SetQuirk(QUIRK_PROGRESS, false); + SetQuirk(Quirk::PROGRESS, false); if (_remote_urgent) - SetQuirk(QUIRK_URGENT, false); + SetQuirk(Quirk::URGENT, false); _menuclient_dynamic_quicklist = nullptr; } @@ -1084,7 +1084,7 @@ void LauncherIcon::OnRemoteUrgentChanged(LauncherEntryRemote* remote) { _remote_urgent = remote->Urgent(); - SetQuirk(QUIRK_URGENT, remote->Urgent()); + SetQuirk(Quirk::URGENT, remote->Urgent()); } void @@ -1151,7 +1151,7 @@ LauncherIcon::OnRemoteCountVisibleChanged(LauncherEntryRemote* remote) void LauncherIcon::OnRemoteProgressVisibleChanged(LauncherEntryRemote* remote) { - SetQuirk(QUIRK_PROGRESS, remote->ProgressVisible()); + SetQuirk(Quirk::PROGRESS, remote->ProgressVisible()); if (remote->ProgressVisible()) SetProgress(remote->Progress()); diff --git a/launcher/LauncherIcon.h b/launcher/LauncherIcon.h index 48cb02a2e..651b04849 100644 --- a/launcher/LauncherIcon.h +++ b/launcher/LauncherIcon.h @@ -336,8 +336,8 @@ private: BaseTexturePtr _emblem; - bool _quirks[QUIRK_LAST]; - struct timespec _quirk_times[QUIRK_LAST]; + bool _quirks[unsigned(Quirk::LAST)]; + struct timespec _quirk_times[unsigned(Quirk::LAST)]; std::list<LauncherEntryRemote::Ptr> _entry_list; diff --git a/launcher/LauncherModel.cpp b/launcher/LauncherModel.cpp index 878942488..15583508b 100644 --- a/launcher/LauncherModel.cpp +++ b/launcher/LauncherModel.cpp @@ -56,7 +56,7 @@ unity::debug::Introspectable::IntrospectableList LauncherModel::GetIntrospectabl bool LauncherModel::IconShouldShelf(AbstractLauncherIcon::Ptr icon) const { - return icon->GetIconType() == AbstractLauncherIcon::TYPE_TRASH; + return icon->GetIconType() == AbstractLauncherIcon::IconType::TRASH; } bool LauncherModel::CompareIcons(AbstractLauncherIcon::Ptr first, AbstractLauncherIcon::Ptr second) @@ -161,7 +161,7 @@ LauncherModel::IconHasSister(AbstractLauncherIcon::Ptr icon) const const_iterator it; const_iterator end; - if (icon && icon->GetIconType() == AbstractLauncherIcon::TYPE_DEVICE) + if (icon && icon->GetIconType() == AbstractLauncherIcon::IconType::DEVICE) return true; if (IconShouldShelf(icon)) @@ -357,7 +357,7 @@ void LauncherModel::SelectNext() if (temp >= Size()) temp = 0; - if (_inner[temp]->GetQuirk(AbstractLauncherIcon::QUIRK_VISIBLE)) + if (_inner[temp]->GetQuirk(AbstractLauncherIcon::Quirk::VISIBLE)) { selection_ = temp; selection_changed.emit(Selection()); @@ -377,7 +377,7 @@ void LauncherModel::SelectPrevious() if (temp < 0) temp = Size() - 1; - if (_inner[temp]->GetQuirk(AbstractLauncherIcon::QUIRK_VISIBLE)) + if (_inner[temp]->GetQuirk(AbstractLauncherIcon::Quirk::VISIBLE)) { selection_ = temp; selection_changed.emit(Selection()); diff --git a/launcher/LauncherOptions.cpp b/launcher/LauncherOptions.cpp index 58b29d36d..bee2f0dfa 100644 --- a/launcher/LauncherOptions.cpp +++ b/launcher/LauncherOptions.cpp @@ -31,7 +31,7 @@ Options::Options() , launch_animation(LAUNCH_ANIMATION_PULSE) , urgent_animation(URGENT_ANIMATION_WIGGLE) , auto_hide_animation(FADE_AND_SLIDE) - , backlight_mode(BACKLIGHT_ALWAYS_ON) + , backlight_mode(BACKLIGHT_NORMAL) , reveal_trigger(RevealTrigger::EDGE) , icon_size(48) , tile_size(54) diff --git a/launcher/MockLauncherIcon.h b/launcher/MockLauncherIcon.h index 46b0cbf72..df00452ac 100644 --- a/launcher/MockLauncherIcon.h +++ b/launcher/MockLauncherIcon.h @@ -49,9 +49,9 @@ public: { tooltip_text = "Mock Icon"; sort_priority_ = 0; - type_ = TYPE_APPLICATION; + type_ = IconType::APPLICATION; - for (int i = 0; i < QUIRK_LAST; ++i) + for (unsigned i = 0; i < unsigned(Quirk::LAST); ++i) { quirks_[i] = false; } @@ -206,20 +206,20 @@ public: bool GetQuirk(Quirk quirk) const { - return quirks_[quirk]; + return quirks_[unsigned(quirk)]; } void SetQuirk(Quirk quirk, bool value) { - quirks_[quirk] = value; + quirks_[unsigned(quirk)] = value; + clock_gettime(CLOCK_MONOTONIC, &(quirk_times_[unsigned(quirk)])); } void ResetQuirkTime(Quirk quirk) {}; struct timespec GetQuirkTime(Quirk quirk) { - timespec tv; - return tv; + return quirk_times_[unsigned(quirk)]; } IconType GetIconType() @@ -344,7 +344,8 @@ private: nux::BaseTexture* icon_; int sort_priority_; IconType type_; - bool quirks_[QUIRK_LAST]; + bool quirks_[unsigned(Quirk::LAST)]; + timespec quirk_times_[unsigned(Quirk::LAST)]; }; } diff --git a/launcher/SoftwareCenterLauncherIcon.cpp b/launcher/SoftwareCenterLauncherIcon.cpp index 2780457bb..e88c6462f 100644 --- a/launcher/SoftwareCenterLauncherIcon.cpp +++ b/launcher/SoftwareCenterLauncherIcon.cpp @@ -49,7 +49,7 @@ SoftwareCenterLauncherIcon::SoftwareCenterLauncherIcon(BamfApplication* app, aptdaemon_trans_.Connect("PropertyChanged", sigc::mem_fun(this, &SoftwareCenterLauncherIcon::OnPropertyChanged)); aptdaemon_trans_.Connect("Finished", sigc::mem_fun(this, &SoftwareCenterLauncherIcon::OnFinished)); - SetIconType(TYPE_APPLICATION); + SetIconType(IconType::APPLICATION); icon_name = icon_path; if (!aptdaemon_trans_id_.empty()) // Application is being installed, or hasn't been installed yet tooltip_text = _("Waiting to install"); @@ -114,13 +114,13 @@ void SoftwareCenterLauncherIcon::ActivateLauncherIcon(ActionArg arg) { if (needs_urgent_) { - SetQuirk(QUIRK_URGENT, false); + SetQuirk(Quirk::URGENT, false); needs_urgent_ = false; } BamfLauncherIcon::ActivateLauncherIcon(arg); } else - SetQuirk(QUIRK_STARTING, false); + SetQuirk(Quirk::STARTING, false); } void SoftwareCenterLauncherIcon::OnFinished(GVariant *params) @@ -131,8 +131,8 @@ void SoftwareCenterLauncherIcon::OnFinished(GVariant *params) if (exit_state.Str() == "exit-success") { tooltip_text = BamfName(); - SetQuirk(QUIRK_PROGRESS, false); - SetQuirk(QUIRK_URGENT, true); + SetQuirk(Quirk::PROGRESS, false); + SetQuirk(Quirk::URGENT, true); SetProgress(0.0f); finished_ = true; needs_urgent_ = true; @@ -157,7 +157,7 @@ void SoftwareCenterLauncherIcon::OnPropertyChanged(GVariant* params) if (progress < 100) { - SetQuirk(QUIRK_PROGRESS, true); + SetQuirk(Quirk::PROGRESS, true); finished_ = false; } diff --git a/launcher/SpacerLauncherIcon.cpp b/launcher/SpacerLauncherIcon.cpp index 556b13cf0..6c46b6749 100644 --- a/launcher/SpacerLauncherIcon.cpp +++ b/launcher/SpacerLauncherIcon.cpp @@ -30,9 +30,9 @@ namespace launcher SpacerLauncherIcon::SpacerLauncherIcon(int monitor) : SingleMonitorLauncherIcon(monitor) { - SetQuirk(QUIRK_VISIBLE, true); - SetQuirk(QUIRK_RUNNING, false); - SetIconType(TYPE_APPLICATION); + SetQuirk(Quirk::VISIBLE, true); + SetQuirk(Quirk::RUNNING, false); + SetIconType(IconType::APPLICATION); tooltip_text = _("Drop To Add Application"); } diff --git a/launcher/SwitcherController.cpp b/launcher/SwitcherController.cpp index 0f1911d5e..84b1fe095 100644 --- a/launcher/SwitcherController.cpp +++ b/launcher/SwitcherController.cpp @@ -226,7 +226,7 @@ void Controller::Hide(bool accept_state) } else { - if (selection->GetQuirk (AbstractLauncherIcon::QUIRK_ACTIVE) && + if (selection->GetQuirk(AbstractLauncherIcon::Quirk::ACTIVE) && !model_->DetailXids().empty ()) { selection->Activate(ActionArg (ActionArg::SWITCHER, 0, model_->DetailXids()[0])); @@ -414,10 +414,10 @@ bool Controller::CompareSwitcherItemsPriority(AbstractLauncherIcon::Ptr first, if (first->GetIconType() == second->GetIconType()) return first->SwitcherPriority() > second->SwitcherPriority(); - if (first->GetIconType() == AbstractLauncherIcon::IconType::TYPE_DESKTOP) + if (first->GetIconType() == AbstractLauncherIcon::IconType::DESKTOP) return true; - if (second->GetIconType() == AbstractLauncherIcon::IconType::TYPE_DESKTOP) + if (second->GetIconType() == AbstractLauncherIcon::IconType::DESKTOP) return false; return first->GetIconType() < second->GetIconType(); diff --git a/launcher/SwitcherModel.cpp b/launcher/SwitcherModel.cpp index 3f94e88f9..d0fea19d7 100644 --- a/launcher/SwitcherModel.cpp +++ b/launcher/SwitcherModel.cpp @@ -42,7 +42,7 @@ SwitcherModel::SwitcherModel(std::vector<AbstractLauncherIcon::Ptr> icons) for (auto icon : _inner) { AddChild(icon.GetPointer()); - if (icon->GetQuirk(AbstractLauncherIcon::QUIRK_ACTIVE)) + if (icon->GetQuirk(AbstractLauncherIcon::Quirk::ACTIVE)) _last_active_icon = icon; } } diff --git a/launcher/TrashLauncherIcon.cpp b/launcher/TrashLauncherIcon.cpp index 057af3baa..b91efd13f 100644 --- a/launcher/TrashLauncherIcon.cpp +++ b/launcher/TrashLauncherIcon.cpp @@ -39,23 +39,20 @@ namespace TrashLauncherIcon::TrashLauncherIcon() : SimpleLauncherIcon() - , on_trash_changed_handler_id_(0) , proxy_("org.gnome.Nautilus", "/org/gnome/Nautilus", "org.gnome.Nautilus.FileOperations") + , cancellable_(g_cancellable_new()) { tooltip_text = _("Trash"); icon_name = "user-trash"; - SetQuirk(QUIRK_VISIBLE, true); - SetQuirk(QUIRK_RUNNING, false); - SetIconType(TYPE_TRASH); + SetQuirk(Quirk::VISIBLE, true); + SetQuirk(Quirk::RUNNING, false); + SetIconType(IconType::TRASH); SetShortcut('t'); glib::Object<GFile> location(g_file_new_for_uri("trash:///")); glib::Error err; - trash_monitor_ = g_file_monitor_directory(location, - G_FILE_MONITOR_NONE, - NULL, - &err); + trash_monitor_ = g_file_monitor_directory(location, G_FILE_MONITOR_NONE, nullptr, &err); if (err) { @@ -63,10 +60,10 @@ TrashLauncherIcon::TrashLauncherIcon() } else { - on_trash_changed_handler_id_ = g_signal_connect(trash_monitor_, - "changed", - G_CALLBACK(&TrashLauncherIcon::OnTrashChanged), - this); + trash_changed_signal_.Connect(trash_monitor_, "changed", + [this] (GFileMonitor*, GFile*, GFile*, GFileMonitorEvent) { + UpdateTrashIcon(); + }); } UpdateTrashIcon(); @@ -74,9 +71,7 @@ TrashLauncherIcon::TrashLauncherIcon() TrashLauncherIcon::~TrashLauncherIcon() { - if (on_trash_changed_handler_id_ != 0) - g_signal_handler_disconnect((gpointer) trash_monitor_, - on_trash_changed_handler_id_); + g_cancellable_cancel(cancellable_); } std::list<DbusmenuMenuitem*> TrashLauncherIcon::GetMenus() @@ -121,10 +116,9 @@ void TrashLauncherIcon::UpdateTrashIcon() G_FILE_ATTRIBUTE_STANDARD_ICON, G_FILE_QUERY_INFO_NONE, 0, - NULL, + cancellable_, &TrashLauncherIcon::UpdateTrashIconCb, this); - } void TrashLauncherIcon::UpdateTrashIconCb(GObject* source, @@ -147,16 +141,6 @@ void TrashLauncherIcon::UpdateTrashIconCb(GObject* source, } } -void TrashLauncherIcon::OnTrashChanged(GFileMonitor* monitor, - GFile* file, - GFile* other_file, - GFileMonitorEvent event_type, - gpointer data) -{ - TrashLauncherIcon* self = (TrashLauncherIcon*) data; - self->UpdateTrashIcon(); -} - nux::DndAction TrashLauncherIcon::OnQueryAcceptDrop(DndData const& dnd_data) { @@ -177,7 +161,7 @@ void TrashLauncherIcon::OnAcceptDrop(DndData const& dnd_data) g_file_trash(file, NULL, NULL); } - SetQuirk(LauncherIcon::QUIRK_PULSE_ONCE, true); + SetQuirk(LauncherIcon::Quirk::PULSE_ONCE, true); } std::string TrashLauncherIcon::GetName() const diff --git a/launcher/TrashLauncherIcon.h b/launcher/TrashLauncherIcon.h index cf7e9277d..204d36ba7 100644 --- a/launcher/TrashLauncherIcon.h +++ b/launcher/TrashLauncherIcon.h @@ -23,6 +23,7 @@ #include <gio/gio.h> #include <UnityCore/GLibDBusProxy.h> #include <UnityCore/GLibWrapper.h> +#include <UnityCore/GLibSignal.h> #include "DndData.h" #include "SimpleLauncherIcon.h" @@ -49,18 +50,17 @@ protected: std::string GetName() const; private: - gulong on_trash_changed_handler_id_; - glib::Object<GFileMonitor> trash_monitor_; - gboolean empty_; - glib::DBusProxy proxy_; - void ActivateLauncherIcon(ActionArg arg); std::list<DbusmenuMenuitem*> GetMenus(); static void UpdateTrashIconCb(GObject* source, GAsyncResult* res, gpointer data); - static void OnTrashChanged(GFileMonitor* monitor, GFile* file, GFile* other_file, - GFileMonitorEvent event_type, gpointer data); static void OnEmptyTrash(DbusmenuMenuitem* item, int time, TrashLauncherIcon* self); + + gboolean empty_; + glib::DBusProxy proxy_; + glib::Object<GCancellable> cancellable_; + glib::Object<GFileMonitor> trash_monitor_; + glib::Signal<void, GFileMonitor*, GFile*, GFile*, GFileMonitorEvent> trash_changed_signal_; }; } diff --git a/manual-tests/Launcher.txt b/manual-tests/Launcher.txt index 4f1ba8f82..407f6ed14 100644 --- a/manual-tests/Launcher.txt +++ b/manual-tests/Launcher.txt @@ -679,3 +679,14 @@ Expected Result: * No icon flickers near the top panel. * See https://bugs.launchpad.net/unity/+bug/980942/+attachment/3059914/+files/launcher-accordion-effect-tooltip-bug.ogv. + +No flickering when resizing the launcher +----------------------------------------- +Actions: +* Open gedit. +* Maximize it. Make sure it remains maximized during the test. +* Open Appearance panel in System Settings. +* Change Launcher Icon Size. + +Expected Results: +* The gedit window must not flicker behind the launcher. diff --git a/plugins/unityshell/src/unity-launcher-icon-accessible.cpp b/plugins/unityshell/src/unity-launcher-icon-accessible.cpp index 44b5051a7..b0331eb00 100644 --- a/plugins/unityshell/src/unity-launcher-icon-accessible.cpp +++ b/plugins/unityshell/src/unity-launcher-icon-accessible.cpp @@ -281,7 +281,7 @@ unity_launcher_icon_accessible_ref_state_set(AtkObject* obj) icon = dynamic_cast<LauncherIcon*>(nux_object); - if (icon->GetQuirk(LauncherIcon::QUIRK_VISIBLE)) + if (icon->GetQuirk(LauncherIcon::Quirk::VISIBLE)) { atk_state_set_add_state(state_set, ATK_STATE_VISIBLE); atk_state_set_add_state(state_set, ATK_STATE_SHOWING); diff --git a/plugins/unityshell/src/unityshell.cpp b/plugins/unityshell/src/unityshell.cpp index 4ea5106f2..99871940a 100644 --- a/plugins/unityshell/src/unityshell.cpp +++ b/plugins/unityshell/src/unityshell.cpp @@ -1895,7 +1895,7 @@ bool UnityScreen::altTabInitiateCommon(CompAction* action, switcher::ShowMode sh auto results = launcher_controller_->GetAltTabIcons(show_mode == switcher::ShowMode::CURRENT_VIEWPORT, switcher_controller_->IsShowDesktopDisabled()); - if (!(results.size() == 1 && results[0]->GetIconType() == AbstractLauncherIcon::IconType::TYPE_DESKTOP) && !results.empty()) + if (!(results.size() == 1 && results[0]->GetIconType() == AbstractLauncherIcon::IconType::DESKTOP) && !results.empty()) switcher_controller_->Show(show_mode, switcher::SortMode::FOCUS_ORDER, false, results); return true; diff --git a/plugins/unityshell/unityshell.xml.in b/plugins/unityshell/unityshell.xml.in index 5b89d6543..1f0dab978 100644 --- a/plugins/unityshell/unityshell.xml.in +++ b/plugins/unityshell/unityshell.xml.in @@ -205,7 +205,7 @@ <_long>Change how the icons are backlit</_long> <min>0</min> <max>4</max> - <default>0</default> + <default>1</default> <desc> <value>0</value> <_name>Backlight Always On</_name> diff --git a/po/POTFILES.in b/po/POTFILES.in index 7fa32987e..33ce23678 100644 --- a/po/POTFILES.in +++ b/po/POTFILES.in @@ -8,11 +8,13 @@ dash/LensView.cpp dash/PlacesGroup.cpp hud/HudController.cpp hud/HudView.cpp +hud/StandaloneHud.cpp launcher/BFBLauncherIcon.cpp launcher/BamfLauncherIcon.cpp launcher/DesktopLauncherIcon.cpp launcher/DeviceLauncherIcon.cpp launcher/LauncherController.cpp +launcher/HudLauncherIcon.cpp launcher/SoftwareCenterLauncherIcon.cpp launcher/SpacerLauncherIcon.cpp launcher/TrashLauncherIcon.cpp @@ -29,6 +31,8 @@ plugins/unityshell/src/unityshell.cpp plugins/unityshell/unityshell.xml.in shortcuts/ShortcutHintPrivate.cpp shortcuts/ShortcutView.cpp +shortcuts/StandaloneShortcuts.cpp unity-shared/DashStyle.cpp unity-shared/SearchBar.cpp +unity-shared/UScreen.cpp diff --git a/tests/autopilot/unity/tests/launcher/test_icon_behavior.py b/tests/autopilot/unity/tests/launcher/test_icon_behavior.py index bd6eab38c..798283d21 100644 --- a/tests/autopilot/unity/tests/launcher/test_icon_behavior.py +++ b/tests/autopilot/unity/tests/launcher/test_icon_behavior.py @@ -66,50 +66,50 @@ class LauncherIconsTests(LauncherTestCase): of that application. """ - mah_win1 = self.start_app_window("Mahjongg") + char_win1 = self.start_app_window("Character Map") calc_win = self.start_app_window("Calculator") - mah_win2 = self.start_app_window("Mahjongg") + char_win2 = self.start_app_window("Character Map") - self.assertVisibleWindowStack([mah_win2, calc_win, mah_win1]) + self.assertVisibleWindowStack([char_win2, calc_win, char_win1]) - mahj_icon = self.launcher.model.get_icon( - desktop_id=mah_win2.application.desktop_file) + char_icon = self.launcher.model.get_icon( + desktop_id=char_win2.application.desktop_file) calc_icon = self.launcher.model.get_icon( desktop_id=calc_win.application.desktop_file) self.launcher_instance.click_launcher_icon(calc_icon) self.assertProperty(calc_win, is_focused=True) - self.assertVisibleWindowStack([calc_win, mah_win2, mah_win1]) + self.assertVisibleWindowStack([calc_win, char_win2, char_win1]) - self.launcher_instance.click_launcher_icon(mahj_icon) - self.assertProperty(mah_win2, is_focused=True) - self.assertVisibleWindowStack([mah_win2, calc_win, mah_win1]) + self.launcher_instance.click_launcher_icon(char_icon) + self.assertProperty(char_win2, is_focused=True) + self.assertVisibleWindowStack([char_win2, calc_win, char_win1]) self.keybinding("window/minimize") - self.assertThat(lambda: mah_win2.is_hidden, Eventually(Equals(True))) + self.assertThat(lambda: char_win2.is_hidden, Eventually(Equals(True))) self.assertProperty(calc_win, is_focused=True) - self.assertVisibleWindowStack([calc_win, mah_win1]) + self.assertVisibleWindowStack([calc_win, char_win1]) - self.launcher_instance.click_launcher_icon(mahj_icon) - self.assertProperty(mah_win1, is_focused=True) - self.assertThat(lambda: mah_win2.is_hidden, Eventually(Equals(True))) - self.assertVisibleWindowStack([mah_win1, calc_win]) + self.launcher_instance.click_launcher_icon(char_icon) + self.assertProperty(char_win1, is_focused=True) + self.assertThat(lambda: char_win2.is_hidden, Eventually(Equals(True))) + self.assertVisibleWindowStack([char_win1, calc_win]) def test_clicking_icon_twice_initiates_spread(self): """This tests shows that when you click on a launcher icon twice, when an application window is focused, the spread is initiated. """ - calc_win1 = self.start_app_window("Calculator") - calc_win2 = self.start_app_window("Calculator") - calc_app = calc_win1.application + char_win1 = self.start_app_window("Character Map") + char_win2 = self.start_app_window("Character Map") + char_app = char_win1.application - self.assertVisibleWindowStack([calc_win2, calc_win1]) - self.assertProperty(calc_win2, is_focused=True) + self.assertVisibleWindowStack([char_win2, char_win1]) + self.assertProperty(char_win2, is_focused=True) - calc_icon = self.launcher.model.get_icon(desktop_id=calc_app.desktop_file) + char_icon = self.launcher.model.get_icon(desktop_id=char_app.desktop_file) self.addCleanup(self.keybinding, "spread/cancel") - self.launcher_instance.click_launcher_icon(calc_icon) + self.launcher_instance.click_launcher_icon(char_icon) self.assertThat(self.window_manager.scale_active, Eventually(Equals(True))) self.assertThat(self.window_manager.scale_active_for_group, Eventually(Equals(True))) @@ -118,15 +118,15 @@ class LauncherIconsTests(LauncherTestCase): """If scale is initiated through the laucher pressing super must close scale and open the dash. """ - calc_win1 = self.start_app_window("Calculator") - calc_win2 = self.start_app_window("Calculator") - calc_app = calc_win1.application + char_win1 = self.start_app_window("Character Map") + char_win2 = self.start_app_window("Character Map") + char_app = char_win1.application - self.assertVisibleWindowStack([calc_win2, calc_win1]) - self.assertProperty(calc_win2, is_focused=True) + self.assertVisibleWindowStack([char_win2, char_win1]) + self.assertProperty(char_win2, is_focused=True) - calc_icon = self.launcher.model.get_icon(desktop_id=calc_app.desktop_file) - self.launcher_instance.click_launcher_icon(calc_icon) + char_icon = self.launcher.model.get_icon(desktop_id=char_app.desktop_file) + self.launcher_instance.click_launcher_icon(char_icon) self.assertThat(self.window_manager.scale_active, Eventually(Equals(True))) self.dash.ensure_visible() diff --git a/tests/autopilot/unity/tests/test_dash.py b/tests/autopilot/unity/tests/test_dash.py index 18190cb16..7f932c102 100644 --- a/tests/autopilot/unity/tests/test_dash.py +++ b/tests/autopilot/unity/tests/test_dash.py @@ -8,11 +8,10 @@ from __future__ import absolute_import -from time import sleep - +from autopilot.emulators.clipboard import get_clipboard_contents from autopilot.matchers import Eventually -from gtk import Clipboard from testtools.matchers import Equals, NotEquals +from time import sleep from unity.tests import UnityTestCase @@ -305,8 +304,7 @@ class DashClipboardTests(DashTestCase): self.keyboard.press_and_release("Ctrl+a") self.keyboard.press_and_release("Ctrl+c") - cb = Clipboard(selection="CLIPBOARD") - self.assertThat(self.dash.search_string, Eventually(Equals(cb.wait_for_text()))) + self.assertThat(get_clipboard_contents, Eventually(Equals("Copy"))) def test_ctrl_x(self): """ This test if ctrl+x deletes all text and copys it """ @@ -319,8 +317,7 @@ class DashClipboardTests(DashTestCase): self.keyboard.press_and_release("Ctrl+x") self.assertThat(self.dash.search_string, Eventually(Equals(""))) - cb = Clipboard(selection="CLIPBOARD") - self.assertEqual(cb.wait_for_text(), u'Cut') + self.assertThat(get_clipboard_contents, Eventually(Equals('Cut'))) def test_ctrl_c_v(self): """ This test if ctrl+c and ctrl+v copies and pastes text""" diff --git a/tests/autopilot/unity/tests/test_panel.py b/tests/autopilot/unity/tests/test_panel.py index d17e52f5c..74a9504a0 100644 --- a/tests/autopilot/unity/tests/test_panel.py +++ b/tests/autopilot/unity/tests/test_panel.py @@ -807,10 +807,10 @@ class PanelMenuTests(PanelTestsBase): def test_menus_dont_show_if_a_new_application_window_is_opened(self): """This tests the menu discovery feature on new window for a know application.""" - self.open_new_application_window("Calculator") + self.open_new_application_window("Character Map") self.sleep_menu_settle_period() - self.start_app("Calculator") + self.start_app("Character Map") sleep(self.panel.menus.fadein_duration / 1000.0) # Not using Eventually here since this is time-critical. Need to work # out a better way to do this. diff --git a/tests/autopilot/unity/tests/test_quicklist.py b/tests/autopilot/unity/tests/test_quicklist.py index 03d9747a2..37b354fa2 100644 --- a/tests/autopilot/unity/tests/test_quicklist.py +++ b/tests/autopilot/unity/tests/test_quicklist.py @@ -72,14 +72,14 @@ class QuicklistActionTests(UnityTestCase): Then we activate the Calculator quicklist item. Then we actiavte the Mahjongg launcher icon. """ - mah_win1 = self.start_app_window("Mahjongg") + char_win1 = self.start_app_window("Character Map") calc_win = self.start_app_window("Calculator") - mah_win2 = self.start_app_window("Mahjongg") + char_win2 = self.start_app_window("Character Map") - self.assertVisibleWindowStack([mah_win2, calc_win, mah_win1]) + self.assertVisibleWindowStack([char_win2, calc_win, char_win1]) - mahj_icon = self.launcher.model.get_icon( - desktop_id=mah_win1.application.desktop_file) + char_icon = self.launcher.model.get_icon( + desktop_id=char_win1.application.desktop_file) calc_icon = self.launcher.model.get_icon( desktop_id=calc_win.application.desktop_file) @@ -87,29 +87,29 @@ class QuicklistActionTests(UnityTestCase): calc_ql.get_quicklist_application_item(calc_win.application.name).mouse_click() self.assertProperty(calc_win, is_focused=True) - self.assertVisibleWindowStack([calc_win, mah_win2, mah_win1]) + self.assertVisibleWindowStack([calc_win, char_win2, char_win1]) - mahj_ql = self.open_quicklist_for_icon(mahj_icon) - mahj_ql.get_quicklist_application_item(mah_win1.application.name).mouse_click() + char_ql = self.open_quicklist_for_icon(char_icon) + char_ql.get_quicklist_application_item(char_win1.application.name).mouse_click() - self.assertProperty(mah_win2, is_focused=True) - self.assertVisibleWindowStack([mah_win2, calc_win, mah_win1]) + self.assertProperty(char_win2, is_focused=True) + self.assertVisibleWindowStack([char_win2, calc_win, char_win1]) def test_quicklist_application_item_initiate_spread(self): """This tests shows that when you activate a quicklist application item when an application window is focused, the spread is initiated. """ - calc_win1 = self.start_app_window("Calculator") - calc_win2 = self.start_app_window("Calculator") - calc_app = calc_win1.application + char_win1 = self.start_app_window("Character Map") + char_win2 = self.start_app_window("Character Map") + char_app = char_win1.application - self.assertVisibleWindowStack([calc_win2, calc_win1]) - self.assertProperty(calc_win2, is_focused=True) + self.assertVisibleWindowStack([char_win2, char_win1]) + self.assertProperty(char_win2, is_focused=True) - calc_icon = self.launcher.model.get_icon(desktop_id=calc_app.desktop_file) + char_icon = self.launcher.model.get_icon(desktop_id=char_app.desktop_file) - calc_ql = self.open_quicklist_for_icon(calc_icon) - app_item = calc_ql.get_quicklist_application_item(calc_app.name) + char_ql = self.open_quicklist_for_icon(char_icon) + app_item = char_ql.get_quicklist_application_item(char_app.name) self.addCleanup(self.keybinding, "spread/cancel") app_item.mouse_click() diff --git a/tests/autopilot/unity/tests/test_switcher.py b/tests/autopilot/unity/tests/test_switcher.py index 4b33b4ff4..8e7704e91 100644 --- a/tests/autopilot/unity/tests/test_switcher.py +++ b/tests/autopilot/unity/tests/test_switcher.py @@ -46,9 +46,9 @@ class SwitcherTestCase(UnityTestCase): """Start some applications, returning their windows. If no applications are specified, the following will be started: - * Character Map - * Calculator * Calculator + * Character Map + * Character Map Windows are always started in the order that they are specified (which means the last specified application will *probably* be at the top of the @@ -57,7 +57,7 @@ class SwitcherTestCase(UnityTestCase): """ if len(args) == 0: - args = ('Character Map', 'Calculator', 'Calculator') + args = ('Calculator', 'Character Map', 'Character Map') windows = [] for app in args: windows.append(self.start_app_window(app)) @@ -231,20 +231,20 @@ class SwitcherWindowsManagementTests(SwitcherTestCase): Then we close the currently focused window. """ - mah_win1, calc_win, mah_win2 = self.start_applications("Mahjongg", "Calculator", "Mahjongg") - self.assertVisibleWindowStack([mah_win2, calc_win, mah_win1]) + char_win1, calc_win, char_win2 = self.start_applications("Character Map", "Calculator", "Character Map") + self.assertVisibleWindowStack([char_win2, calc_win, char_win1]) self.keybinding("switcher/reveal_normal") self.assertProperty(calc_win, is_focused=True) - self.assertVisibleWindowStack([calc_win, mah_win2, mah_win1]) + self.assertVisibleWindowStack([calc_win, char_win2, char_win1]) self.keybinding("switcher/reveal_normal") - self.assertProperty(mah_win2, is_focused=True) - self.assertVisibleWindowStack([mah_win2, calc_win, mah_win1]) + self.assertProperty(char_win2, is_focused=True) + self.assertVisibleWindowStack([char_win2, calc_win, char_win1]) self.keybinding("window/close") self.assertProperty(calc_win, is_focused=True) - self.assertVisibleWindowStack([calc_win, mah_win1]) + self.assertVisibleWindowStack([calc_win, char_win1]) class SwitcherDetailsTests(SwitcherTestCase): @@ -338,17 +338,17 @@ class SwitcherDetailsModeTests(SwitcherTestCase): """The active selection in detail mode must be the last focused window. If it was the currently active application type. """ - calc_win1, calc_win2 = self.start_applications("Calculator", "Calculator") - self.assertVisibleWindowStack([calc_win2, calc_win1]) + char_win1, char_win2 = self.start_applications("Character Map", "Character Map") + self.assertVisibleWindowStack([char_win2, char_win1]) self.switcher.initiate() - while self.switcher.current_icon.tooltip_text != calc_win2.application.name: + while self.switcher.current_icon.tooltip_text != char_win2.application.name: self.switcher.next_icon() self.keyboard.press_and_release(self.initiate_keycode) sleep(0.5) self.switcher.select() - self.assertProperty(calc_win1, is_focused=True) + self.assertProperty(char_win1, is_focused=True) class SwitcherWorkspaceTests(SwitcherTestCase): @@ -402,18 +402,18 @@ class SwitcherWorkspaceTests(SwitcherTestCase): self.set_unity_option("alt_tab_timeout", False) self.workspace.switch_to(1) - self.start_app("Mahjongg") + self.start_app("Character Map") self.workspace.switch_to(3) - mah_win2 = self.start_app_window("Mahjongg") + char_win2 = self.start_app_window("Character Map") self.keybinding("window/minimize") - self.assertProperty(mah_win2, is_hidden=True) + self.assertProperty(char_win2, is_hidden=True) self.start_app("Calculator") self.switcher.initiate() - while self.switcher.current_icon.tooltip_text != mah_win2.application.name: + while self.switcher.current_icon.tooltip_text != char_win2.application.name: self.switcher.next_icon() self.switcher.select() - self.assertProperty(mah_win2, is_hidden=False) + self.assertProperty(char_win2, is_hidden=False) diff --git a/tests/test_favorite_store_gsettings.cpp b/tests/test_favorite_store_gsettings.cpp index c491efce3..245fcd001 100644 --- a/tests/test_favorite_store_gsettings.cpp +++ b/tests/test_favorite_store_gsettings.cpp @@ -88,7 +88,6 @@ public: // Setting the test values gsettings_client = g_settings_new(SETTINGS_NAME); - g_settings_set_strv(gsettings_client, SETTINGS_KEY, NULL); g_settings_set_strv(gsettings_client, SETTINGS_KEY, base_store_favs); } diff --git a/tests/test_launcher.cpp b/tests/test_launcher.cpp index 21fbe131e..d5f0bb318 100644 --- a/tests/test_launcher.cpp +++ b/tests/test_launcher.cpp @@ -24,15 +24,23 @@ using namespace testing; #include <Nux/Nux.h> #include <Nux/BaseWindow.h> -#include "DNDCollectionWindow.h" -#include "MockLauncherIcon.h" -#include "Launcher.h" +#include "launcher/DNDCollectionWindow.h" +#include "launcher/MockLauncherIcon.h" +#include "launcher/Launcher.h" +#include "unity-shared/PanelStyle.h" +#include "unity-shared/UnitySettings.h" #include "test_utils.h" using namespace unity; +namespace unity +{ +namespace launcher +{ namespace { +const int STARTING_ANIMATION_DURATION = 150; + class MockMockLauncherIcon : public launcher::MockLauncherIcon { public: @@ -41,22 +49,34 @@ public: MOCK_METHOD1(ShouldHighlightOnDrag, bool(DndData const&)); }; +} + class TestLauncher : public Test { public: TestLauncher() : parent_window_(new nux::BaseWindow("TestLauncherWindow")) , dnd_collection_window_(new DNDCollectionWindow) - , model_(new launcher::LauncherModel) - , launcher_(new launcher::Launcher(parent_window_, dnd_collection_window_)) + , model_(new LauncherModel) + , options_(new Options) + , launcher_(new Launcher(parent_window_, dnd_collection_window_)) { + launcher_->options = options_; launcher_->SetModel(model_); } + float IconBackgroundIntensity(AbstractLauncherIcon::Ptr icon, timespec const& current) const + { + return launcher_->IconBackgroundIntensity(icon, current); + } + nux::BaseWindow* parent_window_; nux::ObjectPtr<DNDCollectionWindow> dnd_collection_window_; - launcher::LauncherModel::Ptr model_; - nux::ObjectPtr<launcher::Launcher> launcher_; + Settings settings; + panel::Style panel_style; + LauncherModel::Ptr model_; + Options::Ptr options_; + nux::ObjectPtr<Launcher> launcher_; }; TEST_F(TestLauncher, TestQuirksDuringDnd) @@ -84,9 +104,39 @@ TEST_F(TestLauncher, TestQuirksDuringDnd) Utils::WaitForTimeout(1); - EXPECT_FALSE(first->GetQuirk(launcher::AbstractLauncherIcon::QUIRK_DESAT)); - EXPECT_FALSE(second->GetQuirk(launcher::AbstractLauncherIcon::QUIRK_DESAT)); - EXPECT_TRUE(third->GetQuirk(launcher::AbstractLauncherIcon::QUIRK_DESAT)); + EXPECT_FALSE(first->GetQuirk(launcher::AbstractLauncherIcon::Quirk::DESAT)); + EXPECT_FALSE(second->GetQuirk(launcher::AbstractLauncherIcon::Quirk::DESAT)); + EXPECT_TRUE(third->GetQuirk(launcher::AbstractLauncherIcon::Quirk::DESAT)); +} + + +TEST_F(TestLauncher, TestIconBackgroundIntensity) +{ + MockMockLauncherIcon::Ptr first(new MockMockLauncherIcon); + model_->AddIcon(first); + + MockMockLauncherIcon::Ptr second(new MockMockLauncherIcon); + model_->AddIcon(second); + + MockMockLauncherIcon::Ptr third(new MockMockLauncherIcon); + model_->AddIcon(third); + + options_->backlight_mode = BACKLIGHT_NORMAL; + options_->launch_animation = LAUNCH_ANIMATION_PULSE; + + first->SetQuirk(AbstractLauncherIcon::Quirk::RUNNING, true); + second->SetQuirk(AbstractLauncherIcon::Quirk::RUNNING, true); + third->SetQuirk(AbstractLauncherIcon::Quirk::RUNNING, false); + + Utils::WaitForTimeoutMSec(STARTING_ANIMATION_DURATION); + timespec current; + clock_gettime(CLOCK_MONOTONIC, ¤t); + + EXPECT_THAT(IconBackgroundIntensity(first, current), Gt(0.0f)); + EXPECT_THAT(IconBackgroundIntensity(second, current), Gt(0.0f)); + EXPECT_EQ(IconBackgroundIntensity(third, current), 0.0f); } } +} + diff --git a/tests/test_launcher_controller.cpp b/tests/test_launcher_controller.cpp index d3908b789..16fbbf5ee 100644 --- a/tests/test_launcher_controller.cpp +++ b/tests/test_launcher_controller.cpp @@ -49,6 +49,17 @@ private: FavoriteList fav_list_; }; +class MockBamfLauncherIcon : public BamfLauncherIcon +{ +public: + //typedef nux::ObjectPtr<MockMockLauncherIcon> Ptr; + MockBamfLauncherIcon(BamfApplication* app) + : BamfLauncherIcon(app) {} + + MOCK_METHOD0(UnStick, void()); + MOCK_METHOD0(Quit, void()); +}; + namespace launcher { class TestLauncherController : public testing::Test @@ -70,6 +81,11 @@ protected: return lc.pimpl->edge_barriers_; } + LauncherModel::Ptr GetLauncherModel() + { + return lc.pimpl->model_; + } + MockUScreen uscreen; Settings settings; panel::Style panel_style; @@ -198,4 +214,20 @@ TEST_F(TestLauncherController, SingleMonitorEdgeBarrierSubscriptionsUpdates) } } +TEST_F(TestLauncherController, OnlyUnstickIconOnFavoriteRemoval) +{ + const std::string USC_DESKTOP = BUILDDIR"/tests/data/ubuntu-software-center.desktop"; + + glib::Object<BamfMatcher> matcher(bamf_matcher_get_default()); + + auto bamf_app = bamf_matcher_get_application_for_desktop_file(matcher, USC_DESKTOP.c_str(), TRUE); + MockBamfLauncherIcon *bamf_icon = new MockBamfLauncherIcon(bamf_app); + GetLauncherModel()->AddIcon(AbstractLauncherIcon::Ptr(bamf_icon)); + + EXPECT_CALL(*bamf_icon, UnStick()); + EXPECT_CALL(*bamf_icon, Quit()).Times(0); + + favorite_store.favorite_removed.emit(USC_DESKTOP); +} + } |
