Skip to content

Commit

Permalink
sd: remove generic "longname" parameter
Browse files Browse the repository at this point in the history
This removes the longname parameter from the SD configuration chain
generated while probing SD.
  • Loading branch information
Rémi Denis-Courmont committed Nov 15, 2016
1 parent 747a446 commit 756a884
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 17 deletions.
3 changes: 1 addition & 2 deletions include/vlc_services_discovery.h
Original file line number Diff line number Diff line change
Expand Up @@ -193,8 +193,7 @@ VLC_API int vlc_sd_probe_Add(vlc_probe_t *, const char *, const char *, int cate
#define VLC_SD_PROBE_HELPER(name, longname, cat) \
static int vlc_sd_probe_Open (vlc_object_t *obj) \
{ \
return vlc_sd_probe_Add ((struct vlc_probe_t *)obj, \
name "{longname=\"" longname "\"}", \
return vlc_sd_probe_Add ((struct vlc_probe_t *)obj, name, \
longname, cat); \
}

Expand Down
4 changes: 2 additions & 2 deletions modules/gui/macosx/VLCMainWindow.m
Original file line number Diff line number Diff line change
Expand Up @@ -1169,7 +1169,7 @@ - (void)sourceListSelectionDidChange:(NSNotification *)notification
}

// Note the order: first hide the podcast controls, then show the drop zone
if ([[item identifier] isEqualToString:@"podcast{longname=\"Podcasts\"}"])
if ([[item identifier] isEqualToString:@"podcast"])
[self showPodcastControls];
else
[self hidePodcastControls];
Expand Down Expand Up @@ -1314,7 +1314,7 @@ - (IBAction)removePodcastWindowAction:(id)sender
free(psz_urls);

/* update playlist table */
if (playlist_IsServicesDiscoveryLoaded(p_playlist, "podcast{longname=\"Podcasts\"}")) {
if (playlist_IsServicesDiscoveryLoaded(p_playlist, "podcast")) {
[[[VLCMain sharedInstance] playlist] playlistUpdated];
}
}
Expand Down
10 changes: 4 additions & 6 deletions modules/services_discovery/mediadirs.c
Original file line number Diff line number Diff line change
Expand Up @@ -351,11 +351,9 @@ static int vlc_sd_probe_Open( vlc_object_t *obj )
{
vlc_probe_t *probe = (vlc_probe_t *)obj;

vlc_sd_probe_Add( probe, "video_dir{longname=\"My Videos\"}",
N_("My Videos"), SD_CAT_MYCOMPUTER );
vlc_sd_probe_Add( probe, "audio_dir{longname=\"My Music\"}",
N_("My Music"), SD_CAT_MYCOMPUTER );
vlc_sd_probe_Add( probe, "picture_dir{longname=\"My Pictures\"}",
N_("My Pictures"), SD_CAT_MYCOMPUTER );
vlc_sd_probe_Add( probe, "video_dir", N_("My Videos"), SD_CAT_MYCOMPUTER );
vlc_sd_probe_Add( probe, "audio_dir", N_("My Music"), SD_CAT_MYCOMPUTER );
vlc_sd_probe_Add( probe, "picture_dir", N_("My Pictures"),
SD_CAT_MYCOMPUTER );
return VLC_PROBE_CONTINUE;
}
10 changes: 4 additions & 6 deletions modules/services_discovery/udev.c
Original file line number Diff line number Diff line change
Expand Up @@ -94,15 +94,13 @@ static int vlc_sd_probe_Open (vlc_object_t *obj)
struct udev_monitor *mon = udev_monitor_new_from_netlink (udev, "udev");
if (mon != NULL)
{
vlc_sd_probe_Add (probe, "v4l{longname=\"Video capture\"}",
N_("Video capture"), SD_CAT_DEVICES);
vlc_sd_probe_Add (probe, "v4l", N_("Video capture"), SD_CAT_DEVICES);
#ifdef HAVE_ALSA
if (!module_exists ("pulselist"))
vlc_sd_probe_Add (probe, "alsa{longname=\"Audio capture\"}",
N_("Audio capture"), SD_CAT_DEVICES);
vlc_sd_probe_Add (probe, "alsa", N_("Audio capture"),
SD_CAT_DEVICES);
#endif
vlc_sd_probe_Add (probe, "disc{longname=\"Discs\"}", N_("Discs"),
SD_CAT_DEVICES);
vlc_sd_probe_Add (probe, "disc", N_("Discs"), SD_CAT_DEVICES);
udev_monitor_unref (mon);
}
udev_unref (udev);
Expand Down
2 changes: 1 addition & 1 deletion modules/services_discovery/xcb_apps.c
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ static int vlc_sd_probe_Open (vlc_object_t *obj)
if (xcb_connection_has_error (conn))
return VLC_PROBE_CONTINUE;
xcb_disconnect (conn);
return vlc_sd_probe_Add (probe, "xcb_apps{longname=\"Screen capture\"}",
return vlc_sd_probe_Add (probe, "xcb_apps",
N_("Screen capture"), SD_CAT_DEVICES);
}

Expand Down

0 comments on commit 756a884

Please sign in to comment.