]> gitweb.hamatoma.de Git - reqt/commitdiff
win32 corrections
authorHamatoma <git.tortouse@hm.f-r-e-i.de>
Wed, 6 May 2015 22:24:44 +0000 (00:24 +0200)
committerHamatoma <git.tortouse@hm.f-r-e-i.de>
Wed, 6 May 2015 22:24:44 +0000 (00:24 +0200)
appl/refind/dialogfileplaceholder.cpp
appl/refind/mainwindow.cpp
appl/refind/utils.cpp
appl/refind/utils.hpp
base/ReQStringUtil.cpp
base/ReQStringUtil.hpp

index 5ea410076b57c2004f6eb3067c43c76730522e89..959f312f3879ba516e2538af48915a5319bb6fb9 100644 (file)
@@ -7,7 +7,7 @@
  */
 
 #include "dialogfileplaceholder.hpp"
-#include "ui_dialogfileplaceholders.h"
+#include "ui_dialogfileplaceholder.h"
 
 DialogFilePlaceholder::DialogFilePlaceholder(QWidget *parent) :
          QDialog(parent), ui(new Ui::DialogFilePlaceHolders){
index 8aa58e1ded98ff262c42cc5143c5d51c8c22ae07..78d5a772fa000bbe15ea13a18b32fb5222b6822e 100644 (file)
@@ -498,7 +498,6 @@ void MainWindow::prepareContextMenu(){
    connect(ui->tableWidget,
             SIGNAL(customContextMenuRequested(const QPoint&)),
             SLOT(handleTableContextMenu(const QPoint&)));
-   ContextHandler* handler = new ContextHandler();
 }
 
 /**
index 71a48ce24f0dc75d0a97d23af0a9da7d514953cd..9a54c42acdfca54fcad4ae155124717fcbb006cc 100644 (file)
@@ -108,7 +108,12 @@ ContextHandler* createHandlerIfExists(const QString& file,
         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;
@@ -162,12 +167,12 @@ void ContextHandlerList::restore(ReStateStorage& storage){
            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
index c2bea60c0385ff4626a4d8ec34365c9f704ed44b..1d3ad406a4e8acc4cf2c8d5a5b9c06eb41fcfdba 100644 (file)
@@ -8,7 +8,9 @@
 
 #ifndef UTILS_HPP
 #define UTILS_HPP
-
+#ifndef REBASE_HPP
+#include "base/rebase.hpp"
+#endif
 #include <QTableWidget>
 #include "gui/ReStateStorage.hpp"
 enum {
index 94c376664d2ab7c2742f3443d4f8f8f925a9a030..e6160fb60c43c31653ffbb6011c0d53cd0518f7e 100644 (file)
@@ -48,7 +48,7 @@ ReString ReQStringUtil::extensionOf(const ReString& filename){
    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);
@@ -370,7 +370,7 @@ ReString ReQStringUtil::nodeOf(const ReString& filename){
    if (index >= 0)
       rc = filename.mid(index + 1);
    else{
-#if defined __WIN32__
+#if defined WIN32
       index = filename.lastIndexOf('\\');
       if (index < 0)
       rc = filename;
index 950163f74c4eb4880e3db8aaf275b041b6e3bacb..2ca937448608011b725df75dac66df92dc91edb9 100644 (file)
@@ -36,7 +36,7 @@ public:
     * @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;