fix codestyle, add editorconfig, align with vala-lint
This commit is contained in:
parent
5407e06683
commit
7e7c0a3ce5
10
.editorconfig
Normal file
10
.editorconfig
Normal file
@ -0,0 +1,10 @@
|
||||
root = true
|
||||
|
||||
[*]
|
||||
end_of_line = lf
|
||||
insert_final_newline = true
|
||||
|
||||
[*.vala]
|
||||
indent_style = space
|
||||
indent_size = 4
|
||||
charset = utf-8
|
1
.gitignore
vendored
1
.gitignore
vendored
@ -1,2 +1,3 @@
|
||||
/build
|
||||
/yggtk
|
||||
*\#*
|
||||
|
19
main.vala
19
main.vala
@ -47,17 +47,17 @@ int main (string[] args) {
|
||||
|
||||
status.notify["active"].connect (() => {
|
||||
|
||||
if (status.get_active()) {
|
||||
if (status.get_active ()) {
|
||||
|
||||
start();
|
||||
start ();
|
||||
|
||||
} else {
|
||||
|
||||
stop();
|
||||
stop ();
|
||||
|
||||
}
|
||||
|
||||
check_status(status);
|
||||
check_status (status);
|
||||
|
||||
});
|
||||
|
||||
@ -65,7 +65,7 @@ int main (string[] args) {
|
||||
|
||||
yggtk.clicked.connect (() => {
|
||||
|
||||
update();
|
||||
update ();
|
||||
|
||||
});
|
||||
|
||||
@ -93,7 +93,9 @@ int download () {
|
||||
|
||||
if (pm == "Cannot run program pacman: No such file or directory\n") {
|
||||
|
||||
Process.spawn_command_line_sync ("wget https://2375-115685026-gh.circle-artifacts.com/0/yggdrasil-0.3.12-amd64.deb");
|
||||
Process.spawn_command_line_sync (
|
||||
"wget https://2375-115685026-gh.circle-artifacts.com/0/yggdrasil-0.3.12-amd64.deb"
|
||||
);
|
||||
Process.spawn_command_line_sync ("pkexec dpkg -i yggdrasil-0.3.12-amd64.deb");
|
||||
|
||||
}
|
||||
@ -111,9 +113,11 @@ int download () {
|
||||
}
|
||||
|
||||
string mktempdir () throws Error {
|
||||
|
||||
string temp_dir = null;
|
||||
Process.spawn_command_line_sync("mktemp -d", out temp_dir);
|
||||
Process.spawn_command_line_sync ("mktemp -d", out temp_dir);
|
||||
return temp_dir.strip ();
|
||||
|
||||
}
|
||||
|
||||
int update () {
|
||||
@ -122,7 +126,6 @@ int update () {
|
||||
|
||||
unowned string repo_url = Environment.get_variable ("YGG_UPDATE_REPO");
|
||||
string temp_dir = mktempdir ();
|
||||
string command = null;
|
||||
|
||||
if (repo_url == null) {
|
||||
repo_url = "https://git.macaw.me/plant_1312/Yggtk.git";
|
||||
|
Loading…
x
Reference in New Issue
Block a user