Skip to content

Commit

Permalink
Fix files view in classic UI
Browse files Browse the repository at this point in the history
  • Loading branch information
parg committed Apr 10, 2018
1 parent e48f185 commit bf879b1
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 4 deletions.
3 changes: 3 additions & 0 deletions uis/src/com/biglybt/ui/swt/views/FilesView.java
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,9 @@ TableManager.TABLE_TORRENT_FILES, getPropertiesPrefix(), basicItems,
if (allowTabViews) {
tv.setEnableTabViews(enable_tabs,true,null);
}

tv.setExpandEnabled( true );

basicItems = new TableColumnCore[0];

UIFunctionsSWT uiFunctions = UIFunctionsManagerSWT.getUIFunctionsSWT();
Expand Down
4 changes: 4 additions & 0 deletions uis/src/com/biglybt/ui/swt/views/table/TableViewSWT.java
Original file line number Diff line number Diff line change
Expand Up @@ -245,6 +245,10 @@ void triggerDefaultSelectedListeners(TableRowCore[] selectedRows,

boolean isTabViewsEnabled();

public void setExpandEnabled( boolean b );

public boolean isExpandEnabled();

boolean getTabViewsExpandedByDefault();

String[] getTabViewsRestrictedTo();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,6 @@ public abstract class TableRowSWTBase
{
public static boolean DEBUG_ROW_PAINT = false;

private static final boolean expand_enabled = COConfigurationManager.getBooleanParameter("Table.useTree");


protected Object lock;

private final TableViewSWT tv;
Expand Down Expand Up @@ -522,7 +519,7 @@ public boolean isMouseOver() {
public boolean
canExpand()
{
return( expand_enabled );
return( tv.isExpandEnabled());
}

/* (non-Javadoc)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
import org.eclipse.swt.layout.*;
import org.eclipse.swt.widgets.*;

import com.biglybt.core.config.COConfigurationManager;
import com.biglybt.core.config.ParameterListener;
import com.biglybt.core.internat.MessageText;
import com.biglybt.core.internat.MessageText.MessageTextListener;
Expand Down Expand Up @@ -92,6 +93,8 @@ public class TableViewPainted

private static final boolean DEBUG_REDRAW_CLIP = false;

private static final boolean expand_enabled_default = COConfigurationManager.getBooleanParameter("Table.useTree");

private Composite cTable;

private int loopFactor;
Expand Down Expand Up @@ -176,6 +179,8 @@ public class TableViewPainted

private boolean filterSubRows;

private boolean expandEnabled = expand_enabled_default;

private AtomicInteger mutationCount = new AtomicInteger(0);
private int lastMC = -1;

Expand Down Expand Up @@ -1032,6 +1037,16 @@ public void runSupport() {
public boolean canHaveSubItems() {
return true;
}

public void setExpandEnabled( boolean b )
{
expandEnabled = b;
}

public boolean isExpandEnabled(){
return( expandEnabled );
}


/* (non-Javadoc)
* @see TableView#setHeaderVisible(boolean)
Expand Down

0 comments on commit bf879b1

Please sign in to comment.