File spacer.diff of Package kde4-plasma-addons
--- applets/CMakeLists.txt
+++ applets/CMakeLists.txt
@@ -30,3 +30,5 @@
add_subdirectory(showdesktop)
add_subdirectory(twitter)
+add_subdirectory(spacer)
+
--- applets/spacer/CMakeLists.txt
+++ applets/spacer/CMakeLists.txt
@@ -0,0 +1,15 @@
+project(plasma-spacer)
+include_directories(${CMAKE_CURRENT_SOURCE_DIR} ${PLASMA_INCLUDE_DIR})
+
+set(spacer_SRCS
+ spacer.cpp
+)
+
+kde4_add_plugin(plasma_applet_spacer ${spacer_SRCS})
+target_link_libraries(plasma_applet_spacer
+ ${PLASMA_LIBS}
+ ${KDE4_KIO_LIBS})
+
+install(TARGETS plasma_applet_spacer DESTINATION ${PLUGIN_INSTALL_DIR})
+install(FILES plasma-applet-spacer.desktop
+ DESTINATION ${SERVICES_INSTALL_DIR})
--- applets/spacer/spacer.cpp
+++ applets/spacer/spacer.cpp
@@ -0,0 +1,30 @@
+/*
+ * Copyright 2008 Petri Damsten <damu@iki.fi>
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of
+ * the License, or (at your option) any later version.
+ *
+ * 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/>.
+ */
+
+#include "spacer.h"
+#include <limits.h>
+
+Spacer::Spacer(QObject *parent, const QVariantList &args)
+ : Plasma::Applet(parent, args)
+{
+ setAspectRatioMode(Plasma::IgnoreAspectRatio);
+ setSizePolicy(QSizePolicy(QSizePolicy::Ignored, QSizePolicy::Ignored));
+ setMinimumSize(0, 0);
+ setMaximumSize(INT_MAX, INT_MAX);
+}
+
+#include "spacer.moc"
--- applets/spacer/spacer.h
+++ applets/spacer/spacer.h
@@ -0,0 +1,32 @@
+/*
+ * Copyright 2008 Petri Damsten <damu@iki.fi>
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of
+ * the License, or (at your option) any later version.
+ *
+ * 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/>.
+ */
+
+#ifndef SPACER_HEADER
+#define SPACER_HEADER
+
+#include <Plasma/Applet>
+
+class Spacer : public Plasma::Applet
+{
+ Q_OBJECT
+ public:
+ Spacer(QObject *parent, const QVariantList &args);
+};
+
+K_EXPORT_PLASMA_APPLET(spacer, Spacer)
+
+#endif
--- applets/spacer/plasma-applet-spacer.desktop
+++ applets/spacer/plasma-applet-spacer.desktop
@@ -0,0 +1,22 @@
+[Desktop Entry]
+Name=Spacer
+Name[et]=Vahemaa looja
+Name[sv]=Mellanrum
+Comment=Simple spacer
+Comment[et]=Lihtne vahemaa looja
+Comment[sv]=Ett enkelt mellanrum
+Type=Service
+Icon=transform-move
+ServiceTypes=Plasma/Applet
+
+X-KDE-Library=plasma_applet_spacer
+X-KDE-PluginInfo-Author=Petri Damstén
+X-KDE-PluginInfo-Email=damu@iki.fi
+X-KDE-PluginInfo-Name=spacer
+X-KDE-PluginInfo-Version=pre0.1
+X-KDE-PluginInfo-Website=http://plasma.kde.org/
+X-KDE-PluginInfo-Category=Miscellaneous
+X-KDE-PluginInfo-Depends=
+X-KDE-PluginInfo-License=GPL
+X-KDE-PluginInfo-EnabledByDefault=true
+