[MPlayer-cvslog] r38276 - in trunk: Changelog DOCS/xml/de/install.xml DOCS/xml/de/skin.xml DOCS/xml/en/install.xml gui/interface.c gui/skin/skin.c help/help_mp-de.h help/help_mp-en.h
ib
subversion at mplayerhq.hu
Fri Feb 26 17:23:07 EET 2021
Author: ib
Date: Fri Feb 26 17:23:07 2021
New Revision: 38276
Log:
Provide a built-in skin for the X11/GTK GUI.
It is unpleasant that the GUI requires the installation of a skin
to be able to run. Without a skin the GUI terminates.
Now, without any installed skin, the GUI at least provides a video
window that allows simple control with the always available context
menu.
However, the user is informed that the installation of a skin is
still strongly advised for comfortable control and for the display
of additional information.
Additionally, update the documentation.
Modified:
trunk/Changelog
trunk/gui/interface.c
trunk/gui/skin/skin.c
Changes in other areas also in this revision:
Modified:
trunk/DOCS/xml/de/install.xml
trunk/DOCS/xml/de/skin.xml
trunk/DOCS/xml/en/install.xml
trunk/help/help_mp-de.h
trunk/help/help_mp-en.h
Modified: trunk/Changelog
==============================================================================
--- trunk/Changelog Fri Feb 26 17:02:23 2021 (r38275)
+++ trunk/Changelog Fri Feb 26 17:23:07 2021 (r38276)
@@ -11,6 +11,8 @@ MPlayer
* Command line option -fs is now recognized in addition to the
GUI option load_fullscreen
* Use correct visual in OpenGL video output driver for X11
+ * Provide a built-in skin so that the GUI can be used even
+ without an installed skin
Other:
* Building on Arm now compiles for the ISA and extensions of the
Modified: trunk/gui/interface.c
==============================================================================
--- trunk/gui/interface.c Fri Feb 26 17:02:23 2021 (r38275)
+++ trunk/gui/interface.c Fri Feb 26 17:23:07 2021 (r38276)
@@ -78,6 +78,7 @@ guiInterface_t guiInfo = {
.PlaylistNext = True
};
+static int skin;
static int current_volume;
static int guiInitialized;
static int orig_fontconfig;
@@ -268,7 +269,9 @@ void guiInit(void)
mp_msg(MSGT_GPLAYER, MSGL_DBG2, "[interface] skin directory #1: %s\n", skinDirInHome);
mp_msg(MSGT_GPLAYER, MSGL_DBG2, "[interface] skin directory #2: %s\n", skinDirInData);
- if (!skinName)
+ skin = (skinName != NULL);
+
+ if (!skin)
skinName = strdup("default");
ret = skinRead(skinName);
@@ -282,8 +285,17 @@ void guiInit(void)
switch (ret) {
case -1:
+ if (skin) {
gmp_msg(MSGT_GPLAYER, MSGL_FATAL, MSGTR_GUI_MSG_SkinCfgNotFound, skinName);
mplayer(MPLAYER_EXIT_GUI, EXIT_ERROR, 0);
+ } else {
+ if (skinRead("Noskin") != 0)
+ mplayer(MPLAYER_EXIT_GUI, EXIT_ERROR, 0);
+
+ gtkMessageBox(MSGBOX_WARNING, MSGTR_GUI_MSG_NoSkinInstalled);
+ setdup(&skinName, "");
+ break;
+ }
case -2:
gmp_msg(MSGT_GPLAYER, MSGL_FATAL, MSGTR_GUI_MSG_SkinCfgError, skinName);
Modified: trunk/gui/skin/skin.c
==============================================================================
--- trunk/gui/skin/skin.c Fri Feb 26 17:02:23 2021 (r38275)
+++ trunk/gui/skin/skin.c Fri Feb 26 17:23:07 2021 (r38276)
@@ -1285,6 +1285,9 @@ int skinRead(char *sname)
unsigned char param[256];
unsigned int i;
+ if (*sname == 0 || strcmp(sname, "Noskin") == 0)
+ return skinNoskin();
+
skinfname = setname(skinDirInHome, sname);
if ((skinfile = fopen(skinfname, "rt")) == NULL) {
More information about the MPlayer-cvslog
mailing list