Merge lp:~mateo-salta/nitroshare/0.2 into lp:nitroshare/0.2

Proposed by Mateo Salta
Status: Needs review
Proposed branch: lp:~mateo-salta/nitroshare/0.2
Merge into: lp:nitroshare/0.2
Diff against target: 26 lines (+4/-3)
1 file modified
src/util/settings.cpp (+4/-3)
To merge this branch: bzr merge lp:~mateo-salta/nitroshare/0.2
Reviewer Review Type Date Requested Status
Nathan Osman Pending
Review via email:

Description of the change

Fix of extras-nitroshare.desktop load at startup persistence.

Part of code that was changed in "settings.cpp"


#elif defined(Q_OS_LINUX)
    QString desktop_file = GetStartupDir().absoluteFilePath("extras-nitroshare.desktop");
    QString bugdesktop_file = GetStartupDir().absoluteFilePath("nitroshare.desktop");
    if(load) QFile::copy(":/other/extras-nitroshare.desktop", desktop_file);
    else QFile::remove(desktop_file);


This should fix the persistence, as well as prevent problems in updating, and keeps the "extras-nitroshare.desktop" naming convention.

To verify, Open unchanged linux version of NitroShare, and Check "Load at startup" in Settings, this will create the "nitroshare.desktop" file in `~/.config/autostart`, now with the startup file still there change to version with fix. The new version should detect the old startup file when launching the "settings". Also It will delete the old one and replace it(if you want it to still load at startup) once you click "Ok".

To post a comment you must log in.

Unmerged revisions

140. By Mateo Salta

Fix first run with old .desktop file not detecting startup value

139. By Mateo Salta

Fix for startup persistence, and fix of possible duplicate startup problem

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/util/settings.cpp'
2--- src/util/settings.cpp 2012-07-06 18:54:00 +0000
3+++ src/util/settings.cpp 2012-12-04 23:28:22 +0000
4@@ -79,7 +79,7 @@
6 return registry.contains("NitroShare");
7 #elif defined(Q_OS_LINUX)
8- return GetStartupDir().exists("extras-nitroshare.desktop");
9+ return GetStartupDir().exists("extras-nitroshare.desktop") or GetStartupDir().exists("nitroshare.desktop");
10 #endif
12 /* Just return false on other platforms. */
13@@ -96,10 +96,11 @@
14 if(load) registry.setValue("NitroShare", QCoreApplication::applicationFilePath());
15 else registry.remove("NitroShare");
16 #elif defined(Q_OS_LINUX)
17- QString desktop_file = GetStartupDir().absoluteFilePath("nitroshare.desktop");
19+ QString desktop_file = GetStartupDir().absoluteFilePath("extras-nitroshare.desktop");
20+ QString bugdesktop_file = GetStartupDir().absoluteFilePath("nitroshare.desktop");
21 if(load) QFile::copy(":/other/extras-nitroshare.desktop", desktop_file);
22 else QFile::remove(desktop_file);
23+ QFile::remove(bugdesktop_file);
24 #else
25 /* Mark the variable as unused. */
26 Q_UNUSED(load);


People subscribed via source and target branches

to all changes: