[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: extragear/utils/yakuake
From: Eike Hein <hein () kde ! org>
Date: 2010-01-30 1:17:24
Message-ID: 1264814244.949677.31616.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 1082220 by hein:
Use a KNotify notification rather than KPassivePopup for
the startup notification. Thanks to Chief Engineer Torres
for the patch.
BUG:200904
M +4 -0 ChangeLog
M +14 -6 app/mainwindow.cpp
--- trunk/extragear/utils/yakuake/ChangeLog #1082219:1082220
@@ -6,6 +6,10 @@
be shown on the tab label. The icon can be provided by the skin, or, if
the skin does not provide one, it will be procured from the system icon
theme.
+* Thanks to API improvements in the KDE libraries in KDE SC 4.4 a KNotify
+ notification is now used for announcing that Yakuake was started success-
+ fully, rather than the passive popup in the top-left desktop corner used
+ with older versions of the KDE platform.
Changes in 2.9.6:
--- trunk/extragear/utils/yakuake/app/mainwindow.cpp #1082219:1082220
@@ -36,7 +36,11 @@
#include <KHelpMenu>
#include <KMenu>
#include <KMessageBox>
-#include <KPassivePopup>
+#if KDE_IS_VERSION(4,3,95)
+ #include <KNotification>
+#else
+ #include <KPassivePopup>
+#endif
#include <KShortcutsDialog>
#include <KStandardAction>
#include <KToggleFullScreenAction>
@@ -974,19 +978,23 @@
void MainWindow::showStartupPopup()
{
KAction* action = \
static_cast<KAction*>(actionCollection()->action("toggle-window-state"));
- QString shortcut = action->globalShortcut().toString();
+ QString shortcut(action->globalShortcut().toString());
+ QString title(i18nc("@title:window", "<application>Yakuake</application> \
Notification")); + QString message(i18nc("@info", "Application successfully \
started.<nl/>" "Press <shortcut>%1</shortcut> to use it ...", shortcut));
+#if KDE_IS_VERSION(4,3,95)
+ KNotification::event(KNotification::Notification, title, message,
+ KIconLoader::global()->loadIcon("yakuake", KIconLoader::Desktop));
+#else
KPassivePopup* popup = new KPassivePopup();
popup->setAutoDelete(true);
popup->setTimeout(5000);
- popup->setView(popup->standardView(i18nc("@title:window",
- "<application>Yakuake</application> Notification"),
- i18nc("@info", "Application successfully started.<nl/>"
- "Press <shortcut>%1</shortcut> to use it...", shortcut),
+ popup->setView(popup->standardView(title, message,
KIconLoader::global()->loadIcon("yakuake", KIconLoader::Small)));
popup->show(getDesktopGeometry().topLeft());
+#endif
}
void MainWindow::showFirstRunDialog()
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic