Commit e6d7a9db authored by Felix Paul Kühne's avatar Felix Paul Kühne

macosx: removed the outdated and dysfunctional service discovery menu items...

macosx: removed the outdated and dysfunctional service discovery menu items from both the playlist and the main menu

(manually cherry-picked from 5e8666c883f3653b6c9a1e1a94515947df17a20a)
parent b74a6a68
...@@ -99,14 +99,6 @@ ...@@ -99,14 +99,6 @@
IBOutlet id o_mi_sort_author; IBOutlet id o_mi_sort_author;
IBOutlet id o_mi_recursive_expand; IBOutlet id o_mi_recursive_expand;
/* "services discovery" menu in the playlist menu */
IBOutlet id o_mi_services;
IBOutlet id o_mu_services;
/* "services discovery" menu in the main menu */
IBOutlet id o_mm_mi_services;
IBOutlet id o_mm_mu_services;
IBOutlet id o_save_accessory_view; IBOutlet id o_save_accessory_view;
IBOutlet id o_save_accessory_popup; IBOutlet id o_save_accessory_popup;
IBOutlet id o_save_accessory_text; IBOutlet id o_save_accessory_text;
......
...@@ -27,8 +27,6 @@ ...@@ -27,8 +27,6 @@
/* TODO /* TODO
* add 'icons' for different types of nodes? (http://www.cocoadev.com/index.pl?IconAndTextInTableCell) * add 'icons' for different types of nodes? (http://www.cocoadev.com/index.pl?IconAndTextInTableCell)
* reimplement enable/disable item * reimplement enable/disable item
* create a new 'tool' button (see the gear button in the Finder window) for 'actions'
(adding service discovery, other views, new node/playlist, save node/playlist) stuff like that
*/ */
...@@ -51,7 +49,6 @@ ...@@ -51,7 +49,6 @@
#import "open.h" #import "open.h"
#include <vlc_keys.h> #include <vlc_keys.h>
#import <vlc_services_discovery.h>
#import <vlc_osd.h> #import <vlc_osd.h>
#import <vlc_interface.h> #import <vlc_interface.h>
...@@ -464,45 +461,6 @@ ...@@ -464,45 +461,6 @@
o_descendingSortingImage = [[NSOutlineView class] _defaultTableHeaderReverseSortImage]; o_descendingSortingImage = [[NSOutlineView class] _defaultTableHeaderReverseSortImage];
o_tc_sortColumn = nil; o_tc_sortColumn = nil;
#if 0
char ** ppsz_name;
char ** ppsz_services = vlc_sd_GetNames( VLCIntf, &ppsz_name, NULL );
if( !ppsz_services )
return;
for( i = 0; ppsz_services[i]; i++ )
{
bool b_enabled;
NSMenuItem *o_lmi;
char * name = ppsz_name[i] ? ppsz_name[i] : ppsz_services[i];
/* Check whether to enable these menuitems */
b_enabled = playlist_IsServicesDiscoveryLoaded( p_playlist, ppsz_services[i] );
/* Create the menu entries used in the playlist menu */
o_lmi = [[o_mi_services submenu] addItemWithTitle:
[NSString stringWithUTF8String: name]
action: @selector(servicesChange:)
keyEquivalent: @""];
[o_lmi setTarget: self];
[o_lmi setRepresentedObject: [NSString stringWithUTF8String: ppsz_services[i]]];
if( b_enabled ) [o_lmi setState: NSOnState];
/* Create the menu entries for the main menu */
o_lmi = [[o_mm_mi_services submenu] addItemWithTitle:
[NSString stringWithUTF8String: name]
action: @selector(servicesChange:)
keyEquivalent: @""];
[o_lmi setTarget: self];
[o_lmi setRepresentedObject: [NSString stringWithUTF8String: ppsz_services[i]]];
if( b_enabled ) [o_lmi setState: NSOnState];
free( ppsz_services[i] );
free( ppsz_name[i] );
}
free( ppsz_services );
free( ppsz_name );
#endif
} }
- (void)searchfieldChanged:(NSNotification *)o_notification - (void)searchfieldChanged:(NSNotification *)o_notification
...@@ -527,8 +485,6 @@ ...@@ -527,8 +485,6 @@
[[o_mm_mi_revealInFinder menu] setAutoenablesItems: NO]; [[o_mm_mi_revealInFinder menu] setAutoenablesItems: NO];
[o_mi_sort_name setTitle: _NS("Sort Node by Name")]; [o_mi_sort_name setTitle: _NS("Sort Node by Name")];
[o_mi_sort_author setTitle: _NS("Sort Node by Author")]; [o_mi_sort_author setTitle: _NS("Sort Node by Author")];
[o_mi_services setTitle: _NS("Services discovery")];
[o_mm_mi_services setTitle: _NS("Services discovery")];
[o_search_field setToolTip: _NS("Search in Playlist")]; [o_search_field setToolTip: _NS("Search in Playlist")];
[o_search_field_other setToolTip: _NS("Search in Playlist")]; [o_search_field_other setToolTip: _NS("Search in Playlist")];
...@@ -933,23 +889,6 @@ ...@@ -933,23 +889,6 @@
[self playlistUpdated]; [self playlistUpdated];
} }
- (IBAction)servicesChange:(id)sender
{
NSMenuItem *o_mi = (NSMenuItem *)sender;
NSString *o_string = [o_mi representedObject];
playlist_t * p_playlist = pl_Get( VLCIntf );
if( !playlist_IsServicesDiscoveryLoaded( p_playlist, [o_string UTF8String] ) )
playlist_ServicesDiscoveryAdd( p_playlist, [o_string UTF8String] );
else
playlist_ServicesDiscoveryRemove( p_playlist, [o_string UTF8String] );
[o_mi setState: playlist_IsServicesDiscoveryLoaded( p_playlist,
[o_string UTF8String] ) ? YES : NO];
[self playlistUpdated];
return;
}
- (IBAction)selectAll:(id)sender - (IBAction)selectAll:(id)sender
{ {
[o_outline_view selectAll: nil]; [o_outline_view selectAll: nil];
......
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