Commit 397bfc46 authored by Benjamin Pracht's avatar Benjamin Pracht

...

                                                                                                                             
- *.nib, playlist.*

begining of playlist item propieties box (only modification of uro, name and autt
hor at this time)

- vout.m : remove an unused variable

parent 33bf3f9a
......@@ -328,29 +328,44 @@
ACTIONS = {
deleteItems = id;
handlePopUp = id;
infoCancel = id;
infoOk = id;
playItem = id;
savePlaylist = id;
searchItem = id;
selectAll = id;
togglePlaylistInfoPanel = id;
toggleWindow = id;
};
CLASS = VLCPlaylist;
LANGUAGE = ObjC;
OUTLETS = {
"o_author_lbl" = id;
"o_author_txt" = id;
"o_btn_info_cancel" = id;
"o_btn_info_ok" = id;
"o_btn_playlist" = id;
"o_ctx_menu" = id;
"o_info_window" = id;
"o_loop_popup" = id;
"o_mi_delete" = id;
"o_mi_info" = id;
"o_mi_play" = id;
"o_mi_save_playlist" = id;
"o_mi_selectall" = id;
"o_random_ckb" = id;
"o_search_button" = id;
"o_search_keyword" = id;
"o_status_field" = id;
"o_table_view" = id;
"o_tc_author" = id;
"o_tc_duration" = id;
"o_tc_id" = id;
"o_tc_name" = id;
"o_title_lbl" = id;
"o_title_txt" = id;
"o_uri_lbl" = id;
"o_uri_txt" = id;
"o_window" = id;
};
SUPERCLASS = NSObject;
......@@ -373,4 +388,4 @@
}
);
IBVersion = 1;
}
}
\ No newline at end of file
......@@ -3,7 +3,7 @@
<plist version="1.0">
<dict>
<key>IBDocumentLocation</key>
<string>512 148 505 541 0 0 1024 746 </string>
<string>83 64 505 541 0 0 1024 746 </string>
<key>IBEditorPositions</key>
<dict>
<key>1617</key>
......@@ -11,7 +11,7 @@
<key>29</key>
<string>73 518 419 44 0 0 800 578 </string>
<key>915</key>
<string>261 349 93 99 0 0 800 578 </string>
<string>212 486 103 130 0 0 1024 746 </string>
</dict>
<key>IBFramework Version</key>
<string>349.0</string>
......@@ -19,7 +19,7 @@
<array/>
<key>IBOpenObjects</key>
<array>
<integer>1647</integer>
<integer>21</integer>
</array>
<key>IBSystem Version</key>
<string>7D24</string>
......
......@@ -2,7 +2,7 @@
* playlist.h: MacOS X interface module
*****************************************************************************
* Copyright (C) 2002-2004 VideoLAN
* $Id: playlist.h,v 1.22 2004/03/03 11:34:19 bigben Exp $
* $Id$
*
* Authors: Jon Lech Johansen <jon-vl@nanocrew.net>
* Derk-Jan Hartman <hartman at videolan dot org>
......@@ -52,6 +52,7 @@
IBOutlet id o_ctx_menu;
IBOutlet id o_mi_save_playlist;
IBOutlet id o_mi_info;
IBOutlet id o_mi_play;
IBOutlet id o_mi_delete;
IBOutlet id o_mi_selectall;
......@@ -63,9 +64,20 @@
IBOutlet id o_loop_popup;
/*For playlist info window*/
IBOutlet id o_info_window;
IBOutlet id o_uri_lbl;
IBOutlet id o_title_lbl;
IBOutlet id o_author_lbl;
IBOutlet id o_uri_txt;
IBOutlet id o_title_txt;
IBOutlet id o_author_txt;
IBOutlet id o_btn_info_ok;
IBOutlet id o_btn_info_cancel;
NSImage *o_descendingSortingImage;
NSImage *o_ascendingSortingImage;
}
- (void)initStrings;
......@@ -84,4 +96,10 @@
- (void)updateRowSelection;
- (void)playlistUpdated;
/*For playlist info window*/
- (IBAction)togglePlaylistInfoPanel:(id)sender;
- (IBAction)infoCancel:(id)sender;
- (IBAction)infoOk:(id)sender;
@end
......@@ -2,7 +2,7 @@
* playlist.m: MacOS X interface module
*****************************************************************************
* Copyright (C) 2002-2004 VideoLAN
* $Id: playlist.m,v 1.59 2004/03/03 11:34:19 bigben Exp $
* $Id$
*
* Authors: Jon Lech Johansen <jon-vl@nanocrew.net>
* Derk-Jan Hartman <hartman at videolan dot org>
......@@ -136,7 +136,7 @@
[NSArray arrayWithObjects: NSFilenamesPboardType, nil]];
[o_table_view setIntercellSpacing: NSMakeSize (0.0, 1.0)];
[o_window setExcludedFromWindowsMenu: TRUE];
[o_info_window setExcludedFromWindowsMenu: TRUE];
/* We need to check whether _defaultTableHeaderSortImage exists, since it
belongs to an Apple hidden private API, and then can "disapear" at any time*/
......@@ -169,6 +169,7 @@ belongs to an Apple hidden private API, and then can "disapear" at any time*/
[o_mi_play setTitle: _NS("Play")];
[o_mi_delete setTitle: _NS("Delete")];
[o_mi_selectall setTitle: _NS("Select All")];
[o_mi_info setTitle: _NS("Proprieties")];
[[o_tc_name headerCell] setStringValue:_NS("Name")];
[[o_tc_author headerCell] setStringValue:_NS("Author")];
[[o_tc_duration headerCell] setStringValue:_NS("Duration")];
......@@ -178,6 +179,13 @@ belongs to an Apple hidden private API, and then can "disapear" at any time*/
[[o_loop_popup itemAtIndex:0] setTitle: _NS("Standard Play")];
[[o_loop_popup itemAtIndex:1] setTitle: _NS("Repeat One")];
[[o_loop_popup itemAtIndex:2] setTitle: _NS("Repeat All")];
[o_info_window setTitle: _NS("Proprieties")];
[o_uri_lbl setStringValue: _NS("URI")];
[o_title_lbl setStringValue: _NS("Title")];
[o_author_lbl setStringValue: _NS("Author")];
[o_btn_info_ok setTitle: _NS("OK")];
[o_btn_info_cancel setTitle: _NS("Cancel")];
}
- (void) tableView:(NSTableView*)o_tv
......@@ -269,6 +277,7 @@ belongs to an Apple hidden private API, and then can "disapear" at any time*/
[o_mi_play setEnabled: b_item_sel];
[o_mi_delete setEnabled: b_item_sel];
[o_mi_selectall setEnabled: b_rows];
[o_mi_info setEnabled: b_item_sel];
return( o_ctx_menu );
}
......@@ -611,6 +620,59 @@ belongs to an Apple hidden private API, and then can "disapear" at any time*/
[o_table_view scrollRowToVisible: i_row];
}
/*For info window*/
- (IBAction)togglePlaylistInfoPanel:(id)sender
{
intf_thread_t * p_intf = [NSApp getIntf];
playlist_t * p_playlist;
if( [o_info_window isVisible] )
{
[o_info_window orderOut: sender];
}
else
{
p_playlist = vlc_object_find( p_intf, VLC_OBJECT_PLAYLIST,
FIND_ANYWHERE );
if (p_playlist)
{
int i_item = [o_table_view selectedRow];
[o_uri_txt setStringValue:[NSString stringWithUTF8String: p_playlist->pp_items[i_item]->psz_uri]];
[o_title_txt setStringValue:[NSString stringWithUTF8String: p_playlist->pp_items[i_item]->psz_name]];
[o_author_txt setStringValue:[NSString stringWithUTF8String: playlist_GetInfo(p_playlist, i_item ,_("General"),_("Author") )]];
vlc_object_release ( p_playlist );
}
[o_info_window makeKeyAndOrderFront: sender];
}
}
- (IBAction)infoCancel:(id)sender
{
[self togglePlaylistInfoPanel:self];
}
- (IBAction)infoOk:(id)sender
{
int i_item = [o_table_view selectedRow];
intf_thread_t * p_intf = [NSApp getIntf];
playlist_t * p_playlist = vlc_object_find( p_intf, VLC_OBJECT_PLAYLIST,
FIND_ANYWHERE );
if (p_playlist)
{
vlc_mutex_lock(&p_playlist->pp_items[i_item]->lock);
p_playlist->pp_items[i_item]->psz_uri = strdup([[o_uri_txt stringValue] cString]);
p_playlist->pp_items[i_item]->psz_name = strdup([[o_title_txt stringValue] cString]);
playlist_ItemAddInfo(p_playlist->pp_items[i_item],_("General"),_("Author"), [[o_author_txt stringValue] cString]);
vlc_mutex_unlock(&p_playlist->pp_items[i_item]->lock);
vlc_object_release ( p_playlist );
}
[self togglePlaylistInfoPanel:self];
[self playlistUpdated];
}
@end
......
......@@ -2,7 +2,7 @@
* vout.m: MacOS X video output module
*****************************************************************************
* Copyright (C) 2001-2003 VideoLAN
* $Id: vout.m,v 1.87 2004/03/04 22:52:43 bigben Exp $
* $Id$
*
* Authors: Colin Delacroix <colin@zoy.org>
* Florian G. Pflug <fgp@phlo.org>
......@@ -1574,9 +1574,6 @@ static void QTFreePicture( vout_thread_t *p_vout, picture_t *p_pic )
- (void) exitFullScreen
{
vlc_value_t val;
intf_thread_t * p_intf;
/* Free current OpenGL context */
[NSOpenGLContext clearCurrentContext];
[fullScreenContext clearDrawable];
......
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