diff options
| author | Tim Penhey <tim.penhey@canonical.com> | 2012-11-29 11:05:07 +1300 |
|---|---|---|
| committer | Tim Penhey <tim.penhey@canonical.com> | 2012-11-29 11:05:07 +1300 |
| commit | 4b8493aa731726884c4431dc791d65d9b075a6de (patch) | |
| tree | 23eb6d47e420c13b7d0a0d2287b2c1ec317216d2 | |
| parent | 5dba3bcd954de5d582ddbdb4e2192a434c95e366 (diff) | |
| parent | a1ac94e2eea458b07e5a7516673128b7dbe1b259 (diff) | |
Merge prev and resolve conflicts.
(bzr r2791.9.51)
34 files changed, 51 insertions, 68 deletions
diff --git a/UnityCore/CMakeLists.txt b/UnityCore/CMakeLists.txt index 2a7df66ac..fdbf1df92 100644 --- a/UnityCore/CMakeLists.txt +++ b/UnityCore/CMakeLists.txt @@ -104,12 +104,11 @@ set (CORE_SOURCES # CFLAGS and LIBS # set (CFLAGS - "-I${CMAKE_BINARY_DIR}" - "-DGETTEXT_PACKAGE=\"unity\"" "-DLENSES_DIR=\"${_lensesdir}\"" ) add_definitions (${CFLAGS}) include_directories(${CORE_DEPS_INCLUDE_DIRS}) +include_directories(${CMAKE_BINARY_DIR}) set (LIBS ${CORE_DEPS_LIBRARIES}) diff --git a/dash/CMakeLists.txt b/dash/CMakeLists.txt index 4f61b082b..d621e1bdb 100644 --- a/dash/CMakeLists.txt +++ b/dash/CMakeLists.txt @@ -5,8 +5,6 @@ find_package (PkgConfig) set (CFLAGS ${CACHED_UNITY_DEPS_CFLAGS} ${CACHED_UNITY_DEPS_CFLAGS_OTHER} - "-DGETTEXT_PACKAGE=\"unity\"" - "-I${CMAKE_CURRENT_BINARY_DIR}" ) if (${CMAKE_SYSTEM_PROCESSOR} STREQUAL "x86_64" OR ${CMAKE_SYSTEM_PROCESSOR} STREQUAL "armv7l") @@ -22,7 +20,7 @@ link_libraries (${LIBS}) set (LIB_PATHS ${CACHED_UNITY_DEPS_LIBRARY_DIRS}) link_directories (${CMAKE_BINARY_DIR}/UnityCore ${LIB_PATHS}) -include_directories (. .. ../services ../UnityCore ${UNITY_SRC} ${CMAKE_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR}) +include_directories (.. ../services ../UnityCore ${UNITY_SRC} ${CMAKE_BINARY_DIR}) add_subdirectory(previews) @@ -64,5 +62,4 @@ target_link_libraries (dash-lib previews-lib) # Standalone variant # add_executable (dash StandaloneDash.cpp) -add_dependencies (dash dash-lib) target_link_libraries (dash dash-lib unity-shared) diff --git a/dash/FilterAllButton.cpp b/dash/FilterAllButton.cpp index 0ca2b157f..55280366f 100644 --- a/dash/FilterAllButton.cpp +++ b/dash/FilterAllButton.cpp @@ -22,6 +22,7 @@ #include <glib.h> +#include "config.h" #include <glib/gi18n-lib.h> #include "FilterAllButton.h" diff --git a/dash/FilterGenreWidget.cpp b/dash/FilterGenreWidget.cpp index a0afda034..50761ec7e 100644 --- a/dash/FilterGenreWidget.cpp +++ b/dash/FilterGenreWidget.cpp @@ -21,6 +21,7 @@ */ #include <glib.h> +#include "config.h" #include <glib/gi18n-lib.h> #include <UnityCore/GLibWrapper.h> diff --git a/dash/FilterMultiRangeWidget.cpp b/dash/FilterMultiRangeWidget.cpp index c39b7c2d1..e23e4f2de 100644 --- a/dash/FilterMultiRangeWidget.cpp +++ b/dash/FilterMultiRangeWidget.cpp @@ -28,6 +28,7 @@ #include "FilterBasicButton.h" #include <glib.h> +#include "config.h" #include <glib/gi18n-lib.h> namespace unity diff --git a/dash/FilterRatingsWidget.cpp b/dash/FilterRatingsWidget.cpp index c44ff4d25..d4451e428 100644 --- a/dash/FilterRatingsWidget.cpp +++ b/dash/FilterRatingsWidget.cpp @@ -22,6 +22,7 @@ #include <Nux/Nux.h> #include <glib.h> +#include "config.h" #include <glib/gi18n-lib.h> #include "unity-shared/DashStyle.h" diff --git a/dash/LensView.cpp b/dash/LensView.cpp index 0442ebba5..933e7afe5 100755 --- a/dash/LensView.cpp +++ b/dash/LensView.cpp @@ -35,6 +35,7 @@ #include "unity-shared/PlacesVScrollBar.h" #include "unity-shared/PlacesOverlayVScrollBar.h" +#include "config.h" #include <glib/gi18n-lib.h> namespace unity diff --git a/dash/PlacesGroup.cpp b/dash/PlacesGroup.cpp index 78313ae49..8851abf7b 100755 --- a/dash/PlacesGroup.cpp +++ b/dash/PlacesGroup.cpp @@ -25,6 +25,7 @@ #include "PlacesGroup.h" #include <glib.h> +#include "config.h" #include <glib/gi18n-lib.h> #include <UnityCore/Variant.h> diff --git a/dash/previews/ApplicationPreview.cpp b/dash/previews/ApplicationPreview.cpp index 76c377c7f..ba9cd72e4 100644 --- a/dash/previews/ApplicationPreview.cpp +++ b/dash/previews/ApplicationPreview.cpp @@ -32,6 +32,8 @@ #include <Nux/VLayout.h> #include <Nux/GridHLayout.h> #include <Nux/Button.h> + +#include "config.h" #include <glib/gi18n-lib.h> #include "ApplicationPreview.h" @@ -39,7 +41,6 @@ #include "PreviewInfoHintWidget.h" #include "PreviewRatingsWidget.h" - namespace unity { namespace dash diff --git a/dash/previews/CMakeLists.txt b/dash/previews/CMakeLists.txt index 0f5978421..3c79779de 100644 --- a/dash/previews/CMakeLists.txt +++ b/dash/previews/CMakeLists.txt @@ -5,8 +5,6 @@ find_package (PkgConfig) set (CFLAGS ${CACHED_UNITY_DEPS_CFLAGS} ${CACHED_UNITY_DEPS_CFLAGS_OTHER} - "-DGETTEXT_PACKAGE=\"unity\"" - "-I${CMAKE_CURRENT_BINARY_DIR}" ) if (${CMAKE_SYSTEM_PROCESSOR} STREQUAL "x86_64" OR ${CMAKE_SYSTEM_PROCESSOR} STREQUAL "armv7l") @@ -21,7 +19,7 @@ link_libraries (${LIBS}) set (LIB_PATHS ${CACHED_UNITY_DEPS_LIBRARY_DIRS}) link_directories (${CMAKE_BINARY_DIR}/UnityCore ${LIB_PATHS}) -include_directories (. .. ../services ../UnityCore ${UNITY_SRC} ${CMAKE_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR}) +include_directories (.. ../services ../UnityCore ${UNITY_SRC} ${CMAKE_BINARY_DIR}) # # Headers & Sources @@ -52,26 +50,22 @@ target_link_libraries (previews-lib unity-shared) # Application Standalone variant # add_executable (app_previews StandaloneApplicationPreview.cpp) -add_dependencies (app_previews previews-lib) target_link_libraries (app_previews previews-lib unity-shared) # # Music Standalone variant # add_executable (music_previews StandaloneMusicPreview.cpp) -add_dependencies (music_previews previews-lib) target_link_libraries (music_previews previews-lib unity-shared) # # Social Standalone variant # add_executable (social_previews StandaloneSocialPreview.cpp) -add_dependencies (social_previews previews-lib) target_link_libraries (social_previews previews-lib unity-shared) # # Music Standalone variant # add_executable (movie_previews StandaloneMoviePreview.cpp) -add_dependencies (movie_previews previews-lib) target_link_libraries (movie_previews previews-lib unity-shared) diff --git a/dash/previews/PreviewRatingsWidget.cpp b/dash/previews/PreviewRatingsWidget.cpp index 42d5e78f5..5cb1daa7d 100644 --- a/dash/previews/PreviewRatingsWidget.cpp +++ b/dash/previews/PreviewRatingsWidget.cpp @@ -23,6 +23,7 @@ #include <Nux/Nux.h> #include <Nux/VLayout.h> #include <glib.h> +#include "config.h" #include <glib/gi18n-lib.h> #include "unity-shared/RatingsButton.h" diff --git a/dash/previews/SocialPreview.cpp b/dash/previews/SocialPreview.cpp index 51079d81b..eed38e43a 100644 --- a/dash/previews/SocialPreview.cpp +++ b/dash/previews/SocialPreview.cpp @@ -32,6 +32,8 @@ #include <Nux/VLayout.h> #include <Nux/GridHLayout.h> #include <Nux/Button.h> + +#include "config.h" #include <glib/gi18n-lib.h> #include "SocialPreview.h" diff --git a/hud/CMakeLists.txt b/hud/CMakeLists.txt index 9ad2f34b3..8628ac193 100644 --- a/hud/CMakeLists.txt +++ b/hud/CMakeLists.txt @@ -5,8 +5,6 @@ find_package (PkgConfig) set (CFLAGS ${CACHED_UNITY_DEPS_CFLAGS} ${CACHED_UNITY_DEPS_CFLAGS_OTHER} - "-DGETTEXT_PACKAGE=\"unity\"" - "-I${CMAKE_CURRENT_BINARY_DIR}" ) if (${CMAKE_SYSTEM_PROCESSOR} STREQUAL "x86_64" OR ${CMAKE_SYSTEM_PROCESSOR} STREQUAL "armv7l") @@ -22,7 +20,7 @@ link_libraries (${LIBS}) set (LIB_PATHS ${CACHED_UNITY_DEPS_LIBRARY_DIRS}) link_directories (${CMAKE_BINARY_DIR}/UnityCore ${LIB_PATHS}) -include_directories (. .. ../services ../UnityCore ${UNITY_SRC} ${CMAKE_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR}) +include_directories (.. ../services ../UnityCore ${UNITY_SRC} ${CMAKE_BINARY_DIR}) # # Headers & Sources @@ -44,5 +42,4 @@ add_dependencies (hud-lib unity-core-${UNITY_API_VERSION} unity-shared) # Standalone variant # add_executable (hud StandaloneHud.cpp) -add_dependencies (hud hud-lib) target_link_libraries (hud hud-lib unity-shared) diff --git a/hud/HudView.cpp b/hud/HudView.cpp index 14e803477..f8aa2c178 100644 --- a/hud/HudView.cpp +++ b/hud/HudView.cpp @@ -20,6 +20,7 @@ #include <math.h> +#include "config.h" #include <glib/gi18n-lib.h> #include <NuxCore/Logger.h> #include <UnityCore/GLibWrapper.h> diff --git a/launcher/BFBLauncherIcon.cpp b/launcher/BFBLauncherIcon.cpp index d512fbad4..5948eee6a 100644 --- a/launcher/BFBLauncherIcon.cpp +++ b/launcher/BFBLauncherIcon.cpp @@ -18,6 +18,7 @@ * Andrea Azzarone <azzaronea@gmail.com> */ +#include "config.h" #include <glib/gi18n-lib.h> #include "unity-shared/UBusMessages.h" diff --git a/launcher/CMakeLists.txt b/launcher/CMakeLists.txt index 05803c40d..2f621763a 100644 --- a/launcher/CMakeLists.txt +++ b/launcher/CMakeLists.txt @@ -6,8 +6,6 @@ set (CFLAGS ${CACHED_UNITY_DEPS_CFLAGS} ${CACHED_UNITY_DEPS_CFLAGS_OTHER} "-fPIC" - "-DGETTEXT_PACKAGE=\"unity\"" - "-I${CMAKE_CURRENT_BINARY_DIR}" ) if (${CMAKE_SYSTEM_PROCESSOR} STREQUAL "x86_64" OR ${CMAKE_SYSTEM_PROCESSOR} STREQUAL "armv7l") @@ -23,7 +21,7 @@ link_libraries (${LIBS}) set (LIB_PATHS ${CACHED_UNITY_DEPS_LIBRARY_DIRS}) link_directories (${CMAKE_BINARY_DIR}/UnityCore ${LIB_PATHS}) -include_directories (. .. ../services ../UnityCore ${UNITY_SRC} ${CMAKE_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR}) +include_directories (.. ../services ../UnityCore ${UNITY_SRC} ${CMAKE_BINARY_DIR}) # # Headers & Sources @@ -109,11 +107,9 @@ set (LAUNCHER_LIBS # Standalone variant # add_executable (launcher StandaloneLauncher.cpp) -add_dependencies (launcher launcher-lib) target_link_libraries (launcher ${LAUNCHER_LIBS}) if (ENABLE_X_SUPPORT) add_executable (switcher StandaloneSwitcher.cpp) - add_dependencies (switcher switcher-lib launcher-lib) target_link_libraries (switcher switcher-lib ${LAUNCHER_LIBS}) endif () diff --git a/launcher/DesktopLauncherIcon.cpp b/launcher/DesktopLauncherIcon.cpp index 9b70bf579..8b3791317 100644 --- a/launcher/DesktopLauncherIcon.cpp +++ b/launcher/DesktopLauncherIcon.cpp @@ -20,6 +20,7 @@ #include "DesktopLauncherIcon.h" #include "unity-shared/WindowManager.h" #include "FavoriteStore.h" +#include "config.h" #include <glib/gi18n-lib.h> diff --git a/launcher/DeviceNotificationDisplayImp.cpp b/launcher/DeviceNotificationDisplayImp.cpp index 0ab336cdf..70f8c1960 100644 --- a/launcher/DeviceNotificationDisplayImp.cpp +++ b/launcher/DeviceNotificationDisplayImp.cpp @@ -18,6 +18,7 @@ */ #include <gdk/gdk.h> +#include "config.h" #include <glib/gi18n-lib.h> #include <libnotify/notify.h> #include <sigc++/sigc++.h> diff --git a/launcher/ExpoLauncherIcon.cpp b/launcher/ExpoLauncherIcon.cpp index 098ca1b27..6f46a0899 100644 --- a/launcher/ExpoLauncherIcon.cpp +++ b/launcher/ExpoLauncherIcon.cpp @@ -20,6 +20,7 @@ #include "ExpoLauncherIcon.h" #include "FavoriteStore.h" +#include "config.h" #include <glib/gi18n-lib.h> namespace unity diff --git a/launcher/LauncherController.cpp b/launcher/LauncherController.cpp index 9e663fba8..b0a69e9bc 100644 --- a/launcher/LauncherController.cpp +++ b/launcher/LauncherController.cpp @@ -19,6 +19,7 @@ * Marco Trevisan <marco.trevisan@canonical.com> */ +#include "config.h" #include <glib/gi18n-lib.h> #include <Nux/Nux.h> diff --git a/launcher/SoftwareCenterLauncherIcon.cpp b/launcher/SoftwareCenterLauncherIcon.cpp index 68929c1dc..cd94f06ae 100644 --- a/launcher/SoftwareCenterLauncherIcon.cpp +++ b/launcher/SoftwareCenterLauncherIcon.cpp @@ -19,6 +19,7 @@ */ #include <NuxCore/Logger.h> +#include "config.h" #include <glib/gi18n-lib.h> #include "SoftwareCenterLauncherIcon.h" #include "Launcher.h" diff --git a/launcher/TrashLauncherIcon.cpp b/launcher/TrashLauncherIcon.cpp index 6f90b2c9f..2ec4563dd 100644 --- a/launcher/TrashLauncherIcon.cpp +++ b/launcher/TrashLauncherIcon.cpp @@ -20,6 +20,7 @@ #include "TrashLauncherIcon.h" +#include "config.h" #include <glib/gi18n-lib.h> #include <Nux/WindowCompositor.h> #include <NuxCore/Logger.h> diff --git a/launcher/VolumeLauncherIcon.cpp b/launcher/VolumeLauncherIcon.cpp index 5a6aaaa28..4f1342435 100644 --- a/launcher/VolumeLauncherIcon.cpp +++ b/launcher/VolumeLauncherIcon.cpp @@ -19,6 +19,7 @@ */ +#include "config.h" #include <glib/gi18n-lib.h> #include <NuxCore/Logger.h> #include <UnityCore/GLibSignal.h> diff --git a/panel/CMakeLists.txt b/panel/CMakeLists.txt index b9a67f51a..8ee54da59 100644 --- a/panel/CMakeLists.txt +++ b/panel/CMakeLists.txt @@ -5,8 +5,6 @@ find_package (PkgConfig) set (CFLAGS ${CACHED_UNITY_DEPS_CFLAGS} ${CACHED_UNITY_DEPS_CFLAGS_OTHER} - "-DGETTEXT_PACKAGE=\"unity\"" - "-I${CMAKE_CURRENT_BINARY_DIR}" ) if (${CMAKE_SYSTEM_PROCESSOR} STREQUAL "x86_64" OR ${CMAKE_SYSTEM_PROCESSOR} STREQUAL "armv7l") @@ -22,7 +20,7 @@ link_libraries (${LIBS}) set (LIB_PATHS ${CACHED_UNITY_DEPS_LIBRARY_DIRS}) link_directories (${CMAKE_BINARY_DIR}/UnityCore ${LIB_PATHS}) -include_directories (. .. ../services ../UnityCore ${UNITY_SRC} ${CMAKE_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR}) +include_directories (.. ../services ../UnityCore ${UNITY_SRC} ${CMAKE_BINARY_DIR}) # # Headers & Sources @@ -45,5 +43,4 @@ add_dependencies (panel-lib unity-core-${UNITY_API_VERSION} unity-shared) # Standalone variant # add_executable (panel StandalonePanel.cpp) -add_dependencies (panel panel-lib) target_link_libraries (panel panel-lib unity-shared unity-shared-standalone) diff --git a/panel/PanelMenuView.cpp b/panel/PanelMenuView.cpp index 97e6ed5ef..575344479 100644 --- a/panel/PanelMenuView.cpp +++ b/panel/PanelMenuView.cpp @@ -31,6 +31,7 @@ #include <UnityCore/Variant.h> +#include "config.h" #include <glib/gi18n-lib.h> namespace unity diff --git a/plugins/unityshell/src/unityshell.cpp b/plugins/unityshell/src/unityshell.cpp index e3181452f..42b9d1f37 100644 --- a/plugins/unityshell/src/unityshell.cpp +++ b/plugins/unityshell/src/unityshell.cpp @@ -1853,8 +1853,11 @@ void UnityScreen::SendExecuteCommand() adapter.TerminateScale(); } + ubus_manager_.SendMessage(UBUS_DASH_ABOUT_TO_SHOW, NULL, glib::Source::Priority::HIGH); + ubus_manager_.SendMessage(UBUS_PLACE_ENTRY_ACTIVATE_REQUEST, - g_variant_new("(sus)", "commands.lens", 0, "")); + g_variant_new("(sus)", "commands.lens", 0, ""), + glib::Source::Priority::LOW); } bool UnityScreen::executeCommand(CompAction* action, diff --git a/services/CMakeLists.txt b/services/CMakeLists.txt index 26b080975..4257358a8 100644 --- a/services/CMakeLists.txt +++ b/services/CMakeLists.txt @@ -35,13 +35,12 @@ add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/panel-marshal.c set(CFLAGS "${SERVICE_DEPS_CFLAGS}" ${SERVICE_DEPS_CFLAGS_OTHER} - "-I${CMAKE_CURRENT_BINARY_DIR}" - "-DGETTEXT_PACKAGE=\"unity\"" "-DINDICATORDIR=\"${_indicatordir}\"" "-DINDICATORICONDIR=\"${_iconsdir}\"" "-Werror -Wall" ) add_definitions(${CFLAGS}) +include_directories(${CMAKE_CURRENT_BINARY_DIR}) set(LIBS ${SERVICE_DEPS_LIBRARIES}) link_libraries(${LIBS}) diff --git a/shortcuts/CMakeLists.txt b/shortcuts/CMakeLists.txt index e28b19da8..c2870e93e 100644 --- a/shortcuts/CMakeLists.txt +++ b/shortcuts/CMakeLists.txt @@ -5,8 +5,6 @@ find_package (PkgConfig) set (CFLAGS ${CACHED_UNITY_DEPS_CFLAGS} ${CACHED_UNITY_DEPS_CFLAGS_OTHER} - "-DGETTEXT_PACKAGE=\"unity\"" - "-I${CMAKE_CURRENT_BINARY_DIR}" ) if (${CMAKE_SYSTEM_PROCESSOR} STREQUAL "x86_64" OR ${CMAKE_SYSTEM_PROCESSOR} STREQUAL "armv7l") @@ -22,7 +20,7 @@ link_libraries (${LIBS}) set (LIB_PATHS ${CACHED_UNITY_DEPS_LIBRARY_DIRS}) link_directories (${CMAKE_BINARY_DIR}/UnityCore ${LIB_PATHS}) -include_directories (. .. ../services ../UnityCore ${UNITY_SRC} ${CMAKE_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR}) +include_directories (.. ../services ../UnityCore ${UNITY_SRC} ${CMAKE_BINARY_DIR}) # # Headers & Sources @@ -48,5 +46,4 @@ add_dependencies (shortcuts-lib unity-core-${UNITY_API_VERSION} unity-shared) # Standalone variant # add_executable (shortcuts StandaloneShortcuts.cpp) -add_dependencies (shortcuts shortcuts-lib) target_link_libraries (shortcuts shortcuts-lib unity-shared) diff --git a/shortcuts/ShortcutHintPrivate.cpp b/shortcuts/ShortcutHintPrivate.cpp index 232538efd..11e6b2388 100644 --- a/shortcuts/ShortcutHintPrivate.cpp +++ b/shortcuts/ShortcutHintPrivate.cpp @@ -16,6 +16,7 @@ * Authored by: Andrea Azzarone <azzaronea@gmail.com> */ +#include "config.h" #include <glib/gi18n-lib.h> #include <gtk/gtk.h> diff --git a/shortcuts/StandaloneShortcuts.cpp b/shortcuts/StandaloneShortcuts.cpp index de48a5317..b991a58ca 100644 --- a/shortcuts/StandaloneShortcuts.cpp +++ b/shortcuts/StandaloneShortcuts.cpp @@ -17,6 +17,7 @@ * Authored by: Andrea Azzarone <azzaronea@gmail.com> */ +#include "config.h" #include <glib/gi18n-lib.h> #include <gtk/gtk.h> #include <Nux/Nux.h> diff --git a/tests/test_glib_source.cpp b/tests/test_glib_source.cpp index 7d3641d0b..323067533 100644 --- a/tests/test_glib_source.cpp +++ b/tests/test_glib_source.cpp @@ -131,55 +131,46 @@ TEST(TestGLibTimeout, OneShotRun) { callback_called = false; callback_call_count = 0; - struct timespec pre, post; + bool removed_called = false; Timeout timeout(100, &OnSourceCallbackStop); - clock_gettime(CLOCK_MONOTONIC, &pre); - timeout.removed.connect([&] (unsigned int id) { clock_gettime(CLOCK_MONOTONIC, &post); }); + timeout.removed.connect([&] (unsigned int id) { removed_called = true; }); Utils::WaitForTimeoutMSec(500); EXPECT_FALSE(timeout.IsRunning()); EXPECT_TRUE(callback_called); EXPECT_EQ(callback_call_count, 1); - int time_delta = unity::TimeUtil::TimeDelta(&post, &pre); - EXPECT_GE(time_delta, 100); - EXPECT_LT(time_delta, 110); + EXPECT_TRUE(removed_called); } TEST(TestGLibTimeout, MultipleShotsRun) { callback_called = false; callback_call_count = 0; - struct timespec pre, post; + bool removed_called = false; { + auto check_function = []() { return (callback_call_count < 6) ? false : true; }; Timeout timeout(100, &OnSourceCallbackContinue); - clock_gettime(CLOCK_MONOTONIC, &pre); - timeout.removed.connect([&] (unsigned int id) { clock_gettime(CLOCK_MONOTONIC, &post); }); - - Utils::WaitForTimeoutMSec(650); + timeout.removed.connect([&] (unsigned int id) { removed_called = true; }); + Utils::WaitUntil(check_function, true, 1); EXPECT_TRUE(timeout.IsRunning()); } EXPECT_TRUE(callback_called); - EXPECT_EQ(callback_call_count, 6); - int time_delta = unity::TimeUtil::TimeDelta(&post, &pre); - EXPECT_GE(time_delta, 600); - EXPECT_LT(time_delta, 700); + EXPECT_GE(callback_call_count, 6); + EXPECT_TRUE(removed_called); } TEST(TestGLibTimeout, OneShotRunWithEmptyCallback) { - struct timespec pre, post; + bool removed_called = false; Timeout timeout(100, Source::Callback()); - clock_gettime(CLOCK_MONOTONIC, &pre); - timeout.removed.connect([&] (unsigned int id) { clock_gettime(CLOCK_MONOTONIC, &post); }); + timeout.removed.connect([&] (unsigned int id) { removed_called = true; }); Utils::WaitForTimeoutMSec(500); EXPECT_FALSE(timeout.IsRunning()); - int time_delta = unity::TimeUtil::TimeDelta(&post, &pre); - EXPECT_GE(time_delta, 100); - EXPECT_LT(time_delta, 110); + EXPECT_TRUE(removed_called); } TEST(TestGLibTimeout, Removal) diff --git a/unity-shared/CMakeLists.txt b/unity-shared/CMakeLists.txt index 258d95292..8c5a6c202 100644 --- a/unity-shared/CMakeLists.txt +++ b/unity-shared/CMakeLists.txt @@ -5,8 +5,6 @@ find_package (PkgConfig) set (CFLAGS ${CACHED_UNITY_DEPS_CFLAGS} ${CACHED_UNITY_DEPS_CFLAGS_OTHER} - "-DGETTEXT_PACKAGE=\"unity\"" - "-I${CMAKE_CURRENT_BINARY_DIR}" ) if (${CMAKE_SYSTEM_PROCESSOR} STREQUAL "x86_64" OR ${CMAKE_SYSTEM_PROCESSOR} STREQUAL "armv7l") @@ -20,7 +18,7 @@ set (LIBS ${CACHED_UNITY_DEPS_LIBRARIES} ${UNITY_STANDALONE_LADD}) set (LIB_PATHS ${CACHED_UNITY_DEPS_LIBRARY_DIRS}) link_directories (${CMAKE_BINARY_DIR}/UnityCore ${LIB_PATHS}) -include_directories (. .. ../services ../UnityCore ${UNITY_SRC} ${CMAKE_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR}) +include_directories (.. ../services ../UnityCore ${UNITY_SRC} ${CMAKE_BINARY_DIR}) # # Headers & Sources diff --git a/unity-shared/TextInput.h b/unity-shared/TextInput.h index ddcea004c..57a6e585f 100644 --- a/unity-shared/TextInput.h +++ b/unity-shared/TextInput.h @@ -20,6 +20,8 @@ #ifndef TEXTINPUT_H #define TEXTINPUT_H +#include "config.h" + #include <glib/gi18n-lib.h> #include <gtk/gtk.h> @@ -34,7 +36,6 @@ #include <UnityCore/GLibSource.h> #include <UnityCore/Variant.h> -#include "config.h" #include "CairoTexture.h" #include "unity-shared/IconTexture.h" #include "unity-shared/IMTextEntry.h" diff --git a/unity-standalone/CMakeLists.txt b/unity-standalone/CMakeLists.txt index e9e78b5cf..552f6352e 100644 --- a/unity-standalone/CMakeLists.txt +++ b/unity-standalone/CMakeLists.txt @@ -5,8 +5,6 @@ find_package (PkgConfig) set (CFLAGS ${CACHED_UNITY_DEPS_CFLAGS} ${CACHED_UNITY_DEPS_CFLAGS_OTHER} - "-DGETTEXT_PACKAGE=\"unity\"" - "-I${CMAKE_CURRENT_BINARY_DIR}" ) if (${CMAKE_SYSTEM_PROCESSOR} STREQUAL "x86_64" OR ${CMAKE_SYSTEM_PROCESSOR} STREQUAL "armv7l") @@ -22,7 +20,7 @@ link_libraries (${LIBS}) set (LIB_PATHS ${CACHED_UNITY_DEPS_LIBRARY_DIRS}) link_directories (${CMAKE_BINARY_DIR}/UnityCore ${LIB_PATHS}) -include_directories (. .. ../services ../UnityCore ${UNITY_SRC} ${CMAKE_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR}) +include_directories (.. ../services ../UnityCore ${UNITY_SRC} ${CMAKE_BINARY_DIR}) # # Headers & Sources @@ -32,12 +30,6 @@ set (STANDALONE_SOURCES ) add_executable (unity-standalone StandaloneUnity.cpp) -add_dependencies (unity-standalone - dash-lib - launcher-lib - panel-lib - unity-shared - unity-shared-standalone) target_link_libraries (unity-standalone dash-lib launcher-lib |
