fix package properties display

This commit is contained in:
guinux 2015-04-12 16:22:52 +02:00
parent 27b5c00c2b
commit 57a38b3022

View File

@ -466,29 +466,26 @@ namespace Pamac {
if (selected.length () > 0) { if (selected.length () > 0) {
// display info for the first package of the selection // display info for the first package of the selection
Pamac.Package pkg = packages_list.get_pkg_at_path (selected.nth_data (0)); Pamac.Package pkg = packages_list.get_pkg_at_path (selected.nth_data (0));
int current_page = properties_notebook.get_current_page ();
switch (current_page) {
case 0:
set_infos_list (pkg);
if (pkg.repo == "AUR") {
deps_scrolledwindow.visible = false;
details_scrolledwindow.visible = false;
files_scrolledwindow.visible = false;
} else {
deps_scrolledwindow.visible = true;
details_scrolledwindow.visible = true;
if (pkg.repo == "local") { if (pkg.repo == "local") {
files_scrolledwindow.visible = true; files_scrolledwindow.visible = true;
} else { } else {
files_scrolledwindow.visible = false; files_scrolledwindow.visible = false;
} }
switch (properties_notebook.get_current_page ()) {
case 0:
set_infos_list (pkg);
if (pkg.repo == "AUR") {
deps_scrolledwindow.visible = false;
details_scrolledwindow.visible = false;
} else {
deps_scrolledwindow.visible = true;
details_scrolledwindow.visible = true;
} }
break; break;
case 1: case 1:
if (pkg.repo == "AUR") { if (pkg.repo == "AUR") {
deps_scrolledwindow.visible = false; deps_scrolledwindow.visible = false;
details_scrolledwindow.visible = false; details_scrolledwindow.visible = false;
files_scrolledwindow.visible = false;
} else { } else {
set_deps_list (pkg.name); set_deps_list (pkg.name);
} }
@ -497,7 +494,6 @@ namespace Pamac {
if (pkg.repo == "AUR") { if (pkg.repo == "AUR") {
deps_scrolledwindow.visible = false; deps_scrolledwindow.visible = false;
details_scrolledwindow.visible = false; details_scrolledwindow.visible = false;
files_scrolledwindow.visible = false;
} else { } else {
set_details_list (pkg.name); set_details_list (pkg.name);
} }