From fe56f701d772b2ffb9369bc5fcffd14a1826d770 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sl=C3=A1vek=20Banko?= Date: Thu, 14 Jul 2022 15:21:56 +0200 Subject: Conversion to the cmake building system. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Slávek Banko --- tdegtk/tdegtk-theme.cpp | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) (limited to 'tdegtk/tdegtk-theme.cpp') 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 +#include extern "C" { #include #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()); } } // ========================================================================================================= -- cgit v1.2.1