Commit d5c4e1bf authored by hartman's avatar hartman
Browse files

* src/interface/interface.c

  - spelling fix
  - added telnet intf to 'Add Interface'
* modules/misc/logger.c:
  - on Mac OS X, use ~/Library/Logs to write logger intf output.
* ALL
  - Added 'Add Interface' to Mac OS X build. Now you can finaly quicklaunch
  the SAP intf.
parent ab603b47
......@@ -103,6 +103,7 @@
"o_info_window" = id;
"o_messages" = id;
"o_mi_about" = id;
"o_mi_add_intf" = id;
"o_mi_audiotrack" = id;
"o_mi_bring_atf" = id;
"o_mi_bwd" = id;
......@@ -146,7 +147,6 @@
"o_mi_paste" = id;
"o_mi_play" = id;
"o_mi_playlist" = id;
"o_mi_position" = id;
"o_mi_prefs" = id;
"o_mi_previous" = id;
"o_mi_program" = id;
......@@ -169,6 +169,7 @@
"o_mi_website" = id;
"o_msgs_btn_crashlog" = id;
"o_msgs_panel" = id;
"o_mu_add_intf" = id;
"o_mu_audio" = id;
"o_mu_audiotrack" = id;
"o_mu_channels" = id;
......
......@@ -3,26 +3,24 @@
<plist version="1.0">
<dict>
<key>IBDocumentLocation</key>
<string>-6 44 505 517 0 0 800 578 </string>
<string>392 439 505 517 0 0 1280 1002 </string>
<key>IBEditorPositions</key>
<dict>
<key>1617</key>
<string>410 345 104 149 0 0 800 578 </string>
<string>693 686 104 149 0 0 1280 1002 </string>
<key>29</key>
<string>11 440 419 44 0 0 800 578 </string>
<string>25 789 419 44 0 0 1280 1002 </string>
<key>915</key>
<string>160 353 103 130 0 0 800 578 </string>
</dict>
<key>IBFramework Version</key>
<string>362.0</string>
<string>349.0</string>
<key>IBLockedObjects</key>
<array/>
<key>IBOpenObjects</key>
<array>
<integer>1617</integer>
<integer>29</integer>
<integer>636</integer>
<integer>21</integer>
</array>
<key>IBSystem Version</key>
<string>7F44</string>
......
......@@ -138,6 +138,8 @@ struct intf_sys_t
IBOutlet id o_mi_about;
IBOutlet id o_mi_prefs;
IBOutlet id o_mi_add_intf;
IBOutlet id o_mu_add_intf;
IBOutlet id o_mi_hide;
IBOutlet id o_mi_hide_others;
IBOutlet id o_mi_show_all;
......
......@@ -470,6 +470,8 @@ unsigned int VLCModifiersToCocoa( unsigned int i_key )
/* main menu */
[o_mi_about setTitle: _NS("About VLC media player")];
[o_mi_prefs setTitle: _NS("Preferences...")];
[o_mi_add_intf setTitle: _NS("Add Interface")];
[o_mu_add_intf setTitle: _NS("Add Interface")];
[o_mi_hide setTitle: _NS("Hide VLC")];
[o_mi_hide_others setTitle: _NS("Hide Others")];
[o_mi_show_all setTitle: _NS("Show All")];
......@@ -601,6 +603,9 @@ unsigned int VLCModifiersToCocoa( unsigned int i_key )
[NSThread detachNewThreadSelector: @selector(manage)
toTarget: self withObject: nil];
[o_controls setupVarMenuItem: o_mi_add_intf target: (vlc_object_t *)p_intf
var: "intf-add" selector: @selector(toggleVar:)];
vlc_thread_set_priority( p_intf, VLC_THREAD_PRIORITY_LOW );
}
......
......@@ -36,7 +36,13 @@
#define MODE_TEXT 0
#define MODE_HTML 1
#define LOG_FILE "vlc-log.txt"
#ifdef SYS_DARWIN
#define LOG_DIR "Library/Logs/"
#endif
#define LOG_FILE_TEXT "vlc-log.txt"
#define LOG_FILE_HTML "vlc-log.html"
#define LOG_STRING( msg, file ) fwrite( msg, strlen( msg ), 1, file );
#define TEXT_HEADER "-- logger module started --\n"
......@@ -82,7 +88,7 @@ static void HtmlPrint ( const msg_item_t *, FILE * );
* Module descriptor
*****************************************************************************/
static char *mode_list[] = { "text", "html" };
static char *mode_list_text[] = { N_("Text"), N_("Html") };
static char *mode_list_text[] = { N_("Text"), N_("HTML") };
#define LOGMODE_TEXT N_("Log format")
#define LOGMODE_LONGTEXT N_("Specify the log format. Available choices are \"text\" (default) and \"html\".")
......@@ -146,17 +152,43 @@ static int Open( vlc_object_t *p_this )
psz_file = config_GetPsz( p_intf, "logfile" );
if( !psz_file )
{
switch( p_intf->p_sys->i_mode )
#ifdef SYS_DARWIN
char *psz_homedir = p_this->p_vlc->psz_homedir;
if( !psz_homedir )
{
msg_Err( p_this, "psz_homedir is null" );
return -1;
}
psz_file = (char *)malloc( sizeof("/" LOG_DIR "/" LOG_FILE_HTML) +
strlen(psz_homedir) );
if( psz_file )
{
switch( p_intf->p_sys->i_mode )
{
case MODE_HTML:
sprintf( psz_file, "%s/" LOG_DIR "/" LOG_FILE_HTML,
psz_homedir );
break;
case MODE_TEXT:
default:
sprintf( psz_file, "%s/" LOG_DIR "/" LOG_FILE_TEXT,
psz_homedir );
break;
}
}
#else
switch( p_intf->p_sys->i_mode )
{
case MODE_HTML:
psz_file = strdup( "vlc-log.html" );
psz_file = strdup( LOG_FILE_HTML );
break;
case MODE_TEXT:
default:
psz_file = strdup( "vlc-log.txt" );
psz_file = strdup( LOG_FILE_TEXT );
break;
}
#endif
msg_Warn( p_intf, "no log filename provided, using `%s'", psz_file );
}
......
......@@ -75,7 +75,6 @@ static int AddIntfCallback( vlc_object_t *, char const *,
intf_thread_t* __intf_Create( vlc_object_t *p_this, const char *psz_module )
{
intf_thread_t * p_intf;
char *psz_intf;
/* Allocate structure */
p_intf = vlc_object_create( p_this, VLC_OBJECT_INTF );
......@@ -257,18 +256,20 @@ static void RunInterface( intf_thread_t *p_intf )
/* Variable used for interface spawning */
var_Create( p_intf, "intf-add", VLC_VAR_STRING |
VLC_VAR_HASCHOICE | VLC_VAR_ISCOMMAND );
text.psz_string = _("Add interface");
text.psz_string = _("Add Interface");
var_Change( p_intf, "intf-add", VLC_VAR_SETTEXT, &text, NULL );
val.psz_string = "rc"; text.psz_string = "Console";
var_Change( p_intf, "intf-add", VLC_VAR_ADDCHOICE, &val, &text );
val.psz_string = "logger"; text.psz_string = "Debug logging";
val.psz_string = "telnet"; text.psz_string = "Telnet Interface";
var_Change( p_intf, "intf-add", VLC_VAR_ADDCHOICE, &val, &text );
val.psz_string = "http"; text.psz_string = "Web Interface";
var_Change( p_intf, "intf-add", VLC_VAR_ADDCHOICE, &val, &text );
val.psz_string = "http"; text.psz_string = "HTTP remote control";
val.psz_string = "logger"; text.psz_string = "Debug logging";
var_Change( p_intf, "intf-add", VLC_VAR_ADDCHOICE, &val, &text );
val.psz_string = "sap"; text.psz_string = "SAP interface";
val.psz_string = "sap"; text.psz_string = "SAP Playlist";
var_Change( p_intf, "intf-add", VLC_VAR_ADDCHOICE, &val, &text );
val.psz_string = "gestures"; text.psz_string = "Mouse gestures control";
val.psz_string = "gestures"; text.psz_string = "Mouse Gestures";
var_Change( p_intf, "intf-add", VLC_VAR_ADDCHOICE, &val, &text );
var_AddCallback( p_intf, "intf-add", AddIntfCallback, NULL );
......
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