Add icon theme installable icons
|
@ -2,6 +2,7 @@ SUBDIRS = \
|
||||||
build \
|
build \
|
||||||
notify-sharp \
|
notify-sharp \
|
||||||
SparkleShare \
|
SparkleShare \
|
||||||
|
data \
|
||||||
po
|
po
|
||||||
|
|
||||||
DISTCLEANFILES = \
|
DISTCLEANFILES = \
|
||||||
|
|
|
@ -86,6 +86,8 @@ SparkleShare/sparkleshare
|
||||||
SparkleShare/Defines.cs
|
SparkleShare/Defines.cs
|
||||||
SparkleShare/AssemblyInfo.cs
|
SparkleShare/AssemblyInfo.cs
|
||||||
SparkleShare/Makefile
|
SparkleShare/Makefile
|
||||||
|
data/Makefile
|
||||||
|
data/icons/Makefile
|
||||||
po/Makefile.in
|
po/Makefile.in
|
||||||
Makefile
|
Makefile
|
||||||
|
|
||||||
|
|
61
data/icons/Makefile.am
Normal file
|
@ -0,0 +1,61 @@
|
||||||
|
theme = hicolor
|
||||||
|
themedir = $(pkgdatadir)/icons/$(theme)
|
||||||
|
hicolordir = $(DESTDIR)$(datadir)/icons/hicolor
|
||||||
|
|
||||||
|
theme_icons = \
|
||||||
|
animations,process-syncing-sparkleshare-24.png \
|
||||||
|
animations,process-working-48.png \
|
||||||
|
emblems,emblem-synced-22.png \
|
||||||
|
emblems,emblem-synced-24.png \
|
||||||
|
emblems,emblem-sync-error-22.png \
|
||||||
|
emblems,emblem-sync-error-24.png \
|
||||||
|
emblems,emblem-syncing-22.png \
|
||||||
|
emblems,emblem-syncing-24.png \
|
||||||
|
places,fedorahosted-16.png \
|
||||||
|
places,folder-16.png \
|
||||||
|
places,folder-22.png \
|
||||||
|
places,folder-24.png \
|
||||||
|
places,folder-256.png \
|
||||||
|
places,folder-32.png \
|
||||||
|
places,folder-48.png \
|
||||||
|
places,folder-sparkleshare-16.png \
|
||||||
|
places,folder-sparkleshare-22.png \
|
||||||
|
places,folder-sparkleshare-24.png \
|
||||||
|
places,folder-sparkleshare-256.png \
|
||||||
|
places,folder-sparkleshare-32.png \
|
||||||
|
places,folder-sparkleshare-48.png \
|
||||||
|
places,github-16.png \
|
||||||
|
places,gitorious-16.png \
|
||||||
|
places,gnome-16.png \
|
||||||
|
status,avatar-default-16.png \
|
||||||
|
status,avatar-default-22.png \
|
||||||
|
status,avatar-default-24.png \
|
||||||
|
status,avatar-default-32.png \
|
||||||
|
status,avatar-default-48.png \
|
||||||
|
status,document-added-16.png \
|
||||||
|
status,document-edited-16.png \
|
||||||
|
status,document-moved-16.png \
|
||||||
|
status,document-removed-16.png \
|
||||||
|
status,folder-synced-22.png \
|
||||||
|
status,folder-synced-24.png \
|
||||||
|
status,folder-sync-error-22.png \
|
||||||
|
status,folder-sync-error-24.png \
|
||||||
|
status,folder-syncing-22.png \
|
||||||
|
status,folder-syncing-24.png
|
||||||
|
|
||||||
|
install_icon_exec = $(top_srcdir)/icon-theme-installer \
|
||||||
|
-t "$(theme)" \
|
||||||
|
-s "$(srcdir)" \
|
||||||
|
-d "x$(DESTDIR)" \
|
||||||
|
-b "$(themedir)" \
|
||||||
|
-m "$(mkinstalldirs)" \
|
||||||
|
-x "$(INSTALL_DATA)"
|
||||||
|
|
||||||
|
install-data-local:
|
||||||
|
@-$(install_icon_exec) -i $(theme_icons)
|
||||||
|
|
||||||
|
uninstall-hook:
|
||||||
|
@-$(install_icon_exec) -u $(theme_icons)
|
||||||
|
|
||||||
|
MAINTAINERCLEANFILES = Makefile.in
|
||||||
|
EXTRA_DIST = $(wildcard *.png *.svg)
|
Before Width: | Height: | Size: 846 B After Width: | Height: | Size: 846 B |
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 2 KiB After Width: | Height: | Size: 2 KiB |
Before Width: | Height: | Size: 3.2 KiB After Width: | Height: | Size: 3.2 KiB |
Before Width: | Height: | Size: 487 B After Width: | Height: | Size: 487 B |
Before Width: | Height: | Size: 610 B After Width: | Height: | Size: 610 B |
Before Width: | Height: | Size: 589 B After Width: | Height: | Size: 589 B |
Before Width: | Height: | Size: 318 B After Width: | Height: | Size: 318 B |
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.2 KiB |
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.2 KiB |
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 747 B After Width: | Height: | Size: 747 B |
Before Width: | Height: | Size: 658 B After Width: | Height: | Size: 658 B |
Before Width: | Height: | Size: 873 B After Width: | Height: | Size: 873 B |
Before Width: | Height: | Size: 920 B After Width: | Height: | Size: 920 B |
Before Width: | Height: | Size: 46 KiB After Width: | Height: | Size: 46 KiB |
Before Width: | Height: | Size: 1 KiB After Width: | Height: | Size: 1 KiB |
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 1.6 KiB |
Before Width: | Height: | Size: 766 B After Width: | Height: | Size: 766 B |
Before Width: | Height: | Size: 1,004 B After Width: | Height: | Size: 1,004 B |
Before Width: | Height: | Size: 1 KiB After Width: | Height: | Size: 1 KiB |
Before Width: | Height: | Size: 52 KiB After Width: | Height: | Size: 52 KiB |
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 1.4 KiB |
Before Width: | Height: | Size: 2.3 KiB After Width: | Height: | Size: 2.3 KiB |
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.2 KiB |
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.2 KiB |
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.2 KiB |
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.2 KiB |
Before Width: | Height: | Size: 440 B After Width: | Height: | Size: 440 B |
Before Width: | Height: | Size: 387 B After Width: | Height: | Size: 387 B |
Before Width: | Height: | Size: 650 B After Width: | Height: | Size: 650 B |
Before Width: | Height: | Size: 2.5 KiB After Width: | Height: | Size: 2.5 KiB |
Before Width: | Height: | Size: 20 KiB After Width: | Height: | Size: 20 KiB |
179
icon-theme-installer
Executable file
|
@ -0,0 +1,179 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# icon-theme-installer
|
||||||
|
# Copyright (C) 2006 Novell, Inc.
|
||||||
|
# Written by Aaron Bockover <abock@gnome.org>
|
||||||
|
# Licensed under the MIT/X11 license
|
||||||
|
#
|
||||||
|
# This script is meant to be invoked from within a Makefile/Makefile.am
|
||||||
|
# in the install-data-local and uninstall-data sections. It handles the
|
||||||
|
# task of properly installing icons into the icon theme. It requires a
|
||||||
|
# few arguments to set up its environment, and a list of files to be
|
||||||
|
# installed. The format of the file list is critical:
|
||||||
|
#
|
||||||
|
# <category>,<local-src-file-name>
|
||||||
|
#
|
||||||
|
# apps,music-player-banshee.svg
|
||||||
|
# apps,music-player-banshee-16.png
|
||||||
|
# apps,music-player-banshee-22.png
|
||||||
|
#
|
||||||
|
# <category> is the icon theme category, for instance, apps, devices,
|
||||||
|
# actions, emblems...
|
||||||
|
#
|
||||||
|
# <local-src-file-name> must have a basename in the form of:
|
||||||
|
#
|
||||||
|
# proper-theme-name[-<SIZE>].<EXTENSION>
|
||||||
|
#
|
||||||
|
# Where <SIZE> should be either nothing, which will default to scalable
|
||||||
|
# or \-[0-9]{2}, which will expand to <SIZE>x<SIZE>. For example:
|
||||||
|
#
|
||||||
|
# music-player-banshee-16.png
|
||||||
|
#
|
||||||
|
# The <SIZE> here is -16 and will expand to 16x16 per the icon theme spec
|
||||||
|
#
|
||||||
|
# What follows is an example Makefile.am for icon theme installation:
|
||||||
|
#
|
||||||
|
# ---------------
|
||||||
|
# theme=hicolor
|
||||||
|
# themedir=$(datadir)/icons/$(theme)
|
||||||
|
# theme_icons = \
|
||||||
|
# apps,music-player-banshee.svg \
|
||||||
|
# apps,music-player-banshee-16.png \
|
||||||
|
# apps,music-player-banshee-22.png \
|
||||||
|
# apps,music-player-banshee-24.png \
|
||||||
|
# apps,music-player-banshee-32.png
|
||||||
|
#
|
||||||
|
# install_icon_exec = $(top_srcdir)/build/icon-theme-installer -t $(theme) -s $(srcdir) -d "x$(DESTDIR)" -b $(themedir) -m "$(mkinstalldirs)" -x "$(INSTALL_DATA)"
|
||||||
|
# install-data-local:
|
||||||
|
# $(install_icon_exec) -i $(theme_icons)
|
||||||
|
#
|
||||||
|
# uninstall-hook:
|
||||||
|
# $(install_icon_exec) -u $(theme_icons)
|
||||||
|
#
|
||||||
|
# MAINTAINERCLEANFILES = Makefile.in
|
||||||
|
# EXTRA_DIST = $(wildcard *.svg *.png)
|
||||||
|
# ---------------
|
||||||
|
#
|
||||||
|
# Arguments to this program:
|
||||||
|
#
|
||||||
|
# -i : Install
|
||||||
|
# -u : Uninstall
|
||||||
|
# -t <theme> : Theme name (hicolor)
|
||||||
|
# -b <dir> : Theme installation dest directory [x$(DESTDIR)] - Always prefix
|
||||||
|
# this argument with x; it will be stripped but will act as a
|
||||||
|
# placeholder for zero $DESTDIRs (only set by packagers)
|
||||||
|
# -d <dir> : Theme installation directory [$(hicolordir)]
|
||||||
|
# -s <dir> : Source directory [$(srcdir)]
|
||||||
|
# -m <exec> : Command to exec for directory creation [$(mkinstalldirs)]
|
||||||
|
# -x <exec> : Command to exec for single file installation [$(INSTALL_DATA)]
|
||||||
|
# <remainging> : All remainging should be category,filename pairs
|
||||||
|
|
||||||
|
while getopts "iut:b:d:s:m:x:" flag; do
|
||||||
|
case "$flag" in
|
||||||
|
i) INSTALL=yes ;;
|
||||||
|
u) UNINSTALL=yes ;;
|
||||||
|
t) THEME_NAME=$OPTARG ;;
|
||||||
|
d) INSTALL_DEST_DIR=${OPTARG##x} ;;
|
||||||
|
b) INSTALL_BASE_DIR=$OPTARG ;;
|
||||||
|
s) SRC_DIR=$OPTARG ;;
|
||||||
|
m) MKINSTALLDIRS_EXEC=$OPTARG ;;
|
||||||
|
x) INSTALL_DATA_EXEC=$OPTARG ;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
|
||||||
|
shift $(($OPTIND - 1))
|
||||||
|
|
||||||
|
if test "x$INSTALL" = "xyes" -a "x$UNINSTALL" = "xyes"; then
|
||||||
|
echo "Cannot pass both -i and -u"
|
||||||
|
exit 1
|
||||||
|
elif test "x$INSTALL" = "x" -a "x$UNINSTALL" = "x"; then
|
||||||
|
echo "Must path either -i or -u"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
if test -z "$THEME_NAME"; then
|
||||||
|
echo "Theme name required (-t hicolor)"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
if test -z "$INSTALL_BASE_DIR"; then
|
||||||
|
echo "Base theme directory required [-d \$(hicolordir)]"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
if test ! -x $(echo "$MKINSTALLDIRS_EXEC" | cut -f1 -d' '); then
|
||||||
|
echo "Cannot find '$MKINSTALLDIRS_EXEC'; You probably want to pass -m \$(mkinstalldirs)"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
if test ! -x $(echo "$INSTALL_DATA_EXEC" | cut -f1 -d' '); then
|
||||||
|
echo "Cannot find '$INSTALL_DATA_EXEC'; You probably want to pass -x \$(INSTALL_DATA)"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
if test -z "$SRC_DIR"; then
|
||||||
|
SRC_DIR=.
|
||||||
|
fi
|
||||||
|
|
||||||
|
for icon in $@; do
|
||||||
|
size=$(echo $icon | sed s/[^0-9]*//g)
|
||||||
|
category=$(echo $icon | cut -d, -f1)
|
||||||
|
build_name=$(echo $icon | cut -d, -f2)
|
||||||
|
install_name=$(echo $build_name | sed "s/[0-9]//g; s/-\././")
|
||||||
|
install_name=$(basename $install_name)
|
||||||
|
|
||||||
|
if test -z $size; then
|
||||||
|
size=scalable;
|
||||||
|
else
|
||||||
|
size=${size}x${size};
|
||||||
|
fi
|
||||||
|
|
||||||
|
install_dir=${INSTALL_DEST_DIR}${INSTALL_BASE_DIR}/$size/$category
|
||||||
|
install_path=$install_dir/$install_name
|
||||||
|
|
||||||
|
if test "x$INSTALL" = "xyes"; then
|
||||||
|
echo "Installing $size $install_name into $THEME_NAME icon theme"
|
||||||
|
|
||||||
|
$($MKINSTALLDIRS_EXEC $install_dir) || {
|
||||||
|
echo "Failed to create directory $install_dir"
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
|
||||||
|
$($INSTALL_DATA_EXEC $SRC_DIR/$build_name $install_path) || {
|
||||||
|
echo "Failed to install $SRC_DIR/$build_name into $install_path"
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
|
||||||
|
if test ! -e $install_path; then
|
||||||
|
echo "Failed to install $SRC_DIR/$build_name into $install_path"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
if test -e $install_path; then
|
||||||
|
echo "Removing $size $install_name from $THEME_NAME icon theme"
|
||||||
|
|
||||||
|
rm $install_path || {
|
||||||
|
echo "Failed to remove $install_path"
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
if test "x$INSTALL" = "xyes"; then
|
||||||
|
gtk_update_icon_cache_bin="$((which gtk-update-icon-cache || echo /opt/gnome/bin/gtk-update-icon-cache)2>/dev/null)"
|
||||||
|
gtk_update_icon_cache="$gtk_update_icon_cache_bin -f -t $INSTALL_BASE_DIR"
|
||||||
|
|
||||||
|
if test -z "$INSTALL_DEST_DIR"; then
|
||||||
|
if test -x $gtk_update_icon_cache_bin; then
|
||||||
|
echo "Updating GTK icon cache"
|
||||||
|
$gtk_update_icon_cache
|
||||||
|
else
|
||||||
|
echo "*** Icon cache not updated. Could not execute $gtk_update_icon_cache_bin"
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
echo "*** Icon cache not updated. After install, run this:"
|
||||||
|
echo "*** $gtk_update_icon_cache"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|