Contractor support: Bug #734717
This commit is contained in:
parent
9d85f436c7
commit
66dc465d89
7 changed files with 70 additions and 1 deletions
3
THANKS
3
THANKS
|
|
@ -33,9 +33,9 @@ Philipp Nordhus <philipp@nhus.de>
|
|||
Andreas Obergrusberger <tradiaz@yahoo.de>
|
||||
Martin Olsson <martin@minimum.se>
|
||||
Robert Park <rbpark@exolucere.ca>
|
||||
ritchiew <rawilson52@gmail.com>
|
||||
Mario Sanchez Prada <msanchez@igalia.com>
|
||||
Tiago Quelhas <tiagoq@gmail.com>
|
||||
Viko Adi Rahmawan <vikoadi@gmail.com>
|
||||
Didier Roche <didrocks@ubuntu.com>
|
||||
Janosch Rolles <janosch@rolles.org>
|
||||
Gustavo Rubio <gus@ahivamos.net>
|
||||
|
|
@ -46,4 +46,5 @@ Wolfgang Steitz <wolfer7@web.de>
|
|||
Jakob Unterwurzacher <jakobunt@gmail.com>
|
||||
Colin Walters <walters@verbum.org>
|
||||
Alexander Wilms <alexander.wilms@zoho.com>
|
||||
ritchiew <rawilson52@gmail.com>
|
||||
|
||||
|
|
|
|||
|
|
@ -26,5 +26,12 @@ if (INTLTOOL_MERGE_FOUND)
|
|||
)
|
||||
install (FILES ${CMAKE_CURRENT_BINARY_DIR}/geary-autostart.desktop DESTINATION ${CMAKE_INSTALL_PREFIX}/share/applications)
|
||||
endmacro (INTLTOOL_MERGE_AUTOSTART_DESKTOP desktop_id po_dir)
|
||||
macro (INTLTOOL_MERGE_CONTRACT desktop_id po_dir)
|
||||
add_custom_target (geary-attach.contract ALL
|
||||
${INTLTOOL_MERGE_EXECUTABLE} --desktop-style ${CMAKE_SOURCE_DIR}/${po_dir}
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/${desktop_id}.contract.in ${desktop_id}.contract
|
||||
)
|
||||
install (FILES ${CMAKE_CURRENT_BINARY_DIR}/geary-attach.contract DESTINATION ${CMAKE_INSTALL_PREFIX}/share/contractor)
|
||||
endmacro (INTLTOOL_MERGE_CONTRACT desktop_id po_dir)
|
||||
endif (INTLTOOL_MERGE_FOUND)
|
||||
|
||||
|
|
|
|||
6
configure
vendored
6
configure
vendored
|
|
@ -38,6 +38,8 @@ configure_help() {
|
|||
Disable icon cache update.
|
||||
--disable-documentation
|
||||
Disable generating and installing translated help documentation.
|
||||
--disable-contractor
|
||||
Disable installing Contractor files.
|
||||
|
||||
Some influential environment variables:
|
||||
PKG_CONFIG_PATH Adds directories to pkg-config's search path.
|
||||
|
|
@ -117,6 +119,10 @@ do
|
|||
CMDLINE="${CMDLINE} -DTRANSLATE_HELP=OFF"
|
||||
;;
|
||||
|
||||
--disable-contractor)
|
||||
CMDLINE="${CMDLINE} -DDISABLE_CONTRACT=ON"
|
||||
;;
|
||||
|
||||
VALAC) [ ! $value ] && abort $1
|
||||
VALAC=$value
|
||||
;;
|
||||
|
|
|
|||
|
|
@ -45,3 +45,20 @@ else ()
|
|||
)
|
||||
endif ()
|
||||
|
||||
if (DISABLE_CONTRACT)
|
||||
message (STATUS "Install Contractor contract: OFF")
|
||||
else (DISABLE_CONTRACT)
|
||||
message (STATUS "Install Contractor contract: ON")
|
||||
if (INTLTOOL_MERGE_FOUND)
|
||||
INTLTOOL_MERGE_CONTRACT (geary-attach po)
|
||||
|
||||
if (DESKTOP_VALIDATE)
|
||||
if (DESKTOP_FILE_VALIDATE_FOUND)
|
||||
VALIDATE_DESKTOP_FILE (geary-attach)
|
||||
else (DESKTOP_FILE_VALIDATE_FOUND)
|
||||
message (FATAL_ERROR "desktop-file-validate must be installed to validate generated .desktop file")
|
||||
endif (DESKTOP_FILE_VALIDATE_FOUND)
|
||||
endif (DESKTOP_VALIDATE)
|
||||
endif (INTLTOOL_MERGE_FOUND)
|
||||
install (PROGRAMS geary-attach DESTINATION bin)
|
||||
endif (DISABLE_CONTRACT)
|
||||
|
|
|
|||
31
desktop/geary-attach
Normal file
31
desktop/geary-attach
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
#!/bin/bash
|
||||
|
||||
# This is a wrapper script to attach several files to an email in Geary.
|
||||
# Written by Viko Adi Rahmawan <vikoadi@gmail.com>
|
||||
# License: 3-clause BSD
|
||||
|
||||
#TODO: define a Gettext domain
|
||||
|
||||
# Disable history substitution on "!" symbols so we can have them in strings
|
||||
set +H
|
||||
|
||||
if [ -z "$1" ] || [ "$1" = '-h' ] || [ "$1" = '--help' ]; then
|
||||
echo $"Usage: $0 /path/to/file [/path/to/another/file...]
|
||||
Relative paths are also supported."
|
||||
exit 1 # so that calling without parameters is counted as a failure
|
||||
fi
|
||||
|
||||
#we dont do file checking as geary is clever enough
|
||||
ARG="mailto:?attachment=$1" #add first file
|
||||
shift
|
||||
while [ -n "$1" ]; do
|
||||
ARG="$ARG&attachment=$1" #add more file if
|
||||
shift
|
||||
done
|
||||
|
||||
if [ -n "$ARG" ]; then
|
||||
# Finally execute geary
|
||||
geary "${ARG}"
|
||||
else
|
||||
exit 1
|
||||
fi
|
||||
6
desktop/geary-attach.contract.in
Normal file
6
desktop/geary-attach.contract.in
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
[Contractor Entry]
|
||||
_Name=Send by email
|
||||
Icon=mail-send
|
||||
_Description=Send files using Geary
|
||||
MimeType=!inode;
|
||||
Exec=geary-attach %F
|
||||
|
|
@ -1,6 +1,7 @@
|
|||
[encoding: UTF-8]
|
||||
desktop/geary.desktop.in
|
||||
desktop/geary-autostart.desktop.in
|
||||
desktop/geary-attach.contract.in
|
||||
src/client/accounts/account-dialog-account-list-pane.vala
|
||||
src/client/accounts/account-dialog-add-edit-pane.vala
|
||||
src/client/accounts/account-dialog-pane.vala
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue