summaryrefslogtreecommitdiff
path: root/src/main.cpp
diff options
context:
space:
mode:
authorCalvin Morrison <calvin@pobox.com>2026-05-15 10:10:04 -0400
committerCalvin Morrison <calvin@pobox.com>2026-05-15 10:10:04 -0400
commite776bc768cf9afca1867200e25d64d315cd72a3e (patch)
tree6745527b939c9d37147d7dc98e8664437ee433f6 /src/main.cpp
parent4e602e78cdfc210ab7781668df2a88afb923258b (diff)
Full mixer implementation — tray, popup, prefs, devices tab with port indicators
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 <noreply@anthropic.com>
Diffstat (limited to 'src/main.cpp')
-rw-r--r--src/main.cpp28
1 files changed, 21 insertions, 7 deletions
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 <tdeapplication.h>
+#include <kuniqueapplication.h>
#include <tdecmdlineargs.h>
#include <tdeaboutdata.h>
#include <tdelocale.h>
+#include <tdeconfig.h>
+#include <tdeglobal.h>
#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();
}