From 4bd94fa2b86fb8464829c806ae517db113924bd2 Mon Sep 17 00:00:00 2001 From: Colin Guthrie Date: Mon, 16 Mar 2009 23:21:40 +0000 Subject: Wire up all the new UI code. This makes the default button work on sinks/sources, allows the drop down to actually change the sink/source and removes the old menu code. Some names and such are fixed in the glade file too. --- src/minimalstreamwidget.cc | 49 ---------------------------------------------- 1 file changed, 49 deletions(-) (limited to 'src/minimalstreamwidget.cc') diff --git a/src/minimalstreamwidget.cc b/src/minimalstreamwidget.cc index b38bb47..ac665de 100644 --- a/src/minimalstreamwidget.cc +++ b/src/minimalstreamwidget.cc @@ -40,58 +40,9 @@ MinimalStreamWidget::MinimalStreamWidget(BaseObjectType* cobject, const Glib::Re peakProgressBar.set_size_request(-1, 10); channelsVBox->pack_end(peakProgressBar, false, false); - //menu.signal_deactivate().connect(sigc::mem_fun(*this, &MinimalStreamWidget::onMenuDeactivated)); - peakProgressBar.hide(); } -void MinimalStreamWidget::prepareMenu(void) { -} - -void MinimalStreamWidget::onMenuDeactivated(void) { - //streamToggleButton->set_active(false); -} - -void MinimalStreamWidget::popupMenuPosition(int& x, int& y, bool& push_in G_GNUC_UNUSED) { -/* - Gtk::Requisition r; - - streamToggleButton->get_window()->get_origin(x, y); - r = menu.size_request(); - - // Align the right side of the menu with the right side of the togglebutton - x += streamToggleButton->get_allocation().get_x(); - x += streamToggleButton->get_allocation().get_width(); - x -= r.width; - - // Align the top of the menu with the buttom of the togglebutton - y += streamToggleButton->get_allocation().get_y(); - y += streamToggleButton->get_allocation().get_height(); -*/ -} - -void MinimalStreamWidget::onStreamToggleButton(void) { -/* - if (streamToggleButton->get_active()) { - prepareMenu(); - menu.popup(sigc::mem_fun(*this, &MinimalStreamWidget::popupMenuPosition), 0, gtk_get_current_event_time()); - } -*/ -} - -bool MinimalStreamWidget::on_button_press_event (GdkEventButton* event) { - if (Gtk::VBox::on_button_press_event(event)) - return TRUE; - - if (event->type == GDK_BUTTON_PRESS && event->button == 3) { - prepareMenu(); - menu.popup(0, event->time); - return TRUE; - } - - return FALSE; -} - #define DECAY_STEP .04 void MinimalStreamWidget::updatePeak(double v) { -- cgit