summaryrefslogtreecommitdiffstats
path: root/kanagram/src/newstuffdialog.cpp
blob: 1d3ed4b9b214d4227b73fb99c32461988c57d5ee (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#include "newstuffdialog.h"

#include <knewstuff/knewstuff.h>
#include <knewstuff/entry.h>
#include <klocale.h>
#include <tdeio/netaccess.h>
#include <kurl.h>
#include <kstandarddirs.h>

#include "kanagramsettings.h"

NewStuffDialog::NewStuffDialog() : KNewStuff("kanagram/vocabulary", "http://kde-edu.org/kanagram/" + KanagramSettings::dataLanguage() + ".xml")
{
}

NewStuffDialog::~NewStuffDialog()
{
}

bool NewStuffDialog::install(const TQString &fileName)
{
  return false;
}

TQString NewStuffDialog::downloadDestination(KNS::Entry *entry)
{
	TQString fileName = entry->payload().path();
	fileName = fileName.section('/', -1);
	return TDEGlobal::dirs()->saveLocation("data", "kanagram/data/" + KanagramSettings::dataLanguage()) + fileName;
}

bool NewStuffDialog::createUploadFile(const TQString &fileName)
{
  return false;
}