diff options
author | Colin Guthrie <cguthrie@mandriva.org> | 2009-06-17 23:23:04 +0100 |
---|---|---|
committer | Colin Guthrie <cguthrie@mandriva.org> | 2009-06-17 23:23:04 +0100 |
commit | 7b3083df574d15941449ae8532fef472aedc1ae6 (patch) | |
tree | 7d55ff52585102f66520890a3f13c89cf4c105f5 /src/sourceoutputwidget.cc | |
parent | 514a66e0c8570f9706bcfcf93cec124094931b6e (diff) |
Don't use a hyperlink to display the device, just use a regular button.
I'm not super happy with this style but it's probably more reliable
Diffstat (limited to 'src/sourceoutputwidget.cc')
-rw-r--r-- | src/sourceoutputwidget.cc | 20 |
1 files changed, 6 insertions, 14 deletions
diff --git a/src/sourceoutputwidget.cc b/src/sourceoutputwidget.cc index 513c293..89f3bc4 100644 --- a/src/sourceoutputwidget.cc +++ b/src/sourceoutputwidget.cc @@ -61,15 +61,12 @@ SourceOutputWidget::~SourceOutputWidget(void) { void SourceOutputWidget::setSourceIndex(uint32_t idx) { mSourceIndex = idx; - gchar *txt; if (mpMainWindow->sourceWidgets.count(idx)) { SourceWidget *w = mpMainWindow->sourceWidgets[idx]; - txt = g_markup_printf_escaped("<a href=\"\">%s</a>", w->description.c_str()); + deviceButton->set_label(w->description.c_str()); } else - txt = g_markup_printf_escaped("<a href=\"\">%s</a>", _("Unknown input")); - deviceLabel->set_label(txt); - g_free(txt); + deviceButton->set_label(_("Unknown input")); } uint32_t SourceOutputWidget::sourceIndex() { @@ -132,13 +129,8 @@ void SourceOutputWidget::SourceMenuItem::onToggle() { pa_operation_unref(o); } -bool SourceOutputWidget::onDeviceChangePopup(GdkEventButton* event) { - if (GDK_BUTTON_PRESS == event->type && 1 == event->button) { - clearMenu(); - buildMenu(); - menu.popup(event->button, event->time); - return true; - } - - return false; +void SourceOutputWidget::onDeviceChangePopup() { + clearMenu(); + buildMenu(); + menu.popup(1, 0); } |