GNOME Bugzilla – Bug 725765
Install .desktop file and basic desktop integration
Last modified: 2014-04-16 15:16:14 UTC
Create a california.desktop file and install it in the proper place. Bonus points if it's marked for translation. In addition to the usual benefits of registering a .desktop file, this should also allow the user to choose California as their default calendar application in System Settings -> Default Applications -> Details.
I've created it manually as ~/.local/share/applications/california.desktop and set it as default with: $ xdg-mime default california.desktop text/calendar $ update-desktop-database Then I wanted to set it as default for gnome-shell calendar: $ gsettings set org.gnome.desktop.default-applications.office.calendar exec california However, the button "Open calendar" doesn't show up. It used to some time ago when I tested gnome-calendar.. Don't know what's wrong.
Today I've checked on my computer at work, where I had installed gnome-calendar. The Open calendar link was present on my gnome-shell calendar, but it didn't work when I clicked on it *after I've set the exec value to 'california'* (it used to work when it was set to 'gnome-calendar'). I think that it tried to open gnome-calendar, despite the setting, and it failed. So I disinstalled gnome-calendar (I compiled it some months ago) and the Open calendar link disappeared from the gnome-shell calendar. Interesting. So maybe org.gnome.desktop.default-applications.office.calendar is not the right schema? Oh, just found on dconf-editor: Schema: org.gnome.desktop.default-applications.office.calendar "Default calendar application DEPRECATED: This key is deprecated and ignored. The preferred calendar application is the application handling the text/calendar mime type." So it should be ok. Why the Open calendar link disappeared?
As soon as I recompile gnome-calendar, the Open calendar link shows up again. And it opens correctly if I set the schema above to 'gnome-calendar'. Well, now the note about the deprecation of the schema above is puzzling me..
I haven't had a chance to look into these issues so I can't comment on them in relation to California. I know that with Geary and Shotwell, we simply install a .desktop file with the right MIME associations and all kinds of desktop integration begins to work. My suggestion to you (if you want to continue looking into this) is to use gnome-calendar's .desktop file, altering it to fit California, and install that. Also go to System Settings -> Details -> Default Applications and ensure California is available there. Finally, know that California does no command-line processing and so it can't accept associated files (i.e. .ics files or URLs for online calendars). This will also be required to integrate California with the desktop.
I had already adapted gnome-calendar's desktop file, this way: [Desktop Entry] Name=California Comment=Access and manage calendar Comment[it]=Accedi e gestisci il calendario Exec=california Icon=x-office-calendar Terminal=false Type=Application StartupNotify=true OnlyShowIn=GNOME; Categories=GNOME;GTK;Utility;Core; MimeType=text/calendar; California is listed in System Settings>Details>Default Applications. But the Open calendar link in gnome-shell calendar is not available when California is set as default.
I had the chance to test this on a new system installation. In this case California is set as calendar application in Gnome preferences, the Open calendar _is_ still present but it launches Evolution. IIRC Evolution was not installed on my old PC. Which could explain the problem described before. How can I set California in gnome-shell? (I've tried also the deprecated setting in dconf, but it didn't work)
I haven't had a chance to investigate this, but definitely getting this solved should be considered part of this ticket. I've changed the title to reflect this.
Pushed to master, commit 51c951 A couple of notes: * Federico, I got this to work with GNOME Shell's calendar by restarting the shell after selecting California as the default calendar. If that doesn't work, you might try logging out and logging back in. If the problem persists, please file a ticket. * I investigated having California integrate with Unity's calendar indicator (in the top-right corner) but it appears that indicator is hardwired to use Evolution. I've requested this be changed: https://bugs.launchpad.net/ubuntu/+source/unity/+bug/1308296
I've compiled the latest version from git, but it doesn't work here (debian unstable, gnome 3.8.4). I believe that also in GNOME shell the calendar is hardwired to use Evolution. Here's what I've found: - if Evolution is not installed, the Open calendar button in gnome-shell doesn't appear. - if Evolution is installed, the Open calendar button appears but it launches Evolution, even if California is set as default application for calendar in the Gnome preferences.
entered a new issue: https://bugzilla.gnome.org/show_bug.cgi?id=728349