[vlc-commits] macosx: fix table column indentation (close #6929)
Felix Paul Kühne
git at videolan.org
Thu Dec 27 13:08:27 CET 2012
vlc | branch: master | Felix Paul Kühne <fkuehne at videolan.org> | Thu Dec 27 12:51:57 2012 +0100| [d3319c732f0b6583aa48e4510fdf8d735701d43f] | committer: Felix Paul Kühne
macosx: fix table column indentation (close #6929)
For indentation, the outline table column needs to be set, which used to be the title column. This is not a bad choice, since it is only column populated by all items.
However, one can't remove the outline table column easily, so I chose to disable the ability to remove it, something virtually all users don't want to do anyway.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=d3319c732f0b6583aa48e4510fdf8d735701d43f
---
modules/gui/macosx/MainMenu.m | 8 ++++++--
modules/gui/macosx/playlist.m | 2 ++
2 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/modules/gui/macosx/MainMenu.m b/modules/gui/macosx/MainMenu.m
index 401ad1f..02e77d3 100644
--- a/modules/gui/macosx/MainMenu.m
+++ b/modules/gui/macosx/MainMenu.m
@@ -434,13 +434,17 @@ static VLCMainMenu *_o_sharedInstance = nil;
o_mi_tmp = [o_mu_playlistTableColumns addItemWithTitle:o_title
action:@selector(togglePlaylistColumnTable:)
keyEquivalent:@""];
- [o_mi_tmp setTarget:self];
+ /* don't set a valid target for the title column selector, since we want it to be disabled */
+ if (![[o_ptc_menuorder objectAtIndex:i] isEqualToString: TITLE_COLUMN])
+ [o_mi_tmp setTarget:self];
[o_mi_tmp setTag:i];
o_mi_tmp = [o_context_menu addItemWithTitle:o_title
action:@selector(togglePlaylistColumnTable:)
keyEquivalent:@""];
- [o_mi_tmp setTarget:self];
+ /* don't set a valid target for the title column selector, since we want it to be disabled */
+ if (![[o_ptc_menuorder objectAtIndex:i] isEqualToString: TITLE_COLUMN])
+ [o_mi_tmp setTarget:self];
[o_mi_tmp setTag:i];
}
if (!o_mu_playlistTableColumnsContextMenu)
diff --git a/modules/gui/macosx/playlist.m b/modules/gui/macosx/playlist.m
index b1531a9..4995d95 100644
--- a/modules/gui/macosx/playlist.m
+++ b/modules/gui/macosx/playlist.m
@@ -1363,6 +1363,8 @@
}
else
[o_outline_view removeTableColumn: [o_outline_view tableColumnWithIdentifier: o_column]];
+
+ [o_outline_view setOutlineTableColumn: [o_outline_view tableColumnWithIdentifier:TITLE_COLUMN]];
}
- (void)saveTableColumns
More information about the vlc-commits
mailing list