-rw-r--r-- | noncore/net/ubrowser/httpfactory.cpp | 12 | ||||
-rw-r--r-- | noncore/net/ubrowser/mainview.cpp | 6 | ||||
-rw-r--r-- | noncore/net/ubrowser/opie-ubrowser.control | 10 |
3 files changed, 19 insertions, 9 deletions
diff --git a/noncore/net/ubrowser/httpfactory.cpp b/noncore/net/ubrowser/httpfactory.cpp index b57149f..369f206 100644 --- a/noncore/net/ubrowser/httpfactory.cpp +++ b/noncore/net/ubrowser/httpfactory.cpp | |||
@@ -92,14 +92,14 @@ const QMimeSource * HttpFactory::data(const QString &abs_name) const | |||
92 | int con, bytesSent; | 92 | int con, bytesSent; |
93 | struct sockaddr_in serverAddr; | 93 | struct sockaddr_in serverAddr; |
94 | struct hostent * serverInfo = gethostbyname( host.latin1() ); | 94 | struct hostent * serverInfo = gethostbyname( host.latin1() ); |
95 | 95 | ||
96 | if( serverInfo == NULL ) | 96 | if( serverInfo == NULL ) |
97 | { | 97 | { |
98 | QMessageBox *mb = new QMessageBox("Error!", | 98 | QMessageBox *mb = new QMessageBox(QObject::tr("Error!"), |
99 | "couldnt find ip address", | 99 | QObject::tr("IP-Address not found"), |
100 | QMessageBox::NoIcon, | 100 | QMessageBox::NoIcon, |
101 | QMessageBox::Ok, | 101 | QMessageBox::Ok, |
102 | QMessageBox::NoButton, | 102 | QMessageBox::NoButton, |
103 | QMessageBox::NoButton); | 103 | QMessageBox::NoButton); |
104 | mb->exec(); | 104 | mb->exec(); |
105 | perror("HttpFactory::data:"); | 105 | perror("HttpFactory::data:"); |
@@ -111,14 +111,14 @@ const QMimeSource * HttpFactory::data(const QString &abs_name) const | |||
111 | 111 | ||
112 | QString request("GET " + file + " HTTP/1.1\r\nHost: " + host + ':' + portS + "\r\nConnection: close\r\n\r\n"); | 112 | QString request("GET " + file + " HTTP/1.1\r\nHost: " + host + ':' + portS + "\r\nConnection: close\r\n\r\n"); |
113 | 113 | ||
114 | con = socket( AF_INET, SOCK_STREAM, 0 ); | 114 | con = socket( AF_INET, SOCK_STREAM, 0 ); |
115 | if( con == -1 ) | 115 | if( con == -1 ) |
116 | { | 116 | { |
117 | QMessageBox *mb = new QMessageBox("Error!", | 117 | QMessageBox *mb = new QMessageBox(QObject::tr("Error!"), |
118 | "couldnt create socket", | 118 | QObject::tr("Error creating socket"), |
119 | QMessageBox::NoIcon, | 119 | QMessageBox::NoIcon, |
120 | QMessageBox::Ok, | 120 | QMessageBox::Ok, |
121 | QMessageBox::NoButton, | 121 | QMessageBox::NoButton, |
122 | QMessageBox::NoButton); | 122 | QMessageBox::NoButton); |
123 | mb->exec(); | 123 | mb->exec(); |
124 | perror("HttpFactory::data:"); | 124 | perror("HttpFactory::data:"); |
@@ -129,14 +129,14 @@ const QMimeSource * HttpFactory::data(const QString &abs_name) const | |||
129 | serverAddr.sin_port = htons( port ); | 129 | serverAddr.sin_port = htons( port ); |
130 | serverAddr.sin_addr.s_addr = inet_addr( inet_ntoa(*((struct in_addr *)serverInfo->h_addr )) ); | 130 | serverAddr.sin_addr.s_addr = inet_addr( inet_ntoa(*((struct in_addr *)serverInfo->h_addr )) ); |
131 | memset( &(serverAddr.sin_zero), '\0', 8 ); | 131 | memset( &(serverAddr.sin_zero), '\0', 8 ); |
132 | 132 | ||
133 | if(::connect( con, (struct sockaddr *)&serverAddr, sizeof(struct sockaddr)) == -1 ) | 133 | if(::connect( con, (struct sockaddr *)&serverAddr, sizeof(struct sockaddr)) == -1 ) |
134 | { | 134 | { |
135 | QMessageBox *mb = new QMessageBox("Error!", | 135 | QMessageBox *mb = new QMessageBox(QObject::tr("Error!"), |
136 | "couldnt connect to socket", | 136 | QObject::tr("Error connecting to socket"), |
137 | QMessageBox::NoIcon, | 137 | QMessageBox::NoIcon, |
138 | QMessageBox::Ok, | 138 | QMessageBox::Ok, |
139 | QMessageBox::NoButton, | 139 | QMessageBox::NoButton, |
140 | QMessageBox::NoButton); | 140 | QMessageBox::NoButton); |
141 | mb->exec(); | 141 | mb->exec(); |
142 | perror("HttpFactory::data:"); | 142 | perror("HttpFactory::data:"); |
diff --git a/noncore/net/ubrowser/mainview.cpp b/noncore/net/ubrowser/mainview.cpp index f68c5db..9302f05 100644 --- a/noncore/net/ubrowser/mainview.cpp +++ b/noncore/net/ubrowser/mainview.cpp | |||
@@ -17,13 +17,13 @@ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |||
17 | 17 | ||
18 | #include "mainview.h" | 18 | #include "mainview.h" |
19 | 19 | ||
20 | MainView::MainView(QWidget *parent, const char *name) : QMainWindow(parent, name) | 20 | MainView::MainView(QWidget *parent, const char *name) : QMainWindow(parent, name) |
21 | { | 21 | { |
22 | setIcon( Resource::loadPixmap( "remote" ) ); | 22 | setIcon( Resource::loadPixmap( "remote" ) ); |
23 | setCaption("uBrowser"); | 23 | setCaption(tr("uBrowser")); |
24 | 24 | ||
25 | setToolBarsMovable( false ); | 25 | setToolBarsMovable( false ); |
26 | 26 | ||
27 | QPEToolBar *toolbar = new QPEToolBar(this, "toolbar"); | 27 | QPEToolBar *toolbar = new QPEToolBar(this, "toolbar"); |
28 | back = new QToolButton(Resource::loadPixmap("ubrowser/back"), 0, 0, 0, 0, toolbar, "back"); | 28 | back = new QToolButton(Resource::loadPixmap("ubrowser/back"), 0, 0, 0, 0, toolbar, "back"); |
29 | forward = new QToolButton(Resource::loadPixmap("ubrowser/forward"), 0, 0, 0, 0, toolbar, "forward"); | 29 | forward = new QToolButton(Resource::loadPixmap("ubrowser/forward"), 0, 0, 0, 0, toolbar, "forward"); |
@@ -99,17 +99,17 @@ void MainView::goClicked() | |||
99 | } | 99 | } |
100 | 100 | ||
101 | void MainView::textChanged() | 101 | void MainView::textChanged() |
102 | { | 102 | { |
103 | if(browser->documentTitle().isNull()) | 103 | if(browser->documentTitle().isNull()) |
104 | { | 104 | { |
105 | setCaption(browser->source() + " - uBrowser"); | 105 | setCaption( tr("%1 - uBrowser").arg( browser->source() ) ); |
106 | } | 106 | } |
107 | else | 107 | else |
108 | { | 108 | { |
109 | setCaption(browser->documentTitle() + " - uBrowser"); | 109 | setCaption(tr(" - uBrowser").arg( browser->documentTitle() )); |
110 | } | 110 | } |
111 | 111 | ||
112 | location->setEditText(browser->source()); | 112 | location->setEditText(browser->source()); |
113 | } | 113 | } |
114 | 114 | ||
115 | void MainView::setDocument( const QString& applnk_filename ) | 115 | void MainView::setDocument( const QString& applnk_filename ) |
diff --git a/noncore/net/ubrowser/opie-ubrowser.control b/noncore/net/ubrowser/opie-ubrowser.control new file mode 100644 index 0000000..61a6cde --- a/dev/null +++ b/noncore/net/ubrowser/opie-ubrowser.control | |||
@@ -0,0 +1,10 @@ | |||
1 | Package: opie-ubrowser | ||
2 | Files: bin/ubrowser apps/Applications/ubrowser.desktop pics/ubrowser/*.png | ||
3 | Priority: optional | ||
4 | Section: opie/applications | ||
5 | Maintainer: Thomas Stephens <spiralman@softhome.net> | ||
6 | Architecture: arm | ||
7 | Version: 0.1-$SUB_VERSION | ||
8 | Depends: task-opie-minimal | ||
9 | License: GPL | ||
10 | Description: a very small web browser | ||