Gentoo Archives: gentoo-commits

From: "Pacho Ramos (pacho)" <pacho@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in gnome-extra/gnome-weather/files: gnome-weather-3.8.2-temp-unit.patch
Date: Sat, 29 Jun 2013 21:01:59
Message-Id: 20130629210155.B57CF2171D@flycatcher.gentoo.org
1 pacho 13/06/29 21:01:55
2
3 Added: gnome-weather-3.8.2-temp-unit.patch
4 Log:
5 Add a submenu to the app menu to choose the temperature unit (from 'master'), drop old.
6
7 (Portage version: 2.1.12.10/cvs/Linux x86_64, signed Manifest commit with key A188FBD4)
8
9 Revision Changes Path
10 1.1 gnome-extra/gnome-weather/files/gnome-weather-3.8.2-temp-unit.patch
11
12 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/gnome-extra/gnome-weather/files/gnome-weather-3.8.2-temp-unit.patch?rev=1.1&view=markup
13 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/gnome-extra/gnome-weather/files/gnome-weather-3.8.2-temp-unit.patch?rev=1.1&content-type=text/plain
14
15 Index: gnome-weather-3.8.2-temp-unit.patch
16 ===================================================================
17 From 7c901f42d2837e682f37d85b1fa3ee94922f2a05 Mon Sep 17 00:00:00 2001
18 From: Giovanni Campagna <gcampagna@×××××××××.org>
19 Date: Mon, 13 May 2013 21:19:49 +0000
20 Subject: Add a submenu to the app menu to choose the temperature unit
21
22 Among all the preferences in the old dialog, temperature unit
23 is the only one that makes real sense, as we don't show wind
24 speed, visibility or pressure.
25 Also, exclude the Kelvin entry, which is there just to make
26 cool screenshots :)
27 ---
28 diff --git a/data/app-menu.ui b/data/app-menu.ui
29 index 42a16a4..c332595 100644
30 --- a/data/app-menu.ui
31 +++ b/data/app-menu.ui
32 @@ -6,12 +6,25 @@
33 <attribute name="action">win.new</attribute>
34 <attribute name="accel">&lt;Primary&gt;n</attribute>
35 </item>
36 + </section>
37 + <submenu>
38 + <attribute translatable="yes" name="label">Temperature unit</attribute>
39 + <item>
40 + <attribute translatable="yes" name="label">Celsius</attribute>
41 + <attribute name="action">app.temperature-unit</attribute>
42 + <attribute name="target">centigrade</attribute>
43 + </item>
44 + <item>
45 + <attribute translatable="yes" name="label">Fahrenheit</attribute>
46 + <attribute name="action">app.temperature-unit</attribute>
47 + <attribute name="target">fahrenheit</attribute>
48 + </item>
49 + </submenu>
50 + <section>
51 <item>
52 <attribute name="action">win.about</attribute>
53 <attribute name="label" translatable="yes">About Weather</attribute>
54 </item>
55 - </section>
56 - <section>
57 <item>
58 <attribute name="action">app.quit</attribute>
59 <attribute name="label" translatable="yes">Quit</attribute>
60 diff --git a/src/main.js b/src/main.js
61 index 687b79e..844a0d4 100644
62 --- a/src/main.js
63 +++ b/src/main.js
64 @@ -76,6 +76,9 @@ const Application = new Lang.Class({
65 [{ name: 'quit',
66 activate: this._onQuit }]);
67
68 + let gwSettings = new Gio.Settings({ schema: 'org.gnome.GWeather' });
69 + this.add_action(gwSettings.create_action('temperature-unit'));
70 +
71 this._initAppMenu();
72
73 this.add_accelerator("Escape", "win.selection-mode(false)", null);
74 --
75 cgit v0.9.2