Scroll streams list to newly added; removed rename sink about dialog
This commit is contained in:
parent
c70cdeed74
commit
3b936a10e6
|
@ -0,0 +1,11 @@
|
|||
# Pavucontrol
|
||||
An audio controller to change volume, recording input, etc.
|
||||
|
||||
### Build
|
||||
git clone the repo and change directory/open terminal at the folder. Then run the following:
|
||||
* meson build
|
||||
* cd build/
|
||||
* ninja
|
||||
|
||||
### Install
|
||||
* After building copy from build/src the newly created 'pavucontrol' binary to /usr/sbin/pavucontrol
|
|
@ -253,14 +253,6 @@ void DeviceWidget::openRenamePopup(const Glib::VariantBase& parameter) {
|
|||
if (updating)
|
||||
return;
|
||||
|
||||
if (!mpMainWindow->canRenameDevices) {
|
||||
auto dialog = Gtk::AlertDialog::create(_("Sorry, but device renaming is not supported."));
|
||||
dialog->set_modal(true);
|
||||
dialog->set_detail(_("You need to load module-device-manager in the PulseAudio server in order to rename devices"));
|
||||
dialog->show(*mpMainWindow);
|
||||
return;
|
||||
}
|
||||
|
||||
Glib::RefPtr<Gtk::Builder> x = Gtk::Builder::create_from_resource("/org/pulseaudio/pavucontrol/ui/renamedialog.ui", "renameDialog");
|
||||
gchar *key = g_markup_printf_escaped("%s:%s", mDeviceType.c_str(), name.c_str());
|
||||
RenameWindow* renameDialog = Gtk::Builder::get_widget_derived<RenameWindow>(x, "renameDialog", description.c_str(), key);
|
||||
|
|
|
@ -80,6 +80,9 @@ MainWindow::MainWindow(BaseObjectType* cobject, const Glib::RefPtr<Gtk::Builder>
|
|||
ca_context_create(&canberraContext);
|
||||
ca_context_set_driver(canberraContext, "pulse");
|
||||
#endif
|
||||
streamsScrolledWindow = x->get_widget<Gtk::ScrolledWindow>("streamsScrolledWindow");
|
||||
vAjustmnt = streamsScrolledWindow->get_vadjustment();
|
||||
|
||||
cardsVBox = x->get_widget<Gtk::Box>("cardsVBox");
|
||||
streamsVBox = x->get_widget<Gtk::Box>("streamsVBox");
|
||||
recsVBox = x->get_widget<Gtk::Box>("recsVBox");
|
||||
|
@ -1266,6 +1269,8 @@ void MainWindow::reallyUpdateDeviceVisibility() {
|
|||
recsVBox->show();
|
||||
cardsVBox->hide();
|
||||
cardsVBox->show();
|
||||
|
||||
vAjustmnt->set_value(vAjustmnt->get_upper() + 500);
|
||||
}
|
||||
|
||||
void MainWindow::removeCard(uint32_t index) {
|
||||
|
|
|
@ -79,6 +79,8 @@ public:
|
|||
|
||||
void setConnectingMessage(const char *string = NULL);
|
||||
|
||||
Gtk::ScrolledWindow *streamsScrolledWindow;
|
||||
Glib::RefPtr<Gtk::Adjustment> vAjustmnt;
|
||||
Gtk::Notebook *notebook;
|
||||
Gtk::Box *streamsVBox, *recsVBox, *sinksVBox, *sourcesVBox, *cardsVBox;
|
||||
Gtk::Label *noStreamsLabel, *noRecsLabel, *noSinksLabel, *noSourcesLabel, *noCardsLabel, *connectingLabel;
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
<object class="GtkBox">
|
||||
<property name="orientation">vertical</property>
|
||||
<child>
|
||||
<object class="GtkScrolledWindow">
|
||||
<object class="GtkScrolledWindow" id="streamsScrolledWindow">
|
||||
<property name="vexpand">1</property>
|
||||
<property name="focusable">1</property>
|
||||
<property name="child">
|
||||
|
|
|
@ -59,17 +59,6 @@ void show_error(Gtk::Widget* widget, const char *txt) {
|
|||
char buf[256];
|
||||
|
||||
snprintf(buf, sizeof(buf), "%s: %s", txt, pa_strerror(pa_context_errno(context)));
|
||||
|
||||
auto dialog = Gtk::AlertDialog::create(buf);
|
||||
dialog->set_modal(true);
|
||||
if (GTK_IS_WINDOW(root->gobj())) {
|
||||
GtkWindow* w = (GtkWindow*) root->gobj();
|
||||
Gtk::Window* window = Glib::wrap(w);
|
||||
window->present();
|
||||
dialog->choose(*window, sigc::ptr_fun(show_error_finish));
|
||||
} else {
|
||||
dialog->choose(sigc::ptr_fun(show_error_finish));
|
||||
}
|
||||
}
|
||||
|
||||
static void dec_outstanding(MainWindow *w) {
|
||||
|
|
Loading…
Reference in New Issue