Updates for set_type_hint() and the sfdb_ui.
authorTaybin Rutkin <taybin@taybin.com>
Wed, 4 Jan 2006 05:53:51 +0000 (05:53 +0000)
committerTaybin Rutkin <taybin@taybin.com>
Wed, 4 Jan 2006 05:53:51 +0000 (05:53 +0000)
git-svn-id: svn://localhost/trunk/ardour2@239 d708f5d6-7413-0410-9779-e7cbd77b26cf

12 files changed:
gtk2_ardour/about.cc
gtk2_ardour/ardev
gtk2_ardour/ardour-menus.xml
gtk2_ardour/ardour_dialog.cc
gtk2_ardour/ardour_ui2.cc
gtk2_ardour/ardour_ui_dialogs.cc
gtk2_ardour/ardour_ui_ed.cc
gtk2_ardour/editor.cc
gtk2_ardour/option_editor.cc
gtk2_ardour/opts.cc
gtk2_ardour/sfdb_ui.cc
gtk2_ardour/sfdb_ui.h

index 500242ae59c46119925ff0fda6ff17baea893250..9c13f49dc78a34d61f8b18fcde59a210b8475f5a 100644 (file)
@@ -159,6 +159,8 @@ About::About ()
        : paypal_pixmap (paypal_xpm)
 #endif
 {
+       set_type_hint(Gdk::WINDOW_TYPE_HINT_SPLASHSCREEN);
+
        string path;
        string t;
 
index 961c7534fbf3cb10f1c639be073f83e70784c7e1..f1b409182ab27f810a23f180beea306b571204cb 100755 (executable)
@@ -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
index 420fedddd5879646bc97053f2afe0aac4377b0b6..efceee22b2c3c86abbc94d4528ea02f549a946f2 100644 (file)
                <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'/>
index 41d9c60444a0a57280e8f380fb5a298e161cefe6..c5162919d405337eeee1864c2936e0d5cb271913 100644 (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 ()
index 687508654bab3a0accf93f0f7392001e6795bbb0..804027092f962f2a14c71da50ff3d85326472756 100644 (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);
 }
 
index fe34ac523ea4ca2fa1a172bb595d7e9073eba1bf..22fa1d384f2df62dde24482c210a2e67c6aec473 100644 (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 ();
                }
        }
 }
+
index fd9f49a251d12bb1d4e5cfdffd30c96688c7fe47..669eb3a65d2f1f9b2a4272361baebf5f46c393a7 100644 (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));
index 3149e6081effd0d36bc4058394f1f427872978d7..bca1643b406737097c3ed83783cc34cff35d8954 100644 (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
index 58bf35ee59c7a38bebb88b1b0562f91935d28fa1..9126303c52e783dbe8e716bc509c39c4089f0a72 100644 (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);
 
index 48245651e85b2bf555c53ebbd3d3279e7135cb63..481fb0ddbe6198369b16889592a4a5a5bd7d059f 100644 (file)
@@ -100,7 +100,7 @@ GTK_ARDOUR::parse_opts (int argc, char *argv[])
                switch (c) {
                case 0:
                        break;
-
+               
                case 'v':
                        just_version = true;
                        break;
index 25481711d301c5ec3aec0f2890f34620712cf742..2c7003c6f1489377c89fbe135e226fbefca1c5be 100644 (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
index 6be971ca735a21ec0eb246514fe7dbe300b522f7..2c43fb1aa744fb9978cfa2ecb76b25a0faf87835 100644 (file)
 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;