From fd7a608ffe99df747f0496300276b95f766c18b9 Mon Sep 17 00:00:00 2001 From: tpearson Date: Fri, 3 Sep 2010 20:49:48 +0000 Subject: * Added Kickoff menu git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdebase@1171422 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- kicker/applets/media/mediumbutton.cpp | 55 ++++++++++++++++++----------------- 1 file changed, 28 insertions(+), 27 deletions(-) (limited to 'kicker/applets/media') diff --git a/kicker/applets/media/mediumbutton.cpp b/kicker/applets/media/mediumbutton.cpp index 5be2acbab..0fae43441 100644 --- a/kicker/applets/media/mediumbutton.cpp +++ b/kicker/applets/media/mediumbutton.cpp @@ -45,7 +45,8 @@ #include MediumButton::MediumButton(TQWidget *parent, const KFileItem &fileItem) - : PanelPopupButton(parent), mActions(this, this), mFileItem(fileItem) + : PanelPopupButton(parent), mActions(this, this), mFileItem(fileItem), mOpenTimer(0, + "MediumButton::mOpenTimer") { KAction *a = KStdAction::paste(this, TQT_SLOT(slotPaste()), &mActions, "pasteto"); @@ -74,9 +75,9 @@ MediumButton::MediumButton(TQWidget *parent, const KFileItem &fileItem) MediumButton::~MediumButton() { - TQPopupMenu *menu = popup(); - setPopup(0); - delete menu; + TQPopupMenu *menu = static_cast(popup()); + setPopup(0); + delete menu; } const KFileItem &MediumButton::fileItem() const @@ -94,29 +95,29 @@ void MediumButton::setFileItem(const KFileItem &fileItem) void MediumButton::initPopup() { - TQPopupMenu *old_popup = popup(); - - KFileItemList items; - items.append(&mFileItem); - - KonqPopupMenu::KonqPopupFlags kpf = - KonqPopupMenu::ShowProperties - | KonqPopupMenu::ShowNewWindow; - - KParts::BrowserExtension::PopupFlags bef = - KParts::BrowserExtension::DefaultPopupItems; - - KonqPopupMenu *new_popup = new KonqPopupMenu(0L, items, - KURL("media:/"), mActions, 0L, - this, kpf, bef); - KPopupTitle *title = new KPopupTitle(new_popup); - title->setTitle(mFileItem.text()); - - new_popup->insertItem(title, -1, 0); - - setPopup(new_popup); - - if (old_popup!=0L) delete old_popup; + TQPopupMenu *old_popup = static_cast(popup()); + + KFileItemList items; + items.append(&mFileItem); + + KonqPopupMenu::KonqPopupFlags kpf = + KonqPopupMenu::ShowProperties + | KonqPopupMenu::ShowNewWindow; + + KParts::BrowserExtension::PopupFlags bef = + KParts::BrowserExtension::DefaultPopupItems; + + KonqPopupMenu *new_popup = new KonqPopupMenu(0L, items, + KURL("media:/"), mActions, 0L, + this, kpf, bef); + KPopupTitle *title = new KPopupTitle(new_popup); + title->setTitle(mFileItem.text()); + + new_popup->insertItem(title, -1, 0); + + setPopup(new_popup); + + if (old_popup!=0L) delete old_popup; } void MediumButton::refreshType() -- cgit v1.2.1