mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-28 07:51:19 +02:00
-add CBouquetManager writenames menu
This commit is contained in:
@@ -1200,6 +1200,7 @@ menu.hint_scan_auto Automatischer Suchlauf ausgewählter Anbieter
|
|||||||
menu.hint_scan_autoall Automatischer Suchlauf aller ausgewählten Anbieter
|
menu.hint_scan_autoall Automatischer Suchlauf aller ausgewählten Anbieter
|
||||||
menu.hint_scan_autoall_select Suchlauf nur in ausgewählten Satelliten
|
menu.hint_scan_autoall_select Suchlauf nur in ausgewählten Satelliten
|
||||||
menu.hint_scan_bouquet erneuern: hinzufügen zu den Bouquets, löschen: entfernt alte Bouquets, nicht ändern: neue werden in 'Andere' angefügt
|
menu.hint_scan_bouquet erneuern: hinzufügen zu den Bouquets, löschen: entfernt alte Bouquets, nicht ändern: neue werden in 'Andere' angefügt
|
||||||
|
menu.hint_scan_bouquet_writenames Originale Programmnamen in Bouquets speichern \nNie > nur Favoriten > nur Anbieter > Beide
|
||||||
menu.hint_scan_bw Wählen Sie die Bandbreite
|
menu.hint_scan_bw Wählen Sie die Bandbreite
|
||||||
menu.hint_scan_cable Wählen Sie ihr Kabelnetz für den Suchlauf
|
menu.hint_scan_cable Wählen Sie ihr Kabelnetz für den Suchlauf
|
||||||
menu.hint_scan_cable_simple Kabel-Suchlauf mit optionaler Anbieter- und Kanal-Nummerierung
|
menu.hint_scan_cable_simple Kabel-Suchlauf mit optionaler Anbieter- und Kanal-Nummerierung
|
||||||
@@ -1992,6 +1993,11 @@ scants.bouquet_erase löschen
|
|||||||
scants.bouquet_leave nicht ändern
|
scants.bouquet_leave nicht ändern
|
||||||
scants.bouquet_satellite Satelliten-Bouquet
|
scants.bouquet_satellite Satelliten-Bouquet
|
||||||
scants.bouquet_update erneuern
|
scants.bouquet_update erneuern
|
||||||
|
scants.bouquet_writenames Originalnamen in Bouquets schreiben
|
||||||
|
scants.bouquet_writenames_bouquets nur Anbieter
|
||||||
|
scants.bouquet_writenames_ever Beide
|
||||||
|
scants.bouquet_writenames_never Nie
|
||||||
|
scants.bouquet_writenames_ubouquets nur Favoriten
|
||||||
scants.channel Kanal:
|
scants.channel Kanal:
|
||||||
scants.failed Kanalsuche fehlgeschlagen!
|
scants.failed Kanalsuche fehlgeschlagen!
|
||||||
scants.finished Kanalsuche erfolgreich beendet!
|
scants.finished Kanalsuche erfolgreich beendet!
|
||||||
|
@@ -1203,6 +1203,7 @@ menu.hint_scan_auto Auto-scan selected provider
|
|||||||
menu.hint_scan_autoall Scan several selected providers at once
|
menu.hint_scan_autoall Scan several selected providers at once
|
||||||
menu.hint_scan_autoall_select Add selected satellites to scan
|
menu.hint_scan_autoall_select Add selected satellites to scan
|
||||||
menu.hint_scan_bouquet Update: add to current bouquets, erase:\nremove old bouquets, leave: dont add or change
|
menu.hint_scan_bouquet Update: add to current bouquets, erase:\nremove old bouquets, leave: dont add or change
|
||||||
|
menu.hint_scan_bouquet_writenames Write services names to bouquets \n never > fovourites only > providers only > both
|
||||||
menu.hint_scan_bw Select the channel bandwidth
|
menu.hint_scan_bw Select the channel bandwidth
|
||||||
menu.hint_scan_cable Select cable network to scan
|
menu.hint_scan_cable Select cable network to scan
|
||||||
menu.hint_scan_cable_simple Cable scan with optional\nprovider channel numbering
|
menu.hint_scan_cable_simple Cable scan with optional\nprovider channel numbering
|
||||||
@@ -1995,6 +1996,11 @@ scants.bouquet_erase erase old
|
|||||||
scants.bouquet_leave leave current
|
scants.bouquet_leave leave current
|
||||||
scants.bouquet_satellite Satellite-Bouquet
|
scants.bouquet_satellite Satellite-Bouquet
|
||||||
scants.bouquet_update update
|
scants.bouquet_update update
|
||||||
|
scants.bouquet_writenames Write service names to bouquets
|
||||||
|
scants.bouquet_writenames_bouquets providers
|
||||||
|
scants.bouquet_writenames_ever both
|
||||||
|
scants.bouquet_writenames_never never
|
||||||
|
scants.bouquet_writenames_ubouquets favourites
|
||||||
scants.channel Channel:
|
scants.channel Channel:
|
||||||
scants.failed Transponderscan failed!
|
scants.failed Transponderscan failed!
|
||||||
scants.finished Transponderscan finished successfully!
|
scants.finished Transponderscan finished successfully!
|
||||||
|
@@ -655,7 +655,27 @@ int CScanSetup::showScanMenu()
|
|||||||
mc->setHint("", LOCALE_MENU_HINT_SCAN_BOUQUET);
|
mc->setHint("", LOCALE_MENU_HINT_SCAN_BOUQUET);
|
||||||
settings->addItem(mc);
|
settings->addItem(mc);
|
||||||
|
|
||||||
|
//bouquet write_names selection
|
||||||
|
const short SCANTS_BOUQUET_WRITENAMES_COUNT = 4;
|
||||||
|
const CMenuOptionChooser::keyval SCANTS_BOUQUET_WRITENAMES[SCANTS_BOUQUET_WRITENAMES_COUNT] =
|
||||||
|
{
|
||||||
|
{ CBouquetManager::BWN_NEVER , LOCALE_SCANTS_BOUQUET_WRITENAMES_NEVER },
|
||||||
|
{ CBouquetManager::BWN_UBOUQUETS , LOCALE_SCANTS_BOUQUET_WRITENAMES_UBOUQUETS },
|
||||||
|
{ CBouquetManager::BWN_BOUQUETS , LOCALE_SCANTS_BOUQUET_WRITENAMES_BOUQUETS },
|
||||||
|
{ CBouquetManager::BWN_EVER , LOCALE_SCANTS_BOUQUET_WRITENAMES_EVER }
|
||||||
|
};
|
||||||
|
|
||||||
|
int tmp_writeChannelsNames = zapitCfg.writeChannelsNames;
|
||||||
|
mc = new CMenuOptionChooser(LOCALE_SCANTS_BOUQUET_WRITENAMES, (int *)&zapitCfg.writeChannelsNames, SCANTS_BOUQUET_WRITENAMES, SCANTS_BOUQUET_WRITENAMES_COUNT, true, NULL, CRCInput::convertDigitToKey(shortcut++), "", true);
|
||||||
|
mc->setHint("", LOCALE_MENU_HINT_SCAN_BOUQUET_WRITENAMES);
|
||||||
|
settings->addItem(mc);
|
||||||
|
|
||||||
int res = settings->exec(NULL, "");
|
int res = settings->exec(NULL, "");
|
||||||
|
//set write_names if changed
|
||||||
|
if(zapitCfg.writeChannelsNames != tmp_writeChannelsNames){
|
||||||
|
CZapit::getInstance()->SetConfig(&zapitCfg);
|
||||||
|
g_Zapit->saveBouquets();
|
||||||
|
}
|
||||||
|
|
||||||
delete satOnOff;
|
delete satOnOff;
|
||||||
delete settings;
|
delete settings;
|
||||||
|
@@ -1230,6 +1230,7 @@ typedef enum
|
|||||||
LOCALE_MENU_HINT_SCAN_AUTOALL,
|
LOCALE_MENU_HINT_SCAN_AUTOALL,
|
||||||
LOCALE_MENU_HINT_SCAN_AUTOALL_SELECT,
|
LOCALE_MENU_HINT_SCAN_AUTOALL_SELECT,
|
||||||
LOCALE_MENU_HINT_SCAN_BOUQUET,
|
LOCALE_MENU_HINT_SCAN_BOUQUET,
|
||||||
|
LOCALE_MENU_HINT_SCAN_BOUQUET_WRITENAMES,
|
||||||
LOCALE_MENU_HINT_SCAN_BW,
|
LOCALE_MENU_HINT_SCAN_BW,
|
||||||
LOCALE_MENU_HINT_SCAN_CABLE,
|
LOCALE_MENU_HINT_SCAN_CABLE,
|
||||||
LOCALE_MENU_HINT_SCAN_CABLE_SIMPLE,
|
LOCALE_MENU_HINT_SCAN_CABLE_SIMPLE,
|
||||||
@@ -2022,6 +2023,11 @@ typedef enum
|
|||||||
LOCALE_SCANTS_BOUQUET_LEAVE,
|
LOCALE_SCANTS_BOUQUET_LEAVE,
|
||||||
LOCALE_SCANTS_BOUQUET_SATELLITE,
|
LOCALE_SCANTS_BOUQUET_SATELLITE,
|
||||||
LOCALE_SCANTS_BOUQUET_UPDATE,
|
LOCALE_SCANTS_BOUQUET_UPDATE,
|
||||||
|
LOCALE_SCANTS_BOUQUET_WRITENAMES,
|
||||||
|
LOCALE_SCANTS_BOUQUET_WRITENAMES_BOUQUETS,
|
||||||
|
LOCALE_SCANTS_BOUQUET_WRITENAMES_EVER,
|
||||||
|
LOCALE_SCANTS_BOUQUET_WRITENAMES_NEVER,
|
||||||
|
LOCALE_SCANTS_BOUQUET_WRITENAMES_UBOUQUETS,
|
||||||
LOCALE_SCANTS_CHANNEL,
|
LOCALE_SCANTS_CHANNEL,
|
||||||
LOCALE_SCANTS_FAILED,
|
LOCALE_SCANTS_FAILED,
|
||||||
LOCALE_SCANTS_FINISHED,
|
LOCALE_SCANTS_FINISHED,
|
||||||
|
@@ -1230,6 +1230,7 @@ const char * locale_real_names[] =
|
|||||||
"menu.hint_scan_autoall",
|
"menu.hint_scan_autoall",
|
||||||
"menu.hint_scan_autoall_select",
|
"menu.hint_scan_autoall_select",
|
||||||
"menu.hint_scan_bouquet",
|
"menu.hint_scan_bouquet",
|
||||||
|
"menu.hint_scan_bouquet_writenames",
|
||||||
"menu.hint_scan_bw",
|
"menu.hint_scan_bw",
|
||||||
"menu.hint_scan_cable",
|
"menu.hint_scan_cable",
|
||||||
"menu.hint_scan_cable_simple",
|
"menu.hint_scan_cable_simple",
|
||||||
@@ -2022,6 +2023,11 @@ const char * locale_real_names[] =
|
|||||||
"scants.bouquet_leave",
|
"scants.bouquet_leave",
|
||||||
"scants.bouquet_satellite",
|
"scants.bouquet_satellite",
|
||||||
"scants.bouquet_update",
|
"scants.bouquet_update",
|
||||||
|
"scants.bouquet_writenames",
|
||||||
|
"scants.bouquet_writenames_bouquets",
|
||||||
|
"scants.bouquet_writenames_ever",
|
||||||
|
"scants.bouquet_writenames_never",
|
||||||
|
"scants.bouquet_writenames_ubouquets",
|
||||||
"scants.channel",
|
"scants.channel",
|
||||||
"scants.failed",
|
"scants.failed",
|
||||||
"scants.finished",
|
"scants.finished",
|
||||||
|
@@ -132,6 +132,13 @@ class CBouquetManager
|
|||||||
void sortBouquets(void);
|
void sortBouquets(void);
|
||||||
void setBouquetLock(const unsigned int id, bool state);
|
void setBouquetLock(const unsigned int id, bool state);
|
||||||
void setBouquetLock(CZapitBouquet* bouquet, bool state);
|
void setBouquetLock(CZapitBouquet* bouquet, bool state);
|
||||||
|
//bouquet writeChannelsNames selection options
|
||||||
|
enum{
|
||||||
|
BWN_NEVER,
|
||||||
|
BWN_UBOUQUETS,
|
||||||
|
BWN_BOUQUETS,
|
||||||
|
BWN_EVER
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@@ -268,7 +268,7 @@ void CBouquetManager::saveBouquets(void)
|
|||||||
perror(BOUQUETS_XML);
|
perror(BOUQUETS_XML);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
fprintf(bouq_fd, "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<zapit>\n");
|
fprintf(bouq_fd, "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<zapit api=\"4\">\n");
|
||||||
for (unsigned int i = 0; i < Bouquets.size(); i++) {
|
for (unsigned int i = 0; i < Bouquets.size(); i++) {
|
||||||
if (Bouquets[i] != remainChannels) {
|
if (Bouquets[i] != remainChannels) {
|
||||||
DBG("save Bouquets: name %s user: %d\n", Bouquets[i]->Name.c_str(), Bouquets[i]->bUser);
|
DBG("save Bouquets: name %s user: %d\n", Bouquets[i]->Name.c_str(), Bouquets[i]->bUser);
|
||||||
@@ -293,7 +293,7 @@ void CBouquetManager::saveUBouquets(void)
|
|||||||
perror(BOUQUETS_XML);
|
perror(BOUQUETS_XML);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
fprintf(ubouq_fd, "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<zapit>\n");
|
fprintf(ubouq_fd, "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<zapit api=\"4\">\n");
|
||||||
for (unsigned int i = 0; i < Bouquets.size(); i++) {
|
for (unsigned int i = 0; i < Bouquets.size(); i++) {
|
||||||
if (Bouquets[i] != remainChannels) {
|
if (Bouquets[i] != remainChannels) {
|
||||||
if(Bouquets[i]->bUser) {
|
if(Bouquets[i]->bUser) {
|
||||||
|
@@ -365,11 +365,11 @@ void CZapitChannel::dumpBouquetXml(FILE * fd, bool bUser)
|
|||||||
|
|
||||||
// service names
|
// service names
|
||||||
if (bUser || !url.empty()) {
|
if (bUser || !url.empty()) {
|
||||||
if ((write_names & 0x01) ==0x01)
|
if ((write_names & CBouquetManager::BWN_UBOUQUETS) == CBouquetManager::BWN_UBOUQUETS)
|
||||||
fprintf(fd, " n=\"%s\"", convert_UTF8_To_UTF8_XML(name.c_str()).c_str());
|
fprintf(fd, " n=\"%s\"", convert_UTF8_To_UTF8_XML(name.c_str()).c_str());
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
if ((write_names & 0x02) == 0x02)
|
if ((write_names & CBouquetManager::BWN_BOUQUETS) == CBouquetManager::BWN_BOUQUETS)
|
||||||
fprintf(fd, " n=\"%s\"", convert_UTF8_To_UTF8_XML(name.c_str()).c_str());
|
fprintf(fd, " n=\"%s\"", convert_UTF8_To_UTF8_XML(name.c_str()).c_str());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -299,7 +299,7 @@ void CZapit::LoadSettings()
|
|||||||
voltageOff = configfile.getBool("voltageOff", 0);
|
voltageOff = configfile.getBool("voltageOff", 0);
|
||||||
#endif
|
#endif
|
||||||
config.saveLastChannel = configfile.getBool("saveLastChannel", true);
|
config.saveLastChannel = configfile.getBool("saveLastChannel", true);
|
||||||
config.writeChannelsNames = configfile.getInt32("writeChannelsNames", 3);
|
config.writeChannelsNames = configfile.getInt32("writeChannelsNames", CBouquetManager::BWN_EVER );
|
||||||
/* FIXME Channels renum should be done for all channels atm. TODO*/
|
/* FIXME Channels renum should be done for all channels atm. TODO*/
|
||||||
//config.makeRemainingChannelsBouquet = configfile.getBool("makeRemainingChannelsBouquet", 1);
|
//config.makeRemainingChannelsBouquet = configfile.getBool("makeRemainingChannelsBouquet", 1);
|
||||||
config.makeRemainingChannelsBouquet = 1;
|
config.makeRemainingChannelsBouquet = 1;
|
||||||
|
Reference in New Issue
Block a user