prettify and change button order for pending state dialog, use an icon for the NSD

git-svn-id: svn://localhost/ardour2/branches/2.0-ongoing@2844 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
Nick Mainsbridge 2008-01-08 16:16:22 +00:00
parent eb540eeaee
commit 9789ff84f2
2 changed files with 38 additions and 7 deletions

View file

@ -2957,7 +2957,9 @@ ARDOUR_UI::disk_speed_dialog_gone (int ignored_response, MessageDialog* msg)
int
ARDOUR_UI::pending_state_dialog ()
{
ArdourDialog dialog ("pending state dialog");
HBox* hbox = new HBox();
Image* image = new Image (Stock::DIALOG_QUESTION, ICON_SIZE_DIALOG);
ArdourDialog dialog (_("Crash Recovery"), true);
Label message (_("\
This session appears to have been in\n\
middle of recording when ardour or\n\
@ -2966,14 +2968,18 @@ the computer was shutdown.\n\
Ardour can recover any captured audio for\n\
you, or it can ignore it. Please decide\n\
what you would like to do.\n"));
dialog.get_vbox()->pack_start (message);
dialog.add_button (_("Recover from crash"), RESPONSE_ACCEPT);
image->set_alignment(ALIGN_CENTER, ALIGN_TOP);
hbox->pack_start (*image, PACK_EXPAND_WIDGET, 12);
hbox->pack_end (message, PACK_EXPAND_PADDING, 12);
dialog.get_vbox()->pack_start(*hbox, PACK_EXPAND_PADDING, 6);
dialog.add_button (_("Ignore crash data"), RESPONSE_REJECT);
dialog.add_button (_("Recover from crash"), RESPONSE_ACCEPT);
dialog.set_default_response (RESPONSE_ACCEPT);
dialog.set_position (WIN_POS_CENTER);
dialog.show_all ();
message.show();
image->show();
hbox->show();
switch (dialog.run ()) {
case RESPONSE_ACCEPT:
return 1;

View file

@ -38,6 +38,7 @@
using namespace Gtkmm2ext;
#include "opts.h"
#include "utils.h"
NewSessionDialog::NewSessionDialog()
: ArdourDialog ("session control")
@ -346,6 +347,30 @@ NewSessionDialog::NewSessionDialog()
get_vbox()->set_spacing(0);
get_vbox()->pack_start(*m_notebook, Gtk::PACK_SHRINK, 0);
/*
icon setting is done again in the editor (for the whole app),
but its all chickens and eggs at this point.
*/
list<Glib::RefPtr<Gdk::Pixbuf> > window_icons;
Glib::RefPtr<Gdk::Pixbuf> icon;
if ((icon = ::get_icon ("ardour_icon_16px")) != 0) {
window_icons.push_back (icon);
}
if ((icon = ::get_icon ("ardour_icon_22px")) != 0) {
window_icons.push_back (icon);
}
if ((icon = ::get_icon ("ardour_icon_32px")) != 0) {
window_icons.push_back (icon);
}
if ((icon = ::get_icon ("ardour_icon_48px")) != 0) {
window_icons.push_back (icon);
}
if (!window_icons.empty()) {
set_icon_list (window_icons);
}
WindowTitle title(Glib::get_application_name());
title += _("Session Control");
set_title(title.get_string());