You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

60 lines
1.4 KiB

  1. /*
  2. Copyright 2017 Virgil Dupras
  3. This software is licensed under the "GPLv3" License as described in the "LICENSE" file,
  4. which should be included with this package. The terms are also available at
  5. http://www.gnu.org/licenses/gpl-3.0.html
  6. */
  7. #import "IgnoreListDialog.h"
  8. #import "HSPyUtil.h"
  9. @implementation IgnoreListDialog
  10. @synthesize model;
  11. @synthesize ignoreListTableView;
  12. - (id)initWithPyRef:(PyObject *)aPyRef
  13. {
  14. self = [super initWithWindowNibName:@"IgnoreListDialog"];
  15. [self window]; //So the detailsTable is initialized.
  16. self.model = [[[PyIgnoreListDialog alloc] initWithModel:aPyRef] autorelease];
  17. [self.model bindCallback:createCallback(@"IgnoreListDialogView", self)];
  18. ignoreListTable = [[HSTable alloc] initWithPyRef:[model ignoreListTable] tableView:ignoreListTableView];
  19. [self initializeColumns];
  20. return self;
  21. }
  22. - (void)dealloc
  23. {
  24. [ignoreListTable release];
  25. [super dealloc];
  26. }
  27. - (void)initializeColumns
  28. {
  29. HSColumnDef defs[] = {
  30. {@"path1", 240, 40, 0, NO, nil},
  31. {@"path2", 240, 40, 0, NO, nil},
  32. nil
  33. };
  34. [[ignoreListTable columns] initializeColumns:defs];
  35. [[ignoreListTable columns] setColumnsAsReadOnly];
  36. }
  37. - (IBAction)removeSelected:(id)sender
  38. {
  39. [model removeSelected];
  40. }
  41. - (IBAction)clear:(id)sender
  42. {
  43. [model clear];
  44. }
  45. /* model --> view */
  46. - (void)show
  47. {
  48. [self showWindow:self];
  49. }
  50. @end