Commit 6224bf17 authored by Vibhoothi's avatar Vibhoothi

libraryView:Standarization of class Names

During initial development of libraryView we made the cocoa classes names with
non-standerized names without proper Naming Conventions
VLCMainWindowCollectionViewItem -> VLCLibraryView
VLCMainWindowDataModel -> VLCLibraryItem
parent 264754b3
......@@ -7,8 +7,8 @@
objects = {
/* Begin PBXBuildFile section */
1106202421197CC6000039A8 /* VLCMainWindowDataModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 1106202321197CC5000039A8 /* VLCMainWindowDataModel.m */; };
11CE023120DBFE42008B0A7F /* VLCMainWindowCollectionViewItem.m in Sources */ = {isa = PBXBuildFile; fileRef = 11CE022F20DBFE41008B0A7F /* VLCMainWindowCollectionViewItem.m */; };
1106202421197CC6000039A8 /* VLCLibraryItem.m in Sources */ = {isa = PBXBuildFile; fileRef = 1106202321197CC5000039A8 /* VLCLibraryItem.m */; };
11CE023120DBFE42008B0A7F /* VLCLibraryView.m in Sources */ = {isa = PBXBuildFile; fileRef = 11CE022F20DBFE41008B0A7F /* VLCLibraryView.m */; };
1C1C62011F8260A90052DD4F /* VLCWrappableTextField.m in Sources */ = {isa = PBXBuildFile; fileRef = 1C1C62001F8260A90052DD4F /* VLCWrappableTextField.m */; };
1C31138E1E508C6900D4DD76 /* VLCAboutWindowController.m in Sources */ = {isa = PBXBuildFile; fileRef = 1C67C8A71D58C0A40079E1C1 /* VLCAboutWindowController.m */; };
1C3113901E508C6900D4DD76 /* VLCHelpWindowController.m in Sources */ = {isa = PBXBuildFile; fileRef = 1C67C8A41D58C0980079E1C1 /* VLCHelpWindowController.m */; };
......@@ -139,11 +139,11 @@
089C1672FE841209C02AAC07 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = /System/Library/Frameworks/Foundation.framework; sourceTree = "<absolute>"; };
089C167FFE841241C02AAC07 /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = /System/Library/Frameworks/AppKit.framework; sourceTree = "<absolute>"; };
1058C7ADFEA557BF11CA2CBB /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = /System/Library/Frameworks/Cocoa.framework; sourceTree = "<absolute>"; };
1106202221197CC5000039A8 /* VLCMainWindowDataModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = VLCMainWindowDataModel.h; sourceTree = "<group>"; };
1106202321197CC5000039A8 /* VLCMainWindowDataModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = VLCMainWindowDataModel.m; sourceTree = "<group>"; };
11CE022E20DBFE41008B0A7F /* VLCMainWindowCollectionViewItem.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = VLCMainWindowCollectionViewItem.h; sourceTree = "<group>"; };
11CE022F20DBFE41008B0A7F /* VLCMainWindowCollectionViewItem.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = VLCMainWindowCollectionViewItem.m; sourceTree = "<group>"; };
11CE023020DBFE42008B0A7F /* VLCMainWindowCollectionViewItem.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = VLCMainWindowCollectionViewItem.xib; sourceTree = "<group>"; };
1106202221197CC5000039A8 /* VLCLibraryItem.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = VLCLibraryItem.h; sourceTree = "<group>"; };
1106202321197CC5000039A8 /* VLCLibraryItem.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = VLCLibraryItem.m; sourceTree = "<group>"; };
11CE022E20DBFE41008B0A7F /* VLCLibraryView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = VLCLibraryView.h; sourceTree = "<group>"; };
11CE022F20DBFE41008B0A7F /* VLCLibraryView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = VLCLibraryView.m; sourceTree = "<group>"; };
11CE023020DBFE42008B0A7F /* VLCLibraryView.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = VLCLibraryView.xib; sourceTree = "<group>"; };
1C06F2A21F08F1250068846F /* osx_notifications.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = osx_notifications.m; path = ../../../modules/notify/osx_notifications.m; sourceTree = "<group>"; };
1C18BE461F2926700053D329 /* keychain.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = keychain.m; path = ../../../modules/keystore/keychain.m; sourceTree = "<group>"; };
1C1C61FF1F8260A90052DD4F /* VLCWrappableTextField.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = VLCWrappableTextField.h; sourceTree = "<group>"; };
......@@ -638,10 +638,10 @@
11CC2FBA211068490091B834 /* LibraryView */ = {
isa = PBXGroup;
children = (
1106202221197CC5000039A8 /* VLCMainWindowDataModel.h */,
1106202321197CC5000039A8 /* VLCMainWindowDataModel.m */,
11CE022E20DBFE41008B0A7F /* VLCMainWindowCollectionViewItem.h */,
11CE022F20DBFE41008B0A7F /* VLCMainWindowCollectionViewItem.m */,
1106202221197CC5000039A8 /* VLCLibraryItem.h */,
1106202321197CC5000039A8 /* VLCLibraryItem.m */,
11CE022E20DBFE41008B0A7F /* VLCLibraryView.h */,
11CE022F20DBFE41008B0A7F /* VLCLibraryView.m */,
);
name = LibraryView;
sourceTree = "<group>";
......@@ -1428,7 +1428,7 @@
children = (
6B8224091E4D2A9000833BE1 /* MainMenu.xib */,
6B82240A1E4D2A9000833BE1 /* MainWindow.xib */,
11CE023020DBFE42008B0A7F /* VLCMainWindowCollectionViewItem.xib */,
11CE023020DBFE42008B0A7F /* VLCLibraryView.xib */,
6B82241A1E4D2A9000833BE1 /* VLCStatusBarIconMainMenu.xib */,
6B8224181E4D2A9000833BE1 /* VLCFullScreenPanel.xib */,
6B8223FE1E4D2A8F00833BE1 /* About.xib */,
......@@ -1576,7 +1576,7 @@
1C31139F1E508C6900D4DD76 /* VLCMainWindowControlsBar.m in Sources */,
1C3113A11E508C6900D4DD76 /* VLCConvertAndSaveWindowController.m in Sources */,
1C3113A31E508C6900D4DD76 /* VLCCoreDialogProvider.m in Sources */,
11CE023120DBFE42008B0A7F /* VLCMainWindowCollectionViewItem.m in Sources */,
11CE023120DBFE42008B0A7F /* VLCLibraryView.m in Sources */,
6B2EFC631F281A0900F3C0EA /* VLCVolumeSliderCell.m in Sources */,
1C3113A51E508C6900D4DD76 /* VLCCoreInteraction.m in Sources */,
1C3113A71E508C6900D4DD76 /* VLCLogWindowController.m in Sources */,
......@@ -1603,7 +1603,7 @@
1C3113CD1E508C6900D4DD76 /* VLCPLModel.m in Sources */,
1C3113CF1E508C6900D4DD76 /* prefs_widgets.m in Sources */,
1C3113D11E508C6900D4DD76 /* prefs.m in Sources */,
1106202421197CC6000039A8 /* VLCMainWindowDataModel.m in Sources */,
1106202421197CC6000039A8 /* VLCLibraryItem.m in Sources */,
1C3113D31E508C6900D4DD76 /* VLCResumeDialogController.m in Sources */,
1C5716AC1F5B142200678627 /* coreaudio_common.c in Sources */,
1C3113D51E508C6900D4DD76 /* VLCTextfieldPanelController.m in Sources */,
......
......@@ -95,8 +95,8 @@ libmacosx_plugin_la_SOURCES = \
gui/macosx/VLCVolumeSlider.h gui/macosx/VLCVolumeSlider.m \
gui/macosx/VLCVolumeSliderCell.h gui/macosx/VLCVolumeSliderCell.m \
gui/macosx/VLCWrappableTextField.h gui/macosx/VLCWrappableTextField.m \
gui/macosx/VLCMainWindowCollectionViewItem.h gui/macosx/VLCMainWindowCollectionViewItem.m \
gui/macosx/VLCMainWindowDataModel.h gui/macosx/VLCMainWindowDataModel.m
gui/macosx/VLCLibraryView.h gui/macosx/VLCLibraryView.m \
gui/macosx/VLCLibraryItem.h gui/macosx/VLCLibraryItem.m
# User interface compilation
......@@ -128,7 +128,7 @@ nodist_libmacosx_plugin_la_SOURCES = \
gui/macosx/UI/VideoEffects.nib \
gui/macosx/UI/VLCFullScreenPanel.nib \
gui/macosx/UI/VLCStatusBarIconMainMenu.nib \
gui/macosx/UI/VLCMainWindowCollectionViewItem.nib
gui/macosx/UI/VLCLibraryView.nib
EXTRA_DIST += \
gui/macosx/UI/About.xib \
......@@ -158,7 +158,7 @@ EXTRA_DIST += \
gui/macosx/UI/VideoEffects.xib \
gui/macosx/UI/VLCFullScreenPanel.xib \
gui/macosx/UI/VLCStatusBarIconMainMenu.xib \
gui/macosx/UI/VLCMainWindowCollectionViewItem.xib
gui/macosx/UI/VLCLibraryView.xib
xib_verbose = $(xib_verbose_$(V))
xib_verbose_ = $(xib_verbose__$(AM_DEFAULT_VERBOSITY))
......
......@@ -6,7 +6,7 @@
<capability name="system font weights other than Regular or Bold" minToolsVersion="7.0"/>
</dependencies>
<objects>
<customObject id="-2" userLabel="File's Owner" customClass="VLCMainWindowCollectionViewItem">
<customObject id="-2" userLabel="File's Owner" customClass="VLCLibraryView">
<connections>
<outlet property="VLCItemImageView" destination="LRe-wn-Y2z" id="HPo-O1-7R6"/>
<outlet property="VLCItemLabel" destination="KFD-Gv-9GE" id="Y3t-Ag-E8M"/>
......
......@@ -2,7 +2,7 @@
* VLCMainWindowDataModel.h: MacOS X interface module
*****************************************************************************
* Copyright (C) 2018 VLC authors and VideoLAN
* $Id $
* $Id$
*
* Authors: Vibhoothi <vibhoothiiaanand -at- googlemail dot com>
*
......@@ -22,7 +22,7 @@
*****************************************************************************/
#import <Foundation/Foundation.h>
@interface VLCMainWindowDataModel : NSObject
@interface VLCLibraryItem : NSObject
@property (strong) NSString *videoTitle;
@property (strong) NSString *year;
......
......@@ -20,8 +20,8 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/
#import "VLCMainWindowDataModel.h"
#import "VLCLibraryItem.h"
@implementation VLCMainWindowDataModel
@implementation VLCLibraryItem
@end
......@@ -22,9 +22,9 @@
*****************************************************************************/
#import <Cocoa/Cocoa.h>
#import "VLCMainWindowDataModel.h"
#import "VLCLibraryItem.h"
@interface VLCMainWindowCollectionViewItem : NSCollectionViewItem < NSCollectionViewDelegate>
@interface VLCLibraryView : NSCollectionViewItem < NSCollectionViewDelegate>
//Library View
@property (nonatomic,strong) IBOutlet NSImageView *VLCItemImageView;
......@@ -40,7 +40,7 @@
@property (strong) IBOutlet NSTextField *popOverSize;
//method for linking dataModel with View
-(void)assignValueForDataModel:(VLCMainWindowDataModel *) dataModel;
-(void)assignValueForDataModel:(VLCLibraryItem *) dataModel;
@end
......@@ -22,16 +22,16 @@
*****************************************************************************/
#import <Cocoa/Cocoa.h>
#import "VLCMainWindowCollectionViewItem.h"
#import "VLCMainWindowDataModel.h"
#import "VLCLibraryView.h"
#import "VLCLibraryItem.h"
@interface VLCMainWindowCollectionViewItem ()
@interface VLCLibraryView ()
{
}
@end
@implementation VLCMainWindowCollectionViewItem
@implementation VLCLibraryView
- (void)viewDidLoad {
[super viewDidLoad];
......@@ -39,7 +39,7 @@
[self.collectionView setDelegate:self];
}
-(void)assignValueForDataModel:(VLCMainWindowDataModel *) dataModel
-(void)assignValueForDataModel:(VLCLibraryItem *) dataModel
{
NSLog(@"dataModel %@",dataModel);
self.VLCItemLabel.stringValue =dataModel.videoTitle;;
......
......@@ -33,8 +33,8 @@
#import "VLCVideoWindowCommon.h"
#import "misc.h"
#import "VLCFSPanelController.h"
#import "VLCMainWindowCollectionViewItem.h"
#import "VLCMainWindowDataModel.h"
#import "VLCLibraryView.h"
#import "VLCLibraryItem.h"
@class VLCDetachedVideoWindow;
@class VLCMainWindowControlsBar;
......@@ -52,7 +52,7 @@ typedef enum {
@property (readonly) BOOL nativeFullscreenMode;
@property (readwrite) BOOL nonembedded;
@property (weak) IBOutlet NSCollectionView *collectionView;
@property (strong) VLCMainWindowDataModel *dataModel;
@property (strong) VLCLibraryItem *dataModel;
@property (strong) NSMutableArray *thumbinails;
@property (strong) NSMutableArray *labels;
@property (strong) NSMutableArray *years;
......
......@@ -222,7 +222,7 @@ static const float f_min_window_height = 307.;
self.collectionView.delegate = self;
self.collectionView.dataSource = self;
self.collectionView.wantsLayer = YES;
[self.collectionView registerClass:[VLCMainWindowCollectionViewItem class] forItemWithIdentifier:@"dummyViews"];
[self.collectionView registerClass:[VLCLibraryView class] forItemWithIdentifier:@"dummyViews"];
NSCollectionViewFlowLayout *flowLayout = [[NSCollectionViewFlowLayout alloc] init];
flowLayout.itemSize = NSMakeSize(190,241);
......@@ -251,7 +251,7 @@ static const float f_min_window_height = 307.;
CGImageRef imgRef = [imageGenerator copyCGImageAtTime:CMTimeMake(10, duration) actualTime:NULL error:nil];
NSImage *thumbinail =[[NSImage alloc] initWithCGImage:imgRef size:NSSizeFromCGSize(CGSizeMake(100.0, 100.0))];
if(thumbinail){
self.dataModel = [[VLCMainWindowDataModel alloc] init ] ;
self.dataModel = [[VLCLibraryItem alloc] init ] ;
self.dataModel.thumbnail = thumbinail;
self.dataModel.videoTitle= path;
self.dataModel.year = @"2012";
......@@ -301,9 +301,10 @@ static const float f_min_window_height = 307.;
Pass the metadata to the DataModel for assinging values to the views
and return updated view
*/
VLCMainWindowCollectionViewItem *item = [collectionView makeItemWithIdentifier:@"dummyViews" forIndexPath:indexPath];
VLCMainWindowDataModel *model =[VLCMainWindowDataModel new];
for(VLCMainWindowDataModel *subModel in self.dummyData)
VLCLibraryView *item = [collectionView makeItemWithIdentifier:@"dummyViews" forIndexPath:indexPath];
VLCLibraryItem *model =[VLCLibraryItem new];
for(VLCLibraryItem *subModel in self.dummyData)
{
// self.dataModel = [[VLCMainWindowDataModel alloc] init ] ;
// VLCMainWindowDataModel *model=[[VLCMainWindowDataModel alloc] init];
......@@ -312,8 +313,8 @@ static const float f_min_window_height = 307.;
NSLog(@"SubModelTitle %@",subModel.videoTitle);
[item assignValueForDataModel:model];
}
NSLog(@"Model Thumbinal outside %@",model.videoTitle);
return item;
//NSLog(@"Model %@",model);
//NSLog(@"model Title:%@,modelThumb :%@",model.videoTitle,model.thumbnail);
//[item assignValueForDataModel:model];
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment