Updates for set_type_hint() and the sfdb_ui.

git-svn-id: svn://localhost/trunk/ardour2@239 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
Taybin Rutkin
2006-01-04 05:53:51 +00:00
parent 422f290094
commit fd20404daa
12 changed files with 42 additions and 23 deletions

View File

@@ -159,6 +159,8 @@ About::About ()
: paypal_pixmap (paypal_xpm)
#endif
{
set_type_hint(Gdk::WINDOW_TYPE_HINT_SPLASHSCREEN);
string path;
string t;

View File

@@ -5,7 +5,7 @@ export ARDOUR_GLADE_PATH=./glade
if [ -x ./ardour.bin ] ; then
# scons executable
export LD_LIBRARY_PATH=../libs/ardour
exec ./ardour.bin --novst $*
exec ./ardour.bin --novst --display=localhost:0.0 $*
else
# autofoo/make executable
export LD_LIBRARY_PATH=../libs/ardour

View File

@@ -122,10 +122,12 @@
<menuitem action='GotoEditor'/>
<menuitem action='GotoMixer'/>
<menuitem action='ToggleOptionsEditor'/>
<menuitem action='ToggleAudioLibrary'/>
<menuitem action='ToggleSoundFileBrowser'/>
<menuitem action='ToggleConnections'/>
<menuitem action='ToggleLocations'/>
<menuitem action='ToggleBigClock'/>
<separator/>
<menuitem action='About'/>
</menu>
<menu name='Options' action='Options'>
<menuitem action='SendMTC'/>

View File

@@ -30,6 +30,8 @@ ArdourDialog::ArdourDialog (string title, bool modal, bool use_seperator)
: Dialog (title, modal, use_seperator)
{
session = 0;
set_type_hint(Gdk::WINDOW_TYPE_HINT_DIALOG);
}
ArdourDialog::~ArdourDialog ()

View File

@@ -533,7 +533,7 @@ ARDOUR_UI::manage_window (Window& win)
void
ARDOUR_UI::detach_tearoff (Box* b, Widget* w)
{
editor->ensure_float (transport_tearoff->tearoff_window());
// editor->ensure_float (transport_tearoff->tearoff_window());
b->remove (*w);
}

View File

@@ -76,6 +76,9 @@ ARDOUR_UI::connect_to_session (Session *s)
option_editor->set_session (s);
}
if (sfdb) {
sfdb->set_session (s);
}
Blink.connect (mem_fun(*this, &ARDOUR_UI::transport_rec_enable_blink));
Blink.connect (mem_fun(*this, &ARDOUR_UI::solo_blink));
@@ -348,9 +351,11 @@ ARDOUR_UI::toggle_sound_file_browser ()
RefPtr<ToggleAction> tact = RefPtr<ToggleAction>::cast_dynamic(act);
if (tact->get_active()) {
sfdb->show_all();
sfdb->present();
} else {
sfdb->hide ();
}
}
}

View File

@@ -165,7 +165,6 @@ ARDOUR_UI::install_actions ()
ActionManager::register_action (common_actions, X_("GotoMixer"), _("Mixer"), mem_fun(*this, &ARDOUR_UI::goto_mixer_window));
ActionManager::register_toggle_action (common_actions, X_("ToggleSoundFileBrowser"), _("Sound File Browser"), mem_fun(*this, &ARDOUR_UI::toggle_sound_file_browser));
ActionManager::register_toggle_action (common_actions, X_("ToggleOptionsEditor"), _("Options Editor"), mem_fun(*this, &ARDOUR_UI::toggle_options_window));
ActionManager::register_toggle_action (common_actions, X_("ToggleAudioLibrary"), _("Audio Library"), mem_fun(*this, &ARDOUR_UI::toggle_sound_file_browser));
act = ActionManager::register_toggle_action (common_actions, X_("ToggleInspector"), _("Track/Bus Inspector"), mem_fun(*this, &ARDOUR_UI::toggle_route_params_window));
ActionManager::session_sensitive_actions.push_back (act);
act = ActionManager::register_toggle_action (common_actions, X_("ToggleConnections"), _("Connections"), mem_fun(*this, &ARDOUR_UI::toggle_connection_editor));

View File

@@ -3677,8 +3677,6 @@ Editor::detach_tearoff (Gtk::Box* b, Gtk::Window* w)
mouse_mode_tearoff->torn_off()) {
top_hbox.remove (toolbar_frame);
}
ensure_float (*w);
}
void

View File

@@ -408,7 +408,7 @@ OptionEditor::setup_path_options()
{
Gtk::Label* label;
path_table.set_homogeneous (true);
path_table.set_homogeneous (false);
path_table.set_border_width (12);
path_table.set_row_spacings (5);
@@ -432,6 +432,7 @@ OptionEditor::setup_path_options()
path_table.attach(sfdb_path_view, 1, 3, 2, 3, Gtk::FILL|Gtk::EXPAND, FILL);
sfdb_path_view.append_column(_("Paths"), sfdb_path_columns.paths);
sfdb_path_view.set_size_request(-1, 100);
vector<string> nfstrings = internationalize (native_format_strings);

View File

@@ -100,7 +100,7 @@ GTK_ARDOUR::parse_opts (int argc, char *argv[])
switch (c) {
case 0:
break;
case 'v':
just_version = true;
break;

View File

@@ -31,8 +31,9 @@
std::string length2string (const int32_t frames, const int32_t sample_rate);
SoundFileBox::SoundFileBox (ARDOUR::Session* session)
SoundFileBox::SoundFileBox ()
:
_session(0),
current_pid(0),
fields(Gtk::ListStore::create(label_columns)),
main_box (false, 3),
@@ -80,12 +81,6 @@ SoundFileBox::SoundFileBox (ARDOUR::Session* session)
play_btn.signal_clicked().connect (mem_fun (*this, &SoundFileBox::play_btn_clicked));
stop_btn.signal_clicked().connect (mem_fun (*this, &SoundFileBox::stop_btn_clicked));
if (!session) {
play_btn.set_sensitive(false);
} else {
session->AuditionActive.connect(mem_fun (*this, &SoundFileBox::audition_status_changed));
}
add_field_btn.signal_clicked().connect
(mem_fun (*this, &SoundFileBox::add_field_clicked));
remove_field_btn.signal_clicked().connect
@@ -98,6 +93,18 @@ SoundFileBox::SoundFileBox (ARDOUR::Session* session)
stop_btn.hide();
}
void
SoundFileBox::set_session(ARDOUR::Session* s)
{
_session = s;
if (!_session) {
play_btn.set_sensitive(false);
} else {
_session->AuditionActive.connect(mem_fun (*this, &SoundFileBox::audition_status_changed));
}
}
int
SoundFileBox::setup_labels (string filename)
{
@@ -177,15 +184,18 @@ SoundFileBox::update (std::string filename)
SoundFileBrowser::SoundFileBrowser (std::string title)
:
ArdourDialog(title),
chooser(Gtk::FILE_CHOOSER_ACTION_OPEN),
preview(session)
chooser(Gtk::FILE_CHOOSER_ACTION_OPEN)
{
get_vbox()->pack_start(chooser);
chooser.set_preview_widget(preview);
chooser.signal_update_preview().connect(mem_fun(*this, &SoundFileBrowser::update_preview));
}
show_all();
void
SoundFileBrowser::set_session (ARDOUR::Session* s)
{
preview.set_session(s);
}
void
@@ -200,8 +210,6 @@ SoundFileChooser::SoundFileChooser (std::string title)
{
add_button (Gtk::Stock::OPEN, Gtk::RESPONSE_OK);
add_button (Gtk::Stock::CANCEL, Gtk::RESPONSE_CANCEL);
show_all();
}
SoundFileOmega::SoundFileOmega (std::string title)
@@ -219,8 +227,6 @@ SoundFileOmega::SoundFileOmega (std::string title)
embed_btn.signal_clicked().connect (mem_fun (*this, &SoundFileOmega::embed_clicked));
import_btn.signal_clicked().connect (mem_fun (*this, &SoundFileOmega::import_clicked));
show_all();
}
void

View File

@@ -47,12 +47,15 @@
class SoundFileBox : public Gtk::VBox
{
public:
SoundFileBox (ARDOUR::Session* session);
SoundFileBox ();
virtual ~SoundFileBox () {};
bool update (std::string filename);
void set_session (ARDOUR::Session* s);
protected:
ARDOUR::Session* _session;
struct LabelModelColumns : public Gtk::TreeModel::ColumnRecord
{
public:
@@ -111,6 +114,7 @@ class SoundFileBrowser : public ArdourDialog
SoundFileBrowser (std::string title);
virtual ~SoundFileBrowser () {};
virtual void set_session (ARDOUR::Session*);
protected:
Gtk::FileChooserWidget chooser;
SoundFileBox preview;