diff --git a/README.md b/README.md
index 3995d50..986e6c8 100644
--- a/README.md
+++ b/README.md
@@ -33,15 +33,27 @@
|
+
+
|
|
+
+
|
+
+
+ |
+
+
+
+
+ |
@@ -105,10 +117,14 @@ Your commit message should describe what the commit, when applied, does to the c
### Translators
-| Name | Language |
-| ----------------------------------------- | ---------- |
-| [camellan](https://github.com/camellan) | Russian 🇷🇺 |
-| [NathanBnm](https://github.com/NathanBnm) | French 🇫🇷 |
+| Name | Language |
+| ------------------------------------------- | ------------- |
+| [camellan](https://github.com/camellan) | Russian 🇷🇺 |
+| [NathanBnm](https://github.com/NathanBnm) | French 🇫🇷 |
+| [meisenzahl](https://github.com/meisenzahl) | German 🇩🇪 |
+| [ryonakano](https://github.com/ryonakano) | Japanese 🇯🇵 |
+| [aimproxy](https://github.com/aimproxy) | Portuguese 🇵🇹 |
+| [oskarkunik](https://github.com/oskarkunik) | Polish 🇵🇱 |
## License
diff --git a/data/com.github.manexim.home.appdata.xml.in b/data/com.github.manexim.home.appdata.xml.in
index ae0d737..a2888a0 100644
--- a/data/com.github.manexim.home.appdata.xml.in
+++ b/data/com.github.manexim.home.appdata.xml.in
@@ -18,9 +18,35 @@
Network
- com.github.manexim.home
+ com.github.manexim.home
+
+
+ New:
+
+ - Set custom device icons
+ - Set dim level for dimmable bulbs
+ - Set color for supported bulbs
+
+ Improved:
+
+ Fixed:
+
+ Translations:
+
+ - Russian (by camellan)
+ - French (by NathanBnm)
+ - German (by meisenzahl)
+ - Japanese (by ryonakano)
+ - Portuguese (by aimproxy)
+ - Polish (by oskarkunik)
+
+
+
New:
@@ -98,13 +124,21 @@
https://raw.githubusercontent.com/manexim/home/master/data/screenshots/005.png
+
+
+ https://raw.githubusercontent.com/manexim/home/master/data/screenshots/006.png
+
+
+
+ https://raw.githubusercontent.com/manexim/home/master/data/screenshots/007.png
+
Manexim
https://github.com/manexim
https://github.com/manexim/home/issues
- #4fad51
+ #fafafa
#333
5
diff --git a/data/com.github.manexim.home.gresource.xml b/data/com.github.manexim.home.gresource.xml
new file mode 100644
index 0000000..5230ad5
--- /dev/null
+++ b/data/com.github.manexim.home.gresource.xml
@@ -0,0 +1,6 @@
+
+
+
+ styles/application.css
+
+
diff --git a/data/icons/symbolic/com.github.manexim.home.bridge.philips.hue-symbolic.svg b/data/icons/symbolic/com.github.manexim.home.icon.bridge.philips.hue-symbolic.svg
similarity index 94%
rename from data/icons/symbolic/com.github.manexim.home.bridge.philips.hue-symbolic.svg
rename to data/icons/symbolic/com.github.manexim.home.icon.bridge.philips.hue-symbolic.svg
index 454a0d2..26c94fb 100644
--- a/data/icons/symbolic/com.github.manexim.home.bridge.philips.hue-symbolic.svg
+++ b/data/icons/symbolic/com.github.manexim.home.icon.bridge.philips.hue-symbolic.svg
@@ -15,7 +15,7 @@
version="1.1"
id="svg8"
inkscape:version="0.92.3 (2405546, 2018-03-11)"
- sodipodi:docname="com.github.manexim.home.bridge.philips.hue-symbolic.svg">
+ sodipodi:docname="com.github.manexim.home.icon.bridge.philips.hue-symbolic.svg">
@@ -57,7 +57,7 @@
image/svg+xml
-
+
diff --git a/data/icons/symbolic/com.github.manexim.home.icon.fan-symbolic.svg b/data/icons/symbolic/com.github.manexim.home.icon.fan-symbolic.svg
new file mode 100644
index 0000000..cb60bf1
--- /dev/null
+++ b/data/icons/symbolic/com.github.manexim.home.icon.fan-symbolic.svg
@@ -0,0 +1,72 @@
+
+
+
+
diff --git a/data/icons/symbolic/com.github.manexim.home.icon.lamp0-symbolic.svg b/data/icons/symbolic/com.github.manexim.home.icon.lamp0-symbolic.svg
new file mode 100644
index 0000000..6a5e884
--- /dev/null
+++ b/data/icons/symbolic/com.github.manexim.home.icon.lamp0-symbolic.svg
@@ -0,0 +1,72 @@
+
+
+
+
diff --git a/data/icons/symbolic/com.github.manexim.home.icon.lamp1-symbolic.svg b/data/icons/symbolic/com.github.manexim.home.icon.lamp1-symbolic.svg
new file mode 100644
index 0000000..68fbeb1
--- /dev/null
+++ b/data/icons/symbolic/com.github.manexim.home.icon.lamp1-symbolic.svg
@@ -0,0 +1,72 @@
+
+
+
+
diff --git a/data/icons/symbolic/com.github.manexim.home.icon.lamp2-symbolic.svg b/data/icons/symbolic/com.github.manexim.home.icon.lamp2-symbolic.svg
new file mode 100644
index 0000000..e448f73
--- /dev/null
+++ b/data/icons/symbolic/com.github.manexim.home.icon.lamp2-symbolic.svg
@@ -0,0 +1,72 @@
+
+
+
+
diff --git a/data/icons/symbolic/com.github.manexim.home.icon.lamp3-symbolic.svg b/data/icons/symbolic/com.github.manexim.home.icon.lamp3-symbolic.svg
new file mode 100644
index 0000000..17c4b9e
--- /dev/null
+++ b/data/icons/symbolic/com.github.manexim.home.icon.lamp3-symbolic.svg
@@ -0,0 +1,72 @@
+
+
+
+
diff --git a/data/icons/symbolic/com.github.manexim.home.icon.lamp4-symbolic.svg b/data/icons/symbolic/com.github.manexim.home.icon.lamp4-symbolic.svg
new file mode 100644
index 0000000..f2aa32a
--- /dev/null
+++ b/data/icons/symbolic/com.github.manexim.home.icon.lamp4-symbolic.svg
@@ -0,0 +1,72 @@
+
+
+
+
diff --git a/data/icons/symbolic/com.github.manexim.home.lightbulb-symbolic.svg b/data/icons/symbolic/com.github.manexim.home.icon.lightbulb-symbolic.svg
similarity index 97%
rename from data/icons/symbolic/com.github.manexim.home.lightbulb-symbolic.svg
rename to data/icons/symbolic/com.github.manexim.home.icon.lightbulb-symbolic.svg
index 08f7cb7..b428d9c 100644
--- a/data/icons/symbolic/com.github.manexim.home.lightbulb-symbolic.svg
+++ b/data/icons/symbolic/com.github.manexim.home.icon.lightbulb-symbolic.svg
@@ -15,7 +15,7 @@
version="1.1"
id="svg8"
inkscape:version="0.92.3 (2405546, 2018-03-11)"
- sodipodi:docname="com.github.manexim.home.lightbulb-symbolic.svg">
+ sodipodi:docname="com.github.manexim.home.icon.lightbulb-symbolic.svg">
+ sodipodi:docname="com.github.manexim.home.icon.lightbulb.lifx-symbolic.svg">
+ inkscape:window-width="549"
+ inkscape:window-height="419"
+ inkscape:window-x="2318"
+ inkscape:window-y="294"
+ inkscape:window-maximized="0" />
@@ -49,7 +49,7 @@
image/svg+xml
-
+
diff --git a/data/icons/symbolic/com.github.manexim.home.lightbulb.philips.hue-symbolic.svg b/data/icons/symbolic/com.github.manexim.home.icon.lightbulb.philips.hue-symbolic.svg
similarity index 97%
rename from data/icons/symbolic/com.github.manexim.home.lightbulb.philips.hue-symbolic.svg
rename to data/icons/symbolic/com.github.manexim.home.icon.lightbulb.philips.hue-symbolic.svg
index e8dd5b9..8996df0 100644
--- a/data/icons/symbolic/com.github.manexim.home.lightbulb.philips.hue-symbolic.svg
+++ b/data/icons/symbolic/com.github.manexim.home.icon.lightbulb.philips.hue-symbolic.svg
@@ -15,7 +15,7 @@
version="1.1"
id="svg8"
inkscape:version="0.92.3 (2405546, 2018-03-11)"
- sodipodi:docname="com.github.manexim.home.lightbulb.philips.hue-symbolic.svg">
+ sodipodi:docname="com.github.manexim.home.icon.lightbulb.philips.hue-symbolic.svg">
diff --git a/data/icons/symbolic/com.github.manexim.home.icon.spot-symbolic.svg b/data/icons/symbolic/com.github.manexim.home.icon.spot-symbolic.svg
new file mode 100644
index 0000000..0aa7415
--- /dev/null
+++ b/data/icons/symbolic/com.github.manexim.home.icon.spot-symbolic.svg
@@ -0,0 +1,93 @@
+
+
+
+
diff --git a/data/icons/symbolic/com.github.manexim.home.icon.television-symbolic.svg b/data/icons/symbolic/com.github.manexim.home.icon.television-symbolic.svg
new file mode 100644
index 0000000..0252b41
--- /dev/null
+++ b/data/icons/symbolic/com.github.manexim.home.icon.television-symbolic.svg
@@ -0,0 +1,72 @@
+
+
+
+
diff --git a/data/icons/symbolic/com.github.manexim.home.thing-symbolic.svg b/data/icons/symbolic/com.github.manexim.home.icon.thing-symbolic.svg
similarity index 98%
rename from data/icons/symbolic/com.github.manexim.home.thing-symbolic.svg
rename to data/icons/symbolic/com.github.manexim.home.icon.thing-symbolic.svg
index 27eb907..58f5bf0 100644
--- a/data/icons/symbolic/com.github.manexim.home.thing-symbolic.svg
+++ b/data/icons/symbolic/com.github.manexim.home.icon.thing-symbolic.svg
@@ -15,7 +15,7 @@
version="1.1"
id="svg8"
inkscape:version="0.92.3 (2405546, 2018-03-11)"
- sodipodi:docname="com.github.manexim.home.thing-symbolic.svg">
+ sodipodi:docname="com.github.manexim.home.icon.thing-symbolic.svg">
image/svg+xml
-
+
diff --git a/data/meson.build b/data/meson.build
index 784d971..e3efb13 100644
--- a/data/meson.build
+++ b/data/meson.build
@@ -13,13 +13,21 @@ foreach i : icon_sizes
endforeach
symbolic_icons = [
- 'com.github.manexim.home.bridge.philips.hue-symbolic',
- 'com.github.manexim.home.lightbulb-symbolic',
- 'com.github.manexim.home.lightbulb.lifx-symbolic',
- 'com.github.manexim.home.lightbulb.philips.hue-symbolic',
+ 'com.github.manexim.home.icon.bridge.philips.hue-symbolic',
+ 'com.github.manexim.home.icon.fan-symbolic',
+ 'com.github.manexim.home.icon.lamp0-symbolic',
+ 'com.github.manexim.home.icon.lamp1-symbolic',
+ 'com.github.manexim.home.icon.lamp2-symbolic',
+ 'com.github.manexim.home.icon.lamp3-symbolic',
+ 'com.github.manexim.home.icon.lamp4-symbolic',
+ 'com.github.manexim.home.icon.lightbulb-symbolic',
+ 'com.github.manexim.home.icon.lightbulb.lifx-symbolic',
+ 'com.github.manexim.home.icon.lightbulb.philips.hue-symbolic',
+ 'com.github.manexim.home.icon.television-symbolic',
+ 'com.github.manexim.home.icon.thing-symbolic',
+ 'com.github.manexim.home.icon.spot-symbolic',
'com.github.manexim.home.logo.lifx-symbolic',
- 'com.github.manexim.home.logo.philips.hue-symbolic',
- 'com.github.manexim.home.thing-symbolic'
+ 'com.github.manexim.home.logo.philips.hue-symbolic'
]
foreach icon : symbolic_icons
@@ -50,3 +58,9 @@ install_data(
meson.project_name() + '.gschema.xml',
install_dir: join_paths(get_option('datadir'), 'glib-2.0', 'schemas')
)
+
+asresources = gnome.compile_resources(
+ 'as-resources', meson.project_name() + '.gresource.xml',
+ source_dir: '.',
+ c_name: 'as'
+)
diff --git a/data/screenshots/000.png b/data/screenshots/000.png
index 07e59b5..26ec0cc 100644
Binary files a/data/screenshots/000.png and b/data/screenshots/000.png differ
diff --git a/data/screenshots/001.png b/data/screenshots/001.png
index 0c0a843..002fdc6 100644
Binary files a/data/screenshots/001.png and b/data/screenshots/001.png differ
diff --git a/data/screenshots/002.png b/data/screenshots/002.png
index 2b54f8f..52ade0d 100644
Binary files a/data/screenshots/002.png and b/data/screenshots/002.png differ
diff --git a/data/screenshots/003.png b/data/screenshots/003.png
index d8a72e2..5df42f3 100644
Binary files a/data/screenshots/003.png and b/data/screenshots/003.png differ
diff --git a/data/screenshots/004.png b/data/screenshots/004.png
index 302f946..ac67a0a 100644
Binary files a/data/screenshots/004.png and b/data/screenshots/004.png differ
diff --git a/data/screenshots/005.png b/data/screenshots/005.png
index 5e2fbd8..2f32b19 100644
Binary files a/data/screenshots/005.png and b/data/screenshots/005.png differ
diff --git a/data/screenshots/006.png b/data/screenshots/006.png
new file mode 100644
index 0000000..16df738
Binary files /dev/null and b/data/screenshots/006.png differ
diff --git a/data/screenshots/007.png b/data/screenshots/007.png
new file mode 100644
index 0000000..5e1b715
Binary files /dev/null and b/data/screenshots/007.png differ
diff --git a/data/styles/application.css b/data/styles/application.css
new file mode 100644
index 0000000..d9d775e
--- /dev/null
+++ b/data/styles/application.css
@@ -0,0 +1,32 @@
+/*
+* Copyright (c) 2019 Manexim (https://github.com/manexim)
+*
+* This program is free software; you can redistribute it and/or
+* modify it under the terms of the GNU General Public
+* License as published by the Free Software Foundation; either
+* version 2 of the License, or (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* General Public License for more details.
+*
+* You should have received a copy of the GNU General Public
+* License along with this program; if not, write to the
+* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+* Boston, MA 02110-1301 USA
+*
+* Authored by: Marius Meisenzahl
+*/
+
+.stack-switcher button {
+ background: none;
+ border: none;
+ box-shadow: none;
+ color: #666;
+ opacity: 0.4;
+}
+
+.stack-switcher button:checked {
+ opacity: 1;
+}
diff --git a/debian/changelog b/debian/changelog
index f8024c7..0522e74 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,22 @@
+com.github.manexim.home (0.4.0) bionic; urgency=medium
+
+[NEW]
+ * Set custom device icons
+ * Set dim level for dimmable bulbs
+ * Set color for supported bulbs
+[IMPROVED]
+ * UI styling
+[FIXED]
+[TRANSLATIONS]
+ * Russian (by camellan)
+ * French (by NathanBnm)
+ * German (by meisenzahl)
+ * Japanese (by ryonakano)
+ * Portuguese (by aimproxy)
+ * Polish (by oskarkunik)
+
+ -- Marius Meisenzahl Sun, 04 Aug 2019 12:49:14 +0200
+
com.github.manexim.home (0.3.0) bionic; urgency=medium
[NEW]
diff --git a/meson.build b/meson.build
index d378455..34a2406 100644
--- a/meson.build
+++ b/meson.build
@@ -1,5 +1,6 @@
project('com.github.manexim.home', 'vala', 'c')
+gnome = import('gnome')
i18n = import('i18n')
add_global_arguments('-DGETTEXT_PACKAGE="@0@"'.format (meson.project_name()), language:'c')
@@ -23,6 +24,10 @@ if enable_demo_mode
vala_flags += ['--define', 'DEMO_MODE']
endif
+if build_machine.cpu_family().contains('arm')
+ vala_flags += ['--define', 'ARM']
+endif
+
add_project_arguments(vala_flags, language: 'vala')
subdir('data')
diff --git a/po/LINGUAS b/po/LINGUAS
index 831f337..666dacf 100644
--- a/po/LINGUAS
+++ b/po/LINGUAS
@@ -2,4 +2,7 @@
#
de
fr
+ja
+pl
+pt
ru
diff --git a/po/com.github.manexim.home.pot b/po/com.github.manexim.home.pot
index 351d944..f1404d9 100644
--- a/po/com.github.manexim.home.pot
+++ b/po/com.github.manexim.home.pot
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: com.github.manexim.home\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2019-07-04 19:22+0200\n"
+"POT-Creation-Date: 2019-07-11 19:55+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME \n"
"Language-Team: LANGUAGE \n"
@@ -60,27 +60,43 @@ msgstr ""
msgid "Welcome to %s!"
msgstr ""
-#: src/pages/DevicePage.vala:62
-msgid "ID: "
+#: src/pages/DevicePage.vala:43
+msgid "Hue: "
msgstr ""
#: src/pages/DevicePage.vala:63
+msgid "Saturation: "
+msgstr ""
+
+#: src/pages/DevicePage.vala:85
+msgid "Brightness: "
+msgstr ""
+
+#: src/pages/DevicePage.vala:107
+msgid "Color temperature: "
+msgstr ""
+
+#: src/pages/DevicePage.vala:156
+msgid "ID: "
+msgstr ""
+
+#: src/pages/DevicePage.vala:157
msgid "Manufacturer: "
msgstr ""
-#: src/pages/DevicePage.vala:64
+#: src/pages/DevicePage.vala:158
msgid "Model: "
msgstr ""
-#: src/pages/DevicePage.vala:73
+#: src/pages/DevicePage.vala:167
msgid "Enabled"
msgstr ""
-#: src/pages/DevicePage.vala:79
+#: src/pages/DevicePage.vala:173
msgid "Disabled"
msgstr ""
-#: src/pages/DevicePage.vala:83
+#: src/pages/DevicePage.vala:177
msgid "Unknown"
msgstr ""
diff --git a/po/de.po b/po/de.po
index dab54ef..5842d3c 100644
--- a/po/de.po
+++ b/po/de.po
@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: com.github.manexim.home\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2019-07-04 19:19+0200\n"
+"POT-Creation-Date: 2019-07-11 19:55+0200\n"
"PO-Revision-Date: 2019-06-22 09:24+0200\n"
"Last-Translator: Automatically generated\n"
"Language-Team: none\n"
@@ -66,27 +66,43 @@ msgstr "Steuer deine Smart Home Gadgets"
msgid "Welcome to %s!"
msgstr "Willkommen zu %s!"
-#: src/pages/DevicePage.vala:62
+#: src/pages/DevicePage.vala:43
+msgid "Hue: "
+msgstr "Farbton: "
+
+#: src/pages/DevicePage.vala:63
+msgid "Saturation: "
+msgstr "Sättigung: "
+
+#: src/pages/DevicePage.vala:85
+msgid "Brightness: "
+msgstr "Helligkeit: "
+
+#: src/pages/DevicePage.vala:107
+msgid "Color temperature: "
+msgstr "Farbtemperatur: "
+
+#: src/pages/DevicePage.vala:156
msgid "ID: "
msgstr "ID: "
-#: src/pages/DevicePage.vala:63
+#: src/pages/DevicePage.vala:157
msgid "Manufacturer: "
msgstr "Hersteller: "
-#: src/pages/DevicePage.vala:64
+#: src/pages/DevicePage.vala:158
msgid "Model: "
msgstr "Modell: "
-#: src/pages/DevicePage.vala:73
+#: src/pages/DevicePage.vala:167
msgid "Enabled"
msgstr "Aktiviert"
-#: src/pages/DevicePage.vala:79
+#: src/pages/DevicePage.vala:173
msgid "Disabled"
msgstr "Deaktiviert"
-#: src/pages/DevicePage.vala:83
+#: src/pages/DevicePage.vala:177
msgid "Unknown"
msgstr "Unbekannt"
diff --git a/po/extra/LINGUAS b/po/extra/LINGUAS
index 831f337..666dacf 100644
--- a/po/extra/LINGUAS
+++ b/po/extra/LINGUAS
@@ -2,4 +2,7 @@
#
de
fr
+ja
+pl
+pt
ru
diff --git a/po/extra/de.po b/po/extra/de.po
index 0a6026b..228e439 100644
--- a/po/extra/de.po
+++ b/po/extra/de.po
@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: extra\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2019-06-22 09:47+0200\n"
+"POT-Creation-Date: 2019-07-11 19:55+0200\n"
"PO-Revision-Date: 2019-06-22 09:24+0200\n"
"Last-Translator: Automatically generated\n"
"Language-Team: none\n"
@@ -40,51 +40,102 @@ msgstr "Unterstützte Geräte:"
msgid "LIFX"
msgstr ""
-#: data/com.github.manexim.home.appdata.xml.in:25
+#: data/com.github.manexim.home.appdata.xml.in:14
+msgid "Philips Hue"
+msgstr ""
+
+#: data/com.github.manexim.home.appdata.xml.in:26
+#: data/com.github.manexim.home.appdata.xml.in:52
msgid "New:"
msgstr "Neu:"
-#: data/com.github.manexim.home.appdata.xml.in:27
-msgid "Add welcome view for onboarding"
-msgstr "Willkommensansicht für Onboarding hinzugefügt"
-
#: data/com.github.manexim.home.appdata.xml.in:28
-msgid "Show loading page if no smart home gadget is found"
-msgstr "Lade-Seite anzeigen, wenn kein Smart Home Gadget gefunden wird."
+msgid "Add new UI"
+msgstr ""
#: data/com.github.manexim.home.appdata.xml.in:29
-msgid "Show manufacturer and model of device"
-msgstr "Zeige Hersteller und Modell des Gerätes an"
+msgid "Add initial support for Philips Hue devices"
+msgstr ""
+
+#: data/com.github.manexim.home.appdata.xml.in:30
+msgid "Add discovery for Philips Hue bridges"
+msgstr ""
#: data/com.github.manexim.home.appdata.xml.in:31
+msgid "Add page to configure Philips Hue bridges"
+msgstr ""
+
+#: data/com.github.manexim.home.appdata.xml.in:32
+msgid "Add service to save configurations"
+msgstr ""
+
+#: data/com.github.manexim.home.appdata.xml.in:34
+#: data/com.github.manexim.home.appdata.xml.in:58
msgid "Improved:"
msgstr "Verbessert:"
-#: data/com.github.manexim.home.appdata.xml.in:33
-msgid "Save and load window settings"
-msgstr "Speichern und laden der Fenstereinstellungen"
+#: data/com.github.manexim.home.appdata.xml.in:36
+msgid "Update welcome view"
+msgstr ""
+
+#: data/com.github.manexim.home.appdata.xml.in:37
+msgid "Add mode switch for dark theme if freedesktop schema is not available"
+msgstr ""
-#: data/com.github.manexim.home.appdata.xml.in:35
+#: data/com.github.manexim.home.appdata.xml.in:39
+#: data/com.github.manexim.home.appdata.xml.in:62
msgid "Fixed:"
msgstr ""
-#: data/com.github.manexim.home.appdata.xml.in:37
+#: data/com.github.manexim.home.appdata.xml.in:42
+msgid "Translations:"
+msgstr ""
+
+#: data/com.github.manexim.home.appdata.xml.in:44
+msgid "French (by NathanBnm)"
+msgstr ""
+
+#: data/com.github.manexim.home.appdata.xml.in:45
+msgid "German"
+msgstr ""
+
+#: data/com.github.manexim.home.appdata.xml.in:46
+msgid "Russian (by camellan)"
+msgstr ""
+
+#: data/com.github.manexim.home.appdata.xml.in:54
+msgid "Add welcome view for onboarding"
+msgstr "Willkommensansicht für Onboarding hinzugefügt"
+
+#: data/com.github.manexim.home.appdata.xml.in:55
+msgid "Show loading page if no smart home gadget is found"
+msgstr "Lade-Seite anzeigen, wenn kein Smart Home Gadget gefunden wird."
+
+#: data/com.github.manexim.home.appdata.xml.in:56
+msgid "Show manufacturer and model of device"
+msgstr "Zeige Hersteller und Modell des Gerätes an"
+
+#: data/com.github.manexim.home.appdata.xml.in:60
+msgid "Save and load window settings"
+msgstr "Speichern und laden der Fenstereinstellungen"
+
+#: data/com.github.manexim.home.appdata.xml.in:64
msgid "Remove mention of elementary OS in app description"
msgstr "Entfernen der Erwähnung von elementary OS in der App-Beschreibung"
-#: data/com.github.manexim.home.appdata.xml.in:38
+#: data/com.github.manexim.home.appdata.xml.in:65
msgid "Suffix symbolic icon names with -symbolic"
msgstr "-symbolic an symbolic Icon-Namen angehängt"
-#: data/com.github.manexim.home.appdata.xml.in:39
+#: data/com.github.manexim.home.appdata.xml.in:66
msgid "Install all available icon sizes"
msgstr "Installiere alle verfügbaren Icon-Größen"
-#: data/com.github.manexim.home.appdata.xml.in:45
+#: data/com.github.manexim.home.appdata.xml.in:72
msgid "Initial release"
msgstr "Erstveröffentlichung"
-#: data/com.github.manexim.home.appdata.xml.in:71
+#: data/com.github.manexim.home.appdata.xml.in:102
msgid "Manexim"
msgstr ""
diff --git a/po/extra/extra.pot b/po/extra/extra.pot
index 5ce07b9..74d6b63 100644
--- a/po/extra/extra.pot
+++ b/po/extra/extra.pot
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: extra\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2019-06-22 09:47+0200\n"
+"POT-Creation-Date: 2019-07-11 19:55+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME \n"
"Language-Team: LANGUAGE \n"
@@ -40,51 +40,102 @@ msgstr ""
msgid "LIFX"
msgstr ""
-#: data/com.github.manexim.home.appdata.xml.in:25
-msgid "New:"
+#: data/com.github.manexim.home.appdata.xml.in:14
+msgid "Philips Hue"
msgstr ""
-#: data/com.github.manexim.home.appdata.xml.in:27
-msgid "Add welcome view for onboarding"
+#: data/com.github.manexim.home.appdata.xml.in:26
+#: data/com.github.manexim.home.appdata.xml.in:52
+msgid "New:"
msgstr ""
#: data/com.github.manexim.home.appdata.xml.in:28
-msgid "Show loading page if no smart home gadget is found"
+msgid "Add new UI"
msgstr ""
#: data/com.github.manexim.home.appdata.xml.in:29
-msgid "Show manufacturer and model of device"
+msgid "Add initial support for Philips Hue devices"
+msgstr ""
+
+#: data/com.github.manexim.home.appdata.xml.in:30
+msgid "Add discovery for Philips Hue bridges"
msgstr ""
#: data/com.github.manexim.home.appdata.xml.in:31
+msgid "Add page to configure Philips Hue bridges"
+msgstr ""
+
+#: data/com.github.manexim.home.appdata.xml.in:32
+msgid "Add service to save configurations"
+msgstr ""
+
+#: data/com.github.manexim.home.appdata.xml.in:34
+#: data/com.github.manexim.home.appdata.xml.in:58
msgid "Improved:"
msgstr ""
-#: data/com.github.manexim.home.appdata.xml.in:33
-msgid "Save and load window settings"
+#: data/com.github.manexim.home.appdata.xml.in:36
+msgid "Update welcome view"
+msgstr ""
+
+#: data/com.github.manexim.home.appdata.xml.in:37
+msgid "Add mode switch for dark theme if freedesktop schema is not available"
msgstr ""
-#: data/com.github.manexim.home.appdata.xml.in:35
+#: data/com.github.manexim.home.appdata.xml.in:39
+#: data/com.github.manexim.home.appdata.xml.in:62
msgid "Fixed:"
msgstr ""
-#: data/com.github.manexim.home.appdata.xml.in:37
+#: data/com.github.manexim.home.appdata.xml.in:42
+msgid "Translations:"
+msgstr ""
+
+#: data/com.github.manexim.home.appdata.xml.in:44
+msgid "French (by NathanBnm)"
+msgstr ""
+
+#: data/com.github.manexim.home.appdata.xml.in:45
+msgid "German"
+msgstr ""
+
+#: data/com.github.manexim.home.appdata.xml.in:46
+msgid "Russian (by camellan)"
+msgstr ""
+
+#: data/com.github.manexim.home.appdata.xml.in:54
+msgid "Add welcome view for onboarding"
+msgstr ""
+
+#: data/com.github.manexim.home.appdata.xml.in:55
+msgid "Show loading page if no smart home gadget is found"
+msgstr ""
+
+#: data/com.github.manexim.home.appdata.xml.in:56
+msgid "Show manufacturer and model of device"
+msgstr ""
+
+#: data/com.github.manexim.home.appdata.xml.in:60
+msgid "Save and load window settings"
+msgstr ""
+
+#: data/com.github.manexim.home.appdata.xml.in:64
msgid "Remove mention of elementary OS in app description"
msgstr ""
-#: data/com.github.manexim.home.appdata.xml.in:38
+#: data/com.github.manexim.home.appdata.xml.in:65
msgid "Suffix symbolic icon names with -symbolic"
msgstr ""
-#: data/com.github.manexim.home.appdata.xml.in:39
+#: data/com.github.manexim.home.appdata.xml.in:66
msgid "Install all available icon sizes"
msgstr ""
-#: data/com.github.manexim.home.appdata.xml.in:45
+#: data/com.github.manexim.home.appdata.xml.in:72
msgid "Initial release"
msgstr ""
-#: data/com.github.manexim.home.appdata.xml.in:71
+#: data/com.github.manexim.home.appdata.xml.in:102
msgid "Manexim"
msgstr ""
diff --git a/po/extra/fr.po b/po/extra/fr.po
index 493bea7..13175a1 100644
--- a/po/extra/fr.po
+++ b/po/extra/fr.po
@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: extra\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2019-06-22 09:47+0200\n"
+"POT-Creation-Date: 2019-07-11 19:55+0200\n"
"PO-Revision-Date: 2019-06-17 22:33+0400\n"
"Last-Translator: NathanBnm\n"
"Language-Team: none\n"
@@ -42,52 +42,103 @@ msgstr "Appareils supportés :"
msgid "LIFX"
msgstr "LIFX"
-#: data/com.github.manexim.home.appdata.xml.in:25
+#: data/com.github.manexim.home.appdata.xml.in:14
+msgid "Philips Hue"
+msgstr ""
+
+#: data/com.github.manexim.home.appdata.xml.in:26
+#: data/com.github.manexim.home.appdata.xml.in:52
msgid "New:"
msgstr "Nouveau :"
-#: data/com.github.manexim.home.appdata.xml.in:27
-msgid "Add welcome view for onboarding"
-msgstr "Ajout d'un écran de bienvenue à l'ouverture"
-
#: data/com.github.manexim.home.appdata.xml.in:28
-msgid "Show loading page if no smart home gadget is found"
+msgid "Add new UI"
msgstr ""
-"Affichage de la page de chargement si aucun objet connecté n'est trouvé"
#: data/com.github.manexim.home.appdata.xml.in:29
-msgid "Show manufacturer and model of device"
-msgstr "Affichage des informations du modèle et de l'appareil"
+msgid "Add initial support for Philips Hue devices"
+msgstr ""
+
+#: data/com.github.manexim.home.appdata.xml.in:30
+msgid "Add discovery for Philips Hue bridges"
+msgstr ""
#: data/com.github.manexim.home.appdata.xml.in:31
+msgid "Add page to configure Philips Hue bridges"
+msgstr ""
+
+#: data/com.github.manexim.home.appdata.xml.in:32
+msgid "Add service to save configurations"
+msgstr ""
+
+#: data/com.github.manexim.home.appdata.xml.in:34
+#: data/com.github.manexim.home.appdata.xml.in:58
msgid "Improved:"
msgstr "Amélioration :"
-#: data/com.github.manexim.home.appdata.xml.in:33
-msgid "Save and load window settings"
-msgstr "Enregistrement et rechargement des paramètres de la fenêtre"
+#: data/com.github.manexim.home.appdata.xml.in:36
+msgid "Update welcome view"
+msgstr ""
+
+#: data/com.github.manexim.home.appdata.xml.in:37
+msgid "Add mode switch for dark theme if freedesktop schema is not available"
+msgstr ""
-#: data/com.github.manexim.home.appdata.xml.in:35
+#: data/com.github.manexim.home.appdata.xml.in:39
+#: data/com.github.manexim.home.appdata.xml.in:62
msgid "Fixed:"
msgstr "Corrections :"
-#: data/com.github.manexim.home.appdata.xml.in:37
+#: data/com.github.manexim.home.appdata.xml.in:42
+msgid "Translations:"
+msgstr ""
+
+#: data/com.github.manexim.home.appdata.xml.in:44
+msgid "French (by NathanBnm)"
+msgstr ""
+
+#: data/com.github.manexim.home.appdata.xml.in:45
+msgid "German"
+msgstr ""
+
+#: data/com.github.manexim.home.appdata.xml.in:46
+msgid "Russian (by camellan)"
+msgstr ""
+
+#: data/com.github.manexim.home.appdata.xml.in:54
+msgid "Add welcome view for onboarding"
+msgstr "Ajout d'un écran de bienvenue à l'ouverture"
+
+#: data/com.github.manexim.home.appdata.xml.in:55
+msgid "Show loading page if no smart home gadget is found"
+msgstr ""
+"Affichage de la page de chargement si aucun objet connecté n'est trouvé"
+
+#: data/com.github.manexim.home.appdata.xml.in:56
+msgid "Show manufacturer and model of device"
+msgstr "Affichage des informations du modèle et de l'appareil"
+
+#: data/com.github.manexim.home.appdata.xml.in:60
+msgid "Save and load window settings"
+msgstr "Enregistrement et rechargement des paramètres de la fenêtre"
+
+#: data/com.github.manexim.home.appdata.xml.in:64
msgid "Remove mention of elementary OS in app description"
msgstr "Suppression de la mention d'elementary OS dans la description"
-#: data/com.github.manexim.home.appdata.xml.in:38
+#: data/com.github.manexim.home.appdata.xml.in:65
msgid "Suffix symbolic icon names with -symbolic"
msgstr "Ajout du suffixe -symbolic au nom des icônes symboliques"
-#: data/com.github.manexim.home.appdata.xml.in:39
+#: data/com.github.manexim.home.appdata.xml.in:66
msgid "Install all available icon sizes"
msgstr "Installation de toutes les tailles d'icône disponibles"
-#: data/com.github.manexim.home.appdata.xml.in:45
+#: data/com.github.manexim.home.appdata.xml.in:72
msgid "Initial release"
msgstr "Version initiale"
-#: data/com.github.manexim.home.appdata.xml.in:71
+#: data/com.github.manexim.home.appdata.xml.in:102
msgid "Manexim"
msgstr "Menxim"
diff --git a/po/extra/ja.po b/po/extra/ja.po
new file mode 100644
index 0000000..f8daac5
--- /dev/null
+++ b/po/extra/ja.po
@@ -0,0 +1,145 @@
+# Japanese translations for extra package.
+# Copyright (C) 2019 THE extra'S COPYRIGHT HOLDER
+# This file is distributed under the same license as the extra package.
+# Automatically generated, 2019.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: extra\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2019-07-11 19:55+0200\n"
+"PO-Revision-Date: 2019-07-10 13:57+0900\n"
+"Last-Translator: Ryo Nakano \n"
+"Language-Team: none\n"
+"Language: ja\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=1; plural=0;\n"
+"X-Generator: Poedit 2.2.3\n"
+
+#: data/com.github.manexim.home.appdata.xml.in:7
+#: data/com.github.manexim.home.desktop.in:4
+#: data/com.github.manexim.home.desktop.in:5
+msgid "Home"
+msgstr "Home"
+
+#: data/com.github.manexim.home.appdata.xml.in:8
+#: data/com.github.manexim.home.desktop.in:6
+msgid "Control your smart home gadgets"
+msgstr "ホームガジェットを操作します"
+
+#: data/com.github.manexim.home.appdata.xml.in:10
+msgid "A smart home application to control your gadgets."
+msgstr "お手持ちのガジェットを操作できる、スマートホームアプリです。"
+
+#: data/com.github.manexim.home.appdata.xml.in:11
+msgid "Supported devices:"
+msgstr "対応しているデバイス:"
+
+#: data/com.github.manexim.home.appdata.xml.in:13
+msgid "LIFX"
+msgstr "LIFX"
+
+#: data/com.github.manexim.home.appdata.xml.in:14
+msgid "Philips Hue"
+msgstr "Philips Hue"
+
+#: data/com.github.manexim.home.appdata.xml.in:26
+#: data/com.github.manexim.home.appdata.xml.in:52
+msgid "New:"
+msgstr ""
+
+#: data/com.github.manexim.home.appdata.xml.in:28
+msgid "Add new UI"
+msgstr ""
+
+#: data/com.github.manexim.home.appdata.xml.in:29
+msgid "Add initial support for Philips Hue devices"
+msgstr ""
+
+#: data/com.github.manexim.home.appdata.xml.in:30
+msgid "Add discovery for Philips Hue bridges"
+msgstr ""
+
+#: data/com.github.manexim.home.appdata.xml.in:31
+msgid "Add page to configure Philips Hue bridges"
+msgstr ""
+
+#: data/com.github.manexim.home.appdata.xml.in:32
+msgid "Add service to save configurations"
+msgstr ""
+
+#: data/com.github.manexim.home.appdata.xml.in:34
+#: data/com.github.manexim.home.appdata.xml.in:58
+msgid "Improved:"
+msgstr ""
+
+#: data/com.github.manexim.home.appdata.xml.in:36
+msgid "Update welcome view"
+msgstr ""
+
+#: data/com.github.manexim.home.appdata.xml.in:37
+msgid "Add mode switch for dark theme if freedesktop schema is not available"
+msgstr ""
+
+#: data/com.github.manexim.home.appdata.xml.in:39
+#: data/com.github.manexim.home.appdata.xml.in:62
+msgid "Fixed:"
+msgstr ""
+
+#: data/com.github.manexim.home.appdata.xml.in:42
+msgid "Translations:"
+msgstr ""
+
+#: data/com.github.manexim.home.appdata.xml.in:44
+msgid "French (by NathanBnm)"
+msgstr ""
+
+#: data/com.github.manexim.home.appdata.xml.in:45
+msgid "German"
+msgstr ""
+
+#: data/com.github.manexim.home.appdata.xml.in:46
+msgid "Russian (by camellan)"
+msgstr ""
+
+#: data/com.github.manexim.home.appdata.xml.in:54
+msgid "Add welcome view for onboarding"
+msgstr ""
+
+#: data/com.github.manexim.home.appdata.xml.in:55
+msgid "Show loading page if no smart home gadget is found"
+msgstr ""
+
+#: data/com.github.manexim.home.appdata.xml.in:56
+msgid "Show manufacturer and model of device"
+msgstr ""
+
+#: data/com.github.manexim.home.appdata.xml.in:60
+msgid "Save and load window settings"
+msgstr ""
+
+#: data/com.github.manexim.home.appdata.xml.in:64
+msgid "Remove mention of elementary OS in app description"
+msgstr ""
+
+#: data/com.github.manexim.home.appdata.xml.in:65
+msgid "Suffix symbolic icon names with -symbolic"
+msgstr ""
+
+#: data/com.github.manexim.home.appdata.xml.in:66
+msgid "Install all available icon sizes"
+msgstr ""
+
+#: data/com.github.manexim.home.appdata.xml.in:72
+msgid "Initial release"
+msgstr ""
+
+#: data/com.github.manexim.home.appdata.xml.in:102
+msgid "Manexim"
+msgstr "Manexim"
+
+#: data/com.github.manexim.home.desktop.in:8
+msgid "com.github.manexim.home"
+msgstr "com.github.manexim.home"
diff --git a/po/extra/pl.po b/po/extra/pl.po
new file mode 100644
index 0000000..dae68f5
--- /dev/null
+++ b/po/extra/pl.po
@@ -0,0 +1,145 @@
+# SOME DESCRIPTIVE TITLE.
+# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
+# This file is distributed under the same license as the extra package.
+# FIRST AUTHOR , YEAR.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: extra\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2019-07-11 19:55+0200\n"
+"PO-Revision-Date: 2019-07-18 21:10+0200\n"
+"Language-Team: \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Generator: Poedit 2.0.6\n"
+"Last-Translator: Oskar Kunik \n"
+"Plural-Forms: nplurals=3; plural=(n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n"
+"Language: pl_PL\n"
+
+#: data/com.github.manexim.home.appdata.xml.in:7
+#: data/com.github.manexim.home.desktop.in:4
+#: data/com.github.manexim.home.desktop.in:5
+msgid "Home"
+msgstr "Home"
+
+#: data/com.github.manexim.home.appdata.xml.in:8
+#: data/com.github.manexim.home.desktop.in:6
+msgid "Control your smart home gadgets"
+msgstr "Kontroluj twoje urządzenia inteligentnego domu"
+
+#: data/com.github.manexim.home.appdata.xml.in:10
+msgid "A smart home application to control your gadgets."
+msgstr "Aplikacja do kontrolowania urządzeń inteligentnego domu."
+
+#: data/com.github.manexim.home.appdata.xml.in:11
+msgid "Supported devices:"
+msgstr "Wspierane urządzenia:"
+
+#: data/com.github.manexim.home.appdata.xml.in:13
+msgid "LIFX"
+msgstr "LIFX"
+
+#: data/com.github.manexim.home.appdata.xml.in:14
+msgid "Philips Hue"
+msgstr "Philips Hue"
+
+#: data/com.github.manexim.home.appdata.xml.in:26
+#: data/com.github.manexim.home.appdata.xml.in:52
+msgid "New:"
+msgstr "Nowe:"
+
+#: data/com.github.manexim.home.appdata.xml.in:28
+msgid "Add new UI"
+msgstr "Dodano nowe UI"
+
+#: data/com.github.manexim.home.appdata.xml.in:29
+msgid "Add initial support for Philips Hue devices"
+msgstr "Dodano wstępne wsparcie dla urządzeń Philips Hue"
+
+#: data/com.github.manexim.home.appdata.xml.in:30
+msgid "Add discovery for Philips Hue bridges"
+msgstr "Dodano wykrywanie urządzeń Philips Hue"
+
+#: data/com.github.manexim.home.appdata.xml.in:31
+msgid "Add page to configure Philips Hue bridges"
+msgstr "Dodano stronę konfiguracyjną mostków Philips Hue"
+
+#: data/com.github.manexim.home.appdata.xml.in:32
+msgid "Add service to save configurations"
+msgstr "Dodano serwis do zapisywania ustawień"
+
+#: data/com.github.manexim.home.appdata.xml.in:34
+#: data/com.github.manexim.home.appdata.xml.in:58
+msgid "Improved:"
+msgstr "Poprawiono:"
+
+#: data/com.github.manexim.home.appdata.xml.in:36
+msgid "Update welcome view"
+msgstr "Zaktualizowano ekran powitalny"
+
+#: data/com.github.manexim.home.appdata.xml.in:37
+msgid "Add mode switch for dark theme if freedesktop schema is not available"
+msgstr "Dodano przełącznik dla ciemnego motywu jeżeli schemat freedesktop nie jest dostępny"
+
+#: data/com.github.manexim.home.appdata.xml.in:39
+#: data/com.github.manexim.home.appdata.xml.in:62
+msgid "Fixed:"
+msgstr "Naprawiono:"
+
+#: data/com.github.manexim.home.appdata.xml.in:42
+msgid "Translations:"
+msgstr "Tłumaczenia:"
+
+#: data/com.github.manexim.home.appdata.xml.in:44
+msgid "French (by NathanBnm)"
+msgstr "Francuski (NathanBnm)"
+
+#: data/com.github.manexim.home.appdata.xml.in:45
+msgid "German"
+msgstr "Niemiecki"
+
+#: data/com.github.manexim.home.appdata.xml.in:46
+msgid "Russian (by camellan)"
+msgstr "Rosyjski (camellan)"
+
+#: data/com.github.manexim.home.appdata.xml.in:54
+msgid "Add welcome view for onboarding"
+msgstr "Dodano ekran powitalny dla pierwszego uruchomienia"
+
+#: data/com.github.manexim.home.appdata.xml.in:55
+msgid "Show loading page if no smart home gadget is found"
+msgstr "Pokazywanie strony ładowania jeżeli żadne inteligentne urządzenie nie zostało znalezione"
+
+#: data/com.github.manexim.home.appdata.xml.in:56
+msgid "Show manufacturer and model of device"
+msgstr "Pokazywanie producenta i modelu urządzenia"
+
+#: data/com.github.manexim.home.appdata.xml.in:60
+msgid "Save and load window settings"
+msgstr "Zapisywanie i ładowanie ustawień okna"
+
+#: data/com.github.manexim.home.appdata.xml.in:64
+msgid "Remove mention of elementary OS in app description"
+msgstr "Usunięcie wzmianki o elementary OS w opisie urządzenia"
+
+#: data/com.github.manexim.home.appdata.xml.in:65
+msgid "Suffix symbolic icon names with -symbolic"
+msgstr "Dopisanie -symbolic do nazw symbolicznych ikon"
+
+#: data/com.github.manexim.home.appdata.xml.in:66
+msgid "Install all available icon sizes"
+msgstr "Instalowanie wszystkich dostępnych rozmiarów ikon"
+
+#: data/com.github.manexim.home.appdata.xml.in:72
+msgid "Initial release"
+msgstr "Pierwszy release"
+
+#: data/com.github.manexim.home.appdata.xml.in:102
+msgid "Manexim"
+msgstr "Manexim"
+
+#: data/com.github.manexim.home.desktop.in:8
+msgid "com.github.manexim.home"
+msgstr "com.github.manexim.home"
diff --git a/po/extra/pt.po b/po/extra/pt.po
new file mode 100644
index 0000000..603db61
--- /dev/null
+++ b/po/extra/pt.po
@@ -0,0 +1,145 @@
+# Portuguese translations for extra package.
+# Copyright (C) 2019 THE extra'S COPYRIGHT HOLDER
+# This file is distributed under the same license as the extra package.
+# Automatically generated, 2019.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: extra\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2019-07-11 19:55+0200\n"
+"PO-Revision-Date: 2019-07-11 19:55+0200\n"
+"Last-Translator: aimproxy\n"
+"Language-Team: none\n"
+"Language: pt\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=2; plural=(n != 1);\n"
+
+#: data/com.github.manexim.home.appdata.xml.in:7
+#: data/com.github.manexim.home.desktop.in:4
+#: data/com.github.manexim.home.desktop.in:5
+msgid "Home"
+msgstr "Casa"
+
+#: data/com.github.manexim.home.appdata.xml.in:8
+#: data/com.github.manexim.home.desktop.in:6
+msgid "Control your smart home gadgets"
+msgstr "Controle seus gadgets domésticos inteligentes"
+
+#: data/com.github.manexim.home.appdata.xml.in:10
+msgid "A smart home application to control your gadgets."
+msgstr "Uma aplicação para casas inteligentes para controlar seus gadgets."
+
+#: data/com.github.manexim.home.appdata.xml.in:11
+msgid "Supported devices:"
+msgstr "Dispositivos suportados:"
+
+#: data/com.github.manexim.home.appdata.xml.in:13
+msgid "LIFX"
+msgstr ""
+
+#: data/com.github.manexim.home.appdata.xml.in:14
+msgid "Philips Hue"
+msgstr ""
+
+#: data/com.github.manexim.home.appdata.xml.in:26
+#: data/com.github.manexim.home.appdata.xml.in:52
+msgid "New:"
+msgstr "Novo: "
+
+#: data/com.github.manexim.home.appdata.xml.in:28
+msgid "Add new UI"
+msgstr "Adicionar nova interface do usuário"
+
+#: data/com.github.manexim.home.appdata.xml.in:29
+msgid "Add initial support for Philips Hue devices"
+msgstr "Adicionar suporte inicial para dispositivos Philips Hue"
+
+#: data/com.github.manexim.home.appdata.xml.in:30
+msgid "Add discovery for Philips Hue bridges"
+msgstr "Adicionar descoberta para pontes Philips Hue"
+
+#: data/com.github.manexim.home.appdata.xml.in:31
+msgid "Add page to configure Philips Hue bridges"
+msgstr "Adicionar página para configurar pontes Philips Hue"
+
+#: data/com.github.manexim.home.appdata.xml.in:32
+msgid "Add service to save configurations"
+msgstr "Adicionar serviço para guardar configurações"
+
+#: data/com.github.manexim.home.appdata.xml.in:34
+#: data/com.github.manexim.home.appdata.xml.in:58
+msgid "Improved:"
+msgstr "Melhorado:"
+
+#: data/com.github.manexim.home.appdata.xml.in:36
+msgid "Update welcome view"
+msgstr "Atualizar painel de boas-vindas"
+
+#: data/com.github.manexim.home.appdata.xml.in:37
+msgid "Add mode switch for dark theme if freedesktop schema is not available"
+msgstr "Adicionar alternar modo para tema escuro se o esquema freedesktop não estiver disponível"
+
+#: data/com.github.manexim.home.appdata.xml.in:39
+#: data/com.github.manexim.home.appdata.xml.in:62
+msgid "Fixed:"
+msgstr "Corrigido:"
+
+#: data/com.github.manexim.home.appdata.xml.in:42
+msgid "Translations:"
+msgstr "Traduções:"
+
+#: data/com.github.manexim.home.appdata.xml.in:44
+msgid "French (by NathanBnm)"
+msgstr "Francês (pelo NathanBnm)"
+
+#: data/com.github.manexim.home.appdata.xml.in:45
+msgid "German"
+msgstr "Alemão"
+
+#: data/com.github.manexim.home.appdata.xml.in:46
+msgid "Russian (by camellan)"
+msgstr "Russo (pelo camellan)"
+
+#: data/com.github.manexim.home.appdata.xml.in:54
+msgid "Add welcome view for onboarding"
+msgstr "Adicione uma vista de boas vindas ao onboarding"
+
+#: data/com.github.manexim.home.appdata.xml.in:55
+msgid "Show loading page if no smart home gadget is found"
+msgstr "Mostrar página de carregamento se não for encontrado "
+"nenhum dispositivo doméstico inteligente"
+
+#: data/com.github.manexim.home.appdata.xml.in:56
+msgid "Show manufacturer and model of device"
+msgstr "Mostrar fabricante e modelo do dispositivo"
+
+#: data/com.github.manexim.home.appdata.xml.in:60
+msgid "Save and load window settings"
+msgstr "Guardar e carregar as configurações da janela"
+
+#: data/com.github.manexim.home.appdata.xml.in:64
+msgid "Remove mention of elementary OS in app description"
+msgstr "Remover menção de elementaryOS na descrição do aplicativo"
+
+#: data/com.github.manexim.home.appdata.xml.in:65
+msgid "Suffix symbolic icon names with -symbolic"
+msgstr "Sufixo nomes de ícones simbólicos com -symbolic"
+
+#: data/com.github.manexim.home.appdata.xml.in:66
+msgid "Install all available icon sizes"
+msgstr "Instalar todos os tamanhos de ícones disponíveis"
+
+#: data/com.github.manexim.home.appdata.xml.in:72
+msgid "Initial release"
+msgstr "Lançamento inicial"
+
+#: data/com.github.manexim.home.appdata.xml.in:102
+msgid "Manexim"
+msgstr ""
+
+#: data/com.github.manexim.home.desktop.in:8
+msgid "com.github.manexim.home"
+msgstr ""
diff --git a/po/extra/ru.po b/po/extra/ru.po
index 23eb67f..030904d 100644
--- a/po/extra/ru.po
+++ b/po/extra/ru.po
@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: extra\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2019-06-22 09:47+0200\n"
+"POT-Creation-Date: 2019-07-11 19:55+0200\n"
"PO-Revision-Date: 2019-06-17 22:54+0400\n"
"Last-Translator: Andrey Kultyapov \n"
"Language-Team: none\n"
@@ -42,51 +42,102 @@ msgstr "Поддерживаемые устройства:"
msgid "LIFX"
msgstr "LIFX"
-#: data/com.github.manexim.home.appdata.xml.in:25
+#: data/com.github.manexim.home.appdata.xml.in:14
+msgid "Philips Hue"
+msgstr ""
+
+#: data/com.github.manexim.home.appdata.xml.in:26
+#: data/com.github.manexim.home.appdata.xml.in:52
msgid "New:"
msgstr "Новое:"
-#: data/com.github.manexim.home.appdata.xml.in:27
-msgid "Add welcome view for onboarding"
-msgstr "Add welcome view for onboarding"
-
#: data/com.github.manexim.home.appdata.xml.in:28
-msgid "Show loading page if no smart home gadget is found"
-msgstr "Show loading page if no smart home gadget is found"
+msgid "Add new UI"
+msgstr ""
#: data/com.github.manexim.home.appdata.xml.in:29
-msgid "Show manufacturer and model of device"
-msgstr "Show manufacturer and model of device"
+msgid "Add initial support for Philips Hue devices"
+msgstr ""
+
+#: data/com.github.manexim.home.appdata.xml.in:30
+msgid "Add discovery for Philips Hue bridges"
+msgstr ""
#: data/com.github.manexim.home.appdata.xml.in:31
+msgid "Add page to configure Philips Hue bridges"
+msgstr ""
+
+#: data/com.github.manexim.home.appdata.xml.in:32
+msgid "Add service to save configurations"
+msgstr ""
+
+#: data/com.github.manexim.home.appdata.xml.in:34
+#: data/com.github.manexim.home.appdata.xml.in:58
msgid "Improved:"
msgstr "Улучшено:"
-#: data/com.github.manexim.home.appdata.xml.in:33
-msgid "Save and load window settings"
-msgstr "Save and load window settings"
+#: data/com.github.manexim.home.appdata.xml.in:36
+msgid "Update welcome view"
+msgstr ""
+
+#: data/com.github.manexim.home.appdata.xml.in:37
+msgid "Add mode switch for dark theme if freedesktop schema is not available"
+msgstr ""
-#: data/com.github.manexim.home.appdata.xml.in:35
+#: data/com.github.manexim.home.appdata.xml.in:39
+#: data/com.github.manexim.home.appdata.xml.in:62
msgid "Fixed:"
msgstr "Исправлено:"
-#: data/com.github.manexim.home.appdata.xml.in:37
+#: data/com.github.manexim.home.appdata.xml.in:42
+msgid "Translations:"
+msgstr ""
+
+#: data/com.github.manexim.home.appdata.xml.in:44
+msgid "French (by NathanBnm)"
+msgstr ""
+
+#: data/com.github.manexim.home.appdata.xml.in:45
+msgid "German"
+msgstr ""
+
+#: data/com.github.manexim.home.appdata.xml.in:46
+msgid "Russian (by camellan)"
+msgstr ""
+
+#: data/com.github.manexim.home.appdata.xml.in:54
+msgid "Add welcome view for onboarding"
+msgstr "Add welcome view for onboarding"
+
+#: data/com.github.manexim.home.appdata.xml.in:55
+msgid "Show loading page if no smart home gadget is found"
+msgstr "Show loading page if no smart home gadget is found"
+
+#: data/com.github.manexim.home.appdata.xml.in:56
+msgid "Show manufacturer and model of device"
+msgstr "Show manufacturer and model of device"
+
+#: data/com.github.manexim.home.appdata.xml.in:60
+msgid "Save and load window settings"
+msgstr "Save and load window settings"
+
+#: data/com.github.manexim.home.appdata.xml.in:64
msgid "Remove mention of elementary OS in app description"
msgstr "Remove mention of elementary OS in app description"
-#: data/com.github.manexim.home.appdata.xml.in:38
+#: data/com.github.manexim.home.appdata.xml.in:65
msgid "Suffix symbolic icon names with -symbolic"
msgstr "Suffix symbolic icon names with -symbolic"
-#: data/com.github.manexim.home.appdata.xml.in:39
+#: data/com.github.manexim.home.appdata.xml.in:66
msgid "Install all available icon sizes"
msgstr "Install all available icon sizes"
-#: data/com.github.manexim.home.appdata.xml.in:45
+#: data/com.github.manexim.home.appdata.xml.in:72
msgid "Initial release"
msgstr "Initial release"
-#: data/com.github.manexim.home.appdata.xml.in:71
+#: data/com.github.manexim.home.appdata.xml.in:102
msgid "Manexim"
msgstr "Manexim"
diff --git a/po/fr.po b/po/fr.po
index cadfe21..dd4839d 100644
--- a/po/fr.po
+++ b/po/fr.po
@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: com.github.manexim.home\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2019-07-04 19:19+0200\n"
+"POT-Creation-Date: 2019-07-11 19:55+0200\n"
"PO-Revision-Date: 2019-06-17 22:32+0400\n"
"Last-Translator: NathanBnm\n"
"Language-Team: none\n"
@@ -66,27 +66,43 @@ msgstr "Contrôlez vos objets connectés pour maison intelligente"
msgid "Welcome to %s!"
msgstr ""
-#: src/pages/DevicePage.vala:62
+#: src/pages/DevicePage.vala:43
+msgid "Hue: "
+msgstr ""
+
+#: src/pages/DevicePage.vala:63
+msgid "Saturation: "
+msgstr ""
+
+#: src/pages/DevicePage.vala:85
+msgid "Brightness: "
+msgstr ""
+
+#: src/pages/DevicePage.vala:107
+msgid "Color temperature: "
+msgstr ""
+
+#: src/pages/DevicePage.vala:156
msgid "ID: "
msgstr "Identifiant : "
-#: src/pages/DevicePage.vala:63
+#: src/pages/DevicePage.vala:157
msgid "Manufacturer: "
msgstr "Fabricant : "
-#: src/pages/DevicePage.vala:64
+#: src/pages/DevicePage.vala:158
msgid "Model: "
msgstr "Modèle : "
-#: src/pages/DevicePage.vala:73
+#: src/pages/DevicePage.vala:167
msgid "Enabled"
msgstr "Activé"
-#: src/pages/DevicePage.vala:79
+#: src/pages/DevicePage.vala:173
msgid "Disabled"
msgstr "Désactivé"
-#: src/pages/DevicePage.vala:83
+#: src/pages/DevicePage.vala:177
msgid "Unknown"
msgstr "Inconnu"
diff --git a/po/ja.po b/po/ja.po
new file mode 100644
index 0000000..ce2af21
--- /dev/null
+++ b/po/ja.po
@@ -0,0 +1,140 @@
+# Japanese translations for com.github.manexim.home package.
+# Copyright (C) 2019 THE com.github.manexim.home'S COPYRIGHT HOLDER
+# This file is distributed under the same license as the com.github.manexim.home package.
+# Automatically generated, 2019.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: com.github.manexim.home\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2019-07-11 19:55+0200\n"
+"PO-Revision-Date: 2019-07-10 13:53+0900\n"
+"Last-Translator: Ryo Nakano \n"
+"Language-Team: none\n"
+"Language: ja\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=1; plural=0;\n"
+"X-Generator: Poedit 2.2.3\n"
+
+#: src/MainWindow.vala:58
+msgid "Light background"
+msgstr "ライトモード"
+
+#: src/MainWindow.vala:59
+msgid "Dark background"
+msgstr "ダークモード"
+
+#: src/MainWindow.vala:80 src/MainWindow.vala:85 src/MainWindow.vala:86
+msgid "Overview"
+msgstr "オーバービュー"
+
+#: src/onboarding/FinishView.vala:25
+msgid ""
+"You can control your smart home gadgets directly via your local network. A "
+"connection to the internet is not required."
+msgstr ""
+"ローカルネットワークを通じて、スマートホームガジェットを直接操作できます。イ"
+"ンターネットへの接続は必須ではありません。"
+
+#: src/onboarding/FinishView.vala:27
+msgid "Let's go"
+msgstr "始めましょう"
+
+#: src/onboarding/LIFXView.vala:25
+msgid ""
+"Smart Wi-Fi lights by LIFX are supported. They must already be connected to "
+"your Wi-Fi."
+msgstr ""
+"LIFX 製のスマートライトに対応しています。スマートライトは、すでに Wi-Fi に接"
+"続されている必要があります。"
+
+#: src/onboarding/PhilipsHueView.vala:25
+msgid ""
+"Smart ZigBee lights by Philips Hue are supported. They must already be "
+"connected to your Philips Hue Bridge."
+msgstr ""
+"Philips Hue 製のスマート ZigBee ライトに対応しています。スマートライトは、す"
+"でに Philips Hue ブリッジに接続されている必要があります。"
+
+#: src/onboarding/StartView.vala:25
+msgid "Control your smart home gadgets"
+msgstr "ホームガジェットを操作します"
+
+#: src/onboarding/StartView.vala:27
+#, c-format
+msgid "Welcome to %s!"
+msgstr "%s へようこそ!"
+
+#: src/pages/DevicePage.vala:43
+msgid "Hue: "
+msgstr "色合い: "
+
+#: src/pages/DevicePage.vala:63
+msgid "Saturation: "
+msgstr "鮮やかさ: "
+
+#: src/pages/DevicePage.vala:85
+msgid "Brightness: "
+msgstr "明るさ: "
+
+#: src/pages/DevicePage.vala:107
+msgid "Color temperature: "
+msgstr "色温度: "
+
+#: src/pages/DevicePage.vala:156
+msgid "ID: "
+msgstr "ID: "
+
+#: src/pages/DevicePage.vala:157
+msgid "Manufacturer: "
+msgstr "製造元: "
+
+#: src/pages/DevicePage.vala:158
+msgid "Model: "
+msgstr "モデル: "
+
+#: src/pages/DevicePage.vala:167
+msgid "Enabled"
+msgstr "有効"
+
+#: src/pages/DevicePage.vala:173
+msgid "Disabled"
+msgstr "無効"
+
+#: src/pages/DevicePage.vala:177
+msgid "Unknown"
+msgstr "不明"
+
+#: src/pages/LoadingPage.vala:27
+msgid "Looking for smart home gadgets to control."
+msgstr "操作できるスマートホームガジェットを検索しています。"
+
+#: src/pages/HueBridgeOnboardingPage.vala:38
+msgid "Press the push-link button in the middle of the Hue bridge."
+msgstr "Hue ブリッジの中央にあるプッシュリンクボタンを押してください。"
+
+#: src/pages/HueBridgeOnboardingPage.vala:59
+msgid "The Hue bridge was successfully registered."
+msgstr "Hue ブリッジが正常に登録されました。"
+
+#: src/views/Overview.vala:30
+msgid "Devices"
+msgstr "デバイス"
+
+#: src/views/Overview.vala:65
+msgid "Hubs"
+msgstr "ハブ"
+
+#: src/views/OnboardingView.vala:53
+msgid "Skip All"
+msgstr "すべてスキップ"
+
+#: src/views/OnboardingView.vala:64 src/views/OnboardingView.vala:91
+msgid "Next"
+msgstr "次へ"
+
+#: src/views/OnboardingView.vala:88
+msgid "Get Started"
+msgstr "始めましょう"
diff --git a/po/pl.po b/po/pl.po
new file mode 100644
index 0000000..e4fc01d
--- /dev/null
+++ b/po/pl.po
@@ -0,0 +1,141 @@
+# SOME DESCRIPTIVE TITLE.
+# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
+# This file is distributed under the same license as the com.github.manexim.home package.
+# FIRST AUTHOR , YEAR.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: com.github.manexim.home\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2019-07-11 19:55+0200\n"
+"PO-Revision-Date: 2019-07-18 20:54+0200\n"
+"Language-Team: \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Generator: Poedit 2.0.6\n"
+"Last-Translator: Oskar Kunik \n"
+"Plural-Forms: nplurals=3; plural=(n==1 ? 0 : n%10>=2 && n%10<=4 && (n"
+"%100<10 || n%100>=20) ? 1 : 2);\n"
+"Language: pl_PL\n"
+
+#: src/MainWindow.vala:58
+msgid "Light background"
+msgstr "Jasne tło"
+
+#: src/MainWindow.vala:59
+msgid "Dark background"
+msgstr "Ciemne tło"
+
+#: src/MainWindow.vala:80 src/MainWindow.vala:85 src/MainWindow.vala:86
+msgid "Overview"
+msgstr "Przegląd"
+
+#: src/onboarding/FinishView.vala:25
+msgid ""
+"You can control your smart home gadgets directly via your local network. A "
+"connection to the internet is not required."
+msgstr ""
+"Możesz sterować swoimi urządzeniami inteligentnego domu bezpośrednio z "
+"sieci lokalnej. Połączenie z internetem nie jest wymagane."
+
+#: src/onboarding/FinishView.vala:27
+msgid "Let's go"
+msgstr "Zaczynajmy"
+
+#: src/onboarding/LIFXView.vala:25
+msgid ""
+"Smart Wi-Fi lights by LIFX are supported. They must already be connected to "
+"your Wi-Fi."
+msgstr ""
+"Inteligentne oświetlenie Wi-Fi LIFX jest obsługiwane. Musi ono być już "
+"połączone z twoją siecią Wi-Fi."
+
+#: src/onboarding/PhilipsHueView.vala:25
+msgid ""
+"Smart ZigBee lights by Philips Hue are supported. They must already be "
+"connected to your Philips Hue Bridge."
+msgstr ""
+"Inteligentne oświetlenie ZigBee z Philips Hue jest obsługiwane. Musi ono "
+"być już połączone z twoim mostkiem Philips Hue."
+
+#: src/onboarding/StartView.vala:25
+msgid "Control your smart home gadgets"
+msgstr "Kontroluj twoje urządzenia inteligentnego domu"
+
+#: src/onboarding/StartView.vala:27
+#, c-format
+msgid "Welcome to %s!"
+msgstr "Witaj w %s!"
+
+#: src/pages/DevicePage.vala:43
+msgid "Hue: "
+msgstr "Barwa: "
+
+#: src/pages/DevicePage.vala:63
+msgid "Saturation: "
+msgstr "Nasycenie: "
+
+#: src/pages/DevicePage.vala:85
+msgid "Brightness: "
+msgstr "Jasność: "
+
+#: src/pages/DevicePage.vala:107
+msgid "Color temperature: "
+msgstr "Temperatura koloru: "
+
+#: src/pages/DevicePage.vala:156
+msgid "ID: "
+msgstr "ID: "
+
+#: src/pages/DevicePage.vala:157
+msgid "Manufacturer: "
+msgstr "Producent: "
+
+#: src/pages/DevicePage.vala:158
+msgid "Model: "
+msgstr "Model: "
+
+#: src/pages/DevicePage.vala:167
+msgid "Enabled"
+msgstr "Włączony"
+
+#: src/pages/DevicePage.vala:173
+msgid "Disabled"
+msgstr "Wyłączony"
+
+#: src/pages/DevicePage.vala:177
+msgid "Unknown"
+msgstr "Nieznany"
+
+#: src/pages/LoadingPage.vala:27
+msgid "Looking for smart home gadgets to control."
+msgstr "Wyszukuję urządzenia inteligentnego domu."
+
+#: src/pages/HueBridgeOnboardingPage.vala:38
+msgid "Press the push-link button in the middle of the Hue bridge."
+msgstr "Wciśnij przycisk na środku mostka Hue."
+
+#: src/pages/HueBridgeOnboardingPage.vala:59
+msgid "The Hue bridge was successfully registered."
+msgstr "Mostek Hue został pomyślnie dodany."
+
+#: src/views/Overview.vala:30
+msgid "Devices"
+msgstr "Urządzenia"
+
+#: src/views/Overview.vala:65
+msgid "Hubs"
+msgstr "Huby"
+
+#: src/views/OnboardingView.vala:53
+msgid "Skip All"
+msgstr "Pomiń Wszystkie"
+
+#: src/views/OnboardingView.vala:64 src/views/OnboardingView.vala:91
+msgid "Next"
+msgstr "Następny"
+
+#: src/views/OnboardingView.vala:88
+msgid "Get Started"
+msgstr "Rozpocznij"
diff --git a/po/pt.po b/po/pt.po
new file mode 100644
index 0000000..7449da8
--- /dev/null
+++ b/po/pt.po
@@ -0,0 +1,139 @@
+# Portuguese translations for com.github.manexim.home package.
+# Copyright (C) 2019 THE com.github.manexim.home'S COPYRIGHT HOLDER
+# This file is distributed under the same license as the com.github.manexim.home package.
+# Automatically generated, 2019.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: com.github.manexim.home\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2019-07-15 12:36+0200\n"
+"PO-Revision-Date: 2019-07-15 12:36+0200\n"
+"Last-Translator: aimproxy\n"
+"Language-Team: none\n"
+"Language: pt\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=2; plural=(n != 1);\n"
+
+#: src/MainWindow.vala:58
+msgid "Light background"
+msgstr "Fundo Branco"
+
+#: src/MainWindow.vala:59
+msgid "Dark background"
+msgstr "Fundo Preto"
+
+#: src/MainWindow.vala:80 src/MainWindow.vala:85 src/MainWindow.vala:86
+msgid "Overview"
+msgstr "Visão Global"
+
+#: src/onboarding/FinishView.vala:25
+msgid ""
+"You can control your smart home gadgets directly via your local network. A "
+"connection to the internet is not required."
+msgstr ""
+"Você pode controlar seus gadgets domésticos inteligentes diretamente pela "
+"rede local. Uma conexão com a internet não é necessária."
+
+#: src/onboarding/FinishView.vala:27
+msgid "Let's go"
+msgstr "Vamos a isto"
+
+#: src/onboarding/LIFXView.vala:25
+msgid ""
+"Smart Wi-Fi lights by LIFX are supported. They must already be connected to "
+"your Wi-Fi."
+msgstr ""
+"As luzes Smart Wi-Fi da LIFX são suportadas. Eles já devem estar conectados a "
+"a rua rede Wi-Fi"
+
+#: src/onboarding/PhilipsHueView.vala:25
+msgid ""
+"Smart ZigBee lights by Philips Hue are supported. They must already be "
+"connected to your Philips Hue Bridge."
+msgstr ""
+"As luzes Smart ZigBee da Philips Hue são suportadas. Eles já devem estar "
+"conectadas ao seu Philips Hue Bridge."
+
+#: src/onboarding/StartView.vala:25
+msgid "Control your smart home gadgets"
+msgstr "Controle seus gadgets domésticos inteligentes"
+
+#: src/onboarding/StartView.vala:27
+#, c-format
+msgid "Welcome to %s!"
+msgstr "Bem-vindo a %s!"
+
+#: src/pages/DevicePage.vala:43
+msgid "Hue: "
+msgstr "Matiz: "
+
+#: src/pages/DevicePage.vala:63
+msgid "Saturation: "
+msgstr "Saturação: "
+
+#: src/pages/DevicePage.vala:85
+msgid "Brightness: "
+msgstr "Brilho: "
+
+#: src/pages/DevicePage.vala:107
+msgid "Color temperature: "
+msgstr "Temperatura de cor: "
+
+#: src/pages/DevicePage.vala:156
+msgid "ID: "
+msgstr "ID"
+
+#: src/pages/DevicePage.vala:157
+msgid "Manufacturer: "
+msgstr "Fabricante: "
+
+#: src/pages/DevicePage.vala:158
+msgid "Model: "
+msgstr "Modelo: "
+
+#: src/pages/DevicePage.vala:167
+msgid "Enabled"
+msgstr "Ativado"
+
+#: src/pages/DevicePage.vala:173
+msgid "Disabled"
+msgstr "Desativado"
+
+#: src/pages/DevicePage.vala:177
+msgid "Unknown"
+msgstr "Desconhecido"
+
+#: src/pages/LoadingPage.vala:27
+msgid "Looking for smart home gadgets to control."
+msgstr "Procurando por gadgets domésticos inteligentes para controlar."
+
+#: src/pages/HueBridgeOnboardingPage.vala:38
+msgid "Press the push-link button in the middle of the Hue bridge."
+msgstr "Pressione o botão de link no meio do Hue bridge."
+
+#: src/pages/HueBridgeOnboardingPage.vala:59
+msgid "The Hue bridge was successfully registered."
+msgstr "O Hue bridge foi registrado com sucesso."
+
+#: src/views/Overview.vala:30
+msgid "Devices"
+msgstr "Dispositivos"
+
+#: src/views/Overview.vala:65
+msgid "Hubs"
+msgstr ""
+
+#: src/views/OnboardingView.vala:53
+msgid "Skip All"
+msgstr "Pular Tudo"
+
+#: src/views/OnboardingView.vala:64 src/views/OnboardingView.vala:91
+msgid "Next"
+msgstr "Próximo"
+
+#: src/views/OnboardingView.vala:88
+msgid "Get Started"
+msgstr "Iniciar"
diff --git a/po/ru.po b/po/ru.po
index 5a1af44..caf5fe7 100644
--- a/po/ru.po
+++ b/po/ru.po
@@ -7,8 +7,8 @@ msgid ""
msgstr ""
"Project-Id-Version: com.github.manexim.home\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2019-07-04 19:19+0200\n"
-"PO-Revision-Date: 2019-06-17 22:56+0400\n"
+"POT-Creation-Date: 2019-07-11 19:55+0200\n"
+"PO-Revision-Date: 2019-07-09 13:00+0400\n"
"Last-Translator: Andrey Kultyapov \n"
"Language-Team: none\n"
"Language: ru\n"
@@ -17,19 +17,19 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n"
"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n"
-"X-Generator: Poedit 2.0.6\n"
+"X-Generator: Poedit 2.2.3\n"
#: src/MainWindow.vala:58
msgid "Light background"
-msgstr ""
+msgstr "Светлая тема"
#: src/MainWindow.vala:59
msgid "Dark background"
-msgstr ""
+msgstr "Темная тема"
#: src/MainWindow.vala:80 src/MainWindow.vala:85 src/MainWindow.vala:86
msgid "Overview"
-msgstr ""
+msgstr "Обзор"
#: src/onboarding/FinishView.vala:25
msgid ""
@@ -66,31 +66,47 @@ msgstr "Управляйте своими умными домашними уст
#: src/onboarding/StartView.vala:27
#, c-format
msgid "Welcome to %s!"
-msgstr ""
+msgstr "Добро пожаловать в %s!"
-#: src/pages/DevicePage.vala:62
-msgid "ID: "
-msgstr ""
+#: src/pages/DevicePage.vala:43
+msgid "Hue: "
+msgstr "Оттенок: "
#: src/pages/DevicePage.vala:63
+msgid "Saturation: "
+msgstr "Насыщенность: "
+
+#: src/pages/DevicePage.vala:85
+msgid "Brightness: "
+msgstr "Яркость: "
+
+#: src/pages/DevicePage.vala:107
+msgid "Color temperature: "
+msgstr "Цветовая температура: "
+
+#: src/pages/DevicePage.vala:156
+msgid "ID: "
+msgstr "ИД: "
+
+#: src/pages/DevicePage.vala:157
msgid "Manufacturer: "
-msgstr ""
+msgstr "Производитель: "
-#: src/pages/DevicePage.vala:64
+#: src/pages/DevicePage.vala:158
msgid "Model: "
-msgstr ""
+msgstr "Модель: "
-#: src/pages/DevicePage.vala:73
+#: src/pages/DevicePage.vala:167
msgid "Enabled"
-msgstr ""
+msgstr "Включено"
-#: src/pages/DevicePage.vala:79
+#: src/pages/DevicePage.vala:173
msgid "Disabled"
-msgstr ""
+msgstr "Отключено"
-#: src/pages/DevicePage.vala:83
+#: src/pages/DevicePage.vala:177
msgid "Unknown"
-msgstr ""
+msgstr "Неизвестно"
#: src/pages/LoadingPage.vala:27
msgid "Looking for smart home gadgets to control."
@@ -98,28 +114,28 @@ msgstr "Поиск умных домашних устройств."
#: src/pages/HueBridgeOnboardingPage.vala:38
msgid "Press the push-link button in the middle of the Hue bridge."
-msgstr ""
+msgstr "Нажмите кнопку push-link в центре Hue bridge."
#: src/pages/HueBridgeOnboardingPage.vala:59
msgid "The Hue bridge was successfully registered."
-msgstr ""
+msgstr "Hue bridge успешно зарегистрирован."
#: src/views/Overview.vala:30
msgid "Devices"
-msgstr ""
+msgstr "Устройства"
#: src/views/Overview.vala:65
msgid "Hubs"
-msgstr ""
+msgstr "Хабы"
#: src/views/OnboardingView.vala:53
msgid "Skip All"
-msgstr ""
+msgstr "Пропустить все"
#: src/views/OnboardingView.vala:64 src/views/OnboardingView.vala:91
msgid "Next"
-msgstr ""
+msgstr "Далее"
#: src/views/OnboardingView.vala:88
msgid "Get Started"
-msgstr ""
+msgstr "Начать"
diff --git a/src/Application.vala b/src/Application.vala
index d227004..e47987d 100644
--- a/src/Application.vala
+++ b/src/Application.vala
@@ -33,6 +33,10 @@ public class Application : Granite.Application {
window = new MainWindow (this);
window.show_all ();
+
+ var css_provider = new Gtk.CssProvider ();
+ css_provider.load_from_resource ("com/github/manexim/home/styles/application.css");
+ Gtk.StyleContext.add_provider_for_screen (Gdk.Screen.get_default (), css_provider, Gtk.STYLE_PROVIDER_PRIORITY_APPLICATION);
}
public static int main (string[] args) {
diff --git a/src/MainWindow.vala b/src/MainWindow.vala
index da0857d..35edb63 100644
--- a/src/MainWindow.vala
+++ b/src/MainWindow.vala
@@ -38,7 +38,7 @@ public class MainWindow : Gtk.ApplicationWindow {
load_settings ();
var headerbar = new Gtk.HeaderBar ();
- headerbar.get_style_context ().add_class ("default-decoration");
+ headerbar.get_style_context ().add_class (Gtk.STYLE_CLASS_FLAT);
headerbar.show_close_button = true;
return_button = new Gtk.Button ();
diff --git a/src/colors/HSB.vala b/src/colors/HSB.vala
new file mode 100644
index 0000000..5b369f1
--- /dev/null
+++ b/src/colors/HSB.vala
@@ -0,0 +1,22 @@
+/*
+* Copyright (c) 2019 Manexim (https://github.com/manexim)
+*
+* This program is free software; you can redistribute it and/or
+* modify it under the terms of the GNU General Public
+* License as published by the Free Software Foundation; either
+* version 2 of the License, or (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* General Public License for more details.
+*
+* You should have received a copy of the GNU General Public
+* License along with this program; if not, write to the
+* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+* Boston, MA 02110-1301 USA
+*
+* Authored by: Marius Meisenzahl
+*/
+
+public class Colors.HSB {}
diff --git a/src/colors/RGB.vala b/src/colors/RGB.vala
new file mode 100644
index 0000000..86bd2b7
--- /dev/null
+++ b/src/colors/RGB.vala
@@ -0,0 +1,32 @@
+/*
+* Copyright (c) 2019 Manexim (https://github.com/manexim)
+*
+* This program is free software; you can redistribute it and/or
+* modify it under the terms of the GNU General Public
+* License as published by the Free Software Foundation; either
+* version 2 of the License, or (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* General Public License for more details.
+*
+* You should have received a copy of the GNU General Public
+* License along with this program; if not, write to the
+* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+* Boston, MA 02110-1301 USA
+*
+* Authored by: Marius Meisenzahl
+*/
+
+public class Colors.RGB {
+ public uint8 red;
+ public uint8 green;
+ public uint8 blue;
+
+ public RGB () {}
+
+ public RGB.from_hex (string hex) {
+ hex.scanf ("%02x%02x%02x", &red, &green, &blue);
+ }
+}
diff --git a/src/config/Constants.vala b/src/config/Constants.vala
index e77bda4..db87b50 100644
--- a/src/config/Constants.vala
+++ b/src/config/Constants.vala
@@ -23,5 +23,5 @@ namespace Config {
public const string APP_ID = "com.github.manexim.home";
public const string APP_AUTHOR = "Manexim";
public const string APP_NAME = "Home";
- public const string APP_VERSION = "0.3.0";
+ public const string APP_VERSION = "0.4.0";
}
diff --git a/src/controllers/DeviceController.vala b/src/controllers/DeviceController.vala
index ee2b379..cadd20f 100644
--- a/src/controllers/DeviceController.vala
+++ b/src/controllers/DeviceController.vala
@@ -28,6 +28,14 @@ public abstract class Controllers.DeviceController : Object {
);
}
+ public abstract void switch_hue (uint16 hue);
+
+ public abstract void switch_saturation (uint16 saturation);
+
+ public abstract void switch_brightness (uint16 brightness);
+
+ public abstract void switch_color_temperature (uint16 color_temperature);
+
public abstract void switch_power (bool on);
public Models.Device device {
diff --git a/src/controllers/DevicesController.vala b/src/controllers/DevicesController.vala
index 0049094..6fe1937 100644
--- a/src/controllers/DevicesController.vala
+++ b/src/controllers/DevicesController.vala
@@ -20,17 +20,40 @@
*/
public class Controllers.DevicesController {
+ private static DevicesController? _instance;
private Lifx.Service lifx_service;
private Philips.Hue.Service philips_hue_service;
+ private Gee.ArrayList device_list;
+ private Gee.HashMap device_loaded_map;
+
public signal void on_new_device (Models.Device device);
public signal void on_updated_device (Models.Device device);
- public DevicesController () {
+ public static DevicesController instance {
+ get {
+ if (_instance == null) {
+ _instance = new DevicesController ();
+ }
+
+ return _instance;
+ }
+ }
+
+ private DevicesController () {
+ device_list = new Gee.ArrayList ();
+ load_devices ();
+
lifx_service = Lifx.Service.instance;
lifx_service.on_new_device.connect ((device) => {
+ if (device_loaded_map.has_key (device.id)) {
+ device.icon = device_loaded_map.get (device.id).icon;
+ }
+
on_new_device (device);
+
+ device_list.add (device);
});
lifx_service.on_updated_device.connect ((device) => {
@@ -40,11 +63,51 @@ public class Controllers.DevicesController {
philips_hue_service = Philips.Hue.Service.instance;
philips_hue_service.on_new_device.connect ((device) => {
+ if (device_loaded_map.has_key (device.id)) {
+ device.icon = device_loaded_map.get (device.id).icon;
+ }
+
on_new_device (device);
+
+ device_list.add (device);
});
philips_hue_service.on_updated_device.connect ((device) => {
on_updated_device (device);
});
}
+
+ public Models.Device[] devices {
+ owned get {
+ return device_list.to_array ();
+ }
+ }
+
+ private void load_devices () {
+ device_loaded_map = new Gee.HashMap ();
+
+ try {
+ var configuration = Settings.get_default ().configuration_as_json ();
+ Json.Object o;
+ if (configuration.has_member ("devices")) {
+ o = configuration.get_object_member ("devices");
+ } else {
+ return;
+ }
+
+ foreach (var key in o.get_members ()) {
+ var obj = o.get_object_member (key);
+ if (obj == null) {
+ continue;
+ }
+
+ var device = new Models.Device.from_object (obj);
+ device.id = key;
+
+ device_loaded_map.set (device.id, device);
+ }
+ } catch (Error e) {
+ stderr.printf (e.message);
+ }
+ }
}
diff --git a/src/lifx/Controller.vala b/src/lifx/Controller.vala
index bc96531..16f3439 100644
--- a/src/lifx/Controller.vala
+++ b/src/lifx/Controller.vala
@@ -30,6 +30,34 @@ public class Lifx.Controller : Controllers.DeviceController {
service = Lifx.Service.instance;
}
+ public override void switch_hue (uint16 hue) {
+ var lamp = device as Lifx.Lamp;
+ service.set_color (lamp, hue, lamp.saturation, lamp.brightness, 0, 0);
+
+ lamp.hue = hue;
+ }
+
+ public override void switch_saturation (uint16 saturation) {
+ var lamp = device as Lifx.Lamp;
+ service.set_color (lamp, lamp.hue, saturation, lamp.brightness, 0, 0);
+
+ lamp.saturation = saturation;
+ }
+
+ public override void switch_brightness (uint16 brightness) {
+ var lamp = device as Lifx.Lamp;
+ service.set_color (lamp, lamp.hue, lamp.saturation, brightness, lamp.color_temperature, 0);
+
+ lamp.brightness = brightness;
+ }
+
+ public override void switch_color_temperature (uint16 color_temperature) {
+ var lamp = device as Lifx.Lamp;
+ service.set_color (lamp, 0, 0, lamp.brightness, color_temperature, 0);
+
+ lamp.color_temperature = color_temperature;
+ }
+
public override void switch_power (bool on) {
service.set_power (device as Lifx.Lamp, on ? 65535 : 0);
diff --git a/src/lifx/Lamp.vala b/src/lifx/Lamp.vala
index 673da9d..1c83278 100644
--- a/src/lifx/Lamp.vala
+++ b/src/lifx/Lamp.vala
@@ -21,8 +21,22 @@
public class Lifx.Lamp : Models.Lamp {
public Lamp () {
- icon = "com.github.manexim.home.lightbulb.lifx-symbolic";
+ default_icon = "com.github.manexim.home.icon.lightbulb.lifx-symbolic";
manufacturer = "LIFX";
+
+ supports_brightness = true;
+ brightness_min = 0;
+ brightness_max = 65535;
+
+ supports_color_temperature = true;
+ color_temperature_min = 2500;
+ color_temperature_max = 9000;
+
+ hue_min = 0;
+ hue_max = 65535;
+
+ saturation_min = 0;
+ saturation_max = 65535;
}
public uint16 port {
@@ -38,42 +52,6 @@ public class Lifx.Lamp : Models.Lamp {
}
}
- public uint16 hue {
- get {
- return (uint16) _obj.get_int_member ("hue");
- }
- set {
- _obj.set_int_member ("hue", value);
- }
- }
-
- public uint16 saturation {
- get {
- return (uint16) _obj.get_int_member ("saturation");
- }
- set {
- _obj.set_int_member ("saturation", value);
- }
- }
-
- public uint16 brightness {
- get {
- return (uint16) _obj.get_int_member ("brightness");
- }
- set {
- _obj.set_int_member ("brightness", value);
- }
- }
-
- public uint16 kelvin {
- get {
- return (uint16) _obj.get_int_member ("kelvin");
- }
- set {
- _obj.set_int_member ("kelvin", value);
- }
- }
-
public bool supports_infrared {
get {
if (!_obj.has_member ("supportsInfrared")) {
diff --git a/src/lifx/Packet.vala b/src/lifx/Packet.vala
index f9879d5..19ffe7d 100644
--- a/src/lifx/Packet.vala
+++ b/src/lifx/Packet.vala
@@ -347,6 +347,15 @@ public class Lifx.Packet {
buf4 = new Buffer.alloc (2);
buf4.write_uint16_le ((uint16) payload.get_int_member ("level"), 0);
break;
+ case 102: // SetColor
+ buf4 = new Buffer.alloc (13);
+ buf4.write_uint8 ((uint8) 0, 0);
+ buf4.write_uint16_le ((uint16) payload.get_int_member ("hue"), 1);
+ buf4.write_uint16_le ((uint16) payload.get_int_member ("saturation"), 3);
+ buf4.write_uint16_le ((uint16) payload.get_int_member ("brightness"), 5);
+ buf4.write_uint16_le ((uint16) payload.get_int_member ("kelvin"), 7);
+ buf4.write_uint32_le ((uint32) payload.get_int_member ("duration"), 9);
+ break;
case 117: // SetPower
buf4 = new Buffer.alloc (6);
buf4.write_uint16_le ((uint16) payload.get_int_member ("level"), 0);
diff --git a/src/lifx/Service.vala b/src/lifx/Service.vala
index 166ef41..cb7fbb0 100644
--- a/src/lifx/Service.vala
+++ b/src/lifx/Service.vala
@@ -61,6 +61,32 @@ public class Lifx.Service {
}
}
+ public void set_color (Lifx.Lamp lamp, uint16 hue, uint16 saturation, uint16 brightness, uint16 kelvin, uint32 duration=0) {
+ var packet = new Lifx.Packet ();
+ packet.type = 102;
+ packet.tagged = false;
+ packet.addressable = true;
+ packet.target = lamp.id;
+ packet.ack_required = false;
+ packet.res_required = false;
+ packet.source = source++;
+ packet.payload.set_int_member ("hue", hue);
+ packet.payload.set_int_member ("saturation", saturation);
+ packet.payload.set_int_member ("brightness", brightness);
+ packet.payload.set_int_member ("kelvin", kelvin);
+ packet.payload.set_int_member ("duration", duration);
+
+ try {
+ socket.send_to (
+ new InetSocketAddress (
+ new InetAddress.from_string ("255.255.255.255"), lamp.port),
+ packet.raw
+ );
+ } catch (Error e) {
+ stderr.printf (e.message);
+ }
+ }
+
private Service () {
device_map = new Gee.HashMap ();
@@ -75,6 +101,7 @@ public class Lifx.Service {
lamp.power = Types.Power.OFF;
lamp.manufacturer = "LIFX";
lamp.model = "White 800 (High Voltage)";
+ lamp.supports_color_temperature = true;
on_new_device (lamp);
}
@@ -86,6 +113,8 @@ public class Lifx.Service {
lamp.id = "??:??:??:??:??:??:??:??";
lamp.power = Types.Power.OFF;
lamp.model = "Color 1000";
+ lamp.supports_color = true;
+ lamp.supports_color_temperature = true;
on_new_device (lamp as Models.Device);
}
@@ -97,6 +126,8 @@ public class Lifx.Service {
lamp.id = "??:??:??:??:??:??:??:??";
lamp.power = Types.Power.ON;
lamp.model = "Color 1000";
+ lamp.supports_color = true;
+ lamp.supports_color_temperature = true;
on_new_device (lamp as Models.Device);
}
@@ -108,6 +139,8 @@ public class Lifx.Service {
lamp.id = "??:??:??:??:??:??:??:??";
lamp.power = Types.Power.ON;
lamp.model = "Color 1000";
+ lamp.supports_color = true;
+ lamp.supports_color_temperature = true;
on_new_device (lamp as Models.Device);
}
@@ -119,6 +152,8 @@ public class Lifx.Service {
lamp.id = "??:??:??:??:??:??:??:??";
lamp.power = Types.Power.ON;
lamp.model = "Color 1000";
+ lamp.supports_color = true;
+ lamp.supports_color_temperature = true;
on_new_device (lamp as Models.Device);
}
@@ -130,6 +165,8 @@ public class Lifx.Service {
lamp.id = "??:??:??:??:??:??:??:??";
lamp.power = Types.Power.OFF;
lamp.model = "Color 1000";
+ lamp.supports_color = true;
+ lamp.supports_color_temperature = true;
on_new_device (lamp as Models.Device);
}
@@ -263,7 +300,7 @@ public class Lifx.Service {
(uint16) packet.payload.get_int_member ("saturation");
((Lifx.Lamp) device_map.get (packet.target)).brightness =
(uint16) packet.payload.get_int_member ("brightness");
- ((Lifx.Lamp) device_map.get (packet.target)).kelvin =
+ ((Lifx.Lamp) device_map.get (packet.target)).color_temperature =
(uint16) packet.payload.get_int_member ("kelvin");
on_updated_device (device_map.get (packet.target));
@@ -276,7 +313,7 @@ public class Lifx.Service {
device.hue = (uint16) packet.payload.get_int_member ("hue");
device.saturation = (uint16) packet.payload.get_int_member ("saturation");
device.brightness = (uint16) packet.payload.get_int_member ("brightness");
- device.kelvin = (uint16) packet.payload.get_int_member ("kelvin");
+ device.color_temperature = (uint16) packet.payload.get_int_member ("kelvin");
device_map.set (device.id, device);
on_new_device (device);
diff --git a/src/meson.build b/src/meson.build
index 1759b5b..be50a21 100644
--- a/src/meson.build
+++ b/src/meson.build
@@ -1,4 +1,6 @@
sources = [
+ 'colors/HSB.vala',
+ 'colors/RGB.vala',
'config/Constants.vala',
'controllers/DeviceController.vala',
'controllers/DevicesController.vala',
@@ -15,6 +17,7 @@ sources = [
'onboarding/LIFXView.vala',
'onboarding/PhilipsHueView.vala',
'onboarding/StartView.vala',
+ 'pages/AbstractDevicePage.vala',
'pages/HueBridgeOnboardingPage.vala',
'pages/DevicePage.vala',
'pages/LoadingPage.vala',
@@ -33,6 +36,7 @@ sources = [
'views/Overview.vala',
'widgets/Carousel.vala',
'widgets/CarouselItem.vala',
+ 'widgets/IconPopover.vala',
'widgets/Overlay.vala',
'MainWindow.vala'
]
@@ -40,6 +44,7 @@ sources = [
executable(
meson.project_name(),
sources + ['Application.vala'],
+ asresources,
dependencies: [
gtk_plus_3_dep,
json_glib_1_dep,
diff --git a/src/models/Device.vala b/src/models/Device.vala
index a0eb3b7..baddc29 100644
--- a/src/models/Device.vala
+++ b/src/models/Device.vala
@@ -19,4 +19,8 @@
* Authored by: Marius Meisenzahl
*/
-public class Models.Device : Models.Thing {}
+public class Models.Device : Models.Thing {
+ public Device.from_object (Json.Object object) {
+ _obj = object;
+ }
+}
diff --git a/src/models/Lamp.vala b/src/models/Lamp.vala
index 7ff6b95..7ac4b9e 100644
--- a/src/models/Lamp.vala
+++ b/src/models/Lamp.vala
@@ -21,7 +21,47 @@
public class Models.Lamp : Models.Device {
public Lamp () {
- icon = "com.github.manexim.home.lightbulb-symbolic";
+ default_icon = "com.github.manexim.home.icon.lightbulb-symbolic";
+ }
+
+ public bool supports_brightness {
+ get {
+ if (!_obj.has_member ("supportsBrightness")) {
+ supports_brightness = false;
+ }
+
+ return _obj.get_boolean_member ("supportsBrightness");
+ }
+ set {
+ _obj.set_boolean_member ("supportsBrightness", value);
+ }
+ }
+
+ public uint16 brightness_min {
+ get {
+ return (uint16) _obj.get_int_member ("brightnessMin");
+ }
+ set {
+ _obj.set_int_member ("brightnessMin", value);
+ }
+ }
+
+ public uint16 brightness_max {
+ get {
+ return (uint16) _obj.get_int_member ("brightnessMax");
+ }
+ set {
+ _obj.set_int_member ("brightnessMax", value);
+ }
+ }
+
+ public uint16 brightness {
+ get {
+ return (uint16) _obj.get_int_member ("brightness");
+ }
+ set {
+ _obj.set_int_member ("brightness", value);
+ }
}
public bool supports_color {
@@ -36,4 +76,106 @@ public class Models.Lamp : Models.Device {
_obj.set_boolean_member ("supportsColor", value);
}
}
+
+ public bool supports_color_temperature {
+ get {
+ if (!_obj.has_member ("supportsColorTemperature")) {
+ supports_color_temperature = false;
+ }
+
+ return _obj.get_boolean_member ("supportsColorTemperature");
+ }
+ set {
+ _obj.set_boolean_member ("supportsColorTemperature", value);
+ }
+ }
+
+ public uint16 color_temperature_min {
+ get {
+ if (!_obj.has_member ("colorTemperatureMin")) {
+ color_temperature_min = 0;
+ }
+
+ return (uint16) _obj.get_int_member ("colorTemperatureMin");
+ }
+ set {
+ _obj.set_int_member ("colorTemperatureMin", value);
+ }
+ }
+
+ public uint16 color_temperature_max {
+ get {
+ if (!_obj.has_member ("colorTemperatureMax")) {
+ color_temperature_max = 0;
+ }
+
+ return (uint16) _obj.get_int_member ("colorTemperatureMax");
+ }
+ set {
+ _obj.set_int_member ("colorTemperatureMax", value);
+ }
+ }
+
+ public uint16 color_temperature {
+ get {
+ return (uint16) _obj.get_int_member ("colorTemperature");
+ }
+ set {
+ _obj.set_int_member ("colorTemperature", value);
+ }
+ }
+
+ public uint16 hue_min {
+ get {
+ return (uint16) _obj.get_int_member ("hueMin");
+ }
+ set {
+ _obj.set_int_member ("hueMin", value);
+ }
+ }
+
+ public uint16 hue_max {
+ get {
+ return (uint16) _obj.get_int_member ("hueMax");
+ }
+ set {
+ _obj.set_int_member ("hueMax", value);
+ }
+ }
+
+ public uint16 hue {
+ get {
+ return (uint16) _obj.get_int_member ("hue");
+ }
+ set {
+ _obj.set_int_member ("hue", value);
+ }
+ }
+
+ public uint16 saturation_min {
+ get {
+ return (uint16) _obj.get_int_member ("saturationMin");
+ }
+ set {
+ _obj.set_int_member ("saturationMin", value);
+ }
+ }
+
+ public uint16 saturation_max {
+ get {
+ return (uint16) _obj.get_int_member ("saturationMax");
+ }
+ set {
+ _obj.set_int_member ("saturationMax", value);
+ }
+ }
+
+ public uint16 saturation {
+ get {
+ return (uint16) _obj.get_int_member ("saturation");
+ }
+ set {
+ _obj.set_int_member ("saturation", value);
+ }
+ }
}
diff --git a/src/models/Thing.vala b/src/models/Thing.vala
index 4bd1495..4933d83 100644
--- a/src/models/Thing.vala
+++ b/src/models/Thing.vala
@@ -24,7 +24,7 @@ public class Models.Thing : Object {
public Thing () {
_obj = new Json.Object ();
- icon = "com.github.manexim.home.thing-symbolic";
+ default_icon = "com.github.manexim.home.icon.thing-symbolic";
}
public Thing.from_object (Json.Object object) {
@@ -57,10 +57,23 @@ public class Models.Thing : Object {
}
}
+ public string default_icon {
+ get {
+ if (!_obj.has_member ("defaultIcon")) {
+ default_icon = null;
+ }
+
+ return _obj.get_string_member ("defaultIcon");
+ }
+ set {
+ _obj.set_string_member ("defaultIcon", value);
+ }
+ }
+
public string icon {
get {
if (!_obj.has_member ("icon")) {
- icon = null;
+ return default_icon;
}
return _obj.get_string_member ("icon");
diff --git a/src/pages/AbstractDevicePage.vala b/src/pages/AbstractDevicePage.vala
new file mode 100644
index 0000000..b6085db
--- /dev/null
+++ b/src/pages/AbstractDevicePage.vala
@@ -0,0 +1,163 @@
+/*
+* Copyright (c) 2019 Manexim (https://github.com/manexim)
+*
+* This program is free software; you can redistribute it and/or
+* modify it under the terms of the GNU General Public
+* License as published by the Free Software Foundation; either
+* version 2 of the License, or (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* General Public License for more details.
+*
+* You should have received a copy of the GNU General Public
+* License along with this program; if not, write to the
+* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+* Boston, MA 02110-1301 USA
+*
+* Authored by: Marius Meisenzahl
+*/
+
+public abstract class Pages.AbstractDevicePage : Granite.SettingsPage {
+ private Gtk.Button header_icon_button;
+ private Gtk.Label description_label;
+ private Gtk.Label title_label;
+ private string _description;
+
+ public Gtk.ButtonBox action_area { get; construct; }
+ public Gtk.Grid content_area { get; construct; }
+ public Gtk.Switch? status_switch { get; construct; }
+ public bool activatable { get; construct; }
+
+ public string description {
+ get {
+ return _description;
+ }
+ construct set {
+ if (description_label != null) {
+ description_label.label = value;
+ }
+ _description = value;
+ }
+ }
+
+ public new string icon_name {
+ get {
+ return _icon_name;
+ }
+ construct set {
+ if (header_icon_button != null) {
+ header_icon_button.set_image (new Gtk.Image.from_icon_name (value, Gtk.IconSize.LARGE_TOOLBAR));
+ (header_icon_button.image as Gtk.Image).pixel_size = 64;
+ }
+ _icon_name = value;
+ }
+ }
+
+ public new string title {
+ get {
+ return _title;
+ }
+ construct set {
+ if (title_label != null) {
+ title_label.label = value;
+ }
+ _title = value;
+ }
+ }
+
+ protected AbstractDevicePage () {}
+
+ construct {
+ header_icon_button = new Gtk.Button.from_icon_name (icon_name, Gtk.IconSize.DIALOG);
+ (header_icon_button.image as Gtk.Image).pixel_size = 64;
+ header_icon_button.get_style_context ().add_class (Gtk.STYLE_CLASS_FLAT);
+ header_icon_button.valign = Gtk.Align.START;
+
+ header_icon_button.clicked.connect (() => {
+ var icon_popover = new Widgets.IconPopover (header_icon_button);
+ icon_popover.change_icon.connect ((name) => {
+ icon_name = name;
+ });
+ icon_popover.show_all ();
+ });
+
+ title_label = new Gtk.Label (title);
+ title_label.ellipsize = Pango.EllipsizeMode.END;
+ title_label.xalign = 0;
+ title_label.get_style_context ().add_class ("h2");
+
+ var header_area = new Gtk.Grid ();
+ header_area.column_spacing = 12;
+ header_area.row_spacing = 3;
+
+ header_area.attach (title_label, 1, 0);
+
+ if (description != null) {
+ description_label = new Gtk.Label (description);
+ description_label.xalign = 0;
+ description_label.wrap = true;
+
+ header_area.attach (header_icon_button, 0, 0, 1, 2);
+ header_area.attach (description_label, 1, 1);
+ } else {
+ header_area.attach (header_icon_button, 0, 0);
+ }
+
+ if (activatable) {
+ status_switch = new Gtk.Switch ();
+ status_switch.hexpand = true;
+ status_switch.halign = Gtk.Align.END;
+ status_switch.valign = Gtk.Align.CENTER;
+ header_area.attach (status_switch, 2, 0);
+ }
+
+ content_area = new Gtk.Grid ();
+ content_area.column_spacing = 12;
+ content_area.row_spacing = 12;
+ content_area.vexpand = true;
+
+ action_area = new Gtk.ButtonBox (Gtk.Orientation.HORIZONTAL);
+ action_area.set_layout (Gtk.ButtonBoxStyle.END);
+ action_area.spacing = 6;
+
+ var grid = new Gtk.Grid ();
+ grid.margin = 12;
+ grid.orientation = Gtk.Orientation.VERTICAL;
+ grid.row_spacing = 24;
+ grid.add (header_area);
+ grid.add (content_area);
+ grid.add (action_area);
+
+ add (grid);
+
+ set_action_area_visibility ();
+
+ action_area.add.connect (set_action_area_visibility);
+ action_area.remove.connect (set_action_area_visibility);
+
+ notify["icon-name"].connect (() => {
+ if (header_icon_button != null) {
+ header_icon_button.set_image (new Gtk.Image.from_icon_name (icon_name, Gtk.IconSize.LARGE_TOOLBAR));
+ (header_icon_button.image as Gtk.Image).pixel_size = 64;
+ }
+ });
+
+ notify["title"].connect (() => {
+ if (title_label != null) {
+ title_label.label = title;
+ }
+ });
+ }
+
+ private void set_action_area_visibility () {
+ if (action_area.get_children () != null) {
+ action_area.no_show_all = false;
+ action_area.show ();
+ } else {
+ action_area.no_show_all = true;
+ action_area.hide ();
+ }
+ }
+}
diff --git a/src/pages/DevicePage.vala b/src/pages/DevicePage.vala
index 4c9259c..e964e81 100644
--- a/src/pages/DevicePage.vala
+++ b/src/pages/DevicePage.vala
@@ -19,7 +19,7 @@
* Authored by: Marius Meisenzahl
*/
-public class Pages.DevicePage : Granite.SimpleSettingsPage {
+public class Pages.DevicePage : Pages.AbstractDevicePage {
private Controllers.DeviceController controller;
public DevicePage (Models.Device device) {
@@ -30,10 +30,100 @@ public class Pages.DevicePage : Granite.SimpleSettingsPage {
title: device.name != null ? device.name : device.id
);
- if (device is Lifx.Lamp) {
- controller = new Lifx.Controller (device);
- } else if (device is Philips.Hue.Lamp) {
- controller = new Philips.Hue.Controller (device);
+ if (device is Models.Lamp) {
+ var lamp = device as Models.Lamp;
+
+ if (lamp is Lifx.Lamp) {
+ controller = new Lifx.Controller (lamp);
+ } else if (lamp is Philips.Hue.Lamp) {
+ controller = new Philips.Hue.Controller (lamp);
+ }
+
+ if (lamp.supports_color) {
+ var hue_label = new Gtk.Label (_("Hue: "));
+ hue_label.xalign = 1;
+
+ var hue_scale = new Gtk.Scale.with_range (
+ Gtk.Orientation.HORIZONTAL, lamp.hue_min, lamp.hue_max, 1.0
+ );
+
+ hue_scale.adjustment.value = lamp.hue;
+ hue_scale.hexpand = true;
+ hue_scale.adjustment.value_changed.connect (() => {
+ #if DEMO_MODE
+ lamp.hue = (uint16) hue_scale.adjustment.value;
+ #else
+ controller.switch_hue ((uint16) hue_scale.adjustment.value);
+ #endif
+ });
+
+ content_area.attach (hue_label, 0, 0, 1, 1);
+ content_area.attach (hue_scale, 1, 0, 1, 1);
+
+ var saturation_label = new Gtk.Label (_("Saturation: "));
+ saturation_label.xalign = 1;
+
+ var saturation_scale = new Gtk.Scale.with_range (
+ Gtk.Orientation.HORIZONTAL, lamp.saturation_min, lamp.saturation_max, 1.0
+ );
+
+ saturation_scale.adjustment.value = lamp.saturation;
+ saturation_scale.hexpand = true;
+ saturation_scale.adjustment.value_changed.connect (() => {
+ #if DEMO_MODE
+ lamp.saturation = (uint16) saturation_scale.adjustment.value;
+ #else
+ controller.switch_saturation ((uint16) saturation_scale.adjustment.value);
+ #endif
+ });
+
+ content_area.attach (saturation_label, 0, 1, 1, 1);
+ content_area.attach (saturation_scale, 1, 1, 1, 1);
+ }
+
+ if (lamp.supports_brightness) {
+ var brightness_label = new Gtk.Label (_("Brightness: "));
+ brightness_label.xalign = 1;
+
+ var brightness_scale = new Gtk.Scale.with_range (
+ Gtk.Orientation.HORIZONTAL, lamp.brightness_min, lamp.brightness_max, 1.0
+ );
+
+ brightness_scale.adjustment.value = lamp.brightness;
+ brightness_scale.hexpand = true;
+ brightness_scale.adjustment.value_changed.connect (() => {
+ #if DEMO_MODE
+ lamp.brightness = (uint16) brightness_scale.adjustment.value;
+ #else
+ controller.switch_brightness ((uint16) brightness_scale.adjustment.value);
+ #endif
+ });
+
+ content_area.attach (brightness_label, 0, 2, 1, 1);
+ content_area.attach (brightness_scale, 1, 2, 1, 1);
+ }
+
+ if (lamp.supports_color_temperature) {
+ var color_temperature_label = new Gtk.Label (_("Color temperature: "));
+ color_temperature_label.xalign = 1;
+
+ var color_temperature_scale = new Gtk.Scale.with_range (
+ Gtk.Orientation.HORIZONTAL, lamp.color_temperature_min, lamp.color_temperature_max, 1.0
+ );
+
+ color_temperature_scale.adjustment.value = lamp.color_temperature;
+ color_temperature_scale.hexpand = true;
+ color_temperature_scale.adjustment.value_changed.connect (() => {
+ #if DEMO_MODE
+ lamp.color_temperature = (uint16) color_temperature_scale.adjustment.value;
+ #else
+ controller.switch_color_temperature ((uint16) color_temperature_scale.adjustment.value);
+ #endif
+ });
+
+ content_area.attach (color_temperature_label, 0, 3, 1, 1);
+ content_area.attach (color_temperature_scale, 1, 3, 1, 1);
+ }
}
controller.device.notify.connect (update_status);
@@ -55,6 +145,10 @@ public class Pages.DevicePage : Granite.SimpleSettingsPage {
return state;
});
+ notify["icon-name"].connect (() => {
+ device.icon = icon_name;
+ });
+
show_all ();
}
diff --git a/src/philips/hue/Bridge.vala b/src/philips/hue/Bridge.vala
index 1a70644..e56999d 100644
--- a/src/philips/hue/Bridge.vala
+++ b/src/philips/hue/Bridge.vala
@@ -21,7 +21,7 @@
public class Philips.Hue.Bridge : Models.Device {
public Bridge () {
- icon = "com.github.manexim.home.bridge.philips.hue-symbolic";
+ default_icon = "com.github.manexim.home.icon.bridge.philips.hue-symbolic";
manufacturer = "Philips";
power = Types.Power.WARNING;
}
diff --git a/src/philips/hue/BridgeController.vala b/src/philips/hue/BridgeController.vala
index bad316c..4bc0c4b 100644
--- a/src/philips/hue/BridgeController.vala
+++ b/src/philips/hue/BridgeController.vala
@@ -200,6 +200,33 @@ public class Philips.Hue.BridgeController {
lamp.bridge = bridge;
var on = light.get_object_member ("state").get_boolean_member ("on");
+ if (light.get_object_member ("state").has_member ("bri")) {
+ lamp.supports_brightness = true;
+ lamp.brightness = (uint8) light.get_object_member ("state").get_int_member ("bri");
+ }
+
+ if (light.get_object_member ("state").has_member ("ct")) {
+ lamp.supports_color_temperature = true;
+ lamp.color_temperature = (uint16) (1000000.0 / light.get_object_member ("state").get_int_member ("ct"));
+ }
+
+ if (light.get_object_member ("state").has_member ("hue")) {
+ lamp.supports_color = true;
+ lamp.hue = (uint16) light.get_object_member ("state").get_int_member ("hue");
+ }
+
+ if (light.get_object_member ("state").has_member ("sat")) {
+ lamp.supports_color = true;
+ lamp.saturation = (uint16) light.get_object_member ("state").get_int_member ("sat");
+ }
+
+ if (light.get_object_member ("capabilities").get_object_member ("control").has_member ("ct")) {
+ lamp.color_temperature_min = (uint16) (1000000.0 / light.get_object_member ("capabilities").
+ get_object_member ("control").get_object_member ("ct").get_int_member ("max"));
+ lamp.color_temperature_max = (uint16) (1000000.0 / light.get_object_member ("capabilities").
+ get_object_member ("control").get_object_member ("ct").get_int_member ("min"));
+ }
+
if (on) {
lamp.power = Types.Power.ON;
} else {
@@ -220,6 +247,41 @@ public class Philips.Hue.BridgeController {
}
public void switch_light_power (Philips.Hue.Lamp lamp, bool on) {
+ var state = new Json.Object ();
+ state.set_boolean_member ("on", on);
+
+ switch_light_state (lamp, state);
+ }
+
+ public void switch_light_hue (Philips.Hue.Lamp lamp, uint16 hue) {
+ var state = new Json.Object ();
+ state.set_int_member ("hue", hue);
+
+ switch_light_state (lamp, state);
+ }
+
+ public void switch_light_saturation (Philips.Hue.Lamp lamp, uint16 saturation) {
+ var state = new Json.Object ();
+ state.set_int_member ("sat", saturation);
+
+ switch_light_state (lamp, state);
+ }
+
+ public void switch_light_brightness (Philips.Hue.Lamp lamp, uint16 brightness) {
+ var state = new Json.Object ();
+ state.set_int_member ("bri", brightness);
+
+ switch_light_state (lamp, state);
+ }
+
+ public void switch_light_color_temperature (Philips.Hue.Lamp lamp, uint16 color_temperature) {
+ var state = new Json.Object ();
+ state.set_int_member ("ct", (uint16) (1000000 / color_temperature));
+
+ switch_light_state (lamp, state);
+ }
+
+ private void switch_light_state (Philips.Hue.Lamp lamp, Json.Object state) {
string url = "%sapi/%s/lights/%s/state".printf (_bridge.base_url, _bridge.username, lamp.number);
var session = new Soup.Session ();
@@ -227,12 +289,9 @@ public class Philips.Hue.BridgeController {
size_t length;
- var obj = new Json.Object ();
- obj.set_boolean_member ("on", on);
-
var gen = new Json.Generator ();
var root = new Json.Node (Json.NodeType.OBJECT);
- root.set_object (obj);
+ root.set_object (state);
gen.set_root (root);
var params = gen.to_data (out length);
diff --git a/src/philips/hue/Controller.vala b/src/philips/hue/Controller.vala
index c538c12..088c5d0 100644
--- a/src/philips/hue/Controller.vala
+++ b/src/philips/hue/Controller.vala
@@ -30,6 +30,34 @@ public class Philips.Hue.Controller : Controllers.DeviceController {
controller = new Philips.Hue.BridgeController ((device as Philips.Hue.Lamp).bridge);
}
+ public override void switch_hue (uint16 hue) {
+ var lamp = device as Philips.Hue.Lamp;
+ controller.switch_light_hue (lamp, hue);
+
+ lamp.hue = hue;
+ }
+
+ public override void switch_saturation (uint16 saturation) {
+ var lamp = device as Philips.Hue.Lamp;
+ controller.switch_light_saturation (lamp, saturation);
+
+ lamp.saturation = saturation;
+ }
+
+ public override void switch_brightness (uint16 brightness) {
+ var lamp = device as Philips.Hue.Lamp;
+ controller.switch_light_brightness (lamp, brightness);
+
+ lamp.brightness = brightness;
+ }
+
+ public override void switch_color_temperature (uint16 color_temperature) {
+ var lamp = device as Philips.Hue.Lamp;
+ controller.switch_light_color_temperature (lamp, color_temperature);
+
+ lamp.color_temperature = color_temperature;
+ }
+
public override void switch_power (bool on) {
controller.switch_light_power (device as Philips.Hue.Lamp, on);
diff --git a/src/philips/hue/Lamp.vala b/src/philips/hue/Lamp.vala
index 95f6d75..b88f24c 100644
--- a/src/philips/hue/Lamp.vala
+++ b/src/philips/hue/Lamp.vala
@@ -23,8 +23,17 @@ public class Philips.Hue.Lamp : Models.Lamp {
public Philips.Hue.Bridge bridge;
public Lamp () {
- icon = "com.github.manexim.home.lightbulb.philips.hue-symbolic";
+ default_icon = "com.github.manexim.home.icon.lightbulb.philips.hue-symbolic";
manufacturer = "Philips";
+
+ brightness_min = 0;
+ brightness_max = 254;
+
+ hue_min = 0;
+ hue_max = 65535;
+
+ saturation_min = 0;
+ saturation_max = 254;
}
public string number {
diff --git a/src/services/Settings.vala b/src/services/Settings.vala
index 154a500..20323f2 100644
--- a/src/services/Settings.vala
+++ b/src/services/Settings.vala
@@ -90,6 +90,10 @@ public class Settings : Granite.Services.Settings {
}
public bool is_first_run () {
+ #if DEMO_MODE
+ return true;
+ #endif
+
return last_started_app_version == "";
}
@@ -106,6 +110,10 @@ public class Settings : Granite.Services.Settings {
}
public void save () {
+ #if DEMO_MODE
+ return;
+ #endif
+
last_started_app_version = Config.APP_VERSION;
var philips_hue_service = Philips.Hue.Service.instance;
@@ -127,6 +135,17 @@ public class Settings : Granite.Services.Settings {
philips.set_object_member ("hue", hue);
com.set_object_member ("philips", philips);
obj.set_object_member ("com", com);
+
+ var devices = new Json.Object ();
+ foreach (var device in Controllers.DevicesController.instance.devices) {
+ if (device.icon != device.default_icon) {
+ var device_obj = new Json.Object ();
+ device_obj.set_string_member ("icon", device.icon);
+ devices.set_object_member (device.id, device_obj);
+ }
+ }
+ obj.set_object_member ("devices", devices);
+
var gen = new Json.Generator ();
var root = new Json.Node (Json.NodeType.OBJECT);
root.set_object (obj);
diff --git a/src/views/DevicesView.vala b/src/views/DevicesView.vala
index 2a3d4fe..f2b0102 100644
--- a/src/views/DevicesView.vala
+++ b/src/views/DevicesView.vala
@@ -24,7 +24,7 @@ public class Views.DevicesView : Gtk.Paned {
private Controllers.DevicesController devices_controller;
public DevicesView () {
- devices_controller = new Controllers.DevicesController ();
+ devices_controller = Controllers.DevicesController.instance;
stack = new Gtk.Stack ();
diff --git a/src/views/OnboardingView.vala b/src/views/OnboardingView.vala
index 84505d8..76b4ac0 100644
--- a/src/views/OnboardingView.vala
+++ b/src/views/OnboardingView.vala
@@ -47,7 +47,11 @@ public class Views.OnboardingView : Gtk.Grid {
GLib.List views = stack.get_children ();
foreach (Gtk.Widget view in views) {
var view_name_value = GLib.Value (typeof (string));
- stack.child_get_property (view, "name", ref view_name_value);
+ #if ARM
+ stack.child_get_property (view, "name", view_name_value);
+ #else
+ stack.child_get_property (view, "name", ref view_name_value);
+ #endif
}
var skip_button = new Gtk.Button.with_label (_("Skip All"));
@@ -106,7 +110,11 @@ public class Views.OnboardingView : Gtk.Grid {
skip_button.clicked.connect (() => {
foreach (Gtk.Widget view in views) {
var view_name_value = GLib.Value (typeof (string));
- stack.child_get_property (view, "name", ref view_name_value);
+ #if ARM
+ stack.child_get_property (view, "name", view_name_value);
+ #else
+ stack.child_get_property (view, "name", ref view_name_value);
+ #endif
}
stack.visible_child_name = "finish";
diff --git a/src/views/Overview.vala b/src/views/Overview.vala
index 306e869..a97fd5b 100644
--- a/src/views/Overview.vala
+++ b/src/views/Overview.vala
@@ -45,7 +45,7 @@ public class Views.Overview : Gtk.ScrolledWindow {
grid.attach (devices_revealer, 0, 0, 1, 1);
- devices_controller = new Controllers.DevicesController ();
+ devices_controller = Controllers.DevicesController.instance;
devices_controller.on_new_device.connect ((device) => {
devices_carousel.add_thing (device);
devices_revealer.reveal_child = true;
diff --git a/src/widgets/IconPopover.vala b/src/widgets/IconPopover.vala
new file mode 100644
index 0000000..f514690
--- /dev/null
+++ b/src/widgets/IconPopover.vala
@@ -0,0 +1,62 @@
+/*
+* Copyright (c) 2019 Manexim (https://github.com/manexim)
+*
+* This program is free software; you can redistribute it and/or
+* modify it under the terms of the GNU General Public
+* License as published by the Free Software Foundation; either
+* version 2 of the License, or (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* General Public License for more details.
+*
+* You should have received a copy of the GNU General Public
+* License along with this program; if not, write to the
+* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+* Boston, MA 02110-1301 USA
+*
+* Authored by: Marius Meisenzahl
+*/
+
+public class Widgets.IconPopover : Gtk.Popover {
+ public signal void change_icon (string name);
+
+ public IconPopover (Gtk.Widget relative_to) {
+ Object (
+ modal: true,
+ position: Gtk.PositionType.BOTTOM,
+ relative_to: relative_to
+ );
+ }
+
+ construct {
+ var flow_box = new Gtk.FlowBox ();
+ flow_box.expand = true;
+
+ var icons = new Gee.ArrayList ();
+
+ var icon_theme = Gtk.IconTheme.get_default ();
+ icon_theme.list_icons ("Applications").@foreach ((name) => {
+ if (name.has_prefix ("com.github.manexim.home.icon")) {
+ icons.add (name);
+ }
+ });
+
+ foreach (string name in icons) {
+ var icon_button = new Gtk.Button ();
+ icon_button.get_style_context ().add_class (Gtk.STYLE_CLASS_FLAT);
+ icon_button.set_image (new Gtk.Image.from_icon_name (name, Gtk.IconSize.LARGE_TOOLBAR));
+
+ icon_button.clicked.connect (() => {
+ change_icon (name);
+ destroy ();
+ });
+
+ flow_box.add (icon_button);
+ flow_box.show_all ();
+ }
+
+ add (flow_box);
+ }
+}