summaryrefslogtreecommitdiff
path: root/noncore/net/ubrowser
Side-by-side diff
Diffstat (limited to 'noncore/net/ubrowser') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/net/ubrowser/httpfactory.cpp12
-rw-r--r--noncore/net/ubrowser/mainview.cpp6
-rw-r--r--noncore/net/ubrowser/opie-ubrowser.control10
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
@@ -86,63 +86,63 @@ const QMimeSource * HttpFactory::data(const QString &abs_name) const
// }
// comm->setStuff(host, portS, file, text, image, isImage);
// socket->connectToHost(host, port);
int con, bytesSent;
struct sockaddr_in serverAddr;
struct hostent * serverInfo = gethostbyname( host.latin1() );
if( serverInfo == NULL )
{
- QMessageBox *mb = new QMessageBox("Error!",
- "couldnt find ip address",
+ QMessageBox *mb = new QMessageBox(QObject::tr("Error!"),
+ QObject::tr("IP-Address not found"),
QMessageBox::NoIcon,
QMessageBox::Ok,
QMessageBox::NoButton,
QMessageBox::NoButton);
mb->exec();
perror("HttpFactory::data:");
return 0;
}
QByteArray data;
// printf( "HttpFactory::data: %s\n", inet_ntoa(*((struct in_addr *)serverInfo->h_addr )) );
QString request("GET " + file + " HTTP/1.1\r\nHost: " + host + ':' + portS + "\r\nConnection: close\r\n\r\n");
con = socket( AF_INET, SOCK_STREAM, 0 );
if( con == -1 )
{
- QMessageBox *mb = new QMessageBox("Error!",
- "couldnt create socket",
+ QMessageBox *mb = new QMessageBox(QObject::tr("Error!"),
+ QObject::tr("Error creating socket"),
QMessageBox::NoIcon,
QMessageBox::Ok,
QMessageBox::NoButton,
QMessageBox::NoButton);
mb->exec();
perror("HttpFactory::data:");
return 0;
}
serverAddr.sin_family = AF_INET;
serverAddr.sin_port = htons( port );
serverAddr.sin_addr.s_addr = inet_addr( inet_ntoa(*((struct in_addr *)serverInfo->h_addr )) );
memset( &(serverAddr.sin_zero), '\0', 8 );
if(::connect( con, (struct sockaddr *)&serverAddr, sizeof(struct sockaddr)) == -1 )
{
- QMessageBox *mb = new QMessageBox("Error!",
- "couldnt connect to socket",
+ QMessageBox *mb = new QMessageBox(QObject::tr("Error!"),
+ QObject::tr("Error connecting to socket"),
QMessageBox::NoIcon,
QMessageBox::Ok,
QMessageBox::NoButton,
QMessageBox::NoButton);
mb->exec();
perror("HttpFactory::data:");
return 0;
}
bytesSent = send( con, request.latin1(), request.length(), 0);
// printf("HttpFactory::data: bytes written: %d out of: %d\n", bytesSent, request.length() );
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
@@ -11,25 +11,25 @@ implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
Public License for more details.
You should have received a copy of the GNU General Public License along with this program; if not, write to the Free
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "mainview.h"
MainView::MainView(QWidget *parent, const char *name) : QMainWindow(parent, name)
{
setIcon( Resource::loadPixmap( "remote" ) );
- setCaption("uBrowser");
+ setCaption(tr("uBrowser"));
setToolBarsMovable( false );
QPEToolBar *toolbar = new QPEToolBar(this, "toolbar");
back = new QToolButton(Resource::loadPixmap("ubrowser/back"), 0, 0, 0, 0, toolbar, "back");
forward = new QToolButton(Resource::loadPixmap("ubrowser/forward"), 0, 0, 0, 0, toolbar, "forward");
home = new QToolButton(Resource::loadPixmap("ubrowser/home"), 0, 0, 0, 0, toolbar, "home");
location = new QComboBox(true, toolbar, "location");
go = new QToolButton(Resource::loadPixmap("ubrowser/go"), 0, 0, 0, 0, toolbar, "go");
toolbar->setStretchableWidget(location);
toolbar->setHorizontalStretchable(true);
@@ -93,29 +93,29 @@ void MainView::goClicked()
{
browser->setMimeSourceFactory(QMimeSourceFactory::defaultFactory());
printf("MainView::goClicked: using default source factory\n");
}
browser->setSource(location->currentText());
}
void MainView::textChanged()
{
if(browser->documentTitle().isNull())
{
- setCaption(browser->source() + " - uBrowser");
+ setCaption( tr("%1 - uBrowser").arg( browser->source() ) );
}
else
{
- setCaption(browser->documentTitle() + " - uBrowser");
+ setCaption(tr(" - uBrowser").arg( browser->documentTitle() ));
}
location->setEditText(browser->source());
}
void MainView::setDocument( const QString& applnk_filename )
{
DocLnk *file = new DocLnk( applnk_filename );
location->setEditText( file->file() );
goClicked();
}
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 @@
+Package: opie-ubrowser
+Files: bin/ubrowser apps/Applications/ubrowser.desktop pics/ubrowser/*.png
+Priority: optional
+Section: opie/applications
+Maintainer: Thomas Stephens <spiralman@softhome.net>
+Architecture: arm
+Version: 0.1-$SUB_VERSION
+Depends: task-opie-minimal
+License: GPL
+Description: a very small web browser