summaryrefslogtreecommitdiff
path: root/noncore/apps/opie-gutenbrowser
Side-by-side diff
Diffstat (limited to 'noncore/apps/opie-gutenbrowser') (more/less context) (show whitespace changes)
-rw-r--r--noncore/apps/opie-gutenbrowser/LibraryDialog.cpp2
-rw-r--r--noncore/apps/opie-gutenbrowser/NetworkDialog.cpp2
-rw-r--r--noncore/apps/opie-gutenbrowser/fontDialog.cpp10
-rw-r--r--noncore/apps/opie-gutenbrowser/helpwindow.cpp2
4 files changed, 8 insertions, 8 deletions
diff --git a/noncore/apps/opie-gutenbrowser/LibraryDialog.cpp b/noncore/apps/opie-gutenbrowser/LibraryDialog.cpp
index 124b6f3..020a116 100644
--- a/noncore/apps/opie-gutenbrowser/LibraryDialog.cpp
+++ b/noncore/apps/opie-gutenbrowser/LibraryDialog.cpp
@@ -14,49 +14,49 @@
//ftp://ibiblio.org/pub/docs/books/gutenberg/GUTINDEX.ALL
#include "LibraryDialog.h"
#include "output.h"
/* OPIE */
#include <qpe/applnk.h>
#include <qpe/qpeapplication.h>
#include <qpe/qpedialog.h>
#include <opie2/odebug.h>
/* QT */
#include <qpushbutton.h>
#include <qmultilineedit.h>
//#include <qlayout.h>
/* STD */
#include <unistd.h>
#include <stdio.h>
#include <stdlib.h>
/*
* The dialog will by default be modeless, unless you set 'modal' to
* TRUE to construct a modal dialog. */
-LibraryDialog::LibraryDialog( QWidget* parent, const char* name , bool modal, WFlags fl )
+LibraryDialog::LibraryDialog( QWidget* parent, const char* name , bool /*modal*/, WFlags fl )
: QDialog( parent, name, true/* modal*/, fl )
{
if ( !name )
setName( "LibraryDialog" );
indexLoaded=false;
initDialog();
// this->setMaximumWidth(240);
index = "GUTINDEX.ALL";
local_library = (QDir::homeDirPath ()) +"/Applications/gutenbrowser/";
local_index = local_library + index;
QString iniFile ;
iniFile = QPEApplication::qpeDir()+"/etc/gutenbrowser/gutenbrowserrc";
new_index =QPEApplication::qpeDir()+"/etc/gutenbrowser/PGWHOLE.TXT";
old_index = QPEApplication::qpeDir()+"/etc/gutenbrowser/GUTINDEX.ALL";
// old_index = QPEApplication::qpeDir()+"etc/gutenbrowser/GUTINDEX.ALL";
// iniFile = local_library+"gutenbrowserrc";
// new_index = local_library + "PGWHOLE.TXT";
// old_index = local_library + "GUTINDEX.ALL";
diff --git a/noncore/apps/opie-gutenbrowser/NetworkDialog.cpp b/noncore/apps/opie-gutenbrowser/NetworkDialog.cpp
index af14aac..a321952 100644
--- a/noncore/apps/opie-gutenbrowser/NetworkDialog.cpp
+++ b/noncore/apps/opie-gutenbrowser/NetworkDialog.cpp
@@ -19,49 +19,49 @@
#include <opie2/odebug.h>
/* QT */
#include <qprogressbar.h>
#include <qstringlist.h>
#include <qpe/config.h>
#include <qvaluelist.h>
#include <qapplication.h>
#include <qfile.h>
#include <qstringlist.h>
#include <qlabel.h>
#include <qpushbutton.h>
#include <qlayout.h>
/* STD */
#include <unistd.h>
extern "C" {
#include <ftplib.h>
}
QProgressBar* ProgressBar1;
QPushButton* buttonCancel;
static netbuf *conn = NULL;
-static int log_progress(netbuf *ctl, int xfered, void *arg) {
+static int log_progress(netbuf *, int xfered, void *arg) {
int fsz = *(int *)arg;
int pct = (xfered * 100) / fsz;
printf("%3d%%\r", pct);
fflush(stdout);
ProgressBar1->setProgress(xfered);
qApp->processEvents();
return 1;
}
NetworkDialog::NetworkDialog( QWidget* parent, const char* name, bool modal, WFlags fl, const QStringList netL)
: QDialog( parent, name, modal, fl )
{
ftp_host = netL[0];
networkUrl = strUrl = netL[0];
dir = ftp_base_dir = netL[1];
localFileName = netL[2];
s_partialFileName = netL[3];
resize(240,120);
local_library = (QDir::homeDirPath ()) +"/Applications/gutenbrowser/";
diff --git a/noncore/apps/opie-gutenbrowser/fontDialog.cpp b/noncore/apps/opie-gutenbrowser/fontDialog.cpp
index fa964a6..c6d0fe6 100644
--- a/noncore/apps/opie-gutenbrowser/fontDialog.cpp
+++ b/noncore/apps/opie-gutenbrowser/fontDialog.cpp
@@ -92,115 +92,115 @@ void FontDialog::familyListBoxSlot(const QString & text)
family = text;
// odebug << family << oendl;
QStringList styles = fdb.styles( family ); // string list of styles of our current font family
styleListBox->insertStringList( styles);
QString dstyle;// = "\t" + style + " (";
#ifdef BUGGY_SHARP_ZAURUS
QValueList<int> smoothies = fdb.smoothSizes( family, styleListBox->text(0) );
for ( QValueList<int>::Iterator points = smoothies.begin(); points != smoothies.end(); ++points ) {
dstyle = QString::number( *points );
odebug << dstyle << oendl;
sizeComboBox->insertItem( dstyle.left( dstyle.length() - 1 ));
}
#else
for (int i=0; i<nfontsizes; i++) {
sizeComboBox->insertItem( QString::number(fontsize[i]));
if(fontsize[i] == sizeInt) {
sizeComboBox->setCurrentItem(i);
}
}
#endif
- if(styleInt == -1 || styleInt > styleListBox->count() )
+ if(styleInt == -1 || styleInt > static_cast<int>(styleListBox->count()) )
styleListBox->setCurrentItem(0);
else
styleListBox->setCurrentItem(styleInt);
changeText();
}
-void FontDialog::styleListBoxSlot(const QString &text)
+void FontDialog::styleListBoxSlot(const QString &)
{
changeText();
}
-void FontDialog::sizeComboBoxSlot(const QString & text)
+void FontDialog::sizeComboBoxSlot(const QString &)
{
changeText();
}
void FontDialog::populateLists()
{
// QFont defaultFont=MultiLineEdit1->font();
// QFont defaultFont=Lview->font();
// QFontInfo fontInfo(defaultFont);
Config config("Gutenbrowser");
config.setGroup("Font");
QString familyStr = config.readEntry("Family", "fixed");
QString styleStr = config.readEntry("Style", "Regular");
QString sizeStr = config.readEntry("Size", "10");
QString charSetStr = config.readEntry("CharSet", "iso10646-1" );
bool ok;
int i_size = sizeStr.toInt(&ok,10);
selectedFont = fdb.font(familyStr,styleStr,i_size,charSetStr);
// defaultFont.setItalic(TRUE);
families = fdb.families();
for ( QStringList::Iterator f = families.begin(); f != families.end();++f ) {
QString family = *f;
// if(family == defaultFont.family())
// odebug << family << oendl;
familyListBox->insertItem( family);
if( familyListBox->text(0) == family) {
QStringList styles = fdb.styles( family );
// string list of styles of our current font family
styleListBox->insertStringList( styles);
for ( QStringList::Iterator s = styles.begin(); s != styles.end();++s ) { // for each font style
style = *s;
QString dstyle;// = "\t" + style + " (";
if(styleListBox->text(0) == style) {
QValueList<int> smoothies = fdb.smoothSizes( family, style );
for ( QValueList<int>::Iterator points = smoothies.begin(); points != smoothies.end(); ++points ) {
dstyle = QString::number( *points ) + " ";
sizeComboBox ->insertItem( dstyle.left( dstyle.length() - 1 ));
}
dstyle = dstyle.left( dstyle.length() - 1 ) + ")";
}
} // styles
}
}
- for(int i=0;i < familyListBox->count();i++) {
+ for(uint i=0;i < familyListBox->count();i++) {
if( familyListBox->text(i) == familyStr)
familyListBox->setSelected( i, TRUE);
}
- for(int i=0;i < styleListBox->count();i++) {
+ for(uint i=0;i < styleListBox->count();i++) {
if( styleListBox->text(i) == styleStr)
styleListBox->setSelected( i, TRUE);
}
for (int i=0; i<sizeComboBox->count(); i++) {
#ifdef BUGGY_SHARP_ZAURUS
if(sizeComboBox->text(i) == sizeStr)
#else
if(fontsize[i] == i_size)
#endif
sizeComboBox->setCurrentItem(i);
}
changeText();
}
void FontDialog::clearListBoxes() {
familyListBox->clear();
sizeComboBox->clear();
styleListBox->clear();
}
void FontDialog::changeText()
{
diff --git a/noncore/apps/opie-gutenbrowser/helpwindow.cpp b/noncore/apps/opie-gutenbrowser/helpwindow.cpp
index e86ca49..ffdc9f0 100644
--- a/noncore/apps/opie-gutenbrowser/helpwindow.cpp
+++ b/noncore/apps/opie-gutenbrowser/helpwindow.cpp
@@ -1,47 +1,47 @@
/****************************************************************************
** $Id$
**
** Copyright (C) 1992-2000 Trolltech AS. All rights reserved.
**
** This file is part of an example program for Qt. This example
** program may be used, distributed and modified without limitation.
**
copyright : (C) 2000 -2004 by llornkcor
email : ljp@llornkcor.com
*****************************************************************************/
#include "helpwindow.h"
#include <qstatusbar.h>
#include <qmenubar.h>
#include <qtoolbar.h>
#include <qtoolbutton.h>
#include <qcombobox.h>
#include <ctype.h>
-HelpWindow::HelpWindow( const QString& home_, const QString& _path, QWidget* parent, const char *name )
+HelpWindow::HelpWindow( const QString& home_, const QString&, QWidget* parent, const char *name )
: QMainWindow( parent, name, WDestructiveClose ), pathCombo( 0 ), selectedURL()
{
QString local_library = (QDir::homeDirPath ()) +"/Applications/gutenbrowser/";
// readHistory();
// readBookmarks();
browser = new QTextBrowser( this );
QStringList Strlist;
Strlist.append( home_);
browser->mimeSourceFactory()->setFilePath( Strlist );
browser->setFrameStyle( QFrame::Panel | QFrame::Sunken );
connect(browser,SIGNAL(textChanged()),this,SLOT(textChanged()));
setCentralWidget( browser );
if ( !home_.isEmpty() )
////////////////////////////////
browser->setSource( home_ );
////////////////////////////////
connect( browser, SIGNAL( highlighted( const QString&) ),