public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] gentoo-x86 commit in gnome-extra/gnome-weather/files: gnome-weather-3.8.2-temp-unit.patch
@ 2013-06-29 21:01 Pacho Ramos (pacho)
  0 siblings, 0 replies; only message in thread
From: Pacho Ramos (pacho) @ 2013-06-29 21:01 UTC (permalink / raw
  To: gentoo-commits

pacho       13/06/29 21:01:55

  Added:                gnome-weather-3.8.2-temp-unit.patch
  Log:
  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)

Revision  Changes    Path
1.1                  gnome-extra/gnome-weather/files/gnome-weather-3.8.2-temp-unit.patch

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
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

Index: gnome-weather-3.8.2-temp-unit.patch
===================================================================
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





^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2013-06-29 21:01 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-06-29 21:01 [gentoo-commits] gentoo-x86 commit in gnome-extra/gnome-weather/files: gnome-weather-3.8.2-temp-unit.patch Pacho Ramos (pacho)

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox