summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--noncore/apps/tinykate/libkate/microkde/kiconloader.cpp12
-rw-r--r--noncore/apps/tinykate/mainwindow/tinykate.cpp40
2 files changed, 33 insertions, 19 deletions
diff --git a/noncore/apps/tinykate/libkate/microkde/kiconloader.cpp b/noncore/apps/tinykate/libkate/microkde/kiconloader.cpp
index 83a2cad..c5fe5df 100644
--- a/noncore/apps/tinykate/libkate/microkde/kiconloader.cpp
+++ b/noncore/apps/tinykate/libkate/microkde/kiconloader.cpp
@@ -1,10 +1,10 @@
1#include <qpe/resource.h> 1#include <opie2/oresource.h>
2 2
3#include "kiconloader.h" 3#include "kiconloader.h"
4 4
5QPixmap KIconLoader::loadIcon( const QString &name, int ) 5QPixmap KIconLoader::loadIcon( const QString &name, int )
6{ 6{
7 return Resource::loadPixmap( "kate/" + name ); 7 return Opie::Core::OResource::loadPixmap( "kate/" + name, Opie::Core::OResource::SmallIcon );
8} 8}
9 9
10QString KIconLoader::iconPath( const QString &, int ) 10QString KIconLoader::iconPath( const QString &, int )
@@ -14,20 +14,20 @@ QString KIconLoader::iconPath( const QString &, int )
14 14
15QPixmap BarIcon( const QString &name ) 15QPixmap BarIcon( const QString &name )
16{ 16{
17 return Resource::loadPixmap( "kate/" + name ); 17 return Opie::Core::OResource::loadPixmap( "kate/" + name, Opie::Core::OResource::SmallIcon );
18} 18}
19 19
20QPixmap DesktopIcon( const QString &name, int ) 20QPixmap DesktopIcon( const QString &name, int )
21{ 21{
22 return Resource::loadPixmap( "kate/" + name ); 22 return Opie::Core::OResource::loadPixmap( "kate/" + name, Opie::Core::OResource::SmallIcon );
23} 23}
24 24
25QPixmap SmallIcon( const QString &name ) 25QPixmap SmallIcon( const QString &name )
26{ 26{
27 return Resource::loadPixmap( "kate/" + name ); 27 return Opie::Core::OResource::loadPixmap( "kate/" + name, Opie::Core::OResource::SmallIcon );
28} 28}
29 29
30QPixmap SmallIconSet( const QString &name ) 30QPixmap SmallIconSet( const QString &name )
31{ 31{
32 return Resource::loadPixmap( "kate/" + name ); 32 return Opie::Core::OResource::loadPixmap( "kate/" + name, Opie::Core::OResource::SmallIcon );
33} 33}
diff --git a/noncore/apps/tinykate/mainwindow/tinykate.cpp b/noncore/apps/tinykate/mainwindow/tinykate.cpp
index 8d19c71..bbb0be7e 100644
--- a/noncore/apps/tinykate/mainwindow/tinykate.cpp
+++ b/noncore/apps/tinykate/mainwindow/tinykate.cpp
@@ -23,7 +23,7 @@
23/* OPIE */ 23/* OPIE */
24#include <opie2/odebug.h> 24#include <opie2/odebug.h>
25#include <opie2/ofiledialog.h> 25#include <opie2/ofiledialog.h>
26#include <qpe/resource.h> 26#include <opie2/oresource.h>
27#include <qpe/qpeapplication.h> 27#include <qpe/qpeapplication.h>
28 28
29/* QT */ 29/* QT */
@@ -55,28 +55,33 @@ TinyKate::TinyKate( QWidget *parent, const char *name, WFlags f) :
55 QPopupMenu *popup = new QPopupMenu( this ); 55 QPopupMenu *popup = new QPopupMenu( this );
56 56
57 // Action for creating a new document 57 // Action for creating a new document
58 QAction *a = new QAction( tr( "New" ), Resource::loadPixmap( "new" ), QString::null, 0, this, 0 ); 58 QAction *a = new QAction( tr( "New" ), Opie::Core::OResource::loadPixmap( "new", Opie::Core::OResource::SmallIcon ),
59 QString::null, 0, this, 0 );
59 a->addTo( popup ); 60 a->addTo( popup );
60 connect(a, SIGNAL(activated()), this, SLOT(slotNew())); 61 connect(a, SIGNAL(activated()), this, SLOT(slotNew()));
61 62
62 // Action for opening an exisiting document 63 // Action for opening an exisiting document
63 a = new QAction( tr( "Open" ),Resource::loadPixmap( "fileopen" ) , QString::null, 0, this, 0 ); 64 a = new QAction( tr( "Open" ), Opie::Core::OResource::loadPixmap( "fileopen", Opie::Core::OResource::SmallIcon ),
65 QString::null, 0, this, 0 );
64 a->addTo(popup); 66 a->addTo(popup);
65 connect(a, SIGNAL(activated()), this, SLOT(slotOpen())); 67 connect(a, SIGNAL(activated()), this, SLOT(slotOpen()));
66 68
67 69
68 // Action for saving document 70 // Action for saving document
69 a = new QAction( tr( "Save" ), Resource::loadPixmap( "save" ) , QString::null, 0, this, 0 ); 71 a = new QAction( tr( "Save" ), Opie::Core::OResource::loadPixmap( "save", Opie::Core::OResource::SmallIcon ),
72 QString::null, 0, this, 0 );
70 a->addTo(popup); 73 a->addTo(popup);
71 connect(a, SIGNAL(activated()), this, SLOT(slotSave())); 74 connect(a, SIGNAL(activated()), this, SLOT(slotSave()));
72 75
73 // Action for saving document to a new name 76 // Action for saving document to a new name
74 a = new QAction( tr( "Save As" ),Resource::loadPixmap( "save" ) , QString::null, 0, this, 0 ); 77 a = new QAction( tr( "Save As" ), Opie::Core::OResource::loadPixmap( "save", Opie::Core::OResource::SmallIcon ),
78 QString::null, 0, this, 0 );
75 a->addTo(popup); 79 a->addTo(popup);
76 connect(a, SIGNAL(activated()), this, SLOT(slotSaveAs())); 80 connect(a, SIGNAL(activated()), this, SLOT(slotSaveAs()));
77 81
78 // Action for closing the currently active document 82 // Action for closing the currently active document
79 a = new QAction( tr( "Close" ), Resource::loadPixmap( "quit_icon" ) , QString::null, 0, this, 0 ); 83 a = new QAction( tr( "Close" ), Opie::Core::OResource::loadPixmap( "quit_icon", Opie::Core::OResource::SmallIcon ),
84 QString::null, 0, this, 0 );
80 a->addTo(popup); 85 a->addTo(popup);
81 connect(a, SIGNAL(activated()), this, SLOT(slotClose())); 86 connect(a, SIGNAL(activated()), this, SLOT(slotClose()));
82 87
@@ -84,36 +89,43 @@ TinyKate::TinyKate( QWidget *parent, const char *name, WFlags f) :
84 mb->insertItem(tr("File"),popup); 89 mb->insertItem(tr("File"),popup);
85 90
86 //EDIT ACTIONS 91 //EDIT ACTIONS
92 bool useBigIcon = qApp->desktop()->size().width() > 330;
87 93
88 // Action for cutting text 94 // Action for cutting text
89 editCut = new QToolButton( 0 ); 95 editCut = new QToolButton( 0 );
96 editCut->setUsesBigPixmap( useBigIcon );
90 editCut->setAutoRaise( true ); 97 editCut->setAutoRaise( true );
91 editCut->setIconSet( Resource::loadPixmap( "cut" ) ); 98 editCut->setIconSet( Opie::Core::OResource::loadPixmap( "cut", Opie::Core::OResource::SmallIcon ) );
92 99
93 // Action for Copying text 100 // Action for Copying text
94 editCopy = new QToolButton( 0 ); 101 editCopy = new QToolButton( 0 );
102 editCopy->setUsesBigPixmap( useBigIcon );
95 editCopy->setAutoRaise( true ); 103 editCopy->setAutoRaise( true );
96 editCopy->setIconSet( Resource::loadPixmap( "copy" ) ); 104 editCopy->setIconSet( Opie::Core::OResource::loadPixmap( "copy", Opie::Core::OResource::SmallIcon ) );
97 105
98 // Action for pasting text 106 // Action for pasting text
99 editPaste = new QToolButton( 0 ); 107 editPaste = new QToolButton( 0 );
108 editPaste->setUsesBigPixmap( useBigIcon );
100 editPaste->setAutoRaise( true ); 109 editPaste->setAutoRaise( true );
101 editPaste->setIconSet( Resource::loadPixmap( "paste" ) ); 110 editPaste->setIconSet( Opie::Core::OResource::loadPixmap( "paste", Opie::Core::OResource::SmallIcon ) );
102 111
103 // Action for finding / replacing text 112 // Action for finding / replacing text
104 editFindReplace = new QToolButton( 0 ); 113 editFindReplace = new QToolButton( 0 );
114 editFindReplace->setUsesBigPixmap( useBigIcon );
105 editFindReplace->setAutoRaise( true ); 115 editFindReplace->setAutoRaise( true );
106 editFindReplace->setIconSet( Resource::loadPixmap("find") ); 116 editFindReplace->setIconSet( Opie::Core::OResource::loadPixmap( "find", Opie::Core::OResource::SmallIcon ) );
107 117
108 // Action for undo 118 // Action for undo
109 editUndo = new QToolButton( 0 ); 119 editUndo = new QToolButton( 0 );
120 editUndo->setUsesBigPixmap( useBigIcon );
110 editUndo->setAutoRaise( true ); 121 editUndo->setAutoRaise( true );
111 editUndo->setIconSet( Resource::loadPixmap( "undo" ) ); 122 editUndo->setIconSet( Opie::Core::OResource::loadPixmap( "undo", Opie::Core::OResource::SmallIcon ) );
112 123
113 // Action for redo 124 // Action for redo
114 editRedo = new QToolButton( 0 ); 125 editRedo = new QToolButton( 0 );
126 editRedo->setUsesBigPixmap( useBigIcon );
115 editRedo->setAutoRaise( true ); 127 editRedo->setAutoRaise( true );
116 editRedo->setIconSet( Resource::loadPixmap( "redo" ) ); 128 editRedo->setIconSet( Opie::Core::OResource::loadPixmap( "redo", Opie::Core::OResource::SmallIcon ) );
117 129
118 //VIEW ACITONS 130 //VIEW ACITONS
119 popup = new QPopupMenu( this ); 131 popup = new QPopupMenu( this );
@@ -148,7 +160,9 @@ TinyKate::TinyKate( QWidget *parent, const char *name, WFlags f) :
148 popup->insertItem(tr("Highlighting"),hlmenu); 160 popup->insertItem(tr("Highlighting"),hlmenu);
149 161
150 162
151 utilSettings = new QAction( tr( "Settings" ), QString::null, 0, this, 0 ); 163 utilSettings = new QAction( tr( "Settings" ),
164 Opie::Core::OResource::loadPixmap( "SettingsIcon", Opie::Core::OResource::SmallIcon ),
165 QString::null, 0, this, 0 );
152 utilSettings->addTo( popup); 166 utilSettings->addTo( popup);
153 167
154 if( qApp->argc() > 1) open(qApp->argv()[1]); 168 if( qApp->argc() > 1) open(qApp->argv()[1]);