Apply tinram's patch from mantis 2758.
git-svn-id: svn://localhost/ardour2/branches/3.0@5296 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
26328c9ef1
commit
48fc492253
@ -1,15 +1,37 @@
|
|||||||
|
/*
|
||||||
|
Copyright (C) 2009 Paul Davis
|
||||||
|
|
||||||
|
This program is free software; you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation; either version 2 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program; if not, write to the Free Software
|
||||||
|
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||||
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <gtkmm/table.h>
|
||||||
#include <gtkmm/stock.h>
|
#include <gtkmm/stock.h>
|
||||||
|
#include <gtkmm2ext/window_title.h>
|
||||||
#include "ardour/route_group.h"
|
#include "ardour/route_group.h"
|
||||||
#include "route_group_dialog.h"
|
#include "route_group_dialog.h"
|
||||||
#include "i18n.h"
|
#include "i18n.h"
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
|
||||||
using namespace Gtk;
|
using namespace Gtk;
|
||||||
|
using namespace Gtkmm2ext;
|
||||||
using namespace ARDOUR;
|
using namespace ARDOUR;
|
||||||
using namespace std;
|
using namespace std;
|
||||||
|
|
||||||
RouteGroupDialog::RouteGroupDialog (RouteGroup* g, StockID const & s)
|
RouteGroupDialog::RouteGroupDialog (RouteGroup* g, StockID const & s)
|
||||||
: Dialog (_("Route group")),
|
: ArdourDialog (_("route group dialog")),
|
||||||
_group (g),
|
_group (g),
|
||||||
_active (_("Active")),
|
_active (_("Active")),
|
||||||
_gain (_("Gain")),
|
_gain (_("Gain")),
|
||||||
@ -20,6 +42,40 @@ RouteGroupDialog::RouteGroupDialog (RouteGroup* g, StockID const & s)
|
|||||||
_select (_("Selection")),
|
_select (_("Selection")),
|
||||||
_edit (_("Editing"))
|
_edit (_("Editing"))
|
||||||
{
|
{
|
||||||
|
set_modal (true);
|
||||||
|
set_skip_taskbar_hint (true);
|
||||||
|
set_resizable (false);
|
||||||
|
set_position (Gtk::WIN_POS_MOUSE);
|
||||||
|
set_name (N_("RouteGroupDialog"));
|
||||||
|
|
||||||
|
WindowTitle title (Glib::get_application_name());
|
||||||
|
title += _("Route group");
|
||||||
|
set_title(title.get_string());
|
||||||
|
|
||||||
|
VBox* vbox = manage (new VBox);
|
||||||
|
Gtk::Label* l;
|
||||||
|
|
||||||
|
get_vbox()->set_spacing (4);
|
||||||
|
|
||||||
|
vbox->set_spacing (18);
|
||||||
|
vbox->set_border_width (5);
|
||||||
|
|
||||||
|
HBox* hbox = manage (new HBox);
|
||||||
|
hbox->set_spacing (6);
|
||||||
|
l = manage (new Label (_("Name:"), Gtk::ALIGN_LEFT, Gtk::ALIGN_CENTER, false ));
|
||||||
|
|
||||||
|
hbox->pack_start (*l, false, true);
|
||||||
|
hbox->pack_start (_name, true, true);
|
||||||
|
|
||||||
|
vbox->pack_start (*hbox, false, true);
|
||||||
|
|
||||||
|
VBox* options_box = manage (new VBox);
|
||||||
|
options_box->set_spacing (6);
|
||||||
|
|
||||||
|
l = manage (new Label (_("<b>Sharing</b>"), Gtk::ALIGN_LEFT, Gtk::ALIGN_CENTER, false ));
|
||||||
|
l->set_use_markup ();
|
||||||
|
options_box->pack_start (*l, false, true);
|
||||||
|
|
||||||
_name.set_text (_group->name ());
|
_name.set_text (_group->name ());
|
||||||
_active.set_active (_group->is_active ());
|
_active.set_active (_group->is_active ());
|
||||||
|
|
||||||
@ -30,31 +86,41 @@ RouteGroupDialog::RouteGroupDialog (RouteGroup* g, StockID const & s)
|
|||||||
_rec_enable.set_active (_group->property (RouteGroup::RecEnable));
|
_rec_enable.set_active (_group->property (RouteGroup::RecEnable));
|
||||||
_select.set_active (_group->property (RouteGroup::Select));
|
_select.set_active (_group->property (RouteGroup::Select));
|
||||||
_edit.set_active (_group->property (RouteGroup::Edit));
|
_edit.set_active (_group->property (RouteGroup::Edit));
|
||||||
|
|
||||||
|
gain_toggled ();
|
||||||
|
|
||||||
HBox* h = manage (new HBox);
|
Table* table = manage (new Table (8, 3, false));
|
||||||
h->pack_start (*manage (new Label (_("Name:"))));
|
table->set_row_spacings (6);
|
||||||
h->pack_start (_name);
|
|
||||||
|
|
||||||
get_vbox()->pack_start (*h);
|
l = manage (new Label ("", Gtk::ALIGN_LEFT, Gtk::ALIGN_CENTER, false));
|
||||||
get_vbox()->pack_start (_active);
|
l->set_padding (8, 0);
|
||||||
|
table->attach (*l, 0, 1, 0, 8, Gtk::FILL, Gtk::FILL, 0, 0);
|
||||||
|
|
||||||
h = manage (new HBox);
|
table->attach (_active, 1, 3, 0, 1, Gtk::FILL, Gtk::FILL, 0, 0);
|
||||||
h->pack_start (_gain);
|
table->attach (_gain, 1, 3, 1, 2, Gtk::FILL, Gtk::FILL, 0, 0);
|
||||||
h->pack_start (_relative, PACK_EXPAND_PADDING);
|
|
||||||
get_vbox()->pack_start (*h);
|
|
||||||
|
|
||||||
get_vbox()->pack_start (_mute);
|
l = manage (new Label ("", Gtk::ALIGN_LEFT, Gtk::ALIGN_CENTER, false));
|
||||||
get_vbox()->pack_start (_solo);
|
l->set_padding (0, 0);
|
||||||
get_vbox()->pack_start (_rec_enable);
|
table->attach (*l, 1, 2, 2, 3, Gtk::FILL, Gtk::FILL, 0, 0);
|
||||||
get_vbox()->pack_start (_select);
|
table->attach (_relative, 2, 3, 2, 3, Gtk::FILL, Gtk::FILL, 0, 0);
|
||||||
get_vbox()->pack_start (_edit);
|
|
||||||
|
|
||||||
get_vbox()->set_border_width (8);
|
table->attach (_mute, 1, 3, 3, 4, Gtk::FILL, Gtk::FILL, 0, 0);
|
||||||
|
table->attach (_solo, 1, 3, 4, 5, Gtk::FILL, Gtk::FILL, 0, 0);
|
||||||
|
table->attach (_rec_enable, 1, 3, 5, 6, Gtk::FILL, Gtk::FILL, 0, 0);
|
||||||
|
table->attach (_select, 1, 3, 6, 7, Gtk::FILL, Gtk::FILL, 0, 0);
|
||||||
|
table->attach (_edit, 1, 3, 7, 8, Gtk::FILL, Gtk::FILL, 0, 0);
|
||||||
|
|
||||||
|
options_box->pack_start (*table, false, true);
|
||||||
|
vbox->pack_start (*options_box, false, true);
|
||||||
|
|
||||||
|
get_vbox()->pack_start (*vbox, false, false);
|
||||||
|
|
||||||
|
_gain.signal_toggled().connect(mem_fun (*this, &RouteGroupDialog::gain_toggled));
|
||||||
|
|
||||||
add_button (Stock::CANCEL, RESPONSE_CANCEL);
|
add_button (Stock::CANCEL, RESPONSE_CANCEL);
|
||||||
add_button (s, RESPONSE_OK);
|
add_button (s, RESPONSE_OK);
|
||||||
|
|
||||||
show_all ();
|
show_all_children ();
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
@ -76,3 +142,10 @@ RouteGroupDialog::do_run ()
|
|||||||
|
|
||||||
return r;
|
return r;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
RouteGroupDialog::gain_toggled ()
|
||||||
|
{
|
||||||
|
_relative.set_sensitive (_gain.get_active ());
|
||||||
|
}
|
||||||
|
|
||||||
|
@ -1,3 +1,22 @@
|
|||||||
|
/*
|
||||||
|
Copyright (C) 2009 Paul Davis
|
||||||
|
|
||||||
|
This program is free software; you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation; either version 2 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program; if not, write to the Free Software
|
||||||
|
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||||
|
|
||||||
|
*/
|
||||||
|
|
||||||
#ifndef __gtk_ardour_route_group_dialog_h__
|
#ifndef __gtk_ardour_route_group_dialog_h__
|
||||||
#define __gtk_ardour_route_group_dialog_h__
|
#define __gtk_ardour_route_group_dialog_h__
|
||||||
|
|
||||||
@ -5,7 +24,9 @@
|
|||||||
#include <gtkmm/entry.h>
|
#include <gtkmm/entry.h>
|
||||||
#include <gtkmm/checkbutton.h>
|
#include <gtkmm/checkbutton.h>
|
||||||
|
|
||||||
class RouteGroupDialog : public Gtk::Dialog
|
#include "ardour_dialog.h"
|
||||||
|
|
||||||
|
class RouteGroupDialog : public ArdourDialog
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
RouteGroupDialog (ARDOUR::RouteGroup *, Gtk::StockID const &);
|
RouteGroupDialog (ARDOUR::RouteGroup *, Gtk::StockID const &);
|
||||||
@ -14,6 +35,7 @@ public:
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
ARDOUR::RouteGroup* _group;
|
ARDOUR::RouteGroup* _group;
|
||||||
|
|
||||||
Gtk::Entry _name;
|
Gtk::Entry _name;
|
||||||
Gtk::CheckButton _active;
|
Gtk::CheckButton _active;
|
||||||
Gtk::CheckButton _gain;
|
Gtk::CheckButton _gain;
|
||||||
@ -23,6 +45,8 @@ private:
|
|||||||
Gtk::CheckButton _rec_enable;
|
Gtk::CheckButton _rec_enable;
|
||||||
Gtk::CheckButton _select;
|
Gtk::CheckButton _select;
|
||||||
Gtk::CheckButton _edit;
|
Gtk::CheckButton _edit;
|
||||||
|
|
||||||
|
void gain_toggled ();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user