diff options
-rw-r--r-- | ui/qt/manage_interfaces_dialog.cpp | 11 | ||||
-rw-r--r-- | ui/qt/manage_interfaces_dialog.h | 2 |
2 files changed, 12 insertions, 1 deletions
diff --git a/ui/qt/manage_interfaces_dialog.cpp b/ui/qt/manage_interfaces_dialog.cpp index ef216b1f80..5a3e263b5c 100644 --- a/ui/qt/manage_interfaces_dialog.cpp +++ b/ui/qt/manage_interfaces_dialog.cpp @@ -102,6 +102,7 @@ ManageInterfacesDialog::ManageInterfacesDialog(QWidget *parent) : #ifndef Q_OS_WIN ui->localList->setColumnHidden(col_l_friendly_name_, true); #endif + ui->localList->setEditTriggers(QAbstractItemView::NoEditTriggers); ui->pipeList->setItemDelegateForColumn(col_p_pipe_, &new_pipe_item_delegate_); new_pipe_item_delegate_.setTree(ui->pipeList); @@ -122,6 +123,7 @@ ManageInterfacesDialog::ManageInterfacesDialog(QWidget *parent) : connect(ui->tabWidget, SIGNAL(currentChanged(int)), this, SLOT(updateWidgets())); connect(this, SIGNAL(ifsChanged()), parent, SIGNAL(ifsChanged())); + connect(ui->localList, SIGNAL(itemDoubleClicked(QTreeWidgetItem *, int)), this, SLOT(localListItemDoubleClicked(QTreeWidgetItem *, int))); #ifdef HAVE_PCAP_REMOTE connect(this, SIGNAL(remoteAdded(GList*, remote_options*)), this, SLOT(addRemoteInterfaces(GList*, remote_options*))); @@ -455,7 +457,7 @@ void ManageInterfacesDialog::localAccepted() /* write new description string to preferences */ if (prefs.capture_devices_descr) g_free(prefs.capture_devices_descr); - prefs.capture_devices_descr = qstring_strdup(comment_list.join(","));; + prefs.capture_devices_descr = qstring_strdup(comment_list.join(",")); } } @@ -464,6 +466,13 @@ void ManageInterfacesDialog::on_buttonBox_helpRequested() wsApp->helpTopicAction(HELP_CAPTURE_MANAGE_INTERFACES_DIALOG); } +void ManageInterfacesDialog::localListItemDoubleClicked(QTreeWidgetItem * item, int column) +{ + if (column == col_l_comment_) { + ui->localList->editItem(item, column); + } +} + #ifdef HAVE_PCAP_REMOTE void ManageInterfacesDialog::remoteSelectionChanged(QTreeWidgetItem*, int) { diff --git a/ui/qt/manage_interfaces_dialog.h b/ui/qt/manage_interfaces_dialog.h index 57883dedc8..89ddfcee11 100644 --- a/ui/qt/manage_interfaces_dialog.h +++ b/ui/qt/manage_interfaces_dialog.h @@ -106,6 +106,8 @@ private slots: void on_pipeList_currentItemChanged(QTreeWidgetItem *current, QTreeWidgetItem *previous); void localAccepted(); + void localListItemDoubleClicked(QTreeWidgetItem * item, int column); + #ifdef HAVE_PCAP_REMOTE void on_addRemote_clicked(); void on_delRemote_clicked(); |