diff --git a/kcmkwin/kwinrules/detectwidget.cpp b/kcmkwin/kwinrules/detectwidget.cpp
index 541407661e..5d469f6e5b 100644
--- a/kcmkwin/kwinrules/detectwidget.cpp
+++ b/kcmkwin/kwinrules/detectwidget.cpp
@@ -105,11 +105,7 @@ void DetectDialog::executeDialog()
};
widget->class_label->setText(wmclass_class + " (" + wmclass_name + ' ' + wmclass_class + ')');
widget->role_label->setText(role);
- widget->use_role->setEnabled(!role.isEmpty());
- if (widget->use_role->isEnabled())
- widget->use_role->setChecked(true);
- else
- widget->use_whole_class->setChecked(true);
+ widget->match_role->setEnabled(!role.isEmpty());
if (type == NET::Unknown)
widget->type_label->setText(i18n("Unknown - will be treated as Normal Window"));
else
@@ -125,19 +121,19 @@ void DetectDialog::executeDialog()
QByteArray DetectDialog::selectedClass() const
{
- if (widget->use_class->isChecked() || widget->use_role->isChecked())
- return wmclass_class;
- return wmclass_name + ' ' + wmclass_class;
+ if (widget->match_whole_class->isChecked())
+ return wmclass_name + ' ' + wmclass_class;
+ return wmclass_class;
}
bool DetectDialog::selectedWholeClass() const
{
- return widget->use_whole_class->isChecked();
+ return widget->match_whole_class->isChecked();
}
QByteArray DetectDialog::selectedRole() const
{
- if (widget->use_role->isChecked())
+ if (widget->match_role->isChecked())
return role;
return "";
}
@@ -154,7 +150,7 @@ Rules::StringMatch DetectDialog::titleMatch() const
bool DetectDialog::selectedWholeApp() const
{
- return widget->use_class->isChecked();
+ return !widget->match_type->isChecked();
}
NET::WindowType DetectDialog::selectedType() const
diff --git a/kcmkwin/kwinrules/detectwidget.ui b/kcmkwin/kwinrules/detectwidget.ui
index ab7c6313b8..ab150e965e 100644
--- a/kcmkwin/kwinrules/detectwidget.ui
+++ b/kcmkwin/kwinrules/detectwidget.ui
@@ -6,199 +6,204 @@
0
0
- 428
- 318
+ 450
+ 300
-
- -
-
-
+
+
-
+
+
Information About Selected Window
-
- false
-
-
-
- -
-
-
- QFrame::HLine
-
-
- QFrame::Sunken
-
-
-
- -
-
-
- Class:
-
-
- Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
-
-
- false
-
-
-
- -
-
-
-
-
-
- false
-
-
-
- -
-
-
- Role:
-
-
- Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
-
-
- false
-
-
-
- -
-
-
-
-
-
- false
-
-
-
- -
-
-
- Type:
-
-
- Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
-
-
- false
-
-
-
- -
-
-
-
-
-
- false
-
-
-
- -
-
-
- Title:
-
-
- Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
-
-
- false
-
-
-
- -
-
-
-
-
-
- false
-
-
-
- -
-
-
- Machine:
-
-
- Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
-
-
- false
-
-
-
- -
-
-
-
-
-
- false
+
+ true
+
+
-
+
+
+ Class:
+
+
+ Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
+
+
+ false
+
+
+
+ -
+
+
+
+ true
+
+
+
+
+
+
+ false
+
+
+
+ -
+
+
+ Role:
+
+
+ Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
+
+
+ false
+
+
+
+ -
+
+
+
+ true
+
+
+
+
+
+
+ false
+
+
+
+ -
+
+
+ Type:
+
+
+ Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
+
+
+ false
+
+
+
+ -
+
+
+
+ true
+
+
+
+
+
+
+ false
+
+
+
+ -
+
+
+ Title:
+
+
+ Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
+
+
+ false
+
+
+
+ -
+
+
+
+ true
+
+
+
+
+
+
+ false
+
+
+
+ -
+
+
+ Machine:
+
+
+ Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
+
+
+ false
+
+
+
+ -
+
+
+
+ true
+
+
+
+
+
+
+ false
+
+
+
+
- -
+
-
- Match Strategy
+ Match by primary class name and
true
-
-
-
- For selecting all windows belonging to a specific application, selecting only window class should usually work.
-
+
- Use window &class (whole application)
-
-
- true
+ Secondary class name (resulting in term in brackets)
-
-
-
- For selecting a specific window in an application, both window class and window role should be selected. Window class will determine the application, and window role the specific window in the application; many applications do not provide useful window roles though.
-
+
- Use window class and window &role (specific window)
+ Window role (can be used to select windows by function)
-
-
-
- With some (non-KDE) applications whole window class can be sufficient for selecting a specific window in an application, as they set whole window class to contain both application and window role.
-
+
- Use &whole window class (specific window)
+ Window type (eg. all dialogs, but not the main windows)
-
- Match also window &title
+ Window title (very specific, can fail due to content changes or translation)
- -
+
-
Qt::Vertical