projects
/
pulseview.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
permit file names not containing dots on import
[pulseview.git]
/
pv
/
toolbars
/
mainbar.cpp
diff --git
a/pv/toolbars/mainbar.cpp
b/pv/toolbars/mainbar.cpp
index e1a666b11ce9ea28c9e83dab427d25d485a10857..114e6fd72cb7c5ac44d71577f7b491b0085800b6 100644
(file)
--- a/
pv/toolbars/mainbar.cpp
+++ b/
pv/toolbars/mainbar.cpp
@@
-114,6
+114,8
@@
MainBar::MainBar(Session &session, QWidget *parent,
{
setObjectName(QString::fromUtf8("MainBar"));
{
setObjectName(QString::fromUtf8("MainBar"));
+ setContextMenuPolicy(Qt::PreventContextMenu);
+
// Actions
action_new_view_->setText(tr("New &View"));
action_new_view_->setIcon(QIcon::fromTheme("window-new",
// Actions
action_new_view_->setText(tr("New &View"));
action_new_view_->setIcon(QIcon::fromTheme("window-new",
@@
-199,8
+201,7
@@
MainBar::MainBar(Session &session, QWidget *parent,
connect(menu_decoders_add_, SIGNAL(decoder_selected(srd_decoder*)),
this, SLOT(add_decoder(srd_decoder*)));
connect(menu_decoders_add_, SIGNAL(decoder_selected(srd_decoder*)),
this, SLOT(add_decoder(srd_decoder*)));
- add_decoder_button_->setIcon(QIcon::fromTheme("add-decoder",
- QIcon(":/icons/add-decoder.svg")));
+ add_decoder_button_->setIcon(QIcon(":/icons/add-decoder.svg"));
add_decoder_button_->setPopupMode(QToolButton::InstantPopup);
add_decoder_button_->setMenu(menu_decoders_add_);
add_decoder_button_->setToolTip(tr("Add low-level, non-stacked protocol decoder"));
add_decoder_button_->setPopupMode(QToolButton::InstantPopup);
add_decoder_button_->setMenu(menu_decoders_add_);
add_decoder_button_->setToolTip(tr("Add low-level, non-stacked protocol decoder"));
@@
-220,8
+221,7
@@
MainBar::MainBar(Session &session, QWidget *parent,
QIcon(":/icons/preferences-system.png")));
channels_button_.setToolTip(tr("Configure Channels"));
QIcon(":/icons/preferences-system.png")));
channels_button_.setToolTip(tr("Configure Channels"));
- channels_button_.setIcon(QIcon::fromTheme("channels",
- QIcon(":/icons/channels.svg")));
+ channels_button_.setIcon(QIcon(":/icons/channels.svg"));
add_toolbar_widgets();
add_toolbar_widgets();
@@
-601,7
+601,7
@@
void MainBar::export_file(shared_ptr<OutputFormat> format, bool selection_only)
if (!trace_view->cursors()->enabled()) {
show_session_error(tr("Missing Cursors"), tr("You need to set the " \
"cursors before you can save the data enclosed by them " \
if (!trace_view->cursors()->enabled()) {
show_session_error(tr("Missing Cursors"), tr("You need to set the " \
"cursors before you can save the data enclosed by them " \
- "to a session file (e.g. using
ALT-V - Show Cursors
)."));
+ "to a session file (e.g. using
the Show Cursors button
)."));
return;
}
return;
}
@@
-626,9
+626,9
@@
void MainBar::export_file(shared_ptr<OutputFormat> format, bool selection_only)
QString::fromStdString(format->description()));
if (exts.empty())
QString::fromStdString(format->description()));
if (exts.empty())
- filter += "(*
.*
)";
+ filter += "(*)";
else
else
- filter += QString("(*.%1);;%2 (*
.*
)").arg(
+ filter += QString("(*.%1);;%2 (*)").arg(
QString::fromStdString(join(exts, ", *.")),
tr("All Files"));
QString::fromStdString(join(exts, ", *.")),
tr("All Files"));
@@
-679,7
+679,7
@@
void MainBar::import_file(shared_ptr<InputFormat> format)
// Show the file dialog
const QString file_name = QFileDialog::getOpenFileName(
this, tr("Import File"), dir, tr(
// Show the file dialog
const QString file_name = QFileDialog::getOpenFileName(
this, tr("Import File"), dir, tr(
- "%1 files (*
.*);;All Files (*.
*)").arg(
+ "%1 files (*
);;All Files (
*)").arg(
QString::fromStdString(format->description())));
if (file_name.isEmpty())
QString::fromStdString(format->description())));
if (file_name.isEmpty())
@@
-757,7
+757,7
@@
void MainBar::on_actionOpen_triggered()
const QString file_name = QFileDialog::getOpenFileName(
this, tr("Open File"), dir, tr(
"Sigrok Sessions (*.sr);;"
const QString file_name = QFileDialog::getOpenFileName(
this, tr("Open File"), dir, tr(
"Sigrok Sessions (*.sr);;"
- "All Files (*
.*
)"));
+ "All Files (*)"));
if (!file_name.isEmpty()) {
session_.load_file(file_name);
if (!file_name.isEmpty()) {
session_.load_file(file_name);