*/
#include "dialogfileplaceholder.hpp"
-#include "ui_dialogfileplaceholders.h"
+#include "ui_dialogfileplaceholder.h"
DialogFilePlaceholder::DialogFilePlaceholder(QWidget *parent) :
QDialog(parent), ui(new Ui::DialogFilePlaceHolders){
connect(ui->tableWidget,
SIGNAL(customContextMenuRequested(const QPoint&)),
SLOT(handleTableContextMenu(const QPoint&)));
- ContextHandler* handler = new ContextHandler();
}
/**
handler = new ContextHandler;
handler->m_text = ReQStringUtil::nodeOf(file);
handler->m_program = file;
- handler->m_arguments = fileType;
+ handler->m_arguments = "${full}";
+#if defined WIN32
+ if (handler->m_text == "cmd.exe")
+ handler->m_arguments = "";
+#endif
+ handler->m_fileType = fileType;
handler->m_directoryMode = fileType == ContextHandler::FT_FILE
? ContextHandler::DM_TO_PARENT
: ContextHandler::DM_TO_FILE;
handler = createHandlerIfExists("/usr/bin/gnome-terminal", ContextHandler::FT_DIR);
if (handler != NULL)
m_list.append(handler);
-#elif defined __WIN32__
+#elif defined WIN32
handler = createHandlerIfExists("c:\\windows\\system32\\notepad.exe");
- if (handler == NULL)
- m_contextHandlers.list().append(handler);
+ if (handler != NULL)
+ m_list.append(handler);
handler = createHandlerIfExists("c:\\windows\\system32\\cmd.exe", ContextHandler::FT_DIR);
- if (handler == NULL)
+ if (handler != NULL)
m_list.append(handler);
#endif
if (index > 0){
int index2 = filename.lastIndexOf('/');
if (index2 < index){
-#if defined __WIN32__
+#if defined WIN32
index2 = filename.lastIndexOf('\\');
if (index2 < index)
rc = filename.mid(index);
if (index >= 0)
rc = filename.mid(index + 1);
else{
-#if defined __WIN32__
+#if defined WIN32
index = filename.lastIndexOf('\\');
if (index < 0)
rc = filename;
* @return the path with native path separators
*/
inline static QString nativePath(const QString& path){
-#if defined __WIN32__
+#if defined WIN32
QString rc(path); return rc.replace("/", "\\");
#else
return path;