summaryrefslogtreecommitdiff
path: root/noncore/apps/tinykate/tinykate.cpp
Unidiff
Diffstat (limited to 'noncore/apps/tinykate/tinykate.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/apps/tinykate/tinykate.cpp27
1 files changed, 11 insertions, 16 deletions
diff --git a/noncore/apps/tinykate/tinykate.cpp b/noncore/apps/tinykate/tinykate.cpp
index aecc1bd..a25f81f 100644
--- a/noncore/apps/tinykate/tinykate.cpp
+++ b/noncore/apps/tinykate/tinykate.cpp
@@ -26,11 +26,6 @@
26#include <opie/ofiledialog.h> 26#include <opie/ofiledialog.h>
27 27
28#include "tinykate.h" 28#include "tinykate.h"
29#include "pics/file-new.xpm"
30#include "pics/file-open.xpm"
31#include "pics/file-save.xpm"
32#include "pics/edit-undo.xpm"
33#include "pics/edit-redo.xpm"
34 29
35#include <katedocument.h> 30#include <katedocument.h>
36#include <katehighlight.h> 31#include <katehighlight.h>
@@ -39,7 +34,7 @@
39 34
40TinyKate::TinyKate( QWidget *parent, const char *name, WFlags f) : 35TinyKate::TinyKate( QWidget *parent, const char *name, WFlags f) :
41 QMainWindow( parent, name, f ) 36 QMainWindow( parent, name, f )
42{ 37{
43 nextUnnamed=0; 38 nextUnnamed=0;
44 currentView=0; 39 currentView=0;
45 viewCount=0; 40 viewCount=0;
@@ -61,31 +56,31 @@ TinyKate::TinyKate( QWidget *parent, const char *name, WFlags f) :
61 QPopupMenu *popup = new QPopupMenu( this ); 56 QPopupMenu *popup = new QPopupMenu( this );
62 57
63 // Action for creating a new document 58 // Action for creating a new document
64 QAction *a = new QAction( tr( "New" ), QPixmap((const char**)file_new_xpm ), QString::null, 0, this, 0 ); 59 QAction *a = new QAction( tr( "New" ), Resource::loadPixmap( "new" ), QString::null, 0, this, 0 );
65 a->addTo( popup ); 60 a->addTo( popup );
66 connect(a, SIGNAL(activated()), this, SLOT(slotNew())); 61 connect(a, SIGNAL(activated()), this, SLOT(slotNew()));
67 62
68 // Action for opening an exisiting document 63 // Action for opening an exisiting document
69 a = new QAction( tr( "Open" ), QPixmap((const char**)file_open_xpm), QString::null, 0, this, 0 ); 64 a = new QAction( tr( "Open" ),Resource::loadPixmap( "fileopen" ) , QString::null, 0, this, 0 );
70 a->addTo(popup); 65 a->addTo(popup);
71 connect(a, SIGNAL(activated()), this, SLOT(slotOpen())); 66 connect(a, SIGNAL(activated()), this, SLOT(slotOpen()));
72 67
73 68
74 // Action for saving document 69 // Action for saving document
75 a = new QAction( tr( "Save" ), QPixmap((const char**)file_save_xpm), QString::null, 0, this, 0 ); 70 a = new QAction( tr( "Save" ), Resource::loadPixmap( "save" ) , QString::null, 0, this, 0 );
76 a->addTo(popup); 71 a->addTo(popup);
77 connect(a, SIGNAL(activated()), this, SLOT(slotSave())); 72 connect(a, SIGNAL(activated()), this, SLOT(slotSave()));
78 73
79 // Action for saving document to a new name 74 // Action for saving document to a new name
80 a = new QAction( tr( "Save As" ), QPixmap((const char**)file_save_xpm), QString::null, 0, this, 0 ); 75 a = new QAction( tr( "Save As" ),Resource::loadPixmap( "save" ) , QString::null, 0, this, 0 );
81 a->addTo(popup); 76 a->addTo(popup);
82 connect(a, SIGNAL(activated()), this, SLOT(slotSaveAs())); 77 connect(a, SIGNAL(activated()), this, SLOT(slotSaveAs()));
83 78
84 // Action for closing the currently active document 79 // Action for closing the currently active document
85 a = new QAction( tr( "Close" ), QPixmap(), QString::null, 0, this, 0 ); 80 a = new QAction( tr( "Close" ), Resource::loadPixmap( "quit_icon" ) , QString::null, 0, this, 0 );
86 a->addTo(popup); 81 a->addTo(popup);
87 connect(a, SIGNAL(activated()), this, SLOT(slotClose())); 82 connect(a, SIGNAL(activated()), this, SLOT(slotClose()));
88 83
89 84
90 mb->insertItem(tr("File"),popup); 85 mb->insertItem(tr("File"),popup);
91 86
@@ -109,16 +104,16 @@ TinyKate::TinyKate( QWidget *parent, const char *name, WFlags f) :
109 editFindReplace->addTo( bar ); 104 editFindReplace->addTo( bar );
110 105
111 // Action for undo 106 // Action for undo
112 editUndo = new QAction( tr( "Undo" ), QPixmap((const char**)edit_undo_xpm), QString::null, 0, this, 0 ); 107 editUndo = new QAction( tr( "Undo" ),Resource::loadPixmap( "undo" ) , QString::null, 0, this, 0 );
113 editUndo->addTo( bar ); 108 editUndo->addTo( bar );
114 109
115 // Action for redo 110 // Action for redo
116 editRedo = new QAction( tr( "Redo" ), QPixmap((const char**)edit_redo_xpm), QString::null, 0, this, 0 ); 111 editRedo = new QAction( tr( "Redo" ),Resource::loadPixmap( "redo" ) , QString::null, 0, this, 0 );
117 editRedo->addTo( bar ); 112 editRedo->addTo( bar );
118 113
119//VIEW ACITONS 114//VIEW ACITONS
120 popup = new QPopupMenu( this ); 115 popup = new QPopupMenu( this );
121 116
122 viewIncFontSizes = new QAction( tr( "Font +" ), QString::null, 0, this, 0 ); 117 viewIncFontSizes = new QAction( tr( "Font +" ), QString::null, 0, this, 0 );
123 viewIncFontSizes->addTo( popup ); 118 viewIncFontSizes->addTo( popup );
124 119
@@ -198,7 +193,7 @@ void TinyKate::slotCurrentChanged( QWidget * view)
198 } 193 }
199 194
200 currentView=(KTextEditor::View*)view; 195 currentView=(KTextEditor::View*)view;
201 196
202 connect(editCopy,SIGNAL(activated()),currentView,SLOT(copy())); 197 connect(editCopy,SIGNAL(activated()),currentView,SLOT(copy()));
203 connect(editCut,SIGNAL(activated()),currentView,SLOT(cut())); 198 connect(editCut,SIGNAL(activated()),currentView,SLOT(cut()));
204 connect(editPaste,SIGNAL(activated()),currentView,SLOT(paste())); 199 connect(editPaste,SIGNAL(activated()),currentView,SLOT(paste()));