summaryrefslogtreecommitdiff
authorllornkcor <llornkcor>2003-03-21 21:35:41 (UTC)
committer llornkcor <llornkcor>2003-03-21 21:35:41 (UTC)
commitd1d55108ecc8c913267122014aa2f139be947299 (patch) (unidiff)
tree6d09c6f5fe0d21440e880e94e6630a2cebcda37a
parentd11cf5483fbfa87a7be65891df2625def351f3a4 (diff)
downloadopie-d1d55108ecc8c913267122014aa2f139be947299.zip
opie-d1d55108ecc8c913267122014aa2f139be947299.tar.gz
opie-d1d55108ecc8c913267122014aa2f139be947299.tar.bz2
change filesave icon to inlined
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--core/apps/textedit/resource.h104
-rw-r--r--core/apps/textedit/textedit.cpp90
-rw-r--r--core/apps/textedit/textedit.pro2
3 files changed, 45 insertions, 151 deletions
diff --git a/core/apps/textedit/resource.h b/core/apps/textedit/resource.h
deleted file mode 100644
index 7a22f01..0000000
--- a/core/apps/textedit/resource.h
+++ b/dev/null
@@ -1,104 +0,0 @@
1#ifndef RESOURCE_H
2#define RESOURCE_H
3
4#include <qpixmap.h>
5
6/* XPM */
7static char * filesave_xpm[] = {
8 "16 16 78 1",
9 " c None",
10 ". c #343434",
11 "+ c #A0A0A0",
12 "@ c #565656",
13 "# c #9E9E9E",
14 "$ c #525252",
15 "% c #929292",
16 "& c #676767",
17 "* c #848484",
18 "= c #666666",
19 "- c #D8D8D8",
20 "; c #FFFFFF",
21 "> c #DBDBDB",
22 ", c #636363",
23 "' c #989898",
24 ") c #2D2D2D",
25 "! c #909090",
26 "~ c #AEAEAE",
27 "{ c #EAEAEA",
28 "] c #575757",
29 "^ c #585858",
30 "/ c #8A8A8A",
31 "( c #828282",
32 "_ c #6F6F6F",
33 ": c #C9C9C9",
34 "< c #050505",
35 "[ c #292929",
36 "} c #777777",
37 "| c #616161",
38 "1 c #3A3A3A",
39 "2 c #BEBEBE",
40 "3 c #2C2C2C",
41 "4 c #7C7C7C",
42 "5 c #F6F6F6",
43 "6 c #FCFCFC",
44 "7 c #6B6B6B",
45 "8 c #959595",
46 "9 c #4F4F4F",
47 "0 c #808080",
48 "a c #767676",
49 "b c #818181",
50 "c c #B8B8B8",
51 "d c #FBFBFB",
52 "e c #F9F9F9",
53 "f c #CCCCCC",
54 "g c #030303",
55 "h c #737373",
56 "i c #7A7A7A",
57 "j c #7E7E7E",
58 "k c #6A6A6A",
59 "l c #FAFAFA",
60 "m c #505050",
61 "n c #9D9D9D",
62 "o c #333333",
63 "p c #7B7B7B",
64 "q c #787878",
65 "r c #696969",
66 "s c #494949",
67 "t c #555555",
68 "u c #949494",
69 "v c #E6E6E6",
70 "w c #424242",
71 "x c #515151",
72 "y c #535353",
73 "z c #3E3E3E",
74 "A c #D4D4D4",
75 "B c #0C0C0C",
76 "C c #353535",
77 "D c #474747",
78 "E c #ECECEC",
79 "F c #919191",
80 "G c #7D7D7D",
81 "H c #000000",
82 "I c #404040",
83 "J c #858585",
84 "K c #323232",
85 "L c #D0D0D0",
86 "M c #1C1C1C",
87 " ...+ ",
88 " @#$%&..+ ",
89 " .*=-;;>,..+ ",
90 " ')!~;;;;;;{]..",
91 " ^/(-;;;;;;;_:<",
92 " [}|;;;;;;;{12$",
93 " #34-55;;;;678$+",
94 " 90ab=c;dd;e1fg ",
95 " [ahij((kbl0mn$ ",
96 " op^q^^7r&]s/$+ ",
97 "@btu;vbwxy]zAB ",
98 "CzDEvEv;;DssF$ ",
99 "G.H{E{E{IxsJ$+ ",
100 " +...vEKxzLM ",
101 " +...z]n$ ",
102 " +... "};
103
104#endif
diff --git a/core/apps/textedit/textedit.cpp b/core/apps/textedit/textedit.cpp
index 59a605a..749e0ac 100644
--- a/core/apps/textedit/textedit.cpp
+++ b/core/apps/textedit/textedit.cpp
@@ -55,8 +55,6 @@
55#include <sys/stat.h> 55#include <sys/stat.h>
56#include <stdlib.h> //getenv 56#include <stdlib.h> //getenv
57 57
58#include "resource.h"
59
60#if QT_VERSION < 300 58#if QT_VERSION < 300
61 59
62class QpeEditor : public QMultiLineEdit 60class QpeEditor : public QMultiLineEdit
@@ -210,14 +208,14 @@ TextEdit::TextEdit( QWidget *parent, const char *name, WFlags f )
210 a->addTo( bar ); 208 a->addTo( bar );
211 a->addTo( file ); 209 a->addTo( file );
212 210
213 a = new QAction( tr( "Save" ), QPixmap(( const char** ) filesave_xpm ) , 211 a = new QAction( tr( "Save" ), Resource::loadPixmap("save") ,
214 QString::null, 0, this, 0 ); 212 QString::null, 0, this, 0 );
215 connect( a, SIGNAL( activated() ), this, SLOT( save() ) ); 213 connect( a, SIGNAL( activated() ), this, SLOT( save() ) );
216 file->insertSeparator(); 214 file->insertSeparator();
217 a->addTo( bar ); 215 a->addTo( bar );
218 a->addTo( file ); 216 a->addTo( file );
219 217
220 a = new QAction( tr( "Save As" ), QPixmap(( const char** ) filesave_xpm ) , 218 a = new QAction( tr( "Save As" ), Resource::loadPixmap("save") ,
221 QString::null, 0, this, 0 ); 219 QString::null, 0, this, 0 );
222 connect( a, SIGNAL( activated() ), this, SLOT( saveAs() ) ); 220 connect( a, SIGNAL( activated() ), this, SLOT( saveAs() ) );
223 a->addTo( file ); 221 a->addTo( file );
@@ -694,58 +692,58 @@ void TextEdit::openDotFile( const QString &f ) {
694} 692}
695 693
696void TextEdit::openFile( const QString &f ) { 694void TextEdit::openFile( const QString &f ) {
697 qDebug("filename is "+ f); 695 qDebug("filename is "+ f);
698 QString filer; 696 QString filer;
699 QFileInfo fi( f); 697 QFileInfo fi( f);
700// bFromDocView = true; 698// bFromDocView = true;
701 if(f.find(".desktop",0,true) != -1 && !openDesktop ) 699 if(f.find(".desktop",0,true) != -1 && !openDesktop )
702 { 700 {
703 switch ( QMessageBox::warning(this,tr("Text Editor"), 701 switch ( QMessageBox::warning(this,tr("Text Editor"),
704 tr("Text Editor has detected<BR>you selected a <B>.desktop</B> 702 tr("Text Editor has detected<BR>you selected a <B>.desktop</B>
705file.<BR>Open <B>.desktop</B> file or <B>linked</B> file?"), 703file.<BR>Open <B>.desktop</B> file or <B>linked</B> file?"),
706 tr(".desktop File"),tr("Linked Document"),0,1,1) ) 704 tr(".desktop File"),tr("Linked Document"),0,1,1) )
707 { 705 {
708 case 0: //desktop 706 case 0: //desktop
709 filer = f; 707 filer = f;
710 break; 708 break;
711 case 1: //linked 709 case 1: //linked
712 DocLnk sf(f); 710 DocLnk sf(f);
713 filer = sf.file(); 711 filer = sf.file();
714 break; 712 break;
715 }; 713 };
716 } 714 }
717 else if(fi.baseName().left(1) == "") 715 else if(fi.baseName().left(1) == "")
718 { 716 {
719 qDebug("opening dotfile"); 717 qDebug("opening dotfile");
720 currentFileName=f; 718 currentFileName=f;
721 openDotFile(currentFileName); 719 openDotFile(currentFileName);
722 return; 720 return;
723 } 721 }
724 else 722 else
725 { 723 {
726 DocLnk sf(f); 724 DocLnk sf(f);
727 filer = sf.file(); 725 filer = sf.file();
728 if(filer.right(1) == "/") 726 if(filer.right(1) == "/")
729 filer = f; 727 filer = f;
730 } 728 }
731 729
732 DocLnk nf; 730 DocLnk nf;
733 nf.setType("text/plain"); 731 nf.setType("text/plain");
734 nf.setFile(filer); 732 nf.setFile(filer);
735 currentFileName=filer; 733 currentFileName=filer;
736 734
737 nf.setName(fi.baseName()); 735 nf.setName(fi.baseName());
738 openFile(nf); 736 openFile(nf);
739 737
740 qDebug("openFile string "+currentFileName); 738 qDebug("openFile string "+currentFileName);
741 739
742 showEditTools(); 740 showEditTools();
743 // Show filename in caption 741 // Show filename in caption
744 QString name = filer; 742 QString name = filer;
745 int sep = name.findRev( '/' ); 743 int sep = name.findRev( '/' );
746 if ( sep > 0 ) 744 if ( sep > 0 )
747 name = name.mid( sep+1 ); 745 name = name.mid( sep+1 );
748 updateCaption( name ); 746 updateCaption( name );
749} 747}
750 748
751void TextEdit::openFile( const DocLnk &f ) { 749void TextEdit::openFile( const DocLnk &f ) {
diff --git a/core/apps/textedit/textedit.pro b/core/apps/textedit/textedit.pro
index 233dd67..d2c238e 100644
--- a/core/apps/textedit/textedit.pro
+++ b/core/apps/textedit/textedit.pro
@@ -1,7 +1,7 @@
1TEMPLATE = app 1TEMPLATE = app
2CONFIG += qt warn_on release 2CONFIG += qt warn_on release
3DESTDIR = $(OPIEDIR)/bin 3DESTDIR = $(OPIEDIR)/bin
4HEADERS = textedit.h filePermissions.h resource.h 4HEADERS = textedit.h filePermissions.h
5SOURCES = main.cpp textedit.cpp filePermissions.cpp 5SOURCES = main.cpp textedit.cpp filePermissions.cpp
6INCLUDEPATH += $(OPIEDIR)/include 6INCLUDEPATH += $(OPIEDIR)/include
7DEPENDPATH += $(OPIEDIR)/include 7DEPENDPATH += $(OPIEDIR)/include