console: re-enable debug console option

Keep console option hidden by default, but add using CLEMENTINE_DEBUG_CONSOLE
env variable:
CLEMENTINE_DEBUG_CONSOLE=1 clementine
This commit is contained in:
Jim Broadus 2020-05-25 15:53:22 -07:00 committed by John Maguire
parent c934fef637
commit a4e8d57de0
3 changed files with 9 additions and 2 deletions

View File

@ -154,6 +154,7 @@ void qt_mac_set_dock_menu(QMenu*);
const char* MainWindow::kSettingsGroup = "MainWindow";
const char* MainWindow::kAllFilesFilterSpec = QT_TR_NOOP("All Files (*)");
const char* MainWindow::kShowDebugConsoleKey = "CLEMENTINE_DEBUG_CONSOLE";
namespace {
const int kTrackSliderUpdateTimeMs = 500;
@ -919,8 +920,12 @@ MainWindow::MainWindow(Application* app, SystemTrayIcon* tray_icon, OSD* osd,
SLOT(EnableKittens(bool)));
connect(ui_->action_kittens, SIGNAL(toggled(bool)), app_->network_remote(),
SLOT(EnableKittens(bool)));
// Hide the console
// connect(ui_->action_console, SIGNAL(triggered()), SLOT(ShowConsole()));
QString showConsole =
QProcessEnvironment::systemEnvironment().value(kShowDebugConsoleKey, "0");
if (showConsole == "1")
connect(ui_->action_console, SIGNAL(triggered()), SLOT(ShowConsole()));
else
ui_->action_console->setVisible(false);
NowPlayingWidgetPositionChanged(ui_->now_playing->show_above_status_bar());
// Load theme

View File

@ -97,6 +97,7 @@ class MainWindow : public QMainWindow, public PlatformInterface {
static const char* kSettingsGroup;
static const char* kAllFilesFilterSpec;
static const char* kShowDebugConsoleKey;
// Don't change the values
enum StartupBehaviour {

View File

@ -536,6 +536,7 @@
<addaction name="action_hypnotoad"/>
<addaction name="action_enterprise"/>
<addaction name="action_kittens"/>
<addaction name="action_console"/>
<addaction name="separator"/>
</widget>
<widget class="QMenu" name="menu_tools">