Commit 45755085 authored by Christoph Cullmann's avatar Christoph Cullmann

fix minimum size of the config dialog

kate part config pages are clever, just create them always, that allows to have reasonable dialog sizes
this is the 'proper' fix I guess
without the review request and hints there, this would not have been fixed!
thanks to Mikael Hermansson
REVIEW: 107925
parent c056f2aa
......@@ -233,28 +233,12 @@ void KateConfigDialog::addEditorPages() {
for (int i = 0; i < KateDocManager::self()->editor()->configPages (); ++i)
{
KVBox *page = new KVBox();
page->setSpacing( -1 );
QWidget *page = KateDocManager::self()->editor()->configPage(i, this);
connect( page, SIGNAL(changed()), this, SLOT(slotChanged()) );
KPageWidgetItem *item=addSubPage( m_editorPage, page, KateDocManager::self()->editor()->configPageName(i) );
item->setHeader( KateDocManager::self()->editor()->configPageFullName(i) );
item->setIcon( KateDocManager::self()->editor()->configPageIcon(i) );
PluginPageListItem *info = new PluginPageListItem;
info->type=PluginPageListItem::Editor;
info->plugin = 0;
info->configPageInterface=0;
info->pageParent=page;
info->pluginPage = 0;
info->editorPage = 0; //info->configPageInterface->configPage (i, page);
info->idInPlugin=i;
info->pageWidgetItem = item;
//connect( info->page, SIGNAL(changed()), this, SLOT(slotChanged()) );
m_pluginPages.insert(item,info);
}
}
void KateConfigDialog::addPluginPage (Kate::Plugin *plugin)
......@@ -272,7 +256,6 @@ void KateConfigDialog::addPluginPage (Kate::Plugin *plugin)
item->setIcon( Kate::pluginConfigPageInterface(plugin)->configPageIcon(i));
PluginPageListItem *info = new PluginPageListItem;
info->type=PluginPageListItem::Plugin;
info->plugin = plugin;
info->configPageInterface=Kate::pluginConfigPageInterface(plugin);
info->pageParent=page;
......@@ -291,17 +274,9 @@ void KateConfigDialog::slotCurrentPageChanged( KPageWidgetItem *current, KPageWi
if (!info) return;
if (info->pluginPage || info->editorPage) return;
kDebug()<<"creating config page";
if (info->type==PluginPageListItem::Plugin) {
info->pluginPage=info->configPageInterface->configPage(info->idInPlugin,info->pageParent);
info->pluginPage->show();
connect( info->pluginPage, SIGNAL(changed()), this, SLOT(slotChanged()) );
} else if (info->type==PluginPageListItem::Editor) {
info->editorPage = KateDocManager::self()->editor()->configPage(info->idInPlugin, info->pageParent);
info->editorPage->show();
connect( info->editorPage, SIGNAL(changed()), this, SLOT(slotChanged()) );
}
}
void KateConfigDialog::removePluginPage (Kate::Plugin *plugin)
......
......@@ -38,10 +38,6 @@ class KateMainWindow;
struct PluginPageListItem
{
enum e_type{Editor=1,Plugin=2};
enum e_type type;
Kate::Plugin *plugin;
Kate::PluginConfigPageInterface *configPageInterface;
uint idInPlugin;
......
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