diff options
| -rw-r--r-- | plugins/unityshell/src/HudController.cpp | 3 | ||||
| -rw-r--r-- | plugins/unityshell/src/IconTexture.cpp | 22 | ||||
| -rw-r--r-- | tests/CMakeLists.txt | 18 | ||||
| -rw-r--r-- | tests/test_service_main.c | 8 |
4 files changed, 23 insertions, 28 deletions
diff --git a/plugins/unityshell/src/HudController.cpp b/plugins/unityshell/src/HudController.cpp index 123d81f50..0a9da752e 100644 --- a/plugins/unityshell/src/HudController.cpp +++ b/plugins/unityshell/src/HudController.cpp @@ -227,8 +227,9 @@ void Controller::ShowHud() window_->QueueDraw(); view_->ResetToDefault(); + + view_->SetIcon(""); hud_service_.RequestQuery(""); - need_show_ = false; visible_ = true; diff --git a/plugins/unityshell/src/IconTexture.cpp b/plugins/unityshell/src/IconTexture.cpp index 49cd19c84..d6084d1fd 100644 --- a/plugins/unityshell/src/IconTexture.cpp +++ b/plugins/unityshell/src/IconTexture.cpp @@ -80,25 +80,19 @@ IconTexture::~IconTexture() void IconTexture::SetByIconName(const char* icon_name, unsigned int size) { - if (g_strcmp0(icon_name, "") != 0) - { - g_free(_icon_name); - _icon_name = g_strdup(icon_name); - _size = size; - LoadIcon(); - } + g_free(_icon_name); + _icon_name = g_strdup(icon_name); + _size = size; + LoadIcon(); } void IconTexture::SetByFilePath(const char* file_path, unsigned int size) { - if (g_strcmp0(file_path, "") != 0) - { - g_free(_icon_name); - _icon_name = g_strdup(file_path); - _size = size; + g_free(_icon_name); + _icon_name = g_strdup(file_path); + _size = size; - LoadIcon(); - } + LoadIcon(); } void IconTexture::LoadIcon() diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 06cac26df..8db214881 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -166,16 +166,16 @@ if (GTEST_FOUND AND # tests that require dbus, must not require X add_executable(test-gtest-dbus -# test_categories.cpp -# test_filesystem_lenses.cpp -# test_filter.cpp -# test_indicator_entry.cpp -# test_lens.cpp + test_categories.cpp + test_filesystem_lenses.cpp + test_filter.cpp + test_indicator_entry.cpp + test_lens.cpp test_main_dbus.cpp -# test_model.cpp -# test_utils.h -# test_ratings_filter.cpp -# test_results.cpp + test_model.cpp + test_utils.h + test_ratings_filter.cpp + test_results.cpp test_hud.cpp ) target_link_libraries(test-gtest-dbus ${GTEST_BOTH_LIBRARIES}) diff --git a/tests/test_service_main.c b/tests/test_service_main.c index b4c7c4333..e03bef41c 100644 --- a/tests/test_service_main.c +++ b/tests/test_service_main.c @@ -33,8 +33,8 @@ static const GDBusInterfaceVTable interface_vtable = }; static GMainLoop* loop_ = NULL; -//static ServiceLens* lens_ = NULL; -//static ServiceModel* model_ = NULL; +static ServiceLens* lens_ = NULL; +static ServiceModel* model_ = NULL; static ServiceHud* hud_ = NULL; gint @@ -44,8 +44,8 @@ main(gint argc, gchar** argv) loop_ = g_main_loop_new(NULL, FALSE); - //lens_ = service_lens_new(); - //model_ = service_model_new(); + lens_ = service_lens_new(); + model_ = service_model_new(); hud_ = service_hud_new(); g_bus_own_name(G_BUS_TYPE_SESSION, |
