Commit de55fd72 authored by Derk-Jan Hartman's avatar Derk-Jan Hartman

* backported to stable: [15228],[15234],[15239],[15261],[15262],[15264],[15266]-[15271]

[15279],[15289],[15292],[15300]

 * specifically left out sfilters panel in OSX intf.
 * this is the first batch, I don't want to frell my tree and have to start from scratch AGAIN :D
parent 7185fa90
/*
* Created on 28-feb-2006
*
* $Id: VideoIntf.java 8 2006-02-28 12:03:47Z little $
* $Id$
*
* This program is free software; you can redistribute it
* and/or modify it under the terms of the GNU General Public License
......
......@@ -1218,4 +1218,4 @@ DOT_CLEANUP = YES
# The SEARCHENGINE tag specifies whether or not a search engine should be
# used. If set to NO the values of all tags below this one will be ignored.
SEARCHENGINE = NO
SEARCHENGINE = YES
......@@ -797,11 +797,23 @@ difficulty to understand how VLC skins work.</para>
<listitem><para>
<emphasis>dialogs.fileInfo()</emphasis>: Show the "File Info" dialog box.
</para></listitem>
<listitem><para>
<emphasis>dialogs.playlist()</emphasis>: Show the "standard" (not skinned) playlist dialog.
</para></listitem>
<listitem><para>
<emphasis>dialogs.streamingWizard()</emphasis>: Show the "Streaming Wizard" dialog box (new after VLC 0.8.2).
</para></listitem>
<listitem><para>
<emphasis>dialogs.popup()</emphasis>: Show the popup menu, (already available with a right-click on a <link linkend="Image">Image</link> control).
<emphasis>dialogs.popup()</emphasis>: Show the full popup menu, (already available with a right-click on a <link linkend="Image">Image</link> control).
</para></listitem>
<listitem><para>
<emphasis>dialogs.audioPopup()</emphasis>: Show the audio settings popup menu (since VLC 0.8.5).
</para></listitem>
<listitem><para>
<emphasis>dialogs.videoPopup()</emphasis>: Show the video settings popup menu (since VLC 0.8.5).
</para></listitem>
<listitem><para>
<emphasis>dialogs.miscPopup()</emphasis>: Show a popup menu containing playback control and general options (since VLC 0.8.5).
</para></listitem>
<listitem><para>
<emphasis>equalizer.enable()</emphasis>: Enable the equalizer audio filter (since VLC 0.8.5).
......@@ -974,6 +986,9 @@ difficulty to understand how VLC skins work.</para>
<listitem><para>
<emphasis>vlc.hasVout</emphasis>: True if a video is being played (since VLC 0.8.5).
</para></listitem>
<listitem><para>
<emphasis>vlc.hasAudio</emphasis>: True if audio is being played (since VLC 0.8.5).
</para></listitem>
<listitem><para>
<emphasis>vlc.isFullscreen</emphasis>: True when the video is in fullscreen mode (since VLC 0.8.5).
</para></listitem>
......@@ -1005,7 +1020,7 @@ difficulty to understand how VLC skins work.</para>
<emphasis>playlist.isRepeat</emphasis>: True when the current playlist item is being repeated, false otherwise (since VLC 0.8.0).
</para></listitem>
<listitem><para>
<emphasis>dvd.isActive</emphasis>: True when a DVD is currently playing. This variable can be used to display buttons associated to the <link linkend="dvdactions">dvd.* actions</link> only when needed (since VLC 0.8.5).
<emphasis>dvd.isActive</emphasis>: True when a DVD is currently playing. This variable can be used to display buttons associated to the <link linkend="dvdactions">dvd.* actions</link> only when needed (since VLC 0.8.5).
</para></listitem>
<listitem><para>
<emphasis>window_name.isVisible</emphasis>: True when the window whose <link linkend="windowid">id</link> is "window_name" is visible, false otherwise.
......
......@@ -162,6 +162,9 @@ VLC_EXPORT( void, intf_Destroy, ( intf_thread_t * ) );
#define INTF_DIALOG_BOOKMARKS 14
#define INTF_DIALOG_POPUPMENU 20
#define INTF_DIALOG_AUDIOPOPUPMENU 21
#define INTF_DIALOG_VIDEOPOPUPMENU 22
#define INTF_DIALOG_MISCPOPUPMENU 23
#define INTF_DIALOG_FILE_GENERIC 30
#define INTF_DIALOG_INTERACTION 50
......
......@@ -32,6 +32,7 @@
#include "vlc_meta.h"
#include "codecs.h"
#include "charset.h"
#include "libavi.h"
......
......@@ -76,9 +76,13 @@ static VLAboutBox *_o_sharedInstance = nil;
o_version = [o_info_dict objectForKey:@"CFBundleVersion"];
/* setup the creator / revision field */
if( VLC_Changeset() != "exported" )
[o_revision_field setStringValue: [NSString stringWithFormat: \
_NS("Compiled by %s, based on SVN revision %s"), VLC_CompileBy(), \
VLC_Changeset()]];
else
[o_revision_field setStringValue: [NSString stringWithFormat: \
_NS("Compiled by %s"), VLC_CompileBy()]];
/* Setup the nameversion field */
o_name_version = [NSString stringWithFormat:@"Version %@", o_version];
......
......@@ -42,8 +42,7 @@ typedef CmdDialogs<5> CmdDlgNet;
typedef CmdDialogs<6> CmdDlgMessages;
typedef CmdDialogs<7> CmdDlgPrefs;
typedef CmdDialogs<8> CmdDlgFileInfo;
typedef CmdDialogs<9> CmdDlgShowPopupMenu;
typedef CmdDialogs<10> CmdDlgHidePopupMenu;
typedef CmdDialogs<11> CmdDlgAdd;
typedef CmdDialogs<12> CmdDlgPlaylistLoad;
typedef CmdDialogs<13> CmdDlgPlaylistSave;
......@@ -51,6 +50,16 @@ typedef CmdDialogs<14> CmdDlgDirectory;
typedef CmdDialogs<15> CmdDlgStreamingWizard;
typedef CmdDialogs<16> CmdDlgPlaytreeLoad;
typedef CmdDialogs<17> CmdDlgPlaytreeSave;
typedef CmdDialogs<18> CmdDlgPlaylist;
typedef CmdDialogs<30> CmdDlgShowPopupMenu;
typedef CmdDialogs<31> CmdDlgHidePopupMenu;
typedef CmdDialogs<32> CmdDlgShowAudioPopupMenu;
typedef CmdDialogs<33> CmdDlgHideAudioPopupMenu;
typedef CmdDialogs<34> CmdDlgShowVideoPopupMenu;
typedef CmdDialogs<35> CmdDlgHideVideoPopupMenu;
typedef CmdDialogs<36> CmdDlgShowMiscPopupMenu;
typedef CmdDialogs<37> CmdDlgHideMiscPopupMenu;
/// Generic "Open dialog" command
......@@ -97,13 +106,7 @@ class CmdDialogs: public CmdGeneric
case 8:
pDialogs->showFileInfo();
break;
case 9:
pDialogs->showPopupMenu( true );
break;
case 10:
pDialogs->showPopupMenu( false );
break;
case 11:
case 11:
pDialogs->showFile( false );
break;
case 12:
......@@ -118,6 +121,33 @@ class CmdDialogs: public CmdGeneric
case 15:
pDialogs->showStreamingWizard();
break;
case 18:
pDialogs->showPlaylist();
break;
case 30:
pDialogs->showPopupMenu( true, INTF_DIALOG_POPUPMENU );
break;
case 31:
pDialogs->showPopupMenu( false, INTF_DIALOG_POPUPMENU );
break;
case 32:
pDialogs->showPopupMenu( true, INTF_DIALOG_AUDIOPOPUPMENU );
break;
case 33:
pDialogs->showPopupMenu( false,INTF_DIALOG_AUDIOPOPUPMENU );
break;
case 34:
pDialogs->showPopupMenu( true, INTF_DIALOG_VIDEOPOPUPMENU );
break;
case 35:
pDialogs->showPopupMenu( false,INTF_DIALOG_VIDEOPOPUPMENU );
break;
case 36:
pDialogs->showPopupMenu( true, INTF_DIALOG_MISCPOPUPMENU );
break;
case 37:
pDialogs->showPopupMenu( false,INTF_DIALOG_MISCPOPUPMENU );
break;
default:
msg_Warn( getIntf(), "unknown dialog type" );
break;
......
......@@ -57,11 +57,17 @@ Interpreter::Interpreter( intf_thread_t *pIntf ): SkinObject( pIntf )
REGISTER_CMD( "dialogs.directory()", CmdDlgDirectory )
REGISTER_CMD( "dialogs.disc()", CmdDlgDisc )
REGISTER_CMD( "dialogs.net()", CmdDlgNet )
REGISTER_CMD( "dialogs.playlist()", CmdDlgPlaylist )
REGISTER_CMD( "dialogs.messages()", CmdDlgMessages )
REGISTER_CMD( "dialogs.prefs()", CmdDlgPrefs )
REGISTER_CMD( "dialogs.fileInfo()", CmdDlgFileInfo )
REGISTER_CMD( "dialogs.streamingWizard()", CmdDlgStreamingWizard )
REGISTER_CMD( "dialogs.popup()", CmdDlgShowPopupMenu )
REGISTER_CMD( "dialogs.audioPopup()", CmdDlgShowAudioPopupMenu )
REGISTER_CMD( "dialogs.videoPopup()", CmdDlgShowVideoPopupMenu )
REGISTER_CMD( "dialogs.miscPopup()", CmdDlgShowMiscPopupMenu )
REGISTER_CMD( "dvd.nextTitle()", CmdDvdNextTitle )
REGISTER_CMD( "dvd.previousTitle()", CmdDvdPreviousTitle )
REGISTER_CMD( "dvd.nextChapter()", CmdDvdNextChapter )
......@@ -224,24 +230,41 @@ CmdGeneric *Interpreter::parseAction( const string &rAction, Theme *pTheme )
{
int leftPos = rAction.find( ".show()" );
string windowId = rAction.substr( 0, leftPos );
TopWindow *pWin = pTheme->getWindowById( windowId );
if( pWin )
if( windowId == "playlist_window" &&
!config_GetInt( getIntf(), "skinned-playlist") )
{
pCommand = new CmdShowWindow( getIntf(), pTheme->getWindowManager(),
*pWin );
list<CmdGeneric *> list;
list.push_back( new CmdDlgPlaylist( getIntf() ) );
TopWindow *pWin = pTheme->getWindowById( windowId );
if( pWin )
list.push_back( new CmdHideWindow( getIntf(),
pTheme->getWindowManager(),
*pWin ) );
pCommand = new CmdMuxer( getIntf(), list );
}
else
{
// It was maybe the id of a popup
Popup *pPopup = pTheme->getPopupById( windowId );
if( pPopup )
TopWindow *pWin = pTheme->getWindowById( windowId );
if( pWin )
{
pCommand = new CmdShowPopup( getIntf(), *pPopup );
pCommand = new CmdShowWindow( getIntf(),
pTheme->getWindowManager(),
*pWin );
}
else
{
msg_Err( getIntf(), "unknown window or popup (%s)",
windowId.c_str() );
// It was maybe the id of a popup
Popup *pPopup = pTheme->getPopupById( windowId );
if( pPopup )
{
pCommand = new CmdShowPopup( getIntf(), *pPopup );
}
else
{
msg_Err( getIntf(), "unknown window or popup (%s)",
windowId.c_str() );
}
}
}
}
......@@ -249,15 +272,31 @@ CmdGeneric *Interpreter::parseAction( const string &rAction, Theme *pTheme )
{
int leftPos = rAction.find( ".hide()" );
string windowId = rAction.substr( 0, leftPos );
TopWindow *pWin = pTheme->getWindowById( windowId );
if( pWin )
if( windowId == "playlist_window" &&
! config_GetInt( getIntf(), "skinned-playlist") )
{
pCommand = new CmdHideWindow( getIntf(), pTheme->getWindowManager(),
*pWin );
list<CmdGeneric *> list;
list.push_back( new CmdDlgPlaylist( getIntf() ) );
TopWindow *pWin = pTheme->getWindowById( windowId );
if( pWin )
list.push_back( new CmdHideWindow( getIntf(),
pTheme->getWindowManager(),
*pWin ) );
pCommand = new CmdMuxer( getIntf(), list );
}
else
{
msg_Err( getIntf(), "unknown window (%s)", windowId.c_str() );
TopWindow *pWin = pTheme->getWindowById( windowId );
if( pWin )
{
pCommand = new CmdHideWindow( getIntf(),
pTheme->getWindowManager(),
*pWin );
}
else
{
msg_Err( getIntf(), "unknown window (%s)", windowId.c_str() );
}
}
}
......
......@@ -57,7 +57,6 @@ void Dialogs::showChangeSkinCB( intf_dialog_args_t *pArg )
}
}
void Dialogs::showPlaylistLoadCB( intf_dialog_args_t *pArg )
{
intf_thread_t *pIntf = (intf_thread_t *)pArg->p_arg;
......@@ -97,7 +96,7 @@ static int PopupMenuCB( vlc_object_t *p_this, const char *psz_variable,
vlc_value_t old_val, vlc_value_t new_val, void *param )
{
Dialogs *p_dialogs = (Dialogs *)param;
p_dialogs->showPopupMenu( new_val.b_bool != 0 );
p_dialogs->showPopupMenu( new_val.b_bool != 0, INTF_DIALOG_POPUPMENU );
return VLC_SUCCESS;
}
......@@ -242,6 +241,14 @@ void Dialogs::showPlaylistSave()
showPlaylistSaveCB, kSAVE );
}
void Dialogs::showPlaylist()
{
if( m_pProvider && m_pProvider->pf_show_dialog )
{
m_pProvider->pf_show_dialog( m_pProvider, INTF_DIALOG_PLAYLIST,
0, 0 );
}
}
void Dialogs::showFileSimple( bool play )
{
......@@ -329,11 +336,11 @@ void Dialogs::showStreamingWizard()
}
void Dialogs::showPopupMenu( bool bShow )
void Dialogs::showPopupMenu( bool bShow, int popupType = INTF_DIALOG_POPUPMENU )
{
if( m_pProvider && m_pProvider->pf_show_dialog )
{
m_pProvider->pf_show_dialog( m_pProvider, INTF_DIALOG_POPUPMENU,
m_pProvider->pf_show_dialog( m_pProvider, popupType,
(int)bShow, 0 );
}
}
......
......@@ -86,8 +86,11 @@ class Dialogs: public SkinObject
/// Show the Streaming Wizard dialog
void showStreamingWizard();
/// Show the popup menu
void showPopupMenu( bool bShow );
/// Show the Playlist
void showPlaylist();
/// Show a popup menu
void showPopupMenu( bool bShow, int popupType );
/// Show an interaction dialog
void showInteraction( interaction_dialog_t * );
......
......@@ -365,6 +365,9 @@ vlc_module_begin();
add_bool( "skins2-transparency", VLC_FALSE, NULL, SKINS2_TRANSPARENCY,
SKINS2_TRANSPARENCY_LONG, VLC_FALSE );
#endif
add_bool( "skinned-playlist", VLC_TRUE, NULL, SKINS2_TRANSPARENCY,
SKINS2_TRANSPARENCY_LONG, VLC_FALSE );
set_shortname( _("Skins"));
set_description( _("Skinnable Interface") );
set_capability( "interface", 30 );
......
This diff is collapsed.
......@@ -131,6 +131,8 @@ class VlcProc: public SkinObject
VariablePtr m_cVarFullscreen;
VarBox m_varVoutSize;
VariablePtr m_cVarHasVout;
/// Variables related to audio
VariablePtr m_cVarHasAudio;
/// Equalizer variables
EqualizerBands m_varEqBands;
VariablePtr m_cVarEqPreamp;
......@@ -163,6 +165,10 @@ class VlcProc: public SkinObject
/// Refresh audio variables
void refreshAudio();
/// Refresh playlist variables
void refreshPlaylist();
/// Refresh input variables
void refreshInput();
/// Update the stream name variable
void updateStreamName( playlist_t *p_playlist );
......
......@@ -84,6 +84,9 @@ private:
void OnOpenSat( wxCommandEvent& event );
void OnPopupMenu( wxCommandEvent& event );
void OnAudioPopupMenu( wxCommandEvent& event );
void OnVideoPopupMenu( wxCommandEvent& event );
void OnMiscPopupMenu( wxCommandEvent& event );
void OnIdle( wxIdleEvent& event );
......@@ -140,8 +143,16 @@ BEGIN_EVENT_TABLE(DialogsProvider, wxFrame)
DialogsProvider::OnFileInfo)
EVT_COMMAND(INTF_DIALOG_BOOKMARKS, wxEVT_DIALOG,
DialogsProvider::OnBookmarks)
EVT_COMMAND(INTF_DIALOG_POPUPMENU, wxEVT_DIALOG,
DialogsProvider::OnPopupMenu)
EVT_COMMAND(INTF_DIALOG_AUDIOPOPUPMENU, wxEVT_DIALOG,
DialogsProvider::OnAudioPopupMenu)
EVT_COMMAND(INTF_DIALOG_VIDEOPOPUPMENU, wxEVT_DIALOG,
DialogsProvider::OnVideoPopupMenu)
EVT_COMMAND(INTF_DIALOG_MISCPOPUPMENU, wxEVT_DIALOG,
DialogsProvider::OnMiscPopupMenu)
EVT_COMMAND(INTF_DIALOG_EXIT, wxEVT_DIALOG,
DialogsProvider::OnExitThread)
EVT_COMMAND(INTF_DIALOG_UPDATEVLC, wxEVT_DIALOG,
......@@ -508,6 +519,22 @@ void DialogsProvider::OnPopupMenu( wxCommandEvent& event )
::PopupMenu( p_intf, this, mousepos );
}
void DialogsProvider::OnAudioPopupMenu( wxCommandEvent& event )
{
wxPoint mousepos = ScreenToClient( wxGetMousePosition() );
::AudioPopupMenu( p_intf, this, mousepos );
}
void DialogsProvider::OnVideoPopupMenu( wxCommandEvent& event )
{
wxPoint mousepos = ScreenToClient( wxGetMousePosition() );
::VideoPopupMenu( p_intf, this, mousepos );
}
void DialogsProvider::OnMiscPopupMenu( wxCommandEvent& event )
{
wxPoint mousepos = ScreenToClient( wxGetMousePosition() );
::MiscPopupMenu( p_intf, this, mousepos );
}
void DialogsProvider::OnExitThread( wxCommandEvent& WXUNUSED(event) )
{
wxTheApp->ExitMainLoop();
......
......@@ -239,6 +239,9 @@ namespace wxvlc
};
void PopupMenu( intf_thread_t *, wxWindow *, const wxPoint& );
void AudioPopupMenu( intf_thread_t *, wxWindow *, const wxPoint& );
void VideoPopupMenu( intf_thread_t *, wxWindow *, const wxPoint& );
void MiscPopupMenu( intf_thread_t *, wxWindow *, const wxPoint& );
wxMenu *SettingsMenu( intf_thread_t *, wxWindow *, wxMenu * = NULL );
wxMenu *AudioMenu( intf_thread_t *, wxWindow *, wxMenu * = NULL );
wxMenu *VideoMenu( intf_thread_t *, wxWindow *, wxMenu * = NULL );
......
This diff is collapsed.
......@@ -67,13 +67,13 @@ This dialog needs the following dialogs to be fully functional: browse
<label for="input_file_filename">File name</label>
<input type="text" id="input_file_filename" size="60" onchange="update_input_file();" onfocus="update_input_file();"/>
<input type="button" id="input_file_browse" value="Browse" onclick="browse( 'input_file_filename' );" />
<hr/>
<!-- <hr/>
<input type="checkbox" id="input_sub_options" />
<label for="input_sub_options">Subtitle options *TODO/FIXME/FIXHTTPD*</label>
<br/>
<label for="input_sub_file">Subtitles file</label>
<input type="text" id="input_sub_file" size="60" />
<br/><!-- TODO -->
<br/>
<label for="input_sub_enc">Subtitles encoding</label>
<select id="input_sub_enc">
<option></option>
......@@ -91,7 +91,7 @@ This dialog needs the following dialogs to be fully functional: browse
<label for="input_sub_fps">Frames per second</label>
<input type="text" id="input_sub_fps" />
<label for="input_sub_delay">Delay</label>
<input type="text" id="input_sub_delay" />
<input type="text" id="input_sub_delay" />-->
</div>
<div id="input_disc" style="display: none">
Open Disc
......
......@@ -135,6 +135,13 @@ int libvlc_playlist_add_extended( libvlc_instance_t *p_instance,
i_options );
}
int libvlc_playlist_delete_item( libvlc_instance_t *p_instance, int i_id,
libvlc_exception_t *p_exception )
{
return playlist_Delete( p_instance->p_playlist, i_id );
}
int libvlc_playlist_isplaying( libvlc_instance_t *p_instance,
libvlc_exception_t *p_exception )
{
......
......@@ -458,7 +458,7 @@ int VLC_Init( int i_object, int i_argc, char *ppsz_argv[] )
/* Check for translation config option */
#if defined( ENABLE_NLS ) \
&& ( defined( HAVE_GETTEXT ) || defined( HAVE_INCLUDED_GETTEXT ) )
# if defined (WIN32) || defined (__APPLE__)
/* This ain't really nice to have to reload the config here but it seems
* the only way to do it. */
config_LoadConfigFile( p_vlc, "main" );
......@@ -473,13 +473,6 @@ int VLC_Init( int i_object, int i_argc, char *ppsz_argv[] )
/* Reset the default domain */
SetLanguage( psz_language );
/* Should not be needed (otherwise, fixes should rather be
* attempted on vlc_current_charset().
* Also, if the locale charset is overriden, anything that has been
* translated until now would have to be retranslated. */
/*LocaleDeinit();
LocaleInit( (vlc_object_t *)p_vlc );*/
/* Translate "C" to the language code: "fr", "en_GB", "nl", "ru"... */
msg_Dbg( p_vlc, "translation test: code is \"%s\"", _("C") );
......@@ -490,6 +483,7 @@ int VLC_Init( int i_object, int i_argc, char *ppsz_argv[] )
libvlc.p_module_bank->b_cache_delete = b_cache_delete;
}
if( psz_language ) free( psz_language );
# endif
#endif
/*
......
......@@ -1532,9 +1532,12 @@ vlc_module_begin();
VLC_TRUE );
#endif
#if defined (WIN32) || defined (__APPLE__)
add_string( "language", "auto", NULL, LANGUAGE_TEXT, LANGUAGE_LONGTEXT,
VLC_FALSE );
change_string_list( ppsz_language, ppsz_language_text, 0 );
#endif
add_bool( "color", 0, NULL, COLOR_TEXT, COLOR_LONGTEXT, VLC_TRUE );
add_bool( "advanced", 0, NULL, ADVANCED_TEXT, ADVANCED_LONGTEXT,
VLC_FALSE );
......
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