SHA256
1
0
forked from pool/yakuake
yakuake/yakuake-fix_Accesskey_handling_v2.diff

62 lines
1.9 KiB
Diff

--- yakuake-2.8_beta1/yakuake/src/main_window.cpp 2007-09-07 17:50:14.000000000 +0200
+++ yakuake-2.8_beta1/yakuake/src/main_window.cpp 2007-09-07 17:50:16.000000000 +0200
@@ -35,6 +35,8 @@
KMainWindow(parent, name, Qt::WStyle_Customize | Qt::WStyle_NoBorder),
step(0)
{
+ bool haveAccessKey = false;
+
first_run_dialog = 0;
about_app = 0;
about_kde = 0;
@@ -205,12 +207,20 @@
connect(tab_bar, SIGNAL(itemSelected(int)), this, SLOT(slotSelectSession(int)));
connect(&desk_info, SIGNAL(workAreaChanged()), this, SLOT(slotUpdateSize()));
+
// Startup notification popup.
- if (Settings::popup() && !Settings::firstrun())
- showPopup(i18n("Application successfully started!\nPress %1 to use it...").arg(global_key->shortcut("AccessKey").toString()));
+ if (!Settings::firstrun()) {
+ QString _key = global_key->shortcut("AccessKey").toString();
+ if (!_key.isEmpty()) {
+ if (Settings::popup()) {
+ showPopup(i18n("Application successfully started!\nPress %1 to use it...").arg(_key));
+ }
+ haveAccessKey = true;
+ }
+ }
// First run dialog.
- if (Settings::firstrun())
+ if (Settings::firstrun() || !haveAccessKey)
{
QTimer::singleShot(0, this, SLOT(slotToggleState()));
QTimer::singleShot(0, this, SLOT(slotOpenFirstRunDialog()));
@@ -1051,6 +1060,8 @@
global_key->updateConnections();
global_key->writeSettings(&config);
+ config.sync();
+
slotDialogFinished();
}
@@ -1066,6 +1077,8 @@
actionCollection()->writeShortcutSettings("Shortcuts", &config);
+ config.sync();
+
slotDialogFinished();
}
@@ -1179,6 +1192,7 @@
global_key->setShortcut("AccessKey", first_run_dialog_page->shortcut());
global_key->updateConnections();
global_key->writeSettings(&config);
+ config.sync();
}
Settings::setFirstrun(false);