-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
14 changed files
with
296 additions
and
86 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
--- | ||
|
||
language: node_js | ||
|
||
node_js: | ||
- lts/* | ||
|
||
sudo: required | ||
|
||
services: | ||
- docker | ||
|
||
addons: | ||
apt: | ||
sources: | ||
- ubuntu-toolchain-r-test | ||
packages: | ||
- libstdc++-5-dev | ||
|
||
cache: | ||
directories: | ||
- /tmp/liftoff | ||
|
||
install: | ||
- npm install @elementaryos/houston | ||
|
||
script: | ||
- houston ci |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,4 +2,4 @@ com.github.tkashkin.boiler (0.1.0) xenial; urgency=low | |
|
||
* Initial release | ||
|
||
-- tkashkin <[email protected]> Mon, 30 Jul 2018 10:31:15 +0300 | ||
-- tkashkin <[email protected]> Sun, 05 Aug 2018 21:34:20 +0300 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,7 +8,7 @@ msgid "" | |
msgstr "" | ||
"Project-Id-Version: com.github.tkashkin.boiler\n" | ||
"Report-Msgid-Bugs-To: \n" | ||
"POT-Creation-Date: 2018-08-05 03:29+0300\n" | ||
"POT-Creation-Date: 2018-08-05 21:35+0300\n" | ||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" | ||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" | ||
"Language-Team: LANGUAGE <[email protected]>\n" | ||
|
@@ -17,13 +17,44 @@ msgstr "" | |
"Content-Type: text/plain; charset=CHARSET\n" | ||
"Content-Transfer-Encoding: 8bit\n" | ||
|
||
#: data/com.github.tkashkin.boiler.appdata.xml.in:8 | ||
#: data/com.github.tkashkin.boiler.desktop.in:3 | ||
#: data/com.github.tkashkin.boiler.desktop.in:4 | ||
#: src/ui/windows/MainWindow.vala:24 | ||
msgid "Boiler" | ||
msgstr "" | ||
|
||
#: data/com.github.tkashkin.boiler.appdata.xml.in:9 | ||
#: data/com.github.tkashkin.boiler.desktop.in:5 | ||
msgid "Control your kettle remotely" | ||
msgstr "" | ||
|
||
#: data/com.github.tkashkin.boiler.appdata.xml.in:12 | ||
msgid "Simple app to control Redmond Skykettle RK-G200S." | ||
msgid "Simple app to control smart kettles using bluetooth." | ||
msgstr "" | ||
|
||
#: data/com.github.tkashkin.boiler.appdata.xml.in:13 | ||
msgid "Supported devices:" | ||
msgstr "" | ||
|
||
#: data/com.github.tkashkin.boiler.appdata.xml.in:18 | ||
msgid "RK-G200S, RK-G210S, RK-G211S (tested)" | ||
msgstr "" | ||
|
||
#: data/com.github.tkashkin.boiler.appdata.xml.in:19 | ||
msgid "other 2nd-gen devices (RK-G2xx) (not tested)" | ||
msgstr "" | ||
|
||
#: data/com.github.tkashkin.boiler.appdata.xml.in:23 | ||
msgid "Note: Bluetooth 4.0 adapter with BLE support required." | ||
msgstr "" | ||
|
||
#: data/com.github.tkashkin.boiler.desktop.in:7 | ||
msgid "Kettle;Teapot;Redmond;Remote;Control;" | ||
msgstr "" | ||
|
||
#: data/com.github.tkashkin.boiler.desktop.in:16 | ||
msgid "Enable/Disable" | ||
msgstr "" | ||
|
||
#: src/ui/views/connect/ConnectView.vala:32 | ||
|
@@ -38,10 +69,10 @@ msgstr "" | |
msgid "Connect" | ||
msgstr "" | ||
|
||
#: src/ui/views/kettle/KettleView.vala:117 | ||
#: src/ui/views/kettle/KettleView.vala:162 | ||
msgid "Disable" | ||
msgstr "" | ||
|
||
#: src/ui/views/kettle/KettleView.vala:117 | ||
#: src/ui/views/kettle/KettleView.vala:162 | ||
msgid "Enable" | ||
msgstr "" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,103 @@ | ||
using Gtk; | ||
using Gdk; | ||
using Granite; | ||
|
||
using Boiler.UI.Windows; | ||
|
||
namespace Boiler | ||
{ | ||
public class Application: Granite.Application | ||
{ | ||
private MainWindow? main_window; | ||
|
||
public static Application instance; | ||
|
||
public bool kettle_toggle_pending = false; | ||
public signal void toggle_kettle(); | ||
|
||
construct | ||
{ | ||
application_id = ProjectConfig.PROJECT_NAME; | ||
flags = ApplicationFlags.HANDLES_COMMAND_LINE; | ||
program_name = "Boiler"; | ||
build_version = ProjectConfig.VERSION; | ||
instance = this; | ||
} | ||
|
||
protected override void activate() | ||
{ | ||
if(main_window == null) | ||
{ | ||
weak IconTheme default_theme = IconTheme.get_default(); | ||
default_theme.add_resource_path("/com/github/tkashkin/boiler/icons"); | ||
|
||
var provider = new CssProvider(); | ||
provider.load_from_resource("/com/github/tkashkin/boiler/Boiler.css"); | ||
StyleContext.add_provider_for_screen(Screen.get_default(), provider, Gtk.STYLE_PROVIDER_PRIORITY_APPLICATION); | ||
|
||
main_window = new Boiler.UI.Windows.MainWindow(this); | ||
main_window.show_all(); | ||
} | ||
} | ||
|
||
public static int main(string[] args) | ||
{ | ||
#if USE_IVY | ||
Ivy.Stacktrace.register_handlers(); | ||
#endif | ||
|
||
var app = new Application(); | ||
|
||
var lang = Environment.get_variable("LC_ALL") ?? ""; | ||
Intl.setlocale(LocaleCategory.ALL, lang); | ||
Intl.bindtextdomain(ProjectConfig.GETTEXT_PACKAGE, ProjectConfig.GETTEXT_DIR); | ||
Intl.textdomain(ProjectConfig.GETTEXT_PACKAGE); | ||
|
||
var rk_g2xx_auth = Settings.Dev.Redmond.RK_G2XX.get_instance(); | ||
if(rk_g2xx_auth.auth_key == "") | ||
{ | ||
var bytes = Utils.random_bytes(8); | ||
rk_g2xx_auth.auth_key = Converter.bin_to_hex(bytes, ' '); | ||
} | ||
|
||
return app.run(args); | ||
} | ||
|
||
public override int command_line(ApplicationCommandLine cmd) | ||
{ | ||
string[] oargs = cmd.get_arguments (); | ||
unowned string[] args = oargs; | ||
|
||
bool toggle = false; | ||
bool show = false; | ||
|
||
OptionEntry[] options = new OptionEntry[3]; | ||
options[0] = { "toggle", 't', 0, OptionArg.NONE, out toggle, "Start or stop kettle", null }; | ||
options[1] = { "show", 's', 0, OptionArg.NONE, out show, "Show window", null }; | ||
options[2] = { null }; | ||
|
||
var ctx = new OptionContext(); | ||
ctx.add_main_entries(options, null); | ||
try | ||
{ | ||
ctx.parse(ref args); | ||
} | ||
catch(Error e) | ||
{ | ||
warning(e.message); | ||
} | ||
|
||
if(toggle) | ||
{ | ||
kettle_toggle_pending = true; | ||
toggle_kettle(); | ||
} | ||
|
||
activate(); | ||
|
||
if(show) main_window.present(); | ||
|
||
return 0; | ||
} | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.