Skip to content

Commit

Permalink
box.append
Browse files Browse the repository at this point in the history
  • Loading branch information
danirabbit committed May 14, 2024
1 parent e42ff11 commit 2e152be
Show file tree
Hide file tree
Showing 14 changed files with 55 additions and 55 deletions.
2 changes: 1 addition & 1 deletion src/Views/AbstractInstallerView.vala
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ public abstract class AbstractInstallerView : Gtk.Box {
cancel ();
});

action_box_end.add (cancel_button);
action_box_end.append (cancel_button);
}

orientation = VERTICAL;
Expand Down
8 changes: 4 additions & 4 deletions src/Views/CheckView.vala
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ public class Installer.CheckView : AbstractInstallerView {
ignore_button.add_css_class (Granite.STYLE_CLASS_DESTRUCTIVE_ACTION);
ignore_button.clicked.connect (() => next_step ());

action_box_end.add (ignore_button);
action_box_end.append (ignore_button);

bool minimum_specs = true;

Expand All @@ -106,18 +106,18 @@ public class Installer.CheckView : AbstractInstallerView {
var dis = new DataInputStream (@is);

if ("daily" in dis.read_line ()) {
message_box.add (beta_view);
message_box.append (beta_view);
}
} catch (Error e) {
critical ("Couldn't read apt sources: %s", e.message);
}

if (get_vm ()) {
message_box.add (vm_view);
message_box.append (vm_view);
}

if (!minimum_specs) {
message_box.add (specs_view);
message_box.append (specs_view);
}
}

Expand Down
10 changes: 5 additions & 5 deletions src/Views/DiskView.vala
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,8 @@ public class Installer.DiskView : AbstractInstallerView {
halign = CENTER,
valign = CENTER
};
load_box.add (load_spinner);
load_box.add (load_label);
load_box.append (load_spinner);
load_box.append (load_label);

load_stack = new Gtk.Stack () {
transition_type = Gtk.StackTransitionType.CROSSFADE
Expand Down Expand Up @@ -111,7 +111,7 @@ public class Installer.DiskView : AbstractInstallerView {
next_button.add_css_class (Granite.STYLE_CLASS_SUGGESTED_ACTION);
next_button.clicked.connect (() => ((Adw.Leaflet) get_parent ()).navigate (FORWARD));

action_box_end.add (next_button);
action_box_end.append (next_button);
}

public async void load (uint64 minimum_disk_size) {
Expand Down Expand Up @@ -173,12 +173,12 @@ public class Installer.DiskView : AbstractInstallerView {

foreach (DiskButton disk_button in enabled_buttons) {
disk_button.group = no_selection;
disk_box.add (disk_button);
disk_box.append (disk_button);
}

foreach (DiskButton disk_button in disabled_buttons) {
disk_button.group = no_selection;
disk_box.add (disk_button);
disk_box.append (disk_button);
}

load_stack.set_visible_child_name ("disk");
Expand Down
4 changes: 2 additions & 2 deletions src/Views/DriversView.vala
Original file line number Diff line number Diff line change
Expand Up @@ -105,8 +105,8 @@
next_button.add_css_class (Granite.STYLE_CLASS_DESTRUCTIVE_ACTION);
next_button.clicked.connect (() => next_step ());

action_box_end.add (back_button);
action_box_end.add (next_button);
action_box_end.append (back_button);
action_box_end.append (next_button);

drivers_check.toggled.connect (() => {
unowned var configuration = Configuration.get_default ();
Expand Down
22 changes: 11 additions & 11 deletions src/Views/EncryptView.vala
Original file line number Diff line number Diff line change
Expand Up @@ -136,14 +136,14 @@ public class EncryptView : AbstractInstallerView {
confirm_entry_revealer.label_widget.add_css_class (Granite.STYLE_CLASS_ERROR);

var password_box = new Gtk.Box (VERTICAL, 3);
password_box.add (description);
password_box.add (pw_label);
password_box.add (pw_entry);
password_box.add (pw_levelbar);
password_box.add (pw_error_revealer);
password_box.add (confirm_label);
password_box.add (confirm_entry);
password_box.add (confirm_entry_revealer);
password_box.append (description);
password_box.append (pw_label);
password_box.append (pw_entry);
password_box.append (pw_levelbar);
password_box.append (pw_error_revealer);
password_box.append (confirm_label);
password_box.append (confirm_entry);
password_box.append (confirm_entry_revealer);

var stack = new Gtk.Stack () {
vhomogeneous = false,
Expand All @@ -170,9 +170,9 @@ public class EncryptView : AbstractInstallerView {
};
next_button.add_css_class (Granite.STYLE_CLASS_SUGGESTED_ACTION);

action_box_end.add (back_button);
action_box_end.add (encrypt_button);
action_box_end.add (next_button);
action_box_end.append (back_button);
action_box_end.append (encrypt_button);
action_box_end.append (next_button);

next_button.grab_focus ();

Expand Down
6 changes: 3 additions & 3 deletions src/Views/ErrorView.vala
Original file line number Diff line number Diff line change
Expand Up @@ -119,9 +119,9 @@ public class ErrorView : AbstractInstallerView {
var install_button = new Gtk.Button.with_label (_("Try Installing Again"));
install_button.add_css_class (Granite.STYLE_CLASS_SUGGESTED_ACTION);

action_box_end.add (restart_button);
action_box_end.add (demo_button);
action_box_end.add (install_button);
action_box_end.append (restart_button);
action_box_end.append (demo_button);
action_box_end.append (install_button);

restart_button.clicked.connect (Utils.restart);

Expand Down
4 changes: 2 additions & 2 deletions src/Views/KeyboardLayoutView.vala
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,8 @@ public class KeyboardLayoutView : AbstractInstallerView {
};
next_button.add_css_class (Granite.STYLE_CLASS_SUGGESTED_ACTION);

action_box_end.add (back_button);
action_box_end.add (next_button);
action_box_end.append (back_button);
action_box_end.append (next_button);

input_variant_widget.main_listbox.set_sort_func ((row1, row2) => {
return ((LayoutRow) row1).layout.description.collate (((LayoutRow) row2).layout.description);
Expand Down
16 changes: 8 additions & 8 deletions src/Views/LanguageView.vala
Original file line number Diff line number Diff line change
Expand Up @@ -102,18 +102,18 @@ public class Installer.LanguageView : AbstractInstallerView {
if (lang_entry.key in preferred_langs) {
var pref_langrow = new LangRow (lang_entry.value);
pref_langrow.preferred_row = true;
lang_variant_widget.main_listbox.add (pref_langrow);
lang_variant_widget.main_listbox.append (pref_langrow);
}

var langrow = new LangRow (lang_entry.value);
lang_variant_widget.main_listbox.add (langrow);
lang_variant_widget.main_listbox.append (langrow);
}

next_button = new Gtk.Button.with_label (_("Select"));
next_button.sensitive = false;
next_button.add_css_class (Granite.STYLE_CLASS_SUGGESTED_ACTION);

action_box_end.add (next_button);
action_box_end.append (next_button);

lang_variant_widget.main_listbox.row_selected.connect (row_selected);
lang_variant_widget.main_listbox.select_row (lang_variant_widget.main_listbox.get_row_at_index (0));
Expand Down Expand Up @@ -249,7 +249,7 @@ public class Installer.LanguageView : AbstractInstallerView {
lang_variant_widget.clear_variants ();
lang_variant_widget.variant_listbox.row_selected.connect (variant_row_selected);
foreach (var country in countries) {
lang_variant_widget.variant_listbox.add (new CountryRow (country));
lang_variant_widget.variant_listbox.append (new CountryRow (country));
}

lang_variant_widget.variant_listbox.select_row (lang_variant_widget.variant_listbox.get_row_at_index (0));
Expand Down Expand Up @@ -329,8 +329,8 @@ public class Installer.LanguageView : AbstractInstallerView {
margin_bottom = 6,
margin_start = 6
};
box.add (label);
box.add (image);
box.append (label);
box.append (image);

child = box;
}
Expand Down Expand Up @@ -374,8 +374,8 @@ public class Installer.LanguageView : AbstractInstallerView {
margin_bottom = 6,
margin_start = 6
};
box.add (label);
box.add (image);
box.append (label);
box.append (image);

child = box;
}
Expand Down
8 changes: 4 additions & 4 deletions src/Views/PartitioningView.vala
Original file line number Diff line number Diff line change
Expand Up @@ -101,8 +101,8 @@ public class Installer.PartitioningView : AbstractInstallerView {
valign = CENTER,
halign = CENTER
};
load_box.add (load_spinner);
load_box.add (load_label);
load_box.append (load_spinner);
load_box.append (load_label);

load_stack = new Gtk.Stack ();
load_stack.transition_type = Gtk.StackTransitionType.CROSSFADE;
Expand All @@ -128,8 +128,8 @@ public class Installer.PartitioningView : AbstractInstallerView {
next_button.sensitive = false;

action_box_start.add (modify_partitions_button);
action_box_end.add (back_button);
action_box_end.add (next_button);
action_box_end.append (back_button);
action_box_end.append (next_button);

back_button.clicked.connect (() => ((Adw.Leaflet) get_parent ()).navigate (Hdy.NavigationDirection.BACK));
next_button.clicked.connect (() => next_step ());
Expand Down
4 changes: 2 additions & 2 deletions src/Views/SuccessView.vala
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,8 @@ public class SuccessView : AbstractInstallerView {
restart_button.add_css_class (Granite.STYLE_CLASS_SUGGESTED_ACTION);
restart_button.clicked.connect (Utils.restart);

action_box_end.add (shutdown_button);
action_box_end.add (restart_button);
action_box_end.append (shutdown_button);
action_box_end.append (restart_button);

update_secondary_label ();

Expand Down
12 changes: 6 additions & 6 deletions src/Views/TryInstallView.vala
Original file line number Diff line number Diff line change
Expand Up @@ -62,10 +62,10 @@ public class Installer.TryInstallView : AbstractInstallerView {
var type_box = new Gtk.Box (VERTICAL, 6) {
valign = CENTER
};
type_box.add (demo_button);
type_box.add (clean_install_button);
type_box.add (new Gtk.Separator (Gtk.Orientation.HORIZONTAL));
type_box.add (custom_button);
type_box.append (demo_button);
type_box.append (clean_install_button);
type_box.append (new Gtk.Separator (Gtk.Orientation.HORIZONTAL));
type_box.append (custom_button);

var type_scrolled = new Gtk.ScrolledWindow (null, null) {
child = type_box,
Expand All @@ -88,8 +88,8 @@ public class Installer.TryInstallView : AbstractInstallerView {
};
next_button.add_css_class (Granite.STYLE_CLASS_SUGGESTED_ACTION);

action_box_end.add (back_button);
action_box_end.add (next_button);
action_box_end.append (back_button);
action_box_end.append (next_button);

back_button.clicked.connect (() => ((Adw.Leaflet) get_parent ()).navigate (BACK));

Expand Down
4 changes: 2 additions & 2 deletions src/Widgets/DecryptMenu.vala
Original file line number Diff line number Diff line change
Expand Up @@ -179,8 +179,8 @@ public class Installer.DecryptMenu: Gtk.Popover {
var info = new Gtk.Label (_("LUKS volume was decrypted"));

var box = new Gtk.Box (Gtk.Orientation.VERTICAL, 6);
box.add (label);
box.add (info);
box.append (label);
box.append (info);

stack.add (box);
stack.visible_child = box;
Expand Down
2 changes: 1 addition & 1 deletion src/Widgets/DiskBar.vala
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ public class Installer.DiskBar: Gtk.Grid {
private Gtk.Widget set_menu (Gtk.Widget widget, Gtk.Popover? menu) {
if (menu != null) {
var event_box = new Gtk.EventBox ();
event_box.add (widget);
event_box.append (widget);
event_box.add_events (Gdk.EventMask.BUTTON_PRESS_MASK);
event_box.button_press_event.connect (() => {
menu.popup ();
Expand Down
8 changes: 4 additions & 4 deletions src/Widgets/VariantWidget.vala
Original file line number Diff line number Diff line change
Expand Up @@ -59,14 +59,14 @@ public class VariantWidget : Gtk.Frame {

var header_box = new Gtk.Box (Gtk.Orientation.HORIZONTAL, 6);
header_box.hexpand = true;
header_box.add (back_button);
header_box.append (back_button);
header_box.set_center_widget (variant_title);

variant_box = new Gtk.Box (VERTICAL, 0);
variant_box.add_css_class (Granite.STYLE_CLASS_VIEW);
variant_box.add (header_box);
variant_box.add (new Gtk.Separator (Gtk.Orientation.HORIZONTAL));
variant_box.add (variant_scrolled);
variant_box.append (header_box);
variant_box.append (new Gtk.Separator (Gtk.Orientation.HORIZONTAL));
variant_box.append (variant_scrolled);

deck = new Adw.Leaflet () {
can_navigate_back = true,
Expand Down

0 comments on commit 2e152be

Please sign in to comment.