Skip to content

Commit b80ba29

Browse files
committed
Prepare 0.1.0 release
1 parent 00c7887 commit b80ba29

14 files changed

+296
-86
lines changed

.travis.yml

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
---
2+
3+
language: node_js
4+
5+
node_js:
6+
- lts/*
7+
8+
sudo: required
9+
10+
services:
11+
- docker
12+
13+
addons:
14+
apt:
15+
sources:
16+
- ubuntu-toolchain-r-test
17+
packages:
18+
- libstdc++-5-dev
19+
20+
cache:
21+
directories:
22+
- /tmp/liftoff
23+
24+
install:
25+
- npm install @elementaryos/houston
26+
27+
script:
28+
- houston ci

README.md

+5
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,11 @@ Simple app to control Redmond Skykettle RK-G200S/RK-G210S/RK-G211S (and probably
66
- RK-G200S, RK-G210S, RK-G211S (tested)
77
- other 2nd-gen devices (RK-G2xx) (not tested)
88

9+
## Runtime dependencies
10+
* bluez
11+
12+
Note: Bluetooth 4.0 adapter with BLE support required.
13+
914
## Installation
1015
Prebuilt releases can be found on [releases page](https://github.com/tkashkin/Boiler/releases).
1116

data/com.github.tkashkin.boiler.appdata.xml.in

+13-2
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,18 @@
99
<summary>Control your kettle remotely</summary>
1010

1111
<description>
12-
<p>Simple app to control Redmond Skykettle RK-G200S.</p>
12+
<p>Simple app to control smart kettles using bluetooth.</p>
13+
<p>Supported devices:</p>
14+
<ul>
15+
<li>
16+
Redmond
17+
<ul>
18+
<li>RK-G200S, RK-G210S, RK-G211S (tested)</li>
19+
<li>other 2nd-gen devices (RK-G2xx) (not tested)</li>
20+
</ul>
21+
</li>
22+
</ul>
23+
<p>Note: Bluetooth 4.0 adapter with BLE support required.</p>
1324
</description>
1425

1526
<developer_name>Anatoliy Kashkin</developer_name>
@@ -29,7 +40,7 @@
2940
</screenshots>
3041

3142
<releases>
32-
<release type="development" version="0.1.0" date="2018-07-30">
43+
<release type="development" version="0.1.0" date="2018-08-05">
3344
<description>
3445
<p>Initial release.</p>
3546
</description>

data/com.github.tkashkin.boiler.desktop.in

+6
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,9 @@ X-GNOME-Gettext-Domain=com.github.tkashkin.boiler
99
Icon=com.github.tkashkin.boiler
1010
Terminal=false
1111
Type=Application
12+
Actions=Toggle;
13+
14+
[Desktop Action Toggle]
15+
Name=Enable/Disable
16+
Exec=com.github.tkashkin.boiler --toggle
17+
Icon=system-shutdown-symbolic

debian/changelog

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@ com.github.tkashkin.boiler (0.1.0) xenial; urgency=low
22

33
* Initial release
44

5-
-- tkashkin <tkashkin@gmail.com> Mon, 30 Jul 2018 10:31:15 +0300
5+
-- tkashkin <tkashkin@gmail.com> Sun, 05 Aug 2018 21:34:20 +0300

debian/control

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,4 @@ Standards-Version: 4.1.4
1414
Package: com.github.tkashkin.boiler
1515
Architecture: any
1616
Depends: ${misc:Depends}, ${shlibs:Depends}, bluez
17-
Description: Simple app to control Redmond Skykettle RK-G200S
17+
Description: Simple app to control smart kettles using bluetooth

po/POTFILES

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ data/com.github.tkashkin.boiler.appdata.xml.in
22
data/com.github.tkashkin.boiler.desktop.in
33
data/com.github.tkashkin.boiler.gschema.xml
44

5-
src/app.vala
5+
src/Application.vala
66

77
src/ui/windows/MainWindow.vala
88

po/com.github.tkashkin.boiler.pot

+35-4
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ msgid ""
88
msgstr ""
99
"Project-Id-Version: com.github.tkashkin.boiler\n"
1010
"Report-Msgid-Bugs-To: \n"
11-
"POT-Creation-Date: 2018-08-05 03:29+0300\n"
11+
"POT-Creation-Date: 2018-08-05 21:35+0300\n"
1212
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
1313
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
1414
"Language-Team: LANGUAGE <LL@li.org>\n"
@@ -17,13 +17,44 @@ msgstr ""
1717
"Content-Type: text/plain; charset=CHARSET\n"
1818
"Content-Transfer-Encoding: 8bit\n"
1919

20+
#: data/com.github.tkashkin.boiler.appdata.xml.in:8
21+
#: data/com.github.tkashkin.boiler.desktop.in:3
22+
#: data/com.github.tkashkin.boiler.desktop.in:4
23+
#: src/ui/windows/MainWindow.vala:24
24+
msgid "Boiler"
25+
msgstr ""
26+
2027
#: data/com.github.tkashkin.boiler.appdata.xml.in:9
2128
#: data/com.github.tkashkin.boiler.desktop.in:5
2229
msgid "Control your kettle remotely"
2330
msgstr ""
2431

2532
#: data/com.github.tkashkin.boiler.appdata.xml.in:12
26-
msgid "Simple app to control Redmond Skykettle RK-G200S."
33+
msgid "Simple app to control smart kettles using bluetooth."
34+
msgstr ""
35+
36+
#: data/com.github.tkashkin.boiler.appdata.xml.in:13
37+
msgid "Supported devices:"
38+
msgstr ""
39+
40+
#: data/com.github.tkashkin.boiler.appdata.xml.in:18
41+
msgid "RK-G200S, RK-G210S, RK-G211S (tested)"
42+
msgstr ""
43+
44+
#: data/com.github.tkashkin.boiler.appdata.xml.in:19
45+
msgid "other 2nd-gen devices (RK-G2xx) (not tested)"
46+
msgstr ""
47+
48+
#: data/com.github.tkashkin.boiler.appdata.xml.in:23
49+
msgid "Note: Bluetooth 4.0 adapter with BLE support required."
50+
msgstr ""
51+
52+
#: data/com.github.tkashkin.boiler.desktop.in:7
53+
msgid "Kettle;Teapot;Redmond;Remote;Control;"
54+
msgstr ""
55+
56+
#: data/com.github.tkashkin.boiler.desktop.in:16
57+
msgid "Enable/Disable"
2758
msgstr ""
2859

2960
#: src/ui/views/connect/ConnectView.vala:32
@@ -38,10 +69,10 @@ msgstr ""
3869
msgid "Connect"
3970
msgstr ""
4071

41-
#: src/ui/views/kettle/KettleView.vala:117
72+
#: src/ui/views/kettle/KettleView.vala:162
4273
msgid "Disable"
4374
msgstr ""
4475

45-
#: src/ui/views/kettle/KettleView.vala:117
76+
#: src/ui/views/kettle/KettleView.vala:162
4677
msgid "Enable"
4778
msgstr ""

po/ru.po

+43-3
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ msgid ""
77
msgstr ""
88
"Project-Id-Version: com.github.tkashkin.boiler\n"
99
"Report-Msgid-Bugs-To: \n"
10-
"POT-Creation-Date: 2018-08-05 03:29+0300\n"
10+
"POT-Creation-Date: 2018-08-05 21:35+0300\n"
1111
"PO-Revision-Date: 2018-07-30 10:26+0300\n"
1212
"Last-Translator: Automatically generated\n"
1313
"Language-Team: none\n"
@@ -18,6 +18,46 @@ msgstr ""
1818
"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n"
1919
"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n"
2020

21+
#: data/com.github.tkashkin.boiler.appdata.xml.in:8
22+
#: data/com.github.tkashkin.boiler.desktop.in:3
23+
#: data/com.github.tkashkin.boiler.desktop.in:4
24+
#: src/ui/windows/MainWindow.vala:24
25+
msgid "Boiler"
26+
msgstr ""
27+
28+
#: data/com.github.tkashkin.boiler.appdata.xml.in:9
29+
#: data/com.github.tkashkin.boiler.desktop.in:5
30+
msgid "Control your kettle remotely"
31+
msgstr "Удалённое управление чайником"
32+
33+
#: data/com.github.tkashkin.boiler.appdata.xml.in:12
34+
msgid "Simple app to control smart kettles using bluetooth."
35+
msgstr "Простое приложение для управления чайниками через bluetooth"
36+
37+
#: data/com.github.tkashkin.boiler.appdata.xml.in:13
38+
msgid "Supported devices:"
39+
msgstr "Поддерживаемые устройства:"
40+
41+
#: data/com.github.tkashkin.boiler.appdata.xml.in:18
42+
msgid "RK-G200S, RK-G210S, RK-G211S (tested)"
43+
msgstr "RK-G200S, RK-G210S, RK-G211S (проверено)"
44+
45+
#: data/com.github.tkashkin.boiler.appdata.xml.in:19
46+
msgid "other 2nd-gen devices (RK-G2xx) (not tested)"
47+
msgstr "другие устройства второго поколения (RK-G2xx) (не проверено)"
48+
49+
#: data/com.github.tkashkin.boiler.appdata.xml.in:23
50+
msgid "Note: Bluetooth 4.0 adapter with BLE support required."
51+
msgstr "Примечание: Необходим адаптер Bluetooth 4.0 с поддержкой BLE."
52+
53+
#: data/com.github.tkashkin.boiler.desktop.in:7
54+
msgid "Kettle;Teapot;Redmond;Remote;Control;"
55+
msgstr "Kettle;Teapot;Redmond;Remote;Control;Чайник;Удалённое;Управление;"
56+
57+
#: data/com.github.tkashkin.boiler.desktop.in:16
58+
msgid "Enable/Disable"
59+
msgstr "Включить/Выключить"
60+
2161
#: src/ui/views/connect/ConnectView.vala:32
2262
msgid "No devices"
2363
msgstr "Нет устройств"
@@ -30,10 +70,10 @@ msgstr "Убедитесь, что устройства находятся в р
3070
msgid "Connect"
3171
msgstr "Подключить"
3272

33-
#: src/ui/views/kettle/KettleView.vala:117
73+
#: src/ui/views/kettle/KettleView.vala:162
3474
msgid "Disable"
3575
msgstr "Выключить"
3676

37-
#: src/ui/views/kettle/KettleView.vala:117
77+
#: src/ui/views/kettle/KettleView.vala:162
3878
msgid "Enable"
3979
msgstr "Включить"

src/Application.vala

+103
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,103 @@
1+
using Gtk;
2+
using Gdk;
3+
using Granite;
4+
5+
using Boiler.UI.Windows;
6+
7+
namespace Boiler
8+
{
9+
public class Application: Granite.Application
10+
{
11+
private MainWindow? main_window;
12+
13+
public static Application instance;
14+
15+
public bool kettle_toggle_pending = false;
16+
public signal void toggle_kettle();
17+
18+
construct
19+
{
20+
application_id = ProjectConfig.PROJECT_NAME;
21+
flags = ApplicationFlags.HANDLES_COMMAND_LINE;
22+
program_name = "Boiler";
23+
build_version = ProjectConfig.VERSION;
24+
instance = this;
25+
}
26+
27+
protected override void activate()
28+
{
29+
if(main_window == null)
30+
{
31+
weak IconTheme default_theme = IconTheme.get_default();
32+
default_theme.add_resource_path("/com/github/tkashkin/boiler/icons");
33+
34+
var provider = new CssProvider();
35+
provider.load_from_resource("/com/github/tkashkin/boiler/Boiler.css");
36+
StyleContext.add_provider_for_screen(Screen.get_default(), provider, Gtk.STYLE_PROVIDER_PRIORITY_APPLICATION);
37+
38+
main_window = new Boiler.UI.Windows.MainWindow(this);
39+
main_window.show_all();
40+
}
41+
}
42+
43+
public static int main(string[] args)
44+
{
45+
#if USE_IVY
46+
Ivy.Stacktrace.register_handlers();
47+
#endif
48+
49+
var app = new Application();
50+
51+
var lang = Environment.get_variable("LC_ALL") ?? "";
52+
Intl.setlocale(LocaleCategory.ALL, lang);
53+
Intl.bindtextdomain(ProjectConfig.GETTEXT_PACKAGE, ProjectConfig.GETTEXT_DIR);
54+
Intl.textdomain(ProjectConfig.GETTEXT_PACKAGE);
55+
56+
var rk_g2xx_auth = Settings.Dev.Redmond.RK_G2XX.get_instance();
57+
if(rk_g2xx_auth.auth_key == "")
58+
{
59+
var bytes = Utils.random_bytes(8);
60+
rk_g2xx_auth.auth_key = Converter.bin_to_hex(bytes, ' ');
61+
}
62+
63+
return app.run(args);
64+
}
65+
66+
public override int command_line(ApplicationCommandLine cmd)
67+
{
68+
string[] oargs = cmd.get_arguments ();
69+
unowned string[] args = oargs;
70+
71+
bool toggle = false;
72+
bool show = false;
73+
74+
OptionEntry[] options = new OptionEntry[3];
75+
options[0] = { "toggle", 't', 0, OptionArg.NONE, out toggle, "Start or stop kettle", null };
76+
options[1] = { "show", 's', 0, OptionArg.NONE, out show, "Show window", null };
77+
options[2] = { null };
78+
79+
var ctx = new OptionContext();
80+
ctx.add_main_entries(options, null);
81+
try
82+
{
83+
ctx.parse(ref args);
84+
}
85+
catch(Error e)
86+
{
87+
warning(e.message);
88+
}
89+
90+
if(toggle)
91+
{
92+
kettle_toggle_pending = true;
93+
toggle_kettle();
94+
}
95+
96+
activate();
97+
98+
if(show) main_window.present();
99+
100+
return 0;
101+
}
102+
}
103+
}

src/app.vala

-52
This file was deleted.

0 commit comments

Comments
 (0)