Make editor route list rec button respect group settings.
[ardour.git] / gtk2_ardour / sfdb_ui.cc
index cc9d09b65408620b4c8ac300e9e9b744be6abc35..41758d493dd8e024d9a6fac160b0d159799ee48d 100644 (file)
@@ -365,7 +365,7 @@ SoundFileBox::stop_audition ()
 }
 
 bool
-SoundFileBox::tags_entry_left (GdkEventFocus *ev)
+SoundFileBox::tags_entry_left (GdkEventFocus *)
 {
        tags_changed ();
        return false;
@@ -566,13 +566,13 @@ SoundFileBrowser::chooser_file_activated ()
 }
 
 void
-SoundFileBrowser::found_list_view_activated (const TreeModel::Path& path, TreeViewColumn* col)
+SoundFileBrowser::found_list_view_activated (const TreeModel::Path&, TreeViewColumn*)
 {
        preview.audition ();
 }
 
 void
-SoundFileBrowser::freesound_list_view_activated (const TreeModel::Path& path, TreeViewColumn* col)
+SoundFileBrowser::freesound_list_view_activated (const TreeModel::Path&, TreeViewColumn*)
 {
        preview.audition ();
 }
@@ -598,7 +598,7 @@ SoundFileBrowser::add_gain_meter ()
 
        boost::shared_ptr<Route> r = session->the_auditioner ();
 
-       gm->set_controls (r, r->shared_peak_meter(), r->gain_control(), r->amp());
+       gm->set_controls (r, r->shared_peak_meter(), r->amp());
 
        meter_packer.set_border_width (12);
        meter_packer.pack_start (*gm, false, true);
@@ -1210,10 +1210,10 @@ SoundFileOmega::SoundFileOmega (Gtk::Window& parent, string title, ARDOUR::Sessi
        options.set_spacing (12);
 
        str.clear ();
-       str.push_back (_("use file timestamp"));
-       str.push_back (_("at edit point"));
-       str.push_back (_("at playhead"));
-       str.push_back (_("at session start"));
+       str.push_back (_("file timestamp"));
+       str.push_back (_("edit point"));
+       str.push_back (_("playhead"));
+       str.push_back (_("session start"));
        set_popdown_strings (where_combo, str);
        where_combo.set_active_text (str.front());
 
@@ -1240,7 +1240,7 @@ SoundFileOmega::SoundFileOmega (Gtk::Window& parent, string title, ARDOUR::Sessi
        action_combo.set_sensitive (false);
 
        l = manage (new Label);
-       l->set_text (_("Insert:"));
+       l->set_text (_("Insert at:"));
 
        hbox = manage (new HBox);
        hbox->set_border_width (12);
@@ -1317,6 +1317,25 @@ SoundFileOmega::SoundFileOmega (Gtk::Window& parent, string title, ARDOUR::Sessi
        disposition_map.insert (pair<ustring,ImportDisposition>(_("all files in one region"), ImportMergeFiles));
 
        chooser.signal_selection_changed().connect (mem_fun (*this, &SoundFileOmega::file_selection_changed));
+
+       /* set size requests for a couple of combos to allow them to display the longest text
+          they will ever be asked to display.  This prevents them being resized when the user
+          selects a file to import, which in turn prevents the size of the dialog from jumping
+          around. */
+
+       vector<string> t;
+       t.push_back (_("one track per file"));
+       t.push_back (_("one track per channel"));
+       t.push_back (_("sequence files"));
+       t.push_back (_("all files in one region"));
+       set_size_request_to_display_given_text (channel_combo, t, COMBO_FUDGE + 10, 15);
+
+       t.clear ();
+       t.push_back (importmode2string (ImportAsTrack));
+       t.push_back (importmode2string (ImportToTrack));
+       t.push_back (importmode2string (ImportAsRegion));
+       t.push_back (importmode2string (ImportAsTapeTrack));
+       set_size_request_to_display_given_text (action_combo, t, COMBO_FUDGE + 10, 15);
 }
 
 void
@@ -1345,11 +1364,11 @@ SoundFileOmega::get_position() const
 {
        ustring str = where_combo.get_active_text();
 
-       if (str == _("use file timestamp")) {
+       if (str == _("file timestamp")) {
                return ImportAtTimestamp;
-       } else if (str == _("at edit point")) {
+       } else if (str == _("edit point")) {
                return ImportAtEditPoint;
-       } else if (str == _("at playhead")) {
+       } else if (str == _("playhead")) {
                return ImportAtPlayhead;
        } else {
                return ImportAtStart;