summaryrefslogtreecommitdiff
path: root/noncore/apps/tinykate/mainwindow/tinykate.cpp
Unidiff
Diffstat (limited to 'noncore/apps/tinykate/mainwindow/tinykate.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/apps/tinykate/mainwindow/tinykate.cpp27
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
@@ -90,4 +90,5 @@ TinyKate::TinyKate( QWidget *parent, const char *name, WFlags f) :
90 90
91 //EDIT ACTIONS 91 //EDIT ACTIONS
92 popup = new QPopupMenu( this );
92 bool useBigIcon = qApp->desktop()->size().width() > 330; 93 bool useBigIcon = qApp->desktop()->size().width() > 330;
93 94
@@ -110,9 +111,16 @@ TinyKate::TinyKate( QWidget *parent, const char *name, WFlags f) :
110 editPaste->setIconSet( Opie::Core::OResource::loadPixmap( "paste", Opie::Core::OResource::SmallIcon ) ); 111 editPaste->setIconSet( Opie::Core::OResource::loadPixmap( "paste", Opie::Core::OResource::SmallIcon ) );
111 112
112 // Action for finding / replacing text 113 // Action for finding text
113 editFindReplace = new QToolButton( 0 ); 114 editFind = new QAction( tr( "Find..." ), Opie::Core::OResource::loadPixmap( "find", Opie::Core::OResource::SmallIcon ),
114 editFindReplace->setUsesBigPixmap( useBigIcon ); 115 QString::null, 0, this, 0 );
115 editFindReplace->setAutoRaise( true ); 116 editFind->addTo(popup);
116 editFindReplace->setIconSet( Opie::Core::OResource::loadPixmap( "find", Opie::Core::OResource::SmallIcon ) ); 117
118 // Action for replacing text
119 editReplace = new QAction( tr( "Replace..." ), QString::null, 0, this, 0 );
120 editReplace->addTo(popup);
121
122 // Action for going to a specific line
123 editGotoLine = new QAction( tr( "Goto Line..." ), QString::null, 0, this, 0 );
124 editGotoLine->addTo(popup);
117 125
118 // Action for undo 126 // Action for undo
@@ -128,4 +136,6 @@ TinyKate::TinyKate( QWidget *parent, const char *name, WFlags f) :
128 editRedo->setIconSet( Opie::Core::OResource::loadPixmap( "redo", Opie::Core::OResource::SmallIcon ) ); 136 editRedo->setIconSet( Opie::Core::OResource::loadPixmap( "redo", Opie::Core::OResource::SmallIcon ) );
129 137
138 mb->insertItem(tr("Edit"),popup);
139
130 //VIEW ACITONS 140 //VIEW ACITONS
131 popup = new QPopupMenu( this ); 141 popup = new QPopupMenu( this );
@@ -146,5 +156,4 @@ TinyKate::TinyKate( QWidget *parent, const char *name, WFlags f) :
146 mb->insertItem( editCopy ); 156 mb->insertItem( editCopy );
147 mb->insertItem( editPaste ); 157 mb->insertItem( editPaste );
148 mb->insertItem( editFindReplace );
149 mb->insertItem( editUndo ); 158 mb->insertItem( editUndo );
150 mb->insertItem( editRedo ); 159 mb->insertItem( editRedo );
@@ -247,4 +256,7 @@ void TinyKate::slotCurrentChanged( QWidget * view)
247 disconnect(editUndo,SIGNAL(clicked()),currentView,SLOT(undo())); 256 disconnect(editUndo,SIGNAL(clicked()),currentView,SLOT(undo()));
248 disconnect(editRedo,SIGNAL(clicked()),currentView,SLOT(redo())); 257 disconnect(editRedo,SIGNAL(clicked()),currentView,SLOT(redo()));
258 disconnect(editFind,SIGNAL(activated()),currentView,SLOT(find()));
259 disconnect(editReplace,SIGNAL(activated()),currentView,SLOT(replace()));
260 disconnect(editGotoLine,SIGNAL(activated()),currentView,SLOT(gotoLine()));
249 disconnect(viewIncFontSizes,SIGNAL(activated()), currentView,SLOT(slotIncFontSizes())); 261 disconnect(viewIncFontSizes,SIGNAL(activated()), currentView,SLOT(slotIncFontSizes()));
250 disconnect(viewDecFontSizes,SIGNAL(activated()), currentView,SLOT(slotDecFontSizes())); 262 disconnect(viewDecFontSizes,SIGNAL(activated()), currentView,SLOT(slotDecFontSizes()));
@@ -260,4 +272,7 @@ void TinyKate::slotCurrentChanged( QWidget * view)
260 connect(editUndo,SIGNAL(clicked()),currentView,SLOT(undo())); 272 connect(editUndo,SIGNAL(clicked()),currentView,SLOT(undo()));
261 connect(editRedo,SIGNAL(clicked()),currentView,SLOT(redo())); 273 connect(editRedo,SIGNAL(clicked()),currentView,SLOT(redo()));
274 connect(editFind,SIGNAL(activated()),currentView,SLOT(find()));
275 connect(editReplace,SIGNAL(activated()),currentView,SLOT(replace()));
276 connect(editGotoLine,SIGNAL(activated()),currentView,SLOT(gotoLine()));
262 connect(viewIncFontSizes,SIGNAL(activated()), currentView,SLOT(slotIncFontSizes())); 277 connect(viewIncFontSizes,SIGNAL(activated()), currentView,SLOT(slotIncFontSizes()));
263 connect(viewDecFontSizes,SIGNAL(activated()), currentView,SLOT(slotDecFontSizes())); 278 connect(viewDecFontSizes,SIGNAL(activated()), currentView,SLOT(slotDecFontSizes()));