[MPlayer-cvslog] r38113 - in trunk: DOCS/man/de/mplayer.1 DOCS/man/en/mplayer.1 gui/app/cfg.c gui/dialog/preferences.c help/help_mp-de.h help/help_mp-en.h

ib subversion at mplayerhq.hu
Sun Jun 10 19:20:59 EEST 2018


Author: ib
Date: Sun Jun 10 19:20:59 2018
New Revision: 38113

Log:
Allow the GUI to overwrite option allow_playlist_parsing.

Add GUI option support_playlists to be able to allow playlist parsing
even if disabled by MPlayer.

(Since GUI's playlist parsing only takes effect if the user explicitly
loads a playlist file through the file selector's playlist filter, it
can be assumed that they are knowing what they are doing. There will be
no playlist parsing the user can't be aware of. Moreover, instead of
having to enable dangerous playlist parsing in MPlayer's configuration
file - and thus more or less unrestrictedly - parsing can be restricted
to GUI usage this way.)

Add an entry to the preference dialog where the new option can be
configured.

Additionally, update man pages.

Modified:
   trunk/gui/app/cfg.c
   trunk/gui/dialog/preferences.c

Changes in other areas also in this revision:
Modified:
   trunk/DOCS/man/de/mplayer.1
   trunk/DOCS/man/en/mplayer.1
   trunk/help/help_mp-de.h
   trunk/help/help_mp-en.h

Modified: trunk/gui/app/cfg.c
==============================================================================
--- trunk/gui/app/cfg.c	Sun Jun 10 19:00:09 2018	(r38112)
+++ trunk/gui/app/cfg.c	Sun Jun 10 19:20:59 2018	(r38113)
@@ -251,6 +251,8 @@ static const m_option_t gui_opts[] = {
     { "ass_bottom_margin",           &ass_bottom_margin,       CONF_TYPE_INT,         CONF_RANGE,  0,     2000,       NULL },
 #endif
 
+    { "playlist_support",            &allow_playlist_parsing,  CONF_TYPE_FLAG,        0,           0,     1,          NULL },
+
     { NULL,                          NULL,                     0,                     0,           0,     0,          NULL }
 };
 

Modified: trunk/gui/dialog/preferences.c
==============================================================================
--- trunk/gui/dialog/preferences.c	Sun Jun 10 19:00:09 2018	(r38112)
+++ trunk/gui/dialog/preferences.c	Sun Jun 10 19:20:59 2018	(r38113)
@@ -116,6 +116,7 @@ static GtkWidget * CBStopXScreenSaver;
 static GtkWidget * CBPlayBar;
 static GtkWidget * CBNoIdle;
 static GtkWidget * CBTVDigital;
+static GtkWidget * CBPlaylists;
 
 static GtkWidget * SBCache;
 static GtkAdjustment * SBCacheadj;
@@ -382,6 +383,7 @@ static void prButton( GtkButton * button
         gtkEnablePlayBar=gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( CBPlayBar ) );
         gui_tv_digital=gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( CBTVDigital ) );
         player_idle_mode=!gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( CBNoIdle ) );
+        allow_playlist_parsing = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(CBPlaylists));
         mplayer( MPLAYER_SET_AUTO_QUALITY,HSPPQualityadj->value,0 );
 
         if ( gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( CBCache ) ) ) { gtkCacheSize=(int)SBCacheadj->value; gtkCacheOn=True; }
@@ -1092,6 +1094,7 @@ static GtkWidget * CreatePreferences( vo
   CBStopXScreenSaver=gtkAddCheckButton( MSGTR_GUI_TurnOffXScreenSaver,vbox602 );
   CBPlayBar=gtkAddCheckButton( MSGTR_GUI_EnablePlaybar,vbox602 );
   CBTVDigital=gtkAddCheckButton( MSGTR_GUI_EnableDigitalTV,vbox602 );
+  CBPlaylists = gtkAddCheckButton(MSGTR_GUI_PlaylistSupport, vbox602);
   CBNoIdle=gtkAddCheckButton( MSGTR_GUI_QuitAfterPlaying,vbox602 );
 
   gtkAddHSeparator( vbox602 );
@@ -1411,6 +1414,7 @@ void ShowPreferences( void )
    gtk_widget_set_sensitive( CBTVDigital,FALSE );
 #endif
  gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON( CBNoIdle ),!player_idle_mode );
+ gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(CBPlaylists), allow_playlist_parsing);
 
  gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON( CBCache ),0 );
  gtk_adjustment_set_value( SBCacheadj,gtkCacheSize );


More information about the MPlayer-cvslog mailing list