Skip to content

Commit 40dc5c6

Browse files
authored
Various fixes (#24)
* Various fixes, mostly warnings * Update description
1 parent db356b1 commit 40dc5c6

File tree

4 files changed

+15
-14
lines changed

4 files changed

+15
-14
lines changed

data/io.github.leolost2605.gradebook.metainfo.xml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,15 @@
1010

1111
<description>
1212
<p>
13-
A simple tool to keep track of your grades! It supports numerical grading systems as well as percentage grades.
13+
Gradebook is a simple tool that helps you keep track of your grades. This way you always know how you are doing in your courses.
1414
</p>
15+
<p>Features:</p>
16+
<ul>
17+
<li>Support for numerical and percentage systems</li>
18+
<li>Assign your grades to categories with different weighting</li>
19+
<li>Add notes to your grades so that you later know how you could improve</li>
20+
<li>Your average is calculated automatically taking the weighting of the different categories into account</li>
21+
</ul>
1522
</description>
1623

1724
<developer_name>Leonhard Kargl</developer_name>

src/application.vala

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -10,21 +10,16 @@ public class MyApp : Adw.Application {
1010

1111
construct {
1212
ActionEntry[] action_entries = {
13-
{ "test", this.on_test_action },
1413
{ "help", this.on_help_action },
1514
{ "about", this.on_about_action },
1615
{ "newsubject", this.on_newsubject_action},
1716
};
1817
this.add_action_entries (action_entries, this);
1918
}
2019

21-
public void on_test_action () {
22-
print ("test_action");
23-
}
24-
25-
2620
public void on_help_action () {
27-
Gtk.show_uri (main_window, "https://github.com/leolost2605/Gradebook/wiki", 0);
21+
var uri_launcher = new Gtk.UriLauncher ("https://github.com/leolost2605/Gradebook/wiki");
22+
uri_launcher.launch.begin (main_window, null);
2823
}
2924

3025
public void on_newsubject_action () {
@@ -34,7 +29,7 @@ public class MyApp : Adw.Application {
3429
SubjectManager.get_default ().new_subject (dialog.name_entry_box.get_text (), dialog.get_categories ());
3530
}
3631
dialog.destroy ();
37-
return true;
32+
return true;
3833
});
3934
dialog.present ();
4035
}
@@ -47,7 +42,7 @@ public class MyApp : Adw.Application {
4742
translator_credits = _("translator-credits"),
4843
application_name = _("Gradebook"),
4944
application_icon = "io.github.leolost2605.gradebook",
50-
version = "1.1.1",
45+
version = "1.2",
5146
license_type = GPL_3_0,
5247
website = "https://github.com/leolost2605/Gradebook",
5348
issue_url = "https://github.com/leolost2605/Gradebook/issues",

src/subject-manager.vala

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ public class SubjectManager : Object {
4444

4545
public async void read_data () {
4646
yield read_data_legacy ();
47-
47+
4848
var keyfile = new KeyFile ();
4949

5050
try {
@@ -70,7 +70,6 @@ public class SubjectManager : Object {
7070
public async void write_data () {
7171
var keyfile = new KeyFile ();
7272

73-
var parser = new SubjectParser ();
7473
for (int i = 0; i < subjects.get_n_items (); i++) {
7574
var subject = (Subject) subjects.get_item (i);
7675

src/window.vala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,10 +71,10 @@ public class Window : Adw.ApplicationWindow {
7171
navigation_sidebar.select_row (navigation_sidebar.get_row_at_index ((int) pos));
7272
});
7373

74-
subject_manager.read_data ();
74+
subject_manager.read_data.begin ();
7575

7676
close_request.connect (() => {
77-
set_visible (false);
77+
visible = false;
7878
subject_manager.write_data.begin (() => {
7979
destroy ();
8080
});

0 commit comments

Comments
 (0)