#include <ardour/session.h>
+#include "actions.h"
#include "ardour_ui.h"
#include "connection_editor.h"
#include "location_ui.h"
#include "public_editor.h"
#include "route_params_ui.h"
#include "sfdb_ui.h"
-#include "actions.h"
#include "i18n.h"
using namespace ARDOUR;
+using namespace Glib;
using namespace Gtk;
using namespace Gtkmm2ext;
ARDOUR_UI::create_connection_editor ()
{
if (connection_editor == 0) {
- // GTK2FIX
- // connection_editor = new ConnectionEditor ();
- // connection_editor->signal_unmap().connect (mem_fun(*this, &ARDOUR_UI::connection_editor_hiding));
+// connection_editor = new ConnectionEditor ();
+// connection_editor->signal_unmap().connect (sigc::bind (ptr_fun(&ActionManager::uncheck_toggleaction), X_("<Actions>/Common/ToggleConnections")));
}
if (session) {
- // connection_editor->set_session (session);
+// connection_editor->set_session (session);
}
return 0;
#endif
}
-void
-ARDOUR_UI::connection_editor_hiding()
-{
- //GTK2FIX
- // connection_editor_check->set_active(false);
-}
-
-void
-ARDOUR_UI::big_clock_hiding()
-{
- // GTK2FIX
- // big_clock_check->set_active(false);
-}
-
void
ARDOUR_UI::toggle_big_clock_window ()
{
if (big_clock_window->is_visible()) {
big_clock_window->hide ();
} else {
+ big_clock_window->show_all ();
big_clock_window->present ();
}
}
{
if (option_editor == 0) {
option_editor = new OptionEditor (*this, *editor, *mixer);
- option_editor->signal_unmap().connect(mem_fun(*this, &ARDOUR_UI::option_hiding));
+ option_editor->signal_unmap().connect(sigc::bind (sigc::ptr_fun(&ActionManager::uncheck_toggleaction), X_("<Actions>/Common/ToggleOptionsEditor")));
option_editor->set_session (session);
}
}
}
-void
-ARDOUR_UI::option_hiding ()
-{
- // GTK2FIX
- // options_window_check->set_active(false);
-}
-
void
ARDOUR_UI::toggle_auto_input ()
if (location_ui == 0) {
location_ui = new LocationUI ();
location_ui->set_session (session);
- location_ui->signal_unmap().connect (mem_fun(*this, &ARDOUR_UI::location_ui_hiding));
- }
+ location_ui->signal_unmap().connect (sigc::bind (sigc::ptr_fun(&ActionManager::uncheck_toggleaction), X_("<Actions>/Common/ToggleLocations")));
+ }
return 0;
}
}
}
-void
-ARDOUR_UI::location_ui_hiding()
-{
- // GTK2FIX
- // locations_dialog_check->set_active(false);
-}
-
int
ARDOUR_UI::create_route_params ()
{
if (route_params == 0) {
route_params = new RouteParams_UI (*engine);
route_params->set_session (session);
- route_params->signal_unmap().connect (mem_fun(*this, &ARDOUR_UI::route_params_hiding));
+ route_params->signal_unmap().connect (sigc::bind(sigc::ptr_fun(&ActionManager::uncheck_toggleaction), X_("<Actions>/Common/ToggleInspector")));
}
return 0;
}
route_params->present ();
}
}
-
-void
-ARDOUR_UI::route_params_hiding ()
+
+int
+ARDOUR_UI::create_sound_file_browser ()
{
- // GTK2FIX
- // route_params_check->set_active (false);
+ if (sfdb == 0) {
+ sfdb = new SoundFileBrowser (_("Sound File Browser"));
+ sfdb->set_session (session);
+ sfdb->signal_unmap().connect (sigc::bind(sigc::ptr_fun(&ActionManager::uncheck_toggleaction), X_("<Actions>/Common/ToggleSoundFileBrowser")));
+ }
+ return 0;
}
-
+
void
ARDOUR_UI::toggle_sound_file_browser ()
{
- // GTK2FIX
- // if (sfdb_check->get_active()) {
- // SoundFileBrowser sfdb(_("Sound File Browser"));
-
- // sfdb_check->signal_toggled().connect (bind (mem_fun (sfdb, &Gtk::Dialog::response), Gtk::RESPONSE_CANCEL));
- // sfdb.run();
- // sfdb_check->set_active(false);
- // }
-}
+ if (create_sound_file_browser()) {
+ return;
+ }
+ RefPtr<Action> act = ActionManager::ui_manager->get_action (X_("<Actions>/Common/ToggleSoundFileBrowser"));
+ if (act) {
+ RefPtr<ToggleAction> tact = RefPtr<ToggleAction>::cast_dynamic(act);
+
+ if (tact->get_active()) {
+ sfdb->present();
+ } else {
+ sfdb->hide ();
+ }
+ }
+}