mirror of
https://bitbucket.org/smil3y/kde-workspace.git
synced 2025-02-23 02:12:51 +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");
|
||||
|
||||
//KApplication::disableAutoDcopRegistration();
|
||||
KApplication app;
|
||||
app.enableSessionManagement();
|
||||
|
||||
bool gotFilenameArg = (args->count() == 1);
|
||||
|
||||
|
|
|
@ -58,6 +58,7 @@ int main( int argc, char ** argv )
|
|||
KCmdLineArgs::addCmdLineOptions( options );
|
||||
|
||||
KApplication app;
|
||||
app.enableSessionManagement();
|
||||
|
||||
KCmdLineArgs *args= KCmdLineArgs::parsedArgs();
|
||||
|
||||
|
|
|
@ -56,5 +56,6 @@ int main(int argc, char *argv[])
|
|||
KCmdLineArgs::init( argc, argv, &aboutData );
|
||||
|
||||
KicApp Kic;
|
||||
Kic.enableSessionManagement();
|
||||
return Kic.exec();
|
||||
}
|
||||
|
|
|
@ -68,6 +68,7 @@ int main(int argc, char **argv) {
|
|||
KCmdLineArgs::addCmdLineOptions(option);
|
||||
|
||||
KApplication *kapplication = new KApplication();
|
||||
kapplication->enableSessionManagement();
|
||||
KMailDialog kmaildialog;
|
||||
kmaildialog.setButtons(KDialog::Ok | KDialog::Close | KDialog::Help);
|
||||
kmaildialog.show();
|
||||
|
|
|
@ -45,6 +45,7 @@ int main(int argc, char **argv) {
|
|||
KCmdLineArgs::addCmdLineOptions(option);
|
||||
|
||||
KApplication app;
|
||||
app.enableSessionManagement();
|
||||
if (app.isSessionRestored()) {
|
||||
kRestoreMainWindows<KMediaWindow>();
|
||||
} else {
|
||||
|
|
|
@ -74,6 +74,7 @@ int main( int argc, char **argv )
|
|||
return 1;
|
||||
|
||||
KMenuApplication app;
|
||||
app.enableSessionManagement();
|
||||
|
||||
menuEdit = new KMenuEdit();
|
||||
menuEdit->show();
|
||||
|
|
|
@ -36,6 +36,7 @@ int main(int argc, char **argv) {
|
|||
|
||||
KCmdLineArgs::init(argc, argv, &about);
|
||||
KApplication a;
|
||||
a.enableSessionManagement();
|
||||
|
||||
KNetAttach na;
|
||||
a.connect( &a, SIGNAL(lastWindowClosed()), &a, SLOT(quit()) );
|
||||
|
|
|
@ -537,6 +537,7 @@ int main( int argc, char** argv )
|
|||
KCmdLineArgs::addCmdLineOptions( options );
|
||||
// initialize KDE application
|
||||
KApplication *app = new KApplication();
|
||||
app->enableSessionManagement();
|
||||
|
||||
KSGRD::SensorMgr = new KSGRD::SensorManager();
|
||||
KSGRD::Style = new KSGRD::StyleEngine();
|
||||
|
|
|
@ -55,6 +55,7 @@ int main(int argc, char *argv[])
|
|||
KCmdLineArgs::init(argc, argv, &aboutData);
|
||||
|
||||
SystemSettingsApp application;
|
||||
application.enableSessionManagement();
|
||||
|
||||
SettingsBase *mainWindow = new SettingsBase();
|
||||
mainWindow->show();
|
||||
|
|
Loading…
Add table
Reference in a new issue