[gnome-commander/ConfigurableFileListColumns: 20/26] Fix for setting the actual column position
- From: Uwe Scholz <uwescholz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-commander/ConfigurableFileListColumns: 20/26] Fix for setting the actual column position
- Date: Sun, 12 May 2019 13:19:35 +0000 (UTC)
commit c8f1d08683955d64194e5d67f6639fc870102ea6
Author: Uwe Scholz <u scholz83 gmx de>
Date: Mon May 6 23:35:37 2019 +0200
Fix for setting the actual column position
src/gnome-cmd-file-list.cc | 20 ++++++++------------
1 file changed, 8 insertions(+), 12 deletions(-)
---
diff --git a/src/gnome-cmd-file-list.cc b/src/gnome-cmd-file-list.cc
index dde97bf3..c2441994 100644
--- a/src/gnome-cmd-file-list.cc
+++ b/src/gnome-cmd-file-list.cc
@@ -753,12 +753,8 @@ void GnomeCmdFileList::create_column_titles()
g_object_set_data_full (*this, "column-hbox", hbox, g_object_unref);
gtk_widget_show (hbox);
- guint actualColumn;
- for (guint jj = COLUMN_NAME; jj < NUM_COLUMNS; jj++)
- {
- if (ii == gnome_cmd_data.fileListColumnLayouts[jj].position)
- actualColumn = jj;
- }
+ guint actualColumn = gnome_cmd_data.fileListColumnLayouts[ii].position;
+
priv->column_labels[ii] = gtk_label_new (_(file_list_column[actualColumn].title));
g_object_ref (priv->column_labels[ii]);
g_object_set_data_full (*this, "column-label", priv->column_labels[ii], g_object_unref);
@@ -772,17 +768,17 @@ void GnomeCmdFileList::create_column_titles()
gtk_box_pack_start (GTK_BOX (hbox), pixmap, FALSE, FALSE, 0);
priv->column_pixmaps[ii] = pixmap;
+ if (static_cast <ColumnID> (gnome_cmd_data.fileListColumnLayouts[ii].position) == COLUMN_ICON)
+ {
+ gtk_clist_column_title_passive (*this, ii);
+ }
gtk_clist_set_column_widget (*this, ii, hbox);
}
for (guint ii = COLUMN_ICON; ii < NUM_COLUMNS; ii++)
{
- guint actualColumn {0};
- for (guint jj = COLUMN_ICON; jj < NUM_COLUMNS; jj++)
- {
- if (ii == gnome_cmd_data.fileListColumnLayouts[jj].position)
- actualColumn = jj;
- }
+ guint actualColumn = gnome_cmd_data.fileListColumnLayouts[ii].position;
+
gtk_clist_set_column_width (*this, ii, gnome_cmd_data.fileListColumnLayouts[ii].width);
gtk_clist_set_column_justification (*this, ii, file_list_column[actualColumn].justification);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]