diff options
| -rw-r--r-- | CMakeLists.txt | 44 | ||||
| -rw-r--r-- | UnityCore/CMakeLists.txt | 4 | ||||
| -rw-r--r-- | UnityCore/CheckOptionFilter.cpp | 6 | ||||
| -rw-r--r-- | UnityCore/DBusIndicators.cpp | 3 | ||||
| -rw-r--r-- | UnityCore/FilesystemLenses.cpp | 4 | ||||
| -rw-r--r-- | UnityCore/Filter.cpp | 6 | ||||
| -rw-r--r-- | UnityCore/GLibDBusProxy.cpp | 2 | ||||
| -rw-r--r-- | UnityCore/HomeLens.cpp | 4 | ||||
| -rw-r--r-- | UnityCore/Hud.cpp | 2 | ||||
| -rw-r--r-- | UnityCore/Lens.cpp | 3 | ||||
| -rw-r--r-- | UnityCore/Model-inl.h | 11 | ||||
| -rw-r--r-- | UnityCore/MultiRangeFilter.cpp | 6 | ||||
| -rw-r--r-- | UnityCore/Preview.cpp | 6 | ||||
| -rw-r--r-- | UnityCore/RadioOptionFilter.cpp | 6 | ||||
| -rw-r--r-- | UnityCore/RatingsFilter.cpp | 6 | ||||
| -rw-r--r-- | UnityCore/ResultIterator.cpp | 6 | ||||
| -rw-r--r-- | dash/CMakeLists.txt | 1 | ||||
| -rw-r--r-- | dash/DashController.cpp | 4 | ||||
| -rw-r--r-- | dash/DashView.cpp | 3 | ||||
| -rw-r--r-- | dash/FilterBar.cpp | 7 | ||||
| -rw-r--r-- | dash/FilterFactory.cpp | 4 | ||||
| -rw-r--r-- | dash/LensBar.cpp | 4 | ||||
| -rwxr-xr-x | dash/LensView.cpp | 3 | ||||
| -rwxr-xr-x | dash/PlacesGroup.cpp | 7 | ||||
| -rw-r--r-- | dash/PreviewStateMachine.cpp | 5 | ||||
| -rw-r--r-- | dash/ResultRenderer.cpp | 17 | ||||
| -rw-r--r-- | dash/ResultRenderer.h | 12 | ||||
| -rw-r--r-- | dash/ResultRendererHorizontalTile.cpp | 32 | ||||
| -rw-r--r-- | dash/ResultRendererHorizontalTile.h | 9 | ||||
| -rw-r--r-- | dash/ResultRendererTile.cpp | 25 | ||||
| -rw-r--r-- | dash/ResultRendererTile.h | 22 | ||||
| -rw-r--r-- | dash/ResultView.cpp | 14 | ||||
| -rw-r--r-- | dash/ResultViewGrid.cpp | 23 | ||||
| -rw-r--r-- | dash/previews/ActionButton.cpp | 3 | ||||
| -rw-r--r-- | dash/previews/ApplicationPreview.cpp | 6 | ||||
| -rw-r--r-- | dash/previews/CMakeLists.txt | 1 | ||||
| -rw-r--r-- | dash/previews/DBusTestRunner.h | 8 | ||||
| -rw-r--r-- | dash/previews/GenericPreview.cpp | 9 | ||||
| -rw-r--r-- | dash/previews/MoviePreview.cpp | 7 | ||||
| -rw-r--r-- | dash/previews/MusicPreview.cpp | 7 | ||||
| -rw-r--r-- | dash/previews/Preview.cpp | 8 | ||||
| -rw-r--r-- | dash/previews/PreviewContainer.cpp | 3 | ||||
| -rw-r--r-- | dash/previews/PreviewInfoHintWidget.cpp | 3 | ||||
| -rw-r--r-- | dash/previews/PreviewNavigator.cpp | 9 | ||||
| -rw-r--r-- | dash/previews/SocialPreview.cpp | 7 | ||||
| -rw-r--r-- | dash/previews/SocialPreviewComments.cpp | 3 | ||||
| -rw-r--r-- | dash/previews/SocialPreviewContent.cpp | 3 | ||||
| -rw-r--r-- | dash/previews/StandaloneMusicPreview.cpp | 5 | ||||
| -rw-r--r-- | dash/previews/Track.cpp | 3 | ||||
| -rw-r--r-- | dash/previews/Tracks.cpp | 8 | ||||
| -rw-r--r-- | hud/CMakeLists.txt | 1 | ||||
| -rw-r--r-- | hud/HudButton.cpp | 3 | ||||
| -rw-r--r-- | hud/HudController.cpp | 6 | ||||
| -rw-r--r-- | hud/HudIcon.cpp | 6 | ||||
| -rw-r--r-- | hud/HudIconTextureSource.cpp | 6 | ||||
| -rw-r--r-- | hud/HudView.cpp | 4 | ||||
| -rw-r--r-- | hud/StandaloneHud.cpp | 5 | ||||
| -rw-r--r-- | launcher/AbstractLauncherIcon.h | 1 | ||||
| -rw-r--r-- | launcher/ApplicationLauncherIcon.cpp | 17 | ||||
| -rw-r--r-- | launcher/CMakeLists.txt | 19 | ||||
| -rw-r--r-- | launcher/DevicesSettingsImp.cpp | 4 | ||||
| -rw-r--r-- | launcher/FavoriteStore.cpp | 2 | ||||
| -rw-r--r-- | launcher/FavoriteStoreGSettings.cpp | 2 | ||||
| -rw-r--r-- | launcher/HudLauncherIcon.cpp | 6 | ||||
| -rw-r--r-- | launcher/Launcher.cpp | 51 | ||||
| -rw-r--r-- | launcher/Launcher.h | 22 | ||||
| -rw-r--r-- | launcher/LauncherController.cpp | 35 | ||||
| -rw-r--r-- | launcher/LauncherControllerPrivate.h | 8 | ||||
| -rw-r--r-- | launcher/LauncherEntryRemote.cpp | 6 | ||||
| -rw-r--r-- | launcher/LauncherEntryRemoteModel.cpp | 6 | ||||
| -rw-r--r-- | launcher/LauncherHideMachine.cpp | 2 | ||||
| -rw-r--r-- | launcher/LauncherIcon.cpp | 9 | ||||
| -rw-r--r-- | launcher/LauncherIcon.h | 1 | ||||
| -rw-r--r-- | launcher/MockLauncherIcon.h | 4 | ||||
| -rw-r--r-- | launcher/QuicklistView.cpp | 11 | ||||
| -rw-r--r-- | launcher/QuicklistView.h | 1 | ||||
| -rw-r--r-- | launcher/SimpleLauncherIcon.cpp | 6 | ||||
| -rw-r--r-- | launcher/StandaloneLauncher.cpp | 10 | ||||
| -rw-r--r-- | launcher/SwitcherController.cpp | 9 | ||||
| -rw-r--r-- | launcher/SwitcherController.h | 2 | ||||
| -rw-r--r-- | launcher/TrashLauncherIcon.cpp | 6 | ||||
| -rw-r--r-- | launcher/VolumeLauncherIcon.cpp | 35 | ||||
| -rw-r--r-- | panel/CMakeLists.txt | 1 | ||||
| -rw-r--r-- | panel/PanelController.cpp | 8 | ||||
| -rw-r--r-- | panel/PanelIndicatorsView.cpp | 5 | ||||
| -rw-r--r-- | panel/PanelMenuView.cpp | 88 | ||||
| -rw-r--r-- | panel/PanelMenuView.h | 6 | ||||
| -rw-r--r-- | panel/PanelTray.cpp | 2 | ||||
| -rw-r--r-- | panel/PanelView.cpp | 3 | ||||
| -rw-r--r-- | plugins/unity-mt-grab-handles/unitymtgrabhandles.xml.in | 4 | ||||
| -rw-r--r-- | plugins/unityshell/CMakeLists.txt | 6 | ||||
| -rw-r--r-- | plugins/unityshell/src/CompoundGestureRecognizer.cpp | 5 | ||||
| -rw-r--r-- | plugins/unityshell/src/DebugDBusInterface.cpp | 8 | ||||
| -rw-r--r-- | plugins/unityshell/src/GesturalWindowSwitcher.cpp | 5 | ||||
| -rw-r--r-- | plugins/unityshell/src/WindowMinimizeSpeedController.cpp | 4 | ||||
| -rw-r--r-- | plugins/unityshell/src/XPathQueryPart.cpp | 5 | ||||
| -rw-r--r-- | plugins/unityshell/src/unityshell.cpp | 59 | ||||
| -rw-r--r-- | plugins/unityshell/src/unityshell.h | 3 | ||||
| -rw-r--r-- | plugins/unityshell/unityshell.xml.in | 118 | ||||
| -rw-r--r-- | resources/album_missing.png (renamed from plugins/unityshell/resources/album_missing.png) | bin | 1563 -> 1563 bytes | |||
| -rw-r--r-- | resources/album_missing_preview.png (renamed from plugins/unityshell/resources/album_missing_preview.png) | bin | 2836 -> 2836 bytes | |||
| -rw-r--r-- | resources/bag.svg (renamed from plugins/unityshell/resources/bag.svg) | 0 | ||||
| -rw-r--r-- | resources/category_gradient.png (renamed from plugins/unityshell/resources/category_gradient.png) | bin | 9116 -> 9116 bytes | |||
| -rw-r--r-- | resources/category_gradient_no_refine.png (renamed from plugins/unityshell/resources/category_gradient_no_refine.png) | bin | 10331 -> 10331 bytes | |||
| -rw-r--r-- | resources/close_dash.png (renamed from plugins/unityshell/resources/close_dash.png) | bin | 1292 -> 1292 bytes | |||
| -rw-r--r-- | resources/close_dash_disabled.png (renamed from plugins/unityshell/resources/close_dash_disabled.png) | bin | 1292 -> 1292 bytes | |||
| -rw-r--r-- | resources/close_dash_prelight.png (renamed from plugins/unityshell/resources/close_dash_prelight.png) | bin | 1383 -> 1383 bytes | |||
| -rw-r--r-- | resources/close_dash_pressed.png (renamed from plugins/unityshell/resources/close_dash_pressed.png) | bin | 1302 -> 1302 bytes | |||
| -rw-r--r-- | resources/dash-widgets.json (renamed from plugins/unityshell/resources/dash-widgets.json) | 0 | ||||
| -rw-r--r-- | resources/dash_bottom_border_tile.png (renamed from plugins/unityshell/resources/dash_bottom_border_tile.png) | bin | 249 -> 249 bytes | |||
| -rw-r--r-- | resources/dash_bottom_border_tile_mask.png (renamed from plugins/unityshell/resources/dash_bottom_border_tile_mask.png) | bin | 159 -> 159 bytes | |||
| -rw-r--r-- | resources/dash_bottom_left_corner.png (renamed from plugins/unityshell/resources/dash_bottom_left_corner.png) | bin | 1545 -> 1545 bytes | |||
| -rw-r--r-- | resources/dash_bottom_left_corner_mask.png (renamed from plugins/unityshell/resources/dash_bottom_left_corner_mask.png) | bin | 261 -> 261 bytes | |||
| -rw-r--r-- | resources/dash_bottom_right_corner.png (renamed from plugins/unityshell/resources/dash_bottom_right_corner.png) | bin | 1874 -> 1874 bytes | |||
| -rw-r--r-- | resources/dash_bottom_right_corner_mask.png (renamed from plugins/unityshell/resources/dash_bottom_right_corner_mask.png) | bin | 251 -> 251 bytes | |||
| -rw-r--r-- | resources/dash_fullscreen_icon.png (renamed from plugins/unityshell/resources/dash_fullscreen_icon.png) | bin | 767 -> 767 bytes | |||
| -rw-r--r-- | resources/dash_group_expand.png (renamed from plugins/unityshell/resources/dash_group_expand.png) | bin | 201 -> 201 bytes | |||
| -rw-r--r-- | resources/dash_group_unexpand.png (renamed from plugins/unityshell/resources/dash_group_unexpand.png) | bin | 211 -> 211 bytes | |||
| -rw-r--r-- | resources/dash_left_edge.png (renamed from plugins/unityshell/resources/dash_left_edge.png) | bin | 504 -> 504 bytes | |||
| -rw-r--r-- | resources/dash_left_tile.png (renamed from plugins/unityshell/resources/dash_left_tile.png) | bin | 1082 -> 1082 bytes | |||
| -rw-r--r--[-rwxr-xr-x] | resources/dash_noise.png (renamed from plugins/unityshell/resources/dash_noise.png) | bin | 31187 -> 31187 bytes | |||
| -rw-r--r-- | resources/dash_right_border_tile.png (renamed from plugins/unityshell/resources/dash_right_border_tile.png) | bin | 243 -> 243 bytes | |||
| -rw-r--r-- | resources/dash_right_border_tile_mask.png (renamed from plugins/unityshell/resources/dash_right_border_tile_mask.png) | bin | 156 -> 156 bytes | |||
| -rw-r--r-- | resources/dash_sheen.png (renamed from plugins/unityshell/resources/dash_sheen.png) | bin | 11998 -> 11998 bytes | |||
| -rw-r--r-- | resources/dash_top_edge.png (renamed from plugins/unityshell/resources/dash_top_edge.png) | bin | 415 -> 415 bytes | |||
| -rw-r--r-- | resources/dash_top_right_corner.png (renamed from plugins/unityshell/resources/dash_top_right_corner.png) | bin | 1530 -> 1530 bytes | |||
| -rw-r--r-- | resources/dash_top_right_corner_mask.png (renamed from plugins/unityshell/resources/dash_top_right_corner_mask.png) | bin | 266 -> 266 bytes | |||
| -rw-r--r-- | resources/dash_top_tile.png (renamed from plugins/unityshell/resources/dash_top_tile.png) | bin | 1082 -> 1082 bytes | |||
| -rw-r--r-- | resources/emblem_apps.svg (renamed from plugins/unityshell/resources/emblem_apps.svg) | 0 | ||||
| -rw-r--r-- | resources/emblem_books.svg (renamed from plugins/unityshell/resources/emblem_books.svg) | 0 | ||||
| -rw-r--r-- | resources/emblem_clothes.svg (renamed from plugins/unityshell/resources/emblem_clothes.svg) | 0 | ||||
| -rw-r--r-- | resources/emblem_music.svg (renamed from plugins/unityshell/resources/emblem_music.svg) | 0 | ||||
| -rw-r--r-- | resources/emblem_others.svg (renamed from plugins/unityshell/resources/emblem_others.svg) | 0 | ||||
| -rw-r--r-- | resources/emblem_video.svg (renamed from plugins/unityshell/resources/emblem_video.svg) | 0 | ||||
| -rw-r--r-- | resources/find_files.png (renamed from plugins/unityshell/resources/find_files.png) | bin | 4167 -> 4167 bytes | |||
| -rw-r--r-- | resources/find_internet_apps.png (renamed from plugins/unityshell/resources/find_internet_apps.png) | bin | 4537 -> 4537 bytes | |||
| -rw-r--r-- | resources/find_media_apps.png (renamed from plugins/unityshell/resources/find_media_apps.png) | bin | 4311 -> 4311 bytes | |||
| -rw-r--r-- | resources/find_more_apps.png (renamed from plugins/unityshell/resources/find_more_apps.png) | bin | 4226 -> 4226 bytes | |||
| -rw-r--r-- | resources/flow-view.svg (renamed from plugins/unityshell/resources/flow-view.svg) | 0 | ||||
| -rw-r--r-- | resources/grid-view.svg (renamed from plugins/unityshell/resources/grid-view.svg) | 0 | ||||
| -rw-r--r-- | resources/launcher_arrow_ltr.png (renamed from plugins/unityshell/resources/launcher_arrow_ltr.png) | bin | 279 -> 279 bytes | |||
| -rw-r--r-- | resources/launcher_arrow_outline_ltr.png (renamed from plugins/unityshell/resources/launcher_arrow_outline_ltr.png) | bin | 310 -> 310 bytes | |||
| -rw-r--r-- | resources/launcher_arrow_outline_rtl.png (renamed from plugins/unityshell/resources/launcher_arrow_outline_rtl.png) | bin | 301 -> 301 bytes | |||
| -rw-r--r-- | resources/launcher_arrow_rtl.png (renamed from plugins/unityshell/resources/launcher_arrow_rtl.png) | bin | 269 -> 269 bytes | |||
| -rw-r--r-- | resources/launcher_bfb.png (renamed from plugins/unityshell/resources/launcher_bfb.png) | bin | 1294 -> 1294 bytes | |||
| -rw-r--r-- | resources/launcher_icon_back_150.png (renamed from plugins/unityshell/resources/launcher_icon_back_150.png) | bin | 3963 -> 3963 bytes | |||
| -rw-r--r-- | resources/launcher_icon_back_170.png (renamed from plugins/unityshell/resources/launcher_icon_back_170.png) | bin | 6990 -> 6990 bytes | |||
| -rw-r--r-- | resources/launcher_icon_back_54.png (renamed from plugins/unityshell/resources/launcher_icon_back_54.png) | bin | 3067 -> 3067 bytes | |||
| -rw-r--r-- | resources/launcher_icon_edge_150.png (renamed from plugins/unityshell/resources/launcher_icon_edge_150.png) | bin | 2185 -> 2185 bytes | |||
| -rw-r--r-- | resources/launcher_icon_edge_170.png (renamed from plugins/unityshell/resources/launcher_icon_edge_170.png) | bin | 4909 -> 4909 bytes | |||
| -rw-r--r-- | resources/launcher_icon_edge_54.png (renamed from plugins/unityshell/resources/launcher_icon_edge_54.png) | bin | 3144 -> 3144 bytes | |||
| -rw-r--r-- | resources/launcher_icon_glow_200.png (renamed from plugins/unityshell/resources/launcher_icon_glow_200.png) | bin | 5422 -> 5422 bytes | |||
| -rw-r--r-- | resources/launcher_icon_glow_62.png (renamed from plugins/unityshell/resources/launcher_icon_glow_62.png) | bin | 954 -> 954 bytes | |||
| -rw-r--r-- | resources/launcher_icon_selected_back_150.png (renamed from plugins/unityshell/resources/launcher_icon_selected_back_150.png) | bin | 1084 -> 1084 bytes | |||
| -rw-r--r-- | resources/launcher_icon_selected_back_170.png (renamed from plugins/unityshell/resources/launcher_icon_selected_back_170.png) | bin | 3788 -> 3788 bytes | |||
| -rw-r--r-- | resources/launcher_icon_selected_edge_150.png (renamed from plugins/unityshell/resources/launcher_icon_selected_edge_150.png) | bin | 1824 -> 1824 bytes | |||
| -rw-r--r-- | resources/launcher_icon_selected_edge_170.png (renamed from plugins/unityshell/resources/launcher_icon_selected_edge_170.png) | bin | 4642 -> 4642 bytes | |||
| -rw-r--r-- | resources/launcher_icon_shadow_200.png (renamed from plugins/unityshell/resources/launcher_icon_shadow_200.png) | bin | 2719 -> 2719 bytes | |||
| -rw-r--r-- | resources/launcher_icon_shadow_62.png (renamed from plugins/unityshell/resources/launcher_icon_shadow_62.png) | bin | 612 -> 612 bytes | |||
| -rw-r--r-- | resources/launcher_icon_shine_150.png (renamed from plugins/unityshell/resources/launcher_icon_shine_150.png) | bin | 6846 -> 6846 bytes | |||
| -rw-r--r-- | resources/launcher_icon_shine_170.png (renamed from plugins/unityshell/resources/launcher_icon_shine_170.png) | bin | 11408 -> 11408 bytes | |||
| -rw-r--r-- | resources/launcher_icon_shine_54.png (renamed from plugins/unityshell/resources/launcher_icon_shine_54.png) | bin | 3974 -> 3974 bytes | |||
| -rw-r--r-- | resources/launcher_pip_ltr.png (renamed from plugins/unityshell/resources/launcher_pip_ltr.png) | bin | 205 -> 205 bytes | |||
| -rw-r--r-- | resources/launcher_pip_rtl.png (renamed from plugins/unityshell/resources/launcher_pip_rtl.png) | bin | 195 -> 195 bytes | |||
| -rw-r--r-- | resources/launcher_pressure_effect.png (renamed from plugins/unityshell/resources/launcher_pressure_effect.png) | bin | 212 -> 212 bytes | |||
| -rw-r--r-- | resources/lens-nav-app.svg (renamed from plugins/unityshell/resources/lens-nav-app.svg) | 0 | ||||
| -rw-r--r-- | resources/lens-nav-file.svg (renamed from plugins/unityshell/resources/lens-nav-file.svg) | 0 | ||||
| -rw-r--r-- | resources/lens-nav-gwibber.svg (renamed from plugins/unityshell/resources/lens-nav-gwibber.svg) | 0 | ||||
| -rw-r--r-- | resources/lens-nav-home.svg (renamed from plugins/unityshell/resources/lens-nav-home.svg) | 0 | ||||
| -rw-r--r-- | resources/lens-nav-music.svg (renamed from plugins/unityshell/resources/lens-nav-music.svg) | 0 | ||||
| -rw-r--r-- | resources/lens-nav-people.svg (renamed from plugins/unityshell/resources/lens-nav-people.svg) | 0 | ||||
| -rw-r--r-- | resources/lens-nav-photo.svg (renamed from plugins/unityshell/resources/lens-nav-photo.svg) | 0 | ||||
| -rw-r--r-- | resources/lens-nav-video.svg (renamed from plugins/unityshell/resources/lens-nav-video.svg) | 0 | ||||
| -rw-r--r-- | resources/maximize_dash.png (renamed from plugins/unityshell/resources/maximize_dash.png) | bin | 1185 -> 1185 bytes | |||
| -rw-r--r-- | resources/maximize_dash_disabled.png (renamed from plugins/unityshell/resources/maximize_dash_disabled.png) | bin | 1208 -> 1208 bytes | |||
| -rw-r--r-- | resources/maximize_dash_prelight.png (renamed from plugins/unityshell/resources/maximize_dash_prelight.png) | bin | 1316 -> 1316 bytes | |||
| -rw-r--r-- | resources/maximize_dash_pressed.png (renamed from plugins/unityshell/resources/maximize_dash_pressed.png) | bin | 1211 -> 1211 bytes | |||
| -rw-r--r-- | resources/minimize_dash.png (renamed from plugins/unityshell/resources/minimize_dash.png) | bin | 1191 -> 1191 bytes | |||
| -rw-r--r-- | resources/minimize_dash_disabled.png (renamed from plugins/unityshell/resources/minimize_dash_disabled.png) | bin | 1191 -> 1191 bytes | |||
| -rw-r--r-- | resources/minimize_dash_prelight.png (renamed from plugins/unityshell/resources/minimize_dash_prelight.png) | bin | 1191 -> 1191 bytes | |||
| -rw-r--r-- | resources/minimize_dash_pressed.png (renamed from plugins/unityshell/resources/minimize_dash_pressed.png) | bin | 1191 -> 1191 bytes | |||
| -rw-r--r-- | resources/next.svg (renamed from plugins/unityshell/resources/next.svg) | 0 | ||||
| -rw-r--r-- | resources/panel-shadow.png (renamed from plugins/unityshell/resources/panel-shadow.png) | bin | 169 -> 169 bytes | |||
| -rw-r--r-- | resources/pattern_overlay.png (renamed from plugins/unityshell/resources/pattern_overlay.png) | bin | 2813 -> 2813 bytes | |||
| -rw-r--r-- | resources/pause.svg (renamed from plugins/unityshell/resources/pause.svg) | 0 | ||||
| -rw-r--r-- | resources/places-tile-bg-tilable.png (renamed from plugins/unityshell/resources/places-tile-bg-tilable.png) | bin | 176 -> 176 bytes | |||
| -rw-r--r-- | resources/play.svg (renamed from plugins/unityshell/resources/play.svg) | 0 | ||||
| -rw-r--r-- | resources/prev.svg (renamed from plugins/unityshell/resources/prev.svg) | 0 | ||||
| -rw-r--r-- | resources/preview_next.svg (renamed from plugins/unityshell/resources/preview_next.svg) | 0 | ||||
| -rw-r--r-- | resources/preview_pause.svg (renamed from plugins/unityshell/resources/preview_pause.svg) | 0 | ||||
| -rw-r--r-- | resources/preview_play.svg (renamed from plugins/unityshell/resources/preview_play.svg) | 0 | ||||
| -rw-r--r-- | resources/preview_previous.svg (renamed from plugins/unityshell/resources/preview_previous.svg) | 0 | ||||
| -rw-r--r-- | resources/progress_bar_fill.png (renamed from plugins/unityshell/resources/progress_bar_fill.png) | bin | 209 -> 209 bytes | |||
| -rw-r--r-- | resources/progress_bar_trough.png (renamed from plugins/unityshell/resources/progress_bar_trough.png) | bin | 521 -> 521 bytes | |||
| -rw-r--r-- | resources/refine_gradient.png (renamed from plugins/unityshell/resources/refine_gradient.png) | bin | 27709 -> 27709 bytes | |||
| -rw-r--r-- | resources/refine_gradient_corner.png (renamed from plugins/unityshell/resources/refine_gradient_corner.png) | bin | 201 -> 201 bytes | |||
| -rw-r--r-- | resources/refine_gradient_dash.png (renamed from plugins/unityshell/resources/refine_gradient_dash.png) | bin | 22279 -> 22279 bytes | |||
| -rw-r--r-- | resources/refine_gradient_dash_no_refine.png (renamed from plugins/unityshell/resources/refine_gradient_dash_no_refine.png) | bin | 3173 -> 3173 bytes | |||
| -rw-r--r-- | resources/refine_gradient_no_refine_dash.png (renamed from plugins/unityshell/resources/refine_gradient_no_refine_dash.png) | bin | 6093 -> 6093 bytes | |||
| -rw-r--r-- | resources/refine_gradient_panel.png (renamed from plugins/unityshell/resources/refine_gradient_panel.png) | bin | 2169 -> 2169 bytes | |||
| -rw-r--r-- | resources/refine_gradient_panel_no_refine.png (renamed from plugins/unityshell/resources/refine_gradient_panel_no_refine.png) | bin | 1981 -> 1981 bytes | |||
| -rw-r--r-- | resources/refine_gradient_panel_single_column.png (renamed from plugins/unityshell/resources/refine_gradient_panel_single_column.png) | bin | 141 -> 141 bytes | |||
| -rw-r--r-- | resources/round_corner_54x54.png (renamed from plugins/unityshell/resources/round_corner_54x54.png) | bin | 397 -> 397 bytes | |||
| -rw-r--r-- | resources/round_glow_62x62.png (renamed from plugins/unityshell/resources/round_glow_62x62.png) | bin | 954 -> 954 bytes | |||
| -rw-r--r-- | resources/round_glow_hl_62x62.png (renamed from plugins/unityshell/resources/round_glow_hl_62x62.png) | bin | 1616 -> 1616 bytes | |||
| -rw-r--r-- | resources/round_outline_54x54.png (renamed from plugins/unityshell/resources/round_outline_54x54.png) | bin | 1274 -> 1274 bytes | |||
| -rw-r--r-- | resources/round_shine_54x54.png (renamed from plugins/unityshell/resources/round_shine_54x54.png) | bin | 2340 -> 2340 bytes | |||
| -rw-r--r-- | resources/search_circle.svg (renamed from plugins/unityshell/resources/search_circle.svg) | 0 | ||||
| -rw-r--r-- | resources/search_close.png (renamed from plugins/unityshell/resources/search_close.png) | bin | 269 -> 269 bytes | |||
| -rw-r--r-- | resources/search_close.svg (renamed from plugins/unityshell/resources/search_close.svg) | 0 | ||||
| -rw-r--r-- | resources/search_magnify.png (renamed from plugins/unityshell/resources/search_magnify.png) | bin | 496 -> 496 bytes | |||
| -rw-r--r-- | resources/search_spin.png (renamed from plugins/unityshell/resources/search_spin.png) | bin | 493 -> 493 bytes | |||
| -rw-r--r-- | resources/search_spin.svg (renamed from plugins/unityshell/resources/search_spin.svg) | 0 | ||||
| -rw-r--r-- | resources/shortcuts_group_icon.png (renamed from plugins/unityshell/resources/shortcuts_group_icon.png) | bin | 714 -> 714 bytes | |||
| -rw-r--r-- | resources/squircle_base_54.png (renamed from plugins/unityshell/resources/squircle_base_54.png) | bin | 1241 -> 1241 bytes | |||
| -rw-r--r-- | resources/squircle_base_selected_54.png (renamed from plugins/unityshell/resources/squircle_base_selected_54.png) | bin | 584 -> 584 bytes | |||
| -rw-r--r-- | resources/squircle_edge_54.png (renamed from plugins/unityshell/resources/squircle_edge_54.png) | bin | 1814 -> 1814 bytes | |||
| -rw-r--r-- | resources/squircle_glow_62.png (renamed from plugins/unityshell/resources/squircle_glow_62.png) | bin | 1565 -> 1565 bytes | |||
| -rw-r--r-- | resources/squircle_shadow_62.png (renamed from plugins/unityshell/resources/squircle_shadow_62.png) | bin | 1006 -> 1006 bytes | |||
| -rw-r--r-- | resources/squircle_shine_54.png (renamed from plugins/unityshell/resources/squircle_shine_54.png) | bin | 3471 -> 3471 bytes | |||
| -rw-r--r-- | resources/star-outline.svg (renamed from plugins/unityshell/resources/star-outline.svg) | 0 | ||||
| -rw-r--r-- | resources/star_deselected.png (renamed from plugins/unityshell/resources/star_deselected.png) | bin | 527 -> 527 bytes | |||
| -rw-r--r-- | resources/star_highlight.png (renamed from plugins/unityshell/resources/star_highlight.png) | bin | 497 -> 497 bytes | |||
| -rw-r--r-- | resources/star_selected.png (renamed from plugins/unityshell/resources/star_selected.png) | bin | 706 -> 706 bytes | |||
| -rw-r--r-- | resources/switcher_background.png (renamed from plugins/unityshell/resources/switcher_background.png) | bin | 2191 -> 2191 bytes | |||
| -rw-r--r-- | resources/switcher_corner.png (renamed from plugins/unityshell/resources/switcher_corner.png) | bin | 757 -> 757 bytes | |||
| -rw-r--r-- | resources/switcher_left.png (renamed from plugins/unityshell/resources/switcher_left.png) | bin | 308 -> 308 bytes | |||
| -rw-r--r-- | resources/switcher_top.png (renamed from plugins/unityshell/resources/switcher_top.png) | bin | 291 -> 291 bytes | |||
| -rw-r--r-- | resources/unmaximize_dash.png (renamed from plugins/unityshell/resources/unmaximize_dash.png) | bin | 1187 -> 1187 bytes | |||
| -rw-r--r-- | resources/unmaximize_dash_disabled.png (renamed from plugins/unityshell/resources/unmaximize_dash_disabled.png) | bin | 1208 -> 1208 bytes | |||
| -rw-r--r-- | resources/unmaximize_dash_prelight.png (renamed from plugins/unityshell/resources/unmaximize_dash_prelight.png) | bin | 1316 -> 1316 bytes | |||
| -rw-r--r-- | resources/unmaximize_dash_pressed.png (renamed from plugins/unityshell/resources/unmaximize_dash_pressed.png) | bin | 1211 -> 1211 bytes | |||
| -rw-r--r-- | resources/video_missing.png (renamed from plugins/unityshell/resources/video_missing.png) | bin | 1465 -> 1465 bytes | |||
| -rw-r--r-- | services/CMakeLists.txt | 1 | ||||
| -rw-r--r-- | shortcuts/CMakeLists.txt | 1 | ||||
| -rw-r--r-- | shortcuts/ShortcutHint.cpp | 6 | ||||
| -rw-r--r-- | tests/CMakeLists.txt | 148 | ||||
| -rw-r--r-- | tests/autopilot/unity/tests/__init__.py | 5 | ||||
| -rw-r--r-- | tests/autopilot/unity/tests/test_switcher.py | 25 | ||||
| -rw-r--r-- | tests/test_launcher_controller.cpp | 33 | ||||
| -rw-r--r-- | tests/test_panel_menu_view.cpp | 96 | ||||
| -rw-r--r-- | tests/test_places_group.cpp | 2 | ||||
| -rw-r--r-- | tests/test_quicklist_view.cpp | 2 | ||||
| -rw-r--r-- | tests/test_shortcut_controller.cpp | 2 | ||||
| -rw-r--r-- | tests/test_volume_launcher_icon.cpp | 29 | ||||
| -rw-r--r-- | unity-shared/BGHash.cpp | 9 | ||||
| -rw-r--r-- | unity-shared/CMakeLists.txt | 33 | ||||
| -rw-r--r-- | unity-shared/CoverArt.cpp | 3 | ||||
| -rwxr-xr-x | unity-shared/DashStyle.cpp | 3 | ||||
| -rw-r--r-- | unity-shared/FakeKeyboardUtil.cpp | 36 | ||||
| -rw-r--r-- | unity-shared/IconLoader.cpp | 2 | ||||
| -rw-r--r-- | unity-shared/IconRenderer.cpp | 6 | ||||
| -rw-r--r-- | unity-shared/IconTexture.cpp | 2 | ||||
| -rw-r--r-- | unity-shared/JSONParser.cpp | 3 | ||||
| -rw-r--r-- | unity-shared/OverlayRenderer.cpp | 7 | ||||
| -rw-r--r-- | unity-shared/PanelStyle.cpp | 3 | ||||
| -rw-r--r-- | unity-shared/PluginAdapter.cpp | 4 | ||||
| -rw-r--r-- | unity-shared/PreviewStyle.cpp | 3 | ||||
| -rw-r--r-- | unity-shared/ResizingBaseWindow.h | 2 | ||||
| -rw-r--r-- | unity-shared/SearchBar.cpp | 4 | ||||
| -rw-r--r-- | unity-shared/StandaloneWindowManager.cpp | 22 | ||||
| -rw-r--r-- | unity-shared/StandaloneWindowManager.h | 6 | ||||
| -rw-r--r-- | unity-shared/TextInput.cpp | 364 | ||||
| -rw-r--r-- | unity-shared/TextInput.h | 102 | ||||
| -rw-r--r-- | unity-shared/TextureCache.cpp | 5 | ||||
| -rw-r--r-- | unity-shared/ThumbnailGenerator.cpp | 2 | ||||
| -rw-r--r-- | unity-shared/UBusServer.cpp | 6 | ||||
| -rw-r--r-- | unity-shared/UScreen.cpp | 6 | ||||
| -rw-r--r-- | unity-shared/UnitySettings.cpp | 3 | ||||
| -rw-r--r-- | unity-standalone/CMakeLists.txt | 1 |
270 files changed, 1231 insertions, 796 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 11a7ea796..3a248d3b2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -107,6 +107,7 @@ configure_file (${CMAKE_SOURCE_DIR}/config.h.cmake ${CMAKE_BINARY_DIR}/config.h) # # i18n # + find_package (Gettext REQUIRED) set (COMPIZ_I18N_DIR ${CMAKE_SOURCE_DIR}/po) @@ -131,32 +132,43 @@ if (BOOT_LOGGER) SET (BOOT_LOGGER_FLAG "-DENABLE_LOGGER") endif (BOOT_LOGGER) -SET (MAINTAINER_CFLAGS "-Werror -Wall -Wcast-align -Wempty-body -Wformat-security -Winit-self -Warray-bounds") -option (DISABLE_MAINTAINER_CFLAGS "Disable maintainer CFlags" OFF) -if (DISABLE_MAINTAINER_CFLAGS) - SET (MAINTAINER_CFLAGS "") -endif (DISABLE_MAINTAINER_CFLAGS) +SET (MAINTAINER_CXXFLAGS "-Werror -Wall -Wcast-align -Wempty-body -Wformat-security -Winit-self -Warray-bounds") +option (DISABLE_MAINTAINER_CXXFLAGS "Disable maintainer CXXFlags" OFF) +if (DISABLE_MAINTAINER_CXXFLAGS) + SET (MAINTAINER_CXXFLAGS "") +endif (DISABLE_MAINTAINER_CXXFLAGS) + +# Make sure these flags are used for every build. +set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${MAINTAINER_CXXFLAGS}") # # Compiz Plugins # -set (UNITY_PLUGIN_DEPS "compiz>=0.9.8.0;nux-3.0>=3.0.0;libbamf3;dee-1.0;gio-2.0;gio-unix-2.0;gmodule-2.0;dbusmenu-glib-0.4;x11;libstartup-notification-1.0;gthread-2.0;indicator3-0.4>=0.4.90;atk;atk-bridge-2.0;unity-misc>=0.4.0;dbus-glib-1;gtk+-3.0>=3.1;sigc++-2.0;json-glib-1.0;libnotify;xfixes;unity-protocol-private>=5.95.1;libgeis;xrender>=0.9;zeitgeist-1.0>=0.3.18") +if(UNITY_ENABLE_X_ORG_SUPPORT) + set (UNITY_PLUGIN_DEPS "compiz>=0.9.8.0;nux-3.0>=3.0.0;libbamf3;dee-1.0;gio-2.0;gio-unix-2.0;gmodule-2.0;dbusmenu-glib-0.4;x11;libstartup-notification-1.0;gthread-2.0;indicator3-0.4>=0.4.90;atk;atk-bridge-2.0;unity-misc>=0.4.0;dbus-glib-1;gtk+-3.0>=3.1;sigc++-2.0;json-glib-1.0;libnotify;xfixes;unity-protocol-private>=5.95.1;libgeis;xrender>=0.9;zeitgeist-1.0>=0.3.18") +else () + set (UNITY_PLUGIN_DEPS "nux-3.0>=3.0.0;libbamf3;dee-1.0;gio-2.0;gio-unix-2.0;gmodule-2.0;dbusmenu-glib-0.4;libstartup-notification-1.0;gthread-2.0;indicator3-0.4>=0.4.90;atk;atk-bridge-2.0;unity-misc>=0.4.0;dbus-glib-1;gtk+-3.0>=3.1;sigc++-2.0;json-glib-1.0;libnotify;xfixes;unity-protocol-private>=5.95.1;libgeis;xrender>=0.9;zeitgeist-1.0>=0.3.18") +endif () + set (UNITY_PROTOCOL_PRIVATE_DEPS "unity-protocol-private>=5.95.1") + find_package (PkgConfig) pkg_check_modules (CACHED_UNITY_DEPS REQUIRED ${UNITY_PLUGIN_DEPS}) pkg_check_modules (CACHED_UNITY_PRIVATE_DEPS REQUIRED ${UNITY_PROTOCOL_PRIVATE_DEPS}) add_subdirectory(unity-shared) -add_subdirectory(panel) add_subdirectory(dash) -add_subdirectory(hud) add_subdirectory(launcher) add_subdirectory(shortcuts) -add_subdirectory(unity-standalone) -add_subdirectory(plugins/unityshell) -add_subdirectory(plugins/networkarearegion) -add_subdirectory(plugins/unitydialog) -add_subdirectory(plugins/unity-mt-grab-handles) +if(UNITY_ENABLE_X_ORG_SUPPORT) + add_subdirectory(hud) + add_subdirectory(panel) + add_subdirectory(plugins/unityshell) + add_subdirectory(plugins/networkarearegion) + add_subdirectory(plugins/unitydialog) + add_subdirectory(plugins/unity-mt-grab-handles) + add_subdirectory(unity-standalone) +endif() # subdirs add_subdirectory(doc) @@ -215,6 +227,12 @@ install (FILES ${UNITY_SCHEMAS} DESTINATION ${GSETTINGS_DIR} OPTIONAL) install (CODE "message (STATUS \"Compiling GSettings schemas\")") install (CODE "execute_process (COMMAND ${_glib_comple_schemas} ${GSETTINGS_DIR})") +# Resources +install (FILES resources/dash-widgets.json DESTINATION ${CMAKE_INSTALL_PREFIX}/share/unity/themes) +file (GLOB _datafiles "${CMAKE_CURRENT_SOURCE_DIR}/resources/*") +install (FILES ${_datafiles} DESTINATION ${PKGDATADIR}) + + # For testing configure_file (${CMAKE_SOURCE_DIR}/${UNITY_SCHEMAS} ${CMAKE_BINARY_DIR}/settings/${UNITY_SCHEMAS}) execute_process (COMMAND ${_glib_comple_schemas} ${CMAKE_BINARY_DIR}/settings) diff --git a/UnityCore/CMakeLists.txt b/UnityCore/CMakeLists.txt index 38cc126b9..a036af4f0 100644 --- a/UnityCore/CMakeLists.txt +++ b/UnityCore/CMakeLists.txt @@ -95,14 +95,12 @@ set (CORE_SOURCES # CFLAGS and LIBS # set (CFLAGS - ${CORE_DEPS_CFLAGS} - ${CORE_DEPS_CFLAGS_OTHER} - ${MAINTAINER_CFLAGS} "-I${CMAKE_BINARY_DIR}" "-DGETTEXT_PACKAGE=\"unity\"" "-DLENSES_DIR=\"${_lensesdir}\"" ) add_definitions (${CFLAGS}) +include_directories(${CORE_DEPS_INCLUDE_DIRS}) set (LIBS ${CORE_DEPS_LIBRARIES}) diff --git a/UnityCore/CheckOptionFilter.cpp b/UnityCore/CheckOptionFilter.cpp index 12ec03716..dd5a8a585 100644 --- a/UnityCore/CheckOptionFilter.cpp +++ b/UnityCore/CheckOptionFilter.cpp @@ -25,11 +25,7 @@ namespace unity { namespace dash { - -namespace -{ -nux::logging::Logger logger("unity.dash.checkoptionfilter"); -} +DECLARE_LOGGER(logger, "unity.dash.filter.checkoption"); CheckOptionFilter::CheckOptionFilter(DeeModel* model, DeeModelIter* iter) : Filter(model, iter) diff --git a/UnityCore/DBusIndicators.cpp b/UnityCore/DBusIndicators.cpp index 49250973f..8432c7ddb 100644 --- a/UnityCore/DBusIndicators.cpp +++ b/UnityCore/DBusIndicators.cpp @@ -32,11 +32,10 @@ namespace unity { namespace indicator { +DECLARE_LOGGER(logger, "unity.indicator.dbus"); namespace { -nux::logging::Logger logger("unity.indicator.DBusIndicators"); - const std::string SERVICE_NAME("com.canonical.Unity.Panel.Service"); const std::string SERVICE_PATH("/com/canonical/Unity/Panel/Service"); const std::string SERVICE_IFACE("com.canonical.Unity.Panel.Service"); diff --git a/UnityCore/FilesystemLenses.cpp b/UnityCore/FilesystemLenses.cpp index 189a9410f..186fc071a 100644 --- a/UnityCore/FilesystemLenses.cpp +++ b/UnityCore/FilesystemLenses.cpp @@ -37,13 +37,11 @@ namespace unity { namespace dash { +DECLARE_LOGGER(logger, "unity.dash.lens.filesystem"); namespace { - -nux::logging::Logger logger("unity.dash.filesystemlenses"); const char* GROUP = "Lens"; - } // Loads data from a Lens key-file in a usable form diff --git a/UnityCore/Filter.cpp b/UnityCore/Filter.cpp index 233098d49..a4917e442 100644 --- a/UnityCore/Filter.cpp +++ b/UnityCore/Filter.cpp @@ -30,11 +30,7 @@ namespace unity { namespace dash { - -namespace -{ -nux::logging::Logger logger("unity.dash.filter"); -} +DECLARE_LOGGER(logger, "unity.dash.filter"); using unity::glib::Signal; diff --git a/UnityCore/GLibDBusProxy.cpp b/UnityCore/GLibDBusProxy.cpp index 273bb42a3..54fd97e66 100644 --- a/UnityCore/GLibDBusProxy.cpp +++ b/UnityCore/GLibDBusProxy.cpp @@ -33,11 +33,11 @@ namespace unity { namespace glib { +DECLARE_LOGGER(logger, "unity.glib.dbusproxy"); namespace { const unsigned MAX_RECONNECTION_ATTEMPTS = 5; -nux::logging::Logger logger("unity.glib.dbusproxy"); } using std::string; diff --git a/UnityCore/HomeLens.cpp b/UnityCore/HomeLens.cpp index 5bfaf2af9..3f30885dd 100644 --- a/UnityCore/HomeLens.cpp +++ b/UnityCore/HomeLens.cpp @@ -38,12 +38,10 @@ namespace unity { namespace dash { +DECLARE_LOGGER(logger, "unity.dash.lens.home"); namespace { - -nux::logging::Logger logger("unity.dash.homelens"); - const gchar* const HOMELENS_PRIORITY = "unity-homelens-priority"; const gchar* const HOMELENS_RESULTS_MODEL = "unity-homelens-results-model"; diff --git a/UnityCore/Hud.cpp b/UnityCore/Hud.cpp index 730dc1766..d7502f5ba 100644 --- a/UnityCore/Hud.cpp +++ b/UnityCore/Hud.cpp @@ -33,10 +33,10 @@ namespace unity { namespace hud { +DECLARE_LOGGER(logger, "unity.hud.impl"); namespace { -nux::logging::Logger logger("unity.hud.hud"); const int request_number_of_results = 6; } diff --git a/UnityCore/Lens.cpp b/UnityCore/Lens.cpp index a4e0c5b0d..d2662136c 100644 --- a/UnityCore/Lens.cpp +++ b/UnityCore/Lens.cpp @@ -32,11 +32,10 @@ namespace unity { namespace dash { +DECLARE_LOGGER(logger, "unity.dash.lens"); namespace { -nux::logging::Logger logger("unity.dash.lens"); - const unsigned CATEGORY_COLUMN = 2; } diff --git a/UnityCore/Model-inl.h b/UnityCore/Model-inl.h index f560c8137..0d4dff694 100644 --- a/UnityCore/Model-inl.h +++ b/UnityCore/Model-inl.h @@ -27,11 +27,6 @@ namespace unity namespace dash { -namespace -{ -nux::logging::Logger _model_inl_logger("unity.dash.model"); -} - template<class RowAdaptor> Model<RowAdaptor>::Model() : model_type_(ModelType::REMOTE) @@ -67,10 +62,12 @@ void Model<RowAdaptor>::Init () template<class RowAdaptor> void Model<RowAdaptor>::OnSwarmNameChanged(std::string const& swarm_name) { + static nux::logging::Logger local_logger("unity.dash.model"); + typedef glib::Signal<void, DeeModel*, DeeModelIter*> RowSignalType; typedef glib::Signal<void, DeeModel*, guint64, guint64> TransactionSignalType; - LOG_DEBUG(_model_inl_logger) << "New swarm name: " << swarm_name; + LOG_DEBUG(local_logger) << "New swarm name: " << swarm_name; // Let the views clean up properly if (model_) @@ -95,7 +92,7 @@ void Model<RowAdaptor>::OnSwarmNameChanged(std::string const& swarm_name) sigc::mem_fun(this, &Model<RowAdaptor>::OnTransactionEnd))); break; default: - LOG_ERROR(_model_inl_logger) << "Unexpected ModelType " << model_type_; + LOG_ERROR(local_logger) << "Unexpected ModelType " << model_type_; break; } diff --git a/UnityCore/MultiRangeFilter.cpp b/UnityCore/MultiRangeFilter.cpp index 012b70730..0c14a383a 100644 --- a/UnityCore/MultiRangeFilter.cpp +++ b/UnityCore/MultiRangeFilter.cpp @@ -25,11 +25,7 @@ namespace unity { namespace dash { - -namespace -{ -nux::logging::Logger logger("unity.dash.multirangefilter"); -} +DECLARE_LOGGER(logger, "unity.dash.filter.multirange"); MultiRangeFilter::MultiRangeFilter(DeeModel* model, DeeModelIter* iter) : Filter(model, iter) diff --git a/UnityCore/Preview.cpp b/UnityCore/Preview.cpp index c0ac9f3fd..37f35576a 100644 --- a/UnityCore/Preview.cpp +++ b/UnityCore/Preview.cpp @@ -35,11 +35,7 @@ namespace unity { namespace dash { - -namespace -{ - nux::logging::Logger logger("unity.dash.preview"); -} +DECLARE_LOGGER(logger, "unity.dash.preview"); Preview::Ptr Preview::PreviewForProtocolObject(glib::Object<GObject> const& proto_obj) { diff --git a/UnityCore/RadioOptionFilter.cpp b/UnityCore/RadioOptionFilter.cpp index d67314be8..74521d965 100644 --- a/UnityCore/RadioOptionFilter.cpp +++ b/UnityCore/RadioOptionFilter.cpp @@ -25,11 +25,7 @@ namespace unity { namespace dash { - -namespace -{ -nux::logging::Logger logger("unity.dash.radiooptionfilter"); -} +DECLARE_LOGGER(logger, "unity.dash.filter.radiooption"); RadioOptionFilter::RadioOptionFilter(DeeModel* model, DeeModelIter* iter) : Filter(model, iter) diff --git a/UnityCore/RatingsFilter.cpp b/UnityCore/RatingsFilter.cpp index 5d2bc2218..53869546e 100644 --- a/UnityCore/RatingsFilter.cpp +++ b/UnityCore/RatingsFilter.cpp @@ -25,11 +25,7 @@ namespace unity { namespace dash { - -namespace -{ -nux::logging::Logger logger("unity.dash.ratingsfilter"); -} +DECLARE_LOGGER(logger, "unity.dash.filter.ratings"); RatingsFilter::RatingsFilter(DeeModel* model, DeeModelIter* iter) : Filter(model, iter) diff --git a/UnityCore/ResultIterator.cpp b/UnityCore/ResultIterator.cpp index 46592f97d..24df34135 100644 --- a/UnityCore/ResultIterator.cpp +++ b/UnityCore/ResultIterator.cpp @@ -23,11 +23,7 @@ namespace unity { namespace dash { - -namespace -{ - nux::logging::Logger logger("unity.dash.resultiterator"); -} +DECLARE_LOGGER(logger, "unity.dash.resultiterator"); ResultIterator::ResultIterator(glib::Object<DeeModel> model) : model_(model) diff --git a/dash/CMakeLists.txt b/dash/CMakeLists.txt index 657450885..4f61b082b 100644 --- a/dash/CMakeLists.txt +++ b/dash/CMakeLists.txt @@ -5,7 +5,6 @@ find_package (PkgConfig) set (CFLAGS ${CACHED_UNITY_DEPS_CFLAGS} ${CACHED_UNITY_DEPS_CFLAGS_OTHER} - ${MAINTAINER_CFLAGS} "-DGETTEXT_PACKAGE=\"unity\"" "-I${CMAKE_CURRENT_BINARY_DIR}" ) diff --git a/dash/DashController.cpp b/dash/DashController.cpp index 326b1474b..49a62b6bc 100644 --- a/dash/DashController.cpp +++ b/dash/DashController.cpp @@ -35,12 +35,12 @@ namespace unity { namespace dash { +DECLARE_LOGGER(logger, "unity.dash.controller"); -const char window_title[] = "unity-dash"; +const char* window_title = "unity-dash"; namespace { -nux::logging::Logger logger("unity.dash.controller"); const unsigned int PRELOAD_TIMEOUT_LENGTH = 40; const std::string DBUS_PATH = "/com/canonical/Unity/Dash"; diff --git a/dash/DashView.cpp b/dash/DashView.cpp index 330f4cfa7..c39c7bc16 100644 --- a/dash/DashView.cpp +++ b/dash/DashView.cpp @@ -41,10 +41,9 @@ namespace unity { namespace dash { +DECLARE_LOGGER(logger, "unity.dash.view"); namespace { - -nux::logging::Logger logger("unity.dash.view"); previews::Style preview_style; } diff --git a/dash/FilterBar.cpp b/dash/FilterBar.cpp index 6d8164d0f..5aba20fe3 100644 --- a/dash/FilterBar.cpp +++ b/dash/FilterBar.cpp @@ -32,12 +32,7 @@ namespace unity { namespace dash { -namespace -{ - -nux::logging::Logger logger("unity.dash.filterbar"); - -} +DECLARE_LOGGER(logger, "unity.dash.filter.bar"); NUX_IMPLEMENT_OBJECT_TYPE(FilterBar); diff --git a/dash/FilterFactory.cpp b/dash/FilterFactory.cpp index d5471a022..69fd77173 100644 --- a/dash/FilterFactory.cpp +++ b/dash/FilterFactory.cpp @@ -28,10 +28,10 @@ #include "FilterMultiRangeWidget.h" #include "FilterRatingsWidget.h" +DECLARE_LOGGER(logger, "unity.dash.filter.factory"); + namespace { - nux::logging::Logger logger("unity.dash.filterfactory"); - const std::string renderer_type_ratings = "filter-ratings"; const std::string renderer_type_multirange = "filter-multirange"; const std::string renderer_type_check_options = "filter-checkoption"; diff --git a/dash/LensBar.cpp b/dash/LensBar.cpp index 80a612c7e..767ff9a5a 100644 --- a/dash/LensBar.cpp +++ b/dash/LensBar.cpp @@ -26,11 +26,9 @@ namespace unity { namespace dash { +DECLARE_LOGGER(logger, "unity.dash.lensbar"); namespace { - -nux::logging::Logger logger("unity.dash.lensbar"); - // according to Q design the inner area of the lensbar should be 40px // (without any borders) const int LENSBAR_HEIGHT = 41; diff --git a/dash/LensView.cpp b/dash/LensView.cpp index 444905b50..1c58d0fc7 100755 --- a/dash/LensView.cpp +++ b/dash/LensView.cpp @@ -40,10 +40,9 @@ namespace unity { namespace dash { +DECLARE_LOGGER(logger, "unity.dash.lensview"); namespace { -nux::logging::Logger logger("unity.dash.lensview"); - const int CARD_VIEW_GAP_VERT = 24; // pixels const int CARD_VIEW_GAP_HORIZ = 25; // pixels } diff --git a/dash/PlacesGroup.cpp b/dash/PlacesGroup.cpp index f3ea717c6..91316aaf5 100755 --- a/dash/PlacesGroup.cpp +++ b/dash/PlacesGroup.cpp @@ -34,12 +34,6 @@ #include "unity-shared/UBusWrapper.h" #include "unity-shared/UBusMessages.h" - -namespace -{ -nux::logging::Logger logger("unity.dash.placesgroup"); -} - #include "ResultView.h" #include "ResultViewGrid.h" #include "ResultRendererTile.h" @@ -48,6 +42,7 @@ nux::logging::Logger logger("unity.dash.placesgroup"); #include "FilterBasicButton.h" +DECLARE_LOGGER(logger, "unity.dash.placesgroup"); namespace unity { namespace diff --git a/dash/PreviewStateMachine.cpp b/dash/PreviewStateMachine.cpp index 1d667820e..c64e576e4 100644 --- a/dash/PreviewStateMachine.cpp +++ b/dash/PreviewStateMachine.cpp @@ -22,11 +22,8 @@ namespace unity { namespace dash { +DECLARE_LOGGER(logger, "unity.dash.preview.statemachine"); -namespace -{ -nux::logging::Logger logger("unity.dash.PreviewStateMachine"); -} PreviewStateMachine::PreviewStateMachine() : preview_active(false) , left_results(-1) diff --git a/dash/ResultRenderer.cpp b/dash/ResultRenderer.cpp index 752e606d0..1d18176ea 100644 --- a/dash/ResultRenderer.cpp +++ b/dash/ResultRenderer.cpp @@ -20,8 +20,6 @@ * */ - - #include "ResultRenderer.h" namespace unity @@ -34,17 +32,12 @@ ResultRenderer::ResultRenderer(NUX_FILE_LINE_DECL) : InitiallyUnownedObject(NUX_FILE_LINE_PARAM) , width(50) , height(50) -{ -} - -ResultRenderer::~ResultRenderer() -{ -} +{} void ResultRenderer::Render(nux::GraphicsEngine& GfxContext, - Result& row, - ResultRendererState state, - nux::Geometry& geometry, int x_offset, int y_offset) + Result& /*row*/, + ResultRendererState /*state*/, + nux::Geometry const& geometry, int /*x_offset*/, int /*y_offset*/) { nux::GetPainter().PushDrawSliceScaledTextureLayer(GfxContext, geometry, nux::eBUTTON_NORMAL, nux::color::White, nux::eAllCorners); } @@ -59,6 +52,6 @@ void ResultRenderer::Unload(Result& row) // unload any resources } - } } + diff --git a/dash/ResultRenderer.h b/dash/ResultRenderer.h index aa215eea9..44dacdc8a 100644 --- a/dash/ResultRenderer.h +++ b/dash/ResultRenderer.h @@ -26,10 +26,6 @@ #define RESULTRENDERER_H #include <Nux/Nux.h> -#include <NuxCore/InitiallyUnownedObject.h> -#include <NuxCore/Property.h> -#include <dee.h> - #include <UnityCore/Result.h> namespace unity @@ -52,11 +48,11 @@ public: }; ResultRenderer(NUX_FILE_LINE_PROTO); - virtual ~ResultRenderer(); + virtual void Render(nux::GraphicsEngine& GfxContext, Result& row, ResultRendererState state, - nux::Geometry& geometry, + nux::Geometry const& geometry, int x_offset, int y_offset); // this is just to start preloading images and text that the renderer might @@ -66,8 +62,8 @@ public: // unload any previous grabbed images virtual void Unload(Result& row); - nux::Property<int> width; // the width of the element, - nux::Property<int> height; // the height of the element + nux::Property<int> width; + nux::Property<int> height; sigc::signal<void> NeedsRedraw; }; diff --git a/dash/ResultRendererHorizontalTile.cpp b/dash/ResultRendererHorizontalTile.cpp index 162b33523..acedf8878 100644 --- a/dash/ResultRendererHorizontalTile.cpp +++ b/dash/ResultRendererHorizontalTile.cpp @@ -24,17 +24,10 @@ #include <sstream> -#include <pango/pango.h> #include <pango/pangocairo.h> -#include <gdk/gdk.h> #include <gtk/gtk.h> -#include <UnityCore/GLibWrapper.h> - #include "unity-shared/CairoTexture.h" -#include "unity-shared/DashStyle.h" -#include "unity-shared/IconLoader.h" -#include "unity-shared/IconTexture.h" #include "unity-shared/TextureCache.h" @@ -42,27 +35,14 @@ namespace unity { namespace { -//~ nux::logging::Logger logger("unity.dash.ResultRendererHorizontalTile"); const int CARD_VIEW_PADDING = 4; // pixels const int CARD_VIEW_ICON_SIZE = 64; // pixels const int CARD_VIEW_ICON_TEXT_GAP = 10; // pixels -//const int CARD_VIEW_GAP_VERT = 24; // pixels -//const int CARD_VIEW_GAP_HORIZ = 25; // pixels const int CARD_VIEW_WIDTH = 277; // pixels const int CARD_VIEW_HEIGHT = 74; // pixels const int CARD_VIEW_HIGHLIGHT_CORNER_RADIUS = 2; // pixels -//const char CARD_VIEW_ICON_OUTLINE_COLOR = "#000000"; -//const float CARD_VIEW_ICON_OUTLINE_OPACITY = 1.0; //float const int CARD_VIEW_ICON_OUTLINE_WIDTH = 1; // pixels const int CARD_VIEW_TEXT_LINE_SPACING = 0; // points -//const char CARD_VIEW_TEXT_TITLE_COLOR = "#ffffff"; -//const float CARD_VIEW_TEXT_TITLE_OPACITY = 1.0; // float -//const float CARD_VIEW_TEXT_TITLE_SIZE = 13.0; // points -//const char CARD_VIEW_TEXT_TITLE_WEIGHT = "bold"; -//const char CARD_VIEW_TEXT_BODY_COLOR = "#ffffff"; -//const float CARD_VIEW_TEXT_BODY_OPACITY = 1.0; // float -//const float CARD_VIEW_TEXT_BODY_SIZE = 13.0; // points -//const int CARD_VIEW_TEXT_BODY_WEIGHT = "regular"; } namespace dash @@ -89,15 +69,11 @@ ResultRendererHorizontalTile::ResultRendererHorizontalTile(NUX_FILE_LINE_DECL) } -ResultRendererHorizontalTile::~ResultRendererHorizontalTile() -{ -} - void ResultRendererHorizontalTile::Render(nux::GraphicsEngine& GfxContext, - Result& row, - ResultRendererState state, - nux::Geometry& geometry, - int x_offset, int y_offset) + Result& row, + ResultRendererState state, + nux::Geometry const& geometry, + int x_offset, int y_offset) { TextureContainer* container = row.renderer<TextureContainer*>(); if (container == nullptr) diff --git a/dash/ResultRendererHorizontalTile.h b/dash/ResultRendererHorizontalTile.h index deda4bd71..678bf2f59 100644 --- a/dash/ResultRendererHorizontalTile.h +++ b/dash/ResultRendererHorizontalTile.h @@ -25,12 +25,6 @@ #ifndef RESULTRENDERERHORIZONTALTILE_H #define RESULTRENDERERHORIZONTALTILE_H -#include <Nux/Nux.h> -#include <NuxCore/Object.h> -#include <NuxCore/Property.h> -#include <Nux/TextureArea.h> -#include <NuxGraphics/CairoGraphics.h> - #include "ResultRendererTile.h" namespace unity @@ -45,12 +39,11 @@ public: NUX_DECLARE_OBJECT_TYPE(ResultRendererHorizontalTile, ResultRendererTile); ResultRendererHorizontalTile(NUX_FILE_LINE_PROTO); - ~ResultRendererHorizontalTile(); virtual void Render(nux::GraphicsEngine& GfxContext, Result& row, ResultRendererState state, - nux::Geometry& geometry, + nux::Geometry const& geometry, int x_offset, int y_offset); protected: diff --git a/dash/ResultRendererTile.cpp b/dash/ResultRendererTile.cpp index 0729c27c3..40dd675ee 100644 --- a/dash/ResultRendererTile.cpp +++ b/dash/ResultRendererTile.cpp @@ -20,15 +20,9 @@ * */ - -#include <sstream> // for ostringstream #include "ResultRendererTile.h" -#include <boost/algorithm/string.hpp> - -#include <pango/pango.h> #include <pango/pangocairo.h> -#include <gdk/gdk.h> #include <gtk/gtk.h> #include <NuxCore/Logger.h> @@ -36,11 +30,8 @@ #include "unity-shared/CairoTexture.h" #include "unity-shared/DashStyle.h" -#include "unity-shared/IconLoader.h" -#include "unity-shared/IconTexture.h" #include "unity-shared/TextureCache.h" - namespace { bool neko; @@ -48,10 +39,9 @@ namespace namespace unity { +DECLARE_LOGGER(logger, "unity.dash.results"); namespace { -nux::logging::Logger logger("unity.dash.results"); - const int FONT_SIZE = 10; const float CORNER_HIGHTLIGHT_RADIUS = 2.0f; @@ -75,23 +65,12 @@ ResultRendererTile::ResultRendererTile(NUX_FILE_LINE_DECL) gchar* tmp1 = (gchar*)g_base64_decode("VU5JVFlfTkVLTw==", &tmp); neko = (g_getenv(tmp1)); g_free (tmp1); - - // pre-load the highlight texture - // try and get a texture from the texture cache - TextureCache& cache = TextureCache::GetDefault(); - prelight_cache_ = cache.FindTexture("ResultRendererTile.PreLightTexture", - style.GetTileIconHightlightWidth(), style.GetTileIconHightlightHeight(), - sigc::mem_fun(this, &ResultRendererTile::DrawHighlight)); -} - -ResultRendererTile::~ResultRendererTile() -{ } void ResultRendererTile::Render(nux::GraphicsEngine& GfxContext, Result& row, ResultRendererState state, - nux::Geometry& geometry, + nux::Geometry const& geometry, int x_offset, int y_offset) { TextureContainer* container = row.renderer<TextureContainer*>(); diff --git a/dash/ResultRendererTile.h b/dash/ResultRendererTile.h index 5f10f5b94..be7e18aa2 100644 --- a/dash/ResultRendererTile.h +++ b/dash/ResultRendererTile.h @@ -25,15 +25,8 @@ #ifndef RESULTRENDERERTILE_H #define RESULTRENDERERTILE_H -#include <Nux/Nux.h> -#include <NuxCore/Object.h> -#include <NuxCore/ObjectPtr.h> -#include <NuxCore/Property.h> -#include <Nux/TextureArea.h> -#include <NuxGraphics/CairoGraphics.h> -#include "unity-shared/IconLoader.h" - #include "ResultRenderer.h" +#include "unity-shared/IconLoader.h" namespace unity { @@ -44,14 +37,12 @@ namespace dash typedef nux::ObjectPtr<nux::BaseTexture> BaseTexturePtr; BaseTexturePtr text; BaseTexturePtr icon; - BaseTexturePtr blurred_icon; BaseTexturePtr prelight; int slot_handle; TextureContainer() : slot_handle(0) - { - } + {} ~TextureContainer() { @@ -67,17 +58,14 @@ public: NUX_DECLARE_OBJECT_TYPE(ResultRendererTile, ResultRenderer); ResultRendererTile(NUX_FILE_LINE_PROTO); - ~ResultRendererTile(); virtual void Render(nux::GraphicsEngine& GfxContext, Result& row, ResultRendererState state, - nux::Geometry& geometry, + nux::Geometry const& geometry, int x_offset, int y_offset); - // this is just to start preloading images and text that the renderer might - // need - can be ignored + virtual void Preload(Result& row); - // unload any previous grabbed images virtual void Unload(Result& row); int spacing; @@ -102,4 +90,6 @@ private: } } + #endif // RESULTRENDERERTILE_H + diff --git a/dash/ResultView.cpp b/dash/ResultView.cpp index c14fe6dd7..5d4489462 100644 --- a/dash/ResultView.cpp +++ b/dash/ResultView.cpp @@ -22,22 +22,16 @@ #include "ResultView.h" -#include "unity-shared/IntrospectableWrappers.h" -#include <UnityCore/Variant.h> -#include <Nux/HLayout.h> -#include <Nux/VLayout.h> -#include <Nux/Button.h> -#include <NuxCore/Logger.h> + +#include <Nux/Layout.h> #include <UnityCore/Variant.h> +#include "unity-shared/IntrospectableWrappers.h" + namespace unity { namespace dash { -namespace -{ -nux::logging::Logger logger("unity.dash.results"); -} NUX_IMPLEMENT_OBJECT_TYPE(ResultView); diff --git a/dash/ResultViewGrid.cpp b/dash/ResultViewGrid.cpp index bf3ba604f..fe4d67699 100644 --- a/dash/ResultViewGrid.cpp +++ b/dash/ResultViewGrid.cpp @@ -36,10 +36,7 @@ #include "ResultViewGrid.h" #include "math.h" -namespace -{ -nux::logging::Logger logger("unity.dash.results"); -} +DECLARE_LOGGER(logger, "unity.dash.results"); namespace unity { @@ -778,9 +775,9 @@ std::tuple<int, int> ResultViewGrid::GetResultPosition(const unsigned int& index DND code -------- */ -bool -ResultViewGrid::DndSourceDragBegin() +bool ResultViewGrid::DndSourceDragBegin() { +#ifdef UNITY_HAS_X_ORG_SUPPORT unsigned num_results = GetNumResults(); unsigned drag_index = GetIndexAtPosition(last_mouse_down_x_, last_mouse_down_y_); @@ -804,10 +801,12 @@ ResultViewGrid::DndSourceDragBegin() << current_drag_icon_name_; return true; +#else + return false; +#endif } -GdkPixbuf * -_icon_hint_get_drag_pixbuf (std::string icon_hint) +GdkPixbuf* _icon_hint_get_drag_pixbuf(std::string icon_hint) { GdkPixbuf *pbuf; GtkIconTheme *theme; @@ -912,8 +911,7 @@ ResultViewGrid::DndSourceGetDragTypes() return result; } -const char* -ResultViewGrid::DndSourceGetDataForType(const char* type, int* size, int* format) +const char* ResultViewGrid::DndSourceGetDataForType(const char* type, int* size, int* format) { *format = 8; @@ -929,9 +927,9 @@ ResultViewGrid::DndSourceGetDataForType(const char* type, int* size, int* format } } -void -ResultViewGrid::DndSourceDragFinished(nux::DndAction result) +void ResultViewGrid::DndSourceDragFinished(nux::DndAction result) { +#ifdef UNITY_HAS_X_ORG_SUPPORT UnReference(); last_mouse_down_x_ = -1; last_mouse_down_y_ = -1; @@ -950,6 +948,7 @@ ResultViewGrid::DndSourceDragFinished(nux::DndAction result) XWarpPointer(display, None, None, 0, 0, 0, 0, 0, 0); XSync(display, 0); } +#endif } int diff --git a/dash/previews/ActionButton.cpp b/dash/previews/ActionButton.cpp index 76582f6a4..4035288e1 100644 --- a/dash/previews/ActionButton.cpp +++ b/dash/previews/ActionButton.cpp @@ -33,14 +33,13 @@ const int kMinButtonHeight = 34; const int kMinButtonWidth = 48; const int icon_size = 24; - -nux::logging::Logger logger("unity.dash.actionbutton"); } namespace unity { namespace dash { +DECLARE_LOGGER(logger, "unity.dash.preview.action"); ActionButton::ActionButton(std::string const& action_hint, std::string const& label, std::string const& icon_hint, NUX_FILE_LINE_DECL) : nux::AbstractButton(NUX_FILE_LINE_PARAM) diff --git a/dash/previews/ApplicationPreview.cpp b/dash/previews/ApplicationPreview.cpp index 111005d50..ebc994807 100644 --- a/dash/previews/ApplicationPreview.cpp +++ b/dash/previews/ApplicationPreview.cpp @@ -46,11 +46,7 @@ namespace dash { namespace previews { - -namespace -{ -nux::logging::Logger logger("unity.dash.previews.applicationpreview"); -} +DECLARE_LOGGER(logger, "unity.dash.preview.application"); class DetailsScrollView : public nux::ScrollView { diff --git a/dash/previews/CMakeLists.txt b/dash/previews/CMakeLists.txt index bfd27173c..0f5978421 100644 --- a/dash/previews/CMakeLists.txt +++ b/dash/previews/CMakeLists.txt @@ -5,7 +5,6 @@ find_package (PkgConfig) set (CFLAGS ${CACHED_UNITY_DEPS_CFLAGS} ${CACHED_UNITY_DEPS_CFLAGS_OTHER} - ${MAINTAINER_CFLAGS} "-DGETTEXT_PACKAGE=\"unity\"" "-I${CMAKE_CURRENT_BINARY_DIR}" ) diff --git a/dash/previews/DBusTestRunner.h b/dash/previews/DBusTestRunner.h index 24ffe3713..b271bea34 100644 --- a/dash/previews/DBusTestRunner.h +++ b/dash/previews/DBusTestRunner.h @@ -34,11 +34,7 @@ namespace dash { namespace previews { -namespace -{ -nux::logging::Logger logger("unity.dash.DBusTestRunner"); -} - +DECLARE_LOGGER(logger, "unity.dash.dbus.testrunner"); class DBusTestRunner { @@ -80,4 +76,4 @@ public: } // namespace dash } // namespace unity -#endif // DBUSTESTRUNNER_H \ No newline at end of file +#endif // DBUSTESTRUNNER_H diff --git a/dash/previews/GenericPreview.cpp b/dash/previews/GenericPreview.cpp index 6a0f1f6a8..3b396299c 100644 --- a/dash/previews/GenericPreview.cpp +++ b/dash/previews/GenericPreview.cpp @@ -31,7 +31,7 @@ #include <Nux/GridHLayout.h> #include <UnityCore/GenericPreview.h> #include <Nux/AbstractButton.h> - + #include "GenericPreview.h" #include "PreviewInfoHintWidget.h" @@ -41,12 +41,7 @@ namespace dash { namespace previews { - -namespace -{ -nux::logging::Logger logger("unity.dash.previews.genericpreview"); - -} +DECLARE_LOGGER(logger, "unity.dash.preview.generic"); class DetailsScrollView : public nux::ScrollView { diff --git a/dash/previews/MoviePreview.cpp b/dash/previews/MoviePreview.cpp index 3ec06b036..653bd7a8d 100644 --- a/dash/previews/MoviePreview.cpp +++ b/dash/previews/MoviePreview.cpp @@ -42,12 +42,7 @@ namespace dash { namespace previews { - -namespace -{ -nux::logging::Logger logger("unity.dash.previews.moviepreview"); - -} +DECLARE_LOGGER(logger, "unity.dash.preview.movie"); class DetailsScrollView : public nux::ScrollView { diff --git a/dash/previews/MusicPreview.cpp b/dash/previews/MusicPreview.cpp index 01825d1df..c67781341 100644 --- a/dash/previews/MusicPreview.cpp +++ b/dash/previews/MusicPreview.cpp @@ -42,12 +42,7 @@ namespace dash { namespace previews { - -namespace -{ -nux::logging::Logger logger("unity.dash.previews.moviepreview"); - -} +DECLARE_LOGGER(logger, "unity.dash.preview.music"); NUX_IMPLEMENT_OBJECT_TYPE(MusicPreview); diff --git a/dash/previews/Preview.cpp b/dash/previews/Preview.cpp index e88b68365..5e8e8134c 100644 --- a/dash/previews/Preview.cpp +++ b/dash/previews/Preview.cpp @@ -40,11 +40,7 @@ namespace dash { namespace previews { - -namespace -{ -nux::logging::Logger logger("unity.dash.previews.preview"); -} +DECLARE_LOGGER(logger, "unity.dash.preview.view"); previews::Preview::Ptr Preview::PreviewForModel(dash::Preview::Ptr model) { @@ -53,7 +49,7 @@ previews::Preview::Ptr Preview::PreviewForModel(dash::Preview::Ptr model) LOG_WARN(logger) << "Unable to create Preview object"; return previews::Preview::Ptr(); } - + if (model->renderer_name == "preview-generic") { return Preview::Ptr(new GenericPreview(model)); diff --git a/dash/previews/PreviewContainer.cpp b/dash/previews/PreviewContainer.cpp index e6d78b426..fa6dc7497 100644 --- a/dash/previews/PreviewContainer.cpp +++ b/dash/previews/PreviewContainer.cpp @@ -37,6 +37,7 @@ namespace dash { namespace previews { +DECLARE_LOGGER(logger, "unity.dash.preview.container"); Navigation operator&(const Navigation lhs, const Navigation rhs) { @@ -45,8 +46,6 @@ Navigation operator&(const Navigation lhs, const Navigation rhs) namespace { -nux::logging::Logger logger("unity.dash.previews.previewcontainer"); - const int ANIM_DURATION_LONG = 500; const int PREVIEW_SPINNER_WAIT = 300; diff --git a/dash/previews/PreviewInfoHintWidget.cpp b/dash/previews/PreviewInfoHintWidget.cpp index e7be5e18a..2ae0c02b5 100644 --- a/dash/previews/PreviewInfoHintWidget.cpp +++ b/dash/previews/PreviewInfoHintWidget.cpp @@ -35,10 +35,9 @@ namespace dash { namespace previews { +DECLARE_LOGGER(logger, "unity.dash.preview.infohintwidget"); namespace { -nux::logging::Logger logger("unity.dash.previews.previewinfohintwidget"); - const int layout_spacing = 12; } diff --git a/dash/previews/PreviewNavigator.cpp b/dash/previews/PreviewNavigator.cpp index 445352aa9..2181c8496 100644 --- a/dash/previews/PreviewNavigator.cpp +++ b/dash/previews/PreviewNavigator.cpp @@ -35,12 +35,7 @@ namespace dash { namespace previews { - -namespace -{ -nux::logging::Logger logger("unity.dash.previews.previewnavigator"); - -} +DECLARE_LOGGER(logger, "unity.dash.preview.navigator"); NUX_IMPLEMENT_OBJECT_TYPE(PreviewNavigator); @@ -184,4 +179,4 @@ void PreviewNavigator::UpdateTexture() } // namespace previews } // namespace dash -} // namespace unity \ No newline at end of file +} // namespace unity diff --git a/dash/previews/SocialPreview.cpp b/dash/previews/SocialPreview.cpp index 4fa6e349f..b9ac044bc 100644 --- a/dash/previews/SocialPreview.cpp +++ b/dash/previews/SocialPreview.cpp @@ -46,12 +46,7 @@ namespace dash { namespace previews { - -namespace -{ -nux::logging::Logger logger("unity.dash.previews.socialpreview"); - -} +DECLARE_LOGGER(logger, "unity.dash.preview.social"); class DetailsScrollView : public nux::ScrollView { diff --git a/dash/previews/SocialPreviewComments.cpp b/dash/previews/SocialPreviewComments.cpp index 476249abb..4dc9d1603 100644 --- a/dash/previews/SocialPreviewComments.cpp +++ b/dash/previews/SocialPreviewComments.cpp @@ -36,11 +36,10 @@ namespace dash { namespace previews { +DECLARE_LOGGER(logger, "unity.dash.preview.social.comments"); namespace { -nux::logging::Logger logger("unity.dash.previews.socialpreviewcomments"); - const int layout_spacing = 12; } diff --git a/dash/previews/SocialPreviewContent.cpp b/dash/previews/SocialPreviewContent.cpp index 7b224e686..065fae29a 100644 --- a/dash/previews/SocialPreviewContent.cpp +++ b/dash/previews/SocialPreviewContent.cpp @@ -34,11 +34,10 @@ namespace dash { namespace previews { +DECLARE_LOGGER(logger, "unity.dash.previews.social.content"); namespace { -nux::logging::Logger logger("unity.dash.previews.socialpreviewcontent"); - const int BUBBLE_WIDTH = 300; const int BUBBLE_HEIGHT = 250; const int TAIL_HEIGHT = 50; diff --git a/dash/previews/StandaloneMusicPreview.cpp b/dash/previews/StandaloneMusicPreview.cpp index c672e28fd..830fdd330 100644 --- a/dash/previews/StandaloneMusicPreview.cpp +++ b/dash/previews/StandaloneMusicPreview.cpp @@ -46,10 +46,7 @@ using namespace unity; using namespace unity::dash; -namespace -{ -nux::logging::Logger logger("unity.dash.StandaloneMusicPreview"); -} +DECLARE_LOGGER(logger, "unity.dash.preview.standalone"); class DummyView : public nux::View { diff --git a/dash/previews/Track.cpp b/dash/previews/Track.cpp index a7f281a85..296f5353d 100644 --- a/dash/previews/Track.cpp +++ b/dash/previews/Track.cpp @@ -54,10 +54,9 @@ public: }; +DECLARE_LOGGER(logger, "unity.dash.preview.music.track"); namespace { -nux::logging::Logger logger("unity.dash.previews.track"); - const int layout_spacing = 6; } diff --git a/dash/previews/Tracks.cpp b/dash/previews/Tracks.cpp index 2b734d090..523270ac7 100644 --- a/dash/previews/Tracks.cpp +++ b/dash/previews/Tracks.cpp @@ -35,11 +35,7 @@ namespace dash { namespace previews { - -namespace -{ -nux::logging::Logger logger("unity.dash.previews.tracks"); -} +DECLARE_LOGGER(logger, "unity.dash.preview.music.tracks"); NUX_IMPLEMENT_OBJECT_TYPE(Tracks); @@ -118,6 +114,7 @@ void Tracks::OnTrackAdded(dash::Track const& track_row) layout_->AddView(track_view.GetPointer(), 0); m_tracks[track_uri] = track_view; + ComputeContentSize(); } void Tracks::OnTrackRemoved(dash::Track const& track_row) @@ -130,6 +127,7 @@ void Tracks::OnTrackRemoved(dash::Track const& track_row) RemoveChild(pos->second.GetPointer()); layout_->RemoveChildObject(pos->second.GetPointer()); + ComputeContentSize(); } } // namespace previews diff --git a/hud/CMakeLists.txt b/hud/CMakeLists.txt index 4da89417c..9ad2f34b3 100644 --- a/hud/CMakeLists.txt +++ b/hud/CMakeLists.txt @@ -5,7 +5,6 @@ find_package (PkgConfig) set (CFLAGS ${CACHED_UNITY_DEPS_CFLAGS} ${CACHED_UNITY_DEPS_CFLAGS_OTHER} - ${MAINTAINER_CFLAGS} "-DGETTEXT_PACKAGE=\"unity\"" "-I${CMAKE_CURRENT_BINARY_DIR}" ) diff --git a/hud/HudButton.cpp b/hud/HudButton.cpp index 3ab6ff043..aecf89ab8 100644 --- a/hud/HudButton.cpp +++ b/hud/HudButton.cpp @@ -39,10 +39,9 @@ #include "HudButton.h" #include "HudPrivate.h" +DECLARE_LOGGER(logger, "unity.hud.button"); namespace { -nux::logging::Logger logger("unity.hud.HudButton"); - const int hlayout_left_padding = 46; const char* const button_font = "Ubuntu 13"; // 17px = 13 } diff --git a/hud/HudController.cpp b/hud/HudController.cpp index 6f68f9dc5..61cfbc869 100644 --- a/hud/HudController.cpp +++ b/hud/HudController.cpp @@ -34,11 +34,7 @@ namespace unity { namespace hud { - -namespace -{ -nux::logging::Logger logger("unity.hud.controller"); -} +DECLARE_LOGGER(logger, "unity.hud.controller"); Controller::Controller(std::function<AbstractView*(void)> const& function) : launcher_width(64) diff --git a/hud/HudIcon.cpp b/hud/HudIcon.cpp index a2e1bfdc0..c2abda2f9 100644 --- a/hud/HudIcon.cpp +++ b/hud/HudIcon.cpp @@ -22,15 +22,11 @@ #include "NuxCore/Logger.h" #include "config.h" -namespace -{ -nux::logging::Logger logger("unity.hud.icon"); -} - namespace unity { namespace hud { +DECLARE_LOGGER(logger, "unity.hud.icon"); Icon::Icon() : IconTexture("", 0, true) diff --git a/hud/HudIconTextureSource.cpp b/hud/HudIconTextureSource.cpp index 300c80632..2d934fba1 100644 --- a/hud/HudIconTextureSource.cpp +++ b/hud/HudIconTextureSource.cpp @@ -26,15 +26,11 @@ #include <Nux/Nux.h> #include <NuxCore/Logger.h> -namespace -{ - nux::logging::Logger logger("unity.hud.HudIconTextureSource"); -} - namespace unity { namespace hud { +DECLARE_LOGGER(logger, "unity.hud.icon.texturesource"); HudIconTextureSource::HudIconTextureSource(nux::ObjectPtr<nux::BaseTexture> texture) : unity::ui::IconTextureSource() diff --git a/hud/HudView.cpp b/hud/HudView.cpp index aabee909c..7cabd822e 100644 --- a/hud/HudView.cpp +++ b/hud/HudView.cpp @@ -36,11 +36,9 @@ namespace unity { namespace hud { +DECLARE_LOGGER(logger, "unity.hud.view"); namespace { - -nux::logging::Logger logger("unity.hud.view"); - const int grow_anim_length = 90 * 1000; const int pause_before_grow_length = 32 * 1000; diff --git a/hud/StandaloneHud.cpp b/hud/StandaloneHud.cpp index 72e9fefbe..45625ec9b 100644 --- a/hud/StandaloneHud.cpp +++ b/hud/StandaloneHud.cpp @@ -32,10 +32,7 @@ #include "unity-shared/UnitySettings.h" #include <NuxCore/Logger.h> -namespace -{ - nux::logging::Logger logger("unity.tests.Hud"); -} +DECLARE_LOGGER(logger, "unity.tests.hud"); class TestRunner { diff --git a/launcher/AbstractLauncherIcon.h b/launcher/AbstractLauncherIcon.h index 30766a8cb..bb58b7191 100644 --- a/launcher/AbstractLauncherIcon.h +++ b/launcher/AbstractLauncherIcon.h @@ -138,6 +138,7 @@ public: virtual void SetSortPriority(int priority) = 0; virtual bool OpenQuicklist(bool select_first_item = false, int monitor = -1) = 0; + virtual void CloseQuicklist() = 0; virtual void SetCenter(nux::Point3 const& center, int monitor, nux::Geometry const& parent_geo) = 0; diff --git a/launcher/ApplicationLauncherIcon.cpp b/launcher/ApplicationLauncherIcon.cpp index 223d554a9..bb60f8296 100644 --- a/launcher/ApplicationLauncherIcon.cpp +++ b/launcher/ApplicationLauncherIcon.cpp @@ -43,15 +43,14 @@ namespace unity { namespace launcher { +DECLARE_LOGGER(logger, "unity.launcher.icon.application"); namespace { -nux::logging::Logger logger("unity.launcher"); - - // We use the "bamf-" prefix since the manager is protected, to avoid name clash - const std::string WINDOW_MOVE_TIMEOUT = "bamf-window-move"; - const std::string ICON_REMOVE_TIMEOUT = "bamf-icon-remove"; - //const std::string ICON_DND_OVER_TIMEOUT = "bamf-icon-dnd-over"; - const std::string DEFAULT_ICON = "application-default-icon"; +// We use the "bamf-" prefix since the manager is protected, to avoid name clash +const std::string WINDOW_MOVE_TIMEOUT = "bamf-window-move"; +const std::string ICON_REMOVE_TIMEOUT = "bamf-icon-remove"; +//const std::string ICON_DND_OVER_TIMEOUT = "bamf-icon-dnd-over"; +const std::string DEFAULT_ICON = "application-default-icon"; } NUX_IMPLEMENT_OBJECT_TYPE(ApplicationLauncherIcon); @@ -1301,7 +1300,11 @@ bool ApplicationLauncherIcon::OnShouldHighlightOnDrag(DndData const& dnd_data) nux::DndAction ApplicationLauncherIcon::OnQueryAcceptDrop(DndData const& dnd_data) { +#ifdef UNITY_HAS_X_ORG_SUPPORT return ValidateUrisForLaunch(dnd_data).empty() ? nux::DNDACTION_NONE : nux::DNDACTION_COPY; +#else + return nux::DNDACTION_NONE; +#endif } void ApplicationLauncherIcon::OnAcceptDrop(DndData const& dnd_data) diff --git a/launcher/CMakeLists.txt b/launcher/CMakeLists.txt index 41e09e6f5..a4518bf7f 100644 --- a/launcher/CMakeLists.txt +++ b/launcher/CMakeLists.txt @@ -5,7 +5,6 @@ find_package (PkgConfig) set (CFLAGS ${CACHED_UNITY_DEPS_CFLAGS} ${CACHED_UNITY_DEPS_CFLAGS_OTHER} - ${MAINTAINER_CFLAGS} "-fPIC" "-DGETTEXT_PACKAGE=\"unity\"" "-I${CMAKE_CURRENT_BINARY_DIR}" @@ -41,7 +40,6 @@ set (LAUNCHER_SOURCES DeviceNotificationDisplayImp.cpp DevicesSettingsImp.cpp DndData.cpp - EdgeBarrierController.cpp ExpoLauncherIcon.cpp FavoriteStore.cpp FavoriteStoreGSettings.cpp @@ -59,7 +57,6 @@ set (LAUNCHER_SOURCES LauncherModel.cpp LauncherOptions.cpp MockLauncherIcon.cpp - PointerBarrier.cpp QuicklistManager.cpp QuicklistMenuItem.cpp QuicklistMenuItemCheckmark.cpp @@ -78,6 +75,14 @@ set (LAUNCHER_SOURCES VolumeMonitorWrapper.cpp ) +if(UNITY_ENABLE_X_ORG_SUPPORT) + set (LAUNCHER_SOURCES + EdgeBarrierController.cpp + PointerBarrier.cpp + ${LAUNCHER_SOURCES} + ) +endif() + add_library (launcher-lib STATIC ${LAUNCHER_SOURCES}) add_dependencies (launcher-lib unity-core-${UNITY_API_VERSION} unity-shared) target_link_libraries (launcher-lib unity-shared) @@ -99,6 +104,8 @@ add_executable (launcher StandaloneLauncher.cpp) add_dependencies (launcher launcher-lib) target_link_libraries (launcher launcher-lib unity-shared unity-shared-standalone) -add_executable (switcher StandaloneSwitcher.cpp) -add_dependencies (switcher switcher-lib launcher-lib) -target_link_libraries (switcher switcher-lib launcher-lib unity-shared unity-shared-standalone) +if(UNITY_ENABLE_X_ORG_SUPPORT) + add_executable (switcher StandaloneSwitcher.cpp) + add_dependencies (switcher switcher-lib launcher-lib) + target_link_libraries (switcher switcher-lib launcher-lib unity-shared unity-shared-standalone) +endif() diff --git a/launcher/DevicesSettingsImp.cpp b/launcher/DevicesSettingsImp.cpp index 7933cd524..8ee529907 100644 --- a/launcher/DevicesSettingsImp.cpp +++ b/launcher/DevicesSettingsImp.cpp @@ -30,11 +30,9 @@ namespace unity { namespace launcher { +DECLARE_LOGGER(logger, "unity.device.settings"); namespace { - -nux::logging::Logger logger("unity.device.settings"); - const std::string SETTINGS_NAME = "com.canonical.Unity.Devices"; const std::string KEY_NAME = "blacklist"; diff --git a/launcher/FavoriteStore.cpp b/launcher/FavoriteStore.cpp index 8977da5ac..d7acdc84b 100644 --- a/launcher/FavoriteStore.cpp +++ b/launcher/FavoriteStore.cpp @@ -26,9 +26,9 @@ namespace unity { +DECLARE_LOGGER(logger, "unity.favorite.store"); namespace { -nux::logging::Logger logger("unity.favorite.store"); FavoriteStore* favoritestore_instance = nullptr; const std::string PREFIX_SEPARATOR = "://"; } diff --git a/launcher/FavoriteStoreGSettings.cpp b/launcher/FavoriteStoreGSettings.cpp index b889bc0c8..a9759917e 100644 --- a/launcher/FavoriteStoreGSettings.cpp +++ b/launcher/FavoriteStoreGSettings.cpp @@ -37,10 +37,10 @@ namespace unity { namespace internal { +DECLARE_LOGGER(logger, "unity.favorite.store.gsettings"); namespace { -nux::logging::Logger logger("unity.favorite.store.gsettings"); const std::string SETTINGS_NAME = "com.canonical.Unity.Launcher"; const std::string SETTINGS_KEY = "favorites"; } diff --git a/launcher/HudLauncherIcon.cpp b/launcher/HudLauncherIcon.cpp index bf09d41f6..7fea6c4f7 100644 --- a/launcher/HudLauncherIcon.cpp +++ b/launcher/HudLauncherIcon.cpp @@ -31,11 +31,7 @@ namespace unity { namespace launcher { - -namespace -{ -nux::logging::Logger logger("unity.launcher.hudlaunchericon"); -} +DECLARE_LOGGER(logger, "unity.launcher.icon.hud"); HudLauncherIcon::HudLauncherIcon(LauncherHideMode hide_mode) : SingleMonitorLauncherIcon(IconType::HUD, 0) diff --git a/launcher/Launcher.cpp b/launcher/Launcher.cpp index 2914f9afa..37f95ae86 100644 --- a/launcher/Launcher.cpp +++ b/launcher/Launcher.cpp @@ -25,7 +25,6 @@ #include <Nux/VScrollBar.h> #include <Nux/HLayout.h> #include <Nux/VLayout.h> -#include <Nux/MenuPage.h> #include <NuxCore/Logger.h> #include <NuxGraphics/NuxGraphics.h> @@ -64,14 +63,12 @@ using ui::Decaymulator; namespace launcher { +DECLARE_LOGGER(logger, "unity.launcher"); -const char window_title[] = "unity-launcher"; +const char* window_title = "unity-launcher"; namespace { - -nux::logging::Logger logger("unity.launcher"); - const int URGENT_BLINKS = 3; const int WIGGLE_CYCLES = 6; @@ -107,7 +104,11 @@ Launcher::Launcher(nux::BaseWindow* parent, nux::ObjectPtr<DNDCollectionWindow> const& collection_window, NUX_FILE_LINE_DECL) : View(NUX_FILE_LINE_PARAM) +#ifdef UNITY_HAS_X_ORG_SUPPORT , display(nux::GetGraphicsDisplay()->GetX11Display()) +#else + , display(0) +#endif , monitor(0) , _parent(parent) , _active_quicklist(nullptr) @@ -188,7 +189,9 @@ Launcher::Launcher(nux::BaseWindow* parent, wm.terminate_expo.connect(sigc::mem_fun(this, &Launcher::OnPluginStateChanged)); wm.screen_viewport_switch_ended.connect(sigc::mem_fun(this, &Launcher::EnsureAnimation)); +#ifdef UNITY_HAS_X_ORG_SUPPORT display.changed.connect(sigc::mem_fun(this, &Launcher::OnDisplayChanged)); +#endif // 0 out timers to avoid wonky startups for (int i = 0; i < TIME_LAST; ++i) @@ -1352,6 +1355,7 @@ int Launcher::GetMouseY() const bool Launcher::OnUpdateDragManagerTimeout() { +#ifdef UNITY_HAS_X_ORG_SUPPORT if (!display()) return false; @@ -1387,17 +1391,19 @@ bool Launcher::OnUpdateDragManagerTimeout() DndReset(); _hide_machine.SetQuirk(LauncherHideMachine::EXTERNAL_DND_ACTIVE, false); _hide_machine.SetQuirk(LauncherHideMachine::DND_PUSHED_OFF, false); - +#endif return false; } void Launcher::DndTimeoutSetup() { +#ifdef UNITY_HAS_X_ORG_SUPPORT if (sources_.GetSource(DND_CHECK_TIMEOUT)) return; auto cb_func = sigc::mem_fun(this, &Launcher::OnUpdateDragManagerTimeout); sources_.AddTimeout(200, cb_func, DND_CHECK_TIMEOUT); +#endif } void Launcher::OnPluginStateChanged() @@ -2223,6 +2229,7 @@ void Launcher::RecvMouseDrag(int x, int y, int dx, int dy, unsigned long button_ if (GetActionState() == ACTION_NONE) { +#ifdef UNITY_HAS_X_ORG_SUPPORT if (nux::Abs(_dnd_delta_y) >= nux::Abs(_dnd_delta_x)) { _launcher_drag_delta += _dnd_delta_y; @@ -2235,6 +2242,7 @@ void Launcher::RecvMouseDrag(int x, int y, int dx, int dy, unsigned long button_ sources_.Remove(START_DRAGICON_DURATION); StartIconDragRequest(x - _dnd_delta_x, y - _dnd_delta_y); } +#endif } else if (GetActionState() == ACTION_DRAG_LAUNCHER) { @@ -2296,6 +2304,8 @@ void Launcher::RecvMouseWheel(int x, int y, int wheel_delta, unsigned long butto EnsureAnimation(); } +#ifdef UNITY_HAS_X_ORG_SUPPORT + bool Launcher::HandleBarrierEvent(ui::PointerBarrierWrapper* owner, ui::BarrierEvent::Ptr event) { nux::Geometry abs_geo = GetAbsoluteGeometry(); @@ -2337,6 +2347,8 @@ bool Launcher::HandleBarrierEvent(ui::PointerBarrierWrapper* owner, ui::BarrierE return true; } +#endif + bool Launcher::IsInKeyNavMode() const { return _hide_machine.GetQuirk(LauncherHideMachine::KEY_NAV_ACTIVE); @@ -2504,6 +2516,19 @@ void Launcher::RenderIconToTexture(nux::GraphicsEngine& GfxContext, AbstractLaun drag_args.push_front(arg); SetOffscreenRenderTarget(texture); + + unsigned int alpha = 0, src = 0, dest = 0; + GfxContext.GetRenderStates().GetBlend(alpha, src, dest); + GfxContext.GetRenderStates().SetBlend(false); + + GfxContext.QRP_Color(0, + 0, + texture->GetWidth(), + texture->GetHeight(), + nux::Color(0.0f, 0.0f, 0.0f, 0.0f)); + + GfxContext.GetRenderStates().SetBlend(alpha, src, dest); + icon_renderer->PreprocessIcons(drag_args, nux::Geometry(0, 0, _icon_size, _icon_size)); icon_renderer->RenderIcon(nux::GetWindowThread()->GetGraphicsEngine(), arg, nux::Geometry(0, 0, _icon_size, _icon_size), nux::Geometry(0, 0, _icon_size, _icon_size)); RestoreSystemRenderTarget(); @@ -2558,6 +2583,7 @@ bool Launcher::DndIsSpecialRequest(std::string const& uri) const void Launcher::OnDNDDataCollected(const std::list<char*>& mimes) { +#ifdef UNITY_HAS_X_ORG_SUPPORT _dnd_data.Reset(); const std::string uri_list = "text/uri-list"; @@ -2599,10 +2625,12 @@ void Launcher::OnDNDDataCollected(const std::list<char*>& mimes) } } } +#endif } void Launcher::ProcessDndEnter() { +#ifdef UNITY_HAS_X_ORG_SUPPORT SetStateMouseOverLauncher(true); _dnd_data.Reset(); @@ -2611,10 +2639,12 @@ void Launcher::ProcessDndEnter() _data_checked = false; _drag_edge_touching = false; _dnd_hovered_icon = nullptr; +#endif } void Launcher::DndReset() { +#ifdef UNITY_HAS_X_ORG_SUPPORT _dnd_data.Reset(); bool is_overlay_open = IsOverlayOpen(); @@ -2637,10 +2667,12 @@ void Launcher::DndReset() } DndHoveredIconReset(); +#endif } void Launcher::DndHoveredIconReset() { +#ifdef UNITY_HAS_X_ORG_SUPPORT _drag_edge_touching = false; SetActionState(ACTION_NONE); @@ -2655,17 +2687,21 @@ void Launcher::DndHoveredIconReset() _steal_drag = false; _dnd_hovered_icon = nullptr; +#endif } void Launcher::ProcessDndLeave() { +#ifdef UNITY_HAS_X_ORG_SUPPORT SetStateMouseOverLauncher(false); DndHoveredIconReset(); +#endif } void Launcher::ProcessDndMove(int x, int y, std::list<char*> mimes) { +#ifdef UNITY_HAS_X_ORG_SUPPORT if (!_data_checked) { const std::string uri_list = "text/uri-list"; @@ -2792,10 +2828,12 @@ void Launcher::ProcessDndMove(int x, int y, std::list<char*> mimes) accept = false; SendDndStatus(accept, _drag_action, nux::Geometry(x, y, 1, 1)); +#endif } void Launcher::ProcessDndDrop(int x, int y) { +#ifdef UNITY_HAS_X_ORG_SUPPORT if (_steal_drag) { for (auto const& uri : _dnd_data.Uris()) @@ -2819,6 +2857,7 @@ void Launcher::ProcessDndDrop(int x, int y) // reset our shiz DndReset(); +#endif } /* diff --git a/launcher/Launcher.h b/launcher/Launcher.h index 05de21234..726f8170a 100644 --- a/launcher/Launcher.h +++ b/launcher/Launcher.h @@ -25,15 +25,15 @@ #include <Nux/BaseWindow.h> #include <Nux/TimerProc.h> #include <NuxGraphics/GestureEvent.h> -#include <NuxGraphics/IOpenGLAsmShader.h> +#ifndef USE_GLES +# include <NuxGraphics/IOpenGLAsmShader.h> +#endif -#include "PointerBarrier.h" #include "unity-shared/AbstractIconRenderer.h" #include "unity-shared/BackgroundEffectHelper.h" #include "DevicesSettings.h" #include "DNDCollectionWindow.h" #include "DndData.h" -#include "EdgeBarrierController.h" #include "unity-shared/Introspectable.h" #include "LauncherModel.h" #include "LauncherOptions.h" @@ -43,15 +43,25 @@ #include "unity-shared/UBusWrapper.h" #include "SoftwareCenterLauncherIcon.h" +#ifdef UNITY_HAS_X_ORG_SUPPORT +# include "PointerBarrier.h" +# include "EdgeBarrierController.h" +#endif + namespace unity { namespace launcher { -extern const char window_title[]; +extern const char* window_title; class AbstractLauncherIcon; -class Launcher : public unity::debug::Introspectable, public nux::View, public ui::EdgeBarrierSubscriber +class Launcher : public unity::debug::Introspectable, +#ifdef UNITY_HAS_X_ORG_SUPPORT + // TODO: abstract this into a more generic class. + public ui::EdgeBarrierSubscriber, +#endif + public nux::View { NUX_DECLARE_OBJECT_TYPE(Launcher, nux::View); public: @@ -187,7 +197,9 @@ private: void OnDragUpdate(const nux::GestureEvent &event); void OnDragFinish(const nux::GestureEvent &event); +#ifdef UNITY_HAS_X_ORG_SUPPORT bool HandleBarrierEvent(ui::PointerBarrierWrapper* owner, ui::BarrierEvent::Ptr event); +#endif void OnPluginStateChanged(); diff --git a/launcher/LauncherController.cpp b/launcher/LauncherController.cpp index 5d2fe3bc5..d7b955774 100644 --- a/launcher/LauncherController.cpp +++ b/launcher/LauncherController.cpp @@ -48,10 +48,9 @@ namespace unity { namespace launcher { +DECLARE_LOGGER(logger, "unity.launcher.controller"); namespace { -nux::logging::Logger logger("unity.launcher"); - const std::string DBUS_NAME = "com.canonical.Unity.Launcher"; const std::string DBUS_PATH = "/com/canonical/Unity/Launcher"; const std::string DBUS_INTROSPECTION = @@ -115,7 +114,9 @@ Controller::Impl::Impl(Controller* parent) , gdbus_connection_(nullptr) , reg_id_(0) { +#ifdef UNITY_HAS_X_ORG_SUPPORT edge_barriers_.options = parent_->options(); +#endif UScreen* uscreen = UScreen::GetDefault(); EnsureLaunchers(uscreen->GetPrimaryMonitor(), uscreen->GetMonitors()); @@ -150,6 +151,13 @@ Controller::Impl::Impl(Controller* parent) parent_->KeyNavGrab(); model_->SetSelection(reactivate_index); + AbstractLauncherIcon::Ptr const& selected = model_->Selection(); + + if (selected) + { + ubus.SendMessage(UBUS_LAUNCHER_SELECTION_CHANGED, + g_variant_new_string(selected->tooltip_text().c_str())); + } }); parent_->AddChild(model_.get()); @@ -192,14 +200,18 @@ void Controller::Impl::EnsureLaunchers(int primary, std::vector<nux::Geometry> c int monitor = (num_launchers == 1) ? primary : i; +#ifdef UNITY_HAS_X_ORG_SUPPORT if (launchers[i]->monitor() != monitor) { edge_barriers_.Unsubscribe(launchers[i].GetPointer(), launchers[i]->monitor); } +#endif launchers[i]->monitor(monitor); launchers[i]->Resize(); +#ifdef UNITY_HAS_X_ORG_SUPPORT edge_barriers_.Subscribe(launchers[i].GetPointer(), launchers[i]->monitor); +#endif } for (unsigned int i = last_launcher; i < launchers_size; ++i) @@ -209,7 +221,9 @@ void Controller::Impl::EnsureLaunchers(int primary, std::vector<nux::Geometry> c { parent_->RemoveChild(launcher.GetPointer()); launcher->GetParent()->UnReference(); +#ifdef UNITY_HAS_X_ORG_SUPPORT edge_barriers_.Unsubscribe(launcher.GetPointer(), launcher->monitor); +#endif } } @@ -1381,12 +1395,7 @@ void Controller::Impl::ReceiveLauncherKeyPress(unsigned long eventType, case NUX_VK_RIGHT: case NUX_KP_RIGHT: case XK_Menu: - if (model_->Selection()->OpenQuicklist(true, keyboard_launcher_->monitor())) - { - reactivate_keynav = true; - reactivate_index = model_->SelectionIndex(); - parent_->KeyNavTerminate(false); - } + OpenQuicklist(); break; // <SPACE> (open a new instance) @@ -1411,6 +1420,16 @@ void Controller::Impl::ReceiveLauncherKeyPress(unsigned long eventType, } } +void Controller::Impl::OpenQuicklist() +{ + if (model_->Selection()->OpenQuicklist(true, keyboard_launcher_->monitor())) + { + reactivate_keynav = true; + reactivate_index = model_->SelectionIndex(); + parent_->KeyNavTerminate(false); + } +} + void Controller::Impl::OnBusAcquired(GDBusConnection* connection, const gchar* name, gpointer user_data) { GDBusNodeInfo* introspection_data = g_dbus_node_info_new_for_xml(DBUS_INTROSPECTION.c_str(), nullptr); diff --git a/launcher/LauncherControllerPrivate.h b/launcher/LauncherControllerPrivate.h index 181d7a2f0..253bfbb16 100644 --- a/launcher/LauncherControllerPrivate.h +++ b/launcher/LauncherControllerPrivate.h @@ -28,7 +28,9 @@ #include "AbstractLauncherIcon.h" #include "DeviceLauncherSection.h" #include "DevicesSettingsImp.h" +#ifdef UNITY_HAS_X_ORG_SUPPORT #include "EdgeBarrierController.h" +#endif #include "LauncherController.h" #include "Launcher.h" #include "LauncherEntryRemote.h" @@ -107,6 +109,8 @@ public: const char* character, unsigned short keyCount); + void OpenQuicklist(); + static void OnBusAcquired(GDBusConnection* connection, const gchar* name, gpointer user_data); static void OnDBusMethodCall(GDBusConnection* connection, const gchar* sender, const gchar* object_path, const gchar* interface_name, const gchar* method_name, @@ -124,7 +128,11 @@ public: LauncherEntryRemoteModel remote_model_; AbstractLauncherIcon::Ptr expo_icon_; AbstractLauncherIcon::Ptr desktop_icon_; + +#ifdef UNITY_HAS_X_ORG_SUPPORT ui::EdgeBarrierController edge_barriers_; +#endif + LauncherList launchers; unsigned sort_priority_; diff --git a/launcher/LauncherEntryRemote.cpp b/launcher/LauncherEntryRemote.cpp index 333fa6109..8068c0445 100644 --- a/launcher/LauncherEntryRemote.cpp +++ b/launcher/LauncherEntryRemote.cpp @@ -24,11 +24,7 @@ namespace unity { - -namespace -{ -nux::logging::Logger logger("launcher.entry.remote"); -} +DECLARE_LOGGER(logger, "unity.launcher.entry.remote"); /** * Create a new LauncherEntryRemote parsed from the raw DBus wire format diff --git a/launcher/LauncherEntryRemoteModel.cpp b/launcher/LauncherEntryRemoteModel.cpp index ec1dc8c1d..4df29b3b9 100644 --- a/launcher/LauncherEntryRemoteModel.cpp +++ b/launcher/LauncherEntryRemoteModel.cpp @@ -25,11 +25,7 @@ namespace unity { - -namespace -{ -nux::logging::Logger logger("launcher.entry.remote.model"); -} +DECLARE_LOGGER(logger, "unity.launcher.entry.remote.model"); /** * Helper class implementing the remote API to control the icons in the diff --git a/launcher/LauncherHideMachine.cpp b/launcher/LauncherHideMachine.cpp index 06b699d16..517cabebe 100644 --- a/launcher/LauncherHideMachine.cpp +++ b/launcher/LauncherHideMachine.cpp @@ -25,10 +25,10 @@ namespace unity { namespace launcher { +DECLARE_LOGGER(logger, "unity.launcher.hide"); namespace { -nux::logging::Logger logger("unity.launcher"); const unsigned int HIDE_DELAY_TIMEOUT_LENGTH = 400; } diff --git a/launcher/LauncherIcon.cpp b/launcher/LauncherIcon.cpp index 763002420..9f6bb8b55 100644 --- a/launcher/LauncherIcon.cpp +++ b/launcher/LauncherIcon.cpp @@ -23,10 +23,8 @@ #include <Nux/VScrollBar.h> #include <Nux/HLayout.h> #include <Nux/VLayout.h> -#include <Nux/MenuPage.h> #include <Nux/WindowCompositor.h> #include <Nux/BaseWindow.h> -#include <Nux/MenuPage.h> #include <NuxCore/Color.h> #include <NuxCore/Logger.h> @@ -53,10 +51,10 @@ namespace unity { namespace launcher { +DECLARE_LOGGER(logger, "unity.launcher.icon"); namespace { -nux::logging::Logger logger("unity.launcher"); const std::string DEFAULT_ICON = "application-default-icon"; const std::string MONO_TEST_ICON = "gnome-home"; const std::string UNITY_THEME_NAME = "unity-icon-theme"; @@ -635,6 +633,11 @@ bool LauncherIcon::OpenQuicklist(bool select_first_item, int monitor) return true; } +void LauncherIcon::CloseQuicklist() +{ + _quicklist->HideAndEndQuicklistNav(); +} + void LauncherIcon::RecvMouseDown(int button, int monitor, unsigned long key_flags) { if (button == 3) diff --git a/launcher/LauncherIcon.h b/launcher/LauncherIcon.h index ee0da8d02..47bf18df5 100644 --- a/launcher/LauncherIcon.h +++ b/launcher/LauncherIcon.h @@ -81,6 +81,7 @@ public: void ShowTooltip(); bool OpenQuicklist(bool select_first_item = false, int monitor = -1); + void CloseQuicklist(); void SetCenter(nux::Point3 const& center, int parent_monitor, nux::Geometry const& parent_geo); diff --git a/launcher/MockLauncherIcon.h b/launcher/MockLauncherIcon.h index 11ac3ca5a..d201f7251 100644 --- a/launcher/MockLauncherIcon.h +++ b/launcher/MockLauncherIcon.h @@ -130,6 +130,10 @@ public: return false; } + void CloseQuicklist() + { + } + void SetCenter(nux::Point3 const& center, int monitor, nux::Geometry const& geo) { center_[monitor] = center; diff --git a/launcher/QuicklistView.cpp b/launcher/QuicklistView.cpp index 078bda0e0..24e20f166 100644 --- a/launcher/QuicklistView.cpp +++ b/launcher/QuicklistView.cpp @@ -279,9 +279,7 @@ QuicklistView::RecvKeyPressed(unsigned long eventType, // left (close quicklist, go back to laucher key-nav) case NUX_VK_LEFT: case NUX_KP_LEFT: - Hide(); - // inform Launcher we switch back to Launcher key-nav - UBusManager::SendMessage(UBUS_QUICKLIST_END_KEY_NAV); + HideAndEndQuicklistNav(); break; // esc (close quicklist, exit key-nav) @@ -403,6 +401,13 @@ void QuicklistView::Hide() } } +void QuicklistView::HideAndEndQuicklistNav() +{ + Hide(); + // inform Launcher we switch back to Launcher key-nav + UBusManager::SendMessage(UBUS_QUICKLIST_END_KEY_NAV); +} + void QuicklistView::Draw(nux::GraphicsEngine& gfxContext, bool forceDraw) { CairoBaseWindow::Draw(gfxContext, forceDraw); diff --git a/launcher/QuicklistView.h b/launcher/QuicklistView.h index f81817565..1516e9b62 100644 --- a/launcher/QuicklistView.h +++ b/launcher/QuicklistView.h @@ -60,6 +60,7 @@ public: void Show(); void Hide(); + void HideAndEndQuicklistNav(); int GetNumItems(); QuicklistMenuItem* GetNthItems(int index); diff --git a/launcher/SimpleLauncherIcon.cpp b/launcher/SimpleLauncherIcon.cpp index 1bcffcb08..9a5f7120d 100644 --- a/launcher/SimpleLauncherIcon.cpp +++ b/launcher/SimpleLauncherIcon.cpp @@ -34,11 +34,7 @@ namespace unity { namespace launcher { - -namespace -{ - nux::logging::Logger logger("unity.dash.CategoryViewGrid"); -} +DECLARE_LOGGER(logger, "unity.launcher.icon"); NUX_IMPLEMENT_OBJECT_TYPE(SimpleLauncherIcon); diff --git a/launcher/StandaloneLauncher.cpp b/launcher/StandaloneLauncher.cpp index cef9f0c9f..04869b605 100644 --- a/launcher/StandaloneLauncher.cpp +++ b/launcher/StandaloneLauncher.cpp @@ -19,16 +19,6 @@ */ #include "Nux/Nux.h" -#include "Nux/Button.h" -#include "Nux/VLayout.h" -#include "Nux/HLayout.h" -#include "Nux/WindowThread.h" -#include "Nux/CheckBox.h" -#include "Nux/SpinBox.h" -#include "Nux/EditTextBox.h" -#include "Nux/StaticText.h" -#include "Nux/RangeValueInteger.h" -#include "NuxGraphics/GraphicsEngine.h" #include <gtk/gtk.h> #include "unity-shared/BackgroundEffectHelper.h" diff --git a/launcher/SwitcherController.cpp b/launcher/SwitcherController.cpp index 30bc80051..63559c19f 100644 --- a/launcher/SwitcherController.cpp +++ b/launcher/SwitcherController.cpp @@ -94,6 +94,11 @@ void Controller::Show(ShowMode show, SortMode sort, std::vector<AbstractLauncher SelectFirstItem(); + // XXX: Workaround for a problem related to Alt+TAB which is needed since the + // switcher is set as the active window (LP: #1071298) + if (model_->Selection()->GetQuirk(AbstractLauncherIcon::Quirk::ACTIVE)) + last_active_selection_ = model_->Selection(); + visible_ = true; if (timeout_length > 0) @@ -239,7 +244,7 @@ void Controller::Hide(bool accept_state) } else { - if (selection->GetQuirk(AbstractLauncherIcon::Quirk::ACTIVE) && + if (selection == last_active_selection_ && !model_->DetailXids().empty ()) { selection->Activate(ActionArg (ActionArg::SWITCHER, 0, model_->DetailXids()[0])); @@ -274,6 +279,8 @@ void Controller::Hide(bool accept_state) ubus_manager_.SendMessage(UBUS_SWITCHER_SHOWN, g_variant_new("(bi)", false, monitor_)); + last_active_selection_ = nullptr; + view_.Release(); } diff --git a/launcher/SwitcherController.h b/launcher/SwitcherController.h index b2f8ed3a8..2389b725c 100644 --- a/launcher/SwitcherController.h +++ b/launcher/SwitcherController.h @@ -138,6 +138,8 @@ private: nux::Color bg_color_; DetailMode detail_mode_; + launcher::AbstractLauncherIcon::Ptr last_active_selection_; + UBusManager ubus_manager_; glib::SourceManager sources_; }; diff --git a/launcher/TrashLauncherIcon.cpp b/launcher/TrashLauncherIcon.cpp index 928474b32..c6f86431e 100644 --- a/launcher/TrashLauncherIcon.cpp +++ b/launcher/TrashLauncherIcon.cpp @@ -33,10 +33,10 @@ namespace unity { namespace launcher { +DECLARE_LOGGER(logger, "unity.launcher.icon"); namespace { const std::string ZEITGEIST_UNITY_ACTOR = "application://compiz.desktop"; - nux::logging::Logger logger("unity.launcher.TrashLauncherIcon"); } TrashLauncherIcon::TrashLauncherIcon() @@ -139,7 +139,11 @@ void TrashLauncherIcon::UpdateTrashIconCb(GObject* source, nux::DndAction TrashLauncherIcon::OnQueryAcceptDrop(DndData const& dnd_data) { +#ifdef UNITY_HAS_X_ORG_SUPPORT return nux::DNDACTION_MOVE; +#else + return nux::DNDACTION_NONE; +#endif } bool TrashLauncherIcon::OnShouldHighlightOnDrag(DndData const& dnd_data) diff --git a/launcher/VolumeLauncherIcon.cpp b/launcher/VolumeLauncherIcon.cpp index cbe9fcff2..2976cbb28 100644 --- a/launcher/VolumeLauncherIcon.cpp +++ b/launcher/VolumeLauncherIcon.cpp @@ -32,11 +32,9 @@ namespace unity { namespace launcher { +DECLARE_LOGGER(logger, "unity.launcher.icon"); namespace { - -nux::logging::Logger logger("unity.launcher"); - const unsigned int volume_changed_timeout = 500; } @@ -144,8 +142,11 @@ public: { MenuItemsVector result; - AppendUnlockFromLauncherItem(result); AppendOpenItem(result); + AppendSeparatorItem(result); + AppendNameItem(result); + AppendSeparatorItem(result); + AppendUnlockFromLauncherItem(result); AppendEjectItem(result); AppendSafelyRemoveItem(result); AppendUnmountItem(result); @@ -173,6 +174,32 @@ public: menu.push_back(menu_item); } + void AppendSeparatorItem(MenuItemsVector& menu) + { + glib::Object<DbusmenuMenuitem> menu_item(dbusmenu_menuitem_new()); + dbusmenu_menuitem_property_set(menu_item, DBUSMENU_MENUITEM_PROP_TYPE, DBUSMENU_CLIENT_TYPES_SEPARATOR); + menu.push_back(menu_item); + } + + void AppendNameItem(MenuItemsVector& menu) + { + std::ostringstream bold_volume_name; + bold_volume_name << "<b>" << volume_->GetName() << "</b>"; + + glib::Object<DbusmenuMenuitem> menu_item(dbusmenu_menuitem_new()); + + dbusmenu_menuitem_property_set(menu_item, DBUSMENU_MENUITEM_PROP_LABEL, bold_volume_name.str().c_str()); + dbusmenu_menuitem_property_set_bool(menu_item, DBUSMENU_MENUITEM_PROP_ENABLED, true); + dbusmenu_menuitem_property_set_bool(menu_item, DBUSMENU_MENUITEM_PROP_VISIBLE, true); + dbusmenu_menuitem_property_set_bool(menu_item, QuicklistMenuItem::MARKUP_ENABLED_PROPERTY, true); + + gsignals_.Add(new ItemSignal(menu_item, DBUSMENU_MENUITEM_SIGNAL_ITEM_ACTIVATED, [this] (DbusmenuMenuitem*, int) { + volume_->MountAndOpenInFileManager(); + })); + + menu.push_back(menu_item); + } + void AppendOpenItem(MenuItemsVector& menu) { glib::Object<DbusmenuMenuitem> menu_item(dbusmenu_menuitem_new()); diff --git a/panel/CMakeLists.txt b/panel/CMakeLists.txt index 8ab407bb2..b9a67f51a 100644 --- a/panel/CMakeLists.txt +++ b/panel/CMakeLists.txt @@ -5,7 +5,6 @@ find_package (PkgConfig) set (CFLAGS ${CACHED_UNITY_DEPS_CFLAGS} ${CACHED_UNITY_DEPS_CFLAGS_OTHER} - ${MAINTAINER_CFLAGS} "-DGETTEXT_PACKAGE=\"unity\"" "-I${CMAKE_CURRENT_BINARY_DIR}" ) diff --git a/panel/PanelController.cpp b/panel/PanelController.cpp index 69ed3b0b5..b8a6c128f 100644 --- a/panel/PanelController.cpp +++ b/panel/PanelController.cpp @@ -32,13 +32,9 @@ namespace unity { namespace panel { +DECLARE_LOGGER(logger, "unity.panel.controller"); -const char window_title[] = "unity-panel"; - -namespace -{ -nux::logging::Logger logger("unity.panel"); -} +const char* window_title = "unity-panel"; class Controller::Impl { diff --git a/panel/PanelIndicatorsView.cpp b/panel/PanelIndicatorsView.cpp index 57b78b316..8642c1caa 100644 --- a/panel/PanelIndicatorsView.cpp +++ b/panel/PanelIndicatorsView.cpp @@ -29,10 +29,7 @@ #include <UnityCore/Variant.h> #include <glib.h> -namespace -{ -nux::logging::Logger logger("unity.indicators"); -} +DECLARE_LOGGER(logger, "unity.indicators"); namespace unity { diff --git a/panel/PanelMenuView.cpp b/panel/PanelMenuView.cpp index e7f016f66..cbd7a603a 100644 --- a/panel/PanelMenuView.cpp +++ b/panel/PanelMenuView.cpp @@ -35,10 +35,10 @@ namespace unity { +DECLARE_LOGGER(logger, "unity.panel.menu"); namespace { - nux::logging::Logger logger("unity.panel.menu"); const int MAIN_LEFT_PADDING = 4; const int TITLE_PADDING = 2; const int MENUBAR_PADDING = 4; @@ -777,6 +777,46 @@ void PanelMenuView::DrawTitle(cairo_t *cr_real, nux::Geometry const& geo, std::s gtk_style_context_restore(style_context); } +std::string PanelMenuView::GetCurrentTitle() const +{ + if (!_switcher_showing && !_launcher_keynav) + { + WindowManager& wm = WindowManager::Default(); + std::string new_title; + + if (wm.IsScaleActive()) + { + if (wm.IsScaleActiveForGroup()) + new_title = GetActiveViewName(true); + else if (_we_control_active) + new_title = _desktop_name; + } + else if (wm.IsExpoActive()) + { + new_title = _desktop_name; + } + else if (!_we_control_active) + { + new_title = ""; + } + else + { + new_title = GetActiveViewName(); + _window_buttons->SetControlledWindow(_active_xid); + } + + // _panel_title needs to be only escaped when computed + // in this function, if it comes from OnLauncherSelectionChanged + // it is already escaped + glib::String escaped(g_markup_escape_text(new_title.c_str(), -1)); + return escaped.Str(); + } + else + { + return _panel_title; + } +} + void PanelMenuView::Refresh(bool force) { nux::Geometry const& geo = GetGeometry(); @@ -786,42 +826,13 @@ void PanelMenuView::Refresh(bool force) if (geo.width > _monitor_geo.width) return; - WindowManager& wm = WindowManager::Default(); - std::string new_title; - - if (wm.IsScaleActive()) - { - if (wm.IsScaleActiveForGroup()) - new_title = GetActiveViewName(true); - else if (_we_control_active) - new_title = _desktop_name; - } - else if (wm.IsExpoActive()) + const std::string& new_title = GetCurrentTitle(); + if (new_title == _panel_title && !force && _last_geo == geo && _title_texture) { - new_title = _desktop_name; - } - else if (!_we_control_active) - { - new_title = ""; - } - else if (!_switcher_showing && !_launcher_keynav) - { - new_title = GetActiveViewName(); - _window_buttons->SetControlledWindow(_active_xid); - } - - if (!_switcher_showing && !_launcher_keynav) - { - if (_panel_title != new_title) - { - _panel_title = new_title; - } - else if (!force && _last_geo == geo && _title_texture) - { - // No need to redraw the title, let's save some CPU time! - return; - } + // No need to redraw the title, let's save some CPU time! + return; } + _panel_title = new_title; if (_panel_title.empty()) { @@ -835,12 +846,7 @@ void PanelMenuView::Refresh(bool force) cairo_set_operator(cr, CAIRO_OPERATOR_CLEAR); cairo_paint(cr); - glib::String escaped(g_markup_escape_text(_panel_title.c_str(), -1)); - - std::ostringstream bold_label; - bold_label << "<b>" << escaped.Str() << "</b>"; - - DrawTitle(cr, geo, bold_label.str()); + DrawTitle(cr, geo, _panel_title); cairo_destroy(cr); diff --git a/panel/PanelMenuView.h b/panel/PanelMenuView.h index f6d737bf3..8914172f3 100644 --- a/panel/PanelMenuView.h +++ b/panel/PanelMenuView.h @@ -68,8 +68,11 @@ protected: virtual nux::Area* FindAreaUnderMouse(const nux::Point& mouse_position, nux::NuxEventType event_type); virtual void OnEntryAdded(indicator::Entry::Ptr const& entry); + virtual std::string GetActiveViewName(bool use_appname = false) const; private: + friend class TestPanelMenuView; + void OnActiveChanged(PanelIndicatorEntryView* view, bool is_active); void OnViewOpened(BamfMatcher* matcher, BamfView* view); void OnViewClosed(BamfMatcher* matcher, BamfView* view); @@ -100,6 +103,7 @@ private: void OnMaximizedGrabEnd(int x, int y); void FullRedraw(); + std::string GetCurrentTitle() const; void Refresh(bool force = false); void DrawTitle(cairo_t *cr_real, nux::Geometry const& geo, std::string const& label) const; @@ -109,8 +113,6 @@ private: BamfWindow* GetBamfWindowForXid(Window xid) const; - std::string GetActiveViewName(bool use_appname = false) const; - void OnSwitcherShown(GVariant* data); void OnLauncherKeyNavStarted(GVariant* data); void OnLauncherKeyNavEnded(GVariant* data); diff --git a/panel/PanelTray.cpp b/panel/PanelTray.cpp index ff17c72b9..9c66b44bb 100644 --- a/panel/PanelTray.cpp +++ b/panel/PanelTray.cpp @@ -23,9 +23,9 @@ #include <NuxCore/Logger.h> #include <UnityCore/Variant.h> +DECLARE_LOGGER(logger, "unity.panel.tray"); namespace { -nux::logging::Logger logger("unity.panel"); const std::string SETTINGS_NAME = "com.canonical.Unity.Panel"; const int PADDING = 3; } diff --git a/panel/PanelView.cpp b/panel/PanelView.cpp index 95704e3a1..8a1caae3b 100644 --- a/panel/PanelView.cpp +++ b/panel/PanelView.cpp @@ -43,9 +43,10 @@ #include "PanelView.h" +DECLARE_LOGGER(logger, "unity.panel.view"); + namespace { -nux::logging::Logger logger("unity.panel.view"); const int refine_gradient_midpoint = 959; } diff --git a/plugins/unity-mt-grab-handles/unitymtgrabhandles.xml.in b/plugins/unity-mt-grab-handles/unitymtgrabhandles.xml.in index a06bc519b..0a4c6efaa 100644 --- a/plugins/unity-mt-grab-handles/unitymtgrabhandles.xml.in +++ b/plugins/unity-mt-grab-handles/unitymtgrabhandles.xml.in @@ -6,11 +6,7 @@ <deps> <requirement> <plugin>opengl</plugin> - </requirement> - <requirement> <plugin>composite</plugin> - </requirement> - <requirement> <plugin>imgpng</plugin> </requirement> <relation type="after"> diff --git a/plugins/unityshell/CMakeLists.txt b/plugins/unityshell/CMakeLists.txt index c6ad6f75d..36db0176c 100644 --- a/plugins/unityshell/CMakeLists.txt +++ b/plugins/unityshell/CMakeLists.txt @@ -7,7 +7,7 @@ set (COMPIZ_PLUGIN_INSTALL_TYPE "package") compiz_plugin (unityshell PKGDEPS ${UNITY_PLUGIN_DEPS} PLUGINDEPS composite opengl compiztoolbox scale - CFLAGSADD "-DINSTALLPREFIX='\"${CMAKE_INSTALL_PREFIX}\"' -DPKGDATADIR='\"${PKGDATADIR}\"' -I${CMAKE_BINARY_DIR} -I${CMAKE_SOURCE_DIR} ${BOOT_LOGGER_FLAG} -DGETTEXT_PACKAGE='\"unity\"' ${MAINTAINER_CFLAGS} -I${CMAKE_SOURCE_DIR}/dash/ -I${CMAKE_SOURCE_DIR}/launcher/ -I${CMAKE_SOURCE_DIR}/hud/ -I${CMAKE_SOURCE_DIR}/panel/ -I${CMAKE_SOURCE_DIR}/shortcuts/ -I${CMAKE_SOURCE_DIR}/unity-shared/" + CFLAGSADD "-DINSTALLPREFIX='\"${CMAKE_INSTALL_PREFIX}\"' -DPKGDATADIR='\"${PKGDATADIR}\"' -I${CMAKE_BINARY_DIR} -I${CMAKE_SOURCE_DIR} ${BOOT_LOGGER_FLAG} -DGETTEXT_PACKAGE='\"unity\"' ${MAINTAINER_CXXFLAGS} -I${CMAKE_SOURCE_DIR}/dash/ -I${CMAKE_SOURCE_DIR}/launcher/ -I${CMAKE_SOURCE_DIR}/hud/ -I${CMAKE_SOURCE_DIR}/panel/ -I${CMAKE_SOURCE_DIR}/shortcuts/ -I${CMAKE_SOURCE_DIR}/unity-shared/" LIBDIRS "${CMAKE_BINARY_DIR}/UnityCore" ) add_dependencies(unityshell unity-core-${UNITY_API_VERSION} dash-lib launcher-lib switcher-lib hud-lib panel-lib shortcuts-lib unity-shared unity-shared-compiz) @@ -20,7 +20,3 @@ set_target_properties(unityshell # Data # install (FILES plugin-unityshell.png DESTINATION ${DATADIR}/ccsm/icons/hicolor/64x64/apps) -install (FILES resources/dash-widgets.json DESTINATION ${CMAKE_INSTALL_PREFIX}/share/unity/themes) - -file (GLOB _datafiles "${CMAKE_CURRENT_SOURCE_DIR}/resources/*") -install (FILES ${_datafiles} DESTINATION ${PKGDATADIR}) diff --git a/plugins/unityshell/src/CompoundGestureRecognizer.cpp b/plugins/unityshell/src/CompoundGestureRecognizer.cpp index bbbbc88cc..8d9150d97 100644 --- a/plugins/unityshell/src/CompoundGestureRecognizer.cpp +++ b/plugins/unityshell/src/CompoundGestureRecognizer.cpp @@ -24,10 +24,7 @@ #include <NuxCore/Logger.h> #include <NuxGraphics/GestureEvent.h> -namespace -{ - nux::logging::Logger logger("unity.compound_gesture_recognizer"); -} +DECLARE_LOGGER(logger, "unity.gesture.recognizer"); namespace unity { diff --git a/plugins/unityshell/src/DebugDBusInterface.cpp b/plugins/unityshell/src/DebugDBusInterface.cpp index 42e55de39..9a267ea21 100644 --- a/plugins/unityshell/src/DebugDBusInterface.cpp +++ b/plugins/unityshell/src/DebugDBusInterface.cpp @@ -38,10 +38,9 @@ const std::string DBUS_BUS_NAME = "com.canonical.Unity"; namespace debug { +DECLARE_LOGGER(logger, "unity.debug.interface"); namespace { -nux::logging::Logger logger("unity.debug.DebugDBusInterface"); - namespace local { std::ofstream output_file; @@ -266,9 +265,10 @@ void LogMessage(std::string const& severity, std::string const& message) { nux::logging::Level level = nux::logging::get_logging_level(severity); - if (logger.GetEffectiveLogLevel() <= level) + nux::logging::Logger const& log_ref = Unwrap(logger); + if (log_ref.GetEffectiveLogLevel() <= level) { - nux::logging::LogStream(level, logger.module(), __FILE__, __LINE__).stream() + nux::logging::LogStream(level, log_ref.module(), __FILE__, __LINE__).stream() << message; } } diff --git a/plugins/unityshell/src/GesturalWindowSwitcher.cpp b/plugins/unityshell/src/GesturalWindowSwitcher.cpp index 910762139..b27468707 100644 --- a/plugins/unityshell/src/GesturalWindowSwitcher.cpp +++ b/plugins/unityshell/src/GesturalWindowSwitcher.cpp @@ -25,10 +25,7 @@ #include <NuxCore/Logger.h> #include "unityshell.h" -namespace -{ - nux::logging::Logger logger("unity.gestural_window_switcher"); -} +DECLARE_LOGGER(logger, "unity.gesture.switcher"); using namespace nux; using namespace unity; diff --git a/plugins/unityshell/src/WindowMinimizeSpeedController.cpp b/plugins/unityshell/src/WindowMinimizeSpeedController.cpp index ec0b4b872..a605b93f2 100644 --- a/plugins/unityshell/src/WindowMinimizeSpeedController.cpp +++ b/plugins/unityshell/src/WindowMinimizeSpeedController.cpp @@ -24,11 +24,9 @@ #include "WindowMinimizeSpeedController.h" +DECLARE_LOGGER(logger, "unity.shell.compiz.minimizer"); namespace { - -nux::logging::Logger logger ("unity.WindowMinimizeSpeedController"); - namespace local { const std::string UNITY_SCHEMA = "com.canonical.Unity"; diff --git a/plugins/unityshell/src/XPathQueryPart.cpp b/plugins/unityshell/src/XPathQueryPart.cpp index a42a65c34..3608a50b4 100644 --- a/plugins/unityshell/src/XPathQueryPart.cpp +++ b/plugins/unityshell/src/XPathQueryPart.cpp @@ -31,10 +31,7 @@ namespace unity namespace debug { -namespace -{ - nux::logging::Logger logger("unity.debug.DebugDBusInterface"); -} +DECLARE_LOGGER(logger, "unity.debug.xpath"); // Stores a part of an XPath query. XPathQueryPart::XPathQueryPart(std::string const& query_part) diff --git a/plugins/unityshell/src/unityshell.cpp b/plugins/unityshell/src/unityshell.cpp index cfeb91eff..740baea2c 100644 --- a/plugins/unityshell/src/unityshell.cpp +++ b/plugins/unityshell/src/unityshell.cpp @@ -80,11 +80,9 @@ using ui::LayoutWindow; using ui::LayoutWindowList; using util::Timer; +DECLARE_LOGGER(logger, "unity.shell.compiz"); namespace { - -nux::logging::Logger logger("unity.shell"); - UnityScreen* uScreen = 0; void reset_glib_logging(); @@ -609,10 +607,13 @@ void UnityScreen::paintPanelShadow(const CompRegion& clip) CompRegion redraw(clip); redraw &= shadowRect; + redraw -= panelShadowPainted; if (redraw.isEmpty()) return; + panelShadowPainted |= redraw; + // compiz doesn't use the same method of tracking monitors as our toolkit // we need to make sure we properly associate with the right monitor int current_monitor = -1; @@ -1241,42 +1242,6 @@ bool UnityWindow::handleEvent(XEvent *event) return handled; } -bool UnityScreen::shellCouldBeHidden(CompOutput const& output) -{ - std::vector<Window> const& nuxwins(nux::XInputWindow::NativeHandleList()); - - // Loop through windows from front to back - CompWindowList const& wins = screen->windows(); - for ( CompWindowList::const_reverse_iterator r = wins.rbegin() - ; r != wins.rend() - ; ++r - ) - { - CompWindow* w = *r; - - /* - * The shell is hidden if there exists any window that fully covers - * the output and is in front of all Nux windows on that output. - */ - if (w->isMapped() && - !(w->state () & CompWindowStateHiddenMask) && - w->geometry().contains(output)) - { - return true; - } - else - { - for (Window n : nuxwins) - { - if (w->id() == n && output.intersects(w->geometry())) - return false; - } - } - } - - return false; -} - /* called whenever we need to repaint parts of the screen */ bool UnityScreen::glPaintOutput(const GLScreenPaintAttrib& attrib, const GLMatrix& transform, @@ -1331,7 +1296,7 @@ void UnityScreen::glPaintTransformedOutput(const GLScreenPaintAttrib& attrib, { allowWindowPaint = false; gScreen->glPaintTransformedOutput(attrib, transform, region, output, mask); - + paintPanelShadow(region); } void UnityScreen::preparePaint(int ms) @@ -1345,7 +1310,10 @@ void UnityScreen::preparePaint(int ms) wi->HandleAnimations (ms); didShellRepaint = false; + panelShadowPainted = CompRegion(); firstWindowAboveShell = NULL; + + compizDamageNux(cScreen->currentDamage()); } void UnityScreen::donePaint() @@ -2547,18 +2515,23 @@ bool UnityWindow::glDraw(const GLMatrix& matrix, uScreen->paintDisplay(); } - if (window->type() == CompWindowTypeDesktopMask) + bool screen_transformed = (mask & PAINT_WINDOW_ON_TRANSFORMED_SCREEN_MASK); + + if (window->type() == CompWindowTypeDesktopMask && !screen_transformed) uScreen->setPanelShadowMatrix(matrix); Window active_window = screen->activeWindow(); - if (window->id() == active_window && window->type() != CompWindowTypeDesktopMask) + if (!screen_transformed && + window->id() == active_window && + window->type() != CompWindowTypeDesktopMask) { uScreen->paintPanelShadow(region); } bool ret = gWindow->glDraw(matrix, attrib, region, mask); - if ((active_window == 0 || active_window == window->id()) && + if (!screen_transformed && + (active_window == 0 || active_window == window->id()) && (window->type() == CompWindowTypeDesktopMask)) { uScreen->paintPanelShadow(region); diff --git a/plugins/unityshell/src/unityshell.h b/plugins/unityshell/src/unityshell.h index 42ff77728..cb0286064 100644 --- a/plugins/unityshell/src/unityshell.h +++ b/plugins/unityshell/src/unityshell.h @@ -113,8 +113,6 @@ public: void damageRegion(const CompRegion ®ion); - bool shellCouldBeHidden(CompOutput const& output); - /* paint on top of all windows if we could not find a window * to paint underneath */ bool glPaintOutput(const GLScreenPaintAttrib&, @@ -307,6 +305,7 @@ private: bool _key_nav_mode_requested; CompOutput* _last_output; + CompRegion panelShadowPainted; CompRegion nuxRegion; CompRegion fullscreenRegion; CompWindow* firstWindowAboveShell; diff --git a/plugins/unityshell/unityshell.xml.in b/plugins/unityshell/unityshell.xml.in index 11ace87b9..5581b2e32 100644 --- a/plugins/unityshell/unityshell.xml.in +++ b/plugins/unityshell/unityshell.xml.in @@ -4,7 +4,7 @@ <_short>Ubuntu Unity Plugin</_short> <_long>Plugin to draw the Unity Shell</_long> <category>Desktop</category> - <feature>showdesktop</feature> + <feature>fadetodesktop</feature> <deps> <relation type="after"> <plugin>bailer</plugin> @@ -46,19 +46,19 @@ <option name="show_hud" type="key"> <_short>Key to show the HUD</_short> - <_long>Make the HUD appear with this key.</_long> + <_long>A tap on this key summons the HUD.</_long> <default><Alt></default> </option> <option name="execute_command" type="key"> <_short>Key to execute a command</_short> - <_long>Key to open a folder or execute a command.</_long> + <_long>Opens a folder or executes a command.</_long> <default><Alt>F2</default> </option> <option name="panel_first_menu" type="key"> <_short>Key to open the first panel menu</_short> - <_long>Open the first indicator menu on the top panel, allowing keyboard navigation thereafter.</_long> + <_long>Opens the first indicator menu of the Panel, allowing keyboard navigation thereafter.</_long> <default><Alt>F10</default> </option> @@ -79,7 +79,7 @@ <option name="background_color" type="color"> <_short>Background Color</_short> - <_long>Background color override for the dash, launcher and switcher.</_long> + <_long>Background color override for the Dash, Launcher and Switcher.</_long> <default> <red>0x00</red> <green>0x00</green> @@ -109,7 +109,7 @@ </option> <option name="automaximize_value" type="int"> - <_short>Automaximize value</_short> + <_short>Automaximize Value</_short> <_long>The minimum value to trigger automaximize.</_long> <min>1</min> <max>100</max> @@ -128,27 +128,27 @@ <_short>Launcher</_short> <option name="show_launcher" type="key"> - <_short>Key to show the launcher</_short> - <_long>Make the launcher appear with that key.</_long> + <_short>Key to show the Dash, Launcher and Help Overlay</_short> + <_long>Holding this key makes the Launcher and Help Overlay appear. Tapping it opens the Dash.</_long> <tap_detection>false</tap_detection> <default><Super></default> </option> <option name="keyboard_focus" type="key"> - <_short>Key to put keyboard-focus on the launcher</_short> - <_long>Set the keyboard-focus on the launcher so it can be navigated with the cursor-keys.</_long> + <_short>Key to give keyboard-focus to the Launcher</_short> + <_long>Gives keyboard-focus to the Launcher so it can be navigated with the cursor-keys.</_long> <default><Alt>F1</default> </option> <option name="launcher_switcher_forward" type="key"> - <_short>Key to start the launcher application switcher</_short> - <_long>Switch applications using the launcher.</_long> + <_short>Key to start the Launcher Application Switcher</_short> + <_long>Cycles through icons present in the Launcher. Activates the highlighted icon on release.</_long> <default><Super>Tab</default> </option> <option name="launcher_switcher_prev" type="key"> - <_short>Key to start the launcher application switcher in reverse</_short> - <_long>Switch applications using the launcher, in reverse order.</_long> + <_short>Key to start the Launcher Application Switcher in reverse</_short> + <_long>Cycles through icons present in the Launcher, in reverse order. Activates the highlighted icon on release.</_long> <default><Super><Shift>Tab</default> </option> @@ -163,7 +163,7 @@ <option name="launcher_hide_mode" type="int"> <_short>Hide Launcher</_short> - <_long>Make the launcher hide automatically after some time of inactivity: always or never.</_long> + <_long>Make the Launcher hide automatically after some time of inactivity.</_long> <min>0</min> <max>1</max> <default>0</default> @@ -179,7 +179,7 @@ <option name="autohide_animation" type="int"> <_short>Hide Animation</_short> - <_long>Animation played when the launcher is showing or hiding.</_long> + <_long>Animation played when the Launcher is showing or hiding.</_long> <min>0</min> <max>3</max> <default>3</default> @@ -219,7 +219,7 @@ <option name="num_launchers" type="int"> <_short>Launcher Monitors</_short> - <_long>Selects on which monitor the launcher is present.</_long> + <_long>Selects on which display the Launcher will be present.</_long> <min>0</min> <max>1</max> <default>0</default> @@ -235,13 +235,13 @@ <option name="launcher_capture_mouse" type="bool"> <_short>Launcher Capture Mouse</_short> - <_long>Determines if the launcher edges should capture the mousepointer.</_long> + <_long>Determines if the Launcher's edges will capture the mousepointer.</_long> <default>true</default> </option> <option name="edge_responsiveness" type="float"> <_short>Launcher Reveal Edge Responsiveness</_short> - <_long>A conglomerate setting that modifies the overall responsiveness of the launcher reveal.</_long> + <_long>A conglomerate setting that modifies the overall responsiveness of the Launcher reveal.</_long> <default>2.0</default> <min>0.2</min> <max>8.0</max> @@ -250,7 +250,7 @@ <option name="reveal_pressure" type="int"> <_short>Launcher Reveal Pressure</_short> - <_long>Amount of mouse pressure required to reveal the launcher.</_long> + <_long>Amount of mouse pressure required to reveal the Launcher.</_long> <default>20</default> <min>1</min> <max>1000</max> @@ -294,8 +294,8 @@ </option> <option name="icon_size" type="int"> - <_short>Launcher icon size</_short> - <_long>The size of the icons in the launcher.</_long> + <_short>Launcher Icon Size</_short> + <_long>The size of the icons in the Launcher.</_long> <default>48</default> <min>32</min> <max>64</max> @@ -303,8 +303,8 @@ </option> <option name="backlight_mode" type="int"> - <_short>Backlight Mode</_short> - <_long>Change how the icons in the launcher are backlit.</_long> + <_short>Launcher Icon Backlight Mode</_short> + <_long>Change how the icons in the Launcher are backlit.</_long> <min>0</min> <max>4</max> <default>1</default> @@ -331,7 +331,7 @@ </option> <option name="launch_animation" type="int"> - <_short>Launch Animation</_short> + <_short>Launcher Icon Launch Animation</_short> <_long>The icon animation playing during the launch of a process.</_long> <min>0</min> <max>2</max> @@ -351,8 +351,8 @@ </option> <option name="urgent_animation" type="int"> - <_short>Urgent Animation</_short> - <_long>The icon animation playing when a launcher icon is in the urgent state.</_long> + <_short>Launcher Icon Urgent Animation</_short> + <_long>The icon animation playing when a Launcher Icon is in the urgent state.</_long> <min>0</min> <max>2</max> <default>2</default> @@ -376,7 +376,7 @@ <_short>Menus</_short> <option name="menus_fadein" type="int"> - <_short>Menus Fade-in duration</_short> + <_short>Menus Fade-in Duration</_short> <_long>Duration (in milliseconds) of the menus fade-in animation, used when the mouse goes over the top-panel.</_long> <min>0</min> <max>1000</max> @@ -384,7 +384,7 @@ </option> <option name="menus_fadeout" type="int"> - <_short>Menus fade-out duration</_short> + <_short>Menus Fade-out Duration</_short> <_long>Duration (in milliseconds) of the menus fade-out animation, used when the mouse goes over the top-panel.</_long> <min>0</min> <max>1000</max> @@ -392,7 +392,7 @@ </option> <option name="menus_discovery_duration" type="int"> - <_short>Menus discovery duration</_short> + <_short>Menus Discovery Duration</_short> <_long>How many seconds the menus should be shown when a new application has been launched.</_long> <min>0</min> <max>10</max> @@ -400,7 +400,7 @@ </option> <option name="menus_discovery_fadein" type="int"> - <_short>Menus discovery fade-in duration</_short> + <_short>Menus Discovery Fade-in Duration</_short> <_long>Duration (in milliseconds) of the menus fade-in animation, used when the menus of a new launched application have been shown.</_long> <min>0</min> <max>1000</max> @@ -408,7 +408,7 @@ </option> <option name="menus_discovery_fadeout" type="int"> - <_short>Menus discovery fade-out duration</_short> + <_short>Menus Discovery Fade-out Duration</_short> <_long>Duration (in milliseconds) of the menus fade-out animation, used when the menus of a new launched application have been shown.</_long> <min>0</min> <max>1000</max> @@ -421,94 +421,94 @@ <_short>Switcher</_short> <option name="alt_tab_forward" type="key"> - <_short>Key to start the switcher</_short> - <_long>Starts switching between windows.</_long> + <_short>Key to start the Switcher</_short> + <_long>Switches to the next open window on the actual viewport.</_long> <default><Alt>Tab</default> </option> <option name="alt_tab_prev" type="key"> - <_short>Key to start the switcher in reverse</_short> - <_long>Starts switching between windows in reverse order.</_long> + <_short>Key to switch to the previous window in the Switcher</_short> + <_long>Switches to the previous open window on the actual viewport, once the Switcher has been revealed.</_long> <default><Alt><Shift>Tab</default> </option> <option name="alt_tab_forward_all" type="key"> - <_short>Key to start the switcher for all viewports</_short> - <_long>Starts switching between windows on all viewports.</_long> + <_short>Key to start the Switcher for all viewports</_short> + <_long>Switches to the next open window, including windows of all viewports.</_long> <default><Control><Alt>Tab</default> </option> <option name="alt_tab_prev_all" type="key"> - <_short>Key to start the switcher in reverse for all viewports</_short> - <_long>Starts switching between windows on all viewports, in reverse order.</_long> + <_short>Key to switch to the previous window in the Switcher for all viewports</_short> + <_long>Switches to the previous open window, once the Switcher has been revealed, including windows of all viewports.</_long> <default><Control><Alt><Shift>Tab</default> </option> <option name="alt_tab_right" type="key"> - <_short>Go right in the switcher</_short> - <_long>Navigates one window to the right in the switcher.</_long> + <_short>Key to move to the right in the Switcher</_short> + <_long>Navigates one window to the right in the Switcher.</_long> <default><Alt>Right</default> <passive_grab>false</passive_grab> <internal/> </option> <option name="alt_tab_left" type="key"> - <_short>Go left in the switcher</_short> - <_long>Navigates one window to the left in the switcher.</_long> + <_short>Key to move to the left in the Switcher</_short> + <_long>Navigates one window to the left in the Switcher.</_long> <default><Alt>Left</default> <passive_grab>false</passive_grab> <internal/> </option> <option name="alt_tab_detail_start" type="key"> - <_short>Key to expose the windows in the switcher</_short> - <_long>Displays a preview of the selected window; a grid if there are multiple windows of the selected application open.</_long> + <_short>Key to expose windows in the Switcher</_short> + <_long>Displays a live preview of the selected window; a grid if multiple windows of the selected application are open.</_long> <default><Alt>Down</default> <passive_grab>false</passive_grab> <internal/> </option> <option name="alt_tab_detail_stop" type="key"> - <_short>Key to collapse windows in the switcher</_short> - <_long>Closes the previews and return to icons in the switcher.</_long> + <_short>Key to collapse windows in the Switcher</_short> + <_long>Closes the live previews and returns to icons in the Switcher.</_long> <default><Alt>Up</default> <passive_grab>false</passive_grab> <internal/> </option> <option name="alt_tab_next_window" type="key"> - <_short>Key to flip through windows in the switcher</_short> - <_long>Flips through all the windows present in the switcher.</_long> + <_short>Key to flip through windows in the Switcher</_short> + <_long>Flips through all the windows present in the Switcher.</_long> <passive_grab>false</passive_grab> </option> <option name="alt_tab_prev_window" type="key"> - <_short>Key to flip through windows in the switcher backwards</_short> - <_long>Flips through all the windows present in the switcher, in reverse order.</_long> + <_short>Key to flip through windows in the Switcher backwards</_short> + <_long>Flips through all the windows present in the Switcher, in reverse order.</_long> <passive_grab>false</passive_grab> </option> <option name="show_minimized_windows" type="bool"> - <_short>Show previews of windows in switcher</_short> - <_long>Enables miniature windows in the switcher.</_long> + <_short>Show live previews of windows in the Switcher</_short> + <_long>Enables miniature live window previews in the Switcher.</_long> <default>true</default> </option> <option name="alt_tab_timeout" type="bool"> - <_short>Enable timed automatic to show previews in switcher</_short> - <_long>Spread multiple windows of the same application out into a grid automatically after a short time.</_long> + <_short>Timed automatic to show live previews in the Switcher</_short> + <_long>Automatically spreads multiple windows of the same application out into a grid after a short time.</_long> <default>true</default> </option> <option name="alt_tab_bias_viewport" type="bool"> <_short>Bias alt-tab to prefer windows on the current viewport</_short> - <_long>Bias the switcher to prefer windows which are placed on the current viewport.</_long> + <_long>Bias the Switcher to prefer windows which are placed on the current viewport.</_long> <default>true</default> </option> <option name="disable_show_desktop" type="bool"> - <_short>Disable Show Desktop in the switcher</_short> - <_long>Disables the Show Desktop icon in the switcher.</_long> + <_short>Disable Show Desktop in the Switcher</_short> + <_long>Disables the Show Desktop icon in the Switcher.</_long> <default>false</default> </option> diff --git a/plugins/unityshell/resources/album_missing.png b/resources/album_missing.png Binary files differindex dbb56373b..dbb56373b 100644 --- a/plugins/unityshell/resources/album_missing.png +++ b/resources/album_missing.png diff --git a/plugins/unityshell/resources/album_missing_preview.png b/resources/album_missing_preview.png Binary files differindex 5d4716569..5d4716569 100644 --- a/plugins/unityshell/resources/album_missing_preview.png +++ b/resources/album_missing_preview.png diff --git a/plugins/unityshell/resources/bag.svg b/resources/bag.svg index 08859c4ca..08859c4ca 100644 --- a/plugins/unityshell/resources/bag.svg +++ b/resources/bag.svg diff --git a/plugins/unityshell/resources/category_gradient.png b/resources/category_gradient.png Binary files differindex e6c8e66f6..e6c8e66f6 100644 --- a/plugins/unityshell/resources/category_gradient.png +++ b/resources/category_gradient.png diff --git a/plugins/unityshell/resources/category_gradient_no_refine.png b/resources/category_gradient_no_refine.png Binary files differindex 527a875a2..527a875a2 100644 --- a/plugins/unityshell/resources/category_gradient_no_refine.png +++ b/resources/category_gradient_no_refine.png diff --git a/plugins/unityshell/resources/close_dash.png b/resources/close_dash.png Binary files differindex 3925bda11..3925bda11 100644 --- a/plugins/unityshell/resources/close_dash.png +++ b/resources/close_dash.png diff --git a/plugins/unityshell/resources/close_dash_disabled.png b/resources/close_dash_disabled.png Binary files differindex 3925bda11..3925bda11 100644 --- a/plugins/unityshell/resources/close_dash_disabled.png +++ b/resources/close_dash_disabled.png diff --git a/plugins/unityshell/resources/close_dash_prelight.png b/resources/close_dash_prelight.png Binary files differindex 2d6233509..2d6233509 100644 --- a/plugins/unityshell/resources/close_dash_prelight.png +++ b/resources/close_dash_prelight.png diff --git a/plugins/unityshell/resources/close_dash_pressed.png b/resources/close_dash_pressed.png Binary files differindex bdcc40787..bdcc40787 100644 --- a/plugins/unityshell/resources/close_dash_pressed.png +++ b/resources/close_dash_pressed.png diff --git a/plugins/unityshell/resources/dash-widgets.json b/resources/dash-widgets.json index 11da04b10..11da04b10 100644 --- a/plugins/unityshell/resources/dash-widgets.json +++ b/resources/dash-widgets.json diff --git a/plugins/unityshell/resources/dash_bottom_border_tile.png b/resources/dash_bottom_border_tile.png Binary files differindex 2a4328fb9..2a4328fb9 100644 --- a/plugins/unityshell/resources/dash_bottom_border_tile.png +++ b/resources/dash_bottom_border_tile.png diff --git a/plugins/unityshell/resources/dash_bottom_border_tile_mask.png b/resources/dash_bottom_border_tile_mask.png Binary files differindex 570d07027..570d07027 100644 --- a/plugins/unityshell/resources/dash_bottom_border_tile_mask.png +++ b/resources/dash_bottom_border_tile_mask.png diff --git a/plugins/unityshell/resources/dash_bottom_left_corner.png b/resources/dash_bottom_left_corner.png Binary files differindex 2aa62bcf9..2aa62bcf9 100644 --- a/plugins/unityshell/resources/dash_bottom_left_corner.png +++ b/resources/dash_bottom_left_corner.png diff --git a/plugins/unityshell/resources/dash_bottom_left_corner_mask.png b/resources/dash_bottom_left_corner_mask.png Binary files differindex add1e4b5b..add1e4b5b 100644 --- a/plugins/unityshell/resources/dash_bottom_left_corner_mask.png +++ b/resources/dash_bottom_left_corner_mask.png diff --git a/plugins/unityshell/resources/dash_bottom_right_corner.png b/resources/dash_bottom_right_corner.png Binary files differindex 5ed3a1f59..5ed3a1f59 100644 --- a/plugins/unityshell/resources/dash_bottom_right_corner.png +++ b/resources/dash_bottom_right_corner.png diff --git a/plugins/unityshell/resources/dash_bottom_right_corner_mask.png b/resources/dash_bottom_right_corner_mask.png Binary files differindex 7a7b20180..7a7b20180 100644 --- a/plugins/unityshell/resources/dash_bottom_right_corner_mask.png +++ b/resources/dash_bottom_right_corner_mask.png diff --git a/plugins/unityshell/resources/dash_fullscreen_icon.png b/resources/dash_fullscreen_icon.png Binary files differindex 86d3081d4..86d3081d4 100644 --- a/plugins/unityshell/resources/dash_fullscreen_icon.png +++ b/resources/dash_fullscreen_icon.png diff --git a/plugins/unityshell/resources/dash_group_expand.png b/resources/dash_group_expand.png Binary files differindex 40f4c9936..40f4c9936 100644 --- a/plugins/unityshell/resources/dash_group_expand.png +++ b/resources/dash_group_expand.png diff --git a/plugins/unityshell/resources/dash_group_unexpand.png b/resources/dash_group_unexpand.png Binary files differindex b12e15e1b..b12e15e1b 100644 --- a/plugins/unityshell/resources/dash_group_unexpand.png +++ b/resources/dash_group_unexpand.png diff --git a/plugins/unityshell/resources/dash_left_edge.png b/resources/dash_left_edge.png Binary files differindex 53a1fcb34..53a1fcb34 100644 --- a/plugins/unityshell/resources/dash_left_edge.png +++ b/resources/dash_left_edge.png diff --git a/plugins/unityshell/resources/dash_left_tile.png b/resources/dash_left_tile.png Binary files differindex ec22136fc..ec22136fc 100644 --- a/plugins/unityshell/resources/dash_left_tile.png +++ b/resources/dash_left_tile.png diff --git a/plugins/unityshell/resources/dash_noise.png b/resources/dash_noise.png Binary files differindex cc6461acd..cc6461acd 100755..100644 --- a/plugins/unityshell/resources/dash_noise.png +++ b/resources/dash_noise.png diff --git a/plugins/unityshell/resources/dash_right_border_tile.png b/resources/dash_right_border_tile.png Binary files differindex 5a338b6e7..5a338b6e7 100644 --- a/plugins/unityshell/resources/dash_right_border_tile.png +++ b/resources/dash_right_border_tile.png diff --git a/plugins/unityshell/resources/dash_right_border_tile_mask.png b/resources/dash_right_border_tile_mask.png Binary files differindex 3c8db6085..3c8db6085 100644 --- a/plugins/unityshell/resources/dash_right_border_tile_mask.png +++ b/resources/dash_right_border_tile_mask.png diff --git a/plugins/unityshell/resources/dash_sheen.png b/resources/dash_sheen.png Binary files differindex c66f9918f..c66f9918f 100644 --- a/plugins/unityshell/resources/dash_sheen.png +++ b/resources/dash_sheen.png diff --git a/plugins/unityshell/resources/dash_top_edge.png b/resources/dash_top_edge.png Binary files differindex 1d8ec9343..1d8ec9343 100644 --- a/plugins/unityshell/resources/dash_top_edge.png +++ b/resources/dash_top_edge.png diff --git a/plugins/unityshell/resources/dash_top_right_corner.png b/resources/dash_top_right_corner.png Binary files differindex 154cd1621..154cd1621 100644 --- a/plugins/unityshell/resources/dash_top_right_corner.png +++ b/resources/dash_top_right_corner.png diff --git a/plugins/unityshell/resources/dash_top_right_corner_mask.png b/resources/dash_top_right_corner_mask.png Binary files differindex 687efff76..687efff76 100644 --- a/plugins/unityshell/resources/dash_top_right_corner_mask.png +++ b/resources/dash_top_right_corner_mask.png diff --git a/plugins/unityshell/resources/dash_top_tile.png b/resources/dash_top_tile.png Binary files differindex e993c4e30..e993c4e30 100644 --- a/plugins/unityshell/resources/dash_top_tile.png +++ b/resources/dash_top_tile.png diff --git a/plugins/unityshell/resources/emblem_apps.svg b/resources/emblem_apps.svg index 6b3937745..6b3937745 100644 --- a/plugins/unityshell/resources/emblem_apps.svg +++ b/resources/emblem_apps.svg diff --git a/plugins/unityshell/resources/emblem_books.svg b/resources/emblem_books.svg index 89cfdfd14..89cfdfd14 100644 --- a/plugins/unityshell/resources/emblem_books.svg +++ b/resources/emblem_books.svg diff --git a/plugins/unityshell/resources/emblem_clothes.svg b/resources/emblem_clothes.svg index 882a09b3d..882a09b3d 100644 --- a/plugins/unityshell/resources/emblem_clothes.svg +++ b/resources/emblem_clothes.svg diff --git a/plugins/unityshell/resources/emblem_music.svg b/resources/emblem_music.svg index 998583d85..998583d85 100644 --- a/plugins/unityshell/resources/emblem_music.svg +++ b/resources/emblem_music.svg diff --git a/plugins/unityshell/resources/emblem_others.svg b/resources/emblem_others.svg index cb6c7ed24..cb6c7ed24 100644 --- a/plugins/unityshell/resources/emblem_others.svg +++ b/resources/emblem_others.svg diff --git a/plugins/unityshell/resources/emblem_video.svg b/resources/emblem_video.svg index a604feedd..a604feedd 100644 --- a/plugins/unityshell/resources/emblem_video.svg +++ b/resources/emblem_video.svg diff --git a/plugins/unityshell/resources/find_files.png b/resources/find_files.png Binary files differindex 0b1497a84..0b1497a84 100644 --- a/plugins/unityshell/resources/find_files.png +++ b/resources/find_files.png diff --git a/plugins/unityshell/resources/find_internet_apps.png b/resources/find_internet_apps.png Binary files differindex 51ed6d66e..51ed6d66e 100644 --- a/plugins/unityshell/resources/find_internet_apps.png +++ b/resources/find_internet_apps.png diff --git a/plugins/unityshell/resources/find_media_apps.png b/resources/find_media_apps.png Binary files differindex 63ab56c71..63ab56c71 100644 --- a/plugins/unityshell/resources/find_media_apps.png +++ b/resources/find_media_apps.png diff --git a/plugins/unityshell/resources/find_more_apps.png b/resources/find_more_apps.png Binary files differindex 3462ee026..3462ee026 100644 --- a/plugins/unityshell/resources/find_more_apps.png +++ b/resources/find_more_apps.png diff --git a/plugins/unityshell/resources/flow-view.svg b/resources/flow-view.svg index 295a735a7..295a735a7 100644 --- a/plugins/unityshell/resources/flow-view.svg +++ b/resources/flow-view.svg diff --git a/plugins/unityshell/resources/grid-view.svg b/resources/grid-view.svg index 4adc31604..4adc31604 100644 --- a/plugins/unityshell/resources/grid-view.svg +++ b/resources/grid-view.svg diff --git a/plugins/unityshell/resources/launcher_arrow_ltr.png b/resources/launcher_arrow_ltr.png Binary files differindex d1044a9aa..d1044a9aa 100644 --- a/plugins/unityshell/resources/launcher_arrow_ltr.png +++ b/resources/launcher_arrow_ltr.png diff --git a/plugins/unityshell/resources/launcher_arrow_outline_ltr.png b/resources/launcher_arrow_outline_ltr.png Binary files differindex 6b3d427b0..6b3d427b0 100644 --- a/plugins/unityshell/resources/launcher_arrow_outline_ltr.png +++ b/resources/launcher_arrow_outline_ltr.png diff --git a/plugins/unityshell/resources/launcher_arrow_outline_rtl.png b/resources/launcher_arrow_outline_rtl.png Binary files differindex e2afda4ad..e2afda4ad 100644 --- a/plugins/unityshell/resources/launcher_arrow_outline_rtl.png +++ b/resources/launcher_arrow_outline_rtl.png diff --git a/plugins/unityshell/resources/launcher_arrow_rtl.png b/resources/launcher_arrow_rtl.png Binary files differindex 5ae5f6c7f..5ae5f6c7f 100644 --- a/plugins/unityshell/resources/launcher_arrow_rtl.png +++ b/resources/launcher_arrow_rtl.png diff --git a/plugins/unityshell/resources/launcher_bfb.png b/resources/launcher_bfb.png Binary files differindex 32da68526..32da68526 100644 --- a/plugins/unityshell/resources/launcher_bfb.png +++ b/resources/launcher_bfb.png diff --git a/plugins/unityshell/resources/launcher_icon_back_150.png b/resources/launcher_icon_back_150.png Binary files differindex b62d99f39..b62d99f39 100644 --- a/plugins/unityshell/resources/launcher_icon_back_150.png +++ b/resources/launcher_icon_back_150.png diff --git a/plugins/unityshell/resources/launcher_icon_back_170.png b/resources/launcher_icon_back_170.png Binary files differindex efc6794a4..efc6794a4 100644 --- a/plugins/unityshell/resources/launcher_icon_back_170.png +++ b/resources/launcher_icon_back_170.png diff --git a/plugins/unityshell/resources/launcher_icon_back_54.png b/resources/launcher_icon_back_54.png Binary files differindex e052e3f5f..e052e3f5f 100644 --- a/plugins/unityshell/resources/launcher_icon_back_54.png +++ b/resources/launcher_icon_back_54.png diff --git a/plugins/unityshell/resources/launcher_icon_edge_150.png b/resources/launcher_icon_edge_150.png Binary files differindex 108f66329..108f66329 100644 --- a/plugins/unityshell/resources/launcher_icon_edge_150.png +++ b/resources/launcher_icon_edge_150.png diff --git a/plugins/unityshell/resources/launcher_icon_edge_170.png b/resources/launcher_icon_edge_170.png Binary files differindex 5ed464976..5ed464976 100644 --- a/plugins/unityshell/resources/launcher_icon_edge_170.png +++ b/resources/launcher_icon_edge_170.png diff --git a/plugins/unityshell/resources/launcher_icon_edge_54.png b/resources/launcher_icon_edge_54.png Binary files differindex cfe983c42..cfe983c42 100644 --- a/plugins/unityshell/resources/launcher_icon_edge_54.png +++ b/resources/launcher_icon_edge_54.png diff --git a/plugins/unityshell/resources/launcher_icon_glow_200.png b/resources/launcher_icon_glow_200.png Binary files differindex 72258cc36..72258cc36 100644 --- a/plugins/unityshell/resources/launcher_icon_glow_200.png +++ b/resources/launcher_icon_glow_200.png diff --git a/plugins/unityshell/resources/launcher_icon_glow_62.png b/resources/launcher_icon_glow_62.png Binary files differindex 08481dde0..08481dde0 100644 --- a/plugins/unityshell/resources/launcher_icon_glow_62.png +++ b/resources/launcher_icon_glow_62.png diff --git a/plugins/unityshell/resources/launcher_icon_selected_back_150.png b/resources/launcher_icon_selected_back_150.png Binary files differindex a0a9a3675..a0a9a3675 100644 --- a/plugins/unityshell/resources/launcher_icon_selected_back_150.png +++ b/resources/launcher_icon_selected_back_150.png diff --git a/plugins/unityshell/resources/launcher_icon_selected_back_170.png b/resources/launcher_icon_selected_back_170.png Binary files differindex 303532ee2..303532ee2 100644 --- a/plugins/unityshell/resources/launcher_icon_selected_back_170.png +++ b/resources/launcher_icon_selected_back_170.png diff --git a/plugins/unityshell/resources/launcher_icon_selected_edge_150.png b/resources/launcher_icon_selected_edge_150.png Binary files differindex 63bd20526..63bd20526 100644 --- a/plugins/unityshell/resources/launcher_icon_selected_edge_150.png +++ b/resources/launcher_icon_selected_edge_150.png diff --git a/plugins/unityshell/resources/launcher_icon_selected_edge_170.png b/resources/launcher_icon_selected_edge_170.png Binary files differindex 4ec6455fe..4ec6455fe 100644 --- a/plugins/unityshell/resources/launcher_icon_selected_edge_170.png +++ b/resources/launcher_icon_selected_edge_170.png diff --git a/plugins/unityshell/resources/launcher_icon_shadow_200.png b/resources/launcher_icon_shadow_200.png Binary files differindex ff613dbda..ff613dbda 100644 --- a/plugins/unityshell/resources/launcher_icon_shadow_200.png +++ b/resources/launcher_icon_shadow_200.png diff --git a/plugins/unityshell/resources/launcher_icon_shadow_62.png b/resources/launcher_icon_shadow_62.png Binary files differindex 28c2e9d64..28c2e9d64 100644 --- a/plugins/unityshell/resources/launcher_icon_shadow_62.png +++ b/resources/launcher_icon_shadow_62.png diff --git a/plugins/unityshell/resources/launcher_icon_shine_150.png b/resources/launcher_icon_shine_150.png Binary files differindex 9ae019a9b..9ae019a9b 100644 --- a/plugins/unityshell/resources/launcher_icon_shine_150.png +++ b/resources/launcher_icon_shine_150.png diff --git a/plugins/unityshell/resources/launcher_icon_shine_170.png b/resources/launcher_icon_shine_170.png Binary files differindex 41aba4632..41aba4632 100644 --- a/plugins/unityshell/resources/launcher_icon_shine_170.png +++ b/resources/launcher_icon_shine_170.png diff --git a/plugins/unityshell/resources/launcher_icon_shine_54.png b/resources/launcher_icon_shine_54.png Binary files differindex 767e71bed..767e71bed 100644 --- a/plugins/unityshell/resources/launcher_icon_shine_54.png +++ b/resources/launcher_icon_shine_54.png diff --git a/plugins/unityshell/resources/launcher_pip_ltr.png b/resources/launcher_pip_ltr.png Binary files differindex 36e341b99..36e341b99 100644 --- a/plugins/unityshell/resources/launcher_pip_ltr.png +++ b/resources/launcher_pip_ltr.png diff --git a/plugins/unityshell/resources/launcher_pip_rtl.png b/resources/launcher_pip_rtl.png Binary files differindex 60cb2bacb..60cb2bacb 100644 --- a/plugins/unityshell/resources/launcher_pip_rtl.png +++ b/resources/launcher_pip_rtl.png diff --git a/plugins/unityshell/resources/launcher_pressure_effect.png b/resources/launcher_pressure_effect.png Binary files differindex 7523d07d8..7523d07d8 100644 --- a/plugins/unityshell/resources/launcher_pressure_effect.png +++ b/resources/launcher_pressure_effect.png diff --git a/plugins/unityshell/resources/lens-nav-app.svg b/resources/lens-nav-app.svg index b0bb63120..b0bb63120 100644 --- a/plugins/unityshell/resources/lens-nav-app.svg +++ b/resources/lens-nav-app.svg diff --git a/plugins/unityshell/resources/lens-nav-file.svg b/resources/lens-nav-file.svg index 48fb41c3b..48fb41c3b 100644 --- a/plugins/unityshell/resources/lens-nav-file.svg +++ b/resources/lens-nav-file.svg diff --git a/plugins/unityshell/resources/lens-nav-gwibber.svg b/resources/lens-nav-gwibber.svg index c0d95ad68..c0d95ad68 100644 --- a/plugins/unityshell/resources/lens-nav-gwibber.svg +++ b/resources/lens-nav-gwibber.svg diff --git a/plugins/unityshell/resources/lens-nav-home.svg b/resources/lens-nav-home.svg index 0f30fda7c..0f30fda7c 100644 --- a/plugins/unityshell/resources/lens-nav-home.svg +++ b/resources/lens-nav-home.svg diff --git a/plugins/unityshell/resources/lens-nav-music.svg b/resources/lens-nav-music.svg index ada6ce9e4..ada6ce9e4 100644 --- a/plugins/unityshell/resources/lens-nav-music.svg +++ b/resources/lens-nav-music.svg diff --git a/plugins/unityshell/resources/lens-nav-people.svg b/resources/lens-nav-people.svg index acef9b538..acef9b538 100644 --- a/plugins/unityshell/resources/lens-nav-people.svg +++ b/resources/lens-nav-people.svg diff --git a/plugins/unityshell/resources/lens-nav-photo.svg b/resources/lens-nav-photo.svg index 7c91448a0..7c91448a0 100644 --- a/plugins/unityshell/resources/lens-nav-photo.svg +++ b/resources/lens-nav-photo.svg diff --git a/plugins/unityshell/resources/lens-nav-video.svg b/resources/lens-nav-video.svg index 7c07198a9..7c07198a9 100644 --- a/plugins/unityshell/resources/lens-nav-video.svg +++ b/resources/lens-nav-video.svg diff --git a/plugins/unityshell/resources/maximize_dash.png b/resources/maximize_dash.png Binary files differindex 6c48f11da..6c48f11da 100644 --- a/plugins/unityshell/resources/maximize_dash.png +++ b/resources/maximize_dash.png diff --git a/plugins/unityshell/resources/maximize_dash_disabled.png b/resources/maximize_dash_disabled.png Binary files differindex 06eaf9b0b..06eaf9b0b 100644 --- a/plugins/unityshell/resources/maximize_dash_disabled.png +++ b/resources/maximize_dash_disabled.png diff --git a/plugins/unityshell/resources/maximize_dash_prelight.png b/resources/maximize_dash_prelight.png Binary files differindex 05d4d4653..05d4d4653 100644 --- a/plugins/unityshell/resources/maximize_dash_prelight.png +++ b/resources/maximize_dash_prelight.png diff --git a/plugins/unityshell/resources/maximize_dash_pressed.png b/resources/maximize_dash_pressed.png Binary files differindex a1b26e20d..a1b26e20d 100644 --- a/plugins/unityshell/resources/maximize_dash_pressed.png +++ b/resources/maximize_dash_pressed.png diff --git a/plugins/unityshell/resources/minimize_dash.png b/resources/minimize_dash.png Binary files differindex 05352beca..05352beca 100644 --- a/plugins/unityshell/resources/minimize_dash.png +++ b/resources/minimize_dash.png diff --git a/plugins/unityshell/resources/minimize_dash_disabled.png b/resources/minimize_dash_disabled.png Binary files differindex 05352beca..05352beca 100644 --- a/plugins/unityshell/resources/minimize_dash_disabled.png +++ b/resources/minimize_dash_disabled.png diff --git a/plugins/unityshell/resources/minimize_dash_prelight.png b/resources/minimize_dash_prelight.png Binary files differindex 05352beca..05352beca 100644 --- a/plugins/unityshell/resources/minimize_dash_prelight.png +++ b/resources/minimize_dash_prelight.png diff --git a/plugins/unityshell/resources/minimize_dash_pressed.png b/resources/minimize_dash_pressed.png Binary files differindex 05352beca..05352beca 100644 --- a/plugins/unityshell/resources/minimize_dash_pressed.png +++ b/resources/minimize_dash_pressed.png diff --git a/plugins/unityshell/resources/next.svg b/resources/next.svg index af3b59ac7..af3b59ac7 100644 --- a/plugins/unityshell/resources/next.svg +++ b/resources/next.svg diff --git a/plugins/unityshell/resources/panel-shadow.png b/resources/panel-shadow.png Binary files differindex 8b453716f..8b453716f 100644 --- a/plugins/unityshell/resources/panel-shadow.png +++ b/resources/panel-shadow.png diff --git a/plugins/unityshell/resources/pattern_overlay.png b/resources/pattern_overlay.png Binary files differindex a3cb82aa1..a3cb82aa1 100644 --- a/plugins/unityshell/resources/pattern_overlay.png +++ b/resources/pattern_overlay.png diff --git a/plugins/unityshell/resources/pause.svg b/resources/pause.svg index 359741912..359741912 100644 --- a/plugins/unityshell/resources/pause.svg +++ b/resources/pause.svg diff --git a/plugins/unityshell/resources/places-tile-bg-tilable.png b/resources/places-tile-bg-tilable.png Binary files differindex c0fde8dce..c0fde8dce 100644 --- a/plugins/unityshell/resources/places-tile-bg-tilable.png +++ b/resources/places-tile-bg-tilable.png diff --git a/plugins/unityshell/resources/play.svg b/resources/play.svg index 9e79d00e0..9e79d00e0 100644 --- a/plugins/unityshell/resources/play.svg +++ b/resources/play.svg diff --git a/plugins/unityshell/resources/prev.svg b/resources/prev.svg index 3a551d0b9..3a551d0b9 100644 --- a/plugins/unityshell/resources/prev.svg +++ b/resources/prev.svg diff --git a/plugins/unityshell/resources/preview_next.svg b/resources/preview_next.svg index 75565f866..75565f866 100644 --- a/plugins/unityshell/resources/preview_next.svg +++ b/resources/preview_next.svg diff --git a/plugins/unityshell/resources/preview_pause.svg b/resources/preview_pause.svg index dade7bb60..dade7bb60 100644 --- a/plugins/unityshell/resources/preview_pause.svg +++ b/resources/preview_pause.svg diff --git a/plugins/unityshell/resources/preview_play.svg b/resources/preview_play.svg index e1d61bf70..e1d61bf70 100644 --- a/plugins/unityshell/resources/preview_play.svg +++ b/resources/preview_play.svg diff --git a/plugins/unityshell/resources/preview_previous.svg b/resources/preview_previous.svg index 70cca99e0..70cca99e0 100644 --- a/plugins/unityshell/resources/preview_previous.svg +++ b/resources/preview_previous.svg diff --git a/plugins/unityshell/resources/progress_bar_fill.png b/resources/progress_bar_fill.png Binary files differindex f35aa9a36..f35aa9a36 100644 --- a/plugins/unityshell/resources/progress_bar_fill.png +++ b/resources/progress_bar_fill.png diff --git a/plugins/unityshell/resources/progress_bar_trough.png b/resources/progress_bar_trough.png Binary files differindex bcc258f2e..bcc258f2e 100644 --- a/plugins/unityshell/resources/progress_bar_trough.png +++ b/resources/progress_bar_trough.png diff --git a/plugins/unityshell/resources/refine_gradient.png b/resources/refine_gradient.png Binary files differindex 20620258d..20620258d 100644 --- a/plugins/unityshell/resources/refine_gradient.png +++ b/resources/refine_gradient.png diff --git a/plugins/unityshell/resources/refine_gradient_corner.png b/resources/refine_gradient_corner.png Binary files differindex a7ab65744..a7ab65744 100644 --- a/plugins/unityshell/resources/refine_gradient_corner.png +++ b/resources/refine_gradient_corner.png diff --git a/plugins/unityshell/resources/refine_gradient_dash.png b/resources/refine_gradient_dash.png Binary files differindex 26fe103c8..26fe103c8 100644 --- a/plugins/unityshell/resources/refine_gradient_dash.png +++ b/resources/refine_gradient_dash.png diff --git a/plugins/unityshell/resources/refine_gradient_dash_no_refine.png b/resources/refine_gradient_dash_no_refine.png Binary files differindex c8cb44728..c8cb44728 100644 --- a/plugins/unityshell/resources/refine_gradient_dash_no_refine.png +++ b/resources/refine_gradient_dash_no_refine.png diff --git a/plugins/unityshell/resources/refine_gradient_no_refine_dash.png b/resources/refine_gradient_no_refine_dash.png Binary files differindex 12ab5956e..12ab5956e 100644 --- a/plugins/unityshell/resources/refine_gradient_no_refine_dash.png +++ b/resources/refine_gradient_no_refine_dash.png diff --git a/plugins/unityshell/resources/refine_gradient_panel.png b/resources/refine_gradient_panel.png Binary files differindex d283f0977..d283f0977 100644 --- a/plugins/unityshell/resources/refine_gradient_panel.png +++ b/resources/refine_gradient_panel.png diff --git a/plugins/unityshell/resources/refine_gradient_panel_no_refine.png b/resources/refine_gradient_panel_no_refine.png Binary files differindex f50902e56..f50902e56 100644 --- a/plugins/unityshell/resources/refine_gradient_panel_no_refine.png +++ b/resources/refine_gradient_panel_no_refine.png diff --git a/plugins/unityshell/resources/refine_gradient_panel_single_column.png b/resources/refine_gradient_panel_single_column.png Binary files differindex 7ce0efa2f..7ce0efa2f 100644 --- a/plugins/unityshell/resources/refine_gradient_panel_single_column.png +++ b/resources/refine_gradient_panel_single_column.png diff --git a/plugins/unityshell/resources/round_corner_54x54.png b/resources/round_corner_54x54.png Binary files differindex f9c152506..f9c152506 100644 --- a/plugins/unityshell/resources/round_corner_54x54.png +++ b/resources/round_corner_54x54.png diff --git a/plugins/unityshell/resources/round_glow_62x62.png b/resources/round_glow_62x62.png Binary files differindex 08481dde0..08481dde0 100644 --- a/plugins/unityshell/resources/round_glow_62x62.png +++ b/resources/round_glow_62x62.png diff --git a/plugins/unityshell/resources/round_glow_hl_62x62.png b/resources/round_glow_hl_62x62.png Binary files differindex 99f40fa63..99f40fa63 100644 --- a/plugins/unityshell/resources/round_glow_hl_62x62.png +++ b/resources/round_glow_hl_62x62.png diff --git a/plugins/unityshell/resources/round_outline_54x54.png b/resources/round_outline_54x54.png Binary files differindex 93e82838c..93e82838c 100644 --- a/plugins/unityshell/resources/round_outline_54x54.png +++ b/resources/round_outline_54x54.png diff --git a/plugins/unityshell/resources/round_shine_54x54.png b/resources/round_shine_54x54.png Binary files differindex cfb1cd86e..cfb1cd86e 100644 --- a/plugins/unityshell/resources/round_shine_54x54.png +++ b/resources/round_shine_54x54.png diff --git a/plugins/unityshell/resources/search_circle.svg b/resources/search_circle.svg index 59be86e3a..59be86e3a 100644 --- a/plugins/unityshell/resources/search_circle.svg +++ b/resources/search_circle.svg diff --git a/plugins/unityshell/resources/search_close.png b/resources/search_close.png Binary files differindex 383e44e4e..383e44e4e 100644 --- a/plugins/unityshell/resources/search_close.png +++ b/resources/search_close.png diff --git a/plugins/unityshell/resources/search_close.svg b/resources/search_close.svg index 7eae838a7..7eae838a7 100644 --- a/plugins/unityshell/resources/search_close.svg +++ b/resources/search_close.svg diff --git a/plugins/unityshell/resources/search_magnify.png b/resources/search_magnify.png Binary files differindex 19908e11e..19908e11e 100644 --- a/plugins/unityshell/resources/search_magnify.png +++ b/resources/search_magnify.png diff --git a/plugins/unityshell/resources/search_spin.png b/resources/search_spin.png Binary files differindex 56ebb9c39..56ebb9c39 100644 --- a/plugins/unityshell/resources/search_spin.png +++ b/resources/search_spin.png diff --git a/plugins/unityshell/resources/search_spin.svg b/resources/search_spin.svg index d63ded09c..d63ded09c 100644 --- a/plugins/unityshell/resources/search_spin.svg +++ b/resources/search_spin.svg diff --git a/plugins/unityshell/resources/shortcuts_group_icon.png b/resources/shortcuts_group_icon.png Binary files differindex a13b05bf5..a13b05bf5 100644 --- a/plugins/unityshell/resources/shortcuts_group_icon.png +++ b/resources/shortcuts_group_icon.png diff --git a/plugins/unityshell/resources/squircle_base_54.png b/resources/squircle_base_54.png Binary files differindex dacfb7d2e..dacfb7d2e 100644 --- a/plugins/unityshell/resources/squircle_base_54.png +++ b/resources/squircle_base_54.png diff --git a/plugins/unityshell/resources/squircle_base_selected_54.png b/resources/squircle_base_selected_54.png Binary files differindex 405c218a4..405c218a4 100644 --- a/plugins/unityshell/resources/squircle_base_selected_54.png +++ b/resources/squircle_base_selected_54.png diff --git a/plugins/unityshell/resources/squircle_edge_54.png b/resources/squircle_edge_54.png Binary files differindex f0e54a544..f0e54a544 100644 --- a/plugins/unityshell/resources/squircle_edge_54.png +++ b/resources/squircle_edge_54.png diff --git a/plugins/unityshell/resources/squircle_glow_62.png b/resources/squircle_glow_62.png Binary files differindex 87411ed95..87411ed95 100644 --- a/plugins/unityshell/resources/squircle_glow_62.png +++ b/resources/squircle_glow_62.png diff --git a/plugins/unityshell/resources/squircle_shadow_62.png b/resources/squircle_shadow_62.png Binary files differindex 70713debf..70713debf 100644 --- a/plugins/unityshell/resources/squircle_shadow_62.png +++ b/resources/squircle_shadow_62.png diff --git a/plugins/unityshell/resources/squircle_shine_54.png b/resources/squircle_shine_54.png Binary files differindex 2b2f1a574..2b2f1a574 100644 --- a/plugins/unityshell/resources/squircle_shine_54.png +++ b/resources/squircle_shine_54.png diff --git a/plugins/unityshell/resources/star-outline.svg b/resources/star-outline.svg index f24db1489..f24db1489 100644 --- a/plugins/unityshell/resources/star-outline.svg +++ b/resources/star-outline.svg diff --git a/plugins/unityshell/resources/star_deselected.png b/resources/star_deselected.png Binary files differindex fb3ca3674..fb3ca3674 100644 --- a/plugins/unityshell/resources/star_deselected.png +++ b/resources/star_deselected.png diff --git a/plugins/unityshell/resources/star_highlight.png b/resources/star_highlight.png Binary files differindex 3319d1520..3319d1520 100644 --- a/plugins/unityshell/resources/star_highlight.png +++ b/resources/star_highlight.png diff --git a/plugins/unityshell/resources/star_selected.png b/resources/star_selected.png Binary files differindex 27be91284..27be91284 100644 --- a/plugins/unityshell/resources/star_selected.png +++ b/resources/star_selected.png diff --git a/plugins/unityshell/resources/switcher_background.png b/resources/switcher_background.png Binary files differindex 1e3c07537..1e3c07537 100644 --- a/plugins/unityshell/resources/switcher_background.png +++ b/resources/switcher_background.png diff --git a/plugins/unityshell/resources/switcher_corner.png b/resources/switcher_corner.png Binary files differindex dca840a5f..dca840a5f 100644 --- a/plugins/unityshell/resources/switcher_corner.png +++ b/resources/switcher_corner.png diff --git a/plugins/unityshell/resources/switcher_left.png b/resources/switcher_left.png Binary files differindex 658aea80d..658aea80d 100644 --- a/plugins/unityshell/resources/switcher_left.png +++ b/resources/switcher_left.png diff --git a/plugins/unityshell/resources/switcher_top.png b/resources/switcher_top.png Binary files differindex 417d98839..417d98839 100644 --- a/plugins/unityshell/resources/switcher_top.png +++ b/resources/switcher_top.png diff --git a/plugins/unityshell/resources/unmaximize_dash.png b/resources/unmaximize_dash.png Binary files differindex 9cd411bea..9cd411bea 100644 --- a/plugins/unityshell/resources/unmaximize_dash.png +++ b/resources/unmaximize_dash.png diff --git a/plugins/unityshell/resources/unmaximize_dash_disabled.png b/resources/unmaximize_dash_disabled.png Binary files differindex 06eaf9b0b..06eaf9b0b 100644 --- a/plugins/unityshell/resources/unmaximize_dash_disabled.png +++ b/resources/unmaximize_dash_disabled.png diff --git a/plugins/unityshell/resources/unmaximize_dash_prelight.png b/resources/unmaximize_dash_prelight.png Binary files differindex 2b836fd14..2b836fd14 100644 --- a/plugins/unityshell/resources/unmaximize_dash_prelight.png +++ b/resources/unmaximize_dash_prelight.png diff --git a/plugins/unityshell/resources/unmaximize_dash_pressed.png b/resources/unmaximize_dash_pressed.png Binary files differindex ad305cb04..ad305cb04 100644 --- a/plugins/unityshell/resources/unmaximize_dash_pressed.png +++ b/resources/unmaximize_dash_pressed.png diff --git a/plugins/unityshell/resources/video_missing.png b/resources/video_missing.png Binary files differindex 0de4797e9..0de4797e9 100644 --- a/plugins/unityshell/resources/video_missing.png +++ b/resources/video_missing.png diff --git a/services/CMakeLists.txt b/services/CMakeLists.txt index 2da54dce0..26b080975 100644 --- a/services/CMakeLists.txt +++ b/services/CMakeLists.txt @@ -35,7 +35,6 @@ add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/panel-marshal.c set(CFLAGS "${SERVICE_DEPS_CFLAGS}" ${SERVICE_DEPS_CFLAGS_OTHER} - ${MAINTAINER_CFLAGS} "-I${CMAKE_CURRENT_BINARY_DIR}" "-DGETTEXT_PACKAGE=\"unity\"" "-DINDICATORDIR=\"${_indicatordir}\"" diff --git a/shortcuts/CMakeLists.txt b/shortcuts/CMakeLists.txt index 80f520c90..e28b19da8 100644 --- a/shortcuts/CMakeLists.txt +++ b/shortcuts/CMakeLists.txt @@ -5,7 +5,6 @@ find_package (PkgConfig) set (CFLAGS ${CACHED_UNITY_DEPS_CFLAGS} ${CACHED_UNITY_DEPS_CFLAGS_OTHER} - ${MAINTAINER_CFLAGS} "-DGETTEXT_PACKAGE=\"unity\"" "-I${CMAKE_CURRENT_BINARY_DIR}" ) diff --git a/shortcuts/ShortcutHint.cpp b/shortcuts/ShortcutHint.cpp index a0105f562..af2415932 100644 --- a/shortcuts/ShortcutHint.cpp +++ b/shortcuts/ShortcutHint.cpp @@ -24,14 +24,12 @@ #include "ShortcutHintPrivate.h" +DECLARE_LOGGER(logger, "unity.shortcut"); + namespace unity { namespace shortcut { -namespace -{ - nux::logging::Logger logger("unity.shortcut"); -} // anonymouse namespace // Ctor Hint::Hint(std::string const& category, diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 88a08b089..e5c69a84e 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -25,7 +25,6 @@ set (TESTDATADIR "${CMAKE_CURRENT_SOURCE_DIR}/data") set (CFLAGS ${TEST_UNIT_DEPS_CFLAGS} ${TEST_UNIT_DEPS_CFLAGS_OTHER} - ${MAINTAINER_CFLAGS} "-g" "-DTESTDATADIR=\"${TESTDATADIR}\"" "-DGETTEXT_PACKAGE=\"unity\"" @@ -64,9 +63,6 @@ add_executable (test-unit unit/TestMain.cpp unit/TestPanelService.cpp unit/TestStaticCairoText.cpp - ${CMAKE_SOURCE_DIR}/launcher/CairoBaseWindow.cpp - ${CMAKE_SOURCE_DIR}/unity-shared/Introspectable.cpp - ${CMAKE_SOURCE_DIR}/unity-shared/StaticCairoText.cpp ../services/panel-service.c ${CMAKE_CURRENT_BINARY_DIR}/panel-marshal.c ) @@ -150,37 +146,17 @@ if (GTEST_SRC_DIR AND test_ubus.cpp test_unityshell_private.cpp ${CMAKE_CURRENT_BINARY_DIR}/test_glib_signals_utils_marshal.cpp - ${CMAKE_SOURCE_DIR}/launcher/AbstractLauncherIcon.cpp - ${CMAKE_SOURCE_DIR}/unity-shared/Animator.cpp ${UNITY_SRC}/DebugDBusInterface.cpp ${UNITY_SRC}/XPathQueryPart.cpp - ${CMAKE_SOURCE_DIR}/launcher/FavoriteStore.cpp - ${CMAKE_SOURCE_DIR}/launcher/FavoriteStoreGSettings.cpp - ${CMAKE_SOURCE_DIR}/unity-shared/IconTextureSource.cpp - ${CMAKE_SOURCE_DIR}/launcher/LauncherModel.cpp - ${CMAKE_SOURCE_DIR}/launcher/LauncherEntryRemote.cpp - ${CMAKE_SOURCE_DIR}/launcher/MockLauncherIcon.cpp - ${CMAKE_SOURCE_DIR}/launcher/FavoriteStorePrivate.cpp - ${CMAKE_SOURCE_DIR}/launcher/PointerBarrier.cpp - ${CMAKE_SOURCE_DIR}/shortcuts/ShortcutModel.cpp - ${CMAKE_SOURCE_DIR}/shortcuts/ShortcutHintPrivate.cpp - ${CMAKE_SOURCE_DIR}/unity-shared/Introspectable.cpp - ${CMAKE_SOURCE_DIR}/unity-shared/TextureCache.cpp - ${CMAKE_SOURCE_DIR}/unity-shared/Timer.cpp - ${CMAKE_SOURCE_DIR}/unity-shared/UBusServer.cpp - ${CMAKE_SOURCE_DIR}/unity-shared/UBusWrapper.cpp ${UNITY_SRC}/UnityshellPrivate.cpp - ${CMAKE_SOURCE_DIR}/unity-shared/WindowManager.cpp - ${CMAKE_SOURCE_DIR}/unity-shared/StandaloneWindowManager.cpp ${UNITY_SRC}/UnityShowdesktopHandler.cpp ${CMAKE_SOURCE_DIR}/plugins/unity-mt-grab-handles/src/unity-mt-grab-handle.cpp ${CMAKE_SOURCE_DIR}/plugins/unity-mt-grab-handles/src/unity-mt-grab-handle-group.cpp ${CMAKE_SOURCE_DIR}/plugins/unity-mt-grab-handles/src/unity-mt-grab-handle-impl-factory.cpp ${CMAKE_SOURCE_DIR}/plugins/unity-mt-grab-handles/src/unity-mt-grab-handle-layout.cpp ${CMAKE_SOURCE_DIR}/plugins/unity-mt-grab-handles/src/unity-mt-texture.cpp - ${CMAKE_SOURCE_DIR}/hud/HudPrivate.cpp ) - target_link_libraries(test-gtest-xless gtest unity-shared ${GMOCK_LIB} ${GMOCK_MAIN_LIB} ${LIBS}) + target_link_libraries(test-gtest-xless gtest unity-shared ${GMOCK_LIB} ${GMOCK_MAIN_LIB} ${LIBS} launcher-lib shortcuts-lib hud-lib) add_test(UnityGTestXless test-gtest-xless) add_dependencies(test-gtest-xless unity-core-${UNITY_API_VERSION} gtest) @@ -224,6 +200,7 @@ if (GTEST_SRC_DIR AND test_launcher_icon.cpp test_keyboard_util.cpp test_panel_style.cpp + test_panel_menu_view.cpp test_places_group.cpp test_previews_application.cpp test_previews_generic.cpp @@ -248,128 +225,9 @@ if (GTEST_SRC_DIR AND bamf-mock-application.c gmockmount.c gmockvolume.c - ${CMAKE_SOURCE_DIR}/dash/DashViewPrivate.cpp - ${CMAKE_SOURCE_DIR}/dash/ResultRenderer.cpp - ${CMAKE_SOURCE_DIR}/dash/PlacesGroup.cpp - ${CMAKE_SOURCE_DIR}/dash/ResultRenderer.cpp - ${CMAKE_SOURCE_DIR}/dash/ResultRendererHorizontalTile.cpp - ${CMAKE_SOURCE_DIR}/dash/ResultRendererTile.cpp - ${CMAKE_SOURCE_DIR}/dash/ResultView.cpp - ${CMAKE_SOURCE_DIR}/dash/ResultViewGrid.cpp - ${CMAKE_SOURCE_DIR}/dash/previews/ActionButton.cpp - ${CMAKE_SOURCE_DIR}/dash/previews/ApplicationPreview.cpp - ${CMAKE_SOURCE_DIR}/dash/previews/GenericPreview.cpp - ${CMAKE_SOURCE_DIR}/dash/previews/MoviePreview.cpp - ${CMAKE_SOURCE_DIR}/dash/previews/MusicPreview.cpp - ${CMAKE_SOURCE_DIR}/dash/previews/Preview.cpp - ${CMAKE_SOURCE_DIR}/dash/previews/PreviewInfoHintWidget.cpp - ${CMAKE_SOURCE_DIR}/dash/previews/PreviewRatingsWidget.cpp - ${CMAKE_SOURCE_DIR}/dash/previews/SocialPreview.cpp - ${CMAKE_SOURCE_DIR}/dash/previews/SocialPreviewContent.cpp - ${CMAKE_SOURCE_DIR}/dash/previews/SocialPreviewComments.cpp - ${CMAKE_SOURCE_DIR}/dash/previews/Tracks.cpp - ${CMAKE_SOURCE_DIR}/dash/previews/Track.cpp - ${CMAKE_SOURCE_DIR}/hud/HudAbstractView.cpp - ${CMAKE_SOURCE_DIR}/hud/HudButton.cpp - ${CMAKE_SOURCE_DIR}/hud/HudController.cpp - ${CMAKE_SOURCE_DIR}/hud/HudIcon.cpp - ${CMAKE_SOURCE_DIR}/hud/HudIconTextureSource.cpp - ${CMAKE_SOURCE_DIR}/hud/HudPrivate.cpp - ${CMAKE_SOURCE_DIR}/hud/HudView.cpp - ${CMAKE_SOURCE_DIR}/launcher/AbstractLauncherIcon.cpp - ${CMAKE_SOURCE_DIR}/launcher/ApplicationLauncherIcon.cpp - ${CMAKE_SOURCE_DIR}/launcher/BFBLauncherIcon.cpp - ${CMAKE_SOURCE_DIR}/launcher/CairoBaseWindow.cpp - ${CMAKE_SOURCE_DIR}/launcher/DNDCollectionWindow.cpp - ${CMAKE_SOURCE_DIR}/launcher/Decaymulator.cpp - ${CMAKE_SOURCE_DIR}/launcher/DesktopLauncherIcon.cpp - ${CMAKE_SOURCE_DIR}/launcher/DeviceLauncherSection.cpp - ${CMAKE_SOURCE_DIR}/launcher/DeviceNotificationDisplayImp.cpp - ${CMAKE_SOURCE_DIR}/launcher/DevicesSettingsImp.cpp - ${CMAKE_SOURCE_DIR}/launcher/DndData.cpp - ${CMAKE_SOURCE_DIR}/launcher/EdgeBarrierController.cpp - ${CMAKE_SOURCE_DIR}/launcher/ExpoLauncherIcon.cpp - ${CMAKE_SOURCE_DIR}/launcher/FavoriteStore.cpp - ${CMAKE_SOURCE_DIR}/launcher/FavoriteStoreGSettings.cpp - ${CMAKE_SOURCE_DIR}/launcher/FavoriteStorePrivate.cpp - ${CMAKE_SOURCE_DIR}/launcher/FileManagerOpenerImp.cpp - ${CMAKE_SOURCE_DIR}/launcher/HudLauncherIcon.cpp - ${CMAKE_SOURCE_DIR}/launcher/Launcher.cpp - ${CMAKE_SOURCE_DIR}/launcher/LauncherController.cpp - ${CMAKE_SOURCE_DIR}/launcher/LauncherDragWindow.cpp - ${CMAKE_SOURCE_DIR}/launcher/LauncherEntryRemote.cpp - ${CMAKE_SOURCE_DIR}/launcher/LauncherEntryRemoteModel.cpp - ${CMAKE_SOURCE_DIR}/launcher/LauncherHideMachine.cpp - ${CMAKE_SOURCE_DIR}/launcher/LauncherHoverMachine.cpp - ${CMAKE_SOURCE_DIR}/launcher/LauncherIcon.cpp - ${CMAKE_SOURCE_DIR}/launcher/LauncherModel.cpp - ${CMAKE_SOURCE_DIR}/launcher/LauncherOptions.cpp - ${CMAKE_SOURCE_DIR}/launcher/LayoutSystem.cpp - ${CMAKE_SOURCE_DIR}/launcher/MockLauncherIcon.cpp - ${CMAKE_SOURCE_DIR}/launcher/PointerBarrier.cpp - ${CMAKE_SOURCE_DIR}/launcher/QuicklistManager.cpp - ${CMAKE_SOURCE_DIR}/launcher/QuicklistMenuItem.cpp - ${CMAKE_SOURCE_DIR}/launcher/QuicklistMenuItemCheckmark.cpp - ${CMAKE_SOURCE_DIR}/launcher/QuicklistMenuItemLabel.cpp - ${CMAKE_SOURCE_DIR}/launcher/QuicklistMenuItemRadio.cpp - ${CMAKE_SOURCE_DIR}/launcher/QuicklistMenuItemSeparator.cpp - ${CMAKE_SOURCE_DIR}/launcher/QuicklistView.cpp - ${CMAKE_SOURCE_DIR}/launcher/SimpleLauncherIcon.cpp - ${CMAKE_SOURCE_DIR}/launcher/SingleMonitorLauncherIcon.cpp - ${CMAKE_SOURCE_DIR}/launcher/SoftwareCenterLauncherIcon.cpp - ${CMAKE_SOURCE_DIR}/launcher/SpacerLauncherIcon.cpp - ${CMAKE_SOURCE_DIR}/launcher/SwitcherController.cpp - ${CMAKE_SOURCE_DIR}/launcher/SwitcherModel.cpp - ${CMAKE_SOURCE_DIR}/launcher/SwitcherView.cpp - ${CMAKE_SOURCE_DIR}/launcher/Tooltip.cpp - ${CMAKE_SOURCE_DIR}/launcher/TrashLauncherIcon.cpp - ${CMAKE_SOURCE_DIR}/launcher/VolumeImp.cpp - ${CMAKE_SOURCE_DIR}/launcher/VolumeLauncherIcon.cpp - ${CMAKE_SOURCE_DIR}/launcher/VolumeMonitorWrapper.cpp - ${CMAKE_SOURCE_DIR}/shortcuts/ShortcutController.cpp - ${CMAKE_SOURCE_DIR}/shortcuts/ShortcutModel.cpp - #${CMAKE_SOURCE_DIR}/shortcuts/ShortcutHintPrivate.cpp - ${CMAKE_SOURCE_DIR}/shortcuts/ShortcutView.cpp - ${CMAKE_SOURCE_DIR}/unity-shared/AbstractSeparator.cpp - ${CMAKE_SOURCE_DIR}/unity-shared/Animator.cpp - ${CMAKE_SOURCE_DIR}/unity-shared/BackgroundEffectHelper.cpp - ${CMAKE_SOURCE_DIR}/unity-shared/CoverArt.cpp - ${CMAKE_SOURCE_DIR}/unity-shared/DashStyle.cpp - ${CMAKE_SOURCE_DIR}/unity-shared/DefaultThumbnailProvider.cpp - ${CMAKE_SOURCE_DIR}/unity-shared/IconLoader.cpp - ${CMAKE_SOURCE_DIR}/unity-shared/IconRenderer.cpp - ${CMAKE_SOURCE_DIR}/unity-shared/IconTexture.cpp - ${CMAKE_SOURCE_DIR}/unity-shared/IconTextureSource.cpp - ${CMAKE_SOURCE_DIR}/unity-shared/IMTextEntry.cpp - ${CMAKE_SOURCE_DIR}/unity-shared/Introspectable.cpp - ${CMAKE_SOURCE_DIR}/unity-shared/IntrospectableWrappers.cpp - ${CMAKE_SOURCE_DIR}/unity-shared/LineSeparator.cpp - ${CMAKE_SOURCE_DIR}/unity-shared/JSONParser.cpp - ${CMAKE_SOURCE_DIR}/unity-shared/OverlayRenderer.cpp - ${CMAKE_SOURCE_DIR}/unity-shared/PanelStyle.cpp - ${CMAKE_SOURCE_DIR}/unity-shared/PlacesVScrollBar.cpp - ${CMAKE_SOURCE_DIR}/unity-shared/PreviewStyle.cpp - ${CMAKE_SOURCE_DIR}/unity-shared/RatingsButton.cpp - ${CMAKE_SOURCE_DIR}/unity-shared/SearchBar.cpp - ${CMAKE_SOURCE_DIR}/unity-shared/SearchBarSpinner.cpp - ${CMAKE_SOURCE_DIR}/unity-shared/StandaloneWindowManager.cpp - ${CMAKE_SOURCE_DIR}/unity-shared/StaticCairoText.cpp - ${CMAKE_SOURCE_DIR}/unity-shared/TextureCache.cpp - ${CMAKE_SOURCE_DIR}/unity-shared/Timer.cpp - ${CMAKE_SOURCE_DIR}/unity-shared/TextureThumbnailProvider.cpp - ${CMAKE_SOURCE_DIR}/unity-shared/ThumbnailGenerator.cpp - ${CMAKE_SOURCE_DIR}/unity-shared/UBusServer.cpp - ${CMAKE_SOURCE_DIR}/unity-shared/UBusWrapper.cpp - ${CMAKE_SOURCE_DIR}/unity-shared/UScreen.cpp - ${CMAKE_SOURCE_DIR}/unity-shared/UnitySettings.cpp - ${CMAKE_SOURCE_DIR}/unity-shared/UnityWindowStyle.cpp - ${CMAKE_SOURCE_DIR}/unity-shared/UnityWindowView.cpp - ${CMAKE_SOURCE_DIR}/unity-shared/UserThumbnailProvider.cpp - ${CMAKE_SOURCE_DIR}/unity-shared/WindowManager.cpp - ${CMAKE_SOURCE_DIR}/unity-shared/XKeyboardUtil.cpp ${CMAKE_SOURCE_DIR}/plugins/unityshell/src/WindowMinimizeSpeedController.cpp ) - target_link_libraries(test-gtest gtest gmock unity-shared ${LIBS}) + target_link_libraries(test-gtest gtest gmock unity-shared ${LIBS} launcher-lib unity-shared-standalone shortcuts-lib previews-lib hud-lib switcher-lib dash-lib panel-lib) add_test(UnityGTest test-gtest) add_dependencies(test-gtest unity-core-${UNITY_API_VERSION} gtest gmock) diff --git a/tests/autopilot/unity/tests/__init__.py b/tests/autopilot/unity/tests/__init__.py index 5b4ba983f..e882cff94 100644 --- a/tests/autopilot/unity/tests/__init__.py +++ b/tests/autopilot/unity/tests/__init__.py @@ -117,6 +117,11 @@ class UnityTestCase(AutopilotTestCase): reasons.append("The test left the launcher in switcher mode.") log.warning("Test left the launcher in switcher mode, exiting it...") launcher.switcher_cancel() + if not self.well_behaved(launcher, quicklist_open=False): + well_behaved = False + reasons.append("The test left a quicklist open.") + log.warning("The test left a quicklist open.") + self.keyboard.press_and_release('Escape') if not well_behaved: self.fail("/n".join(reasons)) diff --git a/tests/autopilot/unity/tests/test_switcher.py b/tests/autopilot/unity/tests/test_switcher.py index 345b6ef5c..7a94b7511 100644 --- a/tests/autopilot/unity/tests/test_switcher.py +++ b/tests/autopilot/unity/tests/test_switcher.py @@ -246,6 +246,31 @@ class SwitcherWindowsManagementTests(SwitcherTestCase): self.assertProperty(calc_win, is_focused=True) self.assertVisibleWindowStack([calc_win, char_win1]) + def test_switcher_rises_next_window_of_same_application(self): + """Tests if alt+tab invoked normally switches to the next application + window of the same type. + + """ + char_win1, char_win2 = self.start_applications("Character Map", "Character Map") + self.assertVisibleWindowStack([char_win2, char_win1]) + + self.keybinding("switcher/reveal_normal") + self.assertProperty(char_win1, is_focused=True) + + def test_switcher_rises_other_application(self): + """Tests if alt+tab invoked normally switches correctly to the other + application window when the last focused application had 2 windows + + """ + char_win1, char_win2, calc_win = self.start_applications("Character Map", "Character Map", "Calculator") + self.assertVisibleWindowStack([calc_win, char_win2, char_win1]) + + self.keybinding("switcher/reveal_normal") + self.assertProperty(char_win2, is_focused=True) + + self.keybinding("switcher/reveal_normal") + self.assertProperty(calc_win, is_focused=True) + class SwitcherDetailsTests(SwitcherTestCase): """Test the details mode for the switcher.""" diff --git a/tests/test_launcher_controller.cpp b/tests/test_launcher_controller.cpp index 2ea6d431c..22d197b2d 100644 --- a/tests/test_launcher_controller.cpp +++ b/tests/test_launcher_controller.cpp @@ -32,6 +32,7 @@ #include "SoftwareCenterLauncherIcon.h" #include "PanelStyle.h" #include "UnitySettings.h" +#include "UBusMessages.h" #include "test_utils.h" #include "test_uscreen_mock.h" #include "test_mock_devices.h" @@ -204,6 +205,14 @@ struct TestLauncherController : public testing::Test lc.multiple_launchers = true; } + void ProcessUBusMessages() + { + bool expired = false; + glib::Idle idle([&] { expired = true; return false; }, + glib::Source::Priority::LOW); + Utils::WaitUntil(expired); + } + protected: struct MockLauncherController : Controller { @@ -371,6 +380,8 @@ TEST_F(TestLauncherController, SingleMonitorSwitchToMultimonitor) EXPECT_EQ(lc.launchers().size(), max_num_monitors); } +#ifdef UNITY_HAS_X_ORG_SUPPORT + TEST_F(TestLauncherController, MultiMonitorEdgeBarrierSubscriptions) { uscreen.SetupFakeMultiMonitor(); @@ -402,6 +413,8 @@ TEST_F(TestLauncherController, SingleMonitorEdgeBarrierSubscriptionsUpdates) } } +#endif + TEST_F(TestLauncherController, OnlyUnstickIconOnFavoriteRemoval) { const std::string desktop = app::BZR_HANDLE_PATCH; @@ -1499,4 +1512,24 @@ TEST_F(TestLauncherController, UpdateNumWorkspacesEnable) EXPECT_TRUE(lc.Impl()->expo_icon_->IsVisible()); } +TEST_F(TestLauncherController, UpdateSelectionChanged) +{ + UBusManager manager; + std::string last_selection_change; + manager.RegisterInterest(UBUS_LAUNCHER_SELECTION_CHANGED, [&] (GVariant *data) { last_selection_change = g_variant_get_string(data, 0); }); + + lc.KeyNavGrab(); + ProcessUBusMessages(); + ASSERT_EQ(lc.Impl()->model_->Selection()->tooltip_text(), last_selection_change); + + lc.KeyNavNext(); + ProcessUBusMessages(); + ASSERT_EQ(lc.Impl()->model_->Selection()->tooltip_text(), last_selection_change); + + lc.Impl()->OpenQuicklist(); + lc.Impl()->model_->Selection()->CloseQuicklist(); + ProcessUBusMessages(); + ASSERT_EQ(lc.Impl()->model_->Selection()->tooltip_text(), last_selection_change); +} + } diff --git a/tests/test_panel_menu_view.cpp b/tests/test_panel_menu_view.cpp new file mode 100644 index 000000000..2a44e0ac8 --- /dev/null +++ b/tests/test_panel_menu_view.cpp @@ -0,0 +1,96 @@ +/* + * Copyright 2012 Canonical Ltd. + * + * This program is free software: you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 3, as published + * by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranties of + * MERCHANTABILITY, SATISFACTORY QUALITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * version 3 along with this program. If not, see + * <http://www.gnu.org/licenses/> + * + */ + +#include <gmock/gmock.h> + +#include <Nux/Nux.h> +#include "PanelMenuView.h" +#include "PanelStyle.h" +#include "UnitySettings.h" +#include "UBusMessages.h" +#include "StandaloneWindowManager.h" +#include "test_utils.h" + +using namespace testing; + +namespace unity +{ + +class MockPanelMenuView : public PanelMenuView +{ + protected: + virtual std::string GetActiveViewName(bool use_appname) const + { + return "<>'"; + } +}; + +struct TestPanelMenuView : public testing::Test +{ + virtual void SetUp() + { + } + + void ProcessUBusMessages() + { + bool expired = false; + glib::Idle idle([&] { expired = true; return false; }, + glib::Source::Priority::LOW); + Utils::WaitUntil(expired); + } + + std::string panelTitle() const + { + const PanelMenuView *panel = &panelMenuView; + return panel->GetCurrentTitle(); + } + +private: + // The order is important, i.e. PanelMenuView needs + // panel::Style that needs Settings + Settings settings; + panel::Style panelStyle; + MockPanelMenuView panelMenuView; +}; + +TEST_F(TestPanelMenuView, Escaping) +{ + static const char *escapedText = "Panel d&Inici"; + EXPECT_TRUE(panelTitle().empty()); + + UBusManager ubus; + ubus.SendMessage(UBUS_LAUNCHER_START_KEY_NAV, NULL); + ubus.SendMessage(UBUS_LAUNCHER_SELECTION_CHANGED, + g_variant_new_string(escapedText)); + ProcessUBusMessages(); + + EXPECT_EQ(panelTitle(), escapedText); + + ubus.SendMessage(UBUS_LAUNCHER_END_KEY_NAV, NULL); + ProcessUBusMessages(); + + StandaloneWindowManager *wm = dynamic_cast<StandaloneWindowManager *>(&WindowManager::Default()); + ASSERT_NE(wm, nullptr); + // Change the wm to trick PanelMenuView::RefreshTitle to call GetActiveViewName + wm->SetScaleActive(true); + wm->SetScaleActiveForGroup(true); + + EXPECT_EQ(panelTitle(), "<>'"); +} + +} diff --git a/tests/test_places_group.cpp b/tests/test_places_group.cpp index f70617b1f..30c751783 100644 --- a/tests/test_places_group.cpp +++ b/tests/test_places_group.cpp @@ -35,7 +35,7 @@ class MockDashStyle : public dash::StyleInterface public: MockDashStyle() { - std::string full_path = PKGDATADIR "album_missing.png"; + std::string full_path = PKGDATADIR "/album_missing.png"; glib::Object<GdkPixbuf> pixbuf(gdk_pixbuf_new_from_file_at_size(full_path.c_str(), 20, 20, nullptr)); base_texture_.Adopt(nux::CreateTexture2DFromPixbuf(pixbuf, true)); } diff --git a/tests/test_quicklist_view.cpp b/tests/test_quicklist_view.cpp index 908cb50bc..690a9a262 100644 --- a/tests/test_quicklist_view.cpp +++ b/tests/test_quicklist_view.cpp @@ -26,6 +26,7 @@ #include "QuicklistMenuItemLabel.h" #include "QuicklistMenuItemRadio.h" #include "QuicklistMenuItemSeparator.h" +#include "unity-shared/UnitySettings.h" using namespace unity; using namespace testing; @@ -75,6 +76,7 @@ struct TestQuicklistView : public Test } } + unity::Settings unity_settings; nux::ObjectPtr<QuicklistView> quicklist; }; diff --git a/tests/test_shortcut_controller.cpp b/tests/test_shortcut_controller.cpp index cec1ad745..56ca4f6d9 100644 --- a/tests/test_shortcut_controller.cpp +++ b/tests/test_shortcut_controller.cpp @@ -22,6 +22,7 @@ using namespace testing; #include "shortcuts/BaseWindowRaiser.h" #include "shortcuts/ShortcutController.h" +#include "unity-shared/UnitySettings.h" using namespace unity; #include "test_utils.h" @@ -45,6 +46,7 @@ public: , controller_(hints_, base_window_raiser_) {} + Settings unity_settings; std::list<shortcut::AbstractHint::Ptr> hints_; MockBaseWindowRaiser::Ptr base_window_raiser_; shortcut::Controller controller_; diff --git a/tests/test_volume_launcher_icon.cpp b/tests/test_volume_launcher_icon.cpp index 46905144b..3cf96d50a 100644 --- a/tests/test_volume_launcher_icon.cpp +++ b/tests/test_volume_launcher_icon.cpp @@ -236,7 +236,7 @@ TEST_F(TestVolumeLauncherIcon, TestUnlockFromLauncherMenuItem_Success) { CreateIcon(); - auto menuitem = GetMenuItemAtIndex(0); + auto menuitem = GetMenuItemAtIndex(4); ASSERT_STREQ(dbusmenu_menuitem_property_get(menuitem, DBUSMENU_MENUITEM_PROP_LABEL), "Unlock from Launcher"); EXPECT_TRUE(dbusmenu_menuitem_property_get_bool(menuitem, DBUSMENU_MENUITEM_PROP_VISIBLE)); @@ -258,7 +258,7 @@ TEST_F(TestVolumeLauncherIcon, TestUnlockFromLauncherMenuItem_Failure) { CreateIcon(); - auto menuitem = GetMenuItemAtIndex(0); + auto menuitem = GetMenuItemAtIndex(4); ASSERT_STREQ(dbusmenu_menuitem_property_get(menuitem, DBUSMENU_MENUITEM_PROP_LABEL), "Unlock from Launcher"); EXPECT_TRUE(dbusmenu_menuitem_property_get_bool(menuitem, DBUSMENU_MENUITEM_PROP_VISIBLE)); @@ -276,7 +276,7 @@ TEST_F(TestVolumeLauncherIcon, TestOpenMenuItem) { CreateIcon(); - auto menuitem = GetMenuItemAtIndex(1); + auto menuitem = GetMenuItemAtIndex(0); ASSERT_STREQ(dbusmenu_menuitem_property_get(menuitem, DBUSMENU_MENUITEM_PROP_LABEL), "Open"); EXPECT_TRUE(dbusmenu_menuitem_property_get_bool(menuitem, DBUSMENU_MENUITEM_PROP_VISIBLE)); @@ -288,6 +288,23 @@ TEST_F(TestVolumeLauncherIcon, TestOpenMenuItem) dbusmenu_menuitem_handle_event(menuitem, DBUSMENU_MENUITEM_EVENT_ACTIVATED, nullptr, 0); } +TEST_F(TestVolumeLauncherIcon, TestNameMenuItem) +{ + CreateIcon(); + + auto menuitem = GetMenuItemAtIndex(2); + + EXPECT_EQ(dbusmenu_menuitem_property_get(menuitem, DBUSMENU_MENUITEM_PROP_LABEL), "<b>" + volume_->GetName() + "</b>"); + EXPECT_TRUE(dbusmenu_menuitem_property_get_bool(menuitem, DBUSMENU_MENUITEM_PROP_VISIBLE)); + EXPECT_TRUE(dbusmenu_menuitem_property_get_bool(menuitem, DBUSMENU_MENUITEM_PROP_ENABLED)); + EXPECT_TRUE(dbusmenu_menuitem_property_get_bool(menuitem, QuicklistMenuItem::MARKUP_ENABLED_PROPERTY)); + + EXPECT_CALL(*volume_, MountAndOpenInFileManager()) + .Times(1); + + dbusmenu_menuitem_handle_event(menuitem, DBUSMENU_MENUITEM_EVENT_ACTIVATED, nullptr, 0); +} + TEST_F(TestVolumeLauncherIcon, TestEjectMenuItem_NotEjectableVolume) { CreateIcon(); @@ -303,7 +320,7 @@ TEST_F(TestVolumeLauncherIcon, TestEjectMenuItem) CreateIcon(); - auto menuitem = GetMenuItemAtIndex(2); + auto menuitem = GetMenuItemAtIndex(5); EXPECT_CALL(*volume_, EjectAndShowNotification()) .Times(1); @@ -330,7 +347,7 @@ TEST_F(TestVolumeLauncherIcon, TestSafelyRemoveMenuItem) CreateIcon(); - auto menuitem = GetMenuItemAtIndex(2); + auto menuitem = GetMenuItemAtIndex(5); EXPECT_CALL(*volume_, StopDrive()) .Times(1); @@ -389,7 +406,7 @@ TEST_F(TestVolumeLauncherIcon, TestUnmountMenuItem) CreateIcon(); - auto menuitem = GetMenuItemAtIndex(2); + auto menuitem = GetMenuItemAtIndex(5); EXPECT_CALL(*volume_, Unmount()) .Times(1); diff --git a/unity-shared/BGHash.cpp b/unity-shared/BGHash.cpp index 4f66a873a..0629d2dd9 100644 --- a/unity-shared/BGHash.cpp +++ b/unity-shared/BGHash.cpp @@ -22,10 +22,11 @@ #include <NuxCore/Logger.h> #include "unity-shared/UBusMessages.h" -namespace -{ - nux::logging::Logger logger("unity.BGHash"); -} +#ifndef XA_STRING +#define XA_STRING ((Atom) 31) +#endif + +DECLARE_LOGGER(logger, "unity.bghash"); namespace unity { diff --git a/unity-shared/CMakeLists.txt b/unity-shared/CMakeLists.txt index d1bd61857..28dcc84e8 100644 --- a/unity-shared/CMakeLists.txt +++ b/unity-shared/CMakeLists.txt @@ -5,7 +5,6 @@ find_package (PkgConfig) set (CFLAGS ${CACHED_UNITY_DEPS_CFLAGS} ${CACHED_UNITY_DEPS_CFLAGS_OTHER} - ${MAINTAINER_CFLAGS} "-DGETTEXT_PACKAGE=\"unity\"" "-I${CMAKE_CURRENT_BINARY_DIR}" ) @@ -53,6 +52,7 @@ set (UNITY_SHARED_SOURCES SearchBarSpinner.cpp StaticCairoText.cpp TextureCache.cpp + TextInput.cpp TextureThumbnailProvider.cpp ThumbnailGenerator.cpp Timer.cpp @@ -64,10 +64,21 @@ set (UNITY_SHARED_SOURCES UnityWindowView.cpp UserThumbnailProvider.cpp WindowManager.cpp - XKeyboardUtil.cpp - XWindowManager.cpp ) +if(UNITY_ENABLE_X_ORG_SUPPORT) + set (UNITY_SHARED_SOURCES + XKeyboardUtil.cpp + XWindowManager.cpp + ${UNITY_SHARED_SOURCES} + ) +else() + set (UNITY_SHARED_SOURCES + FakeKeyboardUtil.cpp + ${UNITY_SHARED_SOURCES} + ) +endif() + add_library (unity-shared STATIC ${UNITY_SHARED_SOURCES}) target_link_libraries (unity-shared ${LIBS}) add_dependencies (unity-shared unity-core-${UNITY_API_VERSION}) @@ -76,14 +87,16 @@ add_dependencies (unity-shared unity-core-${UNITY_API_VERSION}) # We also need to build compiz specific parts and standalone variants of those parts # -# compiz -set (UNITY_SHARED_COMPIZ_SOURCES - PluginAdapter.cpp - ) -add_library (unity-shared-compiz STATIC ${UNITY_SHARED_COMPIZ_SOURCES}) -target_link_libraries (unity-shared-compiz ${LIBS}) +if(UNITY_ENABLE_X_ORG_SUPPORT) + # compiz + set (UNITY_SHARED_COMPIZ_SOURCES + PluginAdapter.cpp + ) + add_library (unity-shared-compiz STATIC ${UNITY_SHARED_COMPIZ_SOURCES}) + target_link_libraries (unity-shared-compiz ${LIBS}) -add_dependencies (unity-shared-compiz unity-shared) + add_dependencies (unity-shared-compiz unity-shared) +endif() # standalone set (UNITY_SHARED_STANDALONE_SOURCES diff --git a/unity-shared/CoverArt.cpp b/unity-shared/CoverArt.cpp index d45ca65e9..39435e60f 100644 --- a/unity-shared/CoverArt.cpp +++ b/unity-shared/CoverArt.cpp @@ -36,11 +36,10 @@ namespace dash { namespace previews { +DECLARE_LOGGER(logger, "unity.dash.previews.coverart"); namespace { -nux::logging::Logger logger("unity.dash.previews.coverart"); - const int ICON_SIZE = 256; const int IMAGE_TIMEOUT = 30; } diff --git a/unity-shared/DashStyle.cpp b/unity-shared/DashStyle.cpp index 168a9deea..7b22166dd 100755 --- a/unity-shared/DashStyle.cpp +++ b/unity-shared/DashStyle.cpp @@ -53,10 +53,9 @@ namespace unity { namespace dash { +DECLARE_LOGGER(logger, "unity.dash.style"); namespace { -nux::logging::Logger logger("unity.dash"); - Style* style_instance = nullptr; const int STATES = 5; diff --git a/unity-shared/FakeKeyboardUtil.cpp b/unity-shared/FakeKeyboardUtil.cpp new file mode 100644 index 000000000..0ea1089e8 --- /dev/null +++ b/unity-shared/FakeKeyboardUtil.cpp @@ -0,0 +1,36 @@ +// -*- Mode: C++; indent-tabs-mode: nil; tab-width: 2 -*- +/* + * Copyright (C) 2012 Canonical Ltd + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 3 as + * published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + * + * Authored by: Tim Penhey <tim.penhey@canonical.com> + */ + +namespace unity +{ +namespace keyboard +{ + +bool is_printable_key_symbol(unsigned long key_symbol) +{ + return false; +} + +bool is_move_key_symbol(unsigned long key_symbol) +{ + return false; +} + +} +} diff --git a/unity-shared/IconLoader.cpp b/unity-shared/IconLoader.cpp index 89f47c417..08b65e2a7 100644 --- a/unity-shared/IconLoader.cpp +++ b/unity-shared/IconLoader.cpp @@ -37,9 +37,9 @@ namespace unity { +DECLARE_LOGGER(logger, "unity.iconloader"); namespace { -nux::logging::Logger logger("unity.iconloader"); const int MIN_ICON_SIZE = 2; const int RIBBON_PADDING = 2; } diff --git a/unity-shared/IconRenderer.cpp b/unity-shared/IconRenderer.cpp index c2ffb91f0..ca6b0db5f 100644 --- a/unity-shared/IconRenderer.cpp +++ b/unity-shared/IconRenderer.cpp @@ -208,7 +208,9 @@ std::vector<nux::BaseTexture*> icon_shadow; std::vector<nux::BaseTexture*> icon_shine; nux::ObjectPtr<nux::IOpenGLBaseTexture> offscreen_progress_texture; nux::ObjectPtr<nux::IOpenGLShaderProgram> shader_program_uv_persp_correction; +#ifndef USE_GLES nux::ObjectPtr<nux::IOpenGLAsmShaderProgram> asm_shader; +#endif std::map<char, nux::BaseTexture*> label_map; void generate_textures(); @@ -867,7 +869,9 @@ void IconRenderer::RenderElement(nux::GraphicsEngine& GfxContext, } else { +#ifndef USE_GLES local::asm_shader->End(); +#endif } } @@ -1168,6 +1172,7 @@ void setup_shaders() } else { +#ifndef USE_GLES asm_shader = nux::GetGraphicsDisplay()->GetGpuDevice()->CreateAsmShaderProgram(); asm_shader->LoadVertexShader(TCHAR_TO_ANSI(PerspectiveCorrectVtx.c_str())); @@ -1184,6 +1189,7 @@ void setup_shaders() } asm_shader->Link(); +#endif } } diff --git a/unity-shared/IconTexture.cpp b/unity-shared/IconTexture.cpp index c03a8c619..0b7393545 100644 --- a/unity-shared/IconTexture.cpp +++ b/unity-shared/IconTexture.cpp @@ -35,10 +35,10 @@ namespace unity { +DECLARE_LOGGER(logger, "unity.icontexture"); namespace { const char* const DEFAULT_ICON = "text-x-preview"; -nux::logging::Logger logger("unity.icontexture"); } using namespace unity; diff --git a/unity-shared/JSONParser.cpp b/unity-shared/JSONParser.cpp index 39bcbed39..4b9e2b76c 100644 --- a/unity-shared/JSONParser.cpp +++ b/unity-shared/JSONParser.cpp @@ -28,10 +28,9 @@ namespace unity { namespace json { +DECLARE_LOGGER(logger, "unity.json"); namespace { -nux::logging::Logger logger("unity.json"); - nux::Color ColorFromPango(const gchar* color_string) { static const float PANGO_MAX = 0xffff; diff --git a/unity-shared/OverlayRenderer.cpp b/unity-shared/OverlayRenderer.cpp index 6575172a5..8c858910a 100644 --- a/unity-shared/OverlayRenderer.cpp +++ b/unity-shared/OverlayRenderer.cpp @@ -33,10 +33,9 @@ namespace unity { +DECLARE_LOGGER(logger, "unity.overlayrenderer"); namespace { -nux::logging::Logger logger("unity.overlayrenderer"); - const int INNER_CORNER_RADIUS = 5; const int EXCESS_BORDER = 10; } @@ -84,8 +83,10 @@ public: void InitASMInverseTextureMaskShader(); void InitSlInverseTextureMaskShader(); +#ifndef NUX_OPENGLES_20 nux::ObjectPtr<nux::IOpenGLAsmShaderProgram> inverse_texture_mask_asm_prog_; nux::ObjectPtr<nux::IOpenGLAsmShaderProgram> inverse_texture_rect_mask_asm_prog_; +#endif nux::ObjectPtr<nux::IOpenGLShaderProgram> inverse_texture_mask_prog_; void RenderInverseMask_GLSL(nux::GraphicsEngine& gfx_context, int x, int y, int width, int height, nux::ObjectPtr<nux::IOpenGLBaseTexture> DeviceTexture, nux::TexCoordXForm &texxform0, const nux::Color &color0); @@ -239,6 +240,7 @@ void OverlayRendererImpl::InitASMInverseTextureMaskShader() SUB result.color, {1.0, 1.0, 1.0, 1.0}, temp0.aaaa; \n\ END"; +#ifndef NUX_OPENGLES_20 inverse_texture_mask_asm_prog_ = nux::GetGraphicsDisplay()->GetGpuDevice()->CreateAsmShaderProgram(); inverse_texture_mask_asm_prog_->LoadVertexShader(AsmVtx.c_str()); inverse_texture_mask_asm_prog_->LoadPixelShader(AsmFrg.c_str()); @@ -248,6 +250,7 @@ void OverlayRendererImpl::InitASMInverseTextureMaskShader() inverse_texture_rect_mask_asm_prog_->LoadVertexShader(AsmVtx.c_str()); inverse_texture_rect_mask_asm_prog_->LoadPixelShader(AsmFrgRect.c_str()); inverse_texture_rect_mask_asm_prog_->Link(); +#endif } void OverlayRendererImpl::RenderInverseMask_ASM(nux::GraphicsEngine& gfx_context, int x, int y, int width, int height, nux::ObjectPtr<nux::IOpenGLBaseTexture> device_texture, nux::TexCoordXForm &texxform, const nux::Color &color) diff --git a/unity-shared/PanelStyle.cpp b/unity-shared/PanelStyle.cpp index 885500567..9bf25e1e2 100644 --- a/unity-shared/PanelStyle.cpp +++ b/unity-shared/PanelStyle.cpp @@ -39,12 +39,11 @@ namespace unity { namespace panel { +DECLARE_LOGGER(logger, "unity.panel.style"); namespace { Style* style_instance = nullptr; -nux::logging::Logger logger("unity.panel.style"); - const std::string SETTINGS_NAME("org.gnome.desktop.wm.preferences"); const std::string PANEL_TITLE_FONT_KEY("titlebar-font"); const std::string HIGH_CONTRAST_THEME_PREFIX("HighContrast"); diff --git a/unity-shared/PluginAdapter.cpp b/unity-shared/PluginAdapter.cpp index 827145b8a..180de67ba 100644 --- a/unity-shared/PluginAdapter.cpp +++ b/unity-shared/PluginAdapter.cpp @@ -27,11 +27,9 @@ namespace unity { +DECLARE_LOGGER(logger, "unity.wm.compiz"); namespace { - -nux::logging::Logger logger("unity.plugin"); - const int THRESHOLD_HEIGHT = 600; const int THRESHOLD_WIDTH = 1024; const char* _UNITY_FRAME_EXTENTS = "_UNITY_FRAME_EXTENTS"; diff --git a/unity-shared/PreviewStyle.cpp b/unity-shared/PreviewStyle.cpp index 689d80000..314d6bdbb 100644 --- a/unity-shared/PreviewStyle.cpp +++ b/unity-shared/PreviewStyle.cpp @@ -35,6 +35,7 @@ namespace dash { namespace previews { +DECLARE_LOGGER(logger, "unity.dash.previews.style"); namespace { Style* style_instance = nullptr; @@ -42,8 +43,6 @@ Style* style_instance = nullptr; const int preview_width = 770; const int preview_height = 380; -nux::logging::Logger logger("unity.dash.previews.style"); - typedef nux::ObjectPtr<nux::BaseTexture> BaseTexturePtr; template <int default_size = 1> diff --git a/unity-shared/ResizingBaseWindow.h b/unity-shared/ResizingBaseWindow.h index ff400c1c2..c7f50cbb2 100644 --- a/unity-shared/ResizingBaseWindow.h +++ b/unity-shared/ResizingBaseWindow.h @@ -35,8 +35,10 @@ public: void UpdateInputWindowGeometry() { +#ifdef UNITY_HAS_X_ORG_SUPPORT if (m_input_window && m_input_window_enabled) m_input_window->SetGeometry(geo_func_(GetGeometry())); +#endif } virtual void SetGeometry(const nux::Geometry &geo) diff --git a/unity-shared/SearchBar.cpp b/unity-shared/SearchBar.cpp index 3e61f074d..d63bf6f95 100644 --- a/unity-shared/SearchBar.cpp +++ b/unity-shared/SearchBar.cpp @@ -59,11 +59,9 @@ const std::string SHOW_FILTERS_LABEL_DEFAULT_FONT = "Ubuntu " + SHOW_FILTERS_LAB } +DECLARE_LOGGER(logger, "unity.dash.searchbar"); namespace { - -nux::logging::Logger logger("unity"); - class ExpanderView : public nux::View { public: diff --git a/unity-shared/StandaloneWindowManager.cpp b/unity-shared/StandaloneWindowManager.cpp index 87610911a..97e4485b2 100644 --- a/unity-shared/StandaloneWindowManager.cpp +++ b/unity-shared/StandaloneWindowManager.cpp @@ -30,11 +30,7 @@ namespace unity { - -namespace -{ -nux::logging::Logger logger("unity.wm"); -} +DECLARE_LOGGER(logger, "unity.wm"); WindowManagerPtr create_window_manager() { @@ -44,6 +40,8 @@ WindowManagerPtr create_window_manager() StandaloneWindowManager::StandaloneWindowManager() : expo_state_(false) , in_show_desktop_(false) + , scale_active_(false) + , scale_active_for_group_(false) { } @@ -146,14 +144,24 @@ void StandaloneWindowManager::Lower(Window window_id) void StandaloneWindowManager::TerminateScale() {} +void StandaloneWindowManager::SetScaleActive(bool scale_active) +{ + scale_active_ = scale_active; +} + bool StandaloneWindowManager::IsScaleActive() const { - return false; + return scale_active_; +} + +void StandaloneWindowManager::SetScaleActiveForGroup(bool scale_active_for_group) +{ + scale_active_for_group_ = scale_active_for_group; } bool StandaloneWindowManager::IsScaleActiveForGroup() const { - return false; + return scale_active_for_group_; } void StandaloneWindowManager::InitiateExpo() diff --git a/unity-shared/StandaloneWindowManager.h b/unity-shared/StandaloneWindowManager.h index d611df30f..62b6c89ad 100644 --- a/unity-shared/StandaloneWindowManager.h +++ b/unity-shared/StandaloneWindowManager.h @@ -98,12 +98,18 @@ public: virtual std::string GetWindowName(Window window_id) const; + // Mock functions + void SetScaleActive(bool scale_active); + void SetScaleActiveForGroup(bool scale_active_for_group); + protected: virtual void AddProperties(GVariantBuilder* builder); private: bool expo_state_; bool in_show_desktop_; + bool scale_active_; + bool scale_active_for_group_; }; } diff --git a/unity-shared/TextInput.cpp b/unity-shared/TextInput.cpp new file mode 100644 index 000000000..6ce3b50b5 --- /dev/null +++ b/unity-shared/TextInput.cpp @@ -0,0 +1,364 @@ +// -*- Mode: C++; indent-tabs-mode: nil; tab-width: 2 -*- +/* + * Copyright (C) 2012 Canonical Ltd + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 3 as + * published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more detais. + * + * You shoud have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + * + * Authored by: Manuel de la Pena <manuel.delapena@canonical.com> + */ + +#include "config.h" + +#include <Nux/Nux.h> +#include <Nux/HLayout.h> +#include <Nux/VLayout.h> +#include <NuxCore/Logger.h> + +#include <UnityCore/Variant.h> + +#include <glib/gi18n-lib.h> + +#include "TextInput.h" +#include "CairoTexture.h" + +namespace +{ +const float kExpandDefaultIconOpacity = 1.0f; + +const int SPACE_BETWEEN_ENTRY_AND_HIGHLIGHT = 10; +const int LEFT_INTERNAL_PADDING = 6; +const int TEXT_INPUT_RIGHT_BORDER = 10; + +const int HIGHLIGHT_HEIGHT = 24; + +// Fonts +const std::string HINT_LABEL_FONT_SIZE = "12px"; +const std::string HINT_LABEL_FONT_STYLE = "Italic"; +const std::string HINT_LABEL_DEFAULT_FONT = "Ubuntu " + HINT_LABEL_FONT_STYLE + " " + HINT_LABEL_FONT_SIZE; + +const std::string PANGO_ENTRY_DEFAULT_FONT_FAMILY = "Ubuntu"; +const int PANGO_ENTRY_FONT_SIZE = 14; + +} + +DECLARE_LOGGER(logger, "unity.dash.textinput"); +namespace +{ +class ExpanderView : public nux::View +{ +public: + ExpanderView(NUX_FILE_LINE_DECL) + : nux::View(NUX_FILE_LINE_PARAM) + { + SetAcceptKeyNavFocusOnMouseDown(false); + SetAcceptKeyNavFocusOnMouseEnter(true); + } + +protected: + void Draw(nux::GraphicsEngine& graphics_engine, bool force_draw) + {} + + void DrawContent(nux::GraphicsEngine& graphics_engine, bool force_draw) + { + if (GetLayout()) + GetLayout()->ProcessDraw(graphics_engine, force_draw); + } + + bool AcceptKeyNavFocus() + { + return true; + } + + nux::Area* FindAreaUnderMouse(const nux::Point& mouse_position, nux::NuxEventType event_type) + { + bool mouse_inside = TestMousePointerInclusionFilterMouseWheel(mouse_position, event_type); + + if (mouse_inside == false) + return nullptr; + + return this; + } +}; + +} + +namespace unity +{ + +NUX_IMPLEMENT_OBJECT_TYPE(TextInput); + +TextInput::TextInput(NUX_FILE_LINE_DECL) + : View(NUX_FILE_LINE_PARAM) + , input_hint("") + , last_width_(-1) + , last_height_(-1) +{ + Init(); +} + +void TextInput::Init() +{ + bg_layer_.reset(new nux::ColorLayer(nux::Color(0xff595853), true)); + + layout_ = new nux::HLayout(NUX_TRACKER_LOCATION); + layout_->SetLeftAndRightPadding(LEFT_INTERNAL_PADDING, TEXT_INPUT_RIGHT_BORDER); + layout_->SetSpaceBetweenChildren(SPACE_BETWEEN_ENTRY_AND_HIGHLIGHT); + SetLayout(layout_); + + nux::HLayout* hint_layout = new nux::HLayout(NUX_TRACKER_LOCATION); + + hint_ = new nux::StaticCairoText(" "); + hint_->SetTextColor(nux::Color(1.0f, 1.0f, 1.0f, 0.5f)); + hint_->SetFont(HINT_LABEL_DEFAULT_FONT.c_str()); + hint_layout->AddView(hint_, 0, nux::MINOR_POSITION_CENTER, nux::MINOR_SIZE_FULL); + + pango_entry_ = new IMTextEntry(); + pango_entry_->SetFontFamily(PANGO_ENTRY_DEFAULT_FONT_FAMILY.c_str()); + pango_entry_->SetFontSize(PANGO_ENTRY_FONT_SIZE); + pango_entry_->cursor_moved.connect([&](int i) { QueueDraw(); }); + pango_entry_->mouse_down.connect(sigc::mem_fun(this, &TextInput::OnMouseButtonDown)); + pango_entry_->end_key_focus.connect(sigc::mem_fun(this, &TextInput::OnEndKeyFocus)); + + layered_layout_ = new nux::LayeredLayout(); + layered_layout_->AddLayout(hint_layout); + layered_layout_->AddLayer(pango_entry_); + layered_layout_->SetPaintAll(true); + layered_layout_->SetActiveLayerN(1); + layout_->AddView(layered_layout_, 1, nux::MINOR_POSITION_CENTER, nux::MINOR_SIZE_FIX); + + sig_manager_.Add<void, GtkSettings*, GParamSpec*>(gtk_settings_get_default(), + "notify::gtk-font-name", sigc::mem_fun(this, &TextInput::OnFontChanged)); + OnFontChanged(gtk_settings_get_default()); + + input_string.SetGetterFunction(sigc::mem_fun(this, &TextInput::get_input_string)); + input_string.SetSetterFunction(sigc::mem_fun(this, &TextInput::set_input_string)); + im_active.SetGetterFunction(sigc::mem_fun(this, &TextInput::get_im_active)); + im_preedit.SetGetterFunction(sigc::mem_fun(this, &TextInput::get_im_preedit)); + input_hint.changed.connect([&](std::string const& s) { OnInputHintChanged(); }); + +} + +void TextInput::OnFontChanged(GtkSettings* settings, GParamSpec* pspec) +{ + glib::String font_name; + PangoFontDescription* desc; + std::ostringstream font_desc; + + g_object_get(settings, "gtk-font-name", &font_name, NULL); + + desc = pango_font_description_from_string(font_name.Value()); + if (desc) + { + pango_entry_->SetFontFamily(pango_font_description_get_family(desc)); + pango_entry_->SetFontSize(PANGO_ENTRY_FONT_SIZE); + pango_entry_->SetFontOptions(gdk_screen_get_font_options(gdk_screen_get_default())); + + font_desc << pango_font_description_get_family(desc) << " " << HINT_LABEL_FONT_STYLE << " " << HINT_LABEL_FONT_SIZE; + hint_->SetFont(font_desc.str().c_str()); + + font_desc.str(""); + font_desc.clear(); + + pango_font_description_free(desc); + } +} + +void TextInput::OnInputHintChanged() +{ + glib::String tmp(g_markup_escape_text(input_hint().c_str(), -1)); + hint_->SetText(tmp); +} + +void TextInput::Draw(nux::GraphicsEngine& GfxContext, bool force_draw) +{ + nux::Geometry const& base = GetGeometry(); + + UpdateBackground(false); + + GfxContext.PushClippingRectangle(base); + nux::GetPainter().PaintBackground(GfxContext, base); + + bg_layer_->SetGeometry(nux::Geometry(base.x, base.y, last_width_, last_height_)); + nux::GetPainter().RenderSinglePaintLayer(GfxContext, + bg_layer_->GetGeometry(), + bg_layer_.get()); + + GfxContext.PopClippingRectangle(); +} + +void TextInput::DrawContent(nux::GraphicsEngine& GfxContext, bool force_draw) +{ + nux::Geometry const& geo = GetGeometry(); + + GfxContext.PushClippingRectangle(geo); + + if (highlight_layer_ && ShouldBeHighlighted() && !IsFullRedraw()) + { + nux::GetPainter().PushLayer(GfxContext, highlight_layer_->GetGeometry(), highlight_layer_.get()); + } + + + if (!IsFullRedraw()) + { + gPainter.PushLayer(GfxContext, bg_layer_->GetGeometry(), bg_layer_.get()); + } + else + { + nux::GetPainter().PushPaintLayerStack(); + } + + layout_->ProcessDraw(GfxContext, force_draw); + + if (!IsFullRedraw()) + { + gPainter.PopBackground(); + } + else + { + nux::GetPainter().PopPaintLayerStack(); + } + + GfxContext.PopClippingRectangle(); +} + +void TextInput::UpdateBackground(bool force) +{ + int RADIUS = 5; + nux::Geometry geo(GetGeometry()); + geo.width = layered_layout_->GetAbsoluteX() + + layered_layout_->GetAbsoluteWidth() - + GetAbsoluteX() + + TEXT_INPUT_RIGHT_BORDER; + + LOG_DEBUG(logger) << "height: " + << geo.height << " - " + << layered_layout_->GetGeometry().height << " - " + << pango_entry_->GetGeometry().height; + + if (geo.width == last_width_ + && geo.height == last_height_ + && force == false) + return; + + last_width_ = geo.width; + last_height_ = geo.height; + + nux::CairoGraphics cairo_graphics(CAIRO_FORMAT_ARGB32, last_width_, last_height_); + cairo_t* cr = cairo_graphics.GetContext(); + + cairo_graphics.DrawRoundedRectangle(cr, + 1.0f, + 0.5, 0.5, + RADIUS, + last_width_ - 1, last_height_ - 1, + false); + + cairo_set_operator(cr, CAIRO_OPERATOR_SOURCE); + cairo_set_source_rgba(cr, 0.0f, 0.0f, 0.0f, 0.35f); + cairo_fill_preserve(cr); + cairo_set_line_width(cr, 1); + cairo_set_source_rgba(cr, 1.0f, 1.0f, 1.0f, 0.7f); + cairo_stroke(cr); + + cairo_destroy(cr); + nux::BaseTexture* texture2D = texture_from_cairo_graphics(cairo_graphics); + + nux::TexCoordXForm texxform; + texxform.SetTexCoordType(nux::TexCoordXForm::OFFSET_COORD); + texxform.SetWrap(nux::TEXWRAP_REPEAT, nux::TEXWRAP_REPEAT); + + nux::ROPConfig rop; + rop.Blend = true; + rop.SrcBlend = GL_ONE; + rop.DstBlend = GL_ONE_MINUS_SRC_ALPHA; + + bg_layer_.reset(new nux::TextureLayer(texture2D->GetDeviceTexture(), + texxform, + nux::color::White, + true, + rop)); + + texture2D->UnReference(); +} + +void TextInput::OnMouseButtonDown(int x, int y, unsigned long button, unsigned long key) +{ + hint_->SetVisible(false); +} + +void TextInput::OnEndKeyFocus() +{ + hint_->SetVisible(input_string().empty()); +} + + +nux::TextEntry* TextInput::text_entry() const +{ + return pango_entry_; +} + +std::string TextInput::get_input_string() const +{ + return pango_entry_->GetText(); +} + +bool TextInput::set_input_string(std::string const& string) +{ + pango_entry_->SetText(string.c_str()); + return true; +} + +bool TextInput::get_im_active() const +{ + return pango_entry_->im_active(); +} + +bool TextInput::get_im_preedit() const +{ + return pango_entry_->im_preedit(); +} + +// +// Highlight +// +bool TextInput::ShouldBeHighlighted() +{ + return true; +} + +// +// Key navigation +// +bool TextInput::AcceptKeyNavFocus() +{ + return false; +} + +// +// Introspection +// +std::string TextInput::GetName() const +{ + return "TextInput"; +} + +void TextInput::AddProperties(GVariantBuilder* builder) +{ + unity::variant::BuilderWrapper(builder) + .add(GetAbsoluteGeometry()) + .add("has_focus", pango_entry_->HasKeyFocus()) + .add("input_string", pango_entry_->GetText()) + .add("im_active", pango_entry_->im_active()); +} + +} // namespace unity diff --git a/unity-shared/TextInput.h b/unity-shared/TextInput.h new file mode 100644 index 000000000..e68f29262 --- /dev/null +++ b/unity-shared/TextInput.h @@ -0,0 +1,102 @@ +// -*- Mode: C++; indent-tabs-mode: nil; tab-width: 2 -*- +/* + * Copyright (C) 2012 Canonical Ltd + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 3 as + * published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + * + * Authored by: Manuel de la Pena <manuel.delapena@canonical.com> + */ + +#ifndef TEXTINPUT_H +#define TEXTINPUT_H + +#include <gtk/gtk.h> +#include <NuxCore/Property.h> +#include <Nux/LayeredLayout.h> +#include <Nux/VLayout.h> +#include <Nux/TextEntry.h> +#include <UnityCore/GLibSignal.h> +#include <UnityCore/GLibSource.h> + +#include "unity-shared/IconTexture.h" +#include "unity-shared/IMTextEntry.h" +#include "unity-shared/Introspectable.h" +#include "unity-shared/StaticCairoText.h" + +namespace nux +{ +class AbstractPaintLayer; +class LinearLayout; +} + +namespace unity +{ + +class TextInput : public unity::debug::Introspectable, public nux::View +{ + NUX_DECLARE_OBJECT_TYPE(TextInput, nux::View); +public: + typedef nux::ObjectPtr<TextInput> Ptr; + TextInput(NUX_FILE_LINE_PROTO); + TextInput(bool show_filter_hint, NUX_FILE_LINE_PROTO); + + nux::TextEntry* text_entry() const; + + nux::RWProperty<std::string> input_string; + nux::Property<std::string> input_hint; + nux::ROProperty<bool> im_active; + nux::ROProperty<bool> im_preedit; + +private: + + void Init(); + + void OnFontChanged(GtkSettings* settings, GParamSpec* pspec=NULL); + void OnInputHintChanged(); + + void Draw(nux::GraphicsEngine& GfxContext, bool force_draw); + void DrawContent(nux::GraphicsEngine& GfxContext, bool force_draw); + + void OnMouseButtonDown(int x, int y, unsigned long button_flags, unsigned long key_flags); + void OnEndKeyFocus(); + + void UpdateBackground(bool force); + + std::string get_input_string() const; + bool set_input_string(std::string const& string); + bool get_im_active() const; + bool get_im_preedit() const; + + std::string GetName() const; + void AddProperties(GVariantBuilder* builder); + bool AcceptKeyNavFocus(); + +private: + bool ShouldBeHighlighted(); + + std::unique_ptr<nux::AbstractPaintLayer> bg_layer_; + std::unique_ptr<nux::AbstractPaintLayer> highlight_layer_; + nux::HLayout* layout_; + nux::LayeredLayout* layered_layout_; + nux::StaticCairoText* hint_; + IMTextEntry* pango_entry_; + + int last_width_; + int last_height_; + + glib::SignalManager sig_manager_; +}; + +} + +#endif diff --git a/unity-shared/TextureCache.cpp b/unity-shared/TextureCache.cpp index 0d19d5cef..e5e9ebc28 100644 --- a/unity-shared/TextureCache.cpp +++ b/unity-shared/TextureCache.cpp @@ -25,10 +25,7 @@ namespace unity { -namespace -{ -nux::logging::Logger logger("unity.internal.texturecache"); -} +DECLARE_LOGGER(logger, "unity.internal.texturecache"); TextureCache::TextureCache() { diff --git a/unity-shared/ThumbnailGenerator.cpp b/unity-shared/ThumbnailGenerator.cpp index a214afa07..b0c858828 100644 --- a/unity-shared/ThumbnailGenerator.cpp +++ b/unity-shared/ThumbnailGenerator.cpp @@ -34,10 +34,10 @@ namespace unity { +DECLARE_LOGGER(logger, "unity.dash.thumbnail"); namespace { - nux::logging::Logger logger("unity.thumbnailgenerator"); ThumbnailGenerator* thumbnail_instance = nullptr; const unsigned int CLEANUP_DURATION = 60*1000; // 1 minute diff --git a/unity-shared/UBusServer.cpp b/unity-shared/UBusServer.cpp index e41efba0f..7016548a7 100644 --- a/unity-shared/UBusServer.cpp +++ b/unity-shared/UBusServer.cpp @@ -22,11 +22,7 @@ namespace unity { - -namespace -{ -nux::logging::Logger logger("unity.ubus"); -} +DECLARE_LOGGER(logger, "unity.ubus"); UBusServer::UBusServer() : last_id_(0) diff --git a/unity-shared/UScreen.cpp b/unity-shared/UScreen.cpp index 3b643382d..4faa1bc56 100644 --- a/unity-shared/UScreen.cpp +++ b/unity-shared/UScreen.cpp @@ -21,11 +21,7 @@ namespace unity { - -namespace -{ -nux::logging::Logger logger("unity.screen"); -} +DECLARE_LOGGER(logger, "unity.screen"); UScreen* UScreen::default_screen_ = nullptr; diff --git a/unity-shared/UnitySettings.cpp b/unity-shared/UnitySettings.cpp index a1c37db43..9a7f46065 100644 --- a/unity-shared/UnitySettings.cpp +++ b/unity-shared/UnitySettings.cpp @@ -28,10 +28,9 @@ namespace unity { +DECLARE_LOGGER(logger, "unity.settings"); namespace { -nux::logging::Logger logger("unity"); - Settings* settings_instance = nullptr; const std::string SETTINGS_NAME = "com.canonical.Unity"; diff --git a/unity-standalone/CMakeLists.txt b/unity-standalone/CMakeLists.txt index d61c8110f..f93784b10 100644 --- a/unity-standalone/CMakeLists.txt +++ b/unity-standalone/CMakeLists.txt @@ -5,7 +5,6 @@ find_package (PkgConfig) set (CFLAGS ${CACHED_UNITY_DEPS_CFLAGS} ${CACHED_UNITY_DEPS_CFLAGS_OTHER} - ${MAINTAINER_CFLAGS} "-DGETTEXT_PACKAGE=\"unity\"" "-I${CMAKE_CURRENT_BINARY_DIR}" ) |
