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: bf6cdafbfde9
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: 011d34f1fbd5
Choose a head ref
  • 1 commit
  • 3 files changed
  • 1 contributor

Commits on May 13, 2020

  1. Copy the full SHA
    011d34f View commit details
Showing with 36 additions and 15 deletions.
  1. +25 −9 glscopeclient/WaveformArea.cpp
  2. +8 −4 glscopeclient/WaveformArea.h
  3. +3 −2 glscopeclient/WaveformArea_events.cpp
34 changes: 25 additions & 9 deletions glscopeclient/WaveformArea.cpp
Original file line number Diff line number Diff line change
@@ -340,15 +340,15 @@ void WaveformArea::CreateWidgets()
m_contextMenu.append(*Gtk::manage(new Gtk::SeparatorMenuItem));

//Decode
m_contextMenu.append(m_decodeAnalysisItem);
m_decodeAnalysisItem.set_label("Analysis");
m_decodeAnalysisItem.set_submenu(m_decodeAnalysisMenu);
m_contextMenu.append(m_decodeAlphabeticalItem);
m_decodeAlphabeticalItem.set_label("Alphabetical");
m_decodeAlphabeticalItem.set_submenu(m_decodeAlphabeticalMenu);
m_contextMenu.append(m_decodeBusItem);
m_decodeBusItem.set_label("Buses");
m_decodeBusItem.set_submenu(m_decodeBusMenu);
m_contextMenu.append(m_decodeClockItem);
m_decodeClockItem.set_label("Clocking");
m_decodeClockItem.set_submenu(m_decodeClockMenu);
m_contextMenu.append(m_decodeConversionItem);
m_decodeConversionItem.set_label("Conversion");
m_decodeConversionItem.set_submenu(m_decodeConversionMenu);
m_contextMenu.append(m_decodeMathItem);
m_decodeMathItem.set_label("Math");
m_decodeMathItem.set_submenu(m_decodeMathMenu);
@@ -361,9 +361,15 @@ void WaveformArea::CreateWidgets()
m_contextMenu.append(m_decodeMiscItem);
m_decodeMiscItem.set_label("Misc");
m_decodeMiscItem.set_submenu(m_decodeMiscMenu);
m_contextMenu.append(m_decodeRFItem);
m_decodeRFItem.set_label("RF");
m_decodeRFItem.set_submenu(m_decodeRFMenu);
m_contextMenu.append(m_decodeSerialItem);
m_decodeSerialItem.set_label("Serial");
m_decodeSerialItem.set_submenu(m_decodeSerialMenu);
m_contextMenu.append(m_decodeSignalIntegrityItem);
m_decodeSignalIntegrityItem.set_label("Signal Integrity");
m_decodeSignalIntegrityItem.set_submenu(m_decodeSignalIntegrityMenu);


vector<string> names;
@@ -379,15 +385,19 @@ void WaveformArea::CreateWidgets()
switch(d->GetCategory())
{
case ProtocolDecoder::CAT_ANALYSIS:
m_decodeAnalysisMenu.append(*item);
m_decodeSignalIntegrityMenu.append(*item);
break;

case ProtocolDecoder::CAT_BUS:
m_decodeBusMenu.append(*item);
break;

case ProtocolDecoder::CAT_CLOCK:
m_decodeClockMenu.append(*item);
break;

case ProtocolDecoder::CAT_CONVERSION:
m_decodeConversionMenu.append(*item);
case ProtocolDecoder::CAT_RF:
m_decodeRFMenu.append(*item);
break;

case ProtocolDecoder::CAT_MEASUREMENT:
@@ -412,6 +422,12 @@ void WaveformArea::CreateWidgets()
break;
}
delete d;

//Make a second menu item and put on the alphabetical list
item = Gtk::manage(new Gtk::MenuItem(p, false));
item->signal_activate().connect(
sigc::bind<string>(sigc::mem_fun(*this, &WaveformArea::OnProtocolDecode), p));
m_decodeAlphabeticalMenu.append(*item);
}

//TODO: delete measurements once we get rid of them all
12 changes: 8 additions & 4 deletions glscopeclient/WaveformArea.h
Original file line number Diff line number Diff line change
@@ -194,12 +194,14 @@ class WaveformArea : public Gtk::GLArea
Gtk::MenuItem m_copyNewGroupBelowItem;
Gtk::MenuItem m_copyNewGroupRightItem;
std::set<Gtk::MenuItem*> m_copyExistingGroupItems;
Gtk::MenuItem m_decodeAnalysisItem;
Gtk::Menu m_decodeAnalysisMenu;
Gtk::MenuItem m_decodeAlphabeticalItem;
Gtk::Menu m_decodeAlphabeticalMenu;
Gtk::MenuItem m_decodeBusItem;
Gtk::Menu m_decodeBusMenu;
Gtk::MenuItem m_decodeClockItem;
Gtk::Menu m_decodeClockMenu;
Gtk::MenuItem m_decodeConversionItem;
Gtk::Menu m_decodeConversionMenu;
Gtk::MenuItem m_decodeRFItem;
Gtk::Menu m_decodeRFMenu;
Gtk::MenuItem m_decodeMathItem;
Gtk::Menu m_decodeMathMenu;
Gtk::MenuItem m_decodeMeasurementItem;
@@ -210,6 +212,8 @@ class WaveformArea : public Gtk::GLArea
Gtk::Menu m_decodeMiscMenu;
Gtk::MenuItem m_decodeSerialItem;
Gtk::Menu m_decodeSerialMenu;
Gtk::MenuItem m_decodeSignalIntegrityItem;
Gtk::Menu m_decodeSignalIntegrityMenu;
Gtk::MenuItem m_measureItem;
Gtk::Menu m_measureMenu;
Gtk::MenuItem m_measureVertItem;
5 changes: 3 additions & 2 deletions glscopeclient/WaveformArea_events.cpp
Original file line number Diff line number Diff line change
@@ -771,9 +771,10 @@ void WaveformArea::UpdateContextMenu()

//Gray out decoders that don't make sense for the type of channel we've selected
vector<Gtk::Menu*> childMenus;
childMenus.push_back(&m_decodeAnalysisMenu);
childMenus.push_back(&m_decodeAlphabeticalMenu);
childMenus.push_back(&m_decodeBusMenu);
childMenus.push_back(&m_decodeSignalIntegrityMenu);
childMenus.push_back(&m_decodeClockMenu);
childMenus.push_back(&m_decodeConversionMenu);
childMenus.push_back(&m_decodeMathMenu);
childMenus.push_back(&m_decodeMeasurementMenu);
childMenus.push_back(&m_decodeMemoryMenu);