summaryrefslogtreecommitdiff
authorcniehaus <cniehaus>2002-12-26 12:58:20 (UTC)
committer cniehaus <cniehaus>2002-12-26 12:58:20 (UTC)
commitae4dec743b12804189b065963d50096df9d5bf06 (patch) (unidiff)
treec5096665a29a58024cc9a915ee91983c60f0c64e
parent0254e7cc015bac4e321ea0dcd7ef3c7872cbe878 (diff)
downloadopie-ae4dec743b12804189b065963d50096df9d5bf06.zip
opie-ae4dec743b12804189b065963d50096df9d5bf06.tar.gz
opie-ae4dec743b12804189b065963d50096df9d5bf06.tar.bz2
fixes 3 typos
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/settings/mediummount/mediumglobal.cc2
-rw-r--r--noncore/settings/mediummount/mediumwidget.cc4
2 files changed, 3 insertions, 3 deletions
diff --git a/noncore/settings/mediummount/mediumglobal.cc b/noncore/settings/mediummount/mediumglobal.cc
index c1ad415..1f90497 100644
--- a/noncore/settings/mediummount/mediumglobal.cc
+++ b/noncore/settings/mediummount/mediumglobal.cc
@@ -1,185 +1,185 @@
1 1
2 2
3#include <qlineedit.h> 3#include <qlineedit.h>
4#include <qcheckbox.h> 4#include <qcheckbox.h>
5#include <qlabel.h> 5#include <qlabel.h>
6#include <qabstractlayout.h> // spacer item 6#include <qabstractlayout.h> // spacer item
7#include <qlayout.h> 7#include <qlayout.h>
8#include <qframe.h> 8#include <qframe.h>
9#include <qgroupbox.h> 9#include <qgroupbox.h>
10#include <qwhatsthis.h> 10#include <qwhatsthis.h>
11 11
12#include <qpe/config.h> 12#include <qpe/config.h>
13 13
14#include "mediumglobal.h" 14#include "mediumglobal.h"
15 15
16using namespace MediumMountSetting; 16using namespace MediumMountSetting;
17 17
18MediumGlobalWidget::MediumGlobalWidget(QWidget *wid, const char *name ) 18MediumGlobalWidget::MediumGlobalWidget(QWidget *wid, const char *name )
19 : QWidget( wid, name ) 19 : QWidget( wid, name )
20{ 20{
21 m_config = 0; 21 m_config = 0;
22 initGUI(); 22 initGUI();
23 readConfig(); 23 readConfig();
24 24
25} 25}
26void MediumGlobalWidget::initGUI() 26void MediumGlobalWidget::initGUI()
27{ 27{
28 m_layout = new QVBoxLayout(this ); 28 m_layout = new QVBoxLayout(this );
29 m_layout->setMargin( 10 ); 29 m_layout->setMargin( 10 );
30 m_layout->setSpacing( 10 ); 30 m_layout->setSpacing( 10 );
31 31
32 32
33 m_label = new QLabel( this ); 33 m_label = new QLabel( this );
34 m_label->setTextFormat( Qt::RichText ); 34 m_label->setTextFormat( Qt::RichText );
35 m_label->setText( tr("") ); 35 m_label->setText( tr("") );
36 QWhatsThis::add( this, ("If a medium gets inserted into this device Opie " 36 QWhatsThis::add( this, ("If a medium gets inserted into this device Opie "
37 "tries to search the medium for Dcouments. On " 37 "tries to search the medium for Documents. On "
38 "large mediums this can take some time. You can choose " 38 "large mediums this can take some time. You can choose "
39 "if Opie should scan for Documents globally or on a " 39 "if Opie should scan for Documents globally or on a "
40 "per medium level. You're also able to reconfigure " 40 "per medium level. You're also able to reconfigure "
41 "each medium." 41 "each medium."
42 ) ); 42 ) );
43 43
44 m_layout->addWidget( m_label ); 44 m_layout->addWidget( m_label );
45 45
46 m_check = new QCheckBox( tr("Enable medium checking" ), this ); 46 m_check = new QCheckBox( tr("Enable medium checking" ), this );
47 connect( m_check, SIGNAL(stateChanged(int) ), 47 connect( m_check, SIGNAL(stateChanged(int) ),
48 this, SLOT(slotEnableChecking() ) ); 48 this, SLOT(slotEnableChecking() ) );
49 m_layout->addWidget(m_check ); 49 m_layout->addWidget(m_check );
50 50
51 m_frame = new QFrame(this, "Frame" ); 51 m_frame = new QFrame(this, "Frame" );
52 m_frame->setFrameShape( QFrame::Box ); 52 m_frame->setFrameShape( QFrame::Box );
53 m_frame->setFrameShadow( QFrame::Sunken ); 53 m_frame->setFrameShadow( QFrame::Sunken );
54 54
55 m_box = new QVBoxLayout( m_frame ); 55 m_box = new QVBoxLayout( m_frame );
56 m_box->setMargin( 5 ); 56 m_box->setMargin( 5 );
57 m_useglobal = new QCheckBox( tr("Use global settings"), m_frame ); 57 m_useglobal = new QCheckBox( tr("Use global settings"), m_frame );
58 connect( m_useglobal, SIGNAL( stateChanged(int) ), 58 connect( m_useglobal, SIGNAL( stateChanged(int) ),
59 this, SLOT( slotGlobalChanged() ) ); 59 this, SLOT( slotGlobalChanged() ) );
60 60
61 m_box->addWidget( m_useglobal ); 61 m_box->addWidget( m_useglobal );
62 62
63 m_global = new QGroupBox( tr("Which media files"), m_frame ); 63 m_global = new QGroupBox( tr("Which media files"), m_frame );
64 m_frameLay = new QGridLayout(m_global, 4, 3 ); 64 m_frameLay = new QGridLayout(m_global, 4, 3 );
65 m_frameLay->setMargin( 12 ); 65 m_frameLay->setMargin( 12 );
66 66
67 QSpacerItem *item2 = new QSpacerItem( 5, 8, 67 QSpacerItem *item2 = new QSpacerItem( 5, 8,
68 QSizePolicy::Fixed, 68 QSizePolicy::Fixed,
69 QSizePolicy::Fixed ); 69 QSizePolicy::Fixed );
70 m_audio = new QCheckBox( tr("Audio"), m_global ); 70 m_audio = new QCheckBox( tr("Audio"), m_global );
71 m_all = new QCheckBox( tr("All") , m_global ); 71 m_all = new QCheckBox( tr("All") , m_global );
72 m_image = new QCheckBox( tr("Image"), m_global ); 72 m_image = new QCheckBox( tr("Image"), m_global );
73 m_text = new QCheckBox( tr("Text") , m_global ); 73 m_text = new QCheckBox( tr("Text") , m_global );
74 m_video = new QCheckBox( tr("Video"), m_global ); 74 m_video = new QCheckBox( tr("Video"), m_global );
75 75
76 connect(m_all, SIGNAL(stateChanged(int) ), 76 connect(m_all, SIGNAL(stateChanged(int) ),
77 this, SLOT(slotAllChanged() ) ); 77 this, SLOT(slotAllChanged() ) );
78 78
79 m_frameLay->addItem( item2, 0, 0 ); 79 m_frameLay->addItem( item2, 0, 0 );
80 80
81 m_frameLay->addWidget( m_audio, 1, 0 ); 81 m_frameLay->addWidget( m_audio, 1, 0 );
82 m_frameLay->addWidget( m_image, 2, 0 ); 82 m_frameLay->addWidget( m_image, 2, 0 );
83 m_frameLay->addWidget( m_all, 3, 0 ); 83 m_frameLay->addWidget( m_all, 3, 0 );
84 84
85 m_frameLay->addWidget( m_text, 1, 2 ); 85 m_frameLay->addWidget( m_text, 1, 2 );
86 m_frameLay->addWidget( m_video, 2, 2 ); 86 m_frameLay->addWidget( m_video, 2, 2 );
87 87
88 m_frameLay->addRowSpacing( 0, 8 ); 88 m_frameLay->addRowSpacing( 0, 8 );
89 m_frameLay->addColSpacing( 1, 2 ); 89 m_frameLay->addColSpacing( 1, 2 );
90 90
91 m_box->addWidget( m_global ); 91 m_box->addWidget( m_global );
92 92
93 93
94 m_layout->addWidget( m_frame ); 94 m_layout->addWidget( m_frame );
95 95
96 QSpacerItem *item1 = new QSpacerItem( 1, 24, 96 QSpacerItem *item1 = new QSpacerItem( 1, 24,
97 QSizePolicy::Fixed, 97 QSizePolicy::Fixed,
98 QSizePolicy::Expanding ); 98 QSizePolicy::Expanding );
99 m_layout->addItem( item1 ); 99 m_layout->addItem( item1 );
100} 100}
101void MediumGlobalWidget::readConfig() 101void MediumGlobalWidget::readConfig()
102{ 102{
103 if( m_config == 0 ) 103 if( m_config == 0 )
104 m_config = new Config("medium" ); 104 m_config = new Config("medium" );
105 105
106 m_config->setGroup("main"); 106 m_config->setGroup("main");
107 m_useglobal->setChecked( m_config->readBoolEntry("global", false ) ); 107 m_useglobal->setChecked( m_config->readBoolEntry("global", false ) );
108 m_check->setChecked( m_config->readBoolEntry("use", true ) ); 108 m_check->setChecked( m_config->readBoolEntry("use", true ) );
109 109
110 m_config->setGroup("mimetypes" ); 110 m_config->setGroup("mimetypes" );
111 m_all->setChecked ( m_config->readBoolEntry("all", false ) ); 111 m_all->setChecked ( m_config->readBoolEntry("all", false ) );
112 m_audio->setChecked( m_config->readBoolEntry("audio", true ) ); 112 m_audio->setChecked( m_config->readBoolEntry("audio", true ) );
113 m_video->setChecked( m_config->readBoolEntry("video", true ) ); 113 m_video->setChecked( m_config->readBoolEntry("video", true ) );
114 m_text->setChecked ( m_config->readBoolEntry("text", true ) ); 114 m_text->setChecked ( m_config->readBoolEntry("text", true ) );
115 m_image->setChecked( m_config->readBoolEntry("image", true ) ); 115 m_image->setChecked( m_config->readBoolEntry("image", true ) );
116 116
117 slotAllChanged(); 117 slotAllChanged();
118 slotEnableChecking(); 118 slotEnableChecking();
119 slotGlobalChanged(); 119 slotGlobalChanged();
120 if( m_all->isChecked() ){ 120 if( m_all->isChecked() ){
121 m_video->setEnabled( false ); 121 m_video->setEnabled( false );
122 m_text->setEnabled( false ); 122 m_text->setEnabled( false );
123 m_audio->setEnabled( false ); 123 m_audio->setEnabled( false );
124 m_image->setEnabled( false ); 124 m_image->setEnabled( false );
125 125
126 } 126 }
127} 127}
128void MediumGlobalWidget::writeConfig() 128void MediumGlobalWidget::writeConfig()
129{ 129{
130 m_config->setGroup( "main" ); 130 m_config->setGroup( "main" );
131 m_config->writeEntry("global", m_useglobal->isChecked() ); 131 m_config->writeEntry("global", m_useglobal->isChecked() );
132 m_config->writeEntry("use", m_check->isChecked() ); 132 m_config->writeEntry("use", m_check->isChecked() );
133 133
134 m_config->setGroup("mimetypes" ); 134 m_config->setGroup("mimetypes" );
135 135
136 m_config->writeEntry("all", m_all->isChecked() ); 136 m_config->writeEntry("all", m_all->isChecked() );
137 m_config->writeEntry("audio", m_audio->isChecked() ); 137 m_config->writeEntry("audio", m_audio->isChecked() );
138 m_config->writeEntry("video", m_video->isChecked() ); 138 m_config->writeEntry("video", m_video->isChecked() );
139 m_config->writeEntry("text", m_text->isChecked() ); 139 m_config->writeEntry("text", m_text->isChecked() );
140 m_config->writeEntry("image", m_image->isChecked() ); 140 m_config->writeEntry("image", m_image->isChecked() );
141} 141}
142MediumGlobalWidget::~MediumGlobalWidget() 142MediumGlobalWidget::~MediumGlobalWidget()
143{ 143{
144 writeConfig(); 144 writeConfig();
145 delete m_config; 145 delete m_config;
146} 146}
147void MediumGlobalWidget::slotGlobalChanged() 147void MediumGlobalWidget::slotGlobalChanged()
148{ 148{
149 int mode = GLOBAL_DISABLED; 149 int mode = GLOBAL_DISABLED;
150 bool enabled = false; 150 bool enabled = false;
151 if( ( enabled =m_useglobal->isChecked() ) ){ 151 if( ( enabled =m_useglobal->isChecked() ) ){
152 mode = GLOBAL_ENABLED; 152 mode = GLOBAL_ENABLED;
153 }else 153 }else
154 mode = GLOBAL_DISABLED; 154 mode = GLOBAL_DISABLED;
155 qWarning("enabled = %d", enabled ); 155 qWarning("enabled = %d", enabled );
156 m_all->setEnabled ( enabled ); 156 m_all->setEnabled ( enabled );
157 m_audio->setEnabled( enabled ); 157 m_audio->setEnabled( enabled );
158 m_image->setEnabled( enabled ); 158 m_image->setEnabled( enabled );
159 m_text->setEnabled ( enabled ); 159 m_text->setEnabled ( enabled );
160 m_video->setEnabled ( enabled ); 160 m_video->setEnabled ( enabled );
161 slotAllChanged(); 161 slotAllChanged();
162 162
163 emit globalStateChanged( mode ); 163 emit globalStateChanged( mode );
164} 164}
165void MediumGlobalWidget::slotEnableChecking() 165void MediumGlobalWidget::slotEnableChecking()
166{ 166{
167 int mode = ENABLE_CHECKS; 167 int mode = ENABLE_CHECKS;
168 bool enabled = false; 168 bool enabled = false;
169 if( ( enabled = m_check->isChecked() ) ){ 169 if( ( enabled = m_check->isChecked() ) ){
170 mode = ENABLE_CHECKS; 170 mode = ENABLE_CHECKS;
171 }else{ 171 }else{
172 mode = DISABLE_CHECKS; 172 mode = DISABLE_CHECKS;
173 } 173 }
174 m_frame->setEnabled( enabled ); 174 m_frame->setEnabled( enabled );
175 slotGlobalChanged(); 175 slotGlobalChanged();
176 emit enableStateChanged( mode ); 176 emit enableStateChanged( mode );
177} 177}
178void MediumGlobalWidget::slotAllChanged() 178void MediumGlobalWidget::slotAllChanged()
179{ 179{
180 bool enable = !m_all->isChecked(); 180 bool enable = !m_all->isChecked();
181 m_audio->setEnabled( enable ); 181 m_audio->setEnabled( enable );
182 m_text->setEnabled( enable ); 182 m_text->setEnabled( enable );
183 m_video->setEnabled( enable ); 183 m_video->setEnabled( enable );
184 m_image->setEnabled( enable ); 184 m_image->setEnabled( enable );
185} 185}
diff --git a/noncore/settings/mediummount/mediumwidget.cc b/noncore/settings/mediummount/mediumwidget.cc
index 9fc608b..04e4e7c 100644
--- a/noncore/settings/mediummount/mediumwidget.cc
+++ b/noncore/settings/mediummount/mediumwidget.cc
@@ -1,192 +1,192 @@
1 1
2 2
3#include <qcheckbox.h> 3#include <qcheckbox.h>
4#include <qgroupbox.h> 4#include <qgroupbox.h>
5#include <qhbox.h> 5#include <qhbox.h>
6#include <qlabel.h> 6#include <qlabel.h>
7#include <qabstractlayout.h> 7#include <qabstractlayout.h>
8#include <qlayout.h> 8#include <qlayout.h>
9#include <qlineedit.h> 9#include <qlineedit.h>
10#include <qpixmap.h> 10#include <qpixmap.h>
11#include <qpushbutton.h> 11#include <qpushbutton.h>
12#include <qvbox.h> 12#include <qvbox.h>
13#include <qwhatsthis.h> 13#include <qwhatsthis.h>
14 14
15 15
16#include <qpe/config.h> 16#include <qpe/config.h>
17#include <qpe/qpeapplication.h> 17#include <qpe/qpeapplication.h>
18 18
19#include "mediumwidget.h" 19#include "mediumwidget.h"
20 20
21 21
22 22
23using namespace MediumMountSetting; 23using namespace MediumMountSetting;
24 24
25MediumMountWidget::MediumMountWidget(const QString &path, 25MediumMountWidget::MediumMountWidget(const QString &path,
26 const QPixmap &pix, 26 const QPixmap &pix,
27 QWidget *parent, 27 QWidget *parent,
28 const char *name ) 28 const char *name )
29 : QWidget( parent, name ) 29 : QWidget( parent, name )
30{ 30{
31 if(parent == 0){ 31 if(parent == 0){
32 resize(QApplication::desktop()->width(), QApplication::desktop()->height() ); 32 resize(QApplication::desktop()->width(), QApplication::desktop()->height() );
33 }else{ 33 }else{
34 resize(parent->width(), parent->height() ); 34 resize(parent->width(), parent->height() );
35 } 35 }
36 m_path = path; 36 m_path = path;
37 initGUI(); 37 initGUI();
38 m_label->setPixmap(pix ); 38 m_label->setPixmap(pix );
39 m_config = 0; 39 m_config = 0;
40 40
41 readConfig(); 41 readConfig();
42} 42}
43// now we fire up the GUI 43// now we fire up the GUI
44// if I would know what I'm doing ;) 44// if I would know what I'm doing ;)
45void MediumMountWidget::initGUI() 45void MediumMountWidget::initGUI()
46{ 46{
47 //main layout 47 //main layout
48 m_box = new QVBoxLayout( this , 5, 5 ); 48 m_box = new QVBoxLayout( this , 5, 5 );
49 m_box->setSpacing( 5 ); 49 m_box->setSpacing( 5 );
50 //m_box->addStretch( -1 ); 50 //m_box->addStretch( -1 );
51 51
52 // picture + text 52 // picture + text
53 m_infoBox = new QHBox(this, "infobox" ); 53 m_infoBox = new QHBox(this, "infobox" );
54 m_infoBox->setSpacing( 4 ); 54 m_infoBox->setSpacing( 4 );
55 m_label = new QLabel(m_infoBox ); 55 m_label = new QLabel(m_infoBox );
56 m_desc = new QLabel(m_infoBox ); 56 m_desc = new QLabel(m_infoBox );
57 m_desc->setTextFormat( Qt::RichText ); 57 m_desc->setTextFormat( Qt::RichText );
58 QWhatsThis::add( this, tr("Configure this medium. The changes will" 58 QWhatsThis::add( this, tr("Configure this medium. The changes will"
59 " go into effect when the application get's" 59 " go into effect when the application gets"
60 " closed. To update the Document Tab you need" 60 " closed. To update the Document Tab you need"
61 " to removeand insert this medium.")); 61 " to remove and insert this medium."));
62 m_desc->setText("" ); 62 m_desc->setText("" );
63 m_box->addWidget( m_infoBox ); // add the widget to the layout 63 m_box->addWidget( m_infoBox ); // add the widget to the layout
64 64
65 65
66 // groupbox 66 // groupbox
67 m_group = new QGroupBox(tr("Which media files"), this, "MediaFiles" ); 67 m_group = new QGroupBox(tr("Which media files"), this, "MediaFiles" );
68 m_checks = new QGridLayout( m_group, 4, 3 ); 68 m_checks = new QGridLayout( m_group, 4, 3 );
69 m_checks->setMargin( 12 ); 69 m_checks->setMargin( 12 );
70 70
71 71
72 72
73 QSpacerItem *item2 = new QSpacerItem(5, 8, 73 QSpacerItem *item2 = new QSpacerItem(5, 8,
74 QSizePolicy::Fixed, 74 QSizePolicy::Fixed,
75 QSizePolicy::Fixed); 75 QSizePolicy::Fixed);
76 m_box->addItem( item2 ); 76 m_box->addItem( item2 );
77 77
78 m_audio = new QCheckBox( tr("Audio"), m_group ); 78 m_audio = new QCheckBox( tr("Audio"), m_group );
79 m_all = new QCheckBox( tr("All") , m_group ); 79 m_all = new QCheckBox( tr("All") , m_group );
80 m_image = new QCheckBox( tr("Image"), m_group ); 80 m_image = new QCheckBox( tr("Image"), m_group );
81 m_text = new QCheckBox( tr("Text") , m_group ); 81 m_text = new QCheckBox( tr("Text") , m_group );
82 m_video = new QCheckBox( tr("Video"), m_group ); 82 m_video = new QCheckBox( tr("Video"), m_group );
83 83
84 QSpacerItem *iti1b = new QSpacerItem(2, 10, QSizePolicy::Fixed, 84 QSpacerItem *iti1b = new QSpacerItem(2, 10, QSizePolicy::Fixed,
85 QSizePolicy::Fixed ); 85 QSizePolicy::Fixed );
86 m_checks->addItem( iti1b, 0, 0 ); 86 m_checks->addItem( iti1b, 0, 0 );
87 87
88 m_checks->addWidget(m_audio, 1, 0 ); 88 m_checks->addWidget(m_audio, 1, 0 );
89 m_checks->addWidget(m_image, 2, 0 ); 89 m_checks->addWidget(m_image, 2, 0 );
90 m_checks->addWidget(m_all , 3, 0 ); 90 m_checks->addWidget(m_all , 3, 0 );
91 91
92 m_checks->addWidget(m_text, 1, 2 ); 92 m_checks->addWidget(m_text, 1, 2 );
93 m_checks->addWidget(m_video, 2, 2 ); 93 m_checks->addWidget(m_video, 2, 2 );
94 94
95 m_checks->addRowSpacing(0, 8 ); 95 m_checks->addRowSpacing(0, 8 );
96 m_checks->addColSpacing(1, 2 ); 96 m_checks->addColSpacing(1, 2 );
97 m_checks->setColStretch(1, -2 ); 97 m_checks->setColStretch(1, -2 );
98 98
99 connect(m_all, SIGNAL(stateChanged(int) ), 99 connect(m_all, SIGNAL(stateChanged(int) ),
100 this, SLOT(slotStateChanged() ) ); 100 this, SLOT(slotStateChanged() ) );
101 101
102 m_box->addWidget( m_group ); 102 m_box->addWidget( m_group );
103 103
104 // label 104 // label
105 m_lblPath = new QLabel(tr("Limit search to:"), this ); 105 m_lblPath = new QLabel(tr("Limit search to:"), this );
106 m_box->addWidget( m_lblPath ); 106 m_box->addWidget( m_lblPath );
107 107
108 // add to 108 // add to
109 m_hboxAdd = new QHBox( this ); 109 m_hboxAdd = new QHBox( this );
110 m_hboxAdd->setSpacing( 10 ); 110 m_hboxAdd->setSpacing( 10 );
111 m_edit = new QLineEdit(m_hboxAdd ); 111 m_edit = new QLineEdit(m_hboxAdd );
112 m_add = new QPushButton(m_hboxAdd ); 112 m_add = new QPushButton(m_hboxAdd );
113 m_add->setText( tr("Add") ); 113 m_add->setText( tr("Add") );
114 114
115 m_box->addWidget(m_hboxAdd ); 115 m_box->addWidget(m_hboxAdd );
116 116
117 m_always = new QCheckBox( tr("Always check this medium"), this ); 117 m_always = new QCheckBox( tr("Always check this medium"), this );
118 118
119 m_box->addWidget( m_always ); 119 m_box->addWidget( m_always );
120 120
121 QSpacerItem *item = new QSpacerItem(5, 50, 121 QSpacerItem *item = new QSpacerItem(5, 50,
122 QSizePolicy::Fixed, 122 QSizePolicy::Fixed,
123 QSizePolicy::Expanding ); 123 QSizePolicy::Expanding );
124 m_box->addItem(item ); 124 m_box->addItem(item );
125} 125}
126 126
127void MediumMountWidget::readConfig( ) 127void MediumMountWidget::readConfig( )
128{ 128{
129 if( m_config == 0 ) 129 if( m_config == 0 )
130 m_config = new Config(m_path + "/.opiestorage.cf", Config::File ); 130 m_config = new Config(m_path + "/.opiestorage.cf", Config::File );
131 m_config->setGroup( "main" ); 131 m_config->setGroup( "main" );
132 132
133 m_always->setChecked( m_config->readBoolEntry("check", false) ); 133 m_always->setChecked( m_config->readBoolEntry("check", false) );
134 134
135 m_config->setGroup( "mimetypes" ); 135 m_config->setGroup( "mimetypes" );
136 if( m_config->readBoolEntry("all", false ) ){ 136 if( m_config->readBoolEntry("all", false ) ){
137 m_audio->setEnabled( false ); 137 m_audio->setEnabled( false );
138 m_image->setEnabled( false ); 138 m_image->setEnabled( false );
139 m_text->setEnabled ( false ); 139 m_text->setEnabled ( false );
140 m_video->setEnabled( false ); 140 m_video->setEnabled( false );
141 m_all->setChecked( true ); 141 m_all->setChecked( true );
142 }else{ 142 }else{
143 m_audio->setEnabled( true ); 143 m_audio->setEnabled( true );
144 m_image->setEnabled( true ); 144 m_image->setEnabled( true );
145 m_text->setEnabled ( true ); 145 m_text->setEnabled ( true );
146 m_all->setEnabled ( true ); 146 m_all->setEnabled ( true );
147 147
148 m_all->setChecked( false ); 148 m_all->setChecked( false );
149 149
150 m_audio->setChecked( m_config->readBoolEntry("audio", true ) ); 150 m_audio->setChecked( m_config->readBoolEntry("audio", true ) );
151 m_image->setChecked( m_config->readBoolEntry("image", true ) ); 151 m_image->setChecked( m_config->readBoolEntry("image", true ) );
152 m_text->setChecked ( m_config->readBoolEntry("text" , true ) ); 152 m_text->setChecked ( m_config->readBoolEntry("text" , true ) );
153 m_video->setChecked( m_config->readBoolEntry("video", true ) ); 153 m_video->setChecked( m_config->readBoolEntry("video", true ) );
154 }; 154 };
155} 155}
156 156
157void MediumMountWidget::writeConfig() 157void MediumMountWidget::writeConfig()
158{ 158{
159 m_config->setGroup("main"); 159 m_config->setGroup("main");
160 m_config->writeEntry("check", m_always->isChecked() ); 160 m_config->writeEntry("check", m_always->isChecked() );
161 161
162 m_config->setGroup("mimetypes" ); 162 m_config->setGroup("mimetypes" );
163 if(m_all->isChecked() ){ 163 if(m_all->isChecked() ){
164 m_config->writeEntry("all", true ); 164 m_config->writeEntry("all", true );
165 }else{ 165 }else{
166 m_config->writeEntry("audio", m_audio->isChecked() ); 166 m_config->writeEntry("audio", m_audio->isChecked() );
167 m_config->writeEntry("image", m_image->isChecked() ); 167 m_config->writeEntry("image", m_image->isChecked() );
168 m_config->writeEntry("text" , m_text->isChecked() ); 168 m_config->writeEntry("text" , m_text->isChecked() );
169 m_config->writeEntry("video", m_video->isChecked() ); 169 m_config->writeEntry("video", m_video->isChecked() );
170 } 170 }
171} 171}
172MediumMountWidget::~MediumMountWidget() 172MediumMountWidget::~MediumMountWidget()
173{ 173{
174 writeConfig(); 174 writeConfig();
175 delete m_config; 175 delete m_config;
176} 176}
177 177
178 178
179void MediumMountWidget::slotAdd() 179void MediumMountWidget::slotAdd()
180{ 180{
181 181
182} 182}
183void MediumMountWidget::slotStateChanged() 183void MediumMountWidget::slotStateChanged()
184{ 184{
185 bool state = !(m_all->isChecked()); 185 bool state = !(m_all->isChecked());
186 186
187 m_audio->setEnabled( state ); 187 m_audio->setEnabled( state );
188 m_text->setEnabled ( state ); 188 m_text->setEnabled ( state );
189 m_video->setEnabled( state ); 189 m_video->setEnabled( state );
190 m_image->setEnabled( state ); 190 m_image->setEnabled( state );
191 191
192} 192}