channellist: allow epgtext alignment

Origin commit data
------------------
Branch: ni/coolstream
Commit: 3a657e3960
Author: vanhofen <vanhofen@gmx.de>
Date: 2022-05-06 (Fri, 06 May 2022)

Origin message was:
------------------
- channellist: allow epgtext alignment

------------------
No further description and justification available within origin commit message!

------------------
This commit was generated by Migit
This commit is contained in:
vanhofen
2022-05-06 23:41:05 +02:00
parent e2f5e5bfc0
commit 1658fe3b8f
11 changed files with 83 additions and 47 deletions

View File

@@ -1243,7 +1243,7 @@ int CNeutrinoApp::loadSetup(const char *fname)
g_settings.channellist_displaymode = DISPLAY_MODE_NOW;
g_settings.channellist_additional = configfile.getInt32("channellist_additional", 1); // default no minitv
g_settings.channellist_epgtext_align_right = configfile.getBool("channellist_epgtext_align_right", false);
g_settings.channellist_epgtext_alignment = configfile.getInt32("channellist_epgtext_alignment", EPGTEXT_ALIGN_LEFT_MIDDLE);
g_settings.channellist_foot = configfile.getInt32("channellist_foot", 1); // default next Event
g_settings.channellist_new_zap_mode = configfile.getInt32("channellist_new_zap_mode", 0);
g_settings.channellist_numeric_adjust = configfile.getInt32("channellist_numeric_adjust", 0);
@@ -1475,6 +1475,13 @@ void CNeutrinoApp::upgradeSetup(const char * fname)
g_settings.font_file_monospace = FONTDIR "/tuxtxt.ttf";
configfile.deleteKey("ttx_font_file");
}
if (g_settings.version_pseudo < "20220506230000")
{
g_settings.channellist_epgtext_alignment = configfile.getBool("channellist_epgtext_align_right", false);
if (g_settings.channellist_epgtext_alignment == 1) // old bool
g_settings.channellist_epgtext_alignment = EPGTEXT_ALIGN_RIGHT_MIDDLE;
configfile.deleteKey("channellist_epgtext_align_right");
}
g_settings.version_pseudo = NEUTRINO_VERSION_PSEUDO;
configfile.setString("version_pseudo", g_settings.version_pseudo);
@@ -2110,7 +2117,7 @@ void CNeutrinoApp::saveSetup(const char *fname)
// channellist
configfile.setInt32("channellist_additional", g_settings.channellist_additional);
configfile.setBool("channellist_epgtext_align_right", g_settings.channellist_epgtext_align_right);
configfile.setInt32("channellist_epgtext_alignment", g_settings.channellist_epgtext_alignment);
configfile.setInt32("channellist_foot", g_settings.channellist_foot);
configfile.setInt32("channellist_new_zap_mode", g_settings.channellist_new_zap_mode);
configfile.setInt32("channellist_numeric_adjust", g_settings.channellist_numeric_adjust);