diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 529e9279..497a4d8f 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -4,7 +4,8 @@ CHANGELOG ----------------------------------------------------------------------- VERSION 0.4.0 (In progress) ----------------------------------------------------------------------- -- Added more tabs to Details dialog +- Renamed Details dialog to Properties dialog +- Added more tabs to Properties dialog - general - object - account @@ -16,13 +17,13 @@ CHANGELOG - member of - group policy - links to -- Added traditional way to display Details dialog as a dialog. Docked mode is still available via options. -- Changed details dialog to display tab titles in a list. +- Added traditional way to display Properties dialog as a dialog. Docked mode is still available via options. +- Changed Properties dialog to display tab titles in a list. - Improved object menu - added most of the actions - added ability to perform actions on multiple objects - duplicated object menu to menubar for accesibility -- Improved attributes tab in Details dialog +- Improved attributes tab in Properties dialog - filtering - attribute type column - specialized editors for all attribute types diff --git a/src/admc/CMakeLists.txt b/src/admc/CMakeLists.txt index 9c095f30..ac82869a 100644 --- a/src/admc/CMakeLists.txt +++ b/src/admc/CMakeLists.txt @@ -25,7 +25,7 @@ add_executable(admc ad_config.cpp ad_utils.cpp ad_object.cpp - details_dialog.cpp + properties_dialog.cpp main_window.cpp status.cpp object_model.cpp @@ -59,7 +59,7 @@ add_executable(admc filter_widget/select_classes_widget.cpp filter_widget/filter_builder.cpp - tabs/details_tab.cpp + tabs/properties_tab.cpp tabs/general_tab.cpp tabs/object_tab.cpp tabs/attributes_tab.cpp diff --git a/src/admc/ad_interface.cpp b/src/admc/ad_interface.cpp index f6a39868..8af95776 100644 --- a/src/admc/ad_interface.cpp +++ b/src/admc/ad_interface.cpp @@ -1100,7 +1100,7 @@ bool AdInterface::create_gpo(const QString &display_name) { return false; } - // TODO: security descriptor. Samba does this: get nTSecurityDescriptor attribute from the gpo object as raw bytes, then sets the security descriptor of the sysvol dir to that value. Currently not doing that, so security descriptor of sysvol dir is the default one, which is ... bad? Not sure. Problem is, libsmbclient only provides a way to set security descriptor using key/value strings, not the raw bytes basically. So to do it that way would need to decode object security descriptor. Samba source has that implemented internally but not exposed as a usable lib. Probably SHOULD set security descriptor because who knows what the default is, what if it's just randomly modifiable by any user. Also, the security descriptor functionality will be needed for "Security" details tab in ADMC at some point. So should either implement all of that stuff (it's a lot...) or hopefully find some lib to use (unlikely). On Windows you would just use Microsoft's lib. + // TODO: security descriptor. Samba does this: get nTSecurityDescriptor attribute from the gpo object as raw bytes, then sets the security descriptor of the sysvol dir to that value. Currently not doing that, so security descriptor of sysvol dir is the default one, which is ... bad? Not sure. Problem is, libsmbclient only provides a way to set security descriptor using key/value strings, not the raw bytes basically. So to do it that way would need to decode object security descriptor. Samba source has that implemented internally but not exposed as a usable lib. Probably SHOULD set security descriptor because who knows what the default is, what if it's just randomly modifiable by any user. Also, the security descriptor functionality will be needed for "Security" tab in ADMC at some point. So should either implement all of that stuff (it's a lot...) or hopefully find some lib to use (unlikely). On Windows you would just use Microsoft's lib. return true; } diff --git a/src/admc/console.cpp b/src/admc/console.cpp index d9543468..43b74a9e 100644 --- a/src/admc/console.cpp +++ b/src/admc/console.cpp @@ -23,7 +23,7 @@ #include "object_menu.h" #include "utils.h" #include "ad_utils.h" -#include "details_dialog.h" +#include "properties_dialog.h" #include "ad_config.h" #include "ad_interface.h" #include "ad_object.h" @@ -724,6 +724,6 @@ void Console::on_result_item_double_clicked(const QModelIndex &index) } } } else { - DetailsDialog::open_for_target(dn); + PropertiesDialog::open_for_target(dn); } } diff --git a/src/admc/edits/attribute_edit.cpp b/src/admc/edits/attribute_edit.cpp index 82d1e22b..79563573 100644 --- a/src/admc/edits/attribute_edit.cpp +++ b/src/admc/edits/attribute_edit.cpp @@ -18,7 +18,7 @@ */ #include "edits/attribute_edit.h" -#include "tabs/details_tab.h" +#include "tabs/properties_tab.h" AttributeEdit::AttributeEdit(QList *edits_out, QObject *parent) { if (edits_out != nullptr) { @@ -90,10 +90,10 @@ void edits_load(QList edits, const AdObject &object) { } } -void edits_connect_to_tab(QList edits, DetailsTab *tab) { +void edits_connect_to_tab(QList edits, PropertiesTab *tab) { for (auto edit : edits) { QObject::connect( edit, &AttributeEdit::edited, - tab, &DetailsTab::on_edit_edited); + tab, &PropertiesTab::on_edit_edited); } } diff --git a/src/admc/edits/attribute_edit.h b/src/admc/edits/attribute_edit.h index 3d94536e..1170dab9 100644 --- a/src/admc/edits/attribute_edit.h +++ b/src/admc/edits/attribute_edit.h @@ -32,7 +32,7 @@ * are used to represent different data types. */ -class DetailsTab; +class PropertiesTab; class QFormLayout; class AdObject; @@ -88,7 +88,7 @@ public:\ // Helper f-ns that iterate over edit lists for you -void edits_connect_to_tab(QList edits, DetailsTab *tab); +void edits_connect_to_tab(QList edits, PropertiesTab *tab); void edits_add_to_layout(QList edits, QFormLayout *layout); // Verify all edits that were modified. Verify process will diff --git a/src/admc/edits/manager_edit.cpp b/src/admc/edits/manager_edit.cpp index 40e38b57..30be47fd 100644 --- a/src/admc/edits/manager_edit.cpp +++ b/src/admc/edits/manager_edit.cpp @@ -22,7 +22,7 @@ #include "ad_interface.h" #include "ad_utils.h" #include "ad_config.h" -#include "details_dialog.h" +#include "properties_dialog.h" #include "select_dialog.h" #include "ad_object.h" #include @@ -35,15 +35,15 @@ ManagerEdit::ManagerEdit(QList *edits_out, QObject *parent) edit = new QLineEdit(); change_button = new QPushButton(tr("Change")); - details_button = new QPushButton(tr("Details")); + properties_button = new QPushButton(tr("Properties")); clear_button = new QPushButton(tr("Clear")); connect( change_button, &QPushButton::clicked, this, &ManagerEdit::on_change); connect( - details_button, &QPushButton::clicked, - this, &ManagerEdit::on_details); + properties_button, &QPushButton::clicked, + this, &ManagerEdit::on_properties); connect( clear_button, &QPushButton::clicked, this, &ManagerEdit::on_clear); @@ -62,7 +62,7 @@ void ManagerEdit::set_read_only(const bool read_only) { void ManagerEdit::add_to_layout(QFormLayout *layout) { auto buttons_layout = new QHBoxLayout(); buttons_layout->addWidget(change_button); - buttons_layout->addWidget(details_button); + buttons_layout->addWidget(properties_button); buttons_layout->addWidget(clear_button); auto sublayout = new QVBoxLayout(); @@ -98,8 +98,8 @@ void ManagerEdit::on_change() { dialog->open(); } -void ManagerEdit::on_details() { - DetailsDialog::open_for_target(current_value); +void ManagerEdit::on_properties() { + PropertiesDialog::open_for_target(current_value); } void ManagerEdit::on_clear() { @@ -115,6 +115,6 @@ void ManagerEdit::load_value(const QString &value) { edit->setText(current_value); const bool have_manager = !current_value.isEmpty(); - details_button->setEnabled(have_manager); + properties_button->setEnabled(have_manager); clear_button->setEnabled(have_manager); } diff --git a/src/admc/edits/manager_edit.h b/src/admc/edits/manager_edit.h index 8856ed8d..413c2348 100644 --- a/src/admc/edits/manager_edit.h +++ b/src/admc/edits/manager_edit.h @@ -37,13 +37,13 @@ public: private slots: void on_change(); - void on_details(); + void on_properties(); void on_clear(); private: QLineEdit *edit; QPushButton *change_button; - QPushButton *details_button; + QPushButton *properties_button; QPushButton *clear_button; QString current_value; diff --git a/src/admc/find_dialog.cpp b/src/admc/find_dialog.cpp index 95742672..b0a8e1a9 100644 --- a/src/admc/find_dialog.cpp +++ b/src/admc/find_dialog.cpp @@ -23,7 +23,7 @@ #include "find_results.h" #include "ad_config.h" #include "object_menu.h" -#include "details_dialog.h" +#include "properties_dialog.h" #include #include @@ -44,7 +44,7 @@ FindDialog::FindDialog(const QList classes, const QString default_searc auto find_widget = new FindWidget(classes, default_search_base); QTreeView *results_view = find_widget->find_results->view; - DetailsDialog::connect_to_open_by_double_click(results_view, ADCONFIG()->get_column_index(ATTRIBUTE_DN)); + PropertiesDialog::connect_to_open_by_double_click(results_view, ADCONFIG()->get_column_index(ATTRIBUTE_DN)); auto layout = new QVBoxLayout(); setLayout(layout); diff --git a/src/admc/find_results.cpp b/src/admc/find_results.cpp index c092805c..b8b35eb6 100644 --- a/src/admc/find_results.cpp +++ b/src/admc/find_results.cpp @@ -19,7 +19,7 @@ #include "find_results.h" #include "object_menu.h" -#include "details_dialog.h" +#include "properties_dialog.h" #include "utils.h" #include "filter.h" #include "ad_interface.h" diff --git a/src/admc/main_window.cpp b/src/admc/main_window.cpp index 6ca18f40..85096ede 100644 --- a/src/admc/main_window.cpp +++ b/src/admc/main_window.cpp @@ -19,7 +19,7 @@ #include "main_window.h" #include "menubar.h" -#include "details_dialog.h" +#include "properties_dialog.h" #include "status.h" #include "settings.h" #include "confirmation_dialog.h" diff --git a/src/admc/object_menu.cpp b/src/admc/object_menu.cpp index 6aeb477c..ea4a28d2 100644 --- a/src/admc/object_menu.cpp +++ b/src/admc/object_menu.cpp @@ -27,7 +27,7 @@ #include "rename_dialog.h" #include "password_dialog.h" #include "create_dialog.h" -#include "details_dialog.h" +#include "properties_dialog.h" #include "select_container_dialog.h" #include "utils.h" #include "find_dialog.h" @@ -48,7 +48,7 @@ void add_to_group(const QList targets, QWidget *parent); void enable_account(const QList targets, QWidget *parent); void disable_account(const QList targets, QWidget *parent); -void details(const QString &target, QWidget *parent); +void properties(const QString &target, QWidget *parent); void rename(const QString &target, QWidget *parent); void create(const QString &target, const QString &object_class, QWidget *parent); void find(const QString &target, QWidget *parent); @@ -192,12 +192,12 @@ void add_object_actions_to_menu(QMenu *menu, QAbstractItemView *view, QWidget *p action->setDisabled(disabled); }; - // TODO: multi-object details - auto add_details = + // TODO: multi-object properties + auto add_properties = [=]() { - menu->addAction(QObject::tr("Details"), + menu->addAction(QObject::tr("Properties"), [=]() { - details(targets[0], parent); + properties(targets[0], parent); }); }; @@ -254,7 +254,7 @@ void add_object_actions_to_menu(QMenu *menu, QAbstractItemView *view, QWidget *p menu->addSeparator(); - add_details(); + add_properties(); } else if (targets.size() > 1) { const bool all_users = (target_classes.contains(CLASS_USER) && target_classes.size() == 1); @@ -271,9 +271,9 @@ void add_object_actions_to_menu(QMenu *menu, QAbstractItemView *view, QWidget *p } } -void details(const QString &target, QWidget *parent) { - // TODO: multi-object details - DetailsDialog::open_for_target(target); +void properties(const QString &target, QWidget *parent) { + // TODO: multi-object properties + PropertiesDialog::open_for_target(target); } void delete_object(const QList targets, QWidget *parent) { diff --git a/src/admc/policies_widget.cpp b/src/admc/policies_widget.cpp index 81f8463e..a7b276b3 100644 --- a/src/admc/policies_widget.cpp +++ b/src/admc/policies_widget.cpp @@ -20,7 +20,7 @@ #include "policies_widget.h" #include "ad_interface.h" #include "ad_object.h" -#include "details_dialog.h" +#include "properties_dialog.h" #include "rename_policy_dialog.h" #include "utils.h" #include "filter.h" @@ -105,8 +105,8 @@ void PoliciesWidget::on_context_menu(const QPoint pos) { const AdObject object = AD()->search_object(dn); QMenu menu; - menu.addAction(tr("Details"), [this, dn]() { - DetailsDialog::open_for_target(dn); + menu.addAction(tr("Properties"), [this, dn]() { + PropertiesDialog::open_for_target(dn); }); menu.addAction(tr("Edit Policy"), [this, dn, object]() { edit_policy(object); diff --git a/src/admc/details_dialog.cpp b/src/admc/properties_dialog.cpp similarity index 85% rename from src/admc/details_dialog.cpp rename to src/admc/properties_dialog.cpp index 223a3a20..8e4816af 100644 --- a/src/admc/details_dialog.cpp +++ b/src/admc/properties_dialog.cpp @@ -17,8 +17,8 @@ * along with this program. If not, see . */ -#include "details_dialog.h" -#include "tabs/details_tab.h" +#include "properties_dialog.h" +#include "tabs/properties_tab.h" #include "tabs/attributes_tab.h" #include "tabs/membership_tab.h" #include "tabs/account_tab.h" @@ -46,25 +46,25 @@ #include #include -void DetailsDialog::open_for_target(const QString &target) { +void PropertiesDialog::open_for_target(const QString &target) { if (target.isEmpty()) { return; } show_busy_indicator(); - static QHash instances; + static QHash instances; const bool dialog_already_open_for_this_target = instances.contains(target); if (dialog_already_open_for_this_target) { // Focus already open dialog - DetailsDialog *dialog = instances[target]; + PropertiesDialog *dialog = instances[target]; dialog->raise(); dialog->setFocus(); } else { // Make new dialog for this target - auto dialog = new DetailsDialog(target); + auto dialog = new PropertiesDialog(target); instances[target] = dialog; connect( @@ -79,7 +79,7 @@ void DetailsDialog::open_for_target(const QString &target) { hide_busy_indicator(); } -void DetailsDialog::connect_to_open_by_double_click(QAbstractItemView *view, const int dn_column) { +void PropertiesDialog::connect_to_open_by_double_click(QAbstractItemView *view, const int dn_column) { connect( view, &QAbstractItemView::doubleClicked, [dn_column](const QModelIndex &index) { @@ -88,7 +88,7 @@ void DetailsDialog::connect_to_open_by_double_click(QAbstractItemView *view, con }); } -DetailsDialog::DetailsDialog(const QString &target_arg) +PropertiesDialog::PropertiesDialog(const QString &target_arg) : QDialog() { target = target_arg; @@ -115,7 +115,7 @@ DetailsDialog::DetailsDialog(const QString &target_arg) layout->setSpacing(0); const QString name = object.get_string(ATTRIBUTE_NAME); - const QString window_title = name.isEmpty() ? tr("Details") : QString(tr("\"%1\" Details")).arg(name); + const QString window_title = name.isEmpty() ? tr("Properties") : QString(tr("\"%1\" Properties")).arg(name); setWindowTitle(window_title); if (object.is_empty()) { @@ -135,7 +135,7 @@ DetailsDialog::DetailsDialog(const QString &target_arg) // Create new tabs const auto add_tab = - [this, tab_widget](DetailsTab *tab, const QString &title) { + [this, tab_widget](PropertiesTab *tab, const QString &title) { tabs.append(tab); tab_widget->add_tab(tab, title); }; @@ -172,27 +172,27 @@ DetailsDialog::DetailsDialog(const QString &target_arg) for (auto tab : tabs) { connect( - tab, &DetailsTab::edited, - this, &DetailsDialog::on_edited); + tab, &PropertiesTab::edited, + this, &PropertiesDialog::on_edited); } reset(); connect( ok_button, &QPushButton::clicked, - this, &DetailsDialog::ok); + this, &PropertiesDialog::ok); connect( apply_button, &QPushButton::clicked, - this, &DetailsDialog::apply); + this, &PropertiesDialog::apply); connect( reset_button, &QPushButton::clicked, - this, &DetailsDialog::reset); + this, &PropertiesDialog::reset); connect( cancel_button, &QPushButton::clicked, - this, &DetailsDialog::reject); + this, &PropertiesDialog::reject); } -void DetailsDialog::ok() { +void PropertiesDialog::ok() { const bool success = apply(); if (success) { @@ -200,7 +200,7 @@ void DetailsDialog::ok() { } } -bool DetailsDialog::apply() { +bool PropertiesDialog::apply() { for (auto tab : tabs) { const bool verify_success = tab->verify(target); if (!verify_success) { @@ -226,7 +226,7 @@ bool DetailsDialog::apply() { return success; } -void DetailsDialog::reset() { +void PropertiesDialog::reset() { const AdObject object = AD()->search_object(target); for (auto tab : tabs) { tab->load(object); @@ -236,7 +236,7 @@ void DetailsDialog::reset() { reset_button->setEnabled(false); } -void DetailsDialog::on_edited() { +void PropertiesDialog::on_edited() { apply_button->setEnabled(true); reset_button->setEnabled(true); } diff --git a/src/admc/details_dialog.h b/src/admc/properties_dialog.h similarity index 74% rename from src/admc/details_dialog.h rename to src/admc/properties_dialog.h index 13328920..bd2afef5 100644 --- a/src/admc/details_dialog.h +++ b/src/admc/properties_dialog.h @@ -17,8 +17,8 @@ * along with this program. If not, see . */ -#ifndef DETAILS_DIALOG_H -#define DETAILS_DIALOG_H +#ifndef PROPERTIES_DIALOG_H +#define PROPERTIES_DIALOG_H /** * Shows info about object's attributes in multiple tabs. @@ -30,12 +30,12 @@ #include class QString; -class DetailsTab; +class PropertiesTab; class QAbstractItemView; class QPushButton; template class QList; -class DetailsDialog final : public QDialog { +class PropertiesDialog final : public QDialog { Q_OBJECT public: @@ -49,17 +49,17 @@ private slots: void on_edited(); private: - QList tabs; + QList tabs; QString target; QPushButton *apply_button; QPushButton *reset_button; - DetailsDialog(const QString &target_arg); + PropertiesDialog(const QString &target_arg); - DetailsDialog(const DetailsDialog&) = delete; - DetailsDialog& operator=(const DetailsDialog&) = delete; - DetailsDialog(DetailsDialog&&) = delete; - DetailsDialog& operator=(DetailsDialog&&) = delete; + PropertiesDialog(const PropertiesDialog&) = delete; + PropertiesDialog& operator=(const PropertiesDialog&) = delete; + PropertiesDialog(PropertiesDialog&&) = delete; + PropertiesDialog& operator=(PropertiesDialog&&) = delete; }; -#endif /* DETAILS_DIALOG_H */ +#endif /* PROPERTIES_DIALOG_H */ diff --git a/src/admc/tabs/account_tab.h b/src/admc/tabs/account_tab.h index 0cb72402..5dd8ec0b 100644 --- a/src/admc/tabs/account_tab.h +++ b/src/admc/tabs/account_tab.h @@ -20,9 +20,9 @@ #ifndef ACCOUNT_TAB_H #define ACCOUNT_TAB_H -#include "tabs/details_tab.h" +#include "tabs/properties_tab.h" -class AccountTab final : public DetailsTab { +class AccountTab final : public PropertiesTab { Q_OBJECT public: diff --git a/src/admc/tabs/address_tab.h b/src/admc/tabs/address_tab.h index 0791c9f4..7fc85bb1 100644 --- a/src/admc/tabs/address_tab.h +++ b/src/admc/tabs/address_tab.h @@ -20,10 +20,10 @@ #ifndef ADDRESS_TAB_H #define ADDRESS_TAB_H -#include "tabs/details_tab.h" +#include "tabs/properties_tab.h" // Address related attributes -class AddressTab final : public DetailsTab { +class AddressTab final : public PropertiesTab { Q_OBJECT public: diff --git a/src/admc/tabs/attributes_tab.h b/src/admc/tabs/attributes_tab.h index c2f13640..aa27b9fc 100644 --- a/src/admc/tabs/attributes_tab.h +++ b/src/admc/tabs/attributes_tab.h @@ -25,7 +25,7 @@ * viewing/editing if possible via attribute editor dialogs. */ -#include "tabs/details_tab.h" +#include "tabs/properties_tab.h" #include #include @@ -50,7 +50,7 @@ enum AttributeFilter { }; -class AttributesTab final : public DetailsTab { +class AttributesTab final : public PropertiesTab { Q_OBJECT public: diff --git a/src/admc/tabs/general_tab.h b/src/admc/tabs/general_tab.h index 925740c0..9a930701 100644 --- a/src/admc/tabs/general_tab.h +++ b/src/admc/tabs/general_tab.h @@ -20,9 +20,9 @@ #ifndef GENERAL_TAB_H #define GENERAL_TAB_H -#include "tabs/details_tab.h" +#include "tabs/properties_tab.h" -class GeneralTab final : public DetailsTab { +class GeneralTab final : public PropertiesTab { Q_OBJECT public: diff --git a/src/admc/tabs/gpo_links_tab.cpp b/src/admc/tabs/gpo_links_tab.cpp index 5574171c..7563b1c6 100644 --- a/src/admc/tabs/gpo_links_tab.cpp +++ b/src/admc/tabs/gpo_links_tab.cpp @@ -18,7 +18,7 @@ */ #include "tabs/gpo_links_tab.h" -#include "details_dialog.h" +#include "properties_dialog.h" #include "utils.h" #include "ad_interface.h" #include "ad_object.h" @@ -58,7 +58,7 @@ GpoLinksTab::GpoLinksTab() { setLayout(layout); layout->addWidget(view); - DetailsDialog::connect_to_open_by_double_click(view, GpoLinksColumn_DN); + PropertiesDialog::connect_to_open_by_double_click(view, GpoLinksColumn_DN); } void GpoLinksTab::load(const AdObject &policy) { diff --git a/src/admc/tabs/gpo_links_tab.h b/src/admc/tabs/gpo_links_tab.h index 6b4e03ff..945202d7 100644 --- a/src/admc/tabs/gpo_links_tab.h +++ b/src/admc/tabs/gpo_links_tab.h @@ -20,7 +20,7 @@ #ifndef GPO_LINKS_TAB_H #define GPO_LINKS_TAB_H -#include "tabs/details_tab.h" +#include "tabs/properties_tab.h" #include @@ -33,7 +33,7 @@ class QStandardItemModel; * of objects. */ -class GpoLinksTab final : public DetailsTab { +class GpoLinksTab final : public PropertiesTab { Q_OBJECT public: diff --git a/src/admc/tabs/group_policy_tab.cpp b/src/admc/tabs/group_policy_tab.cpp index da382e84..8d0ba623 100644 --- a/src/admc/tabs/group_policy_tab.cpp +++ b/src/admc/tabs/group_policy_tab.cpp @@ -116,14 +116,14 @@ void GroupPolicyTab::load(const AdObject &object) { reload_gplink(); - DetailsTab::load(object); + PropertiesTab::load(object); } void GroupPolicyTab::apply(const QString &target) const { const QString gplink_string = gplink.to_string(); AD()->attribute_replace_string(target, ATTRIBUTE_GPLINK, gplink_string); - DetailsTab::apply(target); + PropertiesTab::apply(target); } void GroupPolicyTab::on_context_menu(const QPoint pos) { diff --git a/src/admc/tabs/group_policy_tab.h b/src/admc/tabs/group_policy_tab.h index a9fd25de..39ef29e7 100644 --- a/src/admc/tabs/group_policy_tab.h +++ b/src/admc/tabs/group_policy_tab.h @@ -20,7 +20,7 @@ #ifndef GROUP_POLICY_TAB_H #define GROUP_POLICY_TAB_H -#include "tabs/details_tab.h" +#include "tabs/properties_tab.h" #include "gplink.h" class QTreeView; @@ -35,7 +35,7 @@ class QPoint; * gpoptions. */ -class GroupPolicyTab final : public DetailsTab { +class GroupPolicyTab final : public PropertiesTab { Q_OBJECT public: diff --git a/src/admc/tabs/membership_tab.cpp b/src/admc/tabs/membership_tab.cpp index 78ee3b99..3f3bf4c8 100644 --- a/src/admc/tabs/membership_tab.cpp +++ b/src/admc/tabs/membership_tab.cpp @@ -19,7 +19,7 @@ */ #include "tabs/membership_tab.h" -#include "details_dialog.h" +#include "properties_dialog.h" #include "ad_interface.h" #include "ad_utils.h" #include "ad_object.h" @@ -80,11 +80,11 @@ MembershipTab::MembershipTab(const MembershipTabType type_arg) { setup_column_toggle_menu(view, model, {MembersColumn_Name, MembersColumn_Parent}); - auto details_button = new QPushButton(tr("Details")); + auto properties_button = new QPushButton(tr("Properties")); auto add_button = new QPushButton(tr("Add")); auto remove_button = new QPushButton(tr("Remove")); auto button_layout = new QHBoxLayout(); - button_layout->addWidget(details_button); + button_layout->addWidget(properties_button); button_layout->addWidget(add_button); button_layout->addWidget(remove_button); @@ -109,7 +109,7 @@ MembershipTab::MembershipTab(const MembershipTabType type_arg) { layout->addLayout(button_layout); enable_widget_on_selection(remove_button, view); - enable_widget_on_selection(details_button, view); + enable_widget_on_selection(properties_button, view); const QItemSelectionModel *selection_model = view->selectionModel(); connect( @@ -124,10 +124,10 @@ MembershipTab::MembershipTab(const MembershipTabType type_arg) { add_button, &QAbstractButton::clicked, this, &MembershipTab::on_add_button); connect( - details_button, &QAbstractButton::clicked, - this, &MembershipTab::on_details_button); + properties_button, &QAbstractButton::clicked, + this, &MembershipTab::on_properties_button); - DetailsDialog::connect_to_open_by_double_click(view, MembersColumn_DN); + PropertiesDialog::connect_to_open_by_double_click(view, MembersColumn_DN); } void MembershipTab::load(const AdObject &object) { @@ -318,11 +318,11 @@ void MembershipTab::on_primary_button() { emit edited(); } -void MembershipTab::on_details_button() { +void MembershipTab::on_properties_button() { const QModelIndex current = view->selectionModel()->currentIndex(); const QString &dn = get_dn_from_index(current, MembersColumn_DN); - DetailsDialog::open_for_target(dn); + PropertiesDialog::open_for_target(dn); } void MembershipTab::enable_primary_button_on_valid_selection() { diff --git a/src/admc/tabs/membership_tab.h b/src/admc/tabs/membership_tab.h index a48eaa63..ce8684b0 100644 --- a/src/admc/tabs/membership_tab.h +++ b/src/admc/tabs/membership_tab.h @@ -20,7 +20,7 @@ #ifndef MEMBERS_TAB_H #define MEMBERS_TAB_H -#include "tabs/details_tab.h" +#include "tabs/properties_tab.h" #include #include @@ -34,7 +34,7 @@ class QPushButton; // 2. groups of user is member of // MembersTab and MemberOfTab implement both of those -class MembershipTab : public DetailsTab { +class MembershipTab : public PropertiesTab { Q_OBJECT public: @@ -45,7 +45,7 @@ private slots: void on_add_button(); void on_remove_button(); void on_primary_button(); - void on_details_button(); + void on_properties_button(); void enable_primary_button_on_valid_selection(); protected: diff --git a/src/admc/tabs/object_tab.h b/src/admc/tabs/object_tab.h index 1fe872e0..4120f4ea 100644 --- a/src/admc/tabs/object_tab.h +++ b/src/admc/tabs/object_tab.h @@ -20,10 +20,10 @@ #ifndef OBJECT_TAB_H #define OBJECT_TAB_H -#include "tabs/details_tab.h" +#include "tabs/properties_tab.h" // Object attributes, same for all types -class ObjectTab final : public DetailsTab { +class ObjectTab final : public PropertiesTab { Q_OBJECT public: diff --git a/src/admc/tabs/organization_tab.cpp b/src/admc/tabs/organization_tab.cpp index 221038f0..09c5b585 100644 --- a/src/admc/tabs/organization_tab.cpp +++ b/src/admc/tabs/organization_tab.cpp @@ -22,7 +22,7 @@ #include "edits/manager_edit.h" #include "ad_utils.h" #include "ad_object.h" -#include "details_dialog.h" +#include "properties_dialog.h" #include "utils.h" #include @@ -63,7 +63,7 @@ OrganizationTab::OrganizationTab() { reports_view->setEditTriggers(QAbstractItemView::NoEditTriggers); reports_view->setAllColumnsShowFocus(true); reports_view->setSortingEnabled(true); - DetailsDialog::connect_to_open_by_double_click(reports_view, ReportsColumn_DN); + PropertiesDialog::connect_to_open_by_double_click(reports_view, ReportsColumn_DN); setup_column_toggle_menu(reports_view, reports_model, {ReportsColumn_Name, ReportsColumn_Folder}); @@ -90,7 +90,7 @@ void OrganizationTab::load(const AdObject &object) { reports_model->appendRow(row); } - DetailsTab::load(object); + PropertiesTab::load(object); } void OrganizationTab::showEvent(QShowEvent *event) { diff --git a/src/admc/tabs/organization_tab.h b/src/admc/tabs/organization_tab.h index d990c9f8..6ebafb46 100644 --- a/src/admc/tabs/organization_tab.h +++ b/src/admc/tabs/organization_tab.h @@ -20,12 +20,12 @@ #ifndef ORGANIZATION_TAB_H #define ORGANIZATION_TAB_H -#include "tabs/details_tab.h" +#include "tabs/properties_tab.h" class QStandardItemModel; class QTreeView; -class OrganizationTab final : public DetailsTab { +class OrganizationTab final : public PropertiesTab { Q_OBJECT public: diff --git a/src/admc/tabs/profile_tab.h b/src/admc/tabs/profile_tab.h index 1798830f..5f22a1b1 100644 --- a/src/admc/tabs/profile_tab.h +++ b/src/admc/tabs/profile_tab.h @@ -20,9 +20,9 @@ #ifndef PROFILE_TAB_H #define PROFILE_TAB_H -#include "tabs/details_tab.h" +#include "tabs/properties_tab.h" -class ProfileTab final : public DetailsTab { +class ProfileTab final : public PropertiesTab { Q_OBJECT public: diff --git a/src/admc/tabs/details_tab.cpp b/src/admc/tabs/properties_tab.cpp similarity index 78% rename from src/admc/tabs/details_tab.cpp rename to src/admc/tabs/properties_tab.cpp index d4951de6..bcb860f1 100644 --- a/src/admc/tabs/details_tab.cpp +++ b/src/admc/tabs/properties_tab.cpp @@ -17,21 +17,21 @@ * along with this program. If not, see . */ -#include "tabs/details_tab.h" +#include "tabs/properties_tab.h" #include "edits/attribute_edit.h" -void DetailsTab::load(const AdObject &object) { +void PropertiesTab::load(const AdObject &object) { edits_load(edits, object); } -bool DetailsTab::verify(const QString &target) const { +bool PropertiesTab::verify(const QString &target) const { return edits_verify(edits, target); } -void DetailsTab::apply(const QString &target) const { +void PropertiesTab::apply(const QString &target) const { edits_apply(edits, target); } -void DetailsTab::on_edit_edited() { +void PropertiesTab::on_edit_edited() { emit edited(); } diff --git a/src/admc/tabs/details_tab.h b/src/admc/tabs/properties_tab.h similarity index 88% rename from src/admc/tabs/details_tab.h rename to src/admc/tabs/properties_tab.h index a1d76827..123bb46e 100644 --- a/src/admc/tabs/details_tab.h +++ b/src/admc/tabs/properties_tab.h @@ -17,15 +17,15 @@ * along with this program. If not, see . */ -#ifndef DETAILS_TAB_H -#define DETAILS_TAB_H +#ifndef PROPERTIES_TAB_H +#define PROPERTIES_TAB_H #include #include #include /** - * Details tabs are used in DetailsDialog. They are usually + * PropertiesTab are used in PropertiesDialog. They are usually * a collection of AttributeEdit's and so mirror their * behavior. All tab f-ns call f-ns of tab's edits but edits * aren't required. If needed, a tab can implement custom @@ -35,7 +35,7 @@ class AttributeEdit; class AdObject; -class DetailsTab : public QWidget { +class PropertiesTab : public QWidget { Q_OBJECT public: @@ -54,4 +54,4 @@ public slots: void on_edit_edited(); }; -#endif /* DETAILS_TAB_H */ +#endif /* PROPERTIES_TAB_H */ diff --git a/src/admc/tabs/telephones_tab.h b/src/admc/tabs/telephones_tab.h index 1bc3d0ff..6e60ca96 100644 --- a/src/admc/tabs/telephones_tab.h +++ b/src/admc/tabs/telephones_tab.h @@ -20,9 +20,9 @@ #ifndef TELEPHONES_TAB_H #define TELEPHONES_TAB_H -#include "tabs/details_tab.h" +#include "tabs/properties_tab.h" -class TelephonesTab final : public DetailsTab { +class TelephonesTab final : public PropertiesTab { Q_OBJECT public: diff --git a/translations/en.ts b/translations/en.ts index 0fc24161..ae1fe1a9 100644 --- a/translations/en.ts +++ b/translations/en.ts @@ -634,79 +634,79 @@ - DetailsDialog + PropertiesDialog - + Details - + "%1" Details - + Object could not be found - + General - + Object - + Attributes - + Account - + Organization - + Telephones - + Profile - + Members - + Member of - + Group policy - + Links to - + Address diff --git a/translations/ru.ts b/translations/ru.ts index ea8d6569..f0501e7e 100644 --- a/translations/ru.ts +++ b/translations/ru.ts @@ -637,79 +637,79 @@ - DetailsDialog + PropertiesDialog - + Details Детали - + "%1" Details "%1" Детали - + Object could not be found Невозможно загрузить объект - + General Общее - + Object Объект - + Attributes Атрибуты - + Account Учётная запись - + Organization Организация - + Telephones Телефоны - + Profile Профиль - + Members Члены - + Member of Группы - + Group policy Групповая политика - + Links to Линки политик - + Address Адрес