From e776bc768cf9afca1867200e25d64d315cd72a3e Mon Sep 17 00:00:00 2001 From: Calvin Morrison Date: Fri, 15 May 2026 10:10:04 -0400 Subject: Full mixer implementation — tray, popup, prefs, devices tab with port indicators MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Adds the complete tmix feature set built since the initial skeleton: balance knob, level meters, KLed mute button, system tray with scroll-wheel volume and recording indicator, tray popup, preferences dialog, right-click context menus, single-instance enforcement, scroll area, window geometry persistence, and Devices tab with PA card profile switcher and live port availability indicators (2-column layout, in-place updates on plug/unplug). Co-Authored-By: Claude Sonnet 4.6 --- src/main.cpp | 28 +++++++++++++++++++++------- 1 file changed, 21 insertions(+), 7 deletions(-) (limited to 'src/main.cpp') diff --git a/src/main.cpp b/src/main.cpp index 6a8c6a8..e8e7d36 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -1,10 +1,13 @@ -#include +#include #include #include #include +#include +#include #include "model/pulsemodel.h" #include "ui/mixerwindow.h" +#include "ui/tmixapp.h" static TDECmdLineOptions options[] = { TDECmdLineLastOption }; @@ -20,16 +23,27 @@ int main( int argc, char **argv ) TDECmdLineArgs::init( argc, argv, &about ); TDECmdLineArgs::addCmdLineOptions( options ); - TDEApplication app; + KUniqueApplication::addCmdLineOptions(); - PulseModel model; - if ( !model.open() ) { - // TODO: show error dialog + if ( !KUniqueApplication::start() ) + return 0; + + TmixApp app; + app.disableSessionManagement(); + + PulseModel *model = new PulseModel; + if ( !model->open() ) { + delete model; return 1; } - MixerWindow win( &model ); - win.show(); + MixerWindow *win = new MixerWindow( model ); + app.setMainWindow( win ); + + TDEConfig *cfg = TDEGlobal::config(); + cfg->setGroup("General"); + if ( !cfg->readBoolEntry("DockInTray", true) ) + win->show(); return app.exec(); } -- cgit v1.2.3