]> git.sesse.net Git - vlc/commitdiff
* src/interface/interface.c
authorDerk-Jan Hartman <hartman@videolan.org>
Sat, 27 Mar 2004 17:36:46 +0000 (17:36 +0000)
committerDerk-Jan Hartman <hartman@videolan.org>
Sat, 27 Mar 2004 17:36:46 +0000 (17:36 +0000)
  - 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.

extras/MacOSX/Resources/English.lproj/MainMenu.nib/classes.nib
extras/MacOSX/Resources/English.lproj/MainMenu.nib/info.nib
extras/MacOSX/Resources/English.lproj/MainMenu.nib/objects.nib
modules/gui/macosx/intf.h
modules/gui/macosx/intf.m
modules/misc/logger.c
src/interface/interface.c

index f55c9427efe8ced9fd53c3a1bcdef27d075aee4a..bdcf9eb56b1804abb93f957eb949ef7fdaf87696 100644 (file)
                 "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; 
                 "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; 
                 "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; 
index 9a50eddc11ebb2bbfda05a775e439da8cf42e87a..aff8af46837787b63a24ddc11e7401752bcccb97 100644 (file)
@@ -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>
index 0e31f7840bf8d917955b895e943b0a31839f65b9..50c3f45c1a44bc4fe4e4376e31619eee3f277564 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 0ab06f054f32f4a04ddeafcb06bfeebafc538fda..30f763d8eb58a231e10844344360ebbc77428848 100644 (file)
@@ -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;
index 18349dee8ed245276d4b982053f25210df96b0aa..3e901f8f73fdd6245fb2137e1bc5094e84bf4c89 100644 (file)
@@ -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 );
 }
index f91299627cdc99d12ab9b9810476d7a1a2c0742b..345182a40dc321df9bbd85f297b8a046b5139192 100644 (file)
 #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 );
     }
 
index e42f1a86a986b8bd0c435c735e0279ca64ae0a8e..c47ecd114140518552e3a2e5adaa836d72efed09 100644 (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 );