Skip to content

Commit

Permalink
* - Fix warnings that were printed when running the app
Browse files Browse the repository at this point in the history
  • Loading branch information
Lains committed Feb 14, 2021
1 parent 2781f75 commit 8ae3cc4
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 22 deletions.
3 changes: 1 addition & 2 deletions data/ui/headerbar.ui
Original file line number Diff line number Diff line change
Expand Up @@ -217,8 +217,7 @@
<property name="can-focus">False</property>
</object>
<packing>
<property name="left-attach">0</property>
<property name="top-attach">1</property>
<property name="position">1</property>
</packing>
</child>
<child>
Expand Down
1 change: 0 additions & 1 deletion src/MainWindow.vala
Original file line number Diff line number Diff line change
Expand Up @@ -508,7 +508,6 @@ namespace Quilter {
unowned Gtk.Container parent = widget.get_parent ();
if (parent != null) {
parent.remove (widget);
widget.unparent ();
} else {
return;
}
Expand Down
14 changes: 4 additions & 10 deletions src/Widgets/HeaderBar.vala
Original file line number Diff line number Diff line change
Expand Up @@ -165,21 +165,15 @@ namespace Quilter {
var view_mode_context = view_mode.get_style_context ();
view_mode_context.add_class ("flat");

if (Quilter.Application.gsettings.get_string("preview-type") == "full") {
top_grid.attach (view_mode, 0, 2, 4, 1);
view_mode.visible = true;
} else {
top_grid.remove (view_mode);
view_mode.visible = true;
}
top_grid.attach (view_mode, 0, 2, 4, 1);

Quilter.Application.gsettings.changed.connect (() => {
if (Quilter.Application.gsettings.get_string("preview-type") == "full") {
top_grid.attach (view_mode, 0, 2, 4, 1);
view_mode.no_show_all = false;
view_mode.visible = true;
} else {
top_grid.remove (view_mode);
view_mode.visible = true;
view_mode.no_show_all = true;
view_mode.visible = false;
}
});
}
Expand Down
13 changes: 4 additions & 9 deletions src/Widgets/SourceView.vala
Original file line number Diff line number Diff line change
Expand Up @@ -455,15 +455,10 @@ namespace Quilter.Services {
public Gee.TreeSet<string> cnbuf_list = new Gee.TreeSet<string> ();

public POSFiles () {
var dirs = GLib.Environment.get_system_data_dirs();

for (int i = dirs.length - 1; i >= 0; i--) {
var vpath = Path.build_filename (dirs[i], "io.github.lainsce.Quilter", "wordlist");
file_verbs = File.new_for_path(vpath + "/verb.txt");
file_adj = File.new_for_path(vpath + "/adjective.txt");
file_adverbs = File.new_for_path(vpath + "/adverb.txt");
file_conj = File.new_for_path(vpath + "/conjunction.txt");
}
file_verbs = File.new_for_path(Environment.get_system_data_dirs()[0] + "/io.github.lainsce.Quilter/wordlist/verb.txt");
file_adj = File.new_for_path(Environment.get_system_data_dirs()[0] + "/io.github.lainsce.Quilter/wordlist/adjective.txt");
file_adverbs = File.new_for_path(Environment.get_system_data_dirs()[0] + "/io.github.lainsce.Quilter/wordlist/adverb.txt");
file_conj = File.new_for_path(Environment.get_system_data_dirs()[0] + "/io.github.lainsce.Quilter/wordlist/conjunction.txt");

try {
GLib.FileUtils.get_contents (file_verbs.get_path (), out vbuf, null);
Expand Down

0 comments on commit 8ae3cc4

Please sign in to comment.