Subversion Repositories svn1-original

Rev

Rev 301 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 301 Rev 326
Line 18... Line 18...
18
 
18
 
19
#include <QtGui>
19
#include <QtGui>
20
#include <QLineEdit>
20
#include <QLineEdit>
21
#include <QLabel>
21
#include <QLabel>
22
#include "qmhttppath.h"
22
#include "qmhttppath.h"
-
 
23
#include "qmconfig.h"
23
#include "consts.h"
24
#include "consts.h"
24
#include "structs.h"
25
#include "structs.h"
25
#include "proto.h"
26
#include "proto.h"
26
 
27
 
27
#include <QtGui>
28
#include <QtGui>
Line 45... Line 46...
45
 
46
 
46
Qmhttppath::Qmhttppath(QWidget *parent)
47
Qmhttppath::Qmhttppath(QWidget *parent)
47
    : QDialog(parent)
48
    : QDialog(parent)
48
{
49
{
49
    this->resize(500,40);
50
    this->resize(500,40);
50
    urlLineEdit = new QLineEdit(config.webUrl);
51
    urlLineEdit = new QLineEdit(appSettings->value("Recent/HtmlUpload",config.webUrl).toString());
51
 
52
 
52
    urlLabel = new QLabel(tr("&URL:"));
53
    urlLabel = new QLabel(tr("&URL:"));
53
    urlLabel->setBuddy(urlLineEdit);
54
    urlLabel->setBuddy(urlLineEdit);
54
    statusLabel = new QLabel(tr("Please enter the URL of a file you want to import."));
55
    statusLabel = new QLabel(tr("Please enter the URL of a file you want to import."));
55
 
56
 
Line 103... Line 104...
103
}
104
}
104
 
105
 
105
void Qmhttppath::downloadFile()
106
void Qmhttppath::downloadFile()
106
{
107
{
107
    url = urlLineEdit->text();
108
    url = urlLineEdit->text();
-
 
109
 
-
 
110
    /*
-
 
111
    **  Save Web address for future use
-
 
112
    */
108
    strncpy(config.webUrl, (const char *)(url.toString().toAscii()), sizeof(config.webUrl) );
113
    strncpy(config.webUrl, (const char *)(url.toString().toAscii()), sizeof(config.webUrl) );
109
    config.write_config();
114
    config.write_config();
110
 
115
 
-
 
116
    appSettings->setValue("Recent/HtmlUpload", url.toString());
-
 
117
 
-
 
118
 
111
    QFileInfo fileInfo(url.path());
119
    QFileInfo fileInfo(url.path());
112
    QString fileName = fileInfo.fileName();
120
    QString fileName = fileInfo.fileName();
113
    if (fileName.isEmpty())
121
    if (fileName.isEmpty())
114
        fileName = "index.html";
122
        fileName = "index.html";
115
 
123