summaryrefslogtreecommitdiff
path: root/noncore/net/ubrowser/mainview.cpp
Unidiff
Diffstat (limited to 'noncore/net/ubrowser/mainview.cpp') (more/less context) (show whitespace changes)
-rw-r--r--noncore/net/ubrowser/mainview.cpp24
1 files changed, 20 insertions, 4 deletions
diff --git a/noncore/net/ubrowser/mainview.cpp b/noncore/net/ubrowser/mainview.cpp
index d3f4c57..f68c5db 100644
--- a/noncore/net/ubrowser/mainview.cpp
+++ b/noncore/net/ubrowser/mainview.cpp
@@ -35,2 +35,3 @@ MainView::MainView(QWidget *parent, const char *name) : QMainWindow(parent, name
35 toolbar->setHorizontalStretchable(true); 35 toolbar->setHorizontalStretchable(true);
36 location->setAutoCompletion( true );
36 37
@@ -63,8 +64,15 @@ MainView::MainView(QWidget *parent, const char *name) : QMainWindow(parent, name
63 char **argv = qApp->argv(); 64 char **argv = qApp->argv();
64 QString *argv1 = new QString( argv[1] ); 65 int i = 0;
65 if( !argv1->startsWith( "http://" ) && !argv1->startsWith( "/" ) ) 66 QString *openfile = new QString( argv[0] );
67 while( openfile->contains( "ubrowser" ) == 0 && i < qApp->argc() )
66 { 68 {
67 argv1->insert( 0, QDir::currentDirPath()+"/" ); 69 i++;
70 *openfile = argv[i];
68 } 71 }
69 location->setEditText( *argv1 ); 72 *openfile = argv[i+1];
73 if( !openfile->startsWith( "http://" ) && !openfile->startsWith( "/" ) )
74 {
75 openfile->insert( 0, QDir::currentDirPath()+"/" );
76 }
77 location->setEditText( *openfile );
70 goClicked(); 78 goClicked();
@@ -105 +113,9 @@ void MainView::textChanged()
105} 113}
114
115void MainView::setDocument( const QString& applnk_filename )
116{
117 DocLnk *file = new DocLnk( applnk_filename );
118
119 location->setEditText( file->file() );
120 goClicked();
121}