Skip to content

Commit

Permalink
Clean up extra grid
Browse files Browse the repository at this point in the history
  • Loading branch information
danirabbit committed Apr 1, 2024
1 parent e30cae8 commit 84ac888
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions src/Plug.vala
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public class Applications.Plug : Switchboard.Plug {
public const string STARTUP = "preferences-desktop-startup";
public const string PERMISSIONS = "permissions";

private Gtk.Grid grid;
private Gtk.Paned paned;
private Gtk.Stack stack;

public Plug () {
Expand All @@ -49,7 +49,7 @@ public class Applications.Plug : Switchboard.Plug {
}

public override Gtk.Widget get_widget () {
if (grid == null) {
if (paned == null) {
var app_settings_view = new Permissions.Widgets.AppSettingsView ();

stack = new Gtk.Stack ();
Expand All @@ -59,19 +59,16 @@ public class Applications.Plug : Switchboard.Plug {

var sidebar = new Sidebar (stack);

var paned = new Gtk.Paned (HORIZONTAL) {
paned = new Gtk.Paned (HORIZONTAL) {
start_child = sidebar,
end_child = stack,
shrink_start_child = false,
shrink_end_child = false,
resize_start_child = false
};

grid = new Gtk.Grid ();
grid.attach (paned, 0, 0);
}

return grid;
return paned;
}

public override void shown () {
Expand Down

0 comments on commit 84ac888

Please sign in to comment.