Diffstat (limited to 'noncore/apps/tinykate/mainwindow/tinykate.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/apps/tinykate/mainwindow/tinykate.cpp | 27 |
1 files changed, 21 insertions, 6 deletions
diff --git a/noncore/apps/tinykate/mainwindow/tinykate.cpp b/noncore/apps/tinykate/mainwindow/tinykate.cpp index e808a2e..b1b88e9 100644 --- a/noncore/apps/tinykate/mainwindow/tinykate.cpp +++ b/noncore/apps/tinykate/mainwindow/tinykate.cpp @@ -91,2 +91,3 @@ TinyKate::TinyKate( QWidget *parent, const char *name, WFlags f) : //EDIT ACTIONS + popup = new QPopupMenu( this ); bool useBigIcon = qApp->desktop()->size().width() > 330; @@ -111,7 +112,14 @@ TinyKate::TinyKate( QWidget *parent, const char *name, WFlags f) : - // Action for finding / replacing text - editFindReplace = new QToolButton( 0 ); - editFindReplace->setUsesBigPixmap( useBigIcon ); - editFindReplace->setAutoRaise( true ); - editFindReplace->setIconSet( Opie::Core::OResource::loadPixmap( "find", Opie::Core::OResource::SmallIcon ) ); + // Action for finding text + editFind = new QAction( tr( "Find..." ), Opie::Core::OResource::loadPixmap( "find", Opie::Core::OResource::SmallIcon ), + QString::null, 0, this, 0 ); + editFind->addTo(popup); + + // Action for replacing text + editReplace = new QAction( tr( "Replace..." ), QString::null, 0, this, 0 ); + editReplace->addTo(popup); + + // Action for going to a specific line + editGotoLine = new QAction( tr( "Goto Line..." ), QString::null, 0, this, 0 ); + editGotoLine->addTo(popup); @@ -129,2 +137,4 @@ TinyKate::TinyKate( QWidget *parent, const char *name, WFlags f) : + mb->insertItem(tr("Edit"),popup); + //VIEW ACITONS @@ -147,3 +157,2 @@ TinyKate::TinyKate( QWidget *parent, const char *name, WFlags f) : mb->insertItem( editPaste ); - mb->insertItem( editFindReplace ); mb->insertItem( editUndo ); @@ -248,2 +257,5 @@ void TinyKate::slotCurrentChanged( QWidget * view) disconnect(editRedo,SIGNAL(clicked()),currentView,SLOT(redo())); + disconnect(editFind,SIGNAL(activated()),currentView,SLOT(find())); + disconnect(editReplace,SIGNAL(activated()),currentView,SLOT(replace())); + disconnect(editGotoLine,SIGNAL(activated()),currentView,SLOT(gotoLine())); disconnect(viewIncFontSizes,SIGNAL(activated()), currentView,SLOT(slotIncFontSizes())); @@ -261,2 +273,5 @@ void TinyKate::slotCurrentChanged( QWidget * view) connect(editRedo,SIGNAL(clicked()),currentView,SLOT(redo())); + connect(editFind,SIGNAL(activated()),currentView,SLOT(find())); + connect(editReplace,SIGNAL(activated()),currentView,SLOT(replace())); + connect(editGotoLine,SIGNAL(activated()),currentView,SLOT(gotoLine())); connect(viewIncFontSizes,SIGNAL(activated()), currentView,SLOT(slotIncFontSizes())); |