View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 0001486 | ardour | features | public | 2007-02-10 15:44 | 2008-11-21 00:33 |
| Reporter | b0ef | Assigned To | paul | ||
| Priority | low | Severity | trivial | Reproducibility | N/A |
| Status | closed | Resolution | fixed | ||
| Summary | 0001486: Session Name Prefix to Application Name | ||||
| Description | It would be nice if the name of the session comes before the "ardour" name in the window title; this is the normal thing to do | ||||
| Tags | No tags attached. | ||||
|
|
we already have the session name coming after the Ardour name. Is this really noticable? |
|
|
I think having the document name come before the application name is useful in applications such as The GIMP, Inkscape, Firefox, OOo etc where a common use case is to have several documents open at the same time. I believe it can make difference when trying to find a particular window/document if the window title is displayed in a panel on the desktop and only part of it is visible. I can't see any immediate need to implement this feature in ardour. |
|
|
Well, you can have multiple ardours' open, meaning ardour is a "document" based application. This is mentioned in the GNOME HIG, btw. As long as you can open several ardour, displaying the file/document/session name is the most important, imo |
|
|
I've applied your patch, Tim;) The dialog that pops up when you start, is still not fixed. The "Session Control" dialog. There are some issues: How about: no_noobs_allowed :: Editor :: Ardour no_noobs_allowed :: Mixer :: Ardour Btw, somehow the editor display [no_noobs_allowed], but the mixer displays only "no_noobs_allowed" without the "[" character. Another thing, but that's another usability issue I intend to discuss somewhere else, but related, is that the plugin windows still displays Ardour as prefix, but then again, it doesn't show up as a normal window in the window list, something it should, in my opinion;). Also, another thing, is to use a different colored icon for the mixer and editor, as a start, f.ex a greenish icon for the mixer and the strong red for the editor. I'll start a new request for this at some time;). Maybe this is why you use the "[" character to distinguish between the mixer and editor;). Thank you for looking into this issue;). |
|
|
On the mixer, it does not display "Mixer" and it does not contain the word "Ardour". |
|
|
> The dialog that pops up when you start, is still not fixed. The "Session Control" dialog. You never indicated that it was broken as far as I am aware. That string is the way it was before and not part of the reported issue. > How about: > no_noobs_allowed :: Editor :: Ardour > no_noobs_allowed :: Mixer :: Ardour I used a hyphen to separate the application name and document name because that is how it is done by many applications that I use such as Firefox, Inkscape, Glade and Open Office. You mentioned "normal thing to do", what you suggest does not seem normal to me. > Maybe this is why you use the "[" character to distinguish between the mixer and editor The square brackets indicate that the session state has been modified. I'm not sure why it is not done in the mixer window. It might not be the best choice as at least on my desktop when a window is minimized in the panel it has an additional set of square brackets around the window title so it becomes [[session name] - Ardour]. I notice that The GIMP prefixes a '*' character which may be easier to distinguish. > On the mixer, it does not display "Mixer" and it does not contain the word "Ardour". Yes I missed that. |
|
|
Yes, you are correct. It's best to use the hyphen and this is the normal thing to do;) |
|
|
Yes, it's probably wise to use "*" to indicate that the state has been modified. |
|
2007-03-18 01:17
|
window-title2.patch (24,544 bytes)
Index: gtk2_ardour/editor_timefx.cc
===================================================================
--- gtk2_ardour/editor_timefx.cc (revision 1608)
+++ gtk2_ardour/editor_timefx.cc (working copy)
@@ -26,6 +26,8 @@
#include <pbd/pthread_utils.h>
#include <pbd/memento_command.h>
+#include <gtkmm2ext/window_title.h>
+
#include "editor.h"
#include "audio_time_axis.h"
#include "audio_region_view.h"
@@ -44,6 +46,7 @@
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 @@
{
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);
Index: gtk2_ardour/editor_ops.cc
===================================================================
--- gtk2_ardour/editor_ops.cc (revision 1608)
+++ gtk2_ardour/editor_ops.cc (working copy)
@@ -31,6 +31,7 @@
#include <gtkmm2ext/utils.h>
#include <gtkmm2ext/choice.h>
+#include <gtkmm2ext/window_title.h>
#include <ardour/audioengine.h>
#include <ardour/session.h>
@@ -67,6 +68,7 @@
using namespace PBD;
using namespace sigc;
using namespace Gtk;
+using namespace Gtkmm2ext;
using namespace Editing;
/***********************************************************************
@@ -1763,7 +1765,10 @@
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 @@
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);
Index: gtk2_ardour/editor_audio_import.cc
===================================================================
--- gtk2_ardour/editor_audio_import.cc (revision 1608)
+++ gtk2_ardour/editor_audio_import.cc (working copy)
@@ -21,6 +21,7 @@
#include <pbd/basename.h>
#include <gtkmm2ext/choice.h>
+#include <gtkmm2ext/window_title.h>
#include <ardour/session.h>
#include <ardour/audioplaylist.h>
@@ -48,6 +49,7 @@
using namespace PBD;
using namespace sigc;
using namespace Gtk;
+using namespace Gtkmm2ext;
using namespace Editing;
using Glib::ustring;
@@ -169,7 +171,7 @@
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 @@
int
Editor::import_sndfile (vector<ustring> 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);
Index: gtk2_ardour/editor_mixer.cc
===================================================================
--- gtk2_ardour/editor_mixer.cc (revision 1608)
+++ gtk2_ardour/editor_mixer.cc (working copy)
@@ -17,7 +17,9 @@
*/
+#include <glibmm/miscutils.h>
#include <gtkmm2ext/utils.h>
+#include <gtkmm2ext/window_title.h>
#include <ardour/audioengine.h>
#include "editor.h"
@@ -29,6 +31,8 @@
#include "i18n.h"
+using namespace Gtkmm2ext;
+
void
Editor::editor_mixer_button_toggled ()
{
@@ -344,7 +348,10 @@
current_mixer_strip = 0;
- set_title (_("ardour: editor"));
+ WindowTitle title(Glib::get_application_name());
+ title += _("Editor");
+ set_title (title.get_string());
+
session = 0;
}
Index: gtk2_ardour/export_dialog.cc
===================================================================
--- gtk2_ardour/export_dialog.cc (revision 1608)
+++ gtk2_ardour/export_dialog.cc (working copy)
@@ -29,6 +29,8 @@
#include <pbd/xml++.h>
#include <gtkmm2ext/utils.h>
+#include <gtkmm2ext/window_title.h>
+
#include <ardour/export.h>
#include <ardour/sndfile_helpers.h>
#include <ardour/audio_track.h>
@@ -51,6 +53,7 @@
using namespace PBD;
using namespace sigc;
using namespace Gtk;
+using namespace Gtkmm2ext;
static const gchar *sample_rates[] = {
N_("22.05kHz"),
@@ -117,8 +120,11 @@
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);
Index: gtk2_ardour/new_session_dialog.cc
===================================================================
--- gtk2_ardour/new_session_dialog.cc (revision 1608)
+++ gtk2_ardour/new_session_dialog.cc (working copy)
@@ -32,12 +32,16 @@
#include <gtkmm/stock.h>
#include <gdkmm/cursor.h>
+#include <gtkmm2ext/window_title.h>
+
+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 @@
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);
Index: gtk2_ardour/ardour_ui.cc
===================================================================
--- gtk2_ardour/ardour_ui.cc (revision 1608)
+++ gtk2_ardour/ardour_ui.cc (working copy)
@@ -44,6 +44,7 @@
#include <gtkmm2ext/fastmeter.h>
#include <gtkmm2ext/stop_signal.h>
#include <gtkmm2ext/popup.h>
+#include <gtkmm2ext/window_title.h>
#include <midi++/port.h>
#include <midi++/mmc.h>
@@ -93,7 +94,7 @@
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),
Index: gtk2_ardour/location_ui.cc
===================================================================
--- gtk2_ardour/location_ui.cc (revision 1608)
+++ gtk2_ardour/location_ui.cc (working copy)
@@ -22,6 +22,7 @@
#include <gtkmm2ext/utils.h>
#include <gtkmm2ext/stop_signal.h>
+#include <gtkmm2ext/window_title.h>
#include <ardour/utils.h>
#include <ardour/configuration.h>
@@ -566,13 +567,16 @@
}
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");
Index: gtk2_ardour/editor_markers.cc
===================================================================
--- gtk2_ardour/editor_markers.cc (revision 1608)
+++ gtk2_ardour/editor_markers.cc (working copy)
@@ -23,6 +23,7 @@
#include <libgnomecanvas/libgnomecanvas.h>
#include <gtkmm2ext/gtk_ui.h>
+#include <gtkmm2ext/window_title.h>
#include <ardour/location.h>
#include <pbd/memento_command.h>
@@ -43,6 +44,7 @@
using namespace ARDOUR;
using namespace PBD;
using namespace Gtk;
+using namespace Gtkmm2ext;
void
Editor::clear_marker_display ()
@@ -856,13 +858,16 @@
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);
Index: gtk2_ardour/editor.cc
===================================================================
--- gtk2_ardour/editor.cc (revision 1608)
+++ gtk2_ardour/editor.cc (working copy)
@@ -30,6 +30,7 @@
#include <pbd/stacktrace.h>
#include <pbd/memento_command.h>
+#include <glibmm/miscutils.h>
#include <gtkmm/image.h>
#include <gdkmm/color.h>
#include <gdkmm/bitmap.h>
@@ -38,6 +39,7 @@
#include <gtkmm2ext/gtk_ui.h>
#include <gtkmm2ext/tearoff.h>
#include <gtkmm2ext/utils.h>
+#include <gtkmm2ext/window_title.h>
#include <ardour/audio_track.h>
#include <ardour/audio_diskstream.h>
@@ -708,7 +710,10 @@
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 @@
if (session) {
bool dirty = session->dirty();
- string wintitle = _("ardour: editor: ");
+ string session_name;
- if (dirty) {
- wintitle += '[';
- }
-
- wintitle += 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());
}
}
Index: gtk2_ardour/ardour_ui_ed.cc
===================================================================
--- gtk2_ardour/ardour_ui_ed.cc (revision 1608)
+++ gtk2_ardour/ardour_ui_ed.cc (working copy)
@@ -25,7 +25,10 @@
#include <pbd/pathscanner.h>
+#include <glibmm/miscutils.h>
+
#include <gtkmm2ext/utils.h>
+#include <gtkmm2ext/window_title.h>
#include "ardour_ui.h"
#include "public_editor.h"
@@ -714,7 +717,10 @@
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_("<Actions>/Common/ToggleBigClock")));
Index: gtk2_ardour/redirect_box.cc
===================================================================
--- gtk2_ardour/redirect_box.cc (revision 1608)
+++ gtk2_ardour/redirect_box.cc (working copy)
@@ -24,6 +24,8 @@
#include <pbd/convert.h>
+#include <glibmm/miscutils.h>
+
#include <gtkmm/messagedialog.h>
#include <gtkmm2ext/gtk_ui.h>
@@ -32,6 +34,7 @@
#include <gtkmm2ext/utils.h>
#include <gtkmm2ext/stop_signal.h>
#include <gtkmm2ext/doi.h>
+#include <gtkmm2ext/window_title.h>
#include <ardour/ardour.h>
#include <ardour/session.h>
@@ -1007,11 +1010,12 @@
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 @@
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 @@
{
ENSURE_GUI_THREAD(bind (mem_fun (*this, &RedirectBox::route_name_changed), src, plugin_ui, wpi));
boost::shared_ptr<PluginInsert> 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 @@
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);
}
Index: gtk2_ardour/option_editor.cc
===================================================================
--- gtk2_ardour/option_editor.cc (revision 1608)
+++ gtk2_ardour/option_editor.cc (working copy)
@@ -28,6 +28,7 @@
#include <midi++/manager.h>
#include <gtkmm2ext/stop_signal.h>
#include <gtkmm2ext/utils.h>
+#include <gtkmm2ext/window_title.h>
#include "public_editor.h"
#include "keyboard.h"
@@ -52,7 +53,7 @@
static vector<string> 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 @@
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");
Index: gtk2_ardour/playlist_selector.cc
===================================================================
--- gtk2_ardour/playlist_selector.cc (revision 1608)
+++ gtk2_ardour/playlist_selector.cc (working copy)
@@ -28,6 +28,7 @@
#include <ardour/configuration.h>
#include <gtkmm2ext/gtk_ui.h>
+#include <gtkmm2ext/window_title.h>
#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 @@
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,11 +108,10 @@
rui = ruix;
- str = _("ardour: playlist for ");
- str += rui->route()->name();
+ WindowTitle title(Glib::get_application_name());
+ title += string_compose (_("Playlist for %1"), rui->route()->name());
+ set_title (title.get_string());
- set_title (str);
-
clear_map ();
select_connection.disconnect ();
Index: gtk2_ardour/mixer_ui.cc
===================================================================
--- gtk2_ardour/mixer_ui.cc (revision 1608)
+++ gtk2_ardour/mixer_ui.cc (working copy)
@@ -28,6 +28,7 @@
#include <gtkmm2ext/gtk_ui.h>
#include <gtkmm2ext/utils.h>
#include <gtkmm2ext/stop_signal.h>
+#include <gtkmm2ext/window_title.h>
#include <ardour/session.h>
#include <ardour/audio_track.h>
@@ -201,7 +202,11 @@
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,10 +358,12 @@
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 ();
session->GoingAway.connect (mem_fun(*this, &Mixer_UI::disconnect_from_session));
@@ -382,7 +389,11 @@
group_model->clear ();
_selection.clear ();
- set_title (_("ardour: mixer"));
+
+ WindowTitle title(Glib::get_application_name());
+ title += _("Mixer");
+ set_title (title.get_string());
+
stop_updating ();
}
Index: gtk2_ardour/route_params_ui.cc
===================================================================
--- gtk2_ardour/route_params_ui.cc (revision 1608)
+++ gtk2_ardour/route_params_ui.cc (working copy)
@@ -22,6 +22,7 @@
#include <glibmm/thread.h>
#include <gtkmm2ext/utils.h>
#include <gtkmm2ext/stop_signal.h>
+#include <gtkmm2ext/window_title.h>
#include <ardour/session.h>
#include <ardour/session_route.h>
@@ -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 @@
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 @@
void
RouteParams_UI::update_title ()
{
- if (_route) {
- string title;
- title += _route->name();
-// title += ": ";
+ WindowTitle title(Glib::get_application_name());
+ title += _("Track/Bus Inspector");
-// 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");
-// }
+ 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());
}
}
Index: gtk2_ardour/audio_region_editor.cc
===================================================================
--- gtk2_ardour/audio_region_editor.cc (revision 1608)
+++ gtk2_ardour/audio_region_editor.cc (working copy)
@@ -24,6 +24,7 @@
#include <ardour/utils.h>
#include <gtkmm2ext/utils.h>
#include <gtkmm2ext/stop_signal.h>
+#include <gtkmm2ext/window_title.h>
#include <cmath>
#include "audio_region_editor.h"
@@ -38,6 +39,7 @@
using namespace PBD;
using namespace sigc;
using namespace std;
+using namespace Gtkmm2ext;
AudioRegionEditor::AudioRegionEditor (Session& s, boost::shared_ptr<AudioRegion> r, AudioRegionView& rv)
: RegionEditor (s),
@@ -118,10 +120,11 @@
signal_delete_event().connect (bind (sigc::ptr_fun (just_hide_it), static_cast<Window *> (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();
name_changed ();
Index: libs/gtkmm2ext/gtkmm2ext/window_title.h
===================================================================
--- libs/gtkmm2ext/gtkmm2ext/window_title.h (revision 0)
+++ libs/gtkmm2ext/gtkmm2ext/window_title.h (revision 0)
@@ -0,0 +1,44 @@
+#ifndef WINDOW_TITLE_INCLUDED
+#define WINDOW_TITLE_INCLUDED
+
+#include <string>
+
+namespace Gtkmm2ext {
+
+using std::string;
+
+/**
+ * \class The WindowTitle class can be used to maintain the
+ * consistancy of window titles between windows and dialogs.
+ *
+ * Each string element that is added to the window title will
+ * be separated by a hyphen.
+ */
+class WindowTitle
+{
+public:
+
+ /**
+ * \param title The first string/element of the window title
+ * which will may be the application name or the document
+ * name in a document based application.
+ */
+ WindowTitle(const string& title);
+
+ /**
+ * Add an string element to the window title.
+ */
+ void operator+= (const string&);
+
+ /// @return The window title string.
+ const string& get_string () { return m_title;}
+
+private:
+
+ string m_title;
+
+};
+
+} // Gtkmm2ext
+
+#endif // WINDOW_TITLE_INCLUDED
Index: libs/gtkmm2ext/window_title.cc
===================================================================
--- libs/gtkmm2ext/window_title.cc (revision 0)
+++ libs/gtkmm2ext/window_title.cc (revision 0)
@@ -0,0 +1,26 @@
+#include "gtkmm2ext/window_title.h"
+
+#include "i18n.h"
+
+namespace {
+
+// I don't know if this should be translated.
+const char* const title_separator = X_(" - ");
+
+} // anonymous namespace
+
+namespace Gtkmm2ext {
+
+WindowTitle::WindowTitle(const string& title)
+ : m_title(title)
+{
+
+}
+
+void
+WindowTitle::operator+= (const string& element)
+{
+ m_title = m_title + title_separator + element;
+}
+
+}
Index: libs/gtkmm2ext/gtk_ui.cc
===================================================================
--- libs/gtkmm2ext/gtk_ui.cc (revision 1608)
+++ libs/gtkmm2ext/gtk_ui.cc (working copy)
@@ -37,6 +37,7 @@
#include <gtkmm2ext/textviewer.h>
#include <gtkmm2ext/popup.h>
#include <gtkmm2ext/utils.h>
+#include <gtkmm2ext/window_title.h>
#include "i18n.h"
@@ -87,11 +88,12 @@
errors->text().set_editable (false);
errors->text().set_name ("ErrorText");
- string title;
- title = namestr;
- title += ": Log";
- errors->set_title (title);
+ Glib::set_application_name(namestr);
+ WindowTitle title(Glib::get_application_name());
+ title += _("Log");
+ errors->set_title (title.get_string());
+
errors->dismiss_button().set_name ("ErrorLogCloseButton");
errors->signal_delete_event().connect (bind (sigc::ptr_fun (just_hide_it), (Window *) errors));
Index: libs/gtkmm2ext/SConscript
===================================================================
--- libs/gtkmm2ext/SConscript (revision 1608)
+++ libs/gtkmm2ext/SConscript (working copy)
@@ -56,6 +56,7 @@
textviewer.cc
utils.cc
version.cc
+window_title.cc
""")
gtkmm2ext.VersionBuild(['version.cc','gtkmm2ext/version.h'], [])
|
|
|
Following are some notes related to this issue: The KDE and Microsoft interface guidelines both suggest using book title capitalization for window titles: http://developer.kde.org/documentation/standards/kde/style/basics/labels.html#booktitle http://msdn2.microsoft.com/en-us/library/ms997617.aspx The KDE and Gnome HIG suggest that the document and application names should be separated by a hyphen: KDE: "The application window should be labelled with the name of the document in the window, and the application name, separated by a hyphen" http://developer.kde.org/documentation/standards/kde/style/basics/windows.html Gnome: "While document names are most pertinent to users, we understand that application developers may want to increase recognition of their application. If you plan to include your application's name in the title of a primary window, use the following format: Document Name - Application Name. This will ensure that the document name appears in limited space situations such as the system window list." The Gnome HIG also recommends not to include the application name in a document based application. http://developer.gnome.org/projects/gup/hig/2.0/windows-primary.html I couldn't find it mentioned in the Microsoft interface guidelines but the examples show the use of book title capitalization and a separating hyphen. http://msdn2.microsoft.com/en-us/library/ms997488.aspx The Apple HIG suggests that a document window should display the name of the document and using an em dash rather than a hyphen to separate items in the title. http://developer.apple.com/documentation/UserExperience/Conceptual/OSXHIGuidelines/XHIGWindows/chapter_17_section_3.html |
|
|
I've updated the patch. It should change the window titles to use book title capitalization and use a dash to separate the elements. It also uses a '*' to indicate when the ardour session has not been saved as per the gnome HIG. There are possibly some further improvements that could be made such as using an em dash on apple systems. |
|
|
applied to my code and committed in rev 1617 |
|
|
The "Session Control" box popping up on start has not resolved this issue |
|
|
applied and committed. |
| Date Modified | Username | Field | Change |
|---|---|---|---|
| 2007-02-10 15:44 | b0ef | New Issue | |
| 2007-02-12 17:37 | taybin | Note Added: 0003222 | |
| 2007-02-12 17:40 | taybin | Relationship added | related to 0001487 |
| 2007-02-12 22:21 | timbyr | Note Added: 0003227 | |
| 2007-02-13 09:23 | b0ef | Note Added: 0003228 | |
| 2007-02-13 21:37 | timbyr | Status | new => acknowledged |
| 2007-02-13 21:38 | timbyr | Priority | normal => low |
| 2007-02-13 21:38 | timbyr | Severity | feature => trivial |
| 2007-02-13 21:38 | timbyr | Product Version | => SVN |
| 2007-02-13 22:01 | timbyr | Relationship added | related to 0001483 |
| 2007-02-17 12:49 | timbyr | File Added: window-title.patch | |
| 2007-02-19 14:25 | b0ef | Note Added: 0003318 | |
| 2007-02-19 14:29 | b0ef | Note Added: 0003319 | |
| 2007-02-19 15:11 | timbyr | Note Added: 0003322 | |
| 2007-02-19 15:25 | b0ef | Note Added: 0003323 | |
| 2007-02-19 15:29 | b0ef | Note Added: 0003324 | |
| 2007-03-18 01:17 | timbyr | File Added: window-title2.patch | |
| 2007-03-18 01:18 | timbyr | File Deleted: window-title.patch | |
| 2007-03-18 01:19 | timbyr | Note Added: 0003594 | |
| 2007-03-18 01:29 | timbyr | Note Added: 0003595 | |
| 2007-03-18 16:46 | paul | Status | acknowledged => resolved |
| 2007-03-18 16:46 | paul | Resolution | open => fixed |
| 2007-03-18 16:46 | paul | Assigned To | => paul |
| 2007-03-18 16:46 | paul | Note Added: 0003596 | |
| 2007-03-19 00:17 | timbyr | Relationship deleted | related to 0001483 |
| 2007-03-20 14:15 | b0ef | Status | resolved => feedback |
| 2007-03-20 14:15 | b0ef | Resolution | fixed => reopened |
| 2007-03-20 14:15 | b0ef | Note Added: 0003606 | |
| 2007-03-20 14:21 | paul | Status | feedback => resolved |
| 2007-03-20 14:21 | paul | Resolution | reopened => fixed |
| 2007-03-20 14:21 | paul | Note Added: 0003607 | |
| 2008-11-21 00:33 | seablade | Status | resolved => closed |