From 0c5a322b980733e02a37e1d18fa437da502dee12 Mon Sep 17 00:00:00 2001 From: Thomas Liebetraut Date: Mon, 20 May 2013 23:13:19 +0200 Subject: [PATCH 1/3] Add extension path to the theme search path so that GIcon finds the file. --- extension.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/extension.js b/extension.js index 98a1c29..244f9ee 100644 --- a/extension.js +++ b/extension.js @@ -167,7 +167,8 @@ const TeaTime = new Lang.Class({ function init(metadata) { // TODO: at some point, add translations - ; + let theme = imports.gi.Gtk.IconTheme.get_default(); + theme.append_search_path(metadata.path); } let _TeaTime; From 3af196c36754a26c1c78b02def53359c9805f15f Mon Sep 17 00:00:00 2001 From: Olaf Leidinger Date: Tue, 21 May 2013 07:56:25 +0200 Subject: [PATCH 2/3] change install script to install globally by default --- README.md | 8 +++++++- install.sh | 24 ++++++++++++++++++------ 2 files changed, 25 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index fdf241e..bebac8b 100644 --- a/README.md +++ b/README.md @@ -1 +1,7 @@ -Run install.sh to install the icon for all the users. +Run install.sh without any arguments to install the extension for all the users. + +If you want to install the extension only for the current user, run + +install.sh local + +instead. diff --git a/install.sh b/install.sh index 65a5fab..847d396 100755 --- a/install.sh +++ b/install.sh @@ -1,11 +1,23 @@ NAME="TeaTime@oleid.mescharet.de" -INST_DIR="$HOME/.local/share/gnome-shell-extensions/$NAME" -echo "Installing icon" -sudo cp utilities-teatime.svg /usr/share/icons/hicolor/scalable/apps/ -sudo gtk-update-icon-cache /usr/share/icons/hicolor/ +if [ "$1" = "local" ] ; then + INST_DIR="$HOME/.local/gnome-shell/extensions/$NAME" + SUDO="" +else + INST_DIR="/usr/share/gnome-shell/extensions/$NAME" + SUDO="sudo" + + echo "Installing icon" + $SUDO cp utilities-teatime.svg /usr/share/icons/hicolor/scalable/apps/ + $SUDO gtk-update-icon-cache /usr/share/icons/hicolor/ +fi + echo "Installing extension" -mkdir -p "$INST_DIR" +$SUDO mkdir -p "$INST_DIR" -cp *.js *.json "$INST_DIR" +$SUDO cp *.js *.json "$INST_DIR" + +if [ "$1" = "local" ]; then + $SUDO cp *.svg "$INST_DIR" +fi From 555da18273dd2d738d66bc1cb5cc4b3abffd7829 Mon Sep 17 00:00:00 2001 From: Olaf Leidinger Date: Tue, 21 May 2013 08:02:28 +0200 Subject: [PATCH 3/3] added contributor --- extension.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/extension.js b/extension.js index 244f9ee..446d1cf 100644 --- a/extension.js +++ b/extension.js @@ -1,5 +1,7 @@ /* -*- mode: js2; js2-basic-offset: 4; indent-tabs-mode: nil -*- */ -/* Olaf Leidinger 20130318 */ +/* Olaf Leidinger + Thomas Liebetraut +*/ const Gdk = imports.gi.Gdk; const Gio = imports.gi.Gio;