diff --git a/CMakeLists.txt b/CMakeLists.txt index 0b4333dc7..f15021a2b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,162 +1,162 @@ project(plasma-desktop) set(PROJECT_VERSION "5.7.90") set(PROJECT_VERSION_MAJOR 5) cmake_minimum_required(VERSION 2.8.12 FATAL_ERROR) set(QT_MIN_VERSION "5.5.0") find_package(ECM 0.0.11 REQUIRED NO_MODULE) set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH} ${ECM_KDE_MODULE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules) include(KDEInstallDirs) include(KDECMakeSettings) include(KDECompilerSettings NO_POLICY_SCOPE) include(ECMInstallIcons) include(ECMMarkAsTest) include(ECMMarkNonGuiExecutable) include(ECMOptionalAddSubdirectory) include(ECMQtDeclareLoggingCategory) include(FeatureSummary) include(CheckIncludeFiles) find_package(Qt5 ${QT_MIN_VERSION} CONFIG REQUIRED COMPONENTS Quick QuickWidgets DBus Widgets X11Extras Svg Concurrent ) set(KF5_MIN_VERSION "5.24.0") find_package(KF5 ${KF5_MIN_VERSION} REQUIRED COMPONENTS Auth Plasma PlasmaQuick DocTools I18n KCMUtils NewStuff KDELibs4Support Notifications NotifyConfig Attica Wallet Runner GlobalAccel Declarative People DBusAddons Activities ActivitiesStats Config ) find_package(LibKWorkspace CONFIG REQUIRED) find_package(LibTaskManager CONFIG REQUIRED) find_package(KWinDBusInterface CONFIG REQUIRED) find_package(ScreenSaverDBusInterface CONFIG REQUIRED) find_package(KRunnerAppDBusInterface CONFIG REQUIRED) find_package(KSMServerDBusInterface CONFIG REQUIRED) find_package(KF5ItemModels CONFIG REQUIRED) find_package(KF5Emoticons CONFIG REQUIRED) find_package(PackageKitQt5 0.9) set_package_properties(PackageKitQt5 PROPERTIES DESCRIPTION "Software Manager integration" TYPE OPTIONAL PURPOSE "Provides package management integration to the application launcher." ) # Baloo is currently part of the KF5 namespace, but it is not # a proper framework. Hence the strange versioning. # This will be fixed with Plasma 5.2, as Baloo should have # become a framework by then find_package(KF5Baloo "5.1.90") set_package_properties(KF5Baloo PROPERTIES DESCRIPTION "File Searching" TYPE REQUIRED PURPOSE "Needed to build to File Search KCM" ) find_package(Fontconfig) set_package_properties(Fontconfig PROPERTIES DESCRIPTION "Font access configuration library" URL "http://www.freedesktop.org/wiki/Software/fontconfig" TYPE OPTIONAL PURPOSE "Needed to build font configuration and installation tools" ) find_package(X11) set_package_properties(X11 PROPERTIES DESCRIPTION "X11 libraries" URL "http://www.x.org" TYPE REQUIRED PURPOSE "Required for building the X11 based workspace" ) find_package(UDev) set_package_properties(UDev PROPERTIES DESCRIPTION "UDev library" URL "http://www.kernel.org/pub/linux/utils/kernel/hotplug/udev.html" TYPE OPTIONAL PURPOSE "Required for device discovery in keyboard daemon" ) find_package(XCB REQUIRED COMPONENTS XCB SHM IMAGE OPTIONAL_COMPONENTS XKB XINPUT ) set_package_properties(XCB PROPERTIES TYPE REQUIRED) add_feature_info("XCB-XKB" XCB_XKB_FOUND "Required for building kcm/keyboard") add_feature_info("libxft" X11_Xft_FOUND "X FreeType interface library required for font installation") find_package(Evdev) set_package_properties(Evdev PROPERTIES TYPE OPTIONAL) add_feature_info("Evdev" EVDEV_FOUND "Evdev driver headers needed for input KCM") find_package(Synaptics) set_package_properties(Synaptics PROPERTIES TYPE OPTIONAL) add_feature_info("Synaptics" SYNAPTICS_FOUND "Synaptics libraries needed for touchpad KCM") include(ConfigureChecks.cmake) if(${Qt5Gui_OPENGL_IMPLEMENTATION} STREQUAL "GL") find_package(OpenGL) set_package_properties(OpenGL PROPERTIES DESCRIPTION "The OpenGL libraries" URL "http://www.opengl.org" TYPE REQUIRED ) else() find_package(OpenGLES) set_package_properties(OpenGLES PROPERTIES DESCRIPTION "The OpenGLES libraries" URL "http://www.khronos.org/opengles" TYPE REQUIRED ) endif() include_directories("${CMAKE_CURRENT_BINARY_DIR}") configure_file(config-workspace.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config-workspace.h) configure_file(config-unix.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config-unix.h ) configure_file(config-X11.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config-X11.h) configure_file(config-runtime.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config-runtime.h) plasma_install_package(desktoppackage org.kde.plasma.desktop shells shell) -plasma_install_package(layout-templates/org.kde.plasma.desktop.defaultPanel org.kde.plasma.desktop.defaultPanel layout-templates layout-template) - add_definitions(-DQT_NO_URL_CAST_FROM_STRING) +add_subdirectory(layout-templates) + add_subdirectory(doc) add_subdirectory(runners) add_subdirectory(containments) add_subdirectory(toolboxes) add_subdirectory(applets) add_subdirectory(dataengines) add_subdirectory(kcms) add_subdirectory(knetattach) add_subdirectory(attica-kde) add_subdirectory(imports/activitymanager/) add_subdirectory(solid-device-automounter) if(X11_Xkb_FOUND AND XCB_XKB_FOUND) add_subdirectory(kaccess) endif() install(FILES org.kde.plasmashell.metainfo.xml DESTINATION ${KDE_INSTALL_METAINFODIR}) feature_summary(WHAT ALL INCLUDE_QUIET_PACKAGES FATAL_ON_MISSING_REQUIRED_PACKAGES) diff --git a/layout-templates/CMakeLists.txt b/layout-templates/CMakeLists.txt new file mode 100644 index 000000000..d6718adcb --- /dev/null +++ b/layout-templates/CMakeLists.txt @@ -0,0 +1,2 @@ +plasma_install_package(org.kde.plasma.desktop.defaultPanel org.kde.plasma.desktop.defaultPanel layout-templates layout-template) +plasma_install_package(org.kde.plasma.desktop.emptyPanel org.kde.plasma.desktop.emptyPanel layout-templates layout-template) diff --git a/layout-templates/org.kde.plasma.desktop.emptyPanel/contents/layout.js b/layout-templates/org.kde.plasma.desktop.emptyPanel/contents/layout.js new file mode 100644 index 000000000..23e5c6860 --- /dev/null +++ b/layout-templates/org.kde.plasma.desktop.emptyPanel/contents/layout.js @@ -0,0 +1,28 @@ +var panel = new Panel +var panelScreen = panel.screen +var freeEdges = {"bottom": true, "top": true, "left": true, "right": true} + +for (i = 0; i < panelIds.length; ++i) { + var tmpPanel = panelById(panelIds[i]) + if (tmpPanel.screen == panelScreen) { + // Ignore the new panel + if (tmpPanel.id != panel.id) { + freeEdges[tmpPanel.location] = false; + } + } +} + +if (freeEdges["bottom"] == true) { + panel.location = "bottom"; +} else if (freeEdges["top"] == true) { + panel.location = "top"; +} else if (freeEdges["left"] == true) { + panel.location = "left"; +} else if (freeEdges["right"] == true) { + panel.location = "right"; +} else { + // There is no free edge, so leave the default value + panel.location = "top"; +} + +panel.height = gridUnit * 2 diff --git a/layout-templates/org.kde.plasma.desktop.emptyPanel/metadata.desktop b/layout-templates/org.kde.plasma.desktop.emptyPanel/metadata.desktop new file mode 100644 index 000000000..14ce57e5a --- /dev/null +++ b/layout-templates/org.kde.plasma.desktop.emptyPanel/metadata.desktop @@ -0,0 +1,16 @@ +[Desktop Entry] +Encoding=UTF-8 +Name=Empty Panel +Type=Service +ServiceTypes=Plasma/LayoutTemplate +X-Plasma-Shell=plasmashell +X-Plasma-ContainmentCategories=panel +X-KDE-PluginInfo-Author=David Edmundson +X-KDE-PluginInfo-Email=davidedmundson@kde.org +X-KDE-PluginInfo-Name=org.kde.plasma.desktop.emptyPanel +X-KDE-PluginInfo-Version=1.0 +X-KDE-PluginInfo-Website=http://plasma.kde.org/ +X-KDE-PluginInfo-Category= +X-KDE-PluginInfo-Depends= +X-KDE-PluginInfo-License=GPL +X-KDE-PluginInfo-EnabledByDefault=true