]> git.sesse.net Git - vlc/blobdiff - plugins/gtk/gtk_display.c
*Removed an occurance of former angle item in gtk.
[vlc] / plugins / gtk / gtk_display.c
index 26db006290fc8df4c2dfe6a782fd894fa4fcc1eb..96fdc442a6306f42d8bed38f6e1b8bfa2f6bba7f 100644 (file)
@@ -2,7 +2,7 @@
  * gtk_display.c: Gtk+ tools for main interface
  *****************************************************************************
  * Copyright (C) 1999, 2000 VideoLAN
- * $Id: gtk_display.c,v 1.11 2002/01/07 02:12:29 sam Exp $
+ * $Id: gtk_display.c,v 1.18 2002/03/06 01:20:56 stef Exp $
  *
  * Authors: Samuel Hocevar <sam@zoy.org>
  *          Stéphane Borel <stef@via.ecp.fr>
@@ -131,7 +131,7 @@ gint GtkModeManage( intf_thread_t * p_intf )
                             p_intf->p_sys->p_window ),
                             "label_status" );
                 gtk_label_set_text( GTK_LABEL( p_label ),
-                                    p_input_bank->pp_input[0]->p_source );
+                                    p_input_bank->pp_input[0]->psz_source );
                 break;
             case INPUT_METHOD_DISC:
 //intf_WarnMsg( 2, "intf info: disc method" );
@@ -144,11 +144,10 @@ gint GtkModeManage( intf_thread_t * p_intf )
                             p_intf->p_sys->p_window ),
                             "network_address_label" );
                 gtk_label_set_text( GTK_LABEL( p_label ),
-                                    p_input_bank->pp_input[0]->p_source );
+                                    p_input_bank->pp_input[0]->psz_source );
                 p_channel = GTK_WIDGET( gtk_object_get_data( GTK_OBJECT(
                            p_intf->p_sys->p_window ), "network_channel_box" ) );
-                if( main_GetIntVariable( INPUT_NETWORK_CHANNEL_VAR,
-                                         INPUT_NETWORK_CHANNEL_DEFAULT  ) )
+                if( config_GetIntVariable( INPUT_NETWORK_CHANNEL_VAR ) )
                 {
                     gtk_widget_show( GTK_WIDGET( p_channel ) );
                 }
@@ -159,7 +158,13 @@ gint GtkModeManage( intf_thread_t * p_intf )
 
                 break;
             default:
-                intf_ErrMsg( "intf error: can't determine input method" );
+                intf_WarnMsg( 3, "intf: can't determine input method" );
+                gtk_widget_show( GTK_WIDGET( p_file_box ) );
+                p_label = gtk_object_get_data( GTK_OBJECT(
+                            p_intf->p_sys->p_window ),
+                            "label_status" );
+                gtk_label_set_text( GTK_LABEL( p_label ),
+                                    p_input_bank->pp_input[0]->psz_source );
                 break;
         }
     
@@ -176,9 +181,9 @@ gint GtkModeManage( intf_thread_t * p_intf )
         b_control = p_input_bank->pp_input[0]->stream.b_pace_control;
 
         /* get ready for menu regeneration */
+        p_intf->p_sys->b_program_update = 1;
         p_intf->p_sys->b_title_update = 1;
         p_intf->p_sys->b_chapter_update = 1;
-        p_intf->p_sys->b_angle_update = 1;
         p_intf->p_sys->b_audio_update = 1;
         p_intf->p_sys->b_spu_update = 1;
         p_intf->p_sys->i_part = 0;
@@ -188,8 +193,7 @@ gint GtkModeManage( intf_thread_t * p_intf )
     }
     else
     {
-        if( main_GetIntVariable( INPUT_NETWORK_CHANNEL_VAR,
-                                 INPUT_NETWORK_CHANNEL_DEFAULT  ) )
+        if( config_GetIntVariable( INPUT_NETWORK_CHANNEL_VAR ) )
         {
             gtk_widget_show( GTK_WIDGET( p_network_box ) );
 
@@ -207,16 +211,16 @@ gint GtkModeManage( intf_thread_t * p_intf )
             gtk_widget_show( GTK_WIDGET( p_file_box ) );
 
             /* unsensitize menus */
+            gtk_widget_set_sensitive( GETWIDGET(p_window,"menubar_program"),
+                    FALSE );
             gtk_widget_set_sensitive( GETWIDGET(p_window,"menubar_title"), FALSE );
             gtk_widget_set_sensitive( GETWIDGET(p_window,"menubar_chapter"),
                                       FALSE );
-            gtk_widget_set_sensitive( GETWIDGET(p_window,"menubar_angle"), FALSE );
             gtk_widget_set_sensitive( GETWIDGET(p_window,"menubar_audio"), FALSE );
             gtk_widget_set_sensitive( GETWIDGET(p_window,"menubar_subpictures"),
                                       FALSE );
             gtk_widget_set_sensitive( GETWIDGET(p_popup,"popup_navigation"),
                                       FALSE );
-            gtk_widget_set_sensitive( GETWIDGET(p_popup,"popup_angle"), FALSE );
             gtk_widget_set_sensitive( GETWIDGET(p_popup,"popup_audio"), FALSE );
             gtk_widget_set_sensitive( GETWIDGET(p_popup,"popup_subpictures"),
                                       FALSE );
@@ -225,6 +229,7 @@ gint GtkModeManage( intf_thread_t * p_intf )
 
     /* set control items */
     gtk_widget_set_sensitive( GETWIDGET(p_window, "toolbar_back"), FALSE );
+    gtk_widget_set_sensitive( GETWIDGET(p_window, "toolbar_eject"), !b_control);
     gtk_widget_set_sensitive( GETWIDGET(p_window, "toolbar_pause"), b_control );
     gtk_widget_set_sensitive( GETWIDGET(p_window, "toolbar_slow"), b_control );
     gtk_widget_set_sensitive( GETWIDGET(p_window, "toolbar_fast"), b_control );