diff --git a/src/manager_window.vala b/src/manager_window.vala index 989c7dd..4fdde33 100644 --- a/src/manager_window.vala +++ b/src/manager_window.vala @@ -137,6 +137,14 @@ namespace Pamac { public ManagerWindow (Gtk.Application application) { Object (application: application); + support_aur (false, false); + + Timeout.add (100, populate_window); + } + + public bool populate_window () { + this.get_window ().set_cursor (new Gdk.Cursor.for_display (Gdk.Display.get_default (), Gdk.CursorType.WATCH)); + right_click_menu = new Gtk.Menu (); deselect_item = new Gtk.MenuItem.with_label (dgettext (null, "Deselect")); deselect_item.activate.connect (on_deselect_item_activate); @@ -194,9 +202,7 @@ namespace Pamac { refresh_handle (); unowned Alpm.Package? pkg = Alpm.find_satisfier (alpm_config.handle.localdb.pkgcache, "yaourt"); - if (pkg == null) { - support_aur (false, false); - } else { + if (pkg != null) { support_aur (transaction.pamac_config.enable_aur, transaction.pamac_config.search_aur); } @@ -209,6 +215,8 @@ namespace Pamac { update_lists (); show_default_pkgs (); + + return false; } void on_write_pamac_config_finished (bool recurse, uint64 refresh_period, bool no_update_hide_icon, diff --git a/src/updater_window.vala b/src/updater_window.vala index 0b09d31..2e1e878 100644 --- a/src/updater_window.vala +++ b/src/updater_window.vala @@ -51,6 +51,17 @@ namespace Pamac { public UpdaterWindow (Gtk.Application application) { Object (application: application); + bottom_label.set_visible (false); + apply_button.set_sensitive (false); + notebook.set_show_tabs (false); + aur_scrolledwindow.set_visible (false); + + Timeout.add (100, populate_window); + } + + public bool populate_window () { + this.get_window ().set_cursor (new Gdk.Cursor.for_display (Gdk.Display.get_default (), Gdk.CursorType.WATCH)); + repos_updates_list = new Gtk.ListStore (3, typeof (bool), typeof (string), typeof (string)); repos_updates_treeview.set_model (repos_updates_list); aur_updates_list = new Gtk.ListStore (2, typeof (bool), typeof (string)); @@ -62,13 +73,9 @@ namespace Pamac { transaction.daemon.get_updates_finished.connect (on_get_updates_finished); - bottom_label.set_visible (false); - apply_button.set_sensitive (false); - - notebook.set_show_tabs (false); - aur_scrolledwindow.set_visible (false); - on_refresh_button_clicked (); + + return false; } public void set_apply_button_sensitive () {