Dialogbox checkmarks turn off when dialogs are closed.
git-svn-id: svn://localhost/trunk/ardour2@164 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
9388c84f06
commit
f2c09c7a7a
@ -18,14 +18,14 @@ gtkardour.Append(DOMAIN=domain, MAJOR=1,MINOR=0,MICRO=2)
|
||||
gtkardour.Append(CCFLAGS="-DPACKAGE=\\\"" + domain + "\\\"")
|
||||
gtkardour.Append(CXXFLAGS="-DPACKAGE=\\\"" + domain + "\\\"")
|
||||
gtkardour.Append(CXXFLAGS="-DLIBSIGC_DISABLE_DEPRECATED")
|
||||
gtkardour.Append(CXXFLAGS="-DFLOWCANVAS_AA")
|
||||
#gtkardour.Append(CXXFLAGS="-DFLOWCANVAS_AA")
|
||||
gtkardour.Append(PACKAGE=domain)
|
||||
gtkardour.Append(POTFILE=domain + '.pot')
|
||||
|
||||
gtkardour.Merge ([
|
||||
libraries['ardour'],
|
||||
libraries['gtkmm2ext'],
|
||||
libraries['flowcanvas'],
|
||||
# libraries['flowcanvas'],
|
||||
libraries['midi++2'],
|
||||
libraries['pbd3'],
|
||||
libraries['gtkmm2'],
|
||||
|
@ -202,3 +202,16 @@ ActionManager::set_sensitive (vector<RefPtr<Action> >& actions, bool state)
|
||||
(*i)->set_sensitive (state);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
ActionManager::uncheck_toggleaction (const std::string& actionname)
|
||||
{
|
||||
RefPtr<Action> act = get_action (actionname);
|
||||
if (act) {
|
||||
RefPtr<ToggleAction> tact = RefPtr<ToggleAction>::cast_dynamic(act);
|
||||
tact->set_active (false);
|
||||
} else {
|
||||
error << "Invalid action name: " << actionname << endmsg;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -65,7 +65,8 @@ class ActionManager
|
||||
std::vector<std::string>& paths,
|
||||
std::vector<std::string>& keys,
|
||||
std::vector<Gtk::AccelKey>& bindings);
|
||||
|
||||
|
||||
static void uncheck_toggleaction (const std::string& actionname);
|
||||
};
|
||||
|
||||
#endif /* __ardour_gtk_actions_h__ */
|
||||
|
@ -613,12 +613,6 @@ class ARDOUR_UI : public Gtkmm2ext::UI
|
||||
LocationUI *location_ui;
|
||||
int create_location_ui ();
|
||||
|
||||
void location_ui_hiding ();
|
||||
void big_clock_hiding ();
|
||||
void route_params_hiding ();
|
||||
void connection_editor_hiding ();
|
||||
void option_hiding ();
|
||||
|
||||
/* Various options */
|
||||
|
||||
void toggle_recording_plugins ();
|
||||
|
@ -428,7 +428,7 @@ ARDOUR_UI::setup_clock ()
|
||||
big_clock_window->set_title (_("ardour: clock"));
|
||||
big_clock_window->set_type_hint (Gdk::WINDOW_TYPE_HINT_MENU);
|
||||
big_clock_window->signal_realize().connect (bind (sigc::ptr_fun (set_decoration), big_clock_window, (Gdk::DECOR_BORDER|Gdk::DECOR_RESIZEH)));
|
||||
big_clock_window->signal_unmap().connect (mem_fun(*this, &ARDOUR_UI::big_clock_hiding));
|
||||
big_clock_window->signal_unmap().connect (bind (sigc::ptr_fun(&ActionManager::uncheck_toggleaction), X_("<Actions>/Common/ToggleBigClock")));
|
||||
|
||||
manage_window (*big_clock_window);
|
||||
}
|
||||
|
@ -25,6 +25,7 @@
|
||||
|
||||
#include <ardour/session.h>
|
||||
|
||||
#include "actions.h"
|
||||
#include "ardour_ui.h"
|
||||
#include "connection_editor.h"
|
||||
#include "location_ui.h"
|
||||
@ -33,7 +34,6 @@
|
||||
#include "public_editor.h"
|
||||
#include "route_params_ui.h"
|
||||
#include "sfdb_ui.h"
|
||||
#include "actions.h"
|
||||
|
||||
#include "i18n.h"
|
||||
|
||||
@ -180,13 +180,12 @@ int
|
||||
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;
|
||||
@ -210,20 +209,6 @@ ARDOUR_UI::toggle_connection_editor ()
|
||||
#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 ()
|
||||
{
|
||||
@ -239,7 +224,7 @@ ARDOUR_UI::toggle_options_window ()
|
||||
{
|
||||
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 (ptr_fun(&ActionManager::uncheck_toggleaction), X_("<Actions>/Common/ToggleOptionsWindow")));
|
||||
option_editor->set_session (session);
|
||||
}
|
||||
|
||||
@ -250,13 +235,6 @@ ARDOUR_UI::toggle_options_window ()
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
ARDOUR_UI::option_hiding ()
|
||||
{
|
||||
// GTK2FIX
|
||||
// options_window_check->set_active(false);
|
||||
}
|
||||
|
||||
void
|
||||
ARDOUR_UI::toggle_auto_input ()
|
||||
|
||||
@ -272,8 +250,8 @@ ARDOUR_UI::create_location_ui ()
|
||||
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 (ptr_fun(&ActionManager::uncheck_toggleaction), X_("<Actions>/Common/ToggleLocations")));
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -291,20 +269,13 @@ ARDOUR_UI::toggle_location_window ()
|
||||
}
|
||||
}
|
||||
|
||||
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(ptr_fun(&ActionManager::uncheck_toggleaction), X_("<Actions>/Common/ToggleInspector")));
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
@ -323,30 +294,13 @@ ARDOUR_UI::toggle_route_params_window ()
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
ARDOUR_UI::route_params_hiding ()
|
||||
{
|
||||
// GTK2FIX
|
||||
// route_params_check->set_active (false);
|
||||
}
|
||||
|
||||
void
|
||||
ARDOUR_UI::toggle_sound_file_browser ()
|
||||
{
|
||||
/* This is called from the check menu item. If checked on, open
|
||||
* a new SoundFileBrowser, and connect it's quit method to the
|
||||
* check menu item so if it is toggled off, it exits. If it exits
|
||||
* by itself, set the check menu item to false.
|
||||
* If this is called by checking off, don't do anything, the signals
|
||||
* should handle everything. I expect this idiom to be useful for
|
||||
* other Gtk::Dialog's as well. --Taybin */
|
||||
using namespace Glib;
|
||||
|
||||
//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);
|
||||
//}
|
||||
SoundFileBrowser sfdb(_("Sound File Browser"));
|
||||
sfdb.run();
|
||||
|
||||
ActionManager::uncheck_toggleaction(X_("<Actions>/Common/ToggleSoundFileBrowser"));
|
||||
}
|
||||
|
||||
|
@ -57,10 +57,6 @@ using namespace GTK_ARDOUR;
|
||||
using namespace ARDOUR;
|
||||
using namespace sigc;
|
||||
|
||||
Transmitter error (Transmitter::Error);
|
||||
Transmitter info (Transmitter::Info);
|
||||
Transmitter fatal (Transmitter::Fatal);
|
||||
Transmitter warning (Transmitter::Warning);
|
||||
TextReceiver text_receiver ("ardour");
|
||||
|
||||
extern int curvetest (string);
|
||||
|
@ -30,10 +30,12 @@
|
||||
|
||||
SoundFileBrowser::SoundFileBrowser (std::string title)
|
||||
:
|
||||
Gtk::Dialog(title, false),
|
||||
ArdourDialog(title),
|
||||
chooser(Gtk::FILE_CHOOSER_ACTION_OPEN)
|
||||
{
|
||||
get_vbox()->pack_start(chooser);
|
||||
|
||||
show_all();
|
||||
}
|
||||
|
||||
SoundFileChooser::SoundFileChooser (std::string title)
|
||||
@ -42,6 +44,8 @@ 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)
|
||||
@ -59,6 +63,8 @@ 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
|
||||
|
@ -33,7 +33,9 @@
|
||||
#include <gtkmm/dialog.h>
|
||||
#include <gtkmm/filechooserwidget.h>
|
||||
|
||||
class SoundFileBrowser : public Gtk::Dialog
|
||||
#include "ardour_dialog.h"
|
||||
|
||||
class SoundFileBrowser : public ArdourDialog
|
||||
{
|
||||
public:
|
||||
SoundFileBrowser (std::string title);
|
||||
|
Loading…
Reference in New Issue
Block a user