]> git.sesse.net Git - vlc/commitdiff
* get rid of useless code (group doesn't exist anymore)
authorBenjamin Pracht <bigben@videolan.org>
Sat, 11 Dec 2004 22:09:11 +0000 (22:09 +0000)
committerBenjamin Pracht <bigben@videolan.org>
Sat, 11 Dec 2004 22:09:11 +0000 (22:09 +0000)
* delete everything related to groups from the item info panel
* some preparation work to reimplement the conextual menu

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/playlistinfo.h
modules/gui/macosx/playlistinfo.m

index 86bf1bda4185eceac1533d88d75554c95a670617..3929cf97963020b02de586a251bf077ab25a7676 100644 (file)
@@ -19,7 +19,6 @@
        <string>364.0</string>
        <key>IBLockedObjects</key>
        <array>
-               <integer>1789</integer>
                <integer>2203</integer>
                <integer>2208</integer>
                <integer>2206</integer>
        </array>
        <key>IBOpenObjects</key>
        <array>
-               <integer>21</integer>
-               <integer>29</integer>
                <integer>2197</integer>
+               <integer>29</integer>
+               <integer>1789</integer>
+               <integer>21</integer>
        </array>
        <key>IBSystem Version</key>
        <string>7R28</string>
index 24cb3f8c9d58372cc973c7a57866dbadbf0b464d..34bb3b412e91c2d08487a64583af891b62051ee4 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 4926c651387f5f5e8ca3827a62f96f9aad61f9c1..f1438ebbd651d8f436ff661fa487583a9084048f 100644 (file)
     IBOutlet id o_random_ckb;
     IBOutlet id o_loop_popup;
     IBOutlet id o_mi_save_playlist;
+    IBOutlet id o_ctx_menu;
+
+    IBOutlet id o_mi_play;
+    IBOutlet id o_mi_delete;
+    IBOutlet id o_mi_info;
+    IBOutlet id o_mi_selectall;
 
     NSImage *o_descendingSortingImage;
     NSImage *o_ascendingSortingImage;
index c3ba6dc528563295ab4a040fabdd1628f573d611..7bafe1f38ae1ba2e4fe1dd337d6705a262174b19 100644 (file)
@@ -577,45 +577,26 @@ belongs to an Apple hidden private API, and then can "disapear" at any time*/
 
 }
 
-#if 0
 - (NSMenu *)menuForEvent:(NSEvent *)o_event
 {
-    intf_thread_t * p_intf = VLCIntf;
-    playlist_t * p_playlist = vlc_object_find( p_intf, VLC_OBJECT_PLAYLIST,
-                                            FIND_ANYWHERE );
-
-    bool b_itemstate = FALSE;
-
     NSPoint pt;
     vlc_bool_t b_rows;
     vlc_bool_t b_item_sel;
 
-    pt = [o_table_view convertPoint: [o_event locationInWindow]
+    pt = [o_outline_view convertPoint: [o_event locationInWindow]
                                                  fromView: nil];
-    b_item_sel = ( [o_table_view rowAtPoint: pt] != -1 &&
-                   [o_table_view selectedRow] != -1 );
-    b_rows = [o_table_view numberOfRows] != 0;
+    b_item_sel = ( [o_outline_view rowAtPoint: pt] != -1 &&
+                   [o_outline_view selectedRow] != -1 );
+    b_rows = [o_outline_view numberOfRows] != 0;
 
     [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];
-    [o_mi_toggleItemsEnabled setEnabled: b_item_sel];
-    [o_mi_enableGroup setEnabled: b_item_sel];
-    [o_mi_disableGroup setEnabled: b_item_sel];
-
-    if (p_playlist)
-    {
-        b_itemstate = ([o_table_view selectedRow] > -1) ?
-            p_playlist->pp_items[[o_table_view selectedRow]]->b_enabled : FALSE;
-        vlc_object_release(p_playlist);
-    }
-
-    [o_mi_toggleItemsEnabled setState: b_itemstate];
 
     return( o_ctx_menu );
 }
-#endif
+
 - (void)initDict
 {
     [o_outline_dict removeAllObjects];
index 2e2a133069983754b9e0392f471570fa560c23a6..b96cbf41746a9d96366c82a7cc915e92a9b20f51 100644 (file)
@@ -40,9 +40,6 @@
     IBOutlet id o_btn_delete_group;
     IBOutlet id o_btn_add_group;
     IBOutlet id o_outline_view;
-    IBOutlet id o_group_lbl;
-    IBOutlet id o_group_cbx;
-    IBOutlet id o_group_color;
 
     int i_item;
     NSMutableArray * o_selected;
 - (void)initPanel:(id)sender;
 - (IBAction)infoCancel:(id)sender;
 - (IBAction)infoOk:(id)sender;
-- (IBAction)handleGroup:(id)sender;
-- (IBAction)deleteOutlineGroup:(id)sender;
-- (IBAction)createOutlineGroup:(id)sender;
-- (void)createComboBox;
 - (int)getItem;
 
 @end
index cf7cfac3e203e2d1a80ad432e56d6449c498e757..1dbade792449ab0b4abc8ea0e7ce496f6eeac599 100644 (file)
@@ -63,9 +63,6 @@
     [o_author_lbl setStringValue: _NS("Author")];
     [o_btn_ok setTitle: _NS("OK")];
     [o_btn_cancel setTitle: _NS("Cancel")];
-    [o_btn_delete_group setTitle: _NS("Delete Group")];
-    [o_btn_add_group setTitle: _NS("Add Group")];
-    [o_group_lbl setStringValue: _NS("Group")];
 }
 
 - (IBAction)togglePlaylistInfoPanel:(id)sender
         [[VLCInfoTreeItem rootItem] refresh];
         [o_outline_view reloadData];
 
-        [self createComboBox];
-        [self handleGroup:self];
-
         vlc_object_release( p_playlist );
     }
     [o_info_window makeKeyAndOrderFront: sender];
 
 - (IBAction)infoOk:(id)sender
 {
-    int i,i_row,c;
+    int c;
     intf_thread_t * p_intf = VLCIntf;
     playlist_t * p_playlist = vlc_object_find( p_intf, VLC_OBJECT_PLAYLIST,
                                           FIND_ANYWHERE );
     vlc_value_t val;
-    NSNumber * o_number;
-
 
     if (p_playlist)
     {
         playlist_ItemAddInfo(p_playlist->pp_items[i_item],_("General"),_("Author"), [[o_author_txt stringValue] cString]);
 
         c = (int)[o_selected count];
-#if 0
-        if ([[o_group_cbx stringValue] isEqual:
-                    [o_group_cbx objectValueOfSelectedItem]])
-        {
-            for (i = 0 ; i < c ; i++)
-            {
-                o_number = [o_selected lastObject];
-                i_row = [o_number intValue];
-                p_playlist->pp_items[i_row]->i_group = p_playlist->
-                    pp_groups[[o_group_cbx indexOfSelectedItem]]->i_id;
-                [o_selected removeObject: o_number];
-            }
-        }
-        else
-        {
-            playlist_group_t * p_group = playlist_CreateGroup( p_playlist,
-                strdup([[o_group_cbx stringValue] cString]));
-            if (p_group)
-            {
-                for (i = 0 ; i < c ; i++)
-                {
-                    o_number = [o_selected lastObject];
-                    i_row = [o_number intValue];
-                    p_playlist->pp_items[i_row]->i_group = p_group->i_id;
-                    [o_selected removeObject: o_number];
-                }
-            }
-        }
-
-#endif
         vlc_mutex_unlock(&p_playlist->pp_items[i_item]->input.lock);
         val.b_bool = VLC_TRUE;
         var_Set( p_playlist,"intf-change",val );
     [o_info_window orderOut: self];
 }
 
-- (IBAction)handleGroup:(id)sender
-{
-#if 0
-    intf_thread_t * p_intf = VLCIntf;
-    playlist_t * p_playlist = vlc_object_find( p_intf, VLC_OBJECT_PLAYLIST,
-                                          FIND_ANYWHERE );
-
-    if (p_playlist)
-    {
-        if ([[o_group_cbx stringValue] isEqual:
-                    [o_group_cbx objectValueOfSelectedItem]])
-        {
-            [o_group_color setBackgroundColor:[[[VLCMain sharedInstance] getPlaylist]
-                getColor: p_playlist->pp_groups[
-                [o_group_cbx indexOfSelectedItem]]->i_id]];
-        }
-        else
-        {
-            [o_group_color setBackgroundColor:[[[VLCMain sharedInstance] getPlaylist]
-                getColor:p_playlist->pp_groups[
-                [o_group_cbx numberOfItems] - 1]->i_id + 1]];
-        }
-    vlc_object_release(p_playlist);
-    }
-#endif
-}
-
-- (IBAction)deleteOutlineGroup:(id)sender
-{
-#if 0
-    intf_thread_t * p_intf = VLCIntf;
-    playlist_t * p_playlist = vlc_object_find( p_intf, VLC_OBJECT_PLAYLIST,
-                                          FIND_ANYWHERE );
-
-    if(p_playlist)
-    {
-        if ([[o_group_cbx stringValue] isEqual:
-                    [o_group_cbx objectValueOfSelectedItem]])
-        {
-            [[[VLCMain sharedInstance] getPlaylist] deleteGroup:p_playlist->pp_groups[
-                    [o_group_cbx indexOfSelectedItem]]->i_id];
-            [self createComboBox];
-            [self handleGroup:self];
-            [o_group_cbx reloadData];
-        }
-        else
-        {
-            msg_Warn(p_playlist,"Group doesn't exist, cannot delete");
-        }
-    vlc_object_release(p_playlist);
-    }
-#endif
-}
-
-- (IBAction)createOutlineGroup:(id)sender;
-{
-#if 0
-    intf_thread_t * p_intf = VLCIntf;
-    playlist_t * p_playlist = vlc_object_find( p_intf, VLC_OBJECT_PLAYLIST,
-                                          FIND_ANYWHERE );
-    if(p_playlist)
-    {
-        playlist_CreateGroup( p_playlist,
-                    strdup([[o_group_cbx stringValue] cString]));
-        [self createComboBox];
-        [o_group_cbx reloadData];
-        [[[VLCMain sharedInstance] getPlaylist] playlistUpdated];
-        vlc_object_release(p_playlist);
-    }
-#endif
-}
-
--(void)createComboBox
-{
-#if 0
-    intf_thread_t * p_intf = VLCIntf;
-    playlist_t * p_playlist = vlc_object_find( p_intf, VLC_OBJECT_PLAYLIST,
-                                          FIND_ANYWHERE );
-    int i;
-
-    [o_group_cbx removeAllItems];
-
-    if (p_playlist)
-    {
-        for (i = 0; i < p_playlist->i_groups ; i++)
-        {
-            [o_group_cbx addItemWithObjectValue:
-                [NSString stringWithUTF8String:
-                p_playlist->pp_groups[i]->psz_name]];
-            if (p_playlist->pp_items[i_item]->i_group == p_playlist
-                ->pp_groups[i]->i_id)
-            {
-                [o_group_cbx selectItemAtIndex:i];
-            }
-        }
-    vlc_object_release(p_playlist);
-    }
-#endif
-}
-
 - (int)getItem
 {
     return i_item;