summaryrefslogtreecommitdiffstats
path: root/tdegtk/tdegtk-theme.cpp
diff options
context:
space:
mode:
authorSlávek Banko <slavek.banko@axis.cz>2022-07-14 15:21:56 +0200
committerSlávek Banko <slavek.banko@axis.cz>2022-07-16 01:19:11 +0200
commit59e7165b471d81822645822b4826f640ee5af9b5 (patch)
tree1165c9c6dec7273c7b86fcf3de818730e748963d /tdegtk/tdegtk-theme.cpp
parentff9c6cc4f72e57e59d0872c9b809ce7bbd6020e8 (diff)
downloadgtk3-tqt-engine-e65b051d4513cd610bffb3ec66585c6594ac5ca5.tar.gz
gtk3-tqt-engine-e65b051d4513cd610bffb3ec66585c6594ac5ca5.zip
Conversion to the cmake building system.r14.0.13r14.0.x
Signed-off-by: Slávek Banko <slavek.banko@axis.cz> (cherry picked from commit fe56f701d772b2ffb9369bc5fcffd14a1826d770)
Diffstat (limited to 'tdegtk/tdegtk-theme.cpp')
-rw-r--r--tdegtk/tdegtk-theme.cpp23
1 files changed, 12 insertions, 11 deletions
diff --git a/tdegtk/tdegtk-theme.cpp b/tdegtk/tdegtk-theme.cpp
index 842c10d..aa7751e 100644
--- a/tdegtk/tdegtk-theme.cpp
+++ b/tdegtk/tdegtk-theme.cpp
@@ -48,23 +48,24 @@ bool m_scrollbarBack2 = false;
bool m_scrollbarForward2 = false;
#include <gmodule.h>
+#include <kdemacros.h>
extern "C" {
#include <gtk/gtk.h>
#include "tdegtk-engine.h"
- G_MODULE_EXPORT void theme_init(GTypeModule *module);
+ KDE_EXPORT void theme_init(GTypeModule *module);
- G_MODULE_EXPORT void theme_exit(void);
+ KDE_EXPORT void theme_exit(void);
- G_MODULE_EXPORT GtkThemingEngine* create_engine(void);
+ KDE_EXPORT GtkThemingEngine* create_engine(void);
- G_MODULE_EXPORT void theme_init(GTypeModule *module) {
+ KDE_EXPORT void theme_init(GTypeModule *module) {
tdegtk_engine_register_types(module);
}
- G_MODULE_EXPORT void theme_exit(void) {
+ KDE_EXPORT void theme_exit(void) {
//
}
}
@@ -200,7 +201,7 @@ TQString tdeFindDir(const TQString& suffix, const TQString& file1, const TQStrin
}
TQString runCommand(const TQString& command) {
- FILE* p = popen(command.latin1(), "r");
+ FILE* p = popen(command.local8Bit(), "r");
if (p == NULL) {
return TQString();
}
@@ -344,7 +345,7 @@ GtkIconSet* generateIconSet(const std::string& gtkIconName, const std::string& t
// loop over provided path to see if at least one icon is found
for (TQStringList::const_iterator pathIter = pathList.begin(); pathIter != pathList.end(); ++pathIter) {
- std::string filename((*pathIter + '/' + iconFileStream.str()).latin1());
+ std::string filename((*pathIter + '/' + iconFileStream.str().c_str()).local8Bit());
if (!std::ifstream(filename.c_str())) {
continue;
}
@@ -410,7 +411,7 @@ void setColour(TQString name, TQString state, TQColor color, TQString widgetType
if (state == ":normal") {
state = "";
}
- gtk3_tqt_load_resource_string(parse_rc_string(name + ": " + colorString(color), widgetTypes + state).latin1());
+ gtk3_tqt_load_resource_string(parse_rc_string(name + ": " + colorString(color), widgetTypes + state).local8Bit());
}
static TQStringList iconInheritsDirs(const TQString& icondir) {
@@ -756,7 +757,7 @@ void writeGtkThemeControlFile(int forceRecreate) {
// This cache matches the current icon theme and style
themeFile.close();
- gtk3_tqt_reload_theme_definition_file(themeFilePath.latin1());
+ gtk3_tqt_reload_theme_definition_file(themeFilePath.local8Bit());
return;
}
@@ -766,7 +767,7 @@ void writeGtkThemeControlFile(int forceRecreate) {
if (gtk3TQtDebug) {
// Load possibly modified theme control file before writing a new one
- gtk3_tqt_reload_theme_definition_file(themeFilePath.latin1());
+ gtk3_tqt_reload_theme_definition_file(themeFilePath.local8Bit());
}
themeFile.open(IO_WriteOnly | IO_Truncate);
@@ -1029,7 +1030,7 @@ void writeGtkThemeControlFile(int forceRecreate) {
themeFile.close();
if (!gtk3TQtDebug) {
- gtk3_tqt_reload_theme_definition_file(themeFilePath.latin1());
+ gtk3_tqt_reload_theme_definition_file(themeFilePath.local8Bit());
}
}
// =========================================================================================================