refs #1787 trying to make obj_name have keyboard focus when new firewall wizard opens, does not work so far

This commit is contained in:
Vadim Kurland
2010-10-04 22:52:23 +00:00
parent f9372b04a1
commit 053ac47849
3 changed files with 11 additions and 7 deletions
+1 -1
View File
@@ -6,7 +6,7 @@
<rect>
<x>0</x>
<y>0</y>
<width>579</width>
<width>479</width>
<height>391</height>
</rect>
</property>
+9 -5
View File
@@ -157,7 +157,6 @@ newFirewallDialog::newFirewallDialog(QWidget *parentw, FWObject *_p) : QDialog(p
m_dialog->iface_sl_list->setAllColumnsShowFocus( true );
m_dialog->obj_name->setFocus();
currentTemplate = NULL;
this->m_dialog->interfaceEditor1->clear();
this->m_dialog->interfaceEditor2->clear();
@@ -225,6 +224,10 @@ newFirewallDialog::~newFirewallDialog()
void newFirewallDialog::changed()
{
int p = currentPage();
if (fwbdebug)
qDebug() << "newFirewallDialog::changed page=" << p;
if (p==0)
{
setNextEnabled(p,
@@ -233,9 +236,9 @@ void newFirewallDialog::changed()
);
setHostOS(m_dialog->hostOS, readPlatform(m_dialog->platform), "");
QString host_os = readHostOS(m_dialog->hostOS);
this->m_dialog->interfaceEditor1->setHostOS(host_os);
this->m_dialog->interfaceEditor2->setHostOS(host_os);
m_dialog->obj_name->setFocus();
m_dialog->interfaceEditor1->setHostOS(host_os);
m_dialog->interfaceEditor2->setHostOS(host_os);
m_dialog->obj_name->setFocus(Qt::OtherFocusReason);
}
if (p==1)
@@ -436,7 +439,7 @@ void newFirewallDialog::showPage(const int page)
int p = page;
if (fwbdebug)
qDebug("newFirewallDialog::showPage page=%d", page);
qDebug() << "newFirewallDialog::showPage page=" << page;
// p is a page number _after_ it changed
switch (p)
@@ -451,6 +454,7 @@ void newFirewallDialog::showPage(const int page)
tmpldb = NULL;
}
m_dialog->nextButton->setDefault(true);
m_dialog->obj_name->setFocus();
break;
case 1:
+1 -1
View File
@@ -118,7 +118,7 @@
<string>&amp;Finish</string>
</property>
<property name="default">
<bool>true</bool>
<bool>false</bool>
</property>
<property name="flat">
<bool>false</bool>