[gnome-commander/ConfigurableFileListColumns: 9/26] Hide columns depending on the fileListColumnLayouts
- From: Uwe Scholz <uwescholz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-commander/ConfigurableFileListColumns: 9/26] Hide columns depending on the fileListColumnLayouts
- Date: Sun, 12 May 2019 13:18:39 +0000 (UTC)
commit 110c47f9c7abfddc741849b3a6eac06ef05aca19
Author: Uwe Scholz <u scholz83 gmx de>
Date: Fri May 3 22:44:38 2019 +0200
Hide columns depending on the fileListColumnLayouts
src/gnome-cmd-file-selector.cc | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
---
diff --git a/src/gnome-cmd-file-selector.cc b/src/gnome-cmd-file-selector.cc
index 987b39d5..d1d740e5 100644
--- a/src/gnome-cmd-file-selector.cc
+++ b/src/gnome-cmd-file-selector.cc
@@ -1486,8 +1486,14 @@ GtkWidget *GnomeCmdFileSelector::new_tab(GnomeCmdDir *dir, GnomeCmdFileList::Col
fl->locked = locked;
fl->update_style();
- // hide dir column
- fl->show_column(GnomeCmdFileList::COLUMN_DIR, FALSE);
+ // hide columns which shouldn't be visible
+ for(auto column = 0; column < GnomeCmdFileList::NUM_COLUMNS; column++)
+ {
+ if (!gnome_cmd_data.fileListColumnLayouts[column].visibility)
+ {
+ fl->show_column((GnomeCmdFileList::ColumnID)
gnome_cmd_data.fileListColumnLayouts[column].position, FALSE);
+ }
+ }
// create the scrollwindow that we'll place the list in
GtkWidget *scrolled_window = gtk_scrolled_window_new (nullptr, nullptr);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]