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
1 change: 0 additions & 1 deletion src/MainWindow.vala
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ public class Monitor.MainWindow : Hdy.ApplicationWindow {

// Constructs a main window
public MainWindow (MonitorApp app) {
Hdy.init ();
this.set_application (app);

setup_window_state ();
Expand Down
35 changes: 20 additions & 15 deletions src/Monitor.vala
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,26 @@ namespace Monitor {
settings = new Settings ("io.elementary.monitor.settings");
}

public override void startup () {
base.startup ();

Hdy.init ();

Appearance.set_prefered_style ();

// Controls the direction of the sort indicators
Gtk.Settings.get_default ().set ("gtk-alternative-sort-arrows", true, null);

var quit_action = new SimpleAction ("quit", null);
add_action (quit_action);
set_accels_for_action ("app.quit", { "<Ctrl>q" });
quit_action.activate.connect (() => {
if (window != null) {
window.destroy ();
}
});
}

public override void activate () {
// only have one window
if (get_windows () != null) {
Expand Down Expand Up @@ -69,21 +89,6 @@ namespace Monitor {
}

window.process_view.process_tree_view.focus_on_first_row ();

var quit_action = new SimpleAction ("quit", null);
add_action (quit_action);
set_accels_for_action ("app.quit", { "<Ctrl>q" });
quit_action.activate.connect (() => {
if (window != null) {
window.destroy ();
}
});

Appearance.set_prefered_style ();


// Controls the direction of the sort indicators
Gtk.Settings.get_default ().set ("gtk-alternative-sort-arrows", true, null);
}

public static int main (string[] args) {
Expand Down