Switch to unified view

a/src/qtgui/respopup.cpp b/src/qtgui/respopup.cpp
...
...
75
                }
75
                }
76
                sub->connect(sub, SIGNAL(triggered(QAction *)), me, 
76
                sub->connect(sub, SIGNAL(triggered(QAction *)), me, 
77
                             SLOT(menuOpenWith(QAction *)));
77
                             SLOT(menuOpenWith(QAction *)));
78
            }
78
            }
79
        }
79
        }
80
81
        // See if there are any desktop files in $RECOLL_CONFDIR/scripts
82
        // and possibly create a "run script" menu.
83
        aps.clear();
84
        ddb = new DesktopDb(path_cat(theconfig->getConfDir(), "scripts"));
85
        if (ddb && ddb->allApps(&aps) && !aps.empty()) {
86
            QMenu *sub = popup->addMenu(me->tr("Run Script"));
87
            if (sub) {
88
                for (vector<DesktopDb::AppDef>::const_iterator it = aps.begin();
89
                     it != aps.end(); it++) {
90
                    QAction *act = new 
91
                        QAction(QString::fromUtf8(it->name.c_str()), me);
92
                    QVariant v(QString::fromUtf8(it->command.c_str()));
93
                    act->setData(v);
94
                    sub->addAction(act);
95
                }
96
                sub->connect(sub, SIGNAL(triggered(QAction *)), me, 
97
                             SLOT(menuOpenWith(QAction *)));
98
            }
99
        }
100
        delete ddb;
80
    }
101
    }
81
102
82
    popup->addAction(me->tr("Copy &File Name"), me, SLOT(menuCopyFN()));
103
    popup->addAction(me->tr("Copy &File Name"), me, SLOT(menuCopyFN()));
83
    popup->addAction(me->tr("Copy &URL"), me, SLOT(menuCopyURL()));
104
    popup->addAction(me->tr("Copy &URL"), me, SLOT(menuCopyURL()));
84
105