preferences.cpp: Changed the preferences dialog to use a tree of categories

and plugins, the way wxwindows do it.
pluginsbox.(cpp|h): removed the "Configure" button from CONFIG_ITEM_MODULE
widgets, as it isn't needed anymore
parent 70f82bff
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* pluginbox.cpp: the pluginbox class * pluginbox.cpp: the pluginbox class
***************************************************************************** *****************************************************************************
* Copyright (C) 2001 VideoLAN * Copyright (C) 2001 VideoLAN
* $Id: pluginsbox.cpp,v 1.2 2002/08/12 17:38:10 sigmunau Exp $ * $Id: pluginsbox.cpp,v 1.3 2003/03/29 14:30:55 sigmunau Exp $
* *
* Authors: Sigmund Augdal <sigmunau@idi.ntnu.no> Mon Aug 12 2002 * Authors: Sigmund Augdal <sigmunau@idi.ntnu.no> Mon Aug 12 2002
* *
...@@ -45,15 +45,12 @@ KPluginsBox::KPluginsBox(intf_thread_t *p_intf, ...@@ -45,15 +45,12 @@ KPluginsBox::KPluginsBox(intf_thread_t *p_intf,
listView->addColumn(_("Name")); listView->addColumn(_("Name"));
listView->addColumn(_("Description")); listView->addColumn(_("Description"));
KButtonBox *item_bbox = new KButtonBox(item_vbox); KButtonBox *item_bbox = new KButtonBox(item_vbox);
configure = item_bbox->addButton( _("Configure") );
configure->setEnabled(false);
selectButton = item_bbox->addButton( _("Select") ); selectButton = item_bbox->addButton( _("Select") );
QHBox *item_hbox = new QHBox(item_vbox); QHBox *item_hbox = new QHBox(item_vbox);
item_hbox->setSpacing(spacing); item_hbox->setSpacing(spacing);
new QLabel( _("Selected:"), item_hbox ); new QLabel( _("Selected:"), item_hbox );
line = new KLineEdit( value, item_hbox ); line = new KLineEdit( value, item_hbox );
connect(selectButton, SIGNAL(clicked()), this, SLOT(selectClicked())); connect(selectButton, SIGNAL(clicked()), this, SLOT(selectClicked()));
connect(configure, SIGNAL(clicked()), this, SLOT(configureClicked()));
connect(listView, SIGNAL(selectionChanged( QListViewItem *)), connect(listView, SIGNAL(selectionChanged( QListViewItem *)),
this, SLOT( selectionChanged( QListViewItem *))); this, SLOT( selectionChanged( QListViewItem *)));
} }
...@@ -76,15 +73,7 @@ void KPluginsBox::selectClicked() ...@@ -76,15 +73,7 @@ void KPluginsBox::selectClicked()
} }
} }
void KPluginsBox::configureClicked()
{
if (listView->selectedItem()) {
new KPreferences(p_intf, listView->selectedItem()->text(0), this);
}
}
void KPluginsBox::selectionChanged( QListViewItem *item ) void KPluginsBox::selectionChanged( QListViewItem *item )
{ {
selectButton->setEnabled(true); selectButton->setEnabled(true);
/* look for module 'psz_name' */
configure->setEnabled(owner->isConfigureable(item->text(0)));
} }
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* pluginbox.h: includes for the pluginbox class * pluginbox.h: includes for the pluginbox class
***************************************************************************** *****************************************************************************
* Copyright (C) 2001 VideoLAN * Copyright (C) 2001 VideoLAN
* $Id: pluginsbox.h,v 1.2 2002/08/12 17:38:10 sigmunau Exp $ * $Id: pluginsbox.h,v 1.3 2003/03/29 14:30:55 sigmunau Exp $
* *
* Authors: Sigmund Augdal <sigmunau@idi.ntnu.no> Mon Aug 12 2002 * Authors: Sigmund Augdal <sigmunau@idi.ntnu.no> Mon Aug 12 2002
* *
...@@ -39,7 +39,6 @@ class KPluginsBox : public QGroupBox ...@@ -39,7 +39,6 @@ class KPluginsBox : public QGroupBox
private slots: private slots:
void selectClicked(void); void selectClicked(void);
void configureClicked(void);
void selectionChanged( QListViewItem * ); void selectionChanged( QListViewItem * );
signals: signals:
...@@ -48,7 +47,6 @@ class KPluginsBox : public QGroupBox ...@@ -48,7 +47,6 @@ class KPluginsBox : public QGroupBox
private: private:
intf_thread_t *p_intf; intf_thread_t *p_intf;
KListView *listView; KListView *listView;
QPushButton *configure;
QPushButton *selectButton; QPushButton *selectButton;
KLineEdit *line; KLineEdit *line;
KPreferences *owner; KPreferences *owner;
......
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment