]> git.sesse.net Git - vlc/commitdiff
- *.nib, playlist.*
authorBenjamin Pracht <bigben@videolan.org>
Mon, 8 Mar 2004 15:22:58 +0000 (15:22 +0000)
committerBenjamin Pracht <bigben@videolan.org>
Mon, 8 Mar 2004 15:22:58 +0000 (15:22 +0000)
begining of playlist item propieties box (only modification of uro, name and autt
hor at this time)

- vout.m : remove an unused variable

extras/MacOSX/Resources/English.lproj/MainMenu.nib/classes.nib
extras/MacOSX/Resources/English.lproj/MainMenu.nib/info.nib
extras/MacOSX/Resources/English.lproj/MainMenu.nib/objects.nib
modules/gui/macosx/playlist.h
modules/gui/macosx/playlist.m
modules/gui/macosx/vout.m

index 65f17e6527d6563e139262381c989b8b2d60ecdd..038df09213a391e4367155486e18152ab478f3c9 100644 (file)
             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; 
         }
     ); 
     IBVersion = 1; 
-}
+}
\ No newline at end of file
index 266cca191f2f896bf021bee78908d28c551e16f0..c613eb8263b25bf1a4ece3bd7a02536615028c63 100644 (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>
index e9eb0d334f48a3d9f7384673b43d052f28e03abc..680cf80c1a872c3ffff2292baab4da7b6d7e3bf9 100644 (file)
Binary files a/extras/MacOSX/Resources/English.lproj/MainMenu.nib/objects.nib and b/extras/MacOSX/Resources/English.lproj/MainMenu.nib/objects.nib differ
index 5195b047cfbaabc2044e07e4b5a991ce3d37f5ae..6c688f31ef0b66e3713be2b780cfb616bc399cd8 100644 (file)
@@ -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;
 
     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;
 - (void)updateRowSelection;
 - (void)playlistUpdated;
 
+/*For playlist info window*/
+
+- (IBAction)togglePlaylistInfoPanel:(id)sender;
+- (IBAction)infoCancel:(id)sender;
+- (IBAction)infoOk:(id)sender;
+
 @end
index 3777360168bf6af19fe2423edca546db84e4aef4..d60a0be6e23c27cf4a0aebf21741dd9dbd853854 100644 (file)
@@ -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>
         [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
 
index 920214137f2dfa7e837b6a9dc36e837e469f6f37..12208fdc5bb641cdc2ce57b08d9fea047bb8eef3 100644 (file)
@@ -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];