File tree 3 files changed +21
-1
lines changed
uis/src/com/biglybt/ui/swt/views/configsections
3 files changed +21
-1
lines changed Original file line number Diff line number Diff line change @@ -5547,6 +5547,7 @@ sb.dblclick.action.ontop=On Top
5547
5547
sb.dblclick.action.independent =Independent
5548
5548
ConfigView.section.file.always.create.sub.folder =Always create a sub-folder to contain torrent data files
5549
5549
label.set.as.default.for.new.views =Set as default for new views
5550
+ ConfigView.section.interface.cleartables =Reset all table column configurations
5550
5551
5551
5552
#
5552
5553
#
Original file line number Diff line number Diff line change @@ -969,7 +969,7 @@ public TableColumnInfo getColumnInfo( TableColumnCore column ){
969
969
return columnInfo ;
970
970
}
971
971
972
- private void
972
+ public void
973
973
resetAllTables ()
974
974
{
975
975
for ( String tableID : new ArrayList <>(mapTableDefaultColumns .keySet ())){
@@ -984,6 +984,13 @@ public TableColumnInfo getColumnInfo( TableColumnCore column ){
984
984
}
985
985
}
986
986
}
987
+
988
+ synchronized ( this ){
989
+
990
+ tablesConfig = new HashMap <>();
991
+
992
+ saveTableConfigs ();
993
+ }
987
994
}
988
995
989
996
public void resetColumns (Class dataSourceType , String tableID ) {
Original file line number Diff line number Diff line change 34
34
import com .biglybt .platform .PlatformManagerCapabilities ;
35
35
import com .biglybt .platform .PlatformManagerFactory ;
36
36
import com .biglybt .ui .common .RememberedDecisionsManager ;
37
+ import com .biglybt .ui .common .table .impl .TableColumnManager ;
37
38
import com .biglybt .ui .config .ConfigSectionImpl ;
38
39
import com .biglybt .ui .swt .Utils ;
39
40
import com .biglybt .ui .swt .systray .SystemTraySWT ;
@@ -281,6 +282,17 @@ public void build() {
281
282
COConfigurationManager .addAndFireParameterListener (
282
283
"MessageBoxWindow.decisions" , decisions_parameter_listener );
283
284
285
+ // table config
286
+
287
+ ActionParameterImpl clear_tables_button = new ActionParameterImpl (
288
+ "ConfigView.section.interface.cleartables" ,
289
+ "ConfigView.section.interface.resetassocbutton" );
290
+ add (clear_tables_button );
291
+
292
+ clear_tables_button .addListener (
293
+ param -> TableColumnManager .getInstance ().resetAllTables ());
294
+
295
+
284
296
// reset associations
285
297
286
298
if (platform .hasCapability (
You can’t perform that action at this time.
0 commit comments