summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--kate/app/katedocmanager.h1
-rw-r--r--kcontrol/randr/Makefile.am3
-rw-r--r--kcontrol/randr/krandrtray.cpp19
-rw-r--r--kcontrol/randr/krandrtray.h4
-rw-r--r--kdm/backend/ctrl.c2
5 files changed, 27 insertions, 2 deletions
diff --git a/kate/app/katedocmanager.h b/kate/app/katedocmanager.h
index 8d302687b..45931b655 100644
--- a/kate/app/katedocmanager.h
+++ b/kate/app/katedocmanager.h
@@ -25,6 +25,7 @@
#include <kate/document.h>
+#include <qdatetime.h>
#include <qguardedptr.h>
#include <qptrlist.h>
#include <qobject.h>
diff --git a/kcontrol/randr/Makefile.am b/kcontrol/randr/Makefile.am
index df085c858..cfb533eb7 100644
--- a/kcontrol/randr/Makefile.am
+++ b/kcontrol/randr/Makefile.am
@@ -17,6 +17,9 @@ xdg_apps_DATA = krandrtray.desktop
krandr_data_DATA = randr.desktop
krandr_datadir = $(kde_appsdir)/.hidden
+# Autostart
+autostartdir = $(prefix)/share/autostart
+autostart_DATA = krandrtray-autostart.desktop
#install-data-local: uninstall.desktop
# $(mkinstalldirs) $(DESTDIR)$(kde_appsdir)/Settings/Desktop
diff --git a/kcontrol/randr/krandrtray.cpp b/kcontrol/randr/krandrtray.cpp
index 8b230ba74..bee4a5e10 100644
--- a/kcontrol/randr/krandrtray.cpp
+++ b/kcontrol/randr/krandrtray.cpp
@@ -53,7 +53,7 @@ KRandRSystemTray::KRandRSystemTray(QWidget* parent, const char *name)
{
setPixmap(KSystemTray::loadSizedIcon("randr", width()));
setAlignment(Qt::AlignHCenter | Qt::AlignVCenter);
- connect(this, SIGNAL(quitSelected()), kapp, SLOT(quit()));
+ connect(this, SIGNAL(quitSelected()), this, SLOT(_quit()));
QToolTip::add(this, i18n("Screen resize & rotate"));
my_parent = parent;
@@ -88,6 +88,23 @@ KRandRSystemTray::KRandRSystemTray(QWidget* parent, const char *name)
}
}
+/*!
+ * \b SLOT which called if krandrtray is exited by the user. In this case the user
+ * is asked through a yes/no box if "KRandRTray should start automatically on log in" and the
+ * result is written to the KDE configfile.
+ */
+void KRandRSystemTray::_quit (){
+ r_config = new KSimpleConfig("krandrtrayrc");
+
+ QString tmp1 = i18n ("Start KRandRTray automatically when you log in?");
+ int tmp2 = KMessageBox::questionYesNo ( 0, tmp1, i18n("Question"), i18n("Start Automatically"), i18n("Do Not Start"));
+ r_config->setGroup("General");
+ r_config->writeEntry ("Autostart", tmp2 == KMessageBox::Yes);
+ r_config->sync ();
+
+ exit(0);
+}
+
void KRandRSystemTray::resizeEvent ( QResizeEvent * )
{
// Honor Free Desktop specifications that allow for arbitrary system tray icon sizes
diff --git a/kcontrol/randr/krandrtray.h b/kcontrol/randr/krandrtray.h
index 145fb89b0..640a38697 100644
--- a/kcontrol/randr/krandrtray.h
+++ b/kcontrol/randr/krandrtray.h
@@ -80,7 +80,11 @@ private:
int last_known_y;
KPopupMenu* m_menu;
+ KSimpleConfig *r_config;
KSimpleConfig *t_config;
+
+private slots:
+ void _quit();
};
#endif
diff --git a/kdm/backend/ctrl.c b/kdm/backend/ctrl.c
index add46241a..f7ed05308 100644
--- a/kdm/backend/ctrl.c
+++ b/kdm/backend/ctrl.c
@@ -169,7 +169,7 @@ openCtrl( struct display *d )
else if (unlink( sockdir ) && errno != ENOENT)
LogError( "unlink %\"s failed: %m; control socket will not be available\n",
sockdir );
- else if (!strApp( &cr->realdir, sockdir, "-XXXXXX", (char *)0))
+ else if (!StrApp( &cr->realdir, sockdir, "-XXXXXX", (char *)0))
;
else if (!mkTempDir( cr->realdir )) {
LogError( "mkdir %\"s failed: %m; control socket will not be available\n",