summaryrefslogtreecommitdiffstats
path: root/tdegtk/tdegtk-theme.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tdegtk/tdegtk-theme.cpp')
-rw-r--r--tdegtk/tdegtk-theme.cpp26
1 files changed, 14 insertions, 12 deletions
diff --git a/tdegtk/tdegtk-theme.cpp b/tdegtk/tdegtk-theme.cpp
index b99c485..aa7751e 100644
--- a/tdegtk/tdegtk-theme.cpp
+++ b/tdegtk/tdegtk-theme.cpp
@@ -47,23 +47,25 @@ bool m_scrollbarForward1 = false;
bool m_scrollbarBack2 = false;
bool m_scrollbarForward2 = false;
+#include <gmodule.h>
+#include <kdemacros.h>
+
extern "C" {
- #include <gmodule.h>
#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) {
//
}
}
@@ -199,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();
}
@@ -343,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;
}
@@ -409,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) {
@@ -755,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;
}
@@ -765,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);
@@ -1028,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());
}
}
// =========================================================================================================