mirror of
https://bitbucket.org/smil3y/kde-workspace.git
synced 2025-02-23 18:32:50 +00:00
generic: enable session management for all GUI applications
to what degree session management is supported is different story, e.g. if there is no kRestoreMainWindows<T>() call (or other method that actually restores state) then the application is simply started again on login and placed where it was in the window state it was by the window manager Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
parent
1512fbcac4
commit
c6b591023e
9 changed files with 9 additions and 1 deletions
|
@ -119,8 +119,8 @@ int main(int argc, char **argv) {
|
||||||
|
|
||||||
bool browser = args->isSet("browser");
|
bool browser = args->isSet("browser");
|
||||||
|
|
||||||
//KApplication::disableAutoDcopRegistration();
|
|
||||||
KApplication app;
|
KApplication app;
|
||||||
|
app.enableSessionManagement();
|
||||||
|
|
||||||
bool gotFilenameArg = (args->count() == 1);
|
bool gotFilenameArg = (args->count() == 1);
|
||||||
|
|
||||||
|
|
|
@ -58,6 +58,7 @@ int main( int argc, char ** argv )
|
||||||
KCmdLineArgs::addCmdLineOptions( options );
|
KCmdLineArgs::addCmdLineOptions( options );
|
||||||
|
|
||||||
KApplication app;
|
KApplication app;
|
||||||
|
app.enableSessionManagement();
|
||||||
|
|
||||||
KCmdLineArgs *args= KCmdLineArgs::parsedArgs();
|
KCmdLineArgs *args= KCmdLineArgs::parsedArgs();
|
||||||
|
|
||||||
|
|
|
@ -56,5 +56,6 @@ int main(int argc, char *argv[])
|
||||||
KCmdLineArgs::init( argc, argv, &aboutData );
|
KCmdLineArgs::init( argc, argv, &aboutData );
|
||||||
|
|
||||||
KicApp Kic;
|
KicApp Kic;
|
||||||
|
Kic.enableSessionManagement();
|
||||||
return Kic.exec();
|
return Kic.exec();
|
||||||
}
|
}
|
||||||
|
|
|
@ -68,6 +68,7 @@ int main(int argc, char **argv) {
|
||||||
KCmdLineArgs::addCmdLineOptions(option);
|
KCmdLineArgs::addCmdLineOptions(option);
|
||||||
|
|
||||||
KApplication *kapplication = new KApplication();
|
KApplication *kapplication = new KApplication();
|
||||||
|
kapplication->enableSessionManagement();
|
||||||
KMailDialog kmaildialog;
|
KMailDialog kmaildialog;
|
||||||
kmaildialog.setButtons(KDialog::Ok | KDialog::Close | KDialog::Help);
|
kmaildialog.setButtons(KDialog::Ok | KDialog::Close | KDialog::Help);
|
||||||
kmaildialog.show();
|
kmaildialog.show();
|
||||||
|
|
|
@ -45,6 +45,7 @@ int main(int argc, char **argv) {
|
||||||
KCmdLineArgs::addCmdLineOptions(option);
|
KCmdLineArgs::addCmdLineOptions(option);
|
||||||
|
|
||||||
KApplication app;
|
KApplication app;
|
||||||
|
app.enableSessionManagement();
|
||||||
if (app.isSessionRestored()) {
|
if (app.isSessionRestored()) {
|
||||||
kRestoreMainWindows<KMediaWindow>();
|
kRestoreMainWindows<KMediaWindow>();
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -74,6 +74,7 @@ int main( int argc, char **argv )
|
||||||
return 1;
|
return 1;
|
||||||
|
|
||||||
KMenuApplication app;
|
KMenuApplication app;
|
||||||
|
app.enableSessionManagement();
|
||||||
|
|
||||||
menuEdit = new KMenuEdit();
|
menuEdit = new KMenuEdit();
|
||||||
menuEdit->show();
|
menuEdit->show();
|
||||||
|
|
|
@ -36,6 +36,7 @@ int main(int argc, char **argv) {
|
||||||
|
|
||||||
KCmdLineArgs::init(argc, argv, &about);
|
KCmdLineArgs::init(argc, argv, &about);
|
||||||
KApplication a;
|
KApplication a;
|
||||||
|
a.enableSessionManagement();
|
||||||
|
|
||||||
KNetAttach na;
|
KNetAttach na;
|
||||||
a.connect( &a, SIGNAL(lastWindowClosed()), &a, SLOT(quit()) );
|
a.connect( &a, SIGNAL(lastWindowClosed()), &a, SLOT(quit()) );
|
||||||
|
|
|
@ -537,6 +537,7 @@ int main( int argc, char** argv )
|
||||||
KCmdLineArgs::addCmdLineOptions( options );
|
KCmdLineArgs::addCmdLineOptions( options );
|
||||||
// initialize KDE application
|
// initialize KDE application
|
||||||
KApplication *app = new KApplication();
|
KApplication *app = new KApplication();
|
||||||
|
app->enableSessionManagement();
|
||||||
|
|
||||||
KSGRD::SensorMgr = new KSGRD::SensorManager();
|
KSGRD::SensorMgr = new KSGRD::SensorManager();
|
||||||
KSGRD::Style = new KSGRD::StyleEngine();
|
KSGRD::Style = new KSGRD::StyleEngine();
|
||||||
|
|
|
@ -55,6 +55,7 @@ int main(int argc, char *argv[])
|
||||||
KCmdLineArgs::init(argc, argv, &aboutData);
|
KCmdLineArgs::init(argc, argv, &aboutData);
|
||||||
|
|
||||||
SystemSettingsApp application;
|
SystemSettingsApp application;
|
||||||
|
application.enableSessionManagement();
|
||||||
|
|
||||||
SettingsBase *mainWindow = new SettingsBase();
|
SettingsBase *mainWindow = new SettingsBase();
|
||||||
mainWindow->show();
|
mainWindow->show();
|
||||||
|
|
Loading…
Add table
Reference in a new issue