Do

Merge lp:~raof/do/do.platform-autostart into lp:do

Proposed by Chris Halse Rogers
Status: Merged
Merge reported by: Chris Halse Rogers
Merged at revision: not available
Proposed branch: lp:~raof/do/do.platform-autostart
Merge into: lp:do
To merge this branch: bzr merge lp:~raof/do/do.platform-autostart
Reviewer Review Type Date Requested Status
David Siegel (community) Approve
Review via email: mp+3675@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Chris Halse Rogers (raof) wrote :

This fixes autostart in a platform-independent way.

Currently, we handle autostart by just adding and deleting gnome-do.desktop from ~/.config/autostart/ in the Preferences dialog. This is obviously not platform-neutral, and is wrong even in GNOME - when there's an autostart file in /etc/xdg/autostart, deleting the file in ~/.config/autostart doesn't prevent autostart.

This branch fixes these issues by adding and AutostartService with an XdgAutostartService implemented in Do.Platform.Linux. This uses Gnome.DesktopItem to toggle the Hidden key in the autostart file.

lp:~raof/do/do.platform-autostart updated
1009. By Chris Halse Rogers

Remove OnlyShowIn=GNOME. Do works just fine in KDE and XFCE

Revision history for this message
David Siegel (djsiegel-deactivatedaccount) wrote :

I highly suggest using AbstractSystemService for autostart features instead of creating a new service.

s/IAutostartService/AbstractAutoStartService
s/Autostart/AutoStart

Remove System.IO prefixes in XdgAutostartService.

lp:~raof/do/do.platform-autostart updated
1010. By Chris Halse Rogers

Move autostart handling into SystemService

This is what I was looking for initially!

1011. By Chris Halse Rogers

Use more Gnome.DesktopItem functionality.

Use DesktopItem's file writing and existance testing, and construct the initial DesktopItem from the resource string

1012. By Chris Halse Rogers

Catch possible exceptions in writing the initial autostart desktop file

1013. By Chris Halse Rogers

Remove XdgAutostartService from Do.Platform.Linux addin.xml

1014. By Chris Halse Rogers

C# thinks explicit is better than implicit; Explicitly override IsAutoStartEnabled & SetAutoStart

1015. By Chris Halse Rogers

DesktopItem.NewFromUri throws an exception when the desktop file doesn't exist. Catch this to write out the initial file instead

1016. By Chris Halse Rogers

Embed gnome-do.desktop as a resource in Do.Platform.Linux, as that's where it's used

1017. By Chris Halse Rogers

Remove last vestiges of Autostart handling from GeneralPreferencesWidget

1018. By Chris Halse Rogers

Update MonoDevelop project

Revision history for this message
Chris Halse Rogers (raof) wrote :

Autostart is now handled in SystemService. Please re-review.

Revision history for this message
David Siegel (djsiegel-deactivatedaccount) wrote :

s/SetAutoStart/SetAutoStartEnabled

Make AutoStartFile a method, since it's expensive, and cache the result in the Service instance? If you cache it, you can keep it as a property.

Revision history for this message
David Siegel (djsiegel-deactivatedaccount) wrote :

Looks good to me.

review: Approve
lp:~raof/do/do.platform-autostart updated
1019. By Chris Halse Rogers

Cache AutoStartFile

1020. By Chris Halse Rogers

SetAutoStart ⇒ SetAutoStartEnabled

1021. By Chris Halse Rogers

Stop embedding gnome-do.desktop as a resource.

Move gnome-do.desktop.in to data/, and stop embedding it in Do.exe and Do.Platform.Linux. This was breaking 'make distcheck', and was only really working by accident before these changes

1022. By Chris Halse Rogers

Load a gnome-do.desktop file that we know will exist, because we install it there