Skip to content

Commit

Permalink
Merge pull request #50 from Diego-Ivan/update-runtime
Browse files Browse the repository at this point in the history
Update Runtime + Fix #49
  • Loading branch information
Diego-Ivan authored Jun 13, 2023
2 parents 7e6219d + 79c10ae commit 95f407f
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 14 deletions.
2 changes: 1 addition & 1 deletion build-aux/flatpak/io.github.diegoivanme.flowtime.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"app-id" : "io.github.diegoivanme.flowtime",
"runtime" : "org.gnome.Platform",
"runtime-version" : "43",
"runtime-version" : "44",
"sdk" : "org.gnome.Sdk",
"command" : "flowtime",
"sdk-extensions" : [
Expand Down
5 changes: 4 additions & 1 deletion src/Services/Timer.vala
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* Timer.vala
*
* Copyright 2022 Diego Iván <diegoivan.mae@gmail.com>
* Copyright 2022-2023 Diego Iván <diegoivan.mae@gmail.com>
*
* SPDX-License-Identifier: GPL-3.0-or-later
*/
Expand Down Expand Up @@ -54,6 +54,9 @@ public class Flowtime.Services.Timer : Object {

public void stop () {
running = false;
if (timeout_id == null) {
return;
}
Source.remove (timeout_id);
}

Expand Down
25 changes: 13 additions & 12 deletions src/Widgets/StatsWindow.vala
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* StatsWindow.vala
*
* Copyright 2022 Diego Iván <diegoivan.mae@gmail.com>
* Copyright 2022-2023 Diego Iván <diegoivan.mae@gmail.com>
*
* SPDX-License-Identifier: GPL-3.0-or-later
*/
Expand Down Expand Up @@ -66,19 +66,20 @@ namespace Flowtime {

[GtkCallback]
private void on_save_button_clicked () {
var filechooser = new Gtk.FileChooserNative (null,
this, SAVE,
null, null
);
filechooser.response.connect (on_filechooser_response);
filechooser.show ();
save_action.begin ();
}

private void on_filechooser_response (Gtk.NativeDialog dialog, int response)
{
var filechooser = (Gtk.FileChooserNative) dialog;
if (response == Gtk.ResponseType.ACCEPT) {
save_as_csv.begin (filechooser.get_file ());
private async void save_action () {
var file_dialog = new Gtk.FileDialog () {
modal = true
};

try {
File file = yield file_dialog.save (this, null);
yield save_as_csv (file);
}
catch (Error e) {
critical (e.message);
}
}

Expand Down

0 comments on commit 95f407f

Please sign in to comment.