Commit 47f3f266 authored by Jim Nelson's avatar Jim Nelson

Add "Geary Mail" to messaging menu: Closes #5733

parent 5d8728a9
......@@ -37,6 +37,10 @@ if (DESKTOP_UPDATE)
message(STATUS "Desktop database will be updated")
endif ()
find_package(PkgConfig)
pkg_check_modules(LIBINDICATE QUIET indicate-0.7>=0.6.1)
pkg_check_modules(LIBUNITY QUIET unity>=5.12.0)
# intl
include(Gettext)
if (XGETTEXT_FOUND)
......
#
# Install geary.desktop
#
install(
FILES
geary.desktop
DESTINATION
share/applications
)
install(FILES geary.desktop DESTINATION /usr/share/applications)
if (LIBINDICATE_FOUND)
install(FILES geary DESTINATION /usr/share/indicators/messages/applications)
endif ()
# Optional: run update-desktop-database at install time.
# (This has to happen after the geary.desktop file is installed.)
......
/usr/share/applications/geary.desktop
# See src/client/geary-application.vala for corresponding strings in the application
[Desktop Entry]
Icon=geary
Name=Geary
GenericName=Email Client
Encoding=UTF-8
Name=Geary Mail
GenericName=Mail Client
Comment=Send and receive email
Icon=geary
TryExec=geary
Exec=geary %U
Type=Application
Terminal=false
Categories=GNOME;GTK;Network;Office;Email;
MimeType=x-scheme-handler/mailto;
StartupNotify=true
......@@ -262,9 +262,6 @@ ensure_vala_version("0.17.4" MINIMUM)
include(ValaPrecompile)
# Packages
find_package(PkgConfig)
pkg_check_modules(LIBINDICATE QUIET indicate-0.7>=0.6.1)
if (LIBINDICATE_FOUND)
message(STATUS "Unity messaging menu support: ON")
set(EXTRA_CLIENT_PKG_CONFIG
......@@ -286,7 +283,6 @@ else ()
message(STATUS "Unity messaging menu support: OFF")
endif ()
pkg_check_modules(LIBUNITY QUIET unity>=5.12.0)
if (LIBUNITY_FOUND)
message(STATUS "Unity launcher support: ON")
set(EXTRA_CLIENT_PKG_CONFIG
......
......@@ -21,8 +21,8 @@ public class GearyApplication : YorbaApplication {
// These strings must match corresponding strings in desktop/geary.desktop *exactly* and be
// internationalizable
public const string DESKTOP_NAME = _("Geary");
public const string DESKTOP_GENERIC_NAME = _("Email Client");
public const string DESKTOP_NAME = _("Geary Mail");
public const string DESKTOP_GENERIC_NAME = _("Mail Client");
public const string DESKTOP_COMMENT = _("Send and receive email");
public const string VERSION = _VERSION;
......@@ -511,7 +511,7 @@ along with Geary; if not, write to the Free Software Foundation, Inc.,
public File? get_desktop_file() {
File desktop_file = is_installed()
? File.new_for_path(INSTALL_PREFIX).get_child("share/applications/geary.desktop")
? File.new_for_path("/usr/share/applications/geary.desktop")
: File.new_for_path(SOURCE_ROOT_DIR).get_child("desktop/geary.desktop");
return desktop_file.query_exists() ? desktop_file : null;
......
......@@ -6,18 +6,13 @@
public class Libindicate : NewMessagesIndicator {
#if HAVE_LIBINDICATE
private Indicate.Server indicator;
private Indicate.Indicator compose;
private Indicate.Indicator inbox;
private Indicate.Server? indicator = null;
private Indicate.Indicator? compose = null;
private Indicate.Indicator? inbox = null;
public Libindicate(NewMessagesMonitor monitor) {
base (monitor);
debug("Using libindicate for messaging menu support");
indicator = Indicate.Server.ref_default();
indicator.set_type("message.email");
// Find the desktop file this app instance is using (running from build dir vs. install dir)
File? desktop_file = GearyApplication.instance.get_desktop_file();
if (desktop_file == null) {
......@@ -26,6 +21,10 @@ public class Libindicate : NewMessagesIndicator {
return;
}
debug("Using libindicate for messaging menu support w/ .desktop file %s", desktop_file.get_path());
indicator = Indicate.Server.ref_default();
indicator.set_type("message.email");
indicator.set_desktop_file(desktop_file.get_path());
indicator.server_display.connect(on_display_server);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment