Nitroshare 'Load at startup' checkbox state doesn't persist

Bug #1028732 reported by Saji Nediyanchath on 2012-07-25
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Fix Committed
Nathan Osman

Bug Description

After selecting ''Load at startup' option from the nitroshare indicator in Ubuntu 12.04, and then clicking Ok and closed the dialog. After this when we open the settings dialog again, the checkbox, still remains unchecked, but when I restarted my machine, I found that Nitroshare has automatically started up at my system startup. So it seems that the checkbox state is not persisting, even though the settings value is updated.

Related branches

Mateo Salta (mateo-salta) wrote :

Same here on Xubuntu 12.04,

-Select "Load at startup"
-Click OK
-Open Settings again
-Check box is blank, but Launcher was copied to correct location
-Restart computer and NItroShare launches
-Check box still blank

If I remember right, It did this on the mac version at first too, I changed "settings.cpp line #60" from `#ifdef Q_OS_LINUX` to `#if defined(Q_OS_LINUX)` , not sure if that will apply to the linux case.

Nathan Osman (george-edison55) wrote :

I am currently in the middle of making some improvements to the file transferring code. I will take a look at this after and see if I can figure out why the setting doesn't persist.

Changed in nitroshare:
assignee: nobody → Nathan Osman (george-edison55)
importance: Undecided → Medium
status: New → Confirmed
description: updated
Saji Nediyanchath (saji89) wrote :

No problem nathan,
 Take your time. We're thankful to you, for this wonderful application. If I knew C++ a bit more I would have tried my hands on the code, but don't think am upto it.

Mateo Salta (mateo-salta) wrote :

Ok, I figured it out, it turns out that when the file is copied over to `~/.config/autostart` Ubuntu changes the name of `extras-nitroshare.desktop` to `nitroshare.desktop` (strange). So all we need to change is line #94 `return GetStartupDir().exists("extras-nitroshare.desktop");` to `return GetStartupDir().exists("nitroshare.desktop");`

I made a patch that has this change, to apply to source, get NitroShare source and extract - put `nitroshare.patch` in extracted `nitroshare` folder, open terminal in that folder, then run `patch -p1 < nitroshare.patch`

Mateo Salta (mateo-salta) wrote :

Nathan, just saw development, and you beat me to it, but I thin how you changed it would leave users that had the older version that copied over "nitroshare.desktop" would end up having two launchers. Unless it deletes the "nitroshare.desktop" if it exists

Nathan Osman (george-edison55) wrote :

Yeah, I think we both discovered the problem at the same time :) I'm not too worried about the trunk branch since it is unstable by nature. But I will probably need to fix the bug in the stable 0.2 branch and I will need to make sure existing users don't end up with two instances of Nitroshare running.

Changed in nitroshare:
status: Confirmed → In Progress
Mateo Salta (mateo-salta) wrote :

Nathan, I put up code on my branch that will delete the old launcher, since if you switch versions with the old start-up launcher, It will cause a problem where NitroShare will always start-up, or try to launch twice, unless the old file is deleted. This fixes the main problem with the fix - and keeps the file name the same going forward.

Mateo Salta (mateo-salta) wrote :

Ok, made a PPA with the changes, if someone wants to test them.

Mateo Salta (mateo-salta) wrote :

The PPA was based on development, so everything else seems not to work..

Nathan, which branch can I use to make a PPA from the stable version, or how to do that.

Nathan Osman (george-edison55) wrote :

I'm marking this as committed since (a) it is from 2012 and the application has been rewritten since then and (b) the upcoming 0.3.2 release doesn't have this problem.

Changed in nitroshare:
status: In Progress → Fix Committed
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers