]> git.sesse.net Git - vlc/commitdiff
Make the playlist info window a new object
authorBenjamin Pracht <bigben@videolan.org>
Mon, 15 Mar 2004 19:33:18 +0000 (19:33 +0000)
committerBenjamin Pracht <bigben@videolan.org>
Mon, 15 Mar 2004 19:33:18 +0000 (19:33 +0000)
29 files changed:
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/Modules.am
modules/gui/macosx/about.h
modules/gui/macosx/about.m
modules/gui/macosx/applescript.h
modules/gui/macosx/applescript.m
modules/gui/macosx/controls.h
modules/gui/macosx/controls.m
modules/gui/macosx/info.h
modules/gui/macosx/info.m
modules/gui/macosx/intf.h
modules/gui/macosx/intf.m
modules/gui/macosx/macosx.m
modules/gui/macosx/misc.h
modules/gui/macosx/misc.m
modules/gui/macosx/open.h
modules/gui/macosx/open.m
modules/gui/macosx/output.h
modules/gui/macosx/output.m
modules/gui/macosx/playlist.h
modules/gui/macosx/playlist.m
modules/gui/macosx/prefs.h
modules/gui/macosx/prefs.m
modules/gui/macosx/prefs_widgets.h
modules/gui/macosx/prefs_widgets.m
modules/gui/macosx/vout.h
modules/gui/wxwindows/wxwindows.cpp

index 038df09213a391e4367155486e18152ab478f3c9..8c1f8170e5582a1b9705383361eaa64201f09fea 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_tc_duration" = id; 
                 "o_tc_id" = id; 
                 "o_tc_name" = id; 
+                "o_window" = id; 
+            }; 
+            SUPERCLASS = NSObject; 
+        }, 
+        {
+            ACTIONS = {infoCancel = id; infoOk = id; togglePlaylistInfoPanel = id; }; 
+            CLASS = VLCPlaylistInfo; 
+            LANGUAGE = ObjC; 
+            OUTLETS = {
+                "o_author_lbl" = id; 
+                "o_author_txt" = id; 
+                "o_btn_cancel" = id; 
+                "o_btn_ok" = id; 
+                "o_info_window" = id; 
                 "o_title_lbl" = id; 
                 "o_title_txt" = id; 
                 "o_uri_lbl" = id; 
                 "o_uri_txt" = id; 
-                "o_window" = id; 
+                "o_vlc_playlist" = id; 
             }; 
             SUPERCLASS = NSObject; 
         }, 
index c613eb8263b25bf1a4ece3bd7a02536615028c63..e7fc769ec563df40fa846aa21fe8009812109114 100644 (file)
@@ -3,7 +3,7 @@
 <plist version="1.0">
 <dict>
        <key>IBDocumentLocation</key>
-       <string>83 64 505 541 0 0 1024 746 </string>
+       <string>561 168 505 541 0 0 1024 746 </string>
        <key>IBEditorPositions</key>
        <dict>
                <key>1617</key>
@@ -19,7 +19,9 @@
        <array/>
        <key>IBOpenObjects</key>
        <array>
+               <integer>1530</integer>
                <integer>21</integer>
+               <integer>915</integer>
        </array>
        <key>IBSystem Version</key>
        <string>7D24</string>
index 680cf80c1a872c3ffff2292baab4da7b6d7e3bf9..a0d57594319264c040a1ca667ae395540ee18d0a 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 79b6b06174c957b2f0a27415e180c09340e90f0c..af54873621cc22ee2d55f8d73b94df515e50c41d 100644 (file)
@@ -16,6 +16,8 @@ SOURCES_macosx = \
        open.h \
        playlist.m \
        playlist.h \
+       playlistinfo.h \
+       playlistinfo.m \
        prefs.m \
        prefs.h \
        prefs_widgets.h \
index afeacb720c9084dca10d4a63ea2cd867a479c802..d6ce84bdf902259aebfa2722a04fae1663aa90b5 100644 (file)
@@ -2,7 +2,7 @@
  * about.h: MacOS X About Panel
  *****************************************************************************
  * Copyright (C) 2001-2003 VideoLAN
- * $Id: about.h,v 1.2 2003/05/11 23:17:30 hartman Exp $
+ * $Id$
  *
  * Authors: Derk-Jan Hartman <thedj@users.sourceforge.net>
  * 
index cf3af32fcbe12c6ba5ccbf7640ebd7f6328376b3..d9983c0e06eecc2d58b6ddbce31c9b7f00efe94a 100644 (file)
@@ -2,7 +2,7 @@
  * about.m: MacOS X About Panel
  *****************************************************************************
  * Copyright (C) 2001-2003 VideoLAN
- * $Id: about.m,v 1.3 2003/09/20 19:37:53 hartman Exp $
+ * $Id$
  *
  * Authors: Derk-Jan Hartman <thedj@users.sourceforge.net>
  *
index 50dcf7e767ff608b7327f54c20b970b0849e87c5..c83e8c6b843ddfe4b78ff0527da717ef9f46111c 100644 (file)
@@ -2,7 +2,7 @@
  * applescript.h: MacOS X AppleScript support
  *****************************************************************************
  * Copyright (C) 2002-2003 VideoLAN
- * $Id: applescript.h,v 1.1 2003/03/06 11:43:07 hartman Exp $
+ * $Id$
  *
  * Authors: Derk-Jan Hartman <thedj@users.sourceforge.net>
  *
index 94f3651631dea42de6aecd9538d0763cd6d07258..9cfd31f161bdc23e7d64efcae81c8dff51695003 100644 (file)
@@ -2,7 +2,7 @@
  * applescript.m: MacOS X AppleScript support
  *****************************************************************************
  * Copyright (C) 2002-2003 VideoLAN
- * $Id: applescript.m,v 1.6 2004/01/20 15:34:43 hartman Exp $
+ * $Id$
  *
  * Authors: Derk-Jan Hartman <thedj@users.sourceforge.net>
  *
index 750f834590abd29a7a460754acc377cb547bcebd..aea4624d7c9e0aa69c520bd88d8d846f05b29e0b 100644 (file)
@@ -2,7 +2,7 @@
  * controls.h: MacOS X interface module
  *****************************************************************************
  * Copyright (C) 2002-2003 VideoLAN
- * $Id: controls.h,v 1.9 2004/01/25 17:01:57 murray Exp $
+ * $Id$
  *
  * Authors: Jon Lech Johansen <jon-vl@nanocrew.net>
  *          Christophe Massiot <massiot@via.ecp.fr>
index 257fd896d68714108ea8e602edfba08028d2fbee..6ab7a8fc9d45d490dbbd0770941af6524ed3fc6a 100644 (file)
@@ -2,7 +2,7 @@
  * controls.m: MacOS X interface module
  *****************************************************************************
  * Copyright (C) 2002-2003 VideoLAN
- * $Id: controls.m,v 1.62 2004/03/03 11:34:19 bigben Exp $
+ * $Id$
  *
  * Authors: Jon Lech Johansen <jon-vl@nanocrew.net>
  *          Christophe Massiot <massiot@via.ecp.fr>
index 8e9aa52dc1f114f081887105349cd5b1a5d6de08..3b8a3d5b9204faa44dda1744e64a17d60888294d 100644 (file)
@@ -2,7 +2,7 @@
  * info.h: MacOS X info panel
  *****************************************************************************
  * Copyright (C) 2003 VideoLAN
- * $Id: info.h,v 1.2 2003/02/23 05:53:53 jlj Exp $
+ * $Id$
  *
  * Authors: Derk-Jan Hartman <thedj@users.sourceforge.net>
  *
index 5ce07bbf82eb18c46e70eac6e0225bb2d404bebd..4ab2823c16ced8a2657c6bbd15866b1e0e4183b7 100644 (file)
@@ -2,7 +2,7 @@
  * info.m: MacOS X info panel
  *****************************************************************************
  * Copyright (C) 2003 VideoLAN
- * $Id: info.m,v 1.9 2004/01/09 22:11:04 hartman Exp $
+ * $Id$
  *
  * Authors: Derk-Jan Hartman <hartman at videolan dot org>
  *
index e591bb76b20bf1e7db7c625eead69571d9b242a7..184203b7f8c829bf312ce3f453a521767a8d4415 100644 (file)
@@ -2,7 +2,7 @@
  * intf.h: MacOS X interface module
  *****************************************************************************
  * Copyright (C) 2002-2004 VideoLAN
- * $Id: intf.h,v 1.56 2004/01/25 17:01:57 murray Exp $
+ * $Id$
  *
  * Authors: Jon Lech Johansen <jon-vl@nanocrew.net>
  *          Christophe Massiot <massiot@via.ecp.fr>
index 103619e9c5535a4c34c3244478208f745ae1df43..6ebab401fced22c09e3efd04319af85bca9936fe 100644 (file)
@@ -2,7 +2,7 @@
  * intf.m: MacOS X interface module
  *****************************************************************************
  * Copyright (C) 2002-2004 VideoLAN
- * $Id: intf.m,v 1.115 2004/01/30 12:44:21 hartman Exp $
+ * $Id$
  *
  * Authors: Jon Lech Johansen <jon-vl@nanocrew.net>
  *          Christophe Massiot <massiot@via.ecp.fr>
index e31113f1e99542c8ed55d9695ed1abf03dfb8ad4..f424fb1fee340587bc566af484b715e29c13d7f8 100644 (file)
@@ -2,7 +2,7 @@
  * macosx.m: MacOS X module for vlc
  *****************************************************************************
  * Copyright (C) 2001-2003 VideoLAN
- * $Id: macosx.m,v 1.24 2004/03/03 12:01:57 titer Exp $
+ * $Id$
  *
  * Authors: Colin Delacroix <colin@zoy.org>
  *          Eugenio Jarosiewicz <ej0@cise.ufl.edu>
index 24fecc0cabc9168498f82396705f91727d8742f4..11c8c876d5ff9eec58e4dec364b7a8f609f6c31a 100644 (file)
@@ -2,7 +2,7 @@
  * misc.h: code not specific to vlc
  *****************************************************************************
  * Copyright (C) 2003 VideoLAN
- * $Id: misc.h,v 1.3 2003/11/15 22:42:16 hartman Exp $
+ * $Id$
  *
  * Authors: Jon Lech Johansen <jon-vl@nanocrew.net>
  *
index 21eaa7e72d78fdfbbbec051e10a4bbbd5bedfc28..1eaec9463cbc1fa1531cdfb6f95777950b68515c 100644 (file)
@@ -2,7 +2,7 @@
  * misc.m: code not specific to vlc
  *****************************************************************************
  * Copyright (C) 2003 VideoLAN
- * $Id: misc.m,v 1.3 2003/11/15 22:42:16 hartman Exp $
+ * $Id$
  *
  * Authors: Jon Lech Johansen <jon-vl@nanocrew.net>
  *
index 961573ca68f584c80b423f8852662cd990906b20..16ad025b5e93e08803a9a5d912be8e63ca67c816 100644 (file)
@@ -2,7 +2,7 @@
  * open.h: MacOS X module for vlc
  *****************************************************************************
  * Copyright (C) 2002-2003 VideoLAN
- * $Id: open.h,v 1.17 2004/01/25 17:01:57 murray Exp $
+ * $Id$
  *
  * Authors: Jon Lech Johansen <jon-vl@nanocrew.net>
  *          Christophe Massiot <massiot@via.ecp.fr>
index 368adcb41b114209b3c317fd28b08b6901a7ee25..0f393197e956b04e2cab5926deb4c577ed0b96aa 100644 (file)
@@ -2,7 +2,7 @@
  * open.m: MacOS X module for vlc
  *****************************************************************************
  * Copyright (C) 2002-2003 VideoLAN
- * $Id: open.m,v 1.43 2004/01/27 22:19:04 bigben Exp $
+ * $Id$
  *
  * Authors: Jon Lech Johansen <jon-vl@nanocrew.net> 
  *          Christophe Massiot <massiot@via.ecp.fr>
index 2f35645b030be58d97820f35f88dd57cab95830f..357e47313b8abe8d09214e72e4c1bae884e12eb2 100644 (file)
@@ -2,7 +2,7 @@
  * output.h: MacOS X Output Dialog
  *****************************************************************************
  * Copyright (C) 2002-2003 VideoLAN
- * $Id: output.h,v 1.4 2003/11/06 18:35:19 hartman Exp $
+ * $Id$
  *
  * Authors: Jon Lech Johansen <jon-vl@nanocrew.net>
  *          Christophe Massiot <massiot@via.ecp.fr>
index de00078e9d7ba81f3c7bea7ea2df6b4a33d8260d..4999c5c526cb592baa05391461ab4112d8324655 100644 (file)
@@ -2,7 +2,7 @@
  * output.m: MacOS X Output Dialog
  *****************************************************************************
  * Copyright (C) 2002-2003 VideoLAN
- * $Id: output.m,v 1.18 2004/01/25 17:01:57 murray Exp $
+ * $Id$
  *
  * Authors: Jon Lech Johansen <jon-vl@nanocrew.net> 
  *          Christophe Massiot <massiot@via.ecp.fr>
index 6c688f31ef0b66e3713be2b780cfb616bc399cd8..a4b911cd3effbe5eb75f5db3492b42ee7b57c5ed 100644 (file)
@@ -75,6 +75,7 @@
     IBOutlet id o_author_txt; 
     IBOutlet id o_btn_info_ok;
     IBOutlet id o_btn_info_cancel;
+    IBOutlet id o_tbv_info;
 
     NSImage *o_descendingSortingImage;
     NSImage *o_ascendingSortingImage;
@@ -98,8 +99,7 @@
 
 /*For playlist info window*/
 
-- (IBAction)togglePlaylistInfoPanel:(id)sender;
-- (IBAction)infoCancel:(id)sender;
-- (IBAction)infoOk:(id)sender;
+- (int)selectedPlaylistItem;
 
 @end
+
index d60a0be6e23c27cf4a0aebf21741dd9dbd853854..a49ac72961fa2f18963d5b194bb9f40e12cacb44 100644 (file)
         [NSArray arrayWithObjects: NSFilenamesPboardType, nil]];
     [o_table_view setIntercellSpacing: NSMakeSize (0.0, 1.0)];
     [o_window setExcludedFromWindowsMenu: TRUE];
-    [o_info_window setExcludedFromWindowsMenu: TRUE];
+
+//    [o_tbv_info setDataSource: [VLCInfoDataSource init]];
+
 /* We need to check whether _defaultTableHeaderSortImage exists, since it 
 belongs to an Apple hidden private API, and then can "disapear" at any time*/
 
@@ -170,6 +172,7 @@ belongs to an Apple hidden private API, and then can "disapear" at any time*/
     [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")];
@@ -179,13 +182,6 @@ 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
@@ -205,7 +201,7 @@ belongs to an Apple hidden private API, and then can "disapear" at any time*/
     }
 
     if( o_tc_sortColumn == o_tc )
-    { 
+    {
         b_isSortDescending = !b_isSortDescending;
     }
     else if( o_tc == o_tc_name || o_tc == o_tc_author || 
@@ -620,60 +616,11 @@ 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
+- (int)selectedPlaylistItem
 {
-    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];
-    }
+    return [o_table_view selectedRow];
 }
 
-- (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
 
 @implementation VLCPlaylist (NSTableDataSource)
@@ -906,3 +853,4 @@ vlc_object_release( p_playlist );
 
 @end
 
+
index 8294e418457d172165ba22d96413d34e09a9fa84..2f710a145d785aecda69db4603d58103a6029260 100644 (file)
@@ -2,7 +2,7 @@
  * prefs.h: MacOS X module for vlc
  *****************************************************************************
  * Copyright (C) 2002-2003 VideoLAN
- * $Id: prefs.h,v 1.15 2004/02/19 19:38:58 hartman Exp $
+ * $Id$
  *
  * Authors: Jon Lech Johansen <jon-vl@nanocrew.net> 
  *
index 542e115d6b35906941babdb95eac4c706cbc38d0..a6c53b1f68637187a417faba303cff68e7dc8e94 100644 (file)
@@ -2,7 +2,7 @@
  * prefs.m: MacOS X module for vlc
  *****************************************************************************
  * Copyright (C) 2002-2004 VideoLAN
- * $Id: prefs.m,v 1.41 2004/02/19 19:38:58 hartman Exp $
+ * $Id$
  *
  * Authors: Jon Lech Johansen <jon-vl@nanocrew.net>
  *          Derk-Jan Hartman <hartman at videolan dot org>
index 71c3ea6ba6783f21d3a55ee849598cca11d7aee5..725b069d7b0b2a0d98d827b55a2e3167df2d5ba0 100644 (file)
@@ -2,7 +2,7 @@
  * prefs_widgets.h: Preferences controls
  *****************************************************************************
  * Copyright (C) 2002-2003 VideoLAN
- * $Id: prefs_widgets.h,v 1.1 2003/11/17 06:31:22 hartman Exp $
+ * $Id$
  *
  * Authors: Derk-Jan Hartman <hartman at videolan.org> 
  *
index 36685bee2ba93ceb2f96716316d16c9692716a4b..1368269a1a1ba34651280363b22d5676337caae8 100644 (file)
@@ -2,7 +2,7 @@
  * prefs_widgets.m: Preferences controls
  *****************************************************************************
  * Copyright (C) 2002-2003 VideoLAN
- * $Id: prefs_widgets.m,v 1.1 2003/11/17 06:31:22 hartman Exp $
+ * $Id$
  *
  * Authors: Derk-Jan Hartman <hartman at videolan.org> 
  *
index 90cec55304f092df958e732b23aca38a3baafa79..8d102591960672edb30e989e2803e495b34a86a5 100644 (file)
@@ -2,7 +2,7 @@
  * vout.h: MacOS X interface module
  *****************************************************************************
  * Copyright (C) 2001-2003 VideoLAN
- * $Id: vout.h,v 1.25 2004/02/28 13:53:35 titer Exp $
+ * $Id$
  *
  * Authors: Colin Delacroix <colin@zoy.org>
  *          Florian G. Pflug <fgp@phlo.org>
index 0ef1d12f2c65d5c564ac711539968ebfe0331d29..57c9aef1704b77309ce498bebfd0d671cf98edb5 100644 (file)
@@ -2,7 +2,7 @@
  * wxwindows.cpp : wxWindows plugin for vlc
  *****************************************************************************
  * Copyright (C) 2000-2004 VideoLAN
- * $Id: wxwindows.cpp,v 1.39 2004/02/26 12:04:14 gbazin Exp $
+ * $Id$
  *
  * Authors: Gildas Bazin <gbazin@netcourrier.com>
  *