summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: ab51a71)
raw | patch | inline | side by side (parent: ab51a71)
author | ishmal <ishmal@users.sourceforge.net> | |
Wed, 31 May 2006 22:16:32 +0000 (22:16 +0000) | ||
committer | ishmal <ishmal@users.sourceforge.net> | |
Wed, 31 May 2006 22:16:32 +0000 (22:16 +0000) |
src/registrytool.cpp | patch | blob | history | |
src/registrytool.h | patch | blob | history |
diff --git a/src/registrytool.cpp b/src/registrytool.cpp
index 6747a0dd8445e2bae6253ffea24903c6afd50737..69a2faaf9a169a69a04a590970c3fb521694808e 100644 (file)
--- a/src/registrytool.cpp
+++ b/src/registrytool.cpp
{ NULL, 0, NULL }
};
-bool RegistryTool::setStringValue(const std::string &keyNameArg,
- const std::string &valueName,
- const std::string &value)
+bool RegistryTool::setStringValue(const Glib::ustring &keyNameArg,
+ const Glib::ustring &valueName,
+ const Glib::ustring &value)
{
- std::string keyName = keyNameArg;
+ Glib::ustring keyName = keyNameArg;
HKEY rootKey = HKEY_LOCAL_MACHINE; //default root
//Trim out the root key if necessary
return true;
}
-bool RegistryTool::getExeInfo(std::string &fullPath,
- std::string &path,
- std::string &exeName)
+bool RegistryTool::getExeInfo(Glib::ustring &fullPath,
+ Glib::ustring &path,
+ Glib::ustring &exeName)
{
char buf[MAX_PATH+1];
fullPath = buf;
path = "";
exeName = "";
- std::string::size_type pos = fullPath.rfind('\\');
+ Glib::ustring::size_type pos = fullPath.rfind('\\');
if (pos != fullPath.npos)
{
path = fullPath.substr(0, pos);
bool RegistryTool::setPathInfo()
{
- std::string fullPath;
- std::string path;
- std::string exeName;
+ Glib::ustring fullPath;
+ Glib::ustring path;
+ Glib::ustring exeName;
if (!getExeInfo(fullPath, path, exeName))
return false;
//printf("full:'%s' path:'%s' exe:'%s'\n",
// fullPath.c_str(), path.c_str(), exeName.c_str());
- std::string keyName =
+ Glib::ustring keyName =
"HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\App Paths\\";
keyName.append(exeName);
- std::string valueName = "";
- std::string value = fullPath;
+ Glib::ustring valueName = "";
+ Glib::ustring value = fullPath;
if (!setStringValue(keyName, valueName, value))
return false;
//add our subdirectories
- std::string appPath = path;
+ Glib::ustring appPath = path;
appPath.append("\\python;");
appPath.append(path);
appPath.append("\\perl");
diff --git a/src/registrytool.h b/src/registrytool.h
index 9aa64418950a69c9edd237ae3938fffd06e447f7..e98f2df3886cf16b0a3b0213cf96341cd71686b9 100644 (file)
--- a/src/registrytool.h
+++ b/src/registrytool.h
*/
#include <string>
+#include <glibmm.h>
class RegistryTool
{
virtual ~RegistryTool()
{}
- bool setStringValue(const std::string &key,
- const std::string &valueName,
- const std::string &value);
+ bool setStringValue(const Glib::ustring &key,
+ const Glib::ustring &valueName,
+ const Glib::ustring &value);
- bool getExeInfo(std::string &fullPath,
- std::string &path,
- std::string &exeName);
+ bool getExeInfo(Glib::ustring &fullPath,
+ Glib::ustring &path,
+ Glib::ustring &exeName);
bool setPathInfo();