Skip to content
This repository has been archived by the owner on Nov 11, 2018. It is now read-only.

Get rid of a couple warning messages. #341

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/Autocompletion.vala
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ public class Autocompletion : Object {

scrollable_list_view = new ScrollableListView<AutocompletionEntry, AutocompletionEntryView>(
entries, typeof(AutocompletionEntry), typeof(AutocompletionEntryView), "entry");
stage.add(scrollable_list_view);
stage.add_child(scrollable_list_view);

scrollable_list_view.set_filter_function(filter_function);
scrollable_list_view.set_sort_function(sort_function);
Expand Down
7 changes: 6 additions & 1 deletion src/Command.vala
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,12 @@ public class Command : Object {
}

// Remove remaining placeholders
substitute_parameter = placeholder_pattern.replace(substitute_parameter, -1, 0, "");
// TODO: handle error properly
try {
substitute_parameter = placeholder_pattern.replace(substitute_parameter, -1, 0, "");
} catch (RegexError e) {
stderr.printf("Error in removing remaining placeholders");
}

substitute_command.parameters.add(substitute_parameter);
}
Expand Down
5 changes: 5 additions & 0 deletions src/NestingContainer.vala
Original file line number Diff line number Diff line change
Expand Up @@ -387,6 +387,8 @@ public class NestingContainer : Gtk.Box, NestingContainerChild {
Gtk.IconSize.MENU));

var css_provider = new Gtk.CssProvider();
// TODO: handle error properly
try {
css_provider.load_from_data(
".button {\n" +
"-GtkButton-default-border: 0px;\n" +
Expand All @@ -396,6 +398,9 @@ public class NestingContainer : Gtk.Box, NestingContainerChild {
"-GtkWidget-focus-padding: 0px;\n" +
"padding: 0px;\n" +
"}", -1);
} catch (Error e) {
stderr.printf("Error in css_provider.load_from_data");
}
close_button.get_style_context().add_provider(css_provider,
Gtk.STYLE_PROVIDER_PRIORITY_APPLICATION);

Expand Down
7 changes: 6 additions & 1 deletion src/Terminal.vala
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,12 @@ public class Terminal : Object {
var this_terminal = terminals_by_pid.get((int)child_pid);
// Close channel to keep pending shell IO from triggering UI updates (and crashes)
// after the corresponding TerminalWidget has been removed
this_terminal.command_channel.shutdown(false);
// TODO: handle error properly
try {
this_terminal.command_channel.shutdown(false);
} catch (IOChannelError e) {
stderr.printf("Error in command_channel.shutdown");
}
this_terminal.shell_terminated();
// TODO: If allowed to run, this loop turns into an infinite loop
// when multiple terminals are used. INVESTIGATE FURTHER!
Expand Down