Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: ngscopeclient/scopehal-apps
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 2946d60a496d
Choose a base ref
...
head repository: ngscopeclient/scopehal-apps
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: bfec54488d29
Choose a head ref
  • 1 commit
  • 2 files changed
  • 1 contributor

Commits on Oct 12, 2020

  1. Copy the full SHA
    bfec544 View commit details
Showing with 15 additions and 4 deletions.
  1. +12 −3 src/glscopeclient/FilterDialog.cpp
  2. +3 −1 src/glscopeclient/FilterDialog.h
15 changes: 12 additions & 3 deletions src/glscopeclient/FilterDialog.cpp
Original file line number Diff line number Diff line change
@@ -80,14 +80,22 @@ ParameterRowFilename::ParameterRowFilename(Gtk::Dialog* parent, FilterParameter&
: m_parent(parent)
, m_param(param)
{
m_button.set_label("...");
m_button.signal_clicked().connect(sigc::mem_fun(*this, &ParameterRowFilename::OnBrowser));
m_clearButton.set_image_from_icon_name("edit-clear", Gtk::IconSize(16));
m_clearButton.signal_clicked().connect(sigc::mem_fun(*this, &ParameterRowFilename::OnClear));

m_browserButton.set_image_from_icon_name("filefind", Gtk::IconSize(16));
m_browserButton.signal_clicked().connect(sigc::mem_fun(*this, &ParameterRowFilename::OnBrowser));
}

ParameterRowFilename::~ParameterRowFilename()
{
}

void ParameterRowFilename::OnClear()
{
m_entry.set_text("");
}

void ParameterRowFilename::OnBrowser()
{
Gtk::FileChooserDialog dlg(*m_parent, "Open", Gtk::FILE_CHOOSER_ACTION_OPEN);
@@ -302,7 +310,8 @@ ParameterRowBase* FilterDialog::CreateRow(
row->m_label.set_size_request(width, 1);

grid.attach_next_to(row->m_entry, row->m_label, Gtk::POS_RIGHT, 1, 1);
grid.attach_next_to(row->m_button, row->m_entry, Gtk::POS_RIGHT, 1, 1);
grid.attach_next_to(row->m_clearButton, row->m_entry, Gtk::POS_RIGHT, 1, 1);
grid.attach_next_to(row->m_browserButton, row->m_clearButton, Gtk::POS_RIGHT, 1, 1);
last_label = &row->m_label;

row->m_label.set_label(name);
4 changes: 3 additions & 1 deletion src/glscopeclient/FilterDialog.h
Original file line number Diff line number Diff line change
@@ -85,9 +85,11 @@ class ParameterRowFilename : public ParameterRowString
virtual ~ParameterRowFilename();

void OnBrowser();
void OnClear();

Gtk::Dialog* m_parent;
Gtk::Button m_button;
Gtk::Button m_clearButton;
Gtk::Button m_browserButton;
FilterParameter& m_param;
};