Mercurial > mplayer.hg
changeset 33477:49d9967970c0
Add option '-idle' to the GUI configuration file.
Also, add a check button for it to the preferences menu.
author | ib |
---|---|
date | Mon, 06 Jun 2011 14:08:18 +0000 |
parents | d068eac6cbf9 |
children | a86e08ff3198 |
files | gui/cfg.c gui/mplayer/gtk/opts.c help/help_mp-de.h help/help_mp-en.h |
diffstat | 4 files changed, 8 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/gui/cfg.c Mon Jun 06 11:55:35 2011 +0000 +++ b/gui/cfg.c Mon Jun 06 14:08:18 2011 +0000 @@ -164,6 +164,8 @@ { "gui_video_out_pos_x", &gui_sub_pos_x, CONF_TYPE_INT, 0, 0, 0, NULL }, { "gui_video_out_pos_y", &gui_sub_pos_y, CONF_TYPE_INT, 0, 0, 0, NULL }, + { "idle", &player_idle_mode, CONF_TYPE_FLAG, CONF_GLOBAL, 0, 1, NULL }, + // NOTE TO MYSELF: Do we really need all/any non-gtkOptions, i.e. override mplayer options? { "gui_skin", &skinName, CONF_TYPE_STRING, 0, 0, 0, NULL },
--- a/gui/mplayer/gtk/opts.c Mon Jun 06 11:55:35 2011 +0000 +++ b/gui/mplayer/gtk/opts.c Mon Jun 06 14:08:18 2011 +0000 @@ -101,6 +101,7 @@ static GtkWidget * CBSaveWinPos; static GtkWidget * CBStopXScreenSaver; static GtkWidget * CBPlayBar; +static GtkWidget * CBNoIdle; static GtkWidget * SBCache; static GtkAdjustment * SBCacheadj; @@ -406,6 +407,7 @@ gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON( CBPlayBar ),0 ); gtk_widget_set_sensitive( CBPlayBar,FALSE ); } + gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON( CBNoIdle ),!player_idle_mode ); gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON( CBCache ),0 ); gtk_adjustment_set_value( SBCacheadj,(float)gtkCacheSize ); @@ -623,6 +625,7 @@ gtkShowVideoWindow=gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( CBShowVideoWindow ) ); stop_xscreensaver=gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( CBStopXScreenSaver ) ); gtkEnablePlayBar=gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( CBPlayBar ) ); + player_idle_mode=!gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( CBNoIdle ) ); gtkSet( gtkSetAutoq,HSPPQualityadj->value,NULL ); if ( gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( CBCache ) ) ) { gtkCacheSize=(int)SBCacheadj->value; gtkCacheOn=1; } @@ -1273,6 +1276,7 @@ CBSaveWinPos=AddCheckButton( MSGTR_PREFERENCES_SaveWinPos,vbox602 ); CBStopXScreenSaver=AddCheckButton( MSGTR_PREFERENCES_XSCREENSAVER,vbox602 ); CBPlayBar=AddCheckButton( MSGTR_PREFERENCES_PlayBar,vbox602 ); + CBNoIdle=AddCheckButton( MSGTR_PREFERENCES_NoIdle,vbox602 ); AddHSeparator( vbox602 );
--- a/help/help_mp-de.h Mon Jun 06 11:55:35 2011 +0000 +++ b/help/help_mp-de.h Mon Jun 06 14:08:18 2011 +0000 @@ -981,6 +981,7 @@ #define MSGTR_PREFERENCES_SaveWinPos "Speichere Fensterposition" #define MSGTR_PREFERENCES_XSCREENSAVER "Deaktiviere XScreenSaver" #define MSGTR_PREFERENCES_PlayBar "Aktiviere die Playbar" +#define MSGTR_PREFERENCES_NoIdle "Programm nach der Wiedergabe beenden" #define MSGTR_PREFERENCES_AutoSync "AutoSync ein/aus" #define MSGTR_PREFERENCES_AutoSyncValue "Autosyncwert: " #define MSGTR_PREFERENCES_CDROMDevice "CD-ROM-Gerät:"
--- a/help/help_mp-en.h Mon Jun 06 11:55:35 2011 +0000 +++ b/help/help_mp-en.h Mon Jun 06 14:08:18 2011 +0000 @@ -772,6 +772,7 @@ #define MSGTR_PREFERENCES_SaveWinPos "Save window position" #define MSGTR_PREFERENCES_XSCREENSAVER "Stop XScreenSaver" #define MSGTR_PREFERENCES_PlayBar "Enable playbar" +#define MSGTR_PREFERENCES_NoIdle "Quit after playing" #define MSGTR_PREFERENCES_AutoSync "AutoSync on/off" #define MSGTR_PREFERENCES_AutoSyncValue "Autosync: " #define MSGTR_PREFERENCES_CDROMDevice "CD-ROM device:"