summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPacho Ramos <pacho@gentoo.org>2013-06-29 21:01:55 +0000
committerPacho Ramos <pacho@gentoo.org>2013-06-29 21:01:55 +0000
commit4e40cbff670530ffb40f2432fd3e96b5604e07d9 (patch)
tree1da1296c4ac1bb5f76630625ab3080efa08c6667 /gnome-extra/gnome-weather
parentamd64/x86 stable wrt bug #449592 (diff)
downloadgentoo-2-4e40cbff670530ffb40f2432fd3e96b5604e07d9.tar.gz
gentoo-2-4e40cbff670530ffb40f2432fd3e96b5604e07d9.tar.bz2
gentoo-2-4e40cbff670530ffb40f2432fd3e96b5604e07d9.zip
Add a submenu to the app menu to choose the temperature unit (from 'master'), drop old.
(Portage version: 2.1.12.10/cvs/Linux x86_64, signed Manifest commit with key A188FBD4)
Diffstat (limited to 'gnome-extra/gnome-weather')
-rw-r--r--gnome-extra/gnome-weather/ChangeLog10
-rw-r--r--gnome-extra/gnome-weather/files/gnome-weather-3.8.2-temp-unit.patch59
-rw-r--r--gnome-extra/gnome-weather/gnome-weather-3.8.2-r1.ebuild (renamed from gnome-extra/gnome-weather/gnome-weather-3.8.1.ebuild)11
3 files changed, 77 insertions, 3 deletions
diff --git a/gnome-extra/gnome-weather/ChangeLog b/gnome-extra/gnome-weather/ChangeLog
index 6685e5bfcc9a..0907163966e7 100644
--- a/gnome-extra/gnome-weather/ChangeLog
+++ b/gnome-extra/gnome-weather/ChangeLog
@@ -1,6 +1,14 @@
# ChangeLog for gnome-extra/gnome-weather
# Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/gnome-extra/gnome-weather/ChangeLog,v 1.2 2013/05/13 20:53:08 pacho Exp $
+# $Header: /var/cvsroot/gentoo-x86/gnome-extra/gnome-weather/ChangeLog,v 1.3 2013/06/29 21:01:55 pacho Exp $
+
+*gnome-weather-3.8.2-r1 (29 Jun 2013)
+
+ 29 Jun 2013; Pacho Ramos <pacho@gentoo.org>
+ +files/gnome-weather-3.8.2-temp-unit.patch, +gnome-weather-3.8.2-r1.ebuild,
+ -gnome-weather-3.8.1.ebuild:
+ Add a submenu to the app menu to choose the temperature unit (from 'master'),
+ drop old.
*gnome-weather-3.8.2 (13 May 2013)
diff --git a/gnome-extra/gnome-weather/files/gnome-weather-3.8.2-temp-unit.patch b/gnome-extra/gnome-weather/files/gnome-weather-3.8.2-temp-unit.patch
new file mode 100644
index 000000000000..c652651f9737
--- /dev/null
+++ b/gnome-extra/gnome-weather/files/gnome-weather-3.8.2-temp-unit.patch
@@ -0,0 +1,59 @@
+From 7c901f42d2837e682f37d85b1fa3ee94922f2a05 Mon Sep 17 00:00:00 2001
+From: Giovanni Campagna <gcampagna@src.gnome.org>
+Date: Mon, 13 May 2013 21:19:49 +0000
+Subject: Add a submenu to the app menu to choose the temperature unit
+
+Among all the preferences in the old dialog, temperature unit
+is the only one that makes real sense, as we don't show wind
+speed, visibility or pressure.
+Also, exclude the Kelvin entry, which is there just to make
+cool screenshots :)
+---
+diff --git a/data/app-menu.ui b/data/app-menu.ui
+index 42a16a4..c332595 100644
+--- a/data/app-menu.ui
++++ b/data/app-menu.ui
+@@ -6,12 +6,25 @@
+ <attribute name="action">win.new</attribute>
+ <attribute name="accel">&lt;Primary&gt;n</attribute>
+ </item>
++ </section>
++ <submenu>
++ <attribute translatable="yes" name="label">Temperature unit</attribute>
++ <item>
++ <attribute translatable="yes" name="label">Celsius</attribute>
++ <attribute name="action">app.temperature-unit</attribute>
++ <attribute name="target">centigrade</attribute>
++ </item>
++ <item>
++ <attribute translatable="yes" name="label">Fahrenheit</attribute>
++ <attribute name="action">app.temperature-unit</attribute>
++ <attribute name="target">fahrenheit</attribute>
++ </item>
++ </submenu>
++ <section>
+ <item>
+ <attribute name="action">win.about</attribute>
+ <attribute name="label" translatable="yes">About Weather</attribute>
+ </item>
+- </section>
+- <section>
+ <item>
+ <attribute name="action">app.quit</attribute>
+ <attribute name="label" translatable="yes">Quit</attribute>
+diff --git a/src/main.js b/src/main.js
+index 687b79e..844a0d4 100644
+--- a/src/main.js
++++ b/src/main.js
+@@ -76,6 +76,9 @@ const Application = new Lang.Class({
+ [{ name: 'quit',
+ activate: this._onQuit }]);
+
++ let gwSettings = new Gio.Settings({ schema: 'org.gnome.GWeather' });
++ this.add_action(gwSettings.create_action('temperature-unit'));
++
+ this._initAppMenu();
+
+ this.add_accelerator("Escape", "win.selection-mode(false)", null);
+--
+cgit v0.9.2
diff --git a/gnome-extra/gnome-weather/gnome-weather-3.8.1.ebuild b/gnome-extra/gnome-weather/gnome-weather-3.8.2-r1.ebuild
index 79b7cda62406..4f0786ae03fd 100644
--- a/gnome-extra/gnome-weather/gnome-weather-3.8.1.ebuild
+++ b/gnome-extra/gnome-weather/gnome-weather-3.8.2-r1.ebuild
@@ -1,11 +1,11 @@
# Copyright 1999-2013 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/gnome-extra/gnome-weather/gnome-weather-3.8.1.ebuild,v 1.2 2013/05/13 20:53:08 pacho Exp $
+# $Header: /var/cvsroot/gentoo-x86/gnome-extra/gnome-weather/gnome-weather-3.8.2-r1.ebuild,v 1.1 2013/06/29 21:01:55 pacho Exp $
EAPI="5"
GCONF_DEBUG="no"
-inherit gnome2
+inherit eutils gnome2
DESCRIPTION="A weather application for GNOME"
HOMEPAGE="https://live.gnome.org/Design/Apps/Weather"
@@ -24,3 +24,10 @@ DEPEND="${RDEPEND}
>=dev-util/intltool-0.26
virtual/pkgconfig
"
+
+src_prepare() {
+ # Add a submenu to the app menu to choose the temperature unit (from 'master')
+ epatch "${FILESDIR}/${PN}-3.8.2-temp-unit.patch"
+
+ gnome2_src_prepare
+}