blob: 9a1f7efe3fb866c2fba9b03beedd367f5e2140d6 (
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
|
/***************************************************************************
* dlgAdvanced.cpp
* -------------------
*
* Revision : $Id$
* begin : Tue Jan 29 2002
* copyright : (C) 2002 by Patrick Charbonnier
* : Based On Caitoo v.0.7.3 (c) 1998 - 2000, Matej Koss
* email : pch@freeshell.org
*
****************************************************************************/
/***************************************************************************
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
***************************************************************************/
#include <tqcheckbox.h>
#include <tqradiobutton.h>
#include <kprotocolmanager.h>
#include <klocale.h>
#include <kconfig.h>
#include "settings.h"
#include "kmainwidget.h"
#include "dlgAdvanced.h"
DlgAdvanced::DlgAdvanced(TQWidget * parent)
: DlgAdvancedBase(parent)
{
cb_partial->hide();
}
void
DlgAdvanced::setData()
{
rb_queued->setChecked(ksettings.b_addQueued);
rb_delayed->setChecked(!ksettings.b_addQueued);
cb_iconify->setEnabled(ksettings.b_showIndividual);
cb_individual->setChecked(ksettings.b_showIndividual);
cb_iconify->setChecked(ksettings.b_iconifyIndividual);
cb_advanced->setChecked(ksettings.b_advancedIndividual);
cb_remove->setChecked(ksettings.b_removeOnSuccess);
cb_getsizes->setChecked(ksettings.b_getSizes);
cb_expertmode->setChecked(ksettings.b_expertMode);
cb_partial->setChecked(KProtocolManager::markPartial());
cb_konqiIntegration->setChecked(ksettings.b_KonquerorIntegration);
cb_ShowMain->setChecked(ksettings.b_showMain);
}
void DlgAdvanced::applyData()
{
ksettings.b_addQueued = rb_queued->isChecked();
ksettings.b_showIndividual = cb_individual->isChecked();
ksettings.b_iconifyIndividual = cb_iconify->isChecked();
ksettings.b_advancedIndividual = cb_advanced->isChecked();
ksettings.b_removeOnSuccess = cb_remove->isChecked();
ksettings.b_getSizes = cb_getsizes->isChecked();
ksettings.b_showMain=cb_ShowMain->isChecked();
if (ksettings.b_expertMode != cb_expertmode->isChecked()) {
kmain->slotToggleExpertMode();
}
bool bIsKonquiEnable=cb_konqiIntegration->isChecked();
if (ksettings.b_KonquerorIntegration!=bIsKonquiEnable)
{
ksettings.b_KonquerorIntegration=!ksettings.b_KonquerorIntegration;
TDEConfig cfg("konquerorrc", false, false);
cfg.setGroup("HTML Settings");
cfg.writePathEntry("DownloadManager",TQString((bIsKonquiEnable)?"kget":""));
cfg.sync();
}
}
void DlgAdvanced::slotChanged()
{
emit configChanged();
}
#include "dlgAdvanced.moc"
|