Page 1 of 1

The StartUp doesn't work

PostPosted: Sat Oct 03, 2015 11:55 am
by CAEman
The program StartUp doesn't work. This bug won't be if, for example, to create the symbolical reference, first, in the folder ~ / .config/autostart and, secondly, not on an executable file, but on the .desktop file of the program or to copy last in this folder.

Re: The StartUp doesn't work

PostPosted: Sat May 14, 2016 10:48 am
by CAEman
Bug fixing in mainwindow.cc:
Code: Select all
    void MainWindow::setAutostart(bool autostart)
    {
    #ifdef Q_OS_WIN32
        QSettings reg("HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\CurrentVersion\\Run",
                      QSettings::NativeFormat);
        if (autostart) {
            QString app_fname = QString("\"%1\"").arg( QCoreApplication::applicationFilePath() );
            app_fname.replace("/", "\\");
            reg.setValue(QCoreApplication::applicationName(), app_fname);
        }
        else {
            reg.remove(QCoreApplication::applicationName());
        }
        reg.sync();
    #else
        // this is for Linux
        QString app_fname = QFileInfo(QCoreApplication::applicationFilePath()).baseName();
        QString lnk(QDir::homePath()+"/.config/autostart/"+"goldendict.desktop");
        if (autostart) {
            QFile f("/usr/share/applications/goldendict.desktop");
            f.link(lnk);
        } else {
            QFile::remove(lnk);
        }
    #endif
    }

Re: The StartUp doesn't work

PostPosted: Sat May 27, 2017 7:43 am
by CAEman
It isn't a mobile application.
If You really want to fix these and other bugs and defects, ask GD-fix to make You a Collaborator of this repository.