[geary/geary-0.11] Fix Geary not being able to be pinned in gnome-shell. Bug 776721.



commit bdbe0ede244ad3735e5d3f75b023216d2c3606d7
Author: Ralph Plawetzki <ralph purejava org>
Date:   Fri Jan 27 15:18:23 2017 +0100

    Fix Geary not being able to be pinned in gnome-shell. Bug 776721.
    
    * desktop/CMakeLists.txt: Duplicate both the desktop and appdata
      files since current gnome-shell and appdata now have renames
      for these in place.
    
    * cmake/FindIntltool.cmake: Let desktop file names be specified
      by the caller.
    
    * desktop/org.gnome.Geary.desktop.in: Duplicate geary.desktop.in,
      but with Hidden=true, so the desktop file exists but is not
      duplicated in app menus.

 cmake/FindIntltool.cmake           |    4 ++--
 desktop/CMakeLists.txt             |    2 ++
 desktop/org.gnome.Geary.desktop.in |   21 +++++++++++++++++++++
 po/POTFILES.in                     |    1 +
 4 files changed, 26 insertions(+), 2 deletions(-)
---
diff --git a/cmake/FindIntltool.cmake b/cmake/FindIntltool.cmake
index 067b360..be5a693 100644
--- a/cmake/FindIntltool.cmake
+++ b/cmake/FindIntltool.cmake
@@ -13,11 +13,11 @@ endif (INTLTOOL_MERGE_EXECUTABLE)
 
 if (INTLTOOL_MERGE_FOUND)
     macro (INTLTOOL_MERGE_DESKTOP desktop_id po_dir)
-        add_custom_target (geary.desktop ALL
+        add_custom_target (${desktop_id}.desktop ALL
             ${INTLTOOL_MERGE_EXECUTABLE} --desktop-style ${CMAKE_SOURCE_DIR}/${po_dir}
                 ${CMAKE_CURRENT_SOURCE_DIR}/${desktop_id}.desktop.in ${desktop_id}.desktop
         )
-        install (FILES ${CMAKE_CURRENT_BINARY_DIR}/geary.desktop DESTINATION 
${CMAKE_INSTALL_PREFIX}/share/applications) 
+        install (FILES ${CMAKE_CURRENT_BINARY_DIR}/${desktop_id}.desktop DESTINATION 
${CMAKE_INSTALL_PREFIX}/share/applications)
     endmacro (INTLTOOL_MERGE_DESKTOP desktop_id po_dir)
     macro (INTLTOOL_MERGE_AUTOSTART_DESKTOP desktop_id po_dir)
         add_custom_target (geary-autostart.desktop ALL
diff --git a/desktop/CMakeLists.txt b/desktop/CMakeLists.txt
index 127911f..d98d723 100644
--- a/desktop/CMakeLists.txt
+++ b/desktop/CMakeLists.txt
@@ -3,11 +3,13 @@
 #
 
 install(FILES geary.appdata.xml DESTINATION share/appdata)
+install(FILES geary.appdata.xml DESTINATION share/appdata RENAME org.gnome.Geary.appdata.xml)
 
 include (FindIntltool)
 include (FindDesktopFileValidate)
 if (INTLTOOL_MERGE_FOUND)
     INTLTOOL_MERGE_DESKTOP (geary po)
+    INTLTOOL_MERGE_DESKTOP (org.gnome.Geary po)
     INTLTOOL_MERGE_AUTOSTART_DESKTOP (geary-autostart po)
     
     if (DESKTOP_VALIDATE)
diff --git a/desktop/org.gnome.Geary.desktop.in b/desktop/org.gnome.Geary.desktop.in
new file mode 100644
index 0000000..c550355
--- /dev/null
+++ b/desktop/org.gnome.Geary.desktop.in
@@ -0,0 +1,21 @@
+[Desktop Entry]
+_Name=Geary
+_GenericName=Mail Client
+_X-GNOME-FullName=Geary Mail
+_Comment=Send and receive email
+_Keywords=Email;E-mail;Mail;
+Icon=geary
+TryExec=geary
+Exec=geary %U
+NoDisplay=true
+Type=Application
+Terminal=false
+Categories=GNOME;GTK;Network;Email;
+MimeType=x-scheme-handler/mailto;
+StartupNotify=true
+Actions=Compose;
+
+[Desktop Action Compose]
+_Name=Compose Message
+Exec=geary mailto:
+OnlyShowIn=X-Messaging Menu;Unity;
diff --git a/po/POTFILES.in b/po/POTFILES.in
index 8f0beae..d3d2eb2 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -1,5 +1,6 @@
 [encoding: UTF-8]
 desktop/geary.desktop.in
+desktop/org.gnome.Geary.desktop.in
 desktop/geary-autostart.desktop.in
 [type: gettext/ini]desktop/geary-attach.contract.in
 src/client/accounts/account-dialog-account-list-pane.vala


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]