From c69ef10067cbdde5fc87ff676097aa4ffe406f2c Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Sun, 18 Mar 2007 16:45:43 +0000 Subject: fix rect redraw problem(s); make zoom range rect visible again at the right time; apply tim's window title patch git-svn-id: svn://localhost/ardour2/trunk@1617 d708f5d6-7413-0410-9779-e7cbd77b26cf --- gtk2_ardour/ardour_ui.cc | 3 ++- gtk2_ardour/ardour_ui_ed.cc | 8 ++++++- gtk2_ardour/audio_region_editor.cc | 9 +++++--- gtk2_ardour/canvas-simplerect.c | 12 +++++----- gtk2_ardour/editor.cc | 28 +++++++++++++---------- gtk2_ardour/editor_audio_import.cc | 8 +++++-- gtk2_ardour/editor_markers.cc | 15 ++++++++---- gtk2_ardour/editor_mixer.cc | 9 +++++++- gtk2_ardour/editor_ops.cc | 13 ++++++++--- gtk2_ardour/editor_timefx.cc | 8 ++++++- gtk2_ardour/export_dialog.cc | 8 ++++++- gtk2_ardour/location_ui.cc | 8 +++++-- gtk2_ardour/mixer_ui.cc | 21 +++++++++++++---- gtk2_ardour/new_session_dialog.cc | 12 ++++++++-- gtk2_ardour/option_editor.cc | 8 +++++-- gtk2_ardour/playlist_selector.cc | 14 ++++++++---- gtk2_ardour/redirect_box.cc | 25 ++++++++++++++------ gtk2_ardour/route_params_ui.cc | 47 +++++++++++++++++++++++--------------- 18 files changed, 178 insertions(+), 78 deletions(-) (limited to 'gtk2_ardour') diff --git a/gtk2_ardour/ardour_ui.cc b/gtk2_ardour/ardour_ui.cc index 46dbe649c7..7e24cb4cc4 100644 --- a/gtk2_ardour/ardour_ui.cc +++ b/gtk2_ardour/ardour_ui.cc @@ -44,6 +44,7 @@ #include #include #include +#include #include #include @@ -93,7 +94,7 @@ sigc::signal ARDOUR_UI::Clock; ARDOUR_UI::ARDOUR_UI (int *argcp, char **argvp[], string rcfile) - : Gtkmm2ext::UI ("ardour", argcp, argvp, rcfile), + : Gtkmm2ext::UI (X_("Ardour"), argcp, argvp, rcfile), primary_clock (X_("primary"), false, X_("TransportClockDisplay"), true, false, true), secondary_clock (X_("secondary"), false, X_("SecondaryClockDisplay"), true, false, true), diff --git a/gtk2_ardour/ardour_ui_ed.cc b/gtk2_ardour/ardour_ui_ed.cc index 211cdcb4ee..8e1ec8a560 100644 --- a/gtk2_ardour/ardour_ui_ed.cc +++ b/gtk2_ardour/ardour_ui_ed.cc @@ -25,7 +25,10 @@ #include +#include + #include +#include #include "ardour_ui.h" #include "public_editor.h" @@ -714,7 +717,10 @@ ARDOUR_UI::setup_clock () big_clock_window->set_border_width (0); big_clock_window->add (big_clock); - big_clock_window->set_title (_("ardour: clock")); + + WindowTitle title(Glib::get_application_name()); + title += _("Clock"); + big_clock_window->set_title (title.get_string()); 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 (bind (sigc::ptr_fun(&ActionManager::uncheck_toggleaction), X_("/Common/ToggleBigClock"))); diff --git a/gtk2_ardour/audio_region_editor.cc b/gtk2_ardour/audio_region_editor.cc index 4f1d0852bd..ff84a44488 100644 --- a/gtk2_ardour/audio_region_editor.cc +++ b/gtk2_ardour/audio_region_editor.cc @@ -24,6 +24,7 @@ #include #include #include +#include #include #include "audio_region_editor.h" @@ -38,6 +39,7 @@ using namespace ARDOUR; using namespace PBD; using namespace sigc; using namespace std; +using namespace Gtkmm2ext; AudioRegionEditor::AudioRegionEditor (Session& s, boost::shared_ptr r, AudioRegionView& rv) : RegionEditor (s), @@ -118,9 +120,10 @@ AudioRegionEditor::AudioRegionEditor (Session& s, boost::shared_ptr signal_delete_event().connect (bind (sigc::ptr_fun (just_hide_it), static_cast (this))); - string title = _("ardour: region "); - title += _region->name(); - set_title (title); + WindowTitle title(string_compose (_("Region %1"), _region->name())); + title += Glib::get_application_name(); + + set_title (title.get_string()); show_all(); diff --git a/gtk2_ardour/canvas-simplerect.c b/gtk2_ardour/canvas-simplerect.c index 54339b9e3a..e7a7488061 100644 --- a/gtk2_ardour/canvas-simplerect.c +++ b/gtk2_ardour/canvas-simplerect.c @@ -299,7 +299,7 @@ gnome_canvas_simplerect_reset_bounds (GnomeCanvasItem *item) double start_y = MIN (item->y2, old_y2); double end_y = MAX (item->y2, old_y2); - gnome_canvas_request_redraw (item->canvas, item->x1, start_y - 0.5, item->x2 + 0.5, end_y + 0.5); + gnome_canvas_request_redraw (item->canvas, item->x1, start_y - 0.5, item->x2, end_y + 1.5); return; } else if (item->y2 == old_y2) { @@ -309,7 +309,7 @@ gnome_canvas_simplerect_reset_bounds (GnomeCanvasItem *item) double start_y = MIN (item->y1, old_y1); double end_y = MAX (item->y1, old_y1); - gnome_canvas_request_redraw (item->canvas, item->x1, start_y - 0.5, item->x2 + 0.5, end_y + 0.5); + gnome_canvas_request_redraw (item->canvas, item->x1, start_y - 0.5, item->x2, end_y + 1.5); return; } @@ -324,7 +324,7 @@ gnome_canvas_simplerect_reset_bounds (GnomeCanvasItem *item) double start_x = MIN (item->x2, old_x2); double end_x = MAX (item->x2, old_x2); - gnome_canvas_request_redraw (item->canvas, start_x - 0.5, item->y1, end_x + 0.5, item->y2 + 0.5); + gnome_canvas_request_redraw (item->canvas, start_x - 0.5, item->y1, end_x + 1.5, item->y2); return; } else if (item->x2 == old_x2) { @@ -334,7 +334,7 @@ gnome_canvas_simplerect_reset_bounds (GnomeCanvasItem *item) double start_x = MIN (item->x1, old_x1); double end_x = MAX (item->x1, old_x1); - gnome_canvas_request_redraw (item->canvas, start_x - 0.5, item->y1, end_x + 0.5, item->y2 + 0.5); + gnome_canvas_request_redraw (item->canvas, start_x - 0.5, item->y1, end_x + 1.5, item->y2 + 0.5); return; } @@ -352,8 +352,8 @@ gnome_canvas_simplerect_reset_bounds (GnomeCanvasItem *item) art_drect_union (&unionrect, &old, &new); gnome_canvas_request_redraw (item->canvas, - unionrect.x0, - unionrect.y0, + unionrect.x0 - 0.5, + unionrect.y0 - 0.5, unionrect.x1 + 0.5, unionrect.y1 + 0.5); } diff --git a/gtk2_ardour/editor.cc b/gtk2_ardour/editor.cc index db0bf41ee6..b1e1873e94 100644 --- a/gtk2_ardour/editor.cc +++ b/gtk2_ardour/editor.cc @@ -30,6 +30,7 @@ #include #include +#include #include #include #include @@ -38,6 +39,7 @@ #include #include #include +#include #include #include @@ -708,7 +710,10 @@ Editor::Editor () set_icon_list (window_icons); set_default_icon_list (window_icons); } - set_title (_("ardour: editor")); + + WindowTitle title(Glib::get_application_name()); + title += _("Editor"); + set_title (title.get_string()); set_wmclass (X_("ardour_editor"), "Ardour"); add (vpacker); @@ -1006,24 +1011,21 @@ Editor::update_title () if (session) { bool dirty = session->dirty(); - string wintitle = _("ardour: editor: "); - - if (dirty) { - wintitle += '['; - } - - wintitle += session->name(); + string session_name; if (session->snap_name() != session->name()) { - wintitle += ':'; - wintitle += session->snap_name(); + session_name = session->snap_name(); + } else { + session_name = session->name(); } if (dirty) { - wintitle += ']'; + session_name = "*" + session_name; } - set_title (wintitle); + WindowTitle title(session_name); + title += Glib::get_application_name(); + set_title (title.get_string()); } } @@ -2716,6 +2718,8 @@ Editor::map_transport_state () if (session->transport_stopped()) { have_pending_keyboard_selection = false; } + + update_loop_range_view (true); } /* UNDO/REDO */ diff --git a/gtk2_ardour/editor_audio_import.cc b/gtk2_ardour/editor_audio_import.cc index fa6b9da5fa..cf57261aa6 100644 --- a/gtk2_ardour/editor_audio_import.cc +++ b/gtk2_ardour/editor_audio_import.cc @@ -21,6 +21,7 @@ #include #include +#include #include #include @@ -48,6 +49,7 @@ using namespace ARDOUR; using namespace PBD; using namespace sigc; using namespace Gtk; +using namespace Gtkmm2ext; using namespace Editing; using Glib::ustring; @@ -169,7 +171,7 @@ Editor::do_embed (vector paths, bool split, ImportMode mode, AudioTrack to_embed.size() > 2 ? _("multichannel") : _("stereo"))); choices.push_back (_("Import as multiple regions")); - Gtkmm2ext::Choice chooser (string_compose (_("Paired files detected (%1, %2 ...).\nDo you want to:"), + Choice chooser (string_compose (_("Paired files detected (%1, %2 ...).\nDo you want to:"), to_embed[0], to_embed[1]), choices); @@ -215,7 +217,9 @@ Editor::do_embed (vector paths, bool split, ImportMode mode, AudioTrack int Editor::import_sndfile (vector paths, ImportMode mode, AudioTrack* track, nframes_t& pos) { - interthread_progress_window->set_title (string_compose (_("ardour: importing %1"), paths.front())); + WindowTitle title = string_compose (_("importing %1"), paths.front()); + + interthread_progress_window->set_title (title.get_string()); interthread_progress_window->set_position (Gtk::WIN_POS_MOUSE); interthread_progress_window->show_all (); interthread_progress_bar.set_fraction (0.0f); diff --git a/gtk2_ardour/editor_markers.cc b/gtk2_ardour/editor_markers.cc index 06e99d0fbb..f306c185f5 100644 --- a/gtk2_ardour/editor_markers.cc +++ b/gtk2_ardour/editor_markers.cc @@ -23,6 +23,7 @@ #include #include +#include #include #include @@ -43,6 +44,7 @@ using namespace sigc; using namespace ARDOUR; using namespace PBD; using namespace Gtk; +using namespace Gtkmm2ext; void Editor::clear_marker_display () @@ -856,13 +858,16 @@ Editor::marker_menu_rename () string txt; dialog.set_prompt (_("New Name:")); - + + WindowTitle title(Glib::get_application_name()); if (loc->is_mark()) { - dialog.set_title (_("ardour: rename mark")); + title += _("Rename Mark"); } else { - dialog.set_title (_("ardour: rename range")); + title += _("Rename Range"); } + dialog.set_title(title.get_string()); + dialog.set_name ("MarkRenameWindow"); dialog.set_size_request (250, -1); dialog.set_position (Gtk::WIN_POS_MOUSE); @@ -976,8 +981,8 @@ Editor::update_loop_range_view (bool visibility) if (visibility) { transport_loop_range_rect->show(); } - } - else if (visibility) { + + } else if (visibility) { transport_loop_range_rect->hide(); } } diff --git a/gtk2_ardour/editor_mixer.cc b/gtk2_ardour/editor_mixer.cc index ddab39d1ed..e37c7c7fe3 100644 --- a/gtk2_ardour/editor_mixer.cc +++ b/gtk2_ardour/editor_mixer.cc @@ -17,7 +17,9 @@ */ +#include #include +#include #include #include "editor.h" @@ -29,6 +31,8 @@ #include "i18n.h" +using namespace Gtkmm2ext; + void Editor::editor_mixer_button_toggled () { @@ -344,7 +348,10 @@ Editor::session_going_away () current_mixer_strip = 0; - set_title (_("ardour: editor")); + WindowTitle title(Glib::get_application_name()); + title += _("Editor"); + + set_title (title.get_string()); session = 0; } diff --git a/gtk2_ardour/editor_ops.cc b/gtk2_ardour/editor_ops.cc index e410dc3f60..ba874fc7cf 100644 --- a/gtk2_ardour/editor_ops.cc +++ b/gtk2_ardour/editor_ops.cc @@ -31,6 +31,7 @@ #include #include +#include #include #include @@ -67,6 +68,7 @@ using namespace ARDOUR; using namespace PBD; using namespace sigc; using namespace Gtk; +using namespace Gtkmm2ext; using namespace Editing; /*********************************************************************** @@ -1763,7 +1765,10 @@ Editor::rename_region () return; } - dialog.set_title (_("ardour: rename region")); + WindowTitle title(Glib::get_application_name()); + title += _("Rename Region"); + + dialog.set_title (title.get_string()); dialog.set_name ("RegionRenameWindow"); dialog.set_size_request (300, -1); dialog.set_position (Gtk::WIN_POS_MOUSE); @@ -2526,8 +2531,10 @@ Editor::freeze_route () if (interthread_progress_window == 0) { build_interthread_progress_window (); } - - interthread_progress_window->set_title (_("ardour: freeze")); + + WindowTitle title(Glib::get_application_name()); + title += _("Freeze"); + interthread_progress_window->set_title (title.get_string()); interthread_progress_window->set_position (Gtk::WIN_POS_MOUSE); interthread_progress_window->show_all (); interthread_progress_bar.set_fraction (0.0f); diff --git a/gtk2_ardour/editor_timefx.cc b/gtk2_ardour/editor_timefx.cc index 45cc42b11c..2efdc03f8f 100644 --- a/gtk2_ardour/editor_timefx.cc +++ b/gtk2_ardour/editor_timefx.cc @@ -26,6 +26,8 @@ #include #include +#include + #include "editor.h" #include "audio_time_axis.h" #include "audio_region_view.h" @@ -44,6 +46,7 @@ using namespace ARDOUR; using namespace PBD; using namespace sigc; using namespace Gtk; +using namespace Gtkmm2ext; Editor::TimeStretchDialog::TimeStretchDialog (Editor& e) : ArdourDialog ("time stretch dialog"), @@ -53,9 +56,12 @@ Editor::TimeStretchDialog::TimeStretchDialog (Editor& e) { set_modal (true); set_position (Gtk::WIN_POS_MOUSE); - set_title (_("ardour: timestretch")); set_name (N_("TimeStretchDialog")); + WindowTitle title(Glib::get_application_name()); + title += _("Timestretch"); + set_title(title.get_string()); + get_vbox()->set_spacing (5); get_vbox()->set_border_width (5); get_vbox()->pack_start (upper_button_box); diff --git a/gtk2_ardour/export_dialog.cc b/gtk2_ardour/export_dialog.cc index 75b0f8c1e9..1c70c758a5 100644 --- a/gtk2_ardour/export_dialog.cc +++ b/gtk2_ardour/export_dialog.cc @@ -29,6 +29,8 @@ #include #include +#include + #include #include #include @@ -51,6 +53,7 @@ using namespace ARDOUR; using namespace PBD; using namespace sigc; using namespace Gtk; +using namespace Gtkmm2ext; static const gchar *sample_rates[] = { N_("22.05kHz"), @@ -117,8 +120,11 @@ ExportDialog::ExportDialog(PublicEditor& e) track_and_master_selection_allowed = true; channel_count_selection_allowed = true; export_cd_markers_allowed = true; + + WindowTitle title(Glib::get_application_name()); + title += _("Export"); - set_title (_("ardour: export")); + set_title (title.get_string()); set_wmclass (X_("ardour_export"), "Ardour"); set_name ("ExportWindow"); add_events (Gdk::KEY_PRESS_MASK|Gdk::KEY_RELEASE_MASK); diff --git a/gtk2_ardour/location_ui.cc b/gtk2_ardour/location_ui.cc index e13366fd12..faf986a2d1 100644 --- a/gtk2_ardour/location_ui.cc +++ b/gtk2_ardour/location_ui.cc @@ -22,6 +22,7 @@ #include #include +#include #include #include @@ -566,13 +567,16 @@ LocationEditRow::flags_changed (ARDOUR::Location *loc, void *src) } LocationUI::LocationUI () - : ArdourDialog ("location dialog"), + : ArdourDialog ("locations dialog"), add_location_button (_("Add New Location")), add_range_button (_("Add New Range")) { i_am_the_modifier = 0; + + WindowTitle title(Glib::get_application_name()); + title += _("Locations"); - set_title(_("ardour: locations")); + set_title(title.get_string()); set_wmclass(X_("ardour_locations"), "Ardour"); set_name ("LocationWindow"); diff --git a/gtk2_ardour/mixer_ui.cc b/gtk2_ardour/mixer_ui.cc index d1089e48e6..cbd9cfe083 100644 --- a/gtk2_ardour/mixer_ui.cc +++ b/gtk2_ardour/mixer_ui.cc @@ -28,6 +28,7 @@ #include #include #include +#include #include #include @@ -201,7 +202,11 @@ Mixer_UI::Mixer_UI () add (global_vpacker); set_name ("MixerWindow"); - set_title (_("ardour: mixer")); + + WindowTitle title(Glib::get_application_name()); + title += _("Mixer"); + set_title (title.get_string()); + set_wmclass (X_("ardour_mixer"), "Ardour"); add_accel_group (ActionManager::ui_manager->get_accel_group()); @@ -353,9 +358,11 @@ Mixer_UI::connect_to_session (Session* sess) XMLNode* node = ARDOUR_UI::instance()->mixer_settings(); set_state (*node); - string wintitle = _("ardour: mixer: "); - wintitle += session->name(); - set_title (wintitle); + WindowTitle title(session->name()); + title += _("Mixer"); + title += Glib::get_application_name(); + + set_title (title.get_string()); initial_track_display (); @@ -382,7 +389,11 @@ Mixer_UI::disconnect_from_session () group_model->clear (); _selection.clear (); - set_title (_("ardour: mixer")); + + WindowTitle title(Glib::get_application_name()); + title += _("Mixer"); + set_title (title.get_string()); + stop_updating (); } diff --git a/gtk2_ardour/new_session_dialog.cc b/gtk2_ardour/new_session_dialog.cc index 4875ff835a..74ff9d022c 100644 --- a/gtk2_ardour/new_session_dialog.cc +++ b/gtk2_ardour/new_session_dialog.cc @@ -32,12 +32,16 @@ #include #include +#include + +using namespace Gtkmm2ext; + #include "opts.h" NewSessionDialog::NewSessionDialog() : ArdourDialog ("session control") { - session_name_label = Gtk::manage(new class Gtk::Label(_("Name :"))); + session_name_label = Gtk::manage(new class Gtk::Label(_("Name :"))); m_name = Gtk::manage(new class Gtk::Entry()); m_name->set_text(GTK_ARDOUR::session_name); @@ -338,7 +342,11 @@ NewSessionDialog::NewSessionDialog() get_vbox()->set_homogeneous(false); get_vbox()->set_spacing(0); get_vbox()->pack_start(*m_notebook, Gtk::PACK_SHRINK, 0); - set_title(_("ardour: session control")); + + WindowTitle title(Glib::get_application_name()); + title += _("Session Control"); + set_title(title.get_string()); + //set_modal(false); //property_window_position().set_value(Gtk::WIN_POS_NONE); set_resizable(false); diff --git a/gtk2_ardour/option_editor.cc b/gtk2_ardour/option_editor.cc index 5dd9727193..ad34e8ed0b 100644 --- a/gtk2_ardour/option_editor.cc +++ b/gtk2_ardour/option_editor.cc @@ -28,6 +28,7 @@ #include #include #include +#include #include "public_editor.h" #include "keyboard.h" @@ -52,7 +53,7 @@ using namespace std; static vector positional_sync_strings; OptionEditor::OptionEditor (ARDOUR_UI& uip, PublicEditor& ed, Mixer_UI& mixui) - : Dialog ("option editor"), + : Dialog ("options editor"), ui (uip), editor (ed), mixer (mixui), @@ -97,9 +98,12 @@ OptionEditor::OptionEditor (ARDOUR_UI& uip, PublicEditor& ed, Mixer_UI& mixui) click_io_selector = 0; auditioner_io_selector = 0; session = 0; + + WindowTitle title(Glib::get_application_name()); + title += _("Options Editor"); + set_title(title.get_string()); set_default_size (300, 300); - set_title (_("ardour: options editor")); set_wmclass (X_("ardour_option_editor"), "Ardour"); set_name ("OptionsWindow"); diff --git a/gtk2_ardour/playlist_selector.cc b/gtk2_ardour/playlist_selector.cc index 0ee99d1413..40f837eb5e 100644 --- a/gtk2_ardour/playlist_selector.cc +++ b/gtk2_ardour/playlist_selector.cc @@ -28,6 +28,7 @@ #include #include +#include #include "playlist_selector.h" #include "route_ui.h" @@ -38,6 +39,7 @@ using namespace std; using namespace sigc; using namespace Gtk; +using namespace Gtkmm2ext; using namespace ARDOUR; using namespace PBD; @@ -48,11 +50,14 @@ PlaylistSelector::PlaylistSelector () set_position (WIN_POS_MOUSE); set_name ("PlaylistSelectorWindow"); - set_title (_("ardour: playlists")); set_modal(true); add_events (Gdk::KEY_PRESS_MASK|Gdk::KEY_RELEASE_MASK); set_size_request (300, 200); + WindowTitle title(Glib::get_application_name()); + title += _("Playlists"); + set_title(title.get_string()); + model = TreeStore::create (columns); tree.set_model (model); tree.append_column (_("Playlists grouped by track"), columns.text); @@ -103,10 +108,9 @@ PlaylistSelector::show_for (RouteUI* ruix) rui = ruix; - str = _("ardour: playlist for "); - str += rui->route()->name(); - - set_title (str); + WindowTitle title(Glib::get_application_name()); + title += string_compose (_("Playlist for %1"), rui->route()->name()); + set_title (title.get_string()); clear_map (); select_connection.disconnect (); diff --git a/gtk2_ardour/redirect_box.cc b/gtk2_ardour/redirect_box.cc index e85510d976..2ab3b7af4a 100644 --- a/gtk2_ardour/redirect_box.cc +++ b/gtk2_ardour/redirect_box.cc @@ -24,6 +24,8 @@ #include +#include + #include #include @@ -32,6 +34,7 @@ #include #include #include +#include #include #include @@ -1007,11 +1010,12 @@ RedirectBox::edit_redirect (boost::shared_ptr redirect) if (send->get_gui() == 0) { - string title; - title = string_compose(_("ardour: %1"), send->name()); - send_ui = new SendUIWindow (send, _session); - send_ui->set_title (title); + + WindowTitle title(Glib::get_application_name()); + title += send->name(); + send_ui->set_title (title.get_string()); + send->set_gui (send_ui); } else { @@ -1048,7 +1052,10 @@ RedirectBox::edit_redirect (boost::shared_ptr redirect) ARDOUR_UI::instance()->the_editor().ensure_float (*plugin_ui); } - plugin_ui->set_title (generate_redirect_title (plugin_insert)); + WindowTitle title(Glib::get_application_name()); + title += generate_redirect_title (plugin_insert); + plugin_ui->set_title (title.get_string()); + plugin_insert->set_gui (plugin_ui); // change window title when route name is changed @@ -1315,8 +1322,12 @@ RedirectBox::route_name_changed (void* src, PluginUIWindow* plugin_ui, boost::we { ENSURE_GUI_THREAD(bind (mem_fun (*this, &RedirectBox::route_name_changed), src, plugin_ui, wpi)); boost::shared_ptr pi (wpi.lock()); + + if (pi) { - plugin_ui->set_title (generate_redirect_title (pi)); + WindowTitle title(Glib::get_application_name()); + title += generate_redirect_title (pi); + plugin_ui->set_title (title.get_string()); } } @@ -1335,6 +1346,6 @@ RedirectBox::generate_redirect_title (boost::shared_ptr pi) maker += " ..."; } - return string_compose(_("ardour: %1: %2 (by %3)"), _route->name(), pi->name(), maker); + return string_compose(_("%1: %2 (by %3)"), _route->name(), pi->name(), maker); } diff --git a/gtk2_ardour/route_params_ui.cc b/gtk2_ardour/route_params_ui.cc index 386815ea27..8d125a566d 100644 --- a/gtk2_ardour/route_params_ui.cc +++ b/gtk2_ardour/route_params_ui.cc @@ -22,6 +22,7 @@ #include #include #include +#include #include #include @@ -53,6 +54,7 @@ using namespace ARDOUR; using namespace PBD; using namespace Gtk; +using namespace Gtkmm2ext; using namespace sigc; RouteParams_UI::RouteParams_UI () @@ -135,9 +137,12 @@ RouteParams_UI::RouteParams_UI () set_name ("RouteParamsWindow"); set_default_size (620,370); - set_title (_("ardour: track/bus inspector")); set_wmclass (X_("ardour_route_parameters"), "Ardour"); + WindowTitle title(Glib::get_application_name()); + title += _("Track/Bus Inspector"); + set_title (title.get_string()); + // events route_display.get_selection()->signal_changed().connect(mem_fun(*this, &RouteParams_UI::route_selected)); route_display.get_column(0)->signal_clicked().connect(mem_fun(*this, &RouteParams_UI::show_track_menu)); @@ -650,29 +655,33 @@ RouteParams_UI::redirect_going_away (boost::shared_ptr redirec void RouteParams_UI::update_title () { - if (_route) { - string title; - title += _route->name(); -// title += ": "; - -// if (_redirect && (_current_view == PLUGIN_CONFIG_VIEW || _current_view == SEND_CONFIG_VIEW)) { -// title += _redirect->name(); -// } -// else if (_current_view == INPUT_CONFIG_VIEW) { -// title += _("INPUT"); -// } -// else if (_current_view == OUTPUT_CONFIG_VIEW) { -// title += _("OUTPUT"); -// } + WindowTitle title(Glib::get_application_name()); + title += _("Track/Bus Inspector"); + + if (_route) { + + // title += ": "; + + // if (_redirect && (_current_view == PLUGIN_CONFIG_VIEW || _current_view == SEND_CONFIG_VIEW)) { + // title += _redirect->name(); + // } + // else if (_current_view == INPUT_CONFIG_VIEW) { + // title += _("INPUT"); + // } + // else if (_current_view == OUTPUT_CONFIG_VIEW) { + // title += _("OUTPUT"); + // } + + title_label.set_text(_route->name()); - title_label.set_text(title); + title += _route->name(); - title = _("ardour: track/bus inspector: ") + title; - set_title(title); + set_title(title.get_string()); } else { title_label.set_text(_("No Route Selected")); - set_title(_("ardour: track/bus/inspector: no route selected")); + title += _("No Route Selected"); + set_title(title.get_string()); } } -- cgit v1.2.3