summaryrefslogtreecommitdiffstats
path: root/client
diff options
context:
space:
mode:
authorMichele Calgaro <michele.calgaro@yahoo.it>2023-10-18 13:32:54 +0900
committerMichele Calgaro <michele.calgaro@yahoo.it>2023-10-18 13:32:54 +0900
commit3031fcead54a66aa68b0653e35ef59fbae9e442f (patch)
tree4593183ce2c50ebd1320293a03e0bfd797e9f1f4 /client
parente952c17a7ce96d686b0ad54cb8d693bf137d6759 (diff)
downloadtwin-style-fahrenheit-3031fcead54a66aa68b0653e35ef59fbae9e442f.tar.gz
twin-style-fahrenheit-3031fcead54a66aa68b0653e35ef59fbae9e442f.zip
Add cmake building files
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
Diffstat (limited to 'client')
-rw-r--r--client/CMakeL10n.txt12
-rw-r--r--client/CMakeLists.txt41
-rw-r--r--client/fahrenheit.desktop3
-rw-r--r--client/fahrenheitclient.cc15
-rw-r--r--client/fahrenheitclient.h6
-rw-r--r--client/pics/CMakeLists.txt4
6 files changed, 70 insertions, 11 deletions
diff --git a/client/CMakeL10n.txt b/client/CMakeL10n.txt
new file mode 100644
index 0000000..b4a5b2e
--- /dev/null
+++ b/client/CMakeL10n.txt
@@ -0,0 +1,12 @@
+##### create translation templates ##############
+
+tde_l10n_create_template(
+ CATALOG "messages/twin-style-fahrenheit"
+ SOURCES .
+ X-POT ${CMAKE_SOURCE_DIR}/../../../core/tde-i18n/template/messages/tdebase/twin_clients.pot
+)
+
+tde_l10n_create_template(
+ CATALOG "desktop_files/twin-style-fahrenheit-desktops"
+ SOURCES *.desktop
+)
diff --git a/client/CMakeLists.txt b/client/CMakeLists.txt
new file mode 100644
index 0000000..e7755f4
--- /dev/null
+++ b/client/CMakeLists.txt
@@ -0,0 +1,41 @@
+tde_import( twin )
+
+include_directories(
+ ${CMAKE_BINARY_DIR}
+ ${CMAKE_CURRENT_BINARY_DIR}
+ ${CMAKE_CURRENT_SOURCE_DIR}
+ ${TDE_INCLUDE_DIR}
+ ${TQT_INCLUDE_DIRS}
+)
+
+link_directories(
+ ${TQT_LIBRARY_DIRS}
+ ${TDE_LIBRARY_DIRS}
+)
+
+
+add_subdirectory( pics )
+
+
+##### twin_fahrenheit (kpart)
+
+tde_add_kpart( twin_fahrenheit AUTOMOC
+
+ SOURCES
+ fahrenheitclient.cc
+ fahrenheitclient.h
+ LINK
+ tdecore-shared
+ tdeui-shared
+ tdecorations-shared
+
+ DESTINATION ${PLUGIN_INSTALL_DIR}
+)
+
+
+##### other data
+
+tde_create_translated_desktop(
+ SOURCE fahrenheit.desktop
+ DESTINATION ${DATA_INSTALL_DIR}/twin
+)
diff --git a/client/fahrenheit.desktop b/client/fahrenheit.desktop
index 6ffe692..32a887b 100644
--- a/client/fahrenheit.desktop
+++ b/client/fahrenheit.desktop
@@ -1,5 +1,4 @@
-# KDE Desktop Entry
[Desktop Entry]
Encoding=UTF-8
Name=Fahrenheit
-X-TDE-Library=twin3_fahrenheit
+X-TDE-Library=twin_fahrenheit
diff --git a/client/fahrenheitclient.cc b/client/fahrenheitclient.cc
index 3269266..6bd67b2 100644
--- a/client/fahrenheitclient.cc
+++ b/client/fahrenheitclient.cc
@@ -13,11 +13,11 @@
#include <tdelocale.h>
#include <kstandarddirs.h>
-#include <ntqbitmap.h>
-#include <ntqlabel.h>
-#include <ntqlayout.h>
-#include <ntqpainter.h>
-#include <ntqtooltip.h>
+#include <tqbitmap.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqpainter.h>
+#include <tqtooltip.h>
#include "fahrenheitclient.h"
@@ -132,7 +132,10 @@ FahrenheitButton::FahrenheitButton(FahrenheitClient *parent, const char *name,
setBackgroundMode(NoBackground);
setFixedWidth(16);
setCursor(arrowCursor);
- if (pixmap) setPixmap(pixmap);
+ if (!pixmap.isEmpty())
+ {
+ setPixmap(pixmap);
+ }
TQToolTip::add(this, tip);
}
diff --git a/client/fahrenheitclient.h b/client/fahrenheitclient.h
index ab52d0b..36b7953 100644
--- a/client/fahrenheitclient.h
+++ b/client/fahrenheitclient.h
@@ -1,7 +1,7 @@
//////////////////////////////////////////////////////////////////////////////
// fahrenheitclient.h
// -------------------
-// Fahrenheit window decoration for KDE
+// Fahrenheit window decoration for TDE
// -------------------
// Copyright (c) 2003, 2004 David Johnson <david@usermode.org>
//
@@ -27,7 +27,7 @@
#ifndef FAHRENHEITCLIENT_H
#define FAHRENHEITCLIENT_H
-#include <ntqbutton.h>
+#include <tqbutton.h>
#include <kdecoration.h>
#include <kdecorationfactory.h>
@@ -115,7 +115,7 @@ inline void FahrenheitButton::reset()
class FahrenheitClient : public KDecoration
{
- Q_OBJECT
+ TQ_OBJECT
public:
FahrenheitClient(KDecorationBridge *b, KDecorationFactory *f);
virtual ~FahrenheitClient();
diff --git a/client/pics/CMakeLists.txt b/client/pics/CMakeLists.txt
new file mode 100644
index 0000000..3af694e
--- /dev/null
+++ b/client/pics/CMakeLists.txt
@@ -0,0 +1,4 @@
+install(
+ FILES close.png help.png maximize.png minimize.png minmax.png sticky.png unsticky.png
+ DESTINATION ${DATA_INSTALL_DIR}/twin/fahrenheit
+)