[prev in list] [next in list] [prev in thread] [next in thread]
List: knode-devel
Subject: [Knode-devel] KDE/kdepim
From: Hamish Rodda <rodda () kde ! org>
Date: 2007-10-29 9:58:26
Message-ID: 1193651906.915954.26171.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 730678 by rodda:
Port to KActionCollection::associateWidget
M +1 -1 kalarm/birthdaydlg.cpp
M +2 -3 kalarm/templatedlg.cpp
M +1 -1 kmail/searchwindow.cpp
M +3 -4 knode/knarticlewindow.cpp
M +2 -1 knode/knmainwidget.cpp
M +2 -2 knotes/knote.cpp
M +2 -1 kontact/plugins/knotes/knotes_part_p.h
--- trunk/KDE/kdepim/kalarm/birthdaydlg.cpp #730677:730678
@@ -209,9 +209,9 @@
mSpecialActionsButton->setActions(Preferences::defaultPreAction(), Preferences::defaultPostAction());
KActionCollection* actions = new KActionCollection(this);
- actions->setAssociatedWidget(mListView);
KStandardAction::selectAll(mListView, SLOT(selectAll()), actions);
KStandardAction::deselect(mListView, SLOT(clearSelection()), actions);
+ actions->associateWidget(mListView);
enableButtonOk(false); // only enable OK button when something is selected
}
--- trunk/KDE/kdepim/kalarm/templatedlg.cpp #730677:730678
@@ -112,11 +112,10 @@
layout->addWidget(mDeleteButton);
KActionCollection* actions = new KActionCollection(this);
- actions->setAssociatedWidget(topLevelWidget());
KAction* act = KStandardAction::selectAll(mListView, SLOT(selectAll()), actions);
- act->setShortcutContext(Qt::WindowShortcut);
+ topLevelWidget()->addAction(act);
act = KStandardAction::deselect(mListView, SLOT(clearSelection()), actions);
- act->setShortcutContext(Qt::WindowShortcut);
+ topLevelWidget()->addAction(act);
slotSelectionChanged(); // enable/disable buttons as appropriate
--- trunk/KDE/kdepim/kmail/searchwindow.cpp #730677:730678
@@ -301,7 +301,6 @@
//set up actions
KActionCollection *ac = actionCollection();
- ac->setAssociatedWidget( this );
mReplyAction = new KAction(KIcon("mail-reply-sender"), i18n("&Reply..."), this);
actionCollection()->addAction("search_reply", mReplyAction );
connect(mReplyAction, SIGNAL(triggered(bool)), SLOT(slotReplyToMsg()));
@@ -343,6 +342,7 @@
connect(mCbxFolders, SIGNAL(folderChanged(KMFolder*)),
this, SLOT(slotFolderActivated()));
+ ac->associateWidget( this );
}
//-----------------------------------------------------------------------------
--- trunk/KDE/kdepim/knode/knarticlewindow.cpp #730677:730678
@@ -100,10 +100,6 @@
if ( art )
setCaption( art->subject()->asUnicodeString() );
- // this will enable keyboard-only actions like that don't appear in any menu
- //actionCollection()->setDefaultShortcutContext( Qt::WindowShortcut );
- actionCollection()->setAssociatedWidget( this );
-
mArticleWidget = new ArticleWidget( this, this, actionCollection() );
mArticleWidget->setArticle( art );
setCentralWidget( mArticleWidget );
@@ -120,6 +116,9 @@
resize(500,400); // default optimized for 800x600
applyMainWindowSettings(KConfigGroup( knGlobals.config(), "articleWindow_options") );
+
+ // this will enable keyboard-only actions like that don't appear in any menu
+ actionCollection()->associateWidget( this );
}
--- trunk/KDE/kdepim/knode/knmainwidget.cpp #730677:730678
@@ -101,7 +101,6 @@
//-------------------------------- <GUI> ------------------------------------
// this will enable keyboard-only actions like that don't appear in any menu
//actionCollection()->setDefaultShortcutContext( Qt::WindowShortcut );
- actionCollection()->setAssociatedWidget( this );
Q3Accel *accel = new Q3Accel( this );
initStatusBar();
@@ -237,6 +236,8 @@
show(); // the settings dialog must appear in front of the main window!
slotSettings();
}
+
+ actionCollection()->associateWidget( this );
}
KNMainWidget::~KNMainWidget()
--- trunk/KDE/kdepim/knotes/knote.cpp #730677:730678
@@ -600,8 +600,6 @@
void KNote::createActions()
{
- actionCollection()->setAssociatedWidget( this );
-
// create the menu items for the note - not the editor...
// rename, mail, print, save as, insert date, alarm, close, delete, new note
KAction *action;
@@ -687,6 +685,8 @@
actionCollection()->addAction( "walk_notes", action );
connect( action, SIGNAL( triggered( bool ) ), SIGNAL( sigShowNextNote() ) );
action->setShortcut( QKeySequence( Qt::SHIFT + Qt::Key_Backtab ) );
+
+ actionCollection()->associateWidget( this );
}
void KNote::createNoteHeader()
--- trunk/KDE/kdepim/kontact/plugins/knotes/knotes_part_p.h #730677:730678
@@ -139,7 +139,6 @@
setComponentData( KComponentData( "knotes" ) ); // TODO: memleak
setXMLFile( "knotesui.rc" );
- actionCollection()->setAssociatedWidget( this );
QWidget *page = new QWidget(this);
setMainWidget(page);
@@ -167,6 +166,8 @@
layout->addWidget( mTool );
layout->addWidget( mNoteEdit );
+
+ actionCollection()->associateWidget( this );
}
QString text() const
_______________________________________________
Knode-devel mailing list
Knode-devel@kde.org
https://mail.kde.org/mailman/listinfo/knode-devel
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic