Skip to content
Merged
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
11 changes: 3 additions & 8 deletions src/Application.vala
Original file line number Diff line number Diff line change
Expand Up @@ -104,14 +104,9 @@ public class Badger.Application : Gtk.Application {
public override int command_line (ApplicationCommandLine command_line) {
stdout.printf ("\n💲️ Command line mode started");

OptionEntry[] options = new OptionEntry[2];
options[0] = {
"headless", 0, 0, OptionArg.NONE,
ref headless, "Run without window", null
};
options[1] = {
"request-autostart", 0, 0, OptionArg.NONE,
ref ask_autostart, "Request autostart permission", null
OptionEntry[] options = {
{"request-autostart", 'r', 0, OptionArg.NONE, ref ask_autostart, "Request autostart permission", null},
{"headless", 'h', 0, OptionArg.NONE, ref headless, "Run without window", null},
};

// We have to make an extra copy of the array, since .parse assumes
Expand Down
8 changes: 4 additions & 4 deletions src/MainWindow.vala
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ public class Badger.MainWindow : Gtk.Window {

construct {
Intl.setlocale ();
hide_on_close = true;
settings = new GLib.Settings ("com.github.elfenware.badger.timers");

// We cannot resize window if it is allowed to change
Expand Down Expand Up @@ -72,19 +73,18 @@ public class Badger.MainWindow : Gtk.Window {
}

private void on_toggle_changed () {
debug ("\nToggle changed!");
debug ("Toggle changed!");
main.revealer.reveal_child = settings.get_boolean ("all");

if (!settings.get_boolean ("all")) {
debug ("\nToggle is off! Resizing window");
debug ("Toggle is off! Resizing window");
set_size_request (12, 12);
queue_resize ();
}
}

// Avoid a bug whence reopened windows cannot be closed
private bool before_destroy () {
hide ();
return true;
return false;
}
}