This commit is contained in:
guinux 2016-08-05 16:33:20 +02:00
parent 3f5fb0db1b
commit 4213a4ea45

View File

@ -60,6 +60,7 @@ namespace Pamac {
public bool transaction_running; public bool transaction_running;
bool important_details; bool important_details;
string previous_visible_child_name;
public UpdaterWindow (Gtk.Application application) { public UpdaterWindow (Gtk.Application application) {
Object (application: application); Object (application: application);
@ -174,8 +175,13 @@ namespace Pamac {
[GtkCallback] [GtkCallback]
void on_button_back_clicked () { void on_button_back_clicked () {
if (aur_scrolledwindow.visible) {
stackswitcher.visible = true;
stack.visible_child_name = previous_visible_child_name;
} else {
stack.visible_child_name = "repos"; stack.visible_child_name = "repos";
} }
}
void on_stack_visible_child_changed () { void on_stack_visible_child_changed () {
if (stack.visible_child_name == "term") { if (stack.visible_child_name == "term") {
@ -228,6 +234,7 @@ namespace Pamac {
void on_details_button_clicked () { void on_details_button_clicked () {
details_button.get_style_context ().remove_class (Gtk.STYLE_CLASS_SUGGESTED_ACTION); details_button.get_style_context ().remove_class (Gtk.STYLE_CLASS_SUGGESTED_ACTION);
important_details = false; important_details = false;
previous_visible_child_name = stack.visible_child_name;
stack.visible_child_name = "term"; stack.visible_child_name = "term";
} }
@ -242,6 +249,8 @@ namespace Pamac {
void on_important_details_outpout (bool must_show) { void on_important_details_outpout (bool must_show) {
if (must_show) { if (must_show) {
stackswitcher.visible = false;
previous_visible_child_name = stack.visible_child_name;
stack.visible_child_name = "term"; stack.visible_child_name = "term";
button_back.visible = false; button_back.visible = false;
} else if (stack.visible_child_name != "term") { } else if (stack.visible_child_name != "term") {
@ -305,8 +314,10 @@ namespace Pamac {
if (repos_updates_nb == 0) { if (repos_updates_nb == 0) {
repos_scrolledwindow.visible = false; repos_scrolledwindow.visible = false;
} }
if (stack.visible_child_name != "term") {
stackswitcher.visible = true; stackswitcher.visible = true;
} }
}
this.get_window ().set_cursor (null); this.get_window ().set_cursor (null);
} }
} }