Mercurial > mplayer.hg
changeset 33470:90e5f5c28304
Add option '-gui-include'.
This is the GUI counterpart to MPlayer's option '-include'.
author | ib |
---|---|
date | Sun, 05 Jun 2011 10:14:26 +0000 |
parents | 17519ae1f249 |
children | 8ec097f561b6 |
files | DOCS/man/de/mplayer.1 DOCS/man/en/mplayer.1 cfg-mplayer.h gui/cfg.c gui/cfg.h |
diffstat | 5 files changed, 21 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/DOCS/man/de/mplayer.1 Sat Jun 04 10:27:45 2011 +0000 +++ b/DOCS/man/de/mplayer.1 Sun Jun 05 10:14:26 2011 +0000 @@ -766,7 +766,7 @@ der eingebauten codecs.conf. . .TP -.B \-include <Konfigurationsdatei> +.B \-include <Konfigurationsdatei> (siehe auch \-gui-include) Gib eine Konfigurationsdatei an, die nach den Standardkonfigurationsdateien eingelesen werden soll. . @@ -1035,6 +1035,11 @@ Funktioniert nicht als Option in einer Konfigurationsdatei. . .TP +.B \-gui-include <GUI-Konfigurationsdatei> (siehe auch \-include) (nur beim GUI) +Gibt eine GUI-Konfigurationsdatei an, die nach der Standardkonfigurationsdatei +gui.conf eingelesen werden soll. +. +.TP .B \-h, \-help, \-\-help Zeigt eine kurze Zusammenfassung der Optionen an. .
--- a/DOCS/man/en/mplayer.1 Sat Jun 04 10:27:45 2011 +0000 +++ b/DOCS/man/en/mplayer.1 Sun Jun 05 10:14:26 2011 +0000 @@ -755,7 +755,7 @@ instead of the builtin codecs.conf. . .TP -.B \-include <configuration file> +.B \-include <configuration file> (also see \-gui-include) Specify configuration file to be parsed after the default ones. . .TP @@ -1033,6 +1033,10 @@ Does not work as a config-file option. . .TP +.B \-gui-include <GUI configuration file> (also see \-include) (GUI only) +Specify a GUI configuration file to be parsed after the default gui.conf. +. +.TP .B \-h, \-help, \-\-help Show short summary of options. .
--- a/cfg-mplayer.h Sat Jun 04 10:27:45 2011 +0000 +++ b/cfg-mplayer.h Sun Jun 05 10:14:26 2011 +0000 @@ -308,6 +308,7 @@ {"enqueue", &enqueue, CONF_TYPE_FLAG, 0, 0, 1, NULL}, {"noenqueue", &enqueue, CONF_TYPE_FLAG, 0, 1, 0, NULL}, {"guiwid", &guiWinID, CONF_TYPE_INT, 0, 0, 0, NULL}, + {"gui-include", cfg_gui_include, CONF_TYPE_FUNC_PARAM, CONF_NOSAVE, 0, 0, NULL}, #endif {"noloop", &mpctx_s.loop_times, CONF_TYPE_FLAG, 0, 0, -1, NULL},
--- a/gui/cfg.c Sat Jun 04 10:27:45 2011 +0000 +++ b/gui/cfg.c Sun Jun 05 10:14:26 2011 +0000 @@ -28,7 +28,6 @@ #include "libmpcodecs/vd.h" #include "libvo/video_out.h" #include "libvo/x11_common.h" -#include "m_option.h" #include "mixer.h" #include "mp_msg.h" #include "mpcommon.h" @@ -245,6 +244,13 @@ return s; } +int cfg_gui_include(m_option_t *conf, char *filename) +{ + (void)conf; + + return m_config_parse_config_file(gui_conf, filename); +} + int cfg_read(void) { char *cfg;
--- a/gui/cfg.h Sat Jun 04 10:27:45 2011 +0000 +++ b/gui/cfg.h Sun Jun 05 10:14:26 2011 +0000 @@ -20,6 +20,7 @@ #define MPLAYER_GUI_CFG_H #include "m_config.h" +#include "m_option.h" extern m_config_t *gui_conf; @@ -81,6 +82,7 @@ extern int gui_sub_pos_x; extern int gui_sub_pos_y; +int cfg_gui_include(m_option_t *conf, char *filename); int cfg_read(void); int cfg_write(void);